-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core/application): app switch (#1007)
Co-authored-by: Lukas Maurer <lukas.maurer@siemens.com>
- Loading branch information
1 parent
9ba9823
commit 3298e87
Showing
229 changed files
with
10,392 additions
and
2,141 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
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
11 changes: 11 additions & 0 deletions
11
packages/angular-test-app/src/preview-examples/about-and-legal.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,11 @@ | ||
<ix-application> | ||
<ix-application-header> | ||
<div class="placeholder-logo" slot="logo"></div> | ||
</ix-application-header> | ||
<ix-menu #menu> | ||
<ix-menu-about> | ||
<ix-menu-about-item label="Tab 1">Content 1</ix-menu-about-item> | ||
<ix-menu-about-item label="Tab 2">Content 2</ix-menu-about-item> | ||
</ix-menu-about> | ||
</ix-menu> | ||
</ix-application> |
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
17 changes: 17 additions & 0 deletions
17
packages/angular-test-app/src/preview-examples/application-app-switch.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,17 @@ | ||
<ix-application [appSwitchConfig]="appSwitchConfig"> | ||
<ix-application-header name="My Application"> | ||
<div class="placeholder-logo" slot="logo"></div> | ||
</ix-application-header> | ||
<ix-menu> | ||
<ix-menu-item>Item 1</ix-menu-item> | ||
<ix-menu-item>Item 2</ix-menu-item> | ||
</ix-menu> | ||
|
||
<ix-content> | ||
<ix-content-header | ||
slot="header" | ||
header-title="My Content Page" | ||
> | ||
</ix-content-header> | ||
</ix-content> | ||
</ix-application> |
40 changes: 40 additions & 0 deletions
40
packages/angular-test-app/src/preview-examples/application-app-switch.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,40 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { Component } from '@angular/core'; | ||
import { AppSwitchConfiguration } from '@siemens/ix'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './application-app-switch.html', | ||
}) | ||
export default class ApplicationAppSwitchExample { | ||
appSwitchConfig: AppSwitchConfiguration = { | ||
i18nAppSwitch: 'Switch to Application', | ||
currentAppId: 'demo-app-2', | ||
apps: [ | ||
{ | ||
id: 'demo-app-1', | ||
name: 'Floor App', | ||
iconSrc: 'https://www.svgrepo.com/show/530661/genetic-data.svg', | ||
url: 'https://ix.siemens.io/', | ||
description: 'Example description for floor app', | ||
target: '_self', | ||
}, | ||
{ | ||
id: 'demo-app-2', | ||
name: 'Calculator App', | ||
iconSrc: 'https://www.svgrepo.com/show/530661/genetic-data.svg', | ||
url: 'https://ix.siemens.io/', | ||
description: 'Example description for floor app', | ||
target: '_self', | ||
}, | ||
], | ||
}; | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/angular-test-app/src/preview-examples/application-breakpoints.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,38 @@ | ||
<ix-application application-name="Application name" [breakpoints]="breakpoints"> | ||
<ix-application-header name="My Application"> | ||
<div class="placeholder-logo" slot="logo"></div> | ||
|
||
<ix-dropdown-button variant="secondary" label="Select config" ghost> | ||
<ix-dropdown-item label="Config 1"></ix-dropdown-item> | ||
<ix-dropdown-item label="Config 2"></ix-dropdown-item> | ||
<ix-dropdown-item label="Config 3"></ix-dropdown-item> | ||
</ix-dropdown-button> | ||
|
||
<ix-avatar> | ||
<ix-dropdown-item label="Action 1"></ix-dropdown-item> | ||
<ix-dropdown-item label="Action 2"></ix-dropdown-item> | ||
<ix-dropdown-item label="Action 3"></ix-dropdown-item> | ||
</ix-avatar> | ||
</ix-application-header> | ||
|
||
<ix-menu> | ||
<ix-menu-item>Item 1</ix-menu-item> | ||
<ix-menu-item>Item 2</ix-menu-item> | ||
</ix-menu> | ||
<ix-content> | ||
<ix-content-header | ||
slot="header" | ||
header-title="Choose breakpoint" | ||
> | ||
</ix-content-header> | ||
|
||
<input id="small" type="radio" name="layout" value="sm" (change)="onCheckedChange('sm')" /> | ||
<label for="small">Small</label> | ||
|
||
<input id="medium" type="radio" name="layout" value="md" (change)="onCheckedChange('md')" checked /> | ||
<label for="medium">Medium</label> | ||
|
||
<input id="large" type="radio" name="layout" value="lg" (change)="onCheckedChange('lg')" /> | ||
<label for="large">Large</label> | ||
</ix-content> | ||
</ix-application> |
22 changes: 22 additions & 0 deletions
22
packages/angular-test-app/src/preview-examples/application-breakpoints.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,22 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
import { Component } from '@angular/core'; | ||
import { Breakpoint } from '@siemens/ix'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './application-breakpoints.html', | ||
}) | ||
export default class ApplicationBreakpointExample { | ||
breakpoints: Breakpoint[] = ['md']; | ||
|
||
onCheckedChange(breakpoint: Breakpoint) { | ||
this.breakpoints = [breakpoint]; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/angular-test-app/src/preview-examples/application-header.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,19 @@ | ||
<ix-application-header name="My Application"> | ||
<div class="placeholder-logo" slot="logo"></div> | ||
|
||
<ix-icon-button ghost icon="checkboxes"></ix-icon-button> | ||
<ix-icon-button ghost icon="checkboxes"></ix-icon-button> | ||
<ix-icon-button ghost icon="checkboxes"></ix-icon-button> | ||
|
||
<ix-dropdown-button variant="secondary" label="Select config" ghost> | ||
<ix-dropdown-item label="Config 1"></ix-dropdown-item> | ||
<ix-dropdown-item label="Config 2"></ix-dropdown-item> | ||
<ix-dropdown-item label="Config 3"></ix-dropdown-item> | ||
</ix-dropdown-button> | ||
|
||
<ix-avatar> | ||
<ix-dropdown-item label="Action 1"></ix-dropdown-item> | ||
<ix-dropdown-item label="Action 2"></ix-dropdown-item> | ||
<ix-dropdown-item label="Action 3"></ix-dropdown-item> | ||
</ix-avatar> | ||
</ix-application-header> |
16 changes: 16 additions & 0 deletions
16
packages/angular-test-app/src/preview-examples/application-header.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,16 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './application-header.html', | ||
}) | ||
export default class ApplicationHeaderExample {} |
17 changes: 17 additions & 0 deletions
17
packages/angular-test-app/src/preview-examples/application.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,17 @@ | ||
<ix-application> | ||
<ix-application-header name="My Application"> | ||
<div class="placeholder-logo" slot="logo"></div> | ||
</ix-application-header> | ||
<ix-menu> | ||
<ix-menu-item>Item 1</ix-menu-item> | ||
<ix-menu-item>Item 2</ix-menu-item> | ||
</ix-menu> | ||
|
||
<ix-content> | ||
<ix-content-header | ||
slot="header" | ||
header-title="My Content Page" | ||
> | ||
</ix-content-header> | ||
</ix-content> | ||
</ix-application> |
16 changes: 16 additions & 0 deletions
16
packages/angular-test-app/src/preview-examples/application.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,16 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './application.html', | ||
}) | ||
export default class ApplicationExample {} |
13 changes: 13 additions & 0 deletions
13
packages/angular-test-app/src/preview-examples/content.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,13 @@ | ||
<ix-content> | ||
<ix-content-header slot="header" header-title="My Content Page"> | ||
</ix-content-header> | ||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy | ||
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam | ||
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet | ||
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit | ||
amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam | ||
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, | ||
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea | ||
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem | ||
ipsum dolor sit amet. | ||
</ix-content> |
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 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-example', | ||
templateUrl: './content.html', | ||
}) | ||
export default class ContentExample {} |
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
13 changes: 13 additions & 0 deletions
13
packages/angular-test-app/src/preview-examples/popover-news.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,13 @@ | ||
<ix-application> | ||
<ix-application-header> | ||
<div class="placeholder-logo" slot="logo"></div> | ||
</ix-application-header> | ||
<ix-menu> | ||
<ix-menu-about> | ||
<ix-menu-about-item label="Example"> </ix-menu-about-item> | ||
</ix-menu-about> | ||
<ix-menu-about-news label="Test" show about-item-label="Example"> | ||
Test | ||
</ix-menu-about-news> | ||
</ix-menu> | ||
</ix-application> |
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
Oops, something went wrong.