-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb6fa98
commit 07f3372
Showing
64 changed files
with
1,349 additions
and
137 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
57 changes: 57 additions & 0 deletions
57
apps/workbench-testing-app/src/app/desktop-page/desktop-page.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,57 @@ | ||
<section> | ||
<sci-form-field label="URL Segments"> | ||
<span class="e2e-url-segments">{{desktop.urlSegments | appJoin:'/'}}</span> | ||
</sci-form-field> | ||
|
||
<sci-form-field label="Navigation Hint"> | ||
<span class="e2e-navigation-hint">{{desktop.navigationHint}}</span> | ||
</sci-form-field> | ||
|
||
<sci-form-field label="Instantiation ID" title="Unique identifier of this component instance"> | ||
<span class="e2e-component-instance-id">{{uuid}}</span> | ||
</sci-form-field> | ||
</section> | ||
|
||
@if (route.params | async | appNullIfEmpty; as params) { | ||
<sci-accordion class="e2e-params" variant="solid"> | ||
<ng-template sciAccordionItem [panel]="panel_route_params"> | ||
<header>Route Params</header> | ||
</ng-template> | ||
<ng-template #panel_route_params> | ||
<sci-key-value [object]="params | appAppendParamDataType" class="e2e-params"/> | ||
</ng-template> | ||
</sci-accordion> | ||
} | ||
|
||
<section> | ||
<header>Desktop Properties</header> | ||
|
||
<sci-form-field label="CSS Class(es)"> | ||
<app-css-class [formControl]="form.controls.cssClass"/> | ||
</sci-form-field> | ||
</section> | ||
|
||
<section> | ||
<header>Route Data</header> | ||
|
||
@if (route?.snapshot?.params | appNullIfEmpty; as params) { | ||
<section> | ||
<header>Route Params</header> | ||
<sci-key-value [object]="params" class="e2e-route-params"/> | ||
</section> | ||
} | ||
|
||
@if (route?.snapshot?.data | appNullIfEmpty; as data) { | ||
<section> | ||
<header>Route Data</header> | ||
<sci-key-value [object]="data" class="e2e-route-data"/> | ||
</section> | ||
} | ||
</section> | ||
|
||
@if (desktop.state | appNullIfEmpty; as state) { | ||
<section> | ||
<header>Desktop State</header> | ||
<sci-key-value [object]="state" class="e2e-state"/> | ||
</section> | ||
} |
32 changes: 32 additions & 0 deletions
32
apps/workbench-testing-app/src/app/desktop-page/desktop-page.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,32 @@ | ||
@use '@scion/components.internal/design' as sci-design; | ||
|
||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1em; | ||
padding: 1em; | ||
|
||
> section { | ||
display: flex; | ||
flex-direction: column; | ||
gap: .5em; | ||
border: 1px solid var(--sci-color-border); | ||
border-radius: var(--sci-corner); | ||
padding: 1em; | ||
|
||
> header { | ||
margin-bottom: 1em; | ||
font-weight: bold; | ||
} | ||
} | ||
|
||
> sci-accordion { | ||
header { | ||
font-weight: bold; | ||
} | ||
|
||
&.part-actions input { | ||
@include sci-design.style-input-field(); | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
apps/workbench-testing-app/src/app/desktop-page/desktop-page.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,55 @@ | ||
/* | ||
* Copyright (c) 2018-2024 Swiss Federal Railways | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
import {Component} from '@angular/core'; | ||
import {SciFormFieldComponent} from '@scion/components.internal/form-field'; | ||
import {WorkbenchDesktop} from '@scion/workbench'; | ||
import {JoinPipe} from '../common/join.pipe'; | ||
import {UUID} from '@scion/toolkit/uuid'; | ||
import {ActivatedRoute} from '@angular/router'; | ||
import {AsyncPipe} from '@angular/common'; | ||
import {NullIfEmptyPipe} from '../common/null-if-empty.pipe'; | ||
import {SciAccordionComponent, SciAccordionItemDirective} from '@scion/components.internal/accordion'; | ||
import {SciKeyValueComponent} from '@scion/components.internal/key-value'; | ||
import {AppendParamDataTypePipe} from '../common/append-param-data-type.pipe'; | ||
import {CssClassComponent} from '../css-class/css-class.component'; | ||
import {NonNullableFormBuilder, ReactiveFormsModule} from '@angular/forms'; | ||
|
||
@Component({ | ||
selector: 'app-desktop-page', | ||
templateUrl: './desktop-page.component.html', | ||
styleUrls: ['./desktop-page.component.scss'], | ||
standalone: true, | ||
imports: [ | ||
SciFormFieldComponent, | ||
JoinPipe, | ||
AsyncPipe, | ||
NullIfEmptyPipe, | ||
SciAccordionComponent, | ||
SciAccordionItemDirective, | ||
SciKeyValueComponent, | ||
AppendParamDataTypePipe, | ||
CssClassComponent, | ||
ReactiveFormsModule, | ||
], | ||
}) | ||
export default class DesktopPageComponent { | ||
|
||
public uuid = UUID.randomUUID(); | ||
public form = this._formBuilder.group({ | ||
cssClass: this._formBuilder.control(''), | ||
}); | ||
|
||
constructor(private _formBuilder: NonNullableFormBuilder, | ||
public desktop: WorkbenchDesktop, | ||
public route: ActivatedRoute) { | ||
} | ||
} | ||
|
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
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
24 changes: 24 additions & 0 deletions
24
...h-testing-app/src/app/layout-page/tables/navigate-desktop/navigate-desktop.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,24 @@ | ||
<form [formGroup]="form"> | ||
<span>Path</span> | ||
<span>Hint</span> | ||
<span>State</span> | ||
<span>CSS Class(es)</span> | ||
@if (navigateDesktop) { | ||
<!-- Remove button --> | ||
<button class="e2e-remove" (click)="onRemoveNavigation()" title="Remove navigation" sciMaterialIcon>remove</button> | ||
} @else { | ||
<!-- Add button --> | ||
<button (click)="onAddNavigation()" class="e2e-add" title="Add navigation" sciMaterialIcon>add</button> | ||
} | ||
|
||
@if (navigateDesktop) { | ||
<!-- Commands --> | ||
<app-router-commands [formControl]="form.controls.commands"/> | ||
<!-- Hint --> | ||
<input [formControl]="form.controls.extras.controls.hint" class="e2e-hint"> | ||
<!-- State --> | ||
<app-record [formControl]="form.controls.extras.controls.state" class="e2e-state"/> | ||
<!-- CSS class --> | ||
<app-css-class [formControl]="form.controls.extras.controls.cssClass"/> | ||
} | ||
</form> |
Oops, something went wrong.