@siemens/element-ng 51.2.0 → 51.4.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 +2 -2
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +8 -46
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +2 -2
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +5 -0
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +2 -3
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +13 -3
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +261 -162
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +4 -4
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly.mjs +12 -8
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-maplibre.mjs +293 -10
- package/fesm2022/siemens-element-ng-maplibre.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-extensions-katex.mjs +2 -2
- package/fesm2022/siemens-element-ng-markdown-extensions-katex.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +3 -2
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +19 -6
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +54 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +59 -23
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +82 -10
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +15 -10
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +9 -0
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/maplibre/styles/maplibre-gl.scss +4 -0
- package/package.json +8 -8
- package/schematics/migrations/data/attribute-selectors.js +8 -1
- package/schematics/migrations/data/element-selectors.js +7 -1
- package/schematics/migrations/data/symbol-renaming.js +10 -0
- package/schematics/migrations/utilities/attribute-selector.migration.js +26 -10
- package/schematics/migrations/utilities/element-selector.migration.js +25 -15
- package/schematics/migrations/utilities/symbol-renaming.migration.js +90 -3
- package/schematics/utils/template-edit-utils.js +9 -0
- package/template-i18n.json +6 -0
- package/types/siemens-element-ng-breadcrumb.d.ts +1 -1
- package/types/siemens-element-ng-common.d.ts +5 -0
- package/types/siemens-element-ng-dashboard.d.ts +0 -1
- package/types/siemens-element-ng-datepicker.d.ts +6 -1
- package/types/siemens-element-ng-filtered-search.d.ts +26 -10
- package/types/siemens-element-ng-form.d.ts +1 -1
- package/types/siemens-element-ng-maplibre.d.ts +112 -5
- package/types/siemens-element-ng-number-input.d.ts +2 -2
- package/types/siemens-element-ng-popover.d.ts +2 -1
- package/types/siemens-element-ng-shadow-root.d.ts +16 -1
- package/types/siemens-element-ng-theme.d.ts +35 -7
- package/types/siemens-element-ng-tooltip.d.ts +14 -1
- package/types/siemens-element-ng-translate.d.ts +6 -0
- package/types/siemens-element-ng-tree-view.d.ts +1 -0
- package/types/siemens-element-ng-typeahead.d.ts +7 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { of, ReplaySubject, throwError, fromEvent, map as map$1 } from 'rxjs';
|
|
2
|
-
import { isPlatformBrowser } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
3
|
+
import { InjectionToken, inject, DOCUMENT, EventEmitter, signal, PLATFORM_ID, Injectable } from '@angular/core';
|
|
5
4
|
import { Meta } from '@angular/platform-browser';
|
|
5
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
6
6
|
import { take, tap, map, switchMap } from 'rxjs/operators';
|
|
7
7
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
8
8
|
|
|
@@ -109,6 +109,30 @@ class SiDefaultThemeStore extends SiThemeStore {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
114
|
+
* SPDX-License-Identifier: MIT
|
|
115
|
+
*/
|
|
116
|
+
/**
|
|
117
|
+
* Theme DOM target. The default implementation targets the current document.
|
|
118
|
+
*/
|
|
119
|
+
const SI_THEME_DOM_TARGET = new InjectionToken('SI_THEME_DOM_TARGET', {
|
|
120
|
+
providedIn: 'root',
|
|
121
|
+
factory: () => {
|
|
122
|
+
const document = inject(DOCUMENT);
|
|
123
|
+
const meta = inject(Meta);
|
|
124
|
+
return {
|
|
125
|
+
element: document.documentElement,
|
|
126
|
+
rootSelector: ':root',
|
|
127
|
+
eventTarget: document.defaultView ?? undefined,
|
|
128
|
+
forEachElement: callback => callback(document.documentElement),
|
|
129
|
+
getStyleElement: id => document.getElementById(id),
|
|
130
|
+
appendStyleElement: style => document.body.append(style),
|
|
131
|
+
updateColorScheme: colorScheme => meta.updateTag({ name: 'color-scheme', content: colorScheme })
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
112
136
|
const ELEMENT_THEME_NAME = 'element';
|
|
113
137
|
const elementTheme = {
|
|
114
138
|
name: 'element',
|
|
@@ -409,9 +433,12 @@ class SiThemeService {
|
|
|
409
433
|
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
410
434
|
previewTheme;
|
|
411
435
|
themeStore = inject(SiThemeStore, { optional: true }) ?? new SiDefaultThemeStore(this.isBrowser);
|
|
412
|
-
meta = inject(Meta);
|
|
413
436
|
document = inject(DOCUMENT);
|
|
437
|
+
themeTarget = inject(SI_THEME_DOM_TARGET);
|
|
414
438
|
constructor() {
|
|
439
|
+
this._resolvedColorScheme = this.themeTarget.element.classList.contains('app--dark')
|
|
440
|
+
? 'dark'
|
|
441
|
+
: 'light';
|
|
415
442
|
this.resolvedColorScheme$.subscribe(scheme => (this._resolvedColorScheme = scheme));
|
|
416
443
|
this.themeNames$.subscribe(names => (this._themeNames = names));
|
|
417
444
|
if (this.isBrowser) {
|
|
@@ -585,7 +612,7 @@ class SiThemeService {
|
|
|
585
612
|
return result;
|
|
586
613
|
}
|
|
587
614
|
/**
|
|
588
|
-
* Apply `light` or `dark` theme to the
|
|
615
|
+
* Apply `light` or `dark` theme to the configured theme target.
|
|
589
616
|
*/
|
|
590
617
|
applyThemeType(type) {
|
|
591
618
|
if (type === this._resolvedColorScheme || !this.darkMediaQuery || !this.mediaQueryListener) {
|
|
@@ -604,7 +631,7 @@ class SiThemeService {
|
|
|
604
631
|
}
|
|
605
632
|
}
|
|
606
633
|
/**
|
|
607
|
-
* Applies the given theme to the
|
|
634
|
+
* Applies the given theme to the configured theme target. If no theme is given, the active theme is applied.
|
|
608
635
|
*/
|
|
609
636
|
applyTheme(theme, type, overwrite) {
|
|
610
637
|
if (theme) {
|
|
@@ -628,7 +655,7 @@ class SiThemeService {
|
|
|
628
655
|
}
|
|
629
656
|
this.previewTheme.schemes[type][name] = value;
|
|
630
657
|
this.createThemeCSS(this.previewTheme);
|
|
631
|
-
this.
|
|
658
|
+
this.themeTarget.forEachElement(element => element.classList.add('theme-__preview'));
|
|
632
659
|
this.dispatchThemeSwitchEvent();
|
|
633
660
|
}
|
|
634
661
|
/**
|
|
@@ -667,34 +694,42 @@ class SiThemeService {
|
|
|
667
694
|
this.themeChange.emit(theme);
|
|
668
695
|
}
|
|
669
696
|
activateTheme(theme) {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
697
|
+
this.themeTarget.forEachElement(element => {
|
|
698
|
+
const classList = element.classList;
|
|
699
|
+
classList.forEach(className => {
|
|
700
|
+
if (className.startsWith('theme-')) {
|
|
701
|
+
classList.remove(className);
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
if (theme) {
|
|
705
|
+
classList.add(`theme-${theme.name}`);
|
|
674
706
|
}
|
|
675
707
|
});
|
|
676
|
-
if (theme) {
|
|
677
|
-
classList.add(`theme-${theme.name}`);
|
|
678
|
-
}
|
|
679
708
|
}
|
|
680
709
|
hasThemeCSS(theme) {
|
|
681
710
|
const id = `__theme-${theme.name}`;
|
|
682
|
-
return !!this.
|
|
711
|
+
return !!this.themeTarget.getStyleElement(id);
|
|
683
712
|
}
|
|
684
713
|
createThemeCSS(theme) {
|
|
685
714
|
let css = '';
|
|
686
|
-
const themeSelector =
|
|
715
|
+
const themeSelector = this.createThemeSelector(theme.name);
|
|
687
716
|
if (theme.schemes.light) {
|
|
688
717
|
css = this.createThemeVariantCSS(css, themeSelector, theme.schemes.light);
|
|
689
718
|
}
|
|
690
719
|
if (theme.schemes.dark) {
|
|
691
|
-
css = this.createThemeVariantCSS(css,
|
|
720
|
+
css = this.createThemeVariantCSS(css, this.createThemeSelector(theme.name, true), theme.schemes.dark);
|
|
692
721
|
}
|
|
693
722
|
this.removeThemeCSS(theme.name);
|
|
694
723
|
const cssElement = this.document.createElement('style');
|
|
695
724
|
cssElement.id = `__theme-${theme.name}`;
|
|
696
725
|
cssElement.textContent = css;
|
|
697
|
-
this.
|
|
726
|
+
this.themeTarget.appendStyleElement(cssElement);
|
|
727
|
+
}
|
|
728
|
+
createThemeSelector(name, dark = false) {
|
|
729
|
+
const classes = `.theme-${name}${dark ? '.app--dark' : ''}`;
|
|
730
|
+
return this.themeTarget.rootSelector === ':host'
|
|
731
|
+
? `:host(${classes})`
|
|
732
|
+
: `${this.themeTarget.rootSelector}${classes}`;
|
|
698
733
|
}
|
|
699
734
|
createThemeVariantCSS(css, selector, scheme) {
|
|
700
735
|
css += `${selector} {\n`;
|
|
@@ -706,16 +741,16 @@ class SiThemeService {
|
|
|
706
741
|
}
|
|
707
742
|
removeThemeCSS(name) {
|
|
708
743
|
const id = `__theme-${name}`;
|
|
709
|
-
this.
|
|
710
|
-
this.
|
|
744
|
+
this.themeTarget.getStyleElement(id)?.remove();
|
|
745
|
+
this.themeTarget.forEachElement(element => element.classList.remove(`theme-${name}`));
|
|
711
746
|
}
|
|
712
747
|
toggleDark(dark) {
|
|
713
748
|
if (!this.isBrowser) {
|
|
714
749
|
return;
|
|
715
750
|
}
|
|
716
|
-
this.
|
|
751
|
+
this.themeTarget.forEachElement(element => element.classList.toggle('app--dark', dark));
|
|
717
752
|
const colorScheme = dark ? 'dark' : 'light';
|
|
718
|
-
this.
|
|
753
|
+
this.themeTarget.updateColorScheme(colorScheme);
|
|
719
754
|
this.resolvedColorSchemeSub.next(colorScheme);
|
|
720
755
|
this.dispatchThemeSwitchEvent();
|
|
721
756
|
}
|
|
@@ -761,8 +796,9 @@ const injectIsDarkTheme = () => {
|
|
|
761
796
|
if (!isPlatformBrowser(inject(PLATFORM_ID))) {
|
|
762
797
|
return signal(false);
|
|
763
798
|
}
|
|
799
|
+
const targetDom = inject(SI_THEME_DOM_TARGET);
|
|
764
800
|
return toSignal(fromEvent(window, 'theme-switch').pipe(map$1(e => e.detail.dark)), {
|
|
765
|
-
initialValue:
|
|
801
|
+
initialValue: targetDom.element.classList.contains('app--dark')
|
|
766
802
|
});
|
|
767
803
|
};
|
|
768
804
|
|
|
@@ -775,5 +811,5 @@ const injectIsDarkTheme = () => {
|
|
|
775
811
|
* Generated bundle index. Do not edit.
|
|
776
812
|
*/
|
|
777
813
|
|
|
778
|
-
export { ELEMENT_THEME_NAME, SI_THEME_LOCAL_STORAGE_KEY, SiDefaultThemeStore, SiThemeService, SiThemeStore, elementTheme, injectIsDarkTheme };
|
|
814
|
+
export { ELEMENT_THEME_NAME, SI_THEME_DOM_TARGET, SI_THEME_LOCAL_STORAGE_KEY, SiDefaultThemeStore, SiThemeService, SiThemeStore, elementTheme, injectIsDarkTheme };
|
|
779
815
|
//# sourceMappingURL=siemens-element-ng-theme.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-theme.mjs","sources":["../../../../projects/element-ng/theme/si-theme-store.ts","../../../../projects/element-ng/theme/si-theme.model.ts","../../../../projects/element-ng/theme/si-theme.service.ts","../../../../projects/element-ng/theme/si-theme-signals.ts","../../../../projects/element-ng/theme/index.ts","../../../../projects/element-ng/theme/siemens-element-ng-theme.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Observable, of } from 'rxjs';\n\nimport { Theme } from './si-theme.model';\n\n/**\n * SiThemeStore object is used by the theme service to load and\n * store the themes. You can inject your own implementation to provide\n * a backend implementation. Otherwise a localStorage based implementation\n * is used.\n */\nexport abstract class SiThemeStore {\n /**\n * Load and return an alternative custom theme, other then\n * the default element theme. This method is invoked initially\n * to check for an alternative custom theme.\n * @returns The active theme to be used, or undefined if the\n * default element theme shall be used. All wrapped in an observable\n * that can also emit errors.\n */\n abstract loadActiveTheme(): Observable<Theme | undefined>;\n /**\n * Sets the theme with the given name to active.\n * @param name - The name of the theme to become active.\n * @returns True on success, otherwise false.\n */\n abstract activateTheme(name: string): Observable<boolean>;\n /**\n * Deactivate any active theme and makes the element theme the default one.\n * @returns True on success, otherwise false.\n */\n abstract deactivateTheme(): Observable<boolean>;\n /**\n * Load and return the available theme names.\n * @returns An `Observable` of available theme names, other than the\n * default element theme.\n */\n abstract loadThemeNames(): Observable<string[]>;\n /**\n * Load theme with the given `name`.\n * @param name - The name of the theme to be returned.\n * @returns Observable with the named theme or `undefined` if no such theme exist.\n */\n abstract loadTheme(name: string): Observable<Theme | undefined>;\n /**\n * Saves a theme to the store. The name shall not be empty. A theme with\n * identical name gets overwritten.\n * @param theme - The theme to be saved.\n * @returns True on success, otherwise false. All nicely wrapped in\n * an observable that may also emit errors.\n */\n abstract saveTheme(theme: Theme): Observable<boolean>;\n /**\n * Deletes the theme with the given name from the store.\n * @param name - The name of the theme to be deleted.\n * @returns True on success, otherwise false. All nicely wrapped in\n * an observable that may also emit errors. Returns false,\n * if the theme does not exist.\n */\n abstract deleteTheme(name: string): Observable<boolean>;\n}\n\nexport const SI_THEME_LOCAL_STORAGE_KEY = 'si-themes';\n\nexport interface ThemeStorage {\n activeTheme: string | undefined;\n themes: { [key: string]: Theme };\n}\n\nexport class SiDefaultThemeStore extends SiThemeStore {\n private isBrowser: boolean;\n\n constructor(isBrowser: boolean) {\n super();\n this.isBrowser = isBrowser;\n }\n\n loadActiveTheme(): Observable<Theme | undefined> {\n if (!this.isBrowser) {\n return of(undefined);\n }\n\n const store = this.loadStore();\n if (store.activeTheme) {\n return of(store.themes[store.activeTheme]);\n } else {\n return of(undefined);\n }\n }\n\n activateTheme(name: string): Observable<boolean> {\n if (!this.isBrowser) {\n return of(false);\n }\n\n const store = this.loadStore();\n if (store.themes[name]) {\n store.activeTheme = name;\n this.saveStore(store);\n return of(true);\n } else {\n return of(false);\n }\n }\n\n deactivateTheme(): Observable<boolean> {\n if (!this.isBrowser) {\n return of(false);\n }\n\n const store = this.loadStore();\n store.activeTheme = undefined;\n this.saveStore(store);\n return of(true);\n }\n\n loadThemeNames(): Observable<string[]> {\n if (!this.isBrowser) {\n return of([]);\n }\n const store = this.loadStore();\n return of(Array.from(Object.keys(store.themes)));\n }\n\n saveTheme(theme: Theme): Observable<boolean> {\n if (!this.isBrowser) {\n return of(false);\n }\n\n const store = this.loadStore();\n store.themes[theme.name] = theme;\n this.saveStore(store);\n return of(true);\n }\n\n loadTheme(name: string): Observable<Theme | undefined> {\n if (!this.isBrowser) {\n return of(undefined);\n }\n const store = this.loadStore();\n return of(store.themes[name]);\n }\n\n deleteTheme(name: string): Observable<boolean> {\n if (!this.isBrowser) {\n return of(false);\n }\n\n const store = this.loadStore();\n delete store.themes[name];\n if (store.activeTheme === name) {\n store.activeTheme = undefined;\n }\n this.saveStore(store);\n return of(true);\n }\n\n private loadStore(): ThemeStorage {\n const storeStr = localStorage.getItem(SI_THEME_LOCAL_STORAGE_KEY);\n if (storeStr) {\n return JSON.parse(storeStr) as ThemeStorage;\n } else {\n return { activeTheme: undefined, themes: {} };\n }\n }\n\n private saveStore(store: ThemeStorage): void {\n localStorage.setItem(SI_THEME_LOCAL_STORAGE_KEY, JSON.stringify(store));\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\n/** */\nexport interface ThemeDescription {\n name: string;\n groups: ThemePropertyGroup[];\n}\n\nexport interface ThemePropertyGroup {\n name: string;\n description?: string;\n properties: ThemeProperty[];\n}\n\nexport interface ThemeProperty {\n name: string;\n usage: string;\n type: ThemePropertyType;\n}\n\nexport type ThemePropertyType = 'color' | 'gradient' | 'font' | 'url' | 'text' | 'number';\n\nexport interface Theme {\n name: string;\n schemes: ThemeColorSchemes;\n /**\n * A map of icons that overrides the default Element icons.\n * The key must be the key of the original icon that should be overridden.\n * The value has to be a data SVG string.\n *\n * @example\n * ```ts\n * {\n * elementUser: \"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'>...</svg>\"\n * }\n * ```\n *\n * @experimental\n */\n icons?: Record<string, string>;\n}\n\nexport interface ThemeColorSchemes {\n light?: ThemeColorScheme;\n dark?: ThemeColorScheme;\n}\n\nexport type ThemeColorScheme = { [key: string]: string };\n\nexport type ThemeType = 'dark' | 'light' | 'auto';\n\nexport const ELEMENT_THEME_NAME = 'element';\n\nexport const elementTheme: ThemeDescription = {\n name: 'element',\n groups: [\n {\n name: 'Branding',\n description: 'Configure the brand logo.',\n properties: [\n {\n name: '--element-brand-logo',\n usage: 'Enter a brand logo in the format: \\'url(\"https://company/logo.svg\")\\'',\n type: 'text'\n },\n {\n name: '--element-brand-logo-width',\n usage: \"Enter the width of the logo as CSS width value. Example: '100px'\",\n type: 'text'\n },\n {\n name: '--element-brand-logo-height',\n usage: \"Enter the height of the logo as CSS width value. Max: 48px; Example: '16px'\",\n type: 'text'\n },\n {\n name: '--element-brand-logo-text',\n usage:\n 'Enter a textual representation of the logo. Example: \\'\"Siemens logo\"\\'. The text must be wrapped in double quotes.',\n type: 'text'\n }\n ]\n },\n {\n name: 'Basic definitions',\n description: 'Basic definitions',\n properties: [\n {\n name: '--element-body-font-family',\n usage: 'The theme only uses one font everywhere.',\n type: 'font'\n },\n { name: '--element-button-radius', usage: 'Button border radius', type: 'text' },\n { name: '--element-button-focus-width', usage: 'Focus width', type: 'text' },\n {\n name: '--element-button-focus-overlay-width',\n usage: 'Focus overlay width',\n type: 'text'\n },\n {\n name: '--element-button-focus-overlay-color',\n usage: 'Focus overlay color',\n type: 'text'\n },\n { name: '--element-input-radius', usage: 'Input field border radius', type: 'text' },\n { name: '--element-logo-color', usage: 'Logo color', type: 'text' },\n { name: '--element-radius-1', usage: 'Border radius-1', type: 'text' },\n { name: '--element-radius-2', usage: 'Border radius-2', type: 'text' },\n { name: '--element-radius-3', usage: 'Border radius-3', type: 'text' }\n ]\n },\n {\n name: 'UI',\n description:\n 'UI colors are used on structural properties and icons and provide good contrast when used over any background.',\n properties: [\n { name: '--element-ui-0', usage: 'Logo, selected (active) elements', type: 'color' },\n { name: '--element-ui-0-hover', usage: 'Selected hover', type: 'color' },\n { name: '--element-ui-1', usage: 'Primary icons', type: 'color' },\n { name: '--element-ui-2', usage: 'Secondary icons', type: 'color' },\n { name: '--element-ui-3', usage: 'Disabled', type: 'color' },\n { name: '--element-ui-4', usage: 'Borders', type: 'color' },\n { name: '--element-ui-5', usage: 'Inverse', type: 'color' },\n { name: '--element-ui-6', usage: 'Shadows', type: 'color' },\n { name: '--element-box-shadow-color-1', usage: 'Box shadow color 1', type: 'color' },\n { name: '--element-box-shadow-color-2', usage: 'Box shadow color 2', type: 'color' },\n { name: '--element-focus-default', usage: 'Default focus color', type: 'color' }\n ]\n },\n {\n name: 'Base',\n description: 'Base colors are used as backgrounds of containers.',\n properties: [\n { name: '--element-base-0', usage: 'Page background, row background', type: 'color' },\n {\n name: '--element-base-1',\n usage: 'Header, navigation, card, table background',\n type: 'color'\n },\n {\n name: '--element-base-1-hover',\n usage: 'Hover on base-1 backgrounds, like table, tree, or menu',\n type: 'color'\n },\n {\n name: '--element-base-1-selected',\n usage: 'Selected on base-1 backgrounds, like table, tree, or menu',\n type: 'color'\n },\n {\n name: '--element-base-2',\n usage: 'Page background with higher contrast pages in dark mode',\n type: 'color'\n },\n {\n name: '--element-base-information',\n usage: 'Informational component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-success',\n usage: 'Success component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-caution',\n usage: 'Caution component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-warning',\n usage: 'Warning component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-danger',\n usage: 'Danger component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-translucent-1',\n usage: 'Translucent background, e.g. backdrop',\n type: 'gradient'\n },\n {\n name: '--element-base-translucent-2',\n usage: 'Slightly translucent background, e.g. toasts',\n type: 'gradient'\n }\n ]\n },\n {\n name: 'Actions',\n description: 'Action colors are used to indicate actions that users can perform.',\n properties: [\n { name: '--element-action-primary', usage: 'Primary interaction', type: 'gradient' },\n {\n name: '--element-action-primary-hover',\n usage: 'Primary action background on hover',\n type: 'gradient'\n },\n { name: '--element-action-primary-text', usage: 'Primary text color', type: 'color' },\n { name: '--element-action-secondary', usage: 'Secondary interaction', type: 'gradient' },\n {\n name: '--element-action-secondary-hover',\n usage: 'Secondary action background on hover',\n type: 'gradient'\n },\n { name: '--element-action-secondary-text', usage: 'Secondary text color', type: 'color' },\n {\n name: '--element-action-secondary-text-hover',\n usage: 'Secondary text color on hover',\n type: 'color'\n },\n {\n name: '--element-action-secondary-border',\n usage: 'Secondary border color',\n type: 'color'\n },\n {\n name: '--element-action-secondary-border-hover',\n usage: 'Secondary border color on hover',\n type: 'color'\n },\n { name: '--element-action-warning', usage: 'Warning', type: 'gradient' },\n {\n name: '--element-action-warning-hover',\n usage: 'Warning action background on hover',\n type: 'gradient'\n },\n { name: '--element-action-warning-text', usage: 'Warning text color', type: 'color' },\n { name: '--element-action-danger', usage: 'Danger', type: 'gradient' },\n {\n name: '--element-action-danger-hover',\n usage: 'Danger action background on hover',\n type: 'gradient'\n },\n { name: '--element-action-danger-text', usage: 'Danger text color', type: 'color' },\n {\n name: '--element-action-disabled-opacity',\n usage: 'Disabled action opacity',\n type: 'number'\n }\n ]\n },\n {\n name: 'Text',\n description: 'Similarly, categories for typography colors are also defined in this system.',\n properties: [\n { name: '--element-text-primary', usage: 'Primary', type: 'color' },\n { name: '--element-text-secondary', usage: 'Secondary', type: 'color' },\n { name: '--element-text-disabled', usage: 'Disabled', type: 'color' },\n { name: '--element-text-inverse', usage: 'Inverse', type: 'color' },\n { name: '--element-text-active', usage: 'Active', type: 'color' },\n { name: '--element-text-information', usage: 'Informational', type: 'color' },\n { name: '--element-text-success', usage: 'Success', type: 'color' },\n { name: '--element-text-caution', usage: 'Caution', type: 'color' },\n { name: '--element-text-warning', usage: 'Warning', type: 'color' },\n { name: '--element-text-danger', usage: 'Danger', type: 'color' }\n ]\n },\n {\n name: 'Status',\n description:\n 'Status colors are used to describe and/or report on the status of different things.',\n properties: [\n { name: '--element-status-information', usage: 'Informational', type: 'color' },\n {\n name: '--element-status-information-contrast',\n usage: 'Informational contrast',\n type: 'color'\n },\n { name: '--element-status-success', usage: 'Success', type: 'color' },\n { name: '--element-status-success-contrast', usage: 'Success contrast', type: 'color' },\n { name: '--element-status-caution', usage: 'Caution', type: 'color' },\n { name: '--element-status-caution-contrast', usage: 'Caution contrast', type: 'color' },\n { name: '--element-status-warning', usage: 'Warning', type: 'color' },\n { name: '--element-status-warning-contrast', usage: 'Warning contrast', type: 'color' },\n { name: '--element-status-danger', usage: 'Danger', type: 'color' },\n { name: '--element-status-danger-contrast', usage: 'Danger contrast', type: 'color' }\n ]\n },\n {\n name: 'Form feedback icons',\n description: 'Icons that are used to indicate a form item status',\n properties: [{ name: '--element-invalid-feedback-icon', usage: 'Danger', type: 'text' }]\n }\n ]\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { DOCUMENT, EventEmitter, inject, Injectable, PLATFORM_ID, signal } from '@angular/core';\nimport { Meta } from '@angular/platform-browser';\nimport { Observable, of, ReplaySubject, throwError } from 'rxjs';\nimport { map, switchMap, take, tap } from 'rxjs/operators';\n\nimport { SiDefaultThemeStore, SiThemeStore } from './si-theme-store';\nimport {\n ELEMENT_THEME_NAME,\n Theme,\n ThemeColorScheme,\n ThemeColorSchemes,\n ThemeType\n} from './si-theme.model';\n\n@Injectable({ providedIn: 'root' })\nexport class SiThemeService {\n /**\n * The current color scheme. (e.g. light or dark).\n */\n private _resolvedColorScheme: ThemeType | undefined = 'light';\n private resolvedColorSchemeSub = new ReplaySubject<keyof ThemeColorSchemes>(1);\n /**\n * Emits events when the color scheme changes.\n *\n * @defaultValue this.resolvedColorSchemeSub.asObservable()\n */\n readonly resolvedColorScheme$ = this.resolvedColorSchemeSub.asObservable();\n /**\n * The current color scheme. (e.g. light or dark).\n */\n get resolvedColorScheme(): ThemeType | undefined {\n return this._resolvedColorScheme;\n }\n\n /**\n * All available theme names, including element theme name.\n */\n private _themeNames: string[] = [ELEMENT_THEME_NAME];\n private themeNamesSub = new ReplaySubject<string[]>(1);\n /**\n * Emits events when the list of available theme names changes.\n *\n * @defaultValue this.themeNamesSub.asObservable()\n */\n readonly themeNames$ = this.themeNamesSub.asObservable();\n\n /**\n * All available theme names, including element theme name.\n */\n get themeNames(): string[] {\n return this._themeNames;\n }\n\n /**\n * Emits events when the currently applied theme changes. Either by\n * changing to another theme or by re-applying a theme with updated\n * properties. When switching to default theme element, `undefined`\n * is emitted.\n */\n readonly themeChange = new EventEmitter<Theme | undefined>();\n\n /**\n * The name of the theme that is active. Theme name `element` is the default.\n */\n activeThemeName?: string;\n /**\n * Icon overrides by the currently activeTheme.\n * @defaultValue\n * ```\n * {}\n * ```\n */\n readonly themeIcons = signal<Record<string, string>>({});\n\n private themes: Map<string, Theme> = new Map();\n private darkMediaQuery?: MediaQueryList;\n private mediaQueryListener?: () => void;\n private isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private previewTheme?: Theme;\n\n private themeStore =\n inject(SiThemeStore, { optional: true }) ?? new SiDefaultThemeStore(this.isBrowser);\n private meta = inject(Meta);\n private document = inject(DOCUMENT);\n\n constructor() {\n this.resolvedColorScheme$.subscribe(scheme => (this._resolvedColorScheme = scheme));\n this.themeNames$.subscribe(names => (this._themeNames = names));\n\n if (this.isBrowser) {\n this.darkMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n this.mediaQueryListener = () => this.toggleDark(this.darkMediaQuery!.matches);\n }\n\n this.getActiveTheme()\n .pipe(take(1))\n .subscribe({\n next: theme => this.applyThemeStyle(theme, this._resolvedColorScheme),\n error: error => console.error('Cannot load active theme', error)\n });\n\n this.themeStore\n .loadThemeNames()\n .pipe(take(1))\n .subscribe({\n next: names => {\n names.push(ELEMENT_THEME_NAME);\n this.themeNamesSub.next(names);\n },\n error: error => console.error('Cannot load theme names', error)\n });\n }\n\n /**\n * Returns `true` if a theme with the given name is available.\n */\n hasTheme(name: string): boolean {\n return this._themeNames.includes(name);\n }\n\n /**\n * Returns a clone of the theme with the given name or `undefined` if not\n * available or name is `element`.\n * @param name - The name of the theme to be returned.\n * @returns The theme with the given name and `undefined` if name is `element`.\n */\n getTheme(name: string): Observable<Theme | undefined> {\n if (name === ELEMENT_THEME_NAME || !this.hasTheme(name)) {\n return of(undefined);\n }\n\n if (this.themes.has(name)) {\n const theme = this.themes.get(name)!;\n // return a clone to avoid changes as a side effect\n return of(this.cloneTheme(theme));\n }\n\n return this.themeStore.loadTheme(name).pipe(\n tap(theme => {\n if (theme) {\n this.themes.set(theme.name, this.cloneTheme(theme));\n }\n })\n );\n }\n\n /**\n * Loads and returns the currently active theme. Returns undefined if no custom theme is used.\n * @returns A custom theme or `undefined` if the default element theme is used.\n */\n getActiveTheme(): Observable<Theme | undefined> {\n if (this.activeThemeName) {\n return of(this.themes.get(this.activeThemeName));\n }\n return this.themeStore.loadActiveTheme().pipe(\n map(theme => {\n if (theme) {\n this.activeThemeName = theme.name;\n this.themes.set(theme.name, theme);\n this.applyTheme(theme, this._resolvedColorScheme);\n return theme;\n }\n this.activeThemeName = ELEMENT_THEME_NAME;\n return undefined;\n })\n );\n }\n\n /**\n * Adds or updates the given theme in the theme store.\n * @param theme - The theme to be saved.\n * @returns `true` if the theme was saved successfully.\n */\n addOrUpdateTheme(theme: Theme): Observable<boolean> {\n const result = new ReplaySubject<boolean>(1);\n\n this.themeStore.saveTheme(theme).subscribe({\n next: saveResult => {\n if (saveResult) {\n this.themes.set(theme.name, this.cloneTheme(theme));\n // Update list of theme names when this is a new one\n if (!this.hasTheme(theme.name)) {\n const names = this._themeNames.concat(theme.name);\n this.themeNamesSub.next(names);\n }\n }\n result.next(saveResult);\n result.complete();\n },\n error: error => result.error(error),\n complete: () => result.complete()\n });\n return result;\n }\n\n /**\n * Deletes the theme with the given name from the theme store.\n */\n deleteTheme(name: string): Observable<boolean> {\n const result = new ReplaySubject<boolean>(1);\n if (!this.hasTheme(name) || name === ELEMENT_THEME_NAME) {\n result.next(false);\n result.complete();\n } else {\n this.removeThemeCSS(name);\n this.themeStore.deleteTheme(name).subscribe({\n next: deleteResult => {\n if (deleteResult) {\n this.themes.delete(name);\n const names = this._themeNames.filter(themeName => themeName !== name);\n this.themeNamesSub.next(names);\n }\n result.next(deleteResult);\n result.complete();\n },\n error: error => result.error(error),\n complete: () => result.complete()\n });\n }\n return result;\n }\n\n /**\n * Resets the preview theme to the default element theme.\n */\n resetPreview(): void {\n this.previewTheme = { name: '__preview', schemes: { dark: {}, light: {} } };\n this.removeThemeCSS(this.previewTheme.name);\n }\n\n /**\n * Sets the active theme to the given name. If no name is given, the default element theme is used.\n */\n setActiveTheme(name?: string, type?: ThemeType): Observable<boolean> {\n const theType = type ?? this._resolvedColorScheme ?? 'auto';\n const theName = name ?? this.activeThemeName ?? ELEMENT_THEME_NAME;\n\n if (theName === this.activeThemeName) {\n return of(true);\n }\n if (!this.hasTheme(theName)) {\n return of(false);\n }\n\n const result = new ReplaySubject<boolean>(1);\n this.activeThemeName = theName;\n // Make the change in the remove store\n const store =\n theName !== ELEMENT_THEME_NAME\n ? this.themeStore.activateTheme(theName)\n : this.themeStore.deactivateTheme();\n store\n .pipe(\n // On success, load the theme\n switchMap(storeResult => {\n if (storeResult) {\n return this.getTheme(theName);\n } else {\n return throwError(() => 'Cannot change active theme in theme store.');\n }\n }),\n // Only take one to avoid unsubscription issues\n take(1)\n )\n .subscribe({\n next: theme => {\n this.applyTheme(theme, theType);\n result.next(true);\n },\n error: error => {\n console.error(`Activating theme ${name} failed`, error);\n result.next(false);\n },\n complete: () => result.complete()\n });\n return result;\n }\n\n /**\n * Apply `light` or `dark` theme to the document.\n */\n applyThemeType(type: ThemeType): void {\n if (type === this._resolvedColorScheme || !this.darkMediaQuery || !this.mediaQueryListener) {\n return;\n }\n\n this.darkMediaQuery.removeEventListener('change', this.mediaQueryListener);\n\n if (type === 'light') {\n this.toggleDark(false);\n } else if (type === 'dark') {\n this.toggleDark(true);\n } else {\n this.mediaQueryListener();\n this.darkMediaQuery.addEventListener('change', this.mediaQueryListener);\n }\n }\n\n /**\n * Applies the given theme to the document. If no theme is given, the active theme is applied.\n */\n applyTheme(theme?: Theme, type?: ThemeType, overwrite?: boolean): void {\n if (theme) {\n this.applyThemeStyle(theme, type, overwrite);\n } else {\n this.getActiveTheme()\n .pipe(take(1))\n .subscribe({\n next: loadedTheme => this.applyThemeStyle(loadedTheme, type),\n error: error => console.error('Cannot load active theme', error)\n });\n }\n }\n\n /**\n * Updates the given property of the preview theme.\n */\n updateProperty(name: string, value: string, type: keyof ThemeColorSchemes): void {\n if (!this.previewTheme) {\n this.resetPreview();\n }\n this.previewTheme!.schemes[type]![name] = value;\n this.createThemeCSS(this.previewTheme!);\n this.document.documentElement.classList.add('theme-__preview');\n this.dispatchThemeSwitchEvent();\n }\n\n /**\n * Checks if the given theme JSON object is a valid theme.\n */\n isThemeValid(data: unknown): boolean {\n const theme = data as Theme;\n return (\n !!data &&\n typeof data === 'object' &&\n 'name' in data &&\n 'schemes' in data &&\n typeof theme.name === 'string' &&\n typeof theme.schemes === 'object' &&\n this.isThemeTypeValid(theme, 'light') &&\n this.isThemeTypeValid(theme, 'dark')\n );\n }\n\n private isThemeTypeValid(theme: Theme, type: 'light' | 'dark'): boolean {\n return (\n !(type in theme.schemes) ||\n (typeof theme.schemes[type] === 'object' &&\n Object.values(theme.schemes[type] as ThemeColorScheme).every(\n item => typeof item === 'string'\n ) &&\n Object.keys(theme.schemes[type] as ThemeColorScheme).every(\n item => typeof item === 'string'\n ))\n );\n }\n\n private applyThemeStyle(theme?: Theme, type?: ThemeType, overwrite?: boolean): void {\n if (!this.isBrowser) {\n return;\n }\n this.resetPreview();\n\n if (theme && theme.name !== ELEMENT_THEME_NAME && (overwrite || !this.hasThemeCSS(theme))) {\n this.createThemeCSS(theme);\n }\n this.activateTheme(theme);\n\n if (type && type !== this._resolvedColorScheme) {\n this.applyThemeType(type);\n }\n\n this.themeIcons.set(\n Object.fromEntries(Object.entries(theme?.icons ?? {}).map(([key, icon]) => [key, icon]))\n );\n this.themeChange.emit(theme);\n }\n\n private activateTheme(theme?: Theme): void {\n const classList = this.document.documentElement.classList;\n classList.forEach(c => {\n if (c.startsWith('theme-')) {\n classList.remove(c);\n }\n });\n if (theme) {\n classList.add(`theme-${theme.name}`);\n }\n }\n\n private hasThemeCSS(theme: Theme): boolean {\n const id = `__theme-${theme.name}`;\n return !!this.document.getElementById(id);\n }\n\n private createThemeCSS(theme: Theme): void {\n let css = '';\n const themeSelector = `:root.theme-${theme.name}`;\n if (theme.schemes.light) {\n css = this.createThemeVariantCSS(css, themeSelector, theme.schemes.light);\n }\n if (theme.schemes.dark) {\n css = this.createThemeVariantCSS(css, themeSelector + '.app--dark', theme.schemes.dark);\n }\n\n this.removeThemeCSS(theme.name);\n const cssElement = this.document.createElement('style');\n cssElement.id = `__theme-${theme.name}`;\n cssElement.textContent = css;\n\n this.document.body.appendChild(cssElement);\n }\n\n private createThemeVariantCSS(css: string, selector: string, scheme: ThemeColorScheme): string {\n css += `${selector} {\\n`;\n for (const key of Object.keys(scheme)) {\n css += `${key}: ${scheme[key]};\\n`;\n }\n css += '}\\n';\n return css;\n }\n\n private removeThemeCSS(name: string): void {\n const id = `__theme-${name}`;\n this.document.getElementById(id)?.remove();\n this.document.documentElement.classList.remove(`theme-${name}`);\n }\n\n private toggleDark(dark: boolean): void {\n if (!this.isBrowser) {\n return;\n }\n\n this.document.documentElement.classList.toggle('app--dark', dark);\n const colorScheme = dark ? 'dark' : 'light';\n this.meta.updateTag({ name: 'color-scheme', content: colorScheme });\n this.resolvedColorSchemeSub.next(colorScheme);\n this.dispatchThemeSwitchEvent();\n }\n\n private cloneTheme(theme: Theme): Theme {\n const clone: Theme = { ...theme, schemes: {} };\n if (theme.schemes.light) {\n clone.schemes.light = { ...theme.schemes.light };\n }\n if (theme.schemes.dark) {\n clone.schemes.dark = { ...theme.schemes.dark };\n }\n return clone;\n }\n\n private dispatchThemeSwitchEvent(): void {\n window.dispatchEvent(\n new CustomEvent('theme-switch', {\n detail: {\n dark: this._resolvedColorScheme === 'dark',\n colorScheme: this._resolvedColorScheme\n }\n })\n );\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, PLATFORM_ID, signal, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { fromEvent, map } from 'rxjs';\n\n/**\n * Returns a signal that reflects whether the current Element theme is dark (`true`) or light\n * (`false`). The signal reacts to `theme-switch` events dispatched on `window`.\n *\n * @experimental\n * @returns A boolean signal — `true` when the active theme is dark\n * @throws When called outside of an Angular injection context\n */\nexport const injectIsDarkTheme = (): Signal<boolean> => {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) {\n return signal(false);\n }\n\n return toSignal(\n fromEvent<CustomEvent<{ dark: boolean }>>(window, 'theme-switch').pipe(map(e => e.detail.dark)),\n {\n initialValue: document.documentElement.classList.contains('app--dark')\n }\n );\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-theme-store';\nexport * from './si-theme.service';\nexport * from './si-theme.model';\nexport * from './si-theme-signals';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map"],"mappings":";;;;;;;;AAAA;;;AAGG;AAKH;;;;;AAKG;MACmB,YAAY,CAAA;AAiDjC;AAEM,MAAM,0BAA0B,GAAG;AAOpC,MAAO,mBAAoB,SAAQ,YAAY,CAAA;AAC3C,IAAA,SAAS;AAEjB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC5B,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;IAC5B;IAEA,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACnB,YAAA,OAAO,EAAE,CAAC,SAAS,CAAC;QACtB;AAEA,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE;AAC9B,QAAA,IAAI,KAAK,CAAC,WAAW,EAAE;YACrB,OAAO,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC5C;aAAO;AACL,YAAA,OAAO,EAAE,CAAC,SAAS,CAAC;QACtB;IACF;AAEA,IAAA,aAAa,CAAC,I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AAG,MAAsB;IACrD,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE;AAC3C,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB;IAEA,OAAO,QAAQ,CACb,SAAS,CAAiC,MAAM,EAAE,cAAc,CAAC,CAAC,IAAI,CAACA,KAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAC/F;QACE,YAAY,EAAE,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW;AACtE,KAAA,CACF;AACH;;AC5BA;;;AAGG;;ACHH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-theme.mjs","sources":["../../../../projects/element-ng/theme/si-theme-store.ts","../../../../projects/element-ng/theme/si-theme-dom-target.ts","../../../../projects/element-ng/theme/si-theme.model.ts","../../../../projects/element-ng/theme/si-theme.service.ts","../../../../projects/element-ng/theme/si-theme-signals.ts","../../../../projects/element-ng/theme/index.ts","../../../../projects/element-ng/theme/siemens-element-ng-theme.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Observable, of } from 'rxjs';\n\nimport { Theme } from './si-theme.model';\n\n/**\n * SiThemeStore object is used by the theme service to load and\n * store the themes. You can inject your own implementation to provide\n * a backend implementation. Otherwise a localStorage based implementation\n * is used.\n */\nexport abstract class SiThemeStore {\n /**\n * Load and return an alternative custom theme, other then\n * the default element theme. This method is invoked initially\n * to check for an alternative custom theme.\n * @returns The active theme to be used, or undefined if the\n * default element theme shall be used. All wrapped in an observable\n * that can also emit errors.\n */\n abstract loadActiveTheme(): Observable<Theme | undefined>;\n /**\n * Sets the theme with the given name to active.\n * @param name - The name of the theme to become active.\n * @returns True on success, otherwise false.\n */\n abstract activateTheme(name: string): Observable<boolean>;\n /**\n * Deactivate any active theme and makes the element theme the default one.\n * @returns True on success, otherwise false.\n */\n abstract deactivateTheme(): Observable<boolean>;\n /**\n * Load and return the available theme names.\n * @returns An `Observable` of available theme names, other than the\n * default element theme.\n */\n abstract loadThemeNames(): Observable<string[]>;\n /**\n * Load theme with the given `name`.\n * @param name - The name of the theme to be returned.\n * @returns Observable with the named theme or `undefined` if no such theme exist.\n */\n abstract loadTheme(name: string): Observable<Theme | undefined>;\n /**\n * Saves a theme to the store. The name shall not be empty. A theme with\n * identical name gets overwritten.\n * @param theme - The theme to be saved.\n * @returns True on success, otherwise false. All nicely wrapped in\n * an observable that may also emit errors.\n */\n abstract saveTheme(theme: Theme): Observable<boolean>;\n /**\n * Deletes the theme with the given name from the store.\n * @param name - The name of the theme to be deleted.\n * @returns True on success, otherwise false. All nicely wrapped in\n * an observable that may also emit errors. Returns false,\n * if the theme does not exist.\n */\n abstract deleteTheme(name: string): Observable<boolean>;\n}\n\nexport const SI_THEME_LOCAL_STORAGE_KEY = 'si-themes';\n\nexport interface ThemeStorage {\n activeTheme: string | undefined;\n themes: { [key: string]: Theme };\n}\n\nexport class SiDefaultThemeStore extends SiThemeStore {\n private isBrowser: boolean;\n\n constructor(isBrowser: boolean) {\n super();\n this.isBrowser = isBrowser;\n }\n\n loadActiveTheme(): Observable<Theme | undefined> {\n if (!this.isBrowser) {\n return of(undefined);\n }\n\n const store = this.loadStore();\n if (store.activeTheme) {\n return of(store.themes[store.activeTheme]);\n } else {\n return of(undefined);\n }\n }\n\n activateTheme(name: string): Observable<boolean> {\n if (!this.isBrowser) {\n return of(false);\n }\n\n const store = this.loadStore();\n if (store.themes[name]) {\n store.activeTheme = name;\n this.saveStore(store);\n return of(true);\n } else {\n return of(false);\n }\n }\n\n deactivateTheme(): Observable<boolean> {\n if (!this.isBrowser) {\n return of(false);\n }\n\n const store = this.loadStore();\n store.activeTheme = undefined;\n this.saveStore(store);\n return of(true);\n }\n\n loadThemeNames(): Observable<string[]> {\n if (!this.isBrowser) {\n return of([]);\n }\n const store = this.loadStore();\n return of(Array.from(Object.keys(store.themes)));\n }\n\n saveTheme(theme: Theme): Observable<boolean> {\n if (!this.isBrowser) {\n return of(false);\n }\n\n const store = this.loadStore();\n store.themes[theme.name] = theme;\n this.saveStore(store);\n return of(true);\n }\n\n loadTheme(name: string): Observable<Theme | undefined> {\n if (!this.isBrowser) {\n return of(undefined);\n }\n const store = this.loadStore();\n return of(store.themes[name]);\n }\n\n deleteTheme(name: string): Observable<boolean> {\n if (!this.isBrowser) {\n return of(false);\n }\n\n const store = this.loadStore();\n delete store.themes[name];\n if (store.activeTheme === name) {\n store.activeTheme = undefined;\n }\n this.saveStore(store);\n return of(true);\n }\n\n private loadStore(): ThemeStorage {\n const storeStr = localStorage.getItem(SI_THEME_LOCAL_STORAGE_KEY);\n if (storeStr) {\n return JSON.parse(storeStr) as ThemeStorage;\n } else {\n return { activeTheme: undefined, themes: {} };\n }\n }\n\n private saveStore(store: ThemeStorage): void {\n localStorage.setItem(SI_THEME_LOCAL_STORAGE_KEY, JSON.stringify(store));\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { DOCUMENT, inject, InjectionToken } from '@angular/core';\nimport { Meta } from '@angular/platform-browser';\n\nimport type { ColorScheme } from './si-theme.model';\n\n/**\n * DOM boundary controlled by {@link SiThemeService}.\n */\nexport interface SiThemeDomTarget {\n /** Element that receives theme and color-scheme classes. */\n readonly element: HTMLElement;\n /** CSS selector used for runtime theme variables. */\n readonly rootSelector: string;\n /** Event target for the legacy `theme-switch` event. */\n readonly eventTarget?: EventTarget;\n\n forEachElement(callback: (element: HTMLElement) => void): void;\n registerElement?(element: HTMLElement): () => void;\n getStyleElement(id: string): HTMLStyleElement | null;\n appendStyleElement(style: HTMLStyleElement): void;\n updateColorScheme(colorScheme: ColorScheme): void;\n}\n\n/**\n * Theme DOM target. The default implementation targets the current document.\n */\nexport const SI_THEME_DOM_TARGET = new InjectionToken<SiThemeDomTarget>('SI_THEME_DOM_TARGET', {\n providedIn: 'root',\n factory: () => {\n const document = inject(DOCUMENT);\n const meta = inject(Meta);\n\n return {\n element: document.documentElement,\n rootSelector: ':root',\n eventTarget: document.defaultView ?? undefined,\n forEachElement: callback => callback(document.documentElement),\n getStyleElement: id => document.getElementById(id) as HTMLStyleElement | null,\n appendStyleElement: style => document.body.append(style),\n updateColorScheme: colorScheme =>\n meta.updateTag({ name: 'color-scheme', content: colorScheme })\n };\n }\n});\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\n/** */\nexport interface ThemeDescription {\n name: string;\n groups: ThemePropertyGroup[];\n}\n\nexport interface ThemePropertyGroup {\n name: string;\n description?: string;\n properties: ThemeProperty[];\n}\n\nexport interface ThemeProperty {\n name: string;\n usage: string;\n type: ThemePropertyType;\n}\n\nexport type ThemePropertyType = 'color' | 'gradient' | 'font' | 'url' | 'text' | 'number';\n\nexport interface Theme {\n name: string;\n schemes: ThemeColorSchemes;\n /**\n * A map of icons that overrides the default Element icons.\n * The key must be the key of the original icon that should be overridden.\n * The value has to be a data SVG string.\n *\n * @example\n * ```ts\n * {\n * elementUser: \"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'>...</svg>\"\n * }\n * ```\n *\n * @experimental\n */\n icons?: Record<string, string>;\n}\n\nexport interface ThemeColorSchemes {\n light?: ThemeColorScheme;\n dark?: ThemeColorScheme;\n}\n\nexport type ThemeColorScheme = { [key: string]: string };\n\nexport type ColorScheme = 'light' | 'dark';\n\nexport type ThemeType = ColorScheme | 'auto';\n\nexport const ELEMENT_THEME_NAME = 'element';\n\nexport const elementTheme: ThemeDescription = {\n name: 'element',\n groups: [\n {\n name: 'Branding',\n description: 'Configure the brand logo.',\n properties: [\n {\n name: '--element-brand-logo',\n usage: 'Enter a brand logo in the format: \\'url(\"https://company/logo.svg\")\\'',\n type: 'text'\n },\n {\n name: '--element-brand-logo-width',\n usage: \"Enter the width of the logo as CSS width value. Example: '100px'\",\n type: 'text'\n },\n {\n name: '--element-brand-logo-height',\n usage: \"Enter the height of the logo as CSS width value. Max: 48px; Example: '16px'\",\n type: 'text'\n },\n {\n name: '--element-brand-logo-text',\n usage:\n 'Enter a textual representation of the logo. Example: \\'\"Siemens logo\"\\'. The text must be wrapped in double quotes.',\n type: 'text'\n }\n ]\n },\n {\n name: 'Basic definitions',\n description: 'Basic definitions',\n properties: [\n {\n name: '--element-body-font-family',\n usage: 'The theme only uses one font everywhere.',\n type: 'font'\n },\n { name: '--element-button-radius', usage: 'Button border radius', type: 'text' },\n { name: '--element-button-focus-width', usage: 'Focus width', type: 'text' },\n {\n name: '--element-button-focus-overlay-width',\n usage: 'Focus overlay width',\n type: 'text'\n },\n {\n name: '--element-button-focus-overlay-color',\n usage: 'Focus overlay color',\n type: 'text'\n },\n { name: '--element-input-radius', usage: 'Input field border radius', type: 'text' },\n { name: '--element-logo-color', usage: 'Logo color', type: 'text' },\n { name: '--element-radius-1', usage: 'Border radius-1', type: 'text' },\n { name: '--element-radius-2', usage: 'Border radius-2', type: 'text' },\n { name: '--element-radius-3', usage: 'Border radius-3', type: 'text' }\n ]\n },\n {\n name: 'UI',\n description:\n 'UI colors are used on structural properties and icons and provide good contrast when used over any background.',\n properties: [\n { name: '--element-ui-0', usage: 'Logo, selected (active) elements', type: 'color' },\n { name: '--element-ui-0-hover', usage: 'Selected hover', type: 'color' },\n { name: '--element-ui-1', usage: 'Primary icons', type: 'color' },\n { name: '--element-ui-2', usage: 'Secondary icons', type: 'color' },\n { name: '--element-ui-3', usage: 'Disabled', type: 'color' },\n { name: '--element-ui-4', usage: 'Borders', type: 'color' },\n { name: '--element-ui-5', usage: 'Inverse', type: 'color' },\n { name: '--element-ui-6', usage: 'Shadows', type: 'color' },\n { name: '--element-box-shadow-color-1', usage: 'Box shadow color 1', type: 'color' },\n { name: '--element-box-shadow-color-2', usage: 'Box shadow color 2', type: 'color' },\n { name: '--element-focus-default', usage: 'Default focus color', type: 'color' }\n ]\n },\n {\n name: 'Base',\n description: 'Base colors are used as backgrounds of containers.',\n properties: [\n { name: '--element-base-0', usage: 'Page background, row background', type: 'color' },\n {\n name: '--element-base-1',\n usage: 'Header, navigation, card, table background',\n type: 'color'\n },\n {\n name: '--element-base-1-hover',\n usage: 'Hover on base-1 backgrounds, like table, tree, or menu',\n type: 'color'\n },\n {\n name: '--element-base-1-selected',\n usage: 'Selected on base-1 backgrounds, like table, tree, or menu',\n type: 'color'\n },\n {\n name: '--element-base-2',\n usage: 'Page background with higher contrast pages in dark mode',\n type: 'color'\n },\n {\n name: '--element-base-information',\n usage: 'Informational component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-success',\n usage: 'Success component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-caution',\n usage: 'Caution component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-warning',\n usage: 'Warning component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-danger',\n usage: 'Danger component background for e.g. badges',\n type: 'gradient'\n },\n {\n name: '--element-base-translucent-1',\n usage: 'Translucent background, e.g. backdrop',\n type: 'gradient'\n },\n {\n name: '--element-base-translucent-2',\n usage: 'Slightly translucent background, e.g. toasts',\n type: 'gradient'\n }\n ]\n },\n {\n name: 'Actions',\n description: 'Action colors are used to indicate actions that users can perform.',\n properties: [\n { name: '--element-action-primary', usage: 'Primary interaction', type: 'gradient' },\n {\n name: '--element-action-primary-hover',\n usage: 'Primary action background on hover',\n type: 'gradient'\n },\n { name: '--element-action-primary-text', usage: 'Primary text color', type: 'color' },\n { name: '--element-action-secondary', usage: 'Secondary interaction', type: 'gradient' },\n {\n name: '--element-action-secondary-hover',\n usage: 'Secondary action background on hover',\n type: 'gradient'\n },\n { name: '--element-action-secondary-text', usage: 'Secondary text color', type: 'color' },\n {\n name: '--element-action-secondary-text-hover',\n usage: 'Secondary text color on hover',\n type: 'color'\n },\n {\n name: '--element-action-secondary-border',\n usage: 'Secondary border color',\n type: 'color'\n },\n {\n name: '--element-action-secondary-border-hover',\n usage: 'Secondary border color on hover',\n type: 'color'\n },\n { name: '--element-action-warning', usage: 'Warning', type: 'gradient' },\n {\n name: '--element-action-warning-hover',\n usage: 'Warning action background on hover',\n type: 'gradient'\n },\n { name: '--element-action-warning-text', usage: 'Warning text color', type: 'color' },\n { name: '--element-action-danger', usage: 'Danger', type: 'gradient' },\n {\n name: '--element-action-danger-hover',\n usage: 'Danger action background on hover',\n type: 'gradient'\n },\n { name: '--element-action-danger-text', usage: 'Danger text color', type: 'color' },\n {\n name: '--element-action-disabled-opacity',\n usage: 'Disabled action opacity',\n type: 'number'\n }\n ]\n },\n {\n name: 'Text',\n description: 'Similarly, categories for typography colors are also defined in this system.',\n properties: [\n { name: '--element-text-primary', usage: 'Primary', type: 'color' },\n { name: '--element-text-secondary', usage: 'Secondary', type: 'color' },\n { name: '--element-text-disabled', usage: 'Disabled', type: 'color' },\n { name: '--element-text-inverse', usage: 'Inverse', type: 'color' },\n { name: '--element-text-active', usage: 'Active', type: 'color' },\n { name: '--element-text-information', usage: 'Informational', type: 'color' },\n { name: '--element-text-success', usage: 'Success', type: 'color' },\n { name: '--element-text-caution', usage: 'Caution', type: 'color' },\n { name: '--element-text-warning', usage: 'Warning', type: 'color' },\n { name: '--element-text-danger', usage: 'Danger', type: 'color' }\n ]\n },\n {\n name: 'Status',\n description:\n 'Status colors are used to describe and/or report on the status of different things.',\n properties: [\n { name: '--element-status-information', usage: 'Informational', type: 'color' },\n {\n name: '--element-status-information-contrast',\n usage: 'Informational contrast',\n type: 'color'\n },\n { name: '--element-status-success', usage: 'Success', type: 'color' },\n { name: '--element-status-success-contrast', usage: 'Success contrast', type: 'color' },\n { name: '--element-status-caution', usage: 'Caution', type: 'color' },\n { name: '--element-status-caution-contrast', usage: 'Caution contrast', type: 'color' },\n { name: '--element-status-warning', usage: 'Warning', type: 'color' },\n { name: '--element-status-warning-contrast', usage: 'Warning contrast', type: 'color' },\n { name: '--element-status-danger', usage: 'Danger', type: 'color' },\n { name: '--element-status-danger-contrast', usage: 'Danger contrast', type: 'color' }\n ]\n },\n {\n name: 'Form feedback icons',\n description: 'Icons that are used to indicate a form item status',\n properties: [{ name: '--element-invalid-feedback-icon', usage: 'Danger', type: 'text' }]\n }\n ]\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { DOCUMENT, EventEmitter, inject, Injectable, PLATFORM_ID, signal } from '@angular/core';\nimport { Observable, of, ReplaySubject, throwError } from 'rxjs';\nimport { map, switchMap, take, tap } from 'rxjs/operators';\n\nimport { SI_THEME_DOM_TARGET } from './si-theme-dom-target';\nimport { SiDefaultThemeStore, SiThemeStore } from './si-theme-store';\nimport {\n ELEMENT_THEME_NAME,\n Theme,\n ThemeColorScheme,\n ThemeColorSchemes,\n ThemeType\n} from './si-theme.model';\n\n@Injectable({ providedIn: 'root' })\nexport class SiThemeService {\n /**\n * The current color scheme. (e.g. light or dark).\n */\n private _resolvedColorScheme: ThemeType | undefined = 'light';\n private resolvedColorSchemeSub = new ReplaySubject<keyof ThemeColorSchemes>(1);\n /**\n * Emits events when the color scheme changes.\n *\n * @defaultValue this.resolvedColorSchemeSub.asObservable()\n */\n readonly resolvedColorScheme$ = this.resolvedColorSchemeSub.asObservable();\n /**\n * The current color scheme. (e.g. light or dark).\n */\n get resolvedColorScheme(): ThemeType | undefined {\n return this._resolvedColorScheme;\n }\n\n /**\n * All available theme names, including element theme name.\n */\n private _themeNames: string[] = [ELEMENT_THEME_NAME];\n private themeNamesSub = new ReplaySubject<string[]>(1);\n /**\n * Emits events when the list of available theme names changes.\n *\n * @defaultValue this.themeNamesSub.asObservable()\n */\n readonly themeNames$ = this.themeNamesSub.asObservable();\n\n /**\n * All available theme names, including element theme name.\n */\n get themeNames(): string[] {\n return this._themeNames;\n }\n\n /**\n * Emits events when the currently applied theme changes. Either by\n * changing to another theme or by re-applying a theme with updated\n * properties. When switching to default theme element, `undefined`\n * is emitted.\n */\n readonly themeChange = new EventEmitter<Theme | undefined>();\n\n /**\n * The name of the theme that is active. Theme name `element` is the default.\n */\n activeThemeName?: string;\n /**\n * Icon overrides by the currently activeTheme.\n * @defaultValue\n * ```\n * {}\n * ```\n */\n readonly themeIcons = signal<Record<string, string>>({});\n\n private themes: Map<string, Theme> = new Map();\n private darkMediaQuery?: MediaQueryList;\n private mediaQueryListener?: () => void;\n private isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private previewTheme?: Theme;\n\n private themeStore =\n inject(SiThemeStore, { optional: true }) ?? new SiDefaultThemeStore(this.isBrowser);\n private document = inject(DOCUMENT);\n private themeTarget = inject(SI_THEME_DOM_TARGET);\n\n constructor() {\n this._resolvedColorScheme = this.themeTarget.element.classList.contains('app--dark')\n ? 'dark'\n : 'light';\n this.resolvedColorScheme$.subscribe(scheme => (this._resolvedColorScheme = scheme));\n this.themeNames$.subscribe(names => (this._themeNames = names));\n\n if (this.isBrowser) {\n this.darkMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n this.mediaQueryListener = () => this.toggleDark(this.darkMediaQuery!.matches);\n }\n\n this.getActiveTheme()\n .pipe(take(1))\n .subscribe({\n next: theme => this.applyThemeStyle(theme, this._resolvedColorScheme),\n error: error => console.error('Cannot load active theme', error)\n });\n\n this.themeStore\n .loadThemeNames()\n .pipe(take(1))\n .subscribe({\n next: names => {\n names.push(ELEMENT_THEME_NAME);\n this.themeNamesSub.next(names);\n },\n error: error => console.error('Cannot load theme names', error)\n });\n }\n\n /**\n * Returns `true` if a theme with the given name is available.\n */\n hasTheme(name: string): boolean {\n return this._themeNames.includes(name);\n }\n\n /**\n * Returns a clone of the theme with the given name or `undefined` if not\n * available or name is `element`.\n * @param name - The name of the theme to be returned.\n * @returns The theme with the given name and `undefined` if name is `element`.\n */\n getTheme(name: string): Observable<Theme | undefined> {\n if (name === ELEMENT_THEME_NAME || !this.hasTheme(name)) {\n return of(undefined);\n }\n\n if (this.themes.has(name)) {\n const theme = this.themes.get(name)!;\n // return a clone to avoid changes as a side effect\n return of(this.cloneTheme(theme));\n }\n\n return this.themeStore.loadTheme(name).pipe(\n tap(theme => {\n if (theme) {\n this.themes.set(theme.name, this.cloneTheme(theme));\n }\n })\n );\n }\n\n /**\n * Loads and returns the currently active theme. Returns undefined if no custom theme is used.\n * @returns A custom theme or `undefined` if the default element theme is used.\n */\n getActiveTheme(): Observable<Theme | undefined> {\n if (this.activeThemeName) {\n return of(this.themes.get(this.activeThemeName));\n }\n return this.themeStore.loadActiveTheme().pipe(\n map(theme => {\n if (theme) {\n this.activeThemeName = theme.name;\n this.themes.set(theme.name, theme);\n this.applyTheme(theme, this._resolvedColorScheme);\n return theme;\n }\n this.activeThemeName = ELEMENT_THEME_NAME;\n return undefined;\n })\n );\n }\n\n /**\n * Adds or updates the given theme in the theme store.\n * @param theme - The theme to be saved.\n * @returns `true` if the theme was saved successfully.\n */\n addOrUpdateTheme(theme: Theme): Observable<boolean> {\n const result = new ReplaySubject<boolean>(1);\n\n this.themeStore.saveTheme(theme).subscribe({\n next: saveResult => {\n if (saveResult) {\n this.themes.set(theme.name, this.cloneTheme(theme));\n // Update list of theme names when this is a new one\n if (!this.hasTheme(theme.name)) {\n const names = this._themeNames.concat(theme.name);\n this.themeNamesSub.next(names);\n }\n }\n result.next(saveResult);\n result.complete();\n },\n error: error => result.error(error),\n complete: () => result.complete()\n });\n return result;\n }\n\n /**\n * Deletes the theme with the given name from the theme store.\n */\n deleteTheme(name: string): Observable<boolean> {\n const result = new ReplaySubject<boolean>(1);\n if (!this.hasTheme(name) || name === ELEMENT_THEME_NAME) {\n result.next(false);\n result.complete();\n } else {\n this.removeThemeCSS(name);\n this.themeStore.deleteTheme(name).subscribe({\n next: deleteResult => {\n if (deleteResult) {\n this.themes.delete(name);\n const names = this._themeNames.filter(themeName => themeName !== name);\n this.themeNamesSub.next(names);\n }\n result.next(deleteResult);\n result.complete();\n },\n error: error => result.error(error),\n complete: () => result.complete()\n });\n }\n return result;\n }\n\n /**\n * Resets the preview theme to the default element theme.\n */\n resetPreview(): void {\n this.previewTheme = { name: '__preview', schemes: { dark: {}, light: {} } };\n this.removeThemeCSS(this.previewTheme.name);\n }\n\n /**\n * Sets the active theme to the given name. If no name is given, the default element theme is used.\n */\n setActiveTheme(name?: string, type?: ThemeType): Observable<boolean> {\n const theType = type ?? this._resolvedColorScheme ?? 'auto';\n const theName = name ?? this.activeThemeName ?? ELEMENT_THEME_NAME;\n\n if (theName === this.activeThemeName) {\n return of(true);\n }\n if (!this.hasTheme(theName)) {\n return of(false);\n }\n\n const result = new ReplaySubject<boolean>(1);\n this.activeThemeName = theName;\n // Make the change in the remove store\n const store =\n theName !== ELEMENT_THEME_NAME\n ? this.themeStore.activateTheme(theName)\n : this.themeStore.deactivateTheme();\n store\n .pipe(\n // On success, load the theme\n switchMap(storeResult => {\n if (storeResult) {\n return this.getTheme(theName);\n } else {\n return throwError(() => 'Cannot change active theme in theme store.');\n }\n }),\n // Only take one to avoid unsubscription issues\n take(1)\n )\n .subscribe({\n next: theme => {\n this.applyTheme(theme, theType);\n result.next(true);\n },\n error: error => {\n console.error(`Activating theme ${name} failed`, error);\n result.next(false);\n },\n complete: () => result.complete()\n });\n return result;\n }\n\n /**\n * Apply `light` or `dark` theme to the configured theme target.\n */\n applyThemeType(type: ThemeType): void {\n if (type === this._resolvedColorScheme || !this.darkMediaQuery || !this.mediaQueryListener) {\n return;\n }\n\n this.darkMediaQuery.removeEventListener('change', this.mediaQueryListener);\n\n if (type === 'light') {\n this.toggleDark(false);\n } else if (type === 'dark') {\n this.toggleDark(true);\n } else {\n this.mediaQueryListener();\n this.darkMediaQuery.addEventListener('change', this.mediaQueryListener);\n }\n }\n\n /**\n * Applies the given theme to the configured theme target. If no theme is given, the active theme is applied.\n */\n applyTheme(theme?: Theme, type?: ThemeType, overwrite?: boolean): void {\n if (theme) {\n this.applyThemeStyle(theme, type, overwrite);\n } else {\n this.getActiveTheme()\n .pipe(take(1))\n .subscribe({\n next: loadedTheme => this.applyThemeStyle(loadedTheme, type),\n error: error => console.error('Cannot load active theme', error)\n });\n }\n }\n\n /**\n * Updates the given property of the preview theme.\n */\n updateProperty(name: string, value: string, type: keyof ThemeColorSchemes): void {\n if (!this.previewTheme) {\n this.resetPreview();\n }\n this.previewTheme!.schemes[type]![name] = value;\n this.createThemeCSS(this.previewTheme!);\n this.themeTarget.forEachElement(element => element.classList.add('theme-__preview'));\n this.dispatchThemeSwitchEvent();\n }\n\n /**\n * Checks if the given theme JSON object is a valid theme.\n */\n isThemeValid(data: unknown): boolean {\n const theme = data as Theme;\n return (\n !!data &&\n typeof data === 'object' &&\n 'name' in data &&\n 'schemes' in data &&\n typeof theme.name === 'string' &&\n typeof theme.schemes === 'object' &&\n this.isThemeTypeValid(theme, 'light') &&\n this.isThemeTypeValid(theme, 'dark')\n );\n }\n\n private isThemeTypeValid(theme: Theme, type: 'light' | 'dark'): boolean {\n return (\n !(type in theme.schemes) ||\n (typeof theme.schemes[type] === 'object' &&\n Object.values(theme.schemes[type] as ThemeColorScheme).every(\n item => typeof item === 'string'\n ) &&\n Object.keys(theme.schemes[type] as ThemeColorScheme).every(\n item => typeof item === 'string'\n ))\n );\n }\n\n private applyThemeStyle(theme?: Theme, type?: ThemeType, overwrite?: boolean): void {\n if (!this.isBrowser) {\n return;\n }\n this.resetPreview();\n\n if (theme && theme.name !== ELEMENT_THEME_NAME && (overwrite || !this.hasThemeCSS(theme))) {\n this.createThemeCSS(theme);\n }\n this.activateTheme(theme);\n\n if (type && type !== this._resolvedColorScheme) {\n this.applyThemeType(type);\n }\n\n this.themeIcons.set(\n Object.fromEntries(Object.entries(theme?.icons ?? {}).map(([key, icon]) => [key, icon]))\n );\n this.themeChange.emit(theme);\n }\n\n private activateTheme(theme?: Theme): void {\n this.themeTarget.forEachElement(element => {\n const classList = element.classList;\n classList.forEach(className => {\n if (className.startsWith('theme-')) {\n classList.remove(className);\n }\n });\n if (theme) {\n classList.add(`theme-${theme.name}`);\n }\n });\n }\n\n private hasThemeCSS(theme: Theme): boolean {\n const id = `__theme-${theme.name}`;\n return !!this.themeTarget.getStyleElement(id);\n }\n\n private createThemeCSS(theme: Theme): void {\n let css = '';\n const themeSelector = this.createThemeSelector(theme.name);\n if (theme.schemes.light) {\n css = this.createThemeVariantCSS(css, themeSelector, theme.schemes.light);\n }\n if (theme.schemes.dark) {\n css = this.createThemeVariantCSS(\n css,\n this.createThemeSelector(theme.name, true),\n theme.schemes.dark\n );\n }\n\n this.removeThemeCSS(theme.name);\n const cssElement = this.document.createElement('style');\n cssElement.id = `__theme-${theme.name}`;\n cssElement.textContent = css;\n\n this.themeTarget.appendStyleElement(cssElement);\n }\n\n private createThemeSelector(name: string, dark: boolean = false): string {\n const classes = `.theme-${name}${dark ? '.app--dark' : ''}`;\n return this.themeTarget.rootSelector === ':host'\n ? `:host(${classes})`\n : `${this.themeTarget.rootSelector}${classes}`;\n }\n\n private createThemeVariantCSS(css: string, selector: string, scheme: ThemeColorScheme): string {\n css += `${selector} {\\n`;\n for (const key of Object.keys(scheme)) {\n css += `${key}: ${scheme[key]};\\n`;\n }\n css += '}\\n';\n return css;\n }\n\n private removeThemeCSS(name: string): void {\n const id = `__theme-${name}`;\n this.themeTarget.getStyleElement(id)?.remove();\n this.themeTarget.forEachElement(element => element.classList.remove(`theme-${name}`));\n }\n\n private toggleDark(dark: boolean): void {\n if (!this.isBrowser) {\n return;\n }\n\n this.themeTarget.forEachElement(element => element.classList.toggle('app--dark', dark));\n const colorScheme = dark ? 'dark' : 'light';\n this.themeTarget.updateColorScheme(colorScheme);\n this.resolvedColorSchemeSub.next(colorScheme);\n this.dispatchThemeSwitchEvent();\n }\n\n private cloneTheme(theme: Theme): Theme {\n const clone: Theme = { ...theme, schemes: {} };\n if (theme.schemes.light) {\n clone.schemes.light = { ...theme.schemes.light };\n }\n if (theme.schemes.dark) {\n clone.schemes.dark = { ...theme.schemes.dark };\n }\n return clone;\n }\n\n private dispatchThemeSwitchEvent(): void {\n window.dispatchEvent(\n new CustomEvent('theme-switch', {\n detail: {\n dark: this._resolvedColorScheme === 'dark',\n colorScheme: this._resolvedColorScheme\n }\n })\n );\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, PLATFORM_ID, signal, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { fromEvent, map } from 'rxjs';\n\nimport { SI_THEME_DOM_TARGET } from './si-theme-dom-target';\n\n/**\n * Returns a signal that reflects whether the current Element theme is dark (`true`) or light\n * (`false`). The signal reacts to `theme-switch` events dispatched on `window`.\n *\n * @experimental\n * @returns A boolean signal — `true` when the active theme is dark\n * @throws When called outside of an Angular injection context\n */\nexport const injectIsDarkTheme = (): Signal<boolean> => {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) {\n return signal(false);\n }\n const targetDom = inject(SI_THEME_DOM_TARGET);\n\n return toSignal(\n fromEvent<CustomEvent<{ dark: boolean }>>(window, 'theme-switch').pipe(map(e => e.detail.dark)),\n {\n initialValue: targetDom.element.classList.contains('app--dark')\n }\n );\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-theme-store';\nexport * from './si-theme-dom-target';\nexport * from './si-theme.service';\nexport * from './si-theme.model';\nexport * from './si-theme-signals';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map"],"mappings":";;;;;;;;AAAA;;;AAGG;AAKH;;;;;AAKG;MACmB,YAAY,CAAA;AAiDjC;AAEM,MAAM,0BAA0B,GAAG;AAOpC,MAAO,mBAAoB,SAAQ,YAAY,CAAA;AAC3C,IAAA,SAAS;AAEjB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC5B,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;IAC5B;IAEA,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,IAAI,C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AAI,CAAC;AACnB;AACF,SAAA,CAAC,CACH;IACH;uGA7cW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA;;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACnBlC;;;AAGG;AAQH;;;;;;;AAOG;AACI,MAAM,iBAAiB,GAAG,MAAsB;IACrD,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE;AAC3C,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB;AACA,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAE7C,OAAO,QAAQ,CACb,SAAS,CAAiC,MAAM,EAAE,cAAc,CAAC,CAAC,IAAI,CAACA,KAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAC/F;QACE,YAAY,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW;AAC/D,KAAA,CACF;AACH;;AC/BA;;;AAGG;;ACHH;;AAEG;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, signal, inject, ElementRef, afterRenderEffect, computed, TemplateRef, ChangeDetectionStrategy, Component, DestroyRef,
|
|
3
|
-
import { calculateOverlayArrowPosition,
|
|
2
|
+
import { input, signal, inject, ElementRef, afterRenderEffect, computed, TemplateRef, ChangeDetectionStrategy, Component, DestroyRef, Injector, effect, inputBinding, afterNextRender, PLATFORM_ID, Injectable, booleanAttribute, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { calculateOverlayArrowPosition, positions, isRTL, defaultConnectedOverlayScrollStrategy } from '@siemens/element-ng/common';
|
|
4
4
|
import { OverlayRef, Overlay } from '@angular/cdk/overlay';
|
|
5
5
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
6
|
-
import { NgTemplateOutlet, NgComponentOutlet, isPlatformBrowser } from '@angular/common';
|
|
6
|
+
import { NgTemplateOutlet, NgComponentOutlet, DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
7
7
|
import { Subject, fromEvent, timer } from 'rxjs';
|
|
8
8
|
import { filter, takeUntil, delayWhen } from 'rxjs/operators';
|
|
9
9
|
import { SiTranslatePipe } from '@siemens/element-translate-ng/translate';
|
|
@@ -115,11 +115,14 @@ class NoopTooltipRef {
|
|
|
115
115
|
*/
|
|
116
116
|
class BrowserTooltipRef {
|
|
117
117
|
config;
|
|
118
|
+
document = inject(DOCUMENT);
|
|
118
119
|
destroyRef = inject(DestroyRef);
|
|
120
|
+
injector = inject(Injector);
|
|
119
121
|
destroy$ = new Subject();
|
|
120
122
|
isFocused = false;
|
|
121
123
|
isHovered = false;
|
|
122
124
|
overlayRef;
|
|
125
|
+
positionStrategy;
|
|
123
126
|
positionSubscription;
|
|
124
127
|
canShowEffect;
|
|
125
128
|
placementEffect;
|
|
@@ -204,7 +207,20 @@ class BrowserTooltipRef {
|
|
|
204
207
|
this.hide();
|
|
205
208
|
}
|
|
206
209
|
getOrCreateOverlay() {
|
|
207
|
-
|
|
210
|
+
if (!this.overlayRef) {
|
|
211
|
+
this.positionStrategy = this.config.overlay
|
|
212
|
+
.position()
|
|
213
|
+
.flexibleConnectedTo(this.config.element)
|
|
214
|
+
.withPush(false)
|
|
215
|
+
.withGrowAfterOpen(true)
|
|
216
|
+
.withFlexibleDimensions(false)
|
|
217
|
+
.withPositions(positions[this.getPlacement()]);
|
|
218
|
+
this.overlayRef = this.config.overlay.create({
|
|
219
|
+
positionStrategy: this.positionStrategy,
|
|
220
|
+
scrollStrategy: this.config.scrollStrategy?.() ?? this.config.overlay.scrollStrategies.reposition(),
|
|
221
|
+
direction: isRTL() ? 'rtl' : 'ltr'
|
|
222
|
+
});
|
|
223
|
+
}
|
|
208
224
|
return this.overlayRef;
|
|
209
225
|
}
|
|
210
226
|
show() {
|
|
@@ -225,17 +241,29 @@ class BrowserTooltipRef {
|
|
|
225
241
|
inputBinding('tooltipContext', this.config.tooltipContext)
|
|
226
242
|
]);
|
|
227
243
|
const tooltipRef = overlayRef.attach(toolTipPortal);
|
|
228
|
-
|
|
244
|
+
// Wait until rendering so an Escape press that opens the tooltip (e.g. by
|
|
245
|
+
// restoring focus) does not also dismiss it as the same event bubbles.
|
|
246
|
+
afterNextRender(() => {
|
|
247
|
+
if (tooltipRef.hostView.destroyed) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
fromEvent(this.document, 'keydown')
|
|
251
|
+
.pipe(filter(event => event.key === 'Escape'), takeUntil(overlayRef.detachments()), takeUntil(this.destroy$))
|
|
252
|
+
.subscribe(() => {
|
|
253
|
+
this.isFocused = false;
|
|
254
|
+
this.isHovered = false;
|
|
255
|
+
this.hide();
|
|
256
|
+
});
|
|
257
|
+
}, { injector: this.injector });
|
|
229
258
|
this.positionSubscription?.unsubscribe();
|
|
230
|
-
this.positionSubscription = positionStrategy?.positionChanges.subscribe(change => tooltipRef.instance.updateTooltipPosition(change, this.config.element));
|
|
259
|
+
this.positionSubscription = this.positionStrategy?.positionChanges.subscribe(change => tooltipRef.instance.updateTooltipPosition(change, this.config.element));
|
|
231
260
|
}
|
|
232
261
|
getPlacement() {
|
|
233
262
|
return this.config.placement();
|
|
234
263
|
}
|
|
235
264
|
updatePlacement(placement) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
positionStrategy.withPositions(getOverlayPositions(this.config.element, placement));
|
|
265
|
+
if (this.positionStrategy) {
|
|
266
|
+
this.positionStrategy.withPositions(positions[placement]);
|
|
239
267
|
this.overlayRef?.updatePosition();
|
|
240
268
|
}
|
|
241
269
|
}
|
|
@@ -367,6 +395,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
367
395
|
}]
|
|
368
396
|
}] });
|
|
369
397
|
|
|
398
|
+
/**
|
|
399
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
400
|
+
* SPDX-License-Identifier: MIT
|
|
401
|
+
*/
|
|
402
|
+
/**
|
|
403
|
+
* Adds a tooltip containing the host element's text when that text is truncated.
|
|
404
|
+
*/
|
|
405
|
+
class SiTooltipOverflowDirective {
|
|
406
|
+
elementRef = inject(ElementRef);
|
|
407
|
+
tooltipService = inject(SiTooltipService);
|
|
408
|
+
element = this.elementRef.nativeElement;
|
|
409
|
+
constructor() {
|
|
410
|
+
this.tooltipService.createTooltip({
|
|
411
|
+
element: this.elementRef,
|
|
412
|
+
placement: () => 'auto',
|
|
413
|
+
/*
|
|
414
|
+
* `canShow` is evaluated everytime before the tooltip is eventually rendered.
|
|
415
|
+
* So there is no need for any listener.
|
|
416
|
+
* It also updates the `tooltipText`.
|
|
417
|
+
*/
|
|
418
|
+
canShow: () => this.canShow(),
|
|
419
|
+
tooltip: () => this.elementRef,
|
|
420
|
+
tooltipContext: () => undefined
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
canShow() {
|
|
424
|
+
// text-truncate uses horizontal ellipsis. Font metrics can cause vertical
|
|
425
|
+
// overflow even when the full label is visible.
|
|
426
|
+
return this.element.scrollWidth > this.element.clientWidth;
|
|
427
|
+
}
|
|
428
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiTooltipOverflowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
429
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SiTooltipOverflowDirective, isStandalone: true, selector: "[siTooltipOverflow]", host: { classAttribute: "text-truncate" }, providers: [SiTooltipService], ngImport: i0 });
|
|
430
|
+
}
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiTooltipOverflowDirective, decorators: [{
|
|
432
|
+
type: Directive,
|
|
433
|
+
args: [{
|
|
434
|
+
selector: '[siTooltipOverflow]',
|
|
435
|
+
providers: [SiTooltipService],
|
|
436
|
+
host: {
|
|
437
|
+
class: 'text-truncate'
|
|
438
|
+
}
|
|
439
|
+
}]
|
|
440
|
+
}], ctorParameters: () => [] });
|
|
441
|
+
|
|
370
442
|
/**
|
|
371
443
|
* Copyright (c) Siemens 2016 - 2026
|
|
372
444
|
* SPDX-License-Identifier: MIT
|
|
@@ -376,5 +448,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
376
448
|
* Generated bundle index. Do not edit.
|
|
377
449
|
*/
|
|
378
450
|
|
|
379
|
-
export { SiTooltipDirective, SiTooltipModule, SiTooltipService };
|
|
451
|
+
export { SiTooltipDirective, SiTooltipModule, SiTooltipOverflowDirective, SiTooltipService };
|
|
380
452
|
//# sourceMappingURL=siemens-element-ng-tooltip.mjs.map
|