@siemens/element-ng 49.19.0 → 49.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/fesm2022/siemens-element-ng-application-header.mjs +40 -17
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +7 -3
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +3 -0
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/package.json +3 -3
- package/types/siemens-element-ng-application-header.d.ts +8 -1
- package/types/siemens-element-ng-side-panel.d.ts +5 -1
- package/types/siemens-element-ng-tooltip.d.ts +1 -0
package/README.md
CHANGED
|
@@ -17,10 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
<p></p>
|
|
19
19
|
<p align="center">
|
|
20
|
-
Siemens Element is a design system
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
vibrant community of contributors.
|
|
20
|
+
Siemens Element is a design system that implements the Siemens Design
|
|
21
|
+
Language in Angular. It includes UI components, design tools and resources,
|
|
22
|
+
human interface guidelines, and a vibrant community of contributors.
|
|
24
23
|
</p>
|
|
25
24
|
<p></p>
|
|
26
25
|
|
|
@@ -3,7 +3,7 @@ import { CdkTrapFocus, A11yModule } from '@angular/cdk/a11y';
|
|
|
3
3
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
4
4
|
import { NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { input, signal, inject, Injector, viewChild, effect, untracked, ChangeDetectionStrategy, Component, Directive, ElementRef, computed, afterNextRender, HostListener, booleanAttribute, model, output } from '@angular/core';
|
|
6
|
+
import { input, signal, inject, Injector, viewChild, effect, untracked, ChangeDetectionStrategy, Component, Directive, ElementRef, computed, afterNextRender, HostListener, booleanAttribute, model, DestroyRef, output } from '@angular/core';
|
|
7
7
|
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { elementMenu, elementThumbnails, elementDown2, elementOptionsVertical, elementFavoritesFilled, elementFavorites, elementExport, elementCancel } from '@siemens/element-icons';
|
|
9
9
|
import { SI_HEADER_WITH_DROPDOWNS, SiHeaderDropdownTriggerDirective, SI_HEADER_DROPDOWN_OPTIONS } from '@siemens/element-ng/header-dropdown';
|
|
@@ -686,6 +686,24 @@ class SiLaunchpadAppComponent {
|
|
|
686
686
|
externalLinkText = input(t(() => $localize `:@@SI_LAUNCHPAD.EXTERNAL_LINK:External application`), ...(ngDevMode ? [{ debugName: "externalLinkText" }] : []));
|
|
687
687
|
icons = addIcons({ elementExport, elementFavorites, elementFavoritesFilled });
|
|
688
688
|
header = inject(SiApplicationHeaderComponent);
|
|
689
|
+
appName = viewChild('appName', ...(ngDevMode ? [{ debugName: "appName" }] : []));
|
|
690
|
+
systemName = viewChild('systemName', ...(ngDevMode ? [{ debugName: "systemName" }] : []));
|
|
691
|
+
tooltip = viewChild.required('appTooltip');
|
|
692
|
+
constructor() {
|
|
693
|
+
const tooltip = inject(SiTooltipService).createTooltip({
|
|
694
|
+
element: inject(ElementRef),
|
|
695
|
+
placement: 'auto',
|
|
696
|
+
canShow: () => {
|
|
697
|
+
const appName = this.appName()?.nativeElement;
|
|
698
|
+
const systemName = this.systemName()?.nativeElement;
|
|
699
|
+
return !!((appName && appName.scrollWidth > appName.clientWidth) ||
|
|
700
|
+
(systemName && systemName.scrollWidth > systemName.clientWidth));
|
|
701
|
+
},
|
|
702
|
+
tooltip: this.tooltip,
|
|
703
|
+
tooltipContext: () => undefined
|
|
704
|
+
});
|
|
705
|
+
inject(DestroyRef).onDestroy(() => tooltip.destroy());
|
|
706
|
+
}
|
|
689
707
|
favoriteClicked(event) {
|
|
690
708
|
event.stopPropagation();
|
|
691
709
|
event.preventDefault();
|
|
@@ -695,22 +713,18 @@ class SiLaunchpadAppComponent {
|
|
|
695
713
|
this.header.closeLaunchpad();
|
|
696
714
|
}
|
|
697
715
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiLaunchpadAppComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
698
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiLaunchpadAppComponent, isStandalone: true, selector: "a[si-launchpad-app]", inputs: { external: { classPropertyName: "external", publicName: "external", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, enableFavoriteToggle: { classPropertyName: "enableFavoriteToggle", publicName: "enableFavoriteToggle", isSignal: true, isRequired: false, transformFunction: null }, favorite: { classPropertyName: "favorite", publicName: "favorite", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null }, iconUrl: { classPropertyName: "iconUrl", publicName: "iconUrl", isSignal: true, isRequired: false, transformFunction: null }, iconClass: { classPropertyName: "iconClass", publicName: "iconClass", isSignal: true, isRequired: false, transformFunction: null }, externalLinkText: { classPropertyName: "externalLinkText", publicName: "externalLinkText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { favorite: "favoriteChange" }, host: { listeners: { "keydown.space": "favoriteClicked($event)", "click": "click()" }, properties: { "class.active": "active()", "class.action": "action()" }, classAttribute: "focus-inside" }, ngImport: i0, template: "@if (iconUrl()) {\n <img alt=\"\" width=\"64\" height=\"64\" class=\"app-icon\" [src]=\"iconUrl()\" />\n} @else if (iconClass()) {\n <si-icon class=\"app-icon\" [icon]=\"iconClass()!\" />\n}\n<div class=\"app-text\">\n <div class=\"si-h4 d-flex align-items-center mw-100 gap-1\">\n <span class=\"text-truncate\">\n <ng-content select=\"[app-name]\" />\n </span>\n @if (external()) {\n <si-icon\n class=\"icon\"\n [icon]=\"icons.elementExport\"\n [attr.aria-label]=\"externalLinkText() | translate\"\n />\n }\n </div>\n <div class=\"si-body text-secondary mt-2 text-truncate mw-100\">\n <ng-content select=\"[app-systemName]\" />\n </div>\n</div>\n@if (enableFavoriteToggle()) {\n <si-icon\n class=\"icon favorite-icon\"\n [class.is-favorite]=\"favorite()\"\n [icon]=\"favorite() ? icons.elementFavoritesFilled : icons.elementFavorites\"\n (click)=\"favoriteClicked($event)\"\n />\n}\n", styles: [":host{display:flex;align-items:center;flex-flow:column nowrap;position:relative;padding-block:24px;inline-size:calc(7rem + 40px);max-inline-size:calc(7rem + 40px);padding-inline:8px;color:var(--element-text-primary);border-radius:var(--element-radius-2)}:host.action{color:var(--element-action-primary)}:host.active,:host:hover{color:var(--element-text-primary);text-decoration:none}:host.active{background-color:var(--element-base-1-selected)}:host:hover{background-color:var(--element-base-1-hover)}.app-text{display:flex;align-items:center;flex-direction:column;max-inline-size:100%;overflow:hidden}.app-icon{display:flex;align-items:center;justify-content:center;inline-size:3rem;block-size:3rem;margin-block-end:8px;border-radius:var(--element-radius-2)}.app-icon:is(si-icon){background:var(--element-launchpad-app-background);font-size:2.5rem;padding:4px;color:var(--element-launchpad-app-color)}.favorite-icon{position:absolute;inset-inline-end:16px;inset-block-start:16px;color:var(--element-text-primary)}.is-favorite{color:var(--element-status-caution)}@media(max-width:767.98px){:host{flex-flow:row nowrap;inline-size:100%;max-inline-size:100%;padding:8px}:host:has(.favorite-icon){padding-inline-end:32px}.app-icon{margin-block-end:0;margin-inline-end:8px}.app-text{align-items:start}.favorite-icon{inset-inline-end:8px;inset-block-start:8px}}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
716
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiLaunchpadAppComponent, isStandalone: true, selector: "a[si-launchpad-app]", inputs: { external: { classPropertyName: "external", publicName: "external", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, enableFavoriteToggle: { classPropertyName: "enableFavoriteToggle", publicName: "enableFavoriteToggle", isSignal: true, isRequired: false, transformFunction: null }, favorite: { classPropertyName: "favorite", publicName: "favorite", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null }, iconUrl: { classPropertyName: "iconUrl", publicName: "iconUrl", isSignal: true, isRequired: false, transformFunction: null }, iconClass: { classPropertyName: "iconClass", publicName: "iconClass", isSignal: true, isRequired: false, transformFunction: null }, externalLinkText: { classPropertyName: "externalLinkText", publicName: "externalLinkText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { favorite: "favoriteChange" }, host: { listeners: { "keydown.space": "favoriteClicked($event)", "click": "click()" }, properties: { "class.active": "active()", "class.action": "action()" }, classAttribute: "focus-inside" }, providers: [SiTooltipService], viewQueries: [{ propertyName: "appName", first: true, predicate: ["appName"], descendants: true, isSignal: true }, { propertyName: "systemName", first: true, predicate: ["systemName"], descendants: true, isSignal: true }, { propertyName: "tooltip", first: true, predicate: ["appTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (iconUrl()) {\n <img alt=\"\" width=\"64\" height=\"64\" class=\"app-icon\" [src]=\"iconUrl()\" />\n} @else if (iconClass()) {\n <si-icon class=\"app-icon\" [icon]=\"iconClass()!\" />\n}\n<div class=\"app-text\">\n <div class=\"si-h4 d-flex align-items-center mw-100 gap-1\">\n <span #appName class=\"text-truncate\">\n <ng-content select=\"[app-name]\" />\n </span>\n @if (external()) {\n <si-icon\n class=\"icon\"\n [icon]=\"icons.elementExport\"\n [attr.aria-label]=\"externalLinkText() | translate\"\n />\n }\n </div>\n <div #systemName class=\"si-body text-secondary mt-2 text-truncate mw-100\">\n <ng-content select=\"[app-systemName]\" />\n </div>\n</div>\n<ng-template #appTooltip>\n <div class=\"si-body-sbold\">{{ appName.textContent.trim() }}</div>\n @if (systemName.textContent.trim(); as systemNameText) {\n <div class=\"si-body\">{{ systemNameText }}</div>\n }\n</ng-template>\n@if (enableFavoriteToggle()) {\n <si-icon\n class=\"icon favorite-icon\"\n [class.is-favorite]=\"favorite()\"\n [icon]=\"favorite() ? icons.elementFavoritesFilled : icons.elementFavorites\"\n (click)=\"favoriteClicked($event)\"\n />\n}\n", styles: [":host{display:flex;align-items:center;flex-flow:column nowrap;position:relative;padding-block:24px;inline-size:calc(7rem + 40px);max-inline-size:calc(7rem + 40px);padding-inline:8px;color:var(--element-text-primary);border-radius:var(--element-radius-2)}:host.action{color:var(--element-action-primary)}:host.active,:host:hover{color:var(--element-text-primary);text-decoration:none}:host.active{background-color:var(--element-base-1-selected)}:host:hover{background-color:var(--element-base-1-hover)}:host-context(.wrap-labels){inline-size:100%}:host-context(.wrap-labels) .text-truncate{white-space:pre-line;overflow-wrap:anywhere}:host-context(.wrap-labels) .app-text{min-inline-size:0;text-align:center}.app-text{display:flex;align-items:center;flex-direction:column;max-inline-size:100%;overflow:hidden}.app-icon{display:flex;align-items:center;justify-content:center;inline-size:3rem;block-size:3rem;margin-block-end:8px;border-radius:var(--element-radius-2)}.app-icon:is(si-icon){background:var(--element-launchpad-app-background);font-size:2.5rem;padding:4px;color:var(--element-launchpad-app-color)}.favorite-icon{position:absolute;inset-inline-end:16px;inset-block-start:16px;color:var(--element-text-primary)}.is-favorite{color:var(--element-status-caution)}@media(max-width:767.98px){:host{flex-flow:row nowrap;inline-size:100%;max-inline-size:100%;padding:8px}:host:has(.favorite-icon){padding-inline-end:32px}.app-icon{margin-block-end:0;margin-inline-end:8px}.app-text{align-items:start}:host-context(.wrap-labels) .app-text{text-align:start}:host-context(.wrap-labels) .app-icon{flex-shrink:0}.favorite-icon{inset-inline-end:8px;inset-block-start:8px}}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
699
717
|
}
|
|
700
718
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiLaunchpadAppComponent, decorators: [{
|
|
701
719
|
type: Component,
|
|
702
|
-
args: [{ selector: 'a[si-launchpad-app]', imports: [SiIconComponent, SiTranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
720
|
+
args: [{ selector: 'a[si-launchpad-app]', imports: [SiIconComponent, SiTranslatePipe], providers: [SiTooltipService], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
703
721
|
class: 'focus-inside',
|
|
704
722
|
'[class.active]': 'active()',
|
|
705
|
-
'[class.action]': 'action()'
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}], click: [{
|
|
711
|
-
type: HostListener,
|
|
712
|
-
args: ['click']
|
|
713
|
-
}] } });
|
|
723
|
+
'[class.action]': 'action()',
|
|
724
|
+
'(keydown.space)': 'favoriteClicked($event)',
|
|
725
|
+
'(click)': 'click()'
|
|
726
|
+
}, template: "@if (iconUrl()) {\n <img alt=\"\" width=\"64\" height=\"64\" class=\"app-icon\" [src]=\"iconUrl()\" />\n} @else if (iconClass()) {\n <si-icon class=\"app-icon\" [icon]=\"iconClass()!\" />\n}\n<div class=\"app-text\">\n <div class=\"si-h4 d-flex align-items-center mw-100 gap-1\">\n <span #appName class=\"text-truncate\">\n <ng-content select=\"[app-name]\" />\n </span>\n @if (external()) {\n <si-icon\n class=\"icon\"\n [icon]=\"icons.elementExport\"\n [attr.aria-label]=\"externalLinkText() | translate\"\n />\n }\n </div>\n <div #systemName class=\"si-body text-secondary mt-2 text-truncate mw-100\">\n <ng-content select=\"[app-systemName]\" />\n </div>\n</div>\n<ng-template #appTooltip>\n <div class=\"si-body-sbold\">{{ appName.textContent.trim() }}</div>\n @if (systemName.textContent.trim(); as systemNameText) {\n <div class=\"si-body\">{{ systemNameText }}</div>\n }\n</ng-template>\n@if (enableFavoriteToggle()) {\n <si-icon\n class=\"icon favorite-icon\"\n [class.is-favorite]=\"favorite()\"\n [icon]=\"favorite() ? icons.elementFavoritesFilled : icons.elementFavorites\"\n (click)=\"favoriteClicked($event)\"\n />\n}\n", styles: [":host{display:flex;align-items:center;flex-flow:column nowrap;position:relative;padding-block:24px;inline-size:calc(7rem + 40px);max-inline-size:calc(7rem + 40px);padding-inline:8px;color:var(--element-text-primary);border-radius:var(--element-radius-2)}:host.action{color:var(--element-action-primary)}:host.active,:host:hover{color:var(--element-text-primary);text-decoration:none}:host.active{background-color:var(--element-base-1-selected)}:host:hover{background-color:var(--element-base-1-hover)}:host-context(.wrap-labels){inline-size:100%}:host-context(.wrap-labels) .text-truncate{white-space:pre-line;overflow-wrap:anywhere}:host-context(.wrap-labels) .app-text{min-inline-size:0;text-align:center}.app-text{display:flex;align-items:center;flex-direction:column;max-inline-size:100%;overflow:hidden}.app-icon{display:flex;align-items:center;justify-content:center;inline-size:3rem;block-size:3rem;margin-block-end:8px;border-radius:var(--element-radius-2)}.app-icon:is(si-icon){background:var(--element-launchpad-app-background);font-size:2.5rem;padding:4px;color:var(--element-launchpad-app-color)}.favorite-icon{position:absolute;inset-inline-end:16px;inset-block-start:16px;color:var(--element-text-primary)}.is-favorite{color:var(--element-status-caution)}@media(max-width:767.98px){:host{flex-flow:row nowrap;inline-size:100%;max-inline-size:100%;padding:8px}:host:has(.favorite-icon){padding-inline-end:32px}.app-icon{margin-block-end:0;margin-inline-end:8px}.app-text{align-items:start}:host-context(.wrap-labels) .app-text{text-align:start}:host-context(.wrap-labels) .app-icon{flex-shrink:0}.favorite-icon{inset-inline-end:8px;inset-block-start:8px}}\n"] }]
|
|
727
|
+
}], ctorParameters: () => [], propDecorators: { external: [{ type: i0.Input, args: [{ isSignal: true, alias: "external", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], enableFavoriteToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableFavoriteToggle", required: false }] }], favorite: [{ type: i0.Input, args: [{ isSignal: true, alias: "favorite", required: false }] }, { type: i0.Output, args: ["favoriteChange"] }], action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: false }] }], iconUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconUrl", required: false }] }], iconClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconClass", required: false }] }], externalLinkText: [{ type: i0.Input, args: [{ isSignal: true, alias: "externalLinkText", required: false }] }], appName: [{ type: i0.ViewChild, args: ['appName', { isSignal: true }] }], systemName: [{ type: i0.ViewChild, args: ['systemName', { isSignal: true }] }], tooltip: [{ type: i0.ViewChild, args: ['appTooltip', { isSignal: true }] }] } });
|
|
714
728
|
|
|
715
729
|
/**
|
|
716
730
|
* Copyright (c) Siemens 2016 - 2026
|
|
@@ -729,14 +743,14 @@ class SiLaunchpadCategoryComponent {
|
|
|
729
743
|
return '_noFavorite' in app && !!app._noFavorite;
|
|
730
744
|
}
|
|
731
745
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiLaunchpadCategoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
732
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiLaunchpadCategoryComponent, isStandalone: true, selector: "si-launchpad-category", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null }, enableFavorites: { classPropertyName: "enableFavorites", publicName: "enableFavorites", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { favoriteChange: "favoriteChange" }, host: { properties: { "class.has-title": "!!category().name" }, classAttribute: "d-block" }, ngImport: i0, template: "@if (category().name) {\n <div class=\"si-h4 launchpad-category-title mt-4 mb-6\">\n {{ category().name | translate }}\n </div>\n}\n<div class=\"
|
|
746
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiLaunchpadCategoryComponent, isStandalone: true, selector: "si-launchpad-category", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null }, enableFavorites: { classPropertyName: "enableFavorites", publicName: "enableFavorites", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { favoriteChange: "favoriteChange" }, host: { properties: { "class.has-title": "!!category().name" }, classAttribute: "d-block" }, ngImport: i0, template: "@if (category().name) {\n <div class=\"si-h4 launchpad-category-title mt-4 mb-6\">\n {{ category().name | translate }}\n </div>\n}\n<div class=\"apps gap-4\">\n @for (app of category().apps; track app) {\n @switch (app.type) {\n @case ('router-link') {\n <a\n si-launchpad-app\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"app.activeMatchOptions ?? { exact: false }\"\n [enableFavoriteToggle]=\"enableFavorites() && !isFavoriteToggleDisabled(app)\"\n [external]=\"app.external\"\n [iconUrl]=\"app.iconUrl\"\n [iconClass]=\"app.iconClass\"\n [favorite]=\"!!app.favorite\"\n [routerLink]=\"app.routerLink\"\n [queryParams]=\"app.extras?.queryParams\"\n [queryParamsHandling]=\"app.extras?.queryParamsHandling\"\n [fragment]=\"app.extras?.fragment\"\n [state]=\"app.extras?.state\"\n [relativeTo]=\"app.extras?.relativeTo ?? this.activatedRoute\"\n [preserveFragment]=\"app.extras?.preserveFragment\"\n [skipLocationChange]=\"app.extras?.skipLocationChange\"\n [replaceUrl]=\"app.extras?.replaceUrl\"\n (favoriteChange)=\"toggleFavorite(app, $event)\"\n >\n <span app-name>{{ app.name | translate }}</span>\n <span app-systemName>{{ app.systemName | translate }}</span>\n </a>\n }\n @default {\n <!--fallback for existing apps that do not have a type defined -->\n <a\n si-launchpad-app\n [enableFavoriteToggle]=\"enableFavorites() && !isFavoriteToggleDisabled(app)\"\n [favorite]=\"!!app.favorite\"\n [href]=\"app.href\"\n [target]=\"app.target ?? ''\"\n [active]=\"app.active\"\n [external]=\"app.external\"\n [iconUrl]=\"app.iconUrl\"\n [iconClass]=\"app.iconClass\"\n (favoriteChange)=\"toggleFavorite(app, $event)\"\n >\n <span app-name>{{ app.name | translate }}</span>\n <span app-systemName>{{ app.systemName | translate }}</span>\n </a>\n }\n }\n }\n</div>\n", styles: [".apps{display:flex;flex-wrap:wrap}:host-context(.wrap-labels) .apps{display:grid;grid-auto-rows:1fr;grid-template-columns:minmax(0,1fr)}@media(min-width:768px){:host-context(.wrap-labels) .apps{grid-template-columns:repeat(auto-fill,min(100%,7rem + 40px))}}\n"], dependencies: [{ kind: "component", type: SiLaunchpadAppComponent, selector: "a[si-launchpad-app]", inputs: ["external", "active", "enableFavoriteToggle", "favorite", "action", "iconUrl", "iconClass", "externalLinkText"], outputs: ["favoriteChange"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
733
747
|
}
|
|
734
748
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiLaunchpadCategoryComponent, decorators: [{
|
|
735
749
|
type: Component,
|
|
736
750
|
args: [{ selector: 'si-launchpad-category', imports: [SiLaunchpadAppComponent, SiTranslatePipe, RouterLinkActive, RouterLink], host: {
|
|
737
751
|
class: 'd-block',
|
|
738
752
|
'[class.has-title]': '!!category().name'
|
|
739
|
-
}, template: "@if (category().name) {\n <div class=\"si-h4 launchpad-category-title mt-4 mb-6\">\n {{ category().name | translate }}\n </div>\n}\n<div class=\"
|
|
753
|
+
}, template: "@if (category().name) {\n <div class=\"si-h4 launchpad-category-title mt-4 mb-6\">\n {{ category().name | translate }}\n </div>\n}\n<div class=\"apps gap-4\">\n @for (app of category().apps; track app) {\n @switch (app.type) {\n @case ('router-link') {\n <a\n si-launchpad-app\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"app.activeMatchOptions ?? { exact: false }\"\n [enableFavoriteToggle]=\"enableFavorites() && !isFavoriteToggleDisabled(app)\"\n [external]=\"app.external\"\n [iconUrl]=\"app.iconUrl\"\n [iconClass]=\"app.iconClass\"\n [favorite]=\"!!app.favorite\"\n [routerLink]=\"app.routerLink\"\n [queryParams]=\"app.extras?.queryParams\"\n [queryParamsHandling]=\"app.extras?.queryParamsHandling\"\n [fragment]=\"app.extras?.fragment\"\n [state]=\"app.extras?.state\"\n [relativeTo]=\"app.extras?.relativeTo ?? this.activatedRoute\"\n [preserveFragment]=\"app.extras?.preserveFragment\"\n [skipLocationChange]=\"app.extras?.skipLocationChange\"\n [replaceUrl]=\"app.extras?.replaceUrl\"\n (favoriteChange)=\"toggleFavorite(app, $event)\"\n >\n <span app-name>{{ app.name | translate }}</span>\n <span app-systemName>{{ app.systemName | translate }}</span>\n </a>\n }\n @default {\n <!--fallback for existing apps that do not have a type defined -->\n <a\n si-launchpad-app\n [enableFavoriteToggle]=\"enableFavorites() && !isFavoriteToggleDisabled(app)\"\n [favorite]=\"!!app.favorite\"\n [href]=\"app.href\"\n [target]=\"app.target ?? ''\"\n [active]=\"app.active\"\n [external]=\"app.external\"\n [iconUrl]=\"app.iconUrl\"\n [iconClass]=\"app.iconClass\"\n (favoriteChange)=\"toggleFavorite(app, $event)\"\n >\n <span app-name>{{ app.name | translate }}</span>\n <span app-systemName>{{ app.systemName | translate }}</span>\n </a>\n }\n }\n }\n</div>\n", styles: [".apps{display:flex;flex-wrap:wrap}:host-context(.wrap-labels) .apps{display:grid;grid-auto-rows:1fr;grid-template-columns:minmax(0,1fr)}@media(min-width:768px){:host-context(.wrap-labels) .apps{grid-template-columns:repeat(auto-fill,min(100%,7rem + 40px))}}\n"] }]
|
|
740
754
|
}], propDecorators: { category: [{ type: i0.Input, args: [{ isSignal: true, alias: "category", required: true }] }], enableFavorites: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableFavorites", required: false }] }], favoriteChange: [{ type: i0.Output, args: ["favoriteChange"] }] } });
|
|
741
755
|
|
|
742
756
|
/**
|
|
@@ -769,6 +783,13 @@ class SiLaunchpadFactoryComponent {
|
|
|
769
783
|
subtitleText = input(...(ngDevMode ? [undefined, { debugName: "subtitleText" }] : []));
|
|
770
784
|
/** All app items shown in the launchpad. */
|
|
771
785
|
apps = input.required(...(ngDevMode ? [{ debugName: "apps" }] : []));
|
|
786
|
+
/**
|
|
787
|
+
* Wrap app names and descriptions instead of truncating them and showing a tooltip.
|
|
788
|
+
* Rows within each section have equal height in this mode.
|
|
789
|
+
*
|
|
790
|
+
* @defaultValue false
|
|
791
|
+
*/
|
|
792
|
+
wrapAppLabels = input(false, { ...(ngDevMode ? { debugName: "wrapAppLabels" } : {}), transform: booleanAttribute });
|
|
772
793
|
/**
|
|
773
794
|
* Allow the user to select favorite apps which will then be displayed at the top.
|
|
774
795
|
*
|
|
@@ -841,7 +862,7 @@ class SiLaunchpadFactoryComponent {
|
|
|
841
862
|
return items.some(item => 'apps' in item);
|
|
842
863
|
}
|
|
843
864
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiLaunchpadFactoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
844
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiLaunchpadFactoryComponent, isStandalone: true, selector: "si-launchpad-factory", inputs: { closeText: { classPropertyName: "closeText", publicName: "closeText", isSignal: true, isRequired: false, transformFunction: null }, titleText: { classPropertyName: "titleText", publicName: "titleText", isSignal: true, isRequired: false, transformFunction: null }, subtitleText: { classPropertyName: "subtitleText", publicName: "subtitleText", isSignal: true, isRequired: false, transformFunction: null }, apps: { classPropertyName: "apps", publicName: "apps", isSignal: true, isRequired: true, transformFunction: null }, enableFavorites: { classPropertyName: "enableFavorites", publicName: "enableFavorites", isSignal: true, isRequired: false, transformFunction: null }, favoriteAppsText: { classPropertyName: "favoriteAppsText", publicName: "favoriteAppsText", isSignal: true, isRequired: false, transformFunction: null }, showMoreAppsText: { classPropertyName: "showMoreAppsText", publicName: "showMoreAppsText", isSignal: true, isRequired: false, transformFunction: null }, showLessAppsText: { classPropertyName: "showLessAppsText", publicName: "showLessAppsText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { favoriteChange: "favoriteChange" }, ngImport: i0, template: "<!-- temporary until old primary-navbar is removed -->\n<div\n class=\"app-switcher gap-6 g-5 g-sm-9 container-fluid\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (keydown.escape)=\"escape()\"\n>\n @if (titleText()) {\n <div class=\"apps-header\">\n <span>\n <p class=\"si-h4 lh-1 m-0\">{{ titleText() | translate }}</p>\n @if (subtitleText()) {\n <p class=\"si-body text-secondary mt-4 mb-0\">{{ subtitleText() | translate }}</p>\n }\n </span>\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary-ghost\"\n [attr.aria-label]=\"closeText() | translate\"\n (click)=\"closeLaunchpad()\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n }\n <div class=\"apps-scroll ms-n2 ps-2\">\n @for (category of categories(); track category.name) {\n @if (!enableFavorites() || !hasFavorites() || $first || showAllApps) {\n <si-launchpad-category\n [class.pt-6]=\"!$first && !!category.name\"\n [category]=\"category\"\n [enableFavorites]=\"enableFavorites()\"\n (favoriteChange)=\"toggleFavorite($event)\"\n />\n }\n\n @if (enableFavorites() && $first && hasFavorites()) {\n <button\n type=\"button\"\n class=\"btn btn-link btn-show-all dropdown-toggle text-decoration-none\"\n [class.show]=\"showAllApps\"\n (click)=\"showAllApps = !showAllApps\"\n >\n <b>{{ (showAllApps ? showLessAppsText() : showMoreAppsText()) | translate }}</b>\n <si-icon class=\"link-icon dropdown-caret\" [icon]=\"icons.elementDown2\" />\n </button>\n }\n }\n </div>\n</div>\n", styles: [".app-switcher{position:fixed;inset-block-start:calc(1.5rem + 25px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px));inset-inline:0;min-block-size:200px;max-block-size:calc(100vb - (1.5rem + 25px) - var(--element-titlebar-spacing, 0px) - var(--element-system-banner-spacing, 0px));padding:16px;display:flex;flex-direction:column;z-index:1033;background-color:var(--element-base-1)}@media(min-width:992px){.app-switcher{padding-block:16px;padding-inline:24px}}.apps-header{display:flex;align-items:center;justify-content:space-between}.apps-scroll{overflow-y:auto;padding-inline-end:16px;margin-inline-end:-16px}.btn-show-all{margin-block-start:16px;margin-block-end:8px}.btn-show-all.show{margin-block-end:24px}.btn-show-all.show:has(+si-launchpad-category.has-title){margin-block-end:0}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: SiLinkModule }, { kind: "component", type: SiLaunchpadCategoryComponent, selector: "si-launchpad-category", inputs: ["category", "enableFavorites"], outputs: ["favoriteChange"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
865
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiLaunchpadFactoryComponent, isStandalone: true, selector: "si-launchpad-factory", inputs: { closeText: { classPropertyName: "closeText", publicName: "closeText", isSignal: true, isRequired: false, transformFunction: null }, titleText: { classPropertyName: "titleText", publicName: "titleText", isSignal: true, isRequired: false, transformFunction: null }, subtitleText: { classPropertyName: "subtitleText", publicName: "subtitleText", isSignal: true, isRequired: false, transformFunction: null }, apps: { classPropertyName: "apps", publicName: "apps", isSignal: true, isRequired: true, transformFunction: null }, wrapAppLabels: { classPropertyName: "wrapAppLabels", publicName: "wrapAppLabels", isSignal: true, isRequired: false, transformFunction: null }, enableFavorites: { classPropertyName: "enableFavorites", publicName: "enableFavorites", isSignal: true, isRequired: false, transformFunction: null }, favoriteAppsText: { classPropertyName: "favoriteAppsText", publicName: "favoriteAppsText", isSignal: true, isRequired: false, transformFunction: null }, showMoreAppsText: { classPropertyName: "showMoreAppsText", publicName: "showMoreAppsText", isSignal: true, isRequired: false, transformFunction: null }, showLessAppsText: { classPropertyName: "showLessAppsText", publicName: "showLessAppsText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { favoriteChange: "favoriteChange" }, host: { properties: { "class.wrap-labels": "wrapAppLabels()" } }, ngImport: i0, template: "<!-- temporary until old primary-navbar is removed -->\n<div\n class=\"app-switcher gap-6 g-5 g-sm-9 container-fluid\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (keydown.escape)=\"escape()\"\n>\n @if (titleText()) {\n <div class=\"apps-header\">\n <span>\n <p class=\"si-h4 lh-1 m-0\">{{ titleText() | translate }}</p>\n @if (subtitleText()) {\n <p class=\"si-body text-secondary mt-4 mb-0\">{{ subtitleText() | translate }}</p>\n }\n </span>\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary-ghost\"\n [attr.aria-label]=\"closeText() | translate\"\n (click)=\"closeLaunchpad()\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n }\n <div class=\"apps-scroll ms-n2 ps-2\">\n @for (category of categories(); track category.name) {\n @if (!enableFavorites() || !hasFavorites() || $first || showAllApps) {\n <si-launchpad-category\n [class.pt-6]=\"!$first && !!category.name\"\n [category]=\"category\"\n [enableFavorites]=\"enableFavorites()\"\n (favoriteChange)=\"toggleFavorite($event)\"\n />\n }\n\n @if (enableFavorites() && $first && hasFavorites()) {\n <button\n type=\"button\"\n class=\"btn btn-link btn-show-all dropdown-toggle text-decoration-none\"\n [class.show]=\"showAllApps\"\n (click)=\"showAllApps = !showAllApps\"\n >\n <b>{{ (showAllApps ? showLessAppsText() : showMoreAppsText()) | translate }}</b>\n <si-icon class=\"link-icon dropdown-caret\" [icon]=\"icons.elementDown2\" />\n </button>\n }\n }\n </div>\n</div>\n", styles: [".app-switcher{position:fixed;inset-block-start:calc(1.5rem + 25px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px));inset-inline:0;min-block-size:200px;max-block-size:calc(100vb - (1.5rem + 25px) - var(--element-titlebar-spacing, 0px) - var(--element-system-banner-spacing, 0px));padding:16px;display:flex;flex-direction:column;z-index:1033;background-color:var(--element-base-1)}@media(min-width:992px){.app-switcher{padding-block:16px;padding-inline:24px}}.apps-header{display:flex;align-items:center;justify-content:space-between}.apps-scroll{overflow-y:auto;padding-inline-end:16px;margin-inline-end:-16px}.btn-show-all{margin-block-start:16px;margin-block-end:8px}.btn-show-all.show{margin-block-end:24px}.btn-show-all.show:has(+si-launchpad-category.has-title){margin-block-end:0}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: SiLinkModule }, { kind: "component", type: SiLaunchpadCategoryComponent, selector: "si-launchpad-category", inputs: ["category", "enableFavorites"], outputs: ["favoriteChange"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
845
866
|
}
|
|
846
867
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiLaunchpadFactoryComponent, decorators: [{
|
|
847
868
|
type: Component,
|
|
@@ -851,8 +872,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
851
872
|
SiTranslatePipe,
|
|
852
873
|
SiLaunchpadCategoryComponent,
|
|
853
874
|
SiIconComponent
|
|
854
|
-
],
|
|
855
|
-
|
|
875
|
+
], host: {
|
|
876
|
+
'[class.wrap-labels]': 'wrapAppLabels()'
|
|
877
|
+
}, template: "<!-- temporary until old primary-navbar is removed -->\n<div\n class=\"app-switcher gap-6 g-5 g-sm-9 container-fluid\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (keydown.escape)=\"escape()\"\n>\n @if (titleText()) {\n <div class=\"apps-header\">\n <span>\n <p class=\"si-h4 lh-1 m-0\">{{ titleText() | translate }}</p>\n @if (subtitleText()) {\n <p class=\"si-body text-secondary mt-4 mb-0\">{{ subtitleText() | translate }}</p>\n }\n </span>\n <button\n type=\"button\"\n class=\"btn btn-circle btn-tertiary-ghost\"\n [attr.aria-label]=\"closeText() | translate\"\n (click)=\"closeLaunchpad()\"\n >\n <si-icon [icon]=\"icons.elementCancel\" />\n </button>\n </div>\n }\n <div class=\"apps-scroll ms-n2 ps-2\">\n @for (category of categories(); track category.name) {\n @if (!enableFavorites() || !hasFavorites() || $first || showAllApps) {\n <si-launchpad-category\n [class.pt-6]=\"!$first && !!category.name\"\n [category]=\"category\"\n [enableFavorites]=\"enableFavorites()\"\n (favoriteChange)=\"toggleFavorite($event)\"\n />\n }\n\n @if (enableFavorites() && $first && hasFavorites()) {\n <button\n type=\"button\"\n class=\"btn btn-link btn-show-all dropdown-toggle text-decoration-none\"\n [class.show]=\"showAllApps\"\n (click)=\"showAllApps = !showAllApps\"\n >\n <b>{{ (showAllApps ? showLessAppsText() : showMoreAppsText()) | translate }}</b>\n <si-icon class=\"link-icon dropdown-caret\" [icon]=\"icons.elementDown2\" />\n </button>\n }\n }\n </div>\n</div>\n", styles: [".app-switcher{position:fixed;inset-block-start:calc(1.5rem + 25px + var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px));inset-inline:0;min-block-size:200px;max-block-size:calc(100vb - (1.5rem + 25px) - var(--element-titlebar-spacing, 0px) - var(--element-system-banner-spacing, 0px));padding:16px;display:flex;flex-direction:column;z-index:1033;background-color:var(--element-base-1)}@media(min-width:992px){.app-switcher{padding-block:16px;padding-inline:24px}}.apps-header{display:flex;align-items:center;justify-content:space-between}.apps-scroll{overflow-y:auto;padding-inline-end:16px;margin-inline-end:-16px}.btn-show-all{margin-block-start:16px;margin-block-end:8px}.btn-show-all.show{margin-block-end:24px}.btn-show-all.show:has(+si-launchpad-category.has-title){margin-block-end:0}\n"] }]
|
|
878
|
+
}], propDecorators: { closeText: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeText", required: false }] }], titleText: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleText", required: false }] }], subtitleText: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitleText", required: false }] }], apps: [{ type: i0.Input, args: [{ isSignal: true, alias: "apps", required: true }] }], wrapAppLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapAppLabels", required: false }] }], enableFavorites: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableFavorites", required: false }] }], favoriteAppsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "favoriteAppsText", required: false }] }], showMoreAppsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMoreAppsText", required: false }] }], showLessAppsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLessAppsText", required: false }] }], favoriteChange: [{ type: i0.Output, args: ["favoriteChange"] }] } });
|
|
856
879
|
|
|
857
880
|
/**
|
|
858
881
|
* Copyright (c) Siemens 2016 - 2026
|