@siemens/element-ng 47.0.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.
Files changed (105) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +27 -0
  3. package/application-header/index.d.ts +17 -0
  4. package/application-header/launchpad/si-launchpad-app.component.d.ts +21 -0
  5. package/application-header/launchpad/si-launchpad-factory.component.d.ts +83 -0
  6. package/application-header/launchpad/si-launchpad.model.d.ts +33 -0
  7. package/application-header/package.json +3 -0
  8. package/application-header/si-application-header.component.d.ts +60 -0
  9. package/application-header/si-header-account-item.component.d.ts +13 -0
  10. package/application-header/si-header-action-item-icon-base.directive.d.ts +26 -0
  11. package/application-header/si-header-action-item.base.d.ts +19 -0
  12. package/application-header/si-header-action-item.component.d.ts +9 -0
  13. package/application-header/si-header-actions.directive.d.ts +5 -0
  14. package/application-header/si-header-brand.directive.d.ts +5 -0
  15. package/application-header/si-header-collapsible-actions.component.d.ts +33 -0
  16. package/application-header/si-header-logo.directive.d.ts +6 -0
  17. package/application-header/si-header-navigation-item.component.d.ts +10 -0
  18. package/application-header/si-header-navigation.component.d.ts +11 -0
  19. package/application-header/si-header-selection-item.component.d.ts +12 -0
  20. package/application-header/si-header-siemens-logo.component.d.ts +20 -0
  21. package/avatar/index.d.ts +6 -0
  22. package/avatar/package.json +3 -0
  23. package/avatar/si-avatar-background-color.directive.d.ts +35 -0
  24. package/avatar/si-avatar.component.d.ts +50 -0
  25. package/common/decorators/index.d.ts +5 -0
  26. package/common/decorators/webcomponent.decorator.d.ts +6 -0
  27. package/common/helpers/animation.helpers.d.ts +10 -0
  28. package/common/helpers/global-events.helpers.d.ts +5 -0
  29. package/common/helpers/index.d.ts +10 -0
  30. package/common/helpers/overlay-helper.d.ts +24 -0
  31. package/common/helpers/positioning.helpers.d.ts +58 -0
  32. package/common/helpers/rtl.d.ts +6 -0
  33. package/common/helpers/track-by.helper.d.ts +27 -0
  34. package/common/index.d.ts +8 -0
  35. package/common/models/color-variant.model.d.ts +8 -0
  36. package/common/models/index.d.ts +8 -0
  37. package/common/models/menu.model.d.ts +85 -0
  38. package/common/models/positions.model.d.ts +18 -0
  39. package/common/models/status-type.model.d.ts +19 -0
  40. package/common/package.json +3 -0
  41. package/common/services/blink.service.d.ts +41 -0
  42. package/common/services/index.d.ts +8 -0
  43. package/common/services/scrollbar-helper.service.d.ts +17 -0
  44. package/common/services/si-uistate.service.d.ts +61 -0
  45. package/common/services/text-measure.service.d.ts +21 -0
  46. package/element-ng.scss +14 -0
  47. package/fesm2022/siemens-element-ng-application-header.mjs +747 -0
  48. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -0
  49. package/fesm2022/siemens-element-ng-avatar.mjs +185 -0
  50. package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -0
  51. package/fesm2022/siemens-element-ng-common.mjs +946 -0
  52. package/fesm2022/siemens-element-ng-common.mjs.map +1 -0
  53. package/fesm2022/siemens-element-ng-header-dropdown.mjs +384 -0
  54. package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -0
  55. package/fesm2022/siemens-element-ng-icon.mjs +236 -0
  56. package/fesm2022/siemens-element-ng-icon.mjs.map +1 -0
  57. package/fesm2022/siemens-element-ng-link.mjs +233 -0
  58. package/fesm2022/siemens-element-ng-link.mjs.map +1 -0
  59. package/fesm2022/siemens-element-ng-resize-observer.mjs +332 -0
  60. package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -0
  61. package/fesm2022/siemens-element-ng-theme.mjs +770 -0
  62. package/fesm2022/siemens-element-ng-theme.mjs.map +1 -0
  63. package/fesm2022/siemens-element-ng-translate.mjs +22 -0
  64. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -0
  65. package/fesm2022/siemens-element-ng.mjs +12 -0
  66. package/fesm2022/siemens-element-ng.mjs.map +1 -0
  67. package/header-dropdown/index.d.ts +9 -0
  68. package/header-dropdown/package.json +3 -0
  69. package/header-dropdown/si-header-dropdown-item.component.d.ts +23 -0
  70. package/header-dropdown/si-header-dropdown-items-factory.component.d.ts +14 -0
  71. package/header-dropdown/si-header-dropdown-trigger.directive.d.ts +57 -0
  72. package/header-dropdown/si-header-dropdown.component.d.ts +20 -0
  73. package/header-dropdown/si-header.model.d.ts +37 -0
  74. package/icon/element-icons.d.ts +12 -0
  75. package/icon/index.d.ts +9 -0
  76. package/icon/package.json +3 -0
  77. package/icon/si-icon-next.component.d.ts +68 -0
  78. package/icon/si-icon.component.d.ts +23 -0
  79. package/icon/si-icon.module.d.ts +7 -0
  80. package/icon/si-icons.d.ts +31 -0
  81. package/index.d.ts +5 -0
  82. package/link/aria-current.model.d.ts +5 -0
  83. package/link/index.d.ts +8 -0
  84. package/link/link.model.d.ts +57 -0
  85. package/link/package.json +3 -0
  86. package/link/si-link-action.service.d.ts +17 -0
  87. package/link/si-link.directive.d.ts +42 -0
  88. package/link/si-link.module.d.ts +7 -0
  89. package/package.json +86 -0
  90. package/public-api.d.ts +5 -0
  91. package/resize-observer/index.d.ts +8 -0
  92. package/resize-observer/package.json +3 -0
  93. package/resize-observer/resize-observer.service.d.ts +41 -0
  94. package/resize-observer/si-resize-observer.directive.d.ts +29 -0
  95. package/resize-observer/si-resize-observer.module.d.ts +8 -0
  96. package/resize-observer/si-responsive-container.directive.d.ts +73 -0
  97. package/theme/index.d.ts +7 -0
  98. package/theme/package.json +3 -0
  99. package/theme/si-theme-store.d.ts +82 -0
  100. package/theme/si-theme.model.d.ts +48 -0
  101. package/theme/si-theme.service.d.ts +129 -0
  102. package/translate/index.d.ts +7 -0
  103. package/translate/package.json +3 -0
  104. package/translate/si-translatable-keys.interface.d.ts +11 -0
  105. package/translate/si-translatable-overrides.provider.d.ts +7 -0
