-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: First iteration of example content for openmfp (#87)
- Loading branch information
Showing
19 changed files
with
557 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
frontend/projects/ui/src/app/showcase/showcase-details/showcase-details.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<ui5-card class="card"> | ||
<ui5-card-header slot="header" title-text="Congratulations !" | ||
subtitle-text="Click below to navigate back"> | ||
</ui5-card-header> | ||
<div class="content"> | ||
<ui5-button (click)="navigate()">Click here !</ui5-button> | ||
</div> | ||
</ui5-card> | ||
|
8 changes: 8 additions & 0 deletions
8
frontend/projects/ui/src/app/showcase/showcase-details/showcase-details.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.card { | ||
width: 300px; | ||
} | ||
|
||
.content { | ||
margin-left: 10px; | ||
padding: 5px; | ||
} |
17 changes: 17 additions & 0 deletions
17
frontend/projects/ui/src/app/showcase/showcase-details/showcase-details.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component } from '@angular/core'; | ||
import { linkManager } from '@luigi-project/client'; | ||
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx'; | ||
|
||
@Component({ | ||
selector: 'app-showcase-details', | ||
standalone: true, | ||
imports: [Ui5WebcomponentsModule], | ||
templateUrl: './showcase-details.component.html', | ||
styleUrl: './showcase-details.component.scss' | ||
}) | ||
export class ShowcaseDetailsComponent { | ||
|
||
navigate() { | ||
linkManager().fromContext('showcase').navigate(`/`); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
frontend/projects/ui/src/app/showcase/showcase.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<ui5-card class="card"> | ||
<ui5-card-header slot="header" title-text="Virtualtree navigation example" | ||
subtitle-text="Click below to test the navigation"> | ||
</ui5-card-header> | ||
<div class="content"> | ||
<ui5-button (click)="navigate()">Click here !</ui5-button> | ||
</div> | ||
</ui5-card> | ||
|
||
|
8 changes: 8 additions & 0 deletions
8
frontend/projects/ui/src/app/showcase/showcase.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.card { | ||
width: 300px; | ||
} | ||
|
||
.content { | ||
margin-left: 10px; | ||
padding: 5px; | ||
} |
17 changes: 17 additions & 0 deletions
17
frontend/projects/ui/src/app/showcase/showcase.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component } from '@angular/core'; | ||
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx'; | ||
import { linkManager } from '@luigi-project/client'; | ||
|
||
@Component({ | ||
selector: 'app-showcase', | ||
standalone: true, | ||
imports: [Ui5WebcomponentsModule], | ||
templateUrl: './showcase.component.html', | ||
styleUrl: './showcase.component.scss' | ||
}) | ||
export class ShowcaseComponent { | ||
|
||
navigate() { | ||
linkManager().fromContext('showcase').navigate(`/showcase-details`); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "configuration-examples-overview", | ||
"creationTimestamp": "", | ||
"luigiConfigFragment": { | ||
"data": { | ||
"nodes": [ | ||
{ | ||
"entityType": "global", | ||
"pathSegment": "home", | ||
"hideFromNav": true, | ||
"defineEntity": { | ||
"id": "main" | ||
}, | ||
"children": [ | ||
{ | ||
"pathSegment": "overview", | ||
"label": "Configuration examples overview", | ||
"icon": "home", | ||
"defineEntity": { | ||
"id": "overview" | ||
}, | ||
"compound": { | ||
"renderer": { | ||
"use": "grid", | ||
"config": { | ||
"columns": "1fr 1fr 1fr 1fr" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"entityType": "main.overview::compound", | ||
"url": "https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js", | ||
"context": { | ||
"border": "shadow", | ||
"title": "Welcome to OpenMFP Portal", | ||
"description": "Click on Show Example button to preview particular feature." | ||
}, | ||
"layoutConfig": { | ||
"row": "1", | ||
"column": "1 / -1" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
frontend/projects/ui/src/assets/showcase-examples/firstExample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "entity-definition-example", | ||
"creationTimestamp": "", | ||
"luigiConfigFragment": { | ||
"data": { | ||
"nodes": [ | ||
{ | ||
"entityType": "main", | ||
"pathSegment": "firstExample", | ||
"hideFromNav": true, | ||
"defineEntity": { | ||
"id": "first-example" | ||
}, | ||
"compound": { | ||
"renderer": { | ||
"use": "grid", | ||
"config": { | ||
"columns": "1fr 1fr 1fr 1fr" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"entityType": "main.first-example::compound", | ||
"url": "https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js", | ||
"context": { | ||
"border": "shadow", | ||
"title": "{{firstExampleTitle}}", | ||
"description": "{{firstExampleDescription}}" | ||
} | ||
} | ||
], | ||
"texts": [ | ||
{ | ||
"locale": "", | ||
"textDictionary": { | ||
"firstExampleTitle": "Definition of an Entity", | ||
"firstExampleDescription": "Entity is basic building block of configuration." | ||
} | ||
}, | ||
{ | ||
"locale": "en", | ||
"textDictionary": { | ||
"firstExampleTitle": "Definition of an Entity", | ||
"firstExampleDescription": "Entity is basic building block of configuration." | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
frontend/projects/ui/src/assets/showcase-examples/fourthExample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "web-component-integration-example", | ||
"creationTimestamp": "", | ||
"luigiConfigFragment": { | ||
"data": { | ||
"nodes": [ | ||
{ | ||
"entityType": "main", | ||
"pathSegment": "fourthExample", | ||
"hideFromNav": true, | ||
"defineEntity": { | ||
"id": "fourth-example" | ||
}, | ||
"compound": { | ||
} | ||
}, | ||
{ | ||
"entityType": "main.fourth-example::compound", | ||
"urlSuffix": "/ui/example-content/main.js#account-overview", | ||
"context": { | ||
"title": "Showcase" | ||
}, | ||
"layoutConfig": { | ||
"row": "1", | ||
"column": "1 / -1" | ||
}, | ||
"webcomponent": { | ||
"selfRegistered": true | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
frontend/projects/ui/src/assets/showcase-examples/secondExample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "micro-frontend-iframe-example", | ||
"creationTimestamp": "", | ||
"luigiConfigFragment": { | ||
"data": { | ||
"nodes": [ | ||
{ | ||
"entityType": "main", | ||
"pathSegment": "secondExample", | ||
"virtualTree": true, | ||
"navigationContext": "showcase", | ||
"urlSuffix": "/ui/example-content/index.html#/showcase", | ||
"loadingIndicator": { | ||
"enabled": false | ||
}, | ||
"requiredIFramePermissions": { | ||
"sandbox": [ | ||
"allow-forms", | ||
"allow-modals", | ||
"allow-popups", | ||
"allow-popups-to-escape-sandbox", | ||
"allow-same-origin", | ||
"allow-scripts", | ||
"allow-download" | ||
], | ||
"allow": [ | ||
"clipboard-read", | ||
"clipboard-write" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
frontend/projects/wc/src/app/showcase/showcase.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div class="showcase-cards"> | ||
@for (item of showcaseItems; track $index) { | ||
<ui5-card class="showcase-card"> | ||
<ui5-panel fixed> | ||
<div class="header"> | ||
<ui5-title class="title" level="H4">{{item.header}}</ui5-title> | ||
@if(item.linkToExample) { | ||
<ui5-button class="button" design="Emphasized" (ui5Click)="show(item.linkToExample)">Show Example</ui5-button> | ||
} | ||
</div> | ||
<ui5-label class="description">{{item.label}}</ui5-label> | ||
<ui5-text class="content">{{item.example}}</ui5-text> | ||
</ui5-panel> | ||
</ui5-card> | ||
} | ||
</div> |
35 changes: 35 additions & 0 deletions
35
frontend/projects/wc/src/app/showcase/showcase.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.showcase-cards { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 1rem; | ||
margin-top: 1rem; | ||
} | ||
|
||
.showcase-card { | ||
display: block; | ||
|
||
.description { | ||
margin: 10px; | ||
} | ||
|
||
.content { | ||
white-space: pre-wrap; | ||
word-spacing: 4px; | ||
} | ||
} | ||
|
||
.header { | ||
padding: 10px; | ||
display: flex; | ||
|
||
.title { | ||
padding-top: 5px; | ||
} | ||
|
||
.button { | ||
margin-left: 30px; | ||
padding: 5px; | ||
border-radius: 5px; | ||
} | ||
} | ||
|
Oops, something went wrong.