@@ -0,0 +1,17 @@
1
+ import { Link, LinkAction } from './link.model';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SiLinkActionService {
4
+ private actionSubject;
5
+ /**
6
+ * Observable which emits the link and param to run the action on.
7
+ *
8
+ * @defaultValue this.actionSubject.asObservable()
9
+ */
10
+ readonly action$: import("rxjs").Observable<LinkAction>;
11
+ /**
12
+ * Emit a new link and param pair to run the action on.
13
+ */
14
+ emit(link: Link, param: any): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiLinkActionService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<SiLinkActionService>;
17
+ }
@@ -0,0 +1,42 @@
1
+ import { DoCheck, InjectionToken, OnChanges, OnDestroy } from '@angular/core';
2
+ import { NavigationExtras } from '@angular/router';
3
+ import { AriaCurrentType } from './aria-current.model';
4
+ import { Link } from './link.model';
5
+ import * as i0 from "@angular/core";
6
+ export declare const SI_LINK_DEFAULT_NAVIGATION_EXTRA: InjectionToken<NavigationExtras>;
7
+ export declare class SiLinkDirective implements DoCheck, OnChanges, OnDestroy {
8
+ readonly siLink: import("@angular/core").InputSignal<Link | undefined>;
9
+ readonly siLinkDefaultTarget: import("@angular/core").InputSignal<string | undefined>;
10
+ readonly actionParam: import("@angular/core").InputSignal<any>;
11
+ readonly activeClass: import("@angular/core").InputSignal<string | undefined>;
12
+ /** @defaultValue false */
13
+ readonly exactMatch: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
14
+ /**
15
+ * Type for `aria-current` to set if routerLink is active.
16
+ */
17
+ readonly ariaCurrent: import("@angular/core").InputSignal<AriaCurrentType | undefined>;
18
+ readonly activeChange: import("@angular/core").OutputEmitterRef<boolean>;
19
+ protected readonly href: import("@angular/core").WritableSignal<string | undefined>;
20
+ protected readonly target: import("@angular/core").WritableSignal<string | undefined>;
21
+ protected readonly title: import("@angular/core").WritableSignal<string | undefined>;
22
+ protected readonly isAriaCurrent: import("@angular/core").Signal<AriaCurrentType | undefined>;
23
+ /** @defaultValue false */
24
+ readonly active: import("@angular/core").WritableSignal<boolean>;
25
+ private readonly destroyer;
26
+ private router;
27
+ private activatedRoute;
28
+ private locationStrategy;
29
+ private translateService;
30
+ private actionService;
31
+ private defaultNavigationExtra;
32
+ private get urlTree();
33
+ private get navigationExtras();
34
+ ngOnDestroy(): void;
35
+ ngOnChanges(): void;
36
+ ngDoCheck(): void;
37
+ private subscribeRouter;
38
+ private updateActiveByRouter;
39
+ onClick(event: any): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiLinkDirective, never>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SiLinkDirective, "[siLink]", ["siLink"], { "siLink": { "alias": "siLink"; "required": false; "isSignal": true; }; "siLinkDefaultTarget": { "alias": "siLinkDefaultTarget"; "required": false; "isSignal": true; }; "actionParam": { "alias": "actionParam"; "required": false; "isSignal": true; }; "activeClass": { "alias": "activeClass"; "required": false; "isSignal": true; }; "exactMatch": { "alias": "exactMatch"; "required": false; "isSignal": true; }; "ariaCurrent": { "alias": "ariaCurrent"; "required": false; "isSignal": true; }; }, { "activeChange": "activeChange"; }, never, never, true, never>;
42
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./si-link.directive";
3
+ export declare class SiLinkModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiLinkModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SiLinkModule, never, [typeof i1.SiLinkDirective], [typeof i1.SiLinkDirective]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<SiLinkModule>;
7
+ }
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@siemens/element-ng",
3
+ "description": "Element Angular component library, implementing the Siemens Design Language",
4
+ "version": "47.0.0",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git@github.com:siemens/element.git"
9
+ },
10
+ "author": {
11
+ "name": "Siemens AG",
12
+ "email": "info@siemens.com"
13
+ },
14
+ "homepage": "https://github.com/siemens/element",
15
+ "bugs": "https://github.com/siemens/element/issues/new",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "type": "module",
20
+ "peerDependencies": {
21
+ "@angular/animations": "19",
22
+ "@angular/cdk": "19",
23
+ "@angular/common": "19",
24
+ "@angular/core": "19",
25
+ "@angular/forms": "19",
26
+ "@angular/router": "19",
27
+ "@siemens/element-translate-ng": "47.0.0",
28
+ "@siemens/element-theme": "47.0.0"
29
+ },
30
+ "peerDependenciesMeta": {
31
+ "@angular/animations": {
32
+ "optional": true
33
+ }
34
+ },
35
+ "module": "fesm2022/siemens-element-ng.mjs",
36
+ "typings": "index.d.ts",
37
+ "exports": {
38
+ "./package.json": {
39
+ "default": "./package.json"
40
+ },
41
+ ".": {
42
+ "types": "./index.d.ts",
43
+ "default": "./fesm2022/siemens-element-ng.mjs"
44
+ },
45
+ "./application-header": {
46
+ "types": "./application-header/index.d.ts",
47
+ "default": "./fesm2022/siemens-element-ng-application-header.mjs"
48
+ },
49
+ "./avatar": {
50
+ "types": "./avatar/index.d.ts",
51
+ "default": "./fesm2022/siemens-element-ng-avatar.mjs"
52
+ },
53
+ "./common": {
54
+ "types": "./common/index.d.ts",
55
+ "default": "./fesm2022/siemens-element-ng-common.mjs"
56
+ },
57
+ "./header-dropdown": {
58
+ "types": "./header-dropdown/index.d.ts",
59
+ "default": "./fesm2022/siemens-element-ng-header-dropdown.mjs"
60
+ },
61
+ "./icon": {
62
+ "types": "./icon/index.d.ts",
63
+ "default": "./fesm2022/siemens-element-ng-icon.mjs"
64
+ },
65
+ "./link": {
66
+ "types": "./link/index.d.ts",
67
+ "default": "./fesm2022/siemens-element-ng-link.mjs"
68
+ },
69
+ "./resize-observer": {
70
+ "types": "./resize-observer/index.d.ts",
71
+ "default": "./fesm2022/siemens-element-ng-resize-observer.mjs"
72
+ },
73
+ "./theme": {
74
+ "types": "./theme/index.d.ts",
75
+ "default": "./fesm2022/siemens-element-ng-theme.mjs"
76
+ },
77
+ "./translate": {
78
+ "types": "./translate/index.d.ts",
79
+ "default": "./fesm2022/siemens-element-ng-translate.mjs"
80
+ }
81
+ },
82
+ "sideEffects": false,
83
+ "dependencies": {
84
+ "tslib": "^2.3.0"
85
+ }
86
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const NOTHING = "nothing";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export * from './resize-observer.service';
6
+ export * from './si-resize-observer.directive';
7
+ export * from './si-resize-observer.module';
8
+ export * from './si-responsive-container.directive';
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/siemens-element-ng-resize-observer.mjs"
3
+ }
@@ -0,0 +1,41 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export interface ElementDimensions {
4
+ width: number;
5
+ height: number;
6
+ }
7
+ /**
8
+ * A service wrapping `ResizeObserver`. This is a service for those reasons:
9
+ * - only one `ResizeObserver` should be used for performance reason.
10
+ * - For Angular change detection to work, explicit `ngZone` calls are necessary
11
+ * - Observable stream
12
+ */
13
+ export declare class ResizeObserverService {
14
+ private listeners;
15
+ private resizeObserver?;
16
+ private timerQueue;
17
+ private zone;
18
+ constructor();
19
+ /**
20
+ * Observe the size of an element. Returns an observable with the changes.
21
+ * @param element - The element to observe
22
+ * @param throttle - Throttle time in ms. Will emit this time after the resize
23
+ * @param emitInitial - Emit the initial size after subscribe?
24
+ * @param emitImmediate - Emit an event immediately after the size changes. Useful e.g. for visibility checks.
25
+ */
26
+ observe(element: Element, throttle: number, emitInitial?: boolean, emitImmediate?: boolean): Observable<ElementDimensions>;
27
+ private subscriberAdded;
28
+ private subscriberRemoved;
29
+ private handleElement;
30
+ private handleResizeSubscriber;
31
+ private emitSize;
32
+ private schedule;
33
+ private unschedule;
34
+ private processQueue;
35
+ /**
36
+ * check size on all observed elements. Only use in testing!
37
+ */
38
+ _checkAll(): void;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResizeObserverService, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<ResizeObserverService>;
41
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { OnDestroy, OnInit } from '@angular/core';
6
+ import { ElementDimensions } from './resize-observer.service';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Directive to emit events on element size change. Use like this:
10
+ * `<div (siResizeObserver)="handleResize($event)">`
11
+ * When the size of the element changes, an event in the format
12
+ * `{ width: number, height: number }`
13
+ * will be emitted. Also an initial event will be emitted on init.
14
+ *
15
+ * By default, events are throttled and to an event every 100ms. To change
16
+ * this, add `[resizeThrottle]="200"` on the same element. Input in milliseconds.
17
+ */
18
+ export declare class SiResizeObserverDirective implements OnInit, OnDestroy {
19
+ /** @defaultValue 100 */
20
+ readonly resizeThrottle: import("@angular/core").InputSignal<number>;
21
+ readonly siResizeObserver: import("@angular/core").OutputEmitterRef<ElementDimensions>;
22
+ private subs?;
23
+ private element;
24
+ private service;
25
+ ngOnInit(): void;
26
+ ngOnDestroy(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiResizeObserverDirective, never>;
28
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SiResizeObserverDirective, "[siResizeObserver]", never, { "resizeThrottle": { "alias": "resizeThrottle"; "required": false; "isSignal": true; }; }, { "siResizeObserver": "siResizeObserver"; }, never, never, true, never>;
29
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./si-resize-observer.directive";
3
+ import * as i2 from "./si-responsive-container.directive";
4
+ export declare class SiResizeObserverModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiResizeObserverModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SiResizeObserverModule, never, [typeof i1.SiResizeObserverDirective, typeof i2.SiResponsiveContainerDirective], [typeof i1.SiResizeObserverDirective, typeof i2.SiResponsiveContainerDirective]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<SiResizeObserverModule>;
8
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { OnDestroy, OnInit } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ export interface Breakpoints {
8
+ smMinimum: number;
9
+ mdMinimum: number;
10
+ lgMinimum: number;
11
+ xlMinimum: number;
12
+ xxlMinimum: number;
13
+ }
14
+ export declare const BOOTSTRAP_BREAKPOINTS: Breakpoints;
15
+ /**
16
+ * Directive to automatically set `si-container-*` classes so Bootstrap column classes work
17
+ * in the context of the container instead of viewport size.
18
+ */
19
+ export declare class SiResponsiveContainerDirective implements OnInit, OnDestroy {
20
+ /** @defaultValue false */
21
+ readonly xs: import("@angular/core").WritableSignal<boolean>;
22
+ /**
23
+ * @deprecated Use {@link xs} instead.
24
+ * @defaultValue false
25
+ **/
26
+ isXs: boolean;
27
+ /** @defaultValue false */
28
+ readonly sm: import("@angular/core").WritableSignal<boolean>;
29
+ /**
30
+ * @deprecated Use {@link sm} instead.
31
+ * @defaultValue false
32
+ **/
33
+ isSm: boolean;
34
+ /** @defaultValue false */
35
+ readonly md: import("@angular/core").WritableSignal<boolean>;
36
+ /**
37
+ * @deprecated Use {@link md} instead.
38
+ * @defaultValue false
39
+ **/
40
+ isMd: boolean;
41
+ /** @defaultValue false */
42
+ readonly lg: import("@angular/core").WritableSignal<boolean>;
43
+ /**
44
+ * @deprecated Use {@link lg} instead.
45
+ * @defaultValue false
46
+ **/
47
+ isLg: boolean;
48
+ /** @defaultValue false */
49
+ readonly xl: import("@angular/core").WritableSignal<boolean>;
50
+ /**
51
+ * @deprecated Use {@link xl} instead.
52
+ * @defaultValue false
53
+ **/
54
+ isXl: boolean;
55
+ /** @defaultValue false */
56
+ readonly xxl: import("@angular/core").WritableSignal<boolean>;
57
+ /**
58
+ * @deprecated Use {@link xxl} instead.
59
+ * @defaultValue false
60
+ **/
61
+ isXxl: boolean;
62
+ /** @defaultValue 100 */
63
+ readonly resizeThrottle: import("@angular/core").InputSignal<number>;
64
+ readonly breakpoints: import("@angular/core").InputSignal<Breakpoints | undefined>;
65
+ private subs?;
66
+ private element;
67
+ private service;
68
+ ngOnInit(): void;
69
+ ngOnDestroy(): void;
70
+ private setResponsiveSize;
71
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiResponsiveContainerDirective, never>;
72
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SiResponsiveContainerDirective, "[siResponsiveContainer]", ["siResponsiveContainer"], { "resizeThrottle": { "alias": "resizeThrottle"; "required": false; "isSignal": true; }; "breakpoints": { "alias": "breakpoints"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
73
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export * from './si-theme-store';
6
+ export * from './si-theme.service';
7
+ export * from './si-theme.model';
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/siemens-element-ng-theme.mjs"
3
+ }
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { Observable } from 'rxjs';
6
+ import { Theme } from './si-theme.model';
7
+ /**
8
+ * SiThemeStore object is used by the theme service to load and
9
+ * store the themes. You can inject your own implementation to provide
10
+ * a backend implementation. Otherwise a localStorage based implementation
11
+ * is used.
12
+ */
13
+ export declare abstract class SiThemeStore {
14
+ /**
15
+ * Load and return an alternative custom theme, other then
16
+ * the default element theme. This method is invoked initially
17
+ * to check for an alternative custom theme.
18
+ * @returns The active theme to be used, or undefined if the
19
+ * default element theme shall be used. All wrapped in an observable
20
+ * that can also emit errors.
21
+ */
22
+ abstract loadActiveTheme(): Observable<Theme | undefined>;
23
+ /**
24
+ * Sets the theme with the given name to active.
25
+ * @param name - The name of the theme to become active.
26
+ * @returns True on success, otherwise false.
27
+ */
28
+ abstract activateTheme(name: string): Observable<boolean>;
29
+ /**
30
+ * Deactivate any active theme and makes the element theme the default one.
31
+ * @returns True on success, otherwise false.
32
+ */
33
+ abstract deactivateTheme(): Observable<boolean>;
34
+ /**
35
+ * Load and return the available theme names.
36
+ * @returns An `Observable` of available theme names, other than the
37
+ * default element theme.
38
+ */
39
+ abstract loadThemeNames(): Observable<string[]>;
40
+ /**
41
+ * Load theme with the given `name`.
42
+ * @param name - The name of the theme to be returned.
43
+ * @returns Observable with the named theme or `undefined` if no such theme exist.
44
+ */
45
+ abstract loadTheme(name: string): Observable<Theme | undefined>;
46
+ /**
47
+ * Saves a theme to the store. The name shall not be empty. A theme with
48
+ * identical name gets overwritten.
49
+ * @param theme - The theme to be saved.
50
+ * @returns True on success, otherwise false. All nicely wrapped in
51
+ * an observable that may also emit errors.
52
+ */
53
+ abstract saveTheme(theme: Theme): Observable<boolean>;
54
+ /**
55
+ * Deletes the theme with the given name from the store.
56
+ * @param name - The name of the theme to be deleted.
57
+ * @returns True on success, otherwise false. All nicely wrapped in
58
+ * an observable that may also emit errors. Returns false,
59
+ * if the theme does not exist.
60
+ */
61
+ abstract deleteTheme(name: string): Observable<boolean>;
62
+ }
63
+ export declare const SI_THEME_LOCAL_STORAGE_KEY = "si-themes";
64
+ export interface ThemeStorage {
65
+ activeTheme: string | undefined;
66
+ themes: {
67
+ [key: string]: Theme;
68
+ };
69
+ }
70
+ export declare class SiDefaultThemeStore extends SiThemeStore {
71
+ private isBrowser;
72
+ constructor(isBrowser: boolean);
73
+ loadActiveTheme(): Observable<Theme | undefined>;
74
+ activateTheme(name: string): Observable<boolean>;
75
+ deactivateTheme(): Observable<boolean>;
76
+ loadThemeNames(): Observable<string[]>;
77
+ saveTheme(theme: Theme): Observable<boolean>;
78
+ loadTheme(name: string): Observable<Theme | undefined>;
79
+ deleteTheme(name: string): Observable<boolean>;
80
+ private loadStore;
81
+ private saveStore;
82
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export interface ThemeDescription {
6
+ name: string;
7
+ groups: ThemePropertyGroup[];
8
+ }
9
+ export interface ThemePropertyGroup {
10
+ name: string;
11
+ description?: string;
12
+ properties: ThemeProperty[];
13
+ }
14
+ export interface ThemeProperty {
15
+ name: string;
16
+ usage: string;
17
+ type: ThemePropertyType;
18
+ }
19
+ export type ThemePropertyType = 'color' | 'gradient' | 'font' | 'url' | 'text' | 'number';
20
+ export interface Theme {
21
+ name: string;
22
+ schemes: ThemeColorSchemes;
23
+ /**
24
+ * A map of icons that overrides the default Element icons.
25
+ * The key must be the key of the original icon that should be overridden.
26
+ * The value has to be a data SVG string.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * {
31
+ * elementUser: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'>...</svg>"
32
+ * }
33
+ * ```
34
+ *
35
+ * @experimental
36
+ */
37
+ icons?: Record<string, string>;
38
+ }
39
+ export interface ThemeColorSchemes {
40
+ light?: ThemeColorScheme;
41
+ dark?: ThemeColorScheme;
42
+ }
43
+ export type ThemeColorScheme = {
44
+ [key: string]: string;
45
+ };
46
+ export type ThemeType = 'dark' | 'light' | 'auto';
47
+ export declare const ELEMENT_THEME_NAME = "element";
48
+ export declare const elementTheme: ThemeDescription;
@@ -0,0 +1,129 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { SafeHtml } from '@angular/platform-browser';
3
+ import { Observable } from 'rxjs';
4
+ import { Theme, ThemeColorSchemes, ThemeType } from './si-theme.model';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SiThemeService {
7
+ /**
8
+ * The current color scheme. (e.g. light or dark).
9
+ */
10
+ private _resolvedColorScheme;
11
+ private resolvedColorSchemeSub;
12
+ /**
13
+ * Emits events when the color scheme changes.
14
+ *
15
+ * @defaultValue this.resolvedColorSchemeSub.asObservable()
16
+ */
17
+ readonly resolvedColorScheme$: Observable<keyof ThemeColorSchemes>;
18
+ /**
19
+ * The current color scheme. (e.g. light or dark).
20
+ */
21
+ get resolvedColorScheme(): ThemeType | undefined;
22
+ /**
23
+ * All available theme names, including element theme name.
24
+ */
25
+ private _themeNames;
26
+ private themeNamesSub;
27
+ /**
28
+ * Emits events when the list of available theme names changes.
29
+ *
30
+ * @defaultValue this.themeNamesSub.asObservable()
31
+ */
32
+ readonly themeNames$: Observable<string[]>;
33
+ /**
34
+ * All available theme names, including element theme name.
35
+ */
36
+ get themeNames(): string[];
37
+ /**
38
+ * Emits events when the currently applied theme changes. Either by
39
+ * changing to another theme or by re-applying a theme with updated
40
+ * properties. When switching to default theme element, `undefined`
41
+ * is emitted.
42
+ */
43
+ readonly themeChange: EventEmitter<Theme | undefined>;
44
+ /**
45
+ * The name of the theme that is active. Theme name `element` is the default.
46
+ */
47
+ activeThemeName?: string;
48
+ /**
49
+ * Icon overrides by the currently activeTheme.
50
+ * @defaultValue
51
+ * ```
52
+ * {}
53
+ * ```
54
+ */
55
+ readonly themeIcons: import("@angular/core").WritableSignal<Record<string, SafeHtml>>;
56
+ private themes;
57
+ private darkMediaQuery?;
58
+ private mediaQueryListener?;
59
+ private isBrowser;
60
+ private previewTheme?;
61
+ private themeStore;
62
+ private meta;
63
+ private document;
64
+ private domSanitizer;
65
+ constructor();
66
+ /**
67
+ * Returns `true` if a theme with the given name is available.
68
+ */
69
+ hasTheme(name: string): boolean;
70
+ /**
71
+ * Returns a clone of the theme with the given name or `undefined` if not
72
+ * available or name is `element`.
73
+ * @param name - The name of the theme to be returned.
74
+ * @returns The theme with the given name and `undefined` if name is `element`.
75
+ */
76
+ getTheme(name: string): Observable<Theme | undefined>;
77
+ /**
78
+ * Loads and returns the currently active theme. Returns undefined if no custom theme is used.
79
+ * @returns A custom theme or `undefined` if the default element theme is used.
80
+ */
81
+ getActiveTheme(): Observable<Theme | undefined>;
82
+ /**
83
+ * Adds or updates the given theme in the theme store.
84
+ * @param theme - The theme to be saved.
85
+ * @returns `true` if the theme was saved successfully.
86
+ */
87
+ addOrUpdateTheme(theme: Theme): Observable<boolean>;
88
+ /**
89
+ * Deletes the theme with the given name from the theme store.
90
+ */
91
+ deleteTheme(name: string): Observable<boolean>;
92
+ /**
93
+ * Resets the preview theme to the default element theme.
94
+ */
95
+ resetPreview(): void;
96
+ /**
97
+ * Sets the active theme to the given name. If no name is given, the default element theme is used.
98
+ */
99
+ setActiveTheme(name?: string, type?: ThemeType): Observable<boolean>;
100
+ /**
101
+ * Apply `light` or `dark` theme to the document.
102
+ */
103
+ applyThemeType(type: ThemeType): void;
104
+ /**
105
+ * Applies the given theme to the document. If no theme is given, the active theme is applied.
106
+ */
107
+ applyTheme(theme?: Theme, type?: ThemeType, overwrite?: boolean): void;
108
+ /**
109
+ * Updates the given property of the preview theme.
110
+ */
111
+ updateProperty(name: string, value: string, type: keyof ThemeColorSchemes): void;
112
+ /**
113
+ * Checks if the given theme JSON object is a valid theme.
114
+ */
115
+ isThemeValid(data: unknown): boolean;
116
+ private isThemeTypeValid;
117
+ private applyThemeStyle;
118
+ private activateTheme;
119
+ private hasThemeCSS;
120
+ private createThemeCSS;
121
+ private createThemeVariantCSS;
122
+ private removeThemeCSS;
123
+ private toggleDark;
124
+ private cloneTheme;
125
+ private dispatchThemeSwitchEvent;
126
+ private parseDataSvgIcon;
127
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiThemeService, never>;
128
+ static ɵprov: i0.ɵɵInjectableDeclaration<SiThemeService>;
129
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export * from './si-translatable-keys.interface';
6
+ export * from './si-translatable-overrides.provider';
7
+ export * from '@siemens/element-translate-ng/translate';
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/siemens-element-ng-translate.mjs"
3
+ }
@@ -0,0 +1,11 @@
1
+ export interface SiTranslatableKeys {
2
+ 'SI_APPLICATION_HEADER.LAUNCHPAD'?: string;
3
+ 'SI_APPLICATION_HEADER.TOGGLE_ACTIONS'?: string;
4
+ 'SI_APPLICATION_HEADER.TOGGLE_NAVIGATION'?: string;
5
+ 'SI_LAUNCHPAD.CLOSE'?: string;
6
+ 'SI_LAUNCHPAD.FAVORITE_APPS'?: string;
7
+ 'SI_LAUNCHPAD.SHOW_LESS'?: string;
8
+ 'SI_LAUNCHPAD.SHOW_MORE'?: string;
9
+ 'SI_LAUNCHPAD.SUBTITLE'?: string;
10
+ 'SI_LAUNCHPAD.TITLE'?: string;
11
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright Siemens 2016 - 2025.
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { Provider } from '@angular/core';
6
+ import { SiTranslatableKeys } from './si-translatable-keys.interface';
7
+ export declare const provideSiTranslatableOverrides: (values: SiTranslatableKeys) => Provider;