@siemens/element-ng 49.8.0 → 49.10.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 (61) hide show
  1. package/fesm2022/siemens-element-ng-application-header.mjs +4 -4
  2. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
  3. package/fesm2022/siemens-element-ng-avatar.mjs +2 -2
  4. package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
  5. package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +6 -2
  6. package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
  7. package/fesm2022/siemens-element-ng-chat-messages.mjs +43 -19
  8. package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
  9. package/fesm2022/siemens-element-ng-circle-status.mjs +2 -2
  10. package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
  11. package/fesm2022/siemens-element-ng-color-picker.mjs +9 -4
  12. package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
  13. package/fesm2022/siemens-element-ng-dashboard.mjs +467 -13
  14. package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
  15. package/fesm2022/siemens-element-ng-datatable.mjs +10 -19
  16. package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
  17. package/fesm2022/siemens-element-ng-date-range-filter.mjs +2 -2
  18. package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
  19. package/fesm2022/siemens-element-ng-datepicker.mjs +6 -6
  20. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  21. package/fesm2022/siemens-element-ng-file-uploader.mjs +2 -2
  22. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  23. package/fesm2022/siemens-element-ng-form.mjs +8 -10
  24. package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
  25. package/fesm2022/siemens-element-ng-header-dropdown.mjs +19 -55
  26. package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
  27. package/fesm2022/siemens-element-ng-main-detail-container.mjs +2 -2
  28. package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
  29. package/fesm2022/siemens-element-ng-menu.mjs +5 -7
  30. package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
  31. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +110 -51
  32. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
  33. package/fesm2022/siemens-element-ng-navbar-vertical.mjs +25 -29
  34. package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
  35. package/fesm2022/siemens-element-ng-notification-item.mjs +2 -2
  36. package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
  37. package/fesm2022/siemens-element-ng-select.mjs +455 -48
  38. package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
  39. package/fesm2022/siemens-element-ng-side-panel.mjs +2 -2
  40. package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
  41. package/fesm2022/siemens-element-ng-slider.mjs +2 -2
  42. package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
  43. package/fesm2022/siemens-element-ng-status-toggle.mjs +2 -2
  44. package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
  45. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  46. package/fesm2022/siemens-element-ng-tree-view.mjs +52 -30
  47. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  48. package/package.json +3 -3
  49. package/template-i18n.json +5 -0
  50. package/types/siemens-element-ng-breadcrumb-router.d.ts +6 -2
  51. package/types/siemens-element-ng-chat-messages.d.ts +6 -3
  52. package/types/siemens-element-ng-color-picker.d.ts +7 -2
  53. package/types/siemens-element-ng-dashboard.d.ts +360 -5
  54. package/types/siemens-element-ng-datatable.d.ts +0 -1
  55. package/types/siemens-element-ng-form.d.ts +1 -1
  56. package/types/siemens-element-ng-header-dropdown.d.ts +0 -8
  57. package/types/siemens-element-ng-navbar-vertical-next.d.ts +39 -9
  58. package/types/siemens-element-ng-navbar-vertical.d.ts +2 -1
  59. package/types/siemens-element-ng-select.d.ts +241 -2
  60. package/types/siemens-element-ng-translate.d.ts +5 -0
  61. package/types/siemens-element-ng-tree-view.d.ts +4 -5
@@ -1,14 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, input, booleanAttribute, output, signal, computed, inject, ElementRef, Component, DestroyRef, viewChild, ChangeDetectorRef, DOCUMENT, NgModule, Directive, model } from '@angular/core';
2
+ import { Injectable, input, booleanAttribute, output, signal, computed, inject, ElementRef, Component, DestroyRef, viewChild, ChangeDetectorRef, DOCUMENT, NgModule, Directive, model, ChangeDetectionStrategy } from '@angular/core';
3
3
  import { elementZoom, elementPinch, elementRight2, elementSortUp, elementSortDown } from '@siemens/element-icons';
4
4
  import { SiCardComponent, SiCardHeaderComponent } from '@siemens/element-ng/card';
5
5
  import { addIcons, SiIconComponent, SiStatusIconComponent } from '@siemens/element-ng/icon';
6
6
  import { t, SiTranslatePipe, injectSiTranslateService } from '@siemens/element-translate-ng/translate';
7
- import { BehaviorSubject, switchMap, of, map } from 'rxjs';
7
+ import { BehaviorSubject, Subject, takeUntil, switchMap, of, map } from 'rxjs';
8
8
  import * as i1 from '@angular/cdk/portal';
9
9
  import { CdkPortalOutlet, DomPortal, PortalModule } from '@angular/cdk/portal';
10
- import { ViewportScroller } from '@angular/common';
11
- import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-interop';
10
+ import { ViewportScroller, NgTemplateOutlet } from '@angular/common';
11
+ import { takeUntilDestroyed, outputToObservable, toSignal, toObservable } from '@angular/core/rxjs-interop';
12
12
  import { ScrollbarHelper } from '@siemens/element-ng/common';
13
13
  import { ResizeObserverService, BOOTSTRAP_BREAKPOINTS } from '@siemens/element-ng/resize-observer';
14
14
  import { SiLinkDirective } from '@siemens/element-ng/link';
@@ -277,6 +277,7 @@ class SiDashboardComponent {
277
277
  hideMenubarComputed = computed(() => this.hideMenubar() || this.hideMenubarInternal(), ...(ngDevMode ? [{ debugName: "hideMenubarComputed" }] : []));
278
278
  _isExpanded = false;
279
279
  scrollPosition = [0, 0];
280
+ reinitCards$ = new Subject();
280
281
  cards = [];
281
282
  expandedPortalOutlet = viewChild.required('expandedPortalOutlet', {
282
283
  read: CdkPortalOutlet
@@ -296,6 +297,7 @@ class SiDashboardComponent {
296
297
  this.dashboardService.cards$
297
298
  .pipe(takeUntilDestroyed())
298
299
  .subscribe(cards => this.subscribeToCards(cards));
300
+ this.destroyRef.onDestroy(() => this.reinitCards$.complete());
299
301
  }
300
302
  ngOnChanges(changes) {
301
303
  if (changes.enableExpandInteractions) {
@@ -317,6 +319,7 @@ class SiDashboardComponent {
317
319
  this.initCards();
318
320
  }
319
321
  initCards() {
322
+ this.reinitCards$.next();
320
323
  for (const card of this.cards) {
321
324
  // We only enforce expand if the dashboard value is true, otherwise we would remove the individual
322
325
  // card settings.
@@ -324,7 +327,9 @@ class SiDashboardComponent {
324
327
  if (enableExpandInteractions) {
325
328
  card.enableExpandInteractionInternal.set(enableExpandInteractions);
326
329
  }
327
- card.expandChange.subscribe((expand) => {
330
+ outputToObservable(card.expandChange)
331
+ .pipe(takeUntil(this.reinitCards$), takeUntilDestroyed(this.destroyRef))
332
+ .subscribe((expand) => {
328
333
  if (expand) {
329
334
  this.expand(card);
330
335
  }
@@ -377,8 +382,6 @@ class SiDashboardComponent {
377
382
  }
378
383
  // Restore the dashboard and scroll to previous position
379
384
  this.restoreDashboard();
380
- // Subscribe to cards events again
381
- this.initCards();
382
385
  this.cdRef.markForCheck();
383
386
  }
384
387
  /**
@@ -492,7 +495,7 @@ class SiWidgetBaseDirective {
492
495
  // eslint-disable-next-line @angular-eslint/no-input-rename
493
496
  alias: 'showLoadingIndicator',
494
497
  transform: booleanAttribute });
495
- showLoadingIndicatorInternal = signal(false, ...(ngDevMode ? [{ debugName: "showLoadingIndicatorInternal" }] : []));
498
+ showLoadingIndicatorInternal = signal(undefined, ...(ngDevMode ? [{ debugName: "showLoadingIndicatorInternal" }] : []));
496
499
  showLoadingIndicator = computed(() => {
497
500
  return this.showLoadingIndicatorInternal() ?? this.showLoadingIndicatorInput();
498
501
  }, ...(ngDevMode ? [{ debugName: "showLoadingIndicator" }] : []));
@@ -504,16 +507,22 @@ class SiWidgetBaseDirective {
504
507
  */
505
508
  initialLoadingIndicatorDebounceTime = input(300, ...(ngDevMode ? [{ debugName: "initialLoadingIndicatorDebounceTime" }] : []));
506
509
  loadingTimer;
507
- ngOnChanges(changes) {
508
- if (!this.disableAutoLoadingIndicator() &&
509
- !changes.value?.firstChange &&
510
- changes.value?.currentValue) {
510
+ ngOnChanges() {
511
+ if (this.disableAutoLoadingIndicator()) {
512
+ return;
513
+ }
514
+ if (this.value()) {
511
515
  if (this.loadingTimer) {
512
516
  clearTimeout(this.loadingTimer);
513
517
  this.loadingTimer = undefined;
514
518
  }
515
519
  this.showLoadingIndicatorInternal.set(false);
516
520
  }
521
+ else {
522
+ // Data was removed: yield control back to the `showLoadingIndicator` input
523
+ // so callers can drive the loader manually.
524
+ this.showLoadingIndicatorInternal.set(undefined);
525
+ }
517
526
  }
518
527
  ngOnInit() {
519
528
  if (!this.disableAutoLoadingIndicator() && !this.value()) {
@@ -1161,6 +1170,451 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
1161
1170
  args: [{ selector: 'si-value-widget', imports: [SiCardComponent, SiLinkDirective, SiTranslatePipe, SiValueWidgetBodyComponent], template: "<si-card\n class=\"h-100\"\n [class]=\"accentClass()\"\n [heading]=\"heading()\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [imgSrc]=\"imgSrc()\"\n [imgDir]=\"imgDir()\"\n [imgAlt]=\"imgAlt()\"\n [imgObjectFit]=\"imgObjectFit()\"\n [imgObjectPosition]=\"imgObjectPosition()\"\n>\n <div class=\"card-body\" body>\n <si-value-widget-body\n [value]=\"value()\"\n [unit]=\"unit()\"\n [icon]=\"icon()\"\n [status]=\"status()\"\n [description]=\"description()\"\n [disableAutoLoadingIndicator]=\"disableAutoLoadingIndicator()\"\n [showLoadingIndicator]=\"showLoadingIndicator()\"\n [initialLoadingIndicatorDebounceTime]=\"initialLoadingIndicatorDebounceTime()\"\n />\n </div>\n @let linkObject = link();\n @if (linkObject) {\n <div class=\"card-footer\" footer>\n <a [siLink]=\"linkObject\">{{ linkObject.title | translate }}</a>\n </div>\n }\n</si-card>\n" }]
1162
1171
  }], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], primaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryActions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], disableAutoLoadingIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableAutoLoadingIndicator", required: false }] }], showLoadingIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLoadingIndicator", required: false }] }], initialLoadingIndicatorDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialLoadingIndicatorDebounceTime", required: false }] }], imgSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgSrc", required: false }] }], imgAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgAlt", required: false }] }], imgDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgDir", required: false }] }], imgObjectFit: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgObjectFit", required: false }] }], imgObjectPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgObjectPosition", required: false }] }], accentLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "accentLine", required: false }] }] } });
1163
1172
 
1173
+ /**
1174
+ * Copyright (c) Siemens 2016 - 2026
1175
+ * SPDX-License-Identifier: MIT
1176
+ */
1177
+ /**
1178
+ * Maps a semantic {@link SiWeatherIcon} to a renderable illustration. The
1179
+ * library ships a {@link SiDefaultWeatherIconResolver} that maps the built-in
1180
+ * {@link SiWeatherCondition} vocabulary to Element icons, so the widget renders
1181
+ * a reasonable illustration out of the box. Applications can override the
1182
+ * mapping or add provider-specific vocabularies by registering their own
1183
+ * resolver:
1184
+ *
1185
+ * @example
1186
+ * ```ts
1187
+ * @Injectable({ providedIn: 'root' })
1188
+ * export class MyWeatherIconResolver extends SiWeatherIconResolver {
1189
+ * override resolve(icon: SiWeatherIcon): SiWeatherIconResolution | null {
1190
+ * // ...
1191
+ * }
1192
+ * }
1193
+ * ```
1194
+ *
1195
+ * Resolvers SHOULD return `null` for unknown or `'unknown'` conditions so the
1196
+ * widget can skip the illustration.
1197
+ */
1198
+ class SiWeatherIconResolver {
1199
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherIconResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1200
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherIconResolver, providedIn: 'root', useFactory: () => inject(SiDefaultWeatherIconResolver) });
1201
+ }
1202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherIconResolver, decorators: [{
1203
+ type: Injectable,
1204
+ args: [{
1205
+ providedIn: 'root',
1206
+ useFactory: () => inject(SiDefaultWeatherIconResolver)
1207
+ }]
1208
+ }] });
1209
+ const DEFAULT_CONDITION_ICONS = {
1210
+ clear: 'element-sun',
1211
+ clouds: 'element-cloudy',
1212
+ rain: 'element-rain',
1213
+ storm: 'element-storm',
1214
+ wind: 'element-wind',
1215
+ unknown: null
1216
+ };
1217
+ /**
1218
+ * Built-in resolver that maps the library's minimal
1219
+ * {@link SiWeatherCondition} vocabulary to Element icons:
1220
+ *
1221
+ * - `clear` → `element-sun`
1222
+ * - `clouds` → `element-cloudy`
1223
+ * - `rain` → `element-rain`
1224
+ * - `storm` → `element-storm`
1225
+ * - `wind` → `element-wind`
1226
+ * - `unknown` → no illustration
1227
+ *
1228
+ * Unknown tokens fall through to `null` so callers can register a more
1229
+ * capable resolver without losing the built-in fallback.
1230
+ */
1231
+ class SiDefaultWeatherIconResolver extends SiWeatherIconResolver {
1232
+ resolve(icon) {
1233
+ if (!icon.condition) {
1234
+ return null;
1235
+ }
1236
+ const mapped = DEFAULT_CONDITION_ICONS[icon.condition];
1237
+ if (!mapped) {
1238
+ return null;
1239
+ }
1240
+ return { icon: mapped, alt: icon.alt };
1241
+ }
1242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiDefaultWeatherIconResolver, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1243
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiDefaultWeatherIconResolver, providedIn: 'root' });
1244
+ }
1245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiDefaultWeatherIconResolver, decorators: [{
1246
+ type: Injectable,
1247
+ args: [{ providedIn: 'root' }]
1248
+ }] });
1249
+
1250
+ /**
1251
+ * Copyright (c) Siemens 2016 - 2026
1252
+ * SPDX-License-Identifier: MIT
1253
+ */
1254
+ /**
1255
+ * Renders a weather illustration as either an `<si-icon>` (when the resolver
1256
+ * yields an icon name) or an `<img>` (when a raster `src` is provided).
1257
+ * Owns the icon resolution logic and the alt-text fallback chain. Not exported
1258
+ * from the public entry point.
1259
+ *
1260
+ * @internal
1261
+ */
1262
+ class SiWeatherWidgetIllustrationComponent {
1263
+ illustration = input(...(ngDevMode ? [undefined, { debugName: "illustration" }] : []));
1264
+ condition = input(...(ngDevMode ? [undefined, { debugName: "condition" }] : []));
1265
+ altFallback = input(...(ngDevMode ? [undefined, { debugName: "altFallback" }] : []));
1266
+ /** @defaultValue 'lg' */
1267
+ size = input('lg', ...(ngDevMode ? [{ debugName: "size" }] : []));
1268
+ resolver = inject(SiWeatherIconResolver);
1269
+ defaultAlt = t(() => $localize `:@@SI_WEATHER_WIDGET.ILLUSTRATION_ALT:Weather illustration`);
1270
+ resolved = computed(() => {
1271
+ const illustration = this.illustration();
1272
+ if (!illustration) {
1273
+ return null;
1274
+ }
1275
+ const icon = typeof illustration === 'string' ? { src: illustration } : illustration;
1276
+ let resolution;
1277
+ if (icon.src) {
1278
+ resolution = { src: icon.src, alt: icon.alt };
1279
+ }
1280
+ else {
1281
+ resolution = this.resolver.resolve(icon);
1282
+ }
1283
+ if (!resolution || (!resolution.icon && !resolution.src)) {
1284
+ return null;
1285
+ }
1286
+ return {
1287
+ icon: resolution.icon,
1288
+ src: resolution.icon ? undefined : resolution.src,
1289
+ alt: resolution.alt ?? icon.alt ?? this.condition() ?? this.altFallback() ?? this.defaultAlt
1290
+ };
1291
+ }, ...(ngDevMode ? [{ debugName: "resolved" }] : []));
1292
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetIllustrationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1293
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiWeatherWidgetIllustrationComponent, isStandalone: true, selector: "si-weather-widget-illustration", inputs: { illustration: { classPropertyName: "illustration", publicName: "illustration", isSignal: true, isRequired: false, transformFunction: null }, condition: { classPropertyName: "condition", publicName: "condition", isSignal: true, isRequired: false, transformFunction: null }, altFallback: { classPropertyName: "altFallback", publicName: "altFallback", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.si-weather-widget-illustration-sm": "size() === 'sm'", "class.si-weather-widget-illustration-md": "size() === 'md'", "class.si-weather-widget-illustration-lg": "size() === 'lg'" } }, ngImport: i0, template: `
1294
+ @let res = resolved();
1295
+ @if (res) {
1296
+ @if (res.icon) {
1297
+ <si-icon
1298
+ role="img"
1299
+ class="si-weather-widget-illustration"
1300
+ [icon]="res.icon"
1301
+ [attr.aria-label]="res.alt | translate"
1302
+ />
1303
+ } @else if (res.src) {
1304
+ <img class="si-weather-widget-illustration" [src]="res.src" [alt]="res.alt | translate" />
1305
+ }
1306
+ }
1307
+ `, isInline: true, styles: [":host{display:contents}:host img{flex:0 0 auto;object-fit:contain}:host(.si-weather-widget-illustration-sm) img,:host(.si-weather-widget-illustration-sm) si-icon{inline-size:1.25rem;block-size:1.25rem}:host(.si-weather-widget-illustration-sm) si-icon{font-size:1.25rem;line-height:1;inline-size:auto;block-size:auto}:host(.si-weather-widget-illustration-md) img,:host(.si-weather-widget-illustration-md) si-icon{inline-size:1.5rem;block-size:1.5rem}:host(.si-weather-widget-illustration-md) si-icon{font-size:1.5rem;line-height:1;inline-size:auto;block-size:auto}:host(.si-weather-widget-illustration-lg) img,:host(.si-weather-widget-illustration-lg) si-icon{inline-size:2.5rem;block-size:2.5rem}:host(.si-weather-widget-illustration-lg) si-icon{font-size:2.5rem;line-height:1;inline-size:auto;block-size:auto}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1308
+ }
1309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetIllustrationComponent, decorators: [{
1310
+ type: Component,
1311
+ args: [{ selector: 'si-weather-widget-illustration', imports: [SiIconComponent, SiTranslatePipe], template: `
1312
+ @let res = resolved();
1313
+ @if (res) {
1314
+ @if (res.icon) {
1315
+ <si-icon
1316
+ role="img"
1317
+ class="si-weather-widget-illustration"
1318
+ [icon]="res.icon"
1319
+ [attr.aria-label]="res.alt | translate"
1320
+ />
1321
+ } @else if (res.src) {
1322
+ <img class="si-weather-widget-illustration" [src]="res.src" [alt]="res.alt | translate" />
1323
+ }
1324
+ }
1325
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
1326
+ '[class.si-weather-widget-illustration-sm]': "size() === 'sm'",
1327
+ '[class.si-weather-widget-illustration-md]': "size() === 'md'",
1328
+ '[class.si-weather-widget-illustration-lg]': "size() === 'lg'"
1329
+ }, styles: [":host{display:contents}:host img{flex:0 0 auto;object-fit:contain}:host(.si-weather-widget-illustration-sm) img,:host(.si-weather-widget-illustration-sm) si-icon{inline-size:1.25rem;block-size:1.25rem}:host(.si-weather-widget-illustration-sm) si-icon{font-size:1.25rem;line-height:1;inline-size:auto;block-size:auto}:host(.si-weather-widget-illustration-md) img,:host(.si-weather-widget-illustration-md) si-icon{inline-size:1.5rem;block-size:1.5rem}:host(.si-weather-widget-illustration-md) si-icon{font-size:1.5rem;line-height:1;inline-size:auto;block-size:auto}:host(.si-weather-widget-illustration-lg) img,:host(.si-weather-widget-illustration-lg) si-icon{inline-size:2.5rem;block-size:2.5rem}:host(.si-weather-widget-illustration-lg) si-icon{font-size:2.5rem;line-height:1;inline-size:auto;block-size:auto}\n"] }]
1330
+ }], propDecorators: { illustration: [{ type: i0.Input, args: [{ isSignal: true, alias: "illustration", required: false }] }], condition: [{ type: i0.Input, args: [{ isSignal: true, alias: "condition", required: false }] }], altFallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "altFallback", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
1331
+
1332
+ /**
1333
+ * Copyright (c) Siemens 2016 - 2026
1334
+ * SPDX-License-Identifier: MIT
1335
+ */
1336
+ /**
1337
+ * Forecast block of the weather widget. Renders either a vertical grid (with
1338
+ * optional extra data columns) or a horizontal day strip depending on
1339
+ * {@link layout}. Not exported from the public entry point.
1340
+ *
1341
+ * @internal
1342
+ */
1343
+ class SiWeatherWidgetForecastComponent {
1344
+ forecast = input.required(...(ngDevMode ? [{ debugName: "forecast" }] : []));
1345
+ /** @defaultValue 'vertical' */
1346
+ layout = input('vertical', ...(ngDevMode ? [{ debugName: "layout" }] : []));
1347
+ forecastLabel = input(...(ngDevMode ? [undefined, { debugName: "forecastLabel" }] : []));
1348
+ columns = computed(() => {
1349
+ const cols = this.forecast().columns;
1350
+ if (!cols) {
1351
+ return [];
1352
+ }
1353
+ // Hard cap at 5 extra columns; matches the breakpoint set declared in
1354
+ // the stylesheet. Authors should pass at most 5 columns and pick the most
1355
+ // important ones — the row will become unreadable beyond that.
1356
+ return cols.slice(0, 5);
1357
+ }, ...(ngDevMode ? [{ debugName: "columns" }] : []));
1358
+ columnValue(column, index) {
1359
+ return column.values?.[index];
1360
+ }
1361
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetForecastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1362
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiWeatherWidgetForecastComponent, isStandalone: true, selector: "si-weather-widget-forecast", inputs: { forecast: { classPropertyName: "forecast", publicName: "forecast", isSignal: true, isRequired: true, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, forecastLabel: { classPropertyName: "forecastLabel", publicName: "forecastLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let days = forecast().days;\n@let cols = columns();\n@let illustrationSize = layout() === 'vertical' ? 'sm' : 'md';\n\n<div\n class=\"si-weather-widget-forecast\"\n [class.si-weather-widget-vertical]=\"layout() === 'vertical'\"\n [class.si-weather-widget-horizontal]=\"layout() === 'horizontal'\"\n [attr.aria-label]=\"forecastLabel() | translate\"\n>\n @if (layout() === 'horizontal') {\n @for (day of days; track $index) {\n <div\n class=\"si-weather-widget-forecast-day\"\n [class.si-weather-widget-forecast-day-2]=\"$index === 1\"\n [class.si-weather-widget-forecast-day-3]=\"$index === 2\"\n [class.si-weather-widget-forecast-day-4]=\"$index === 3\"\n [class.si-weather-widget-forecast-day-5]=\"$index === 4\"\n >\n <div class=\"si-weather-widget-forecast-day-label\">{{ day.label | translate }}</div>\n <si-weather-widget-illustration\n [size]=\"illustrationSize\"\n [illustration]=\"day.illustration\"\n [altFallback]=\"day.label\"\n />\n <div class=\"si-weather-widget-forecast-day-range\">\n <span class=\"si-weather-widget-forecast-range-min\">{{ day.minTemperature }}</span>\n <span class=\"si-weather-widget-forecast-range-max\">{{ day.maxTemperature }}</span>\n </div>\n </div>\n }\n } @else {\n <ul\n class=\"si-weather-widget-forecast-list\"\n role=\"list\"\n [style.--si-weather-forecast-extras]=\"cols.length\"\n >\n @for (day of days; track $index; let i = $index) {\n <li class=\"si-weather-widget-forecast-row\">\n <span class=\"si-weather-widget-forecast-day-label\">\n {{ day.label | translate }}\n </span>\n <span class=\"si-weather-widget-forecast-illustration-cell\">\n <si-weather-widget-illustration\n [size]=\"illustrationSize\"\n [illustration]=\"day.illustration\"\n [altFallback]=\"day.label\"\n />\n </span>\n @for (col of cols; track $index; let extraIdx = $index) {\n <span\n class=\"si-weather-widget-forecast-extra\"\n role=\"img\"\n [class.si-weather-widget-forecast-extra-1]=\"extraIdx === 0\"\n [class.si-weather-widget-forecast-extra-2]=\"extraIdx === 1\"\n [class.si-weather-widget-forecast-extra-3]=\"extraIdx === 2\"\n [class.si-weather-widget-forecast-extra-4]=\"extraIdx === 3\"\n [class.si-weather-widget-forecast-extra-5]=\"extraIdx === 4\"\n [attr.aria-label]=\"(col.label | translate) + ': ' + (columnValue(col, i) ?? '')\"\n >\n @if (col.icon) {\n <si-icon\n class=\"icon si-weather-widget-forecast-extra-icon\"\n aria-hidden=\"true\"\n [icon]=\"col.icon\"\n />\n }\n <span aria-hidden=\"true\">{{ columnValue(col, i) ?? '' }}</span>\n </span>\n }\n <span class=\"si-weather-widget-forecast-range-cell\">\n <span class=\"si-weather-widget-forecast-range\">\n <span class=\"si-weather-widget-forecast-range-min\">{{ day.minTemperature }}</span>\n <span class=\"si-weather-widget-forecast-range-max\">{{ day.maxTemperature }}</span>\n </span>\n </span>\n </li>\n }\n </ul>\n }\n</div>\n", styles: [".si-weather-widget-forecast-range,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-range{font-size:1rem;font-weight:400;line-height:1.25}.si-weather-widget-forecast-day-range{display:flex;gap:4px}.si-weather-widget-forecast-range-min{color:var(--element-text-secondary)}.si-weather-widget-forecast-range-max{color:var(--element-text-primary);font-weight:600}@property --si-weather-forecast-extras{syntax: \"<integer>\"; inherits: true; initial-value: 0;}@property --si-weather-forecast-extras-cap{syntax: \"<integer>\"; inherits: true; initial-value: 5;}.si-weather-widget-forecast-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:max-content 1.25rem repeat(min(var(--si-weather-forecast-extras),var(--si-weather-forecast-extras-cap)),1fr auto) 1fr auto;row-gap:8px;align-items:center;inline-size:100%;container-type:inline-size}@container (max-width: 635px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 4}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}@container (max-width: 539px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 3}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-4,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}@container (max-width: 443px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 2}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-3,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-4,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}@container (max-width: 347px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 1}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-2,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-3,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-4,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}@container (max-width: 251px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 0}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-1,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-2,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-3,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-4,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}.si-weather-widget-forecast-row{display:contents}.si-weather-widget-forecast-day-label{color:var(--element-text-secondary);margin-block:8px;white-space:nowrap}.si-weather-widget-forecast.si-weather-widget-vertical .si-weather-widget-forecast-day-label{padding-inline-end:16px;grid-column-start:1}.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-label{text-align:center}.si-weather-widget-forecast-illustration-cell{display:inline-flex;align-items:center;justify-content:center;margin-block:6px;grid-column-start:2}.si-weather-widget-forecast-extra{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}.si-weather-widget-forecast-extra-1{grid-column-start:4}.si-weather-widget-forecast-extra-2{grid-column-start:6}.si-weather-widget-forecast-extra-3{grid-column-start:8}.si-weather-widget-forecast-extra-4{grid-column-start:10}.si-weather-widget-forecast-extra-5{grid-column-start:12}.si-weather-widget-forecast-range-cell{white-space:nowrap;grid-column-end:-1}.si-weather-widget-forecast-range{display:inline-flex;align-items:baseline;justify-content:flex-end;gap:4px;margin-block:6px}:host{display:contents}.si-weather-widget-forecast{display:flex;flex-wrap:wrap;gap:8px}.si-weather-widget-forecast.si-weather-widget-vertical{display:block}.si-weather-widget-forecast.si-weather-widget-horizontal{flex-wrap:nowrap;overflow:hidden;container-type:inline-size}@container (max-width: 351px){.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-5{display:none}}@container (max-width: 279px){.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-4,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-5{display:none}}@container (max-width: 207px){.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-3,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-4,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-5{display:none}}@container (max-width: 135px){.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-2,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-3,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-4,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-5{display:none}}.si-weather-widget-forecast-day{flex:1 1 0;min-inline-size:64px;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day{padding-block:2px}.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-label{margin-block:0}.si-weather-widget-forecast-extra-icon{display:inline-flex;vertical-align:middle;margin-inline-end:2px;color:var(--element-text-secondary);margin-block:6px}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiWeatherWidgetIllustrationComponent, selector: "si-weather-widget-illustration", inputs: ["illustration", "condition", "altFallback", "size"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1363
+ }
1364
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetForecastComponent, decorators: [{
1365
+ type: Component,
1366
+ args: [{ selector: 'si-weather-widget-forecast', imports: [SiIconComponent, SiTranslatePipe, SiWeatherWidgetIllustrationComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let days = forecast().days;\n@let cols = columns();\n@let illustrationSize = layout() === 'vertical' ? 'sm' : 'md';\n\n<div\n class=\"si-weather-widget-forecast\"\n [class.si-weather-widget-vertical]=\"layout() === 'vertical'\"\n [class.si-weather-widget-horizontal]=\"layout() === 'horizontal'\"\n [attr.aria-label]=\"forecastLabel() | translate\"\n>\n @if (layout() === 'horizontal') {\n @for (day of days; track $index) {\n <div\n class=\"si-weather-widget-forecast-day\"\n [class.si-weather-widget-forecast-day-2]=\"$index === 1\"\n [class.si-weather-widget-forecast-day-3]=\"$index === 2\"\n [class.si-weather-widget-forecast-day-4]=\"$index === 3\"\n [class.si-weather-widget-forecast-day-5]=\"$index === 4\"\n >\n <div class=\"si-weather-widget-forecast-day-label\">{{ day.label | translate }}</div>\n <si-weather-widget-illustration\n [size]=\"illustrationSize\"\n [illustration]=\"day.illustration\"\n [altFallback]=\"day.label\"\n />\n <div class=\"si-weather-widget-forecast-day-range\">\n <span class=\"si-weather-widget-forecast-range-min\">{{ day.minTemperature }}</span>\n <span class=\"si-weather-widget-forecast-range-max\">{{ day.maxTemperature }}</span>\n </div>\n </div>\n }\n } @else {\n <ul\n class=\"si-weather-widget-forecast-list\"\n role=\"list\"\n [style.--si-weather-forecast-extras]=\"cols.length\"\n >\n @for (day of days; track $index; let i = $index) {\n <li class=\"si-weather-widget-forecast-row\">\n <span class=\"si-weather-widget-forecast-day-label\">\n {{ day.label | translate }}\n </span>\n <span class=\"si-weather-widget-forecast-illustration-cell\">\n <si-weather-widget-illustration\n [size]=\"illustrationSize\"\n [illustration]=\"day.illustration\"\n [altFallback]=\"day.label\"\n />\n </span>\n @for (col of cols; track $index; let extraIdx = $index) {\n <span\n class=\"si-weather-widget-forecast-extra\"\n role=\"img\"\n [class.si-weather-widget-forecast-extra-1]=\"extraIdx === 0\"\n [class.si-weather-widget-forecast-extra-2]=\"extraIdx === 1\"\n [class.si-weather-widget-forecast-extra-3]=\"extraIdx === 2\"\n [class.si-weather-widget-forecast-extra-4]=\"extraIdx === 3\"\n [class.si-weather-widget-forecast-extra-5]=\"extraIdx === 4\"\n [attr.aria-label]=\"(col.label | translate) + ': ' + (columnValue(col, i) ?? '')\"\n >\n @if (col.icon) {\n <si-icon\n class=\"icon si-weather-widget-forecast-extra-icon\"\n aria-hidden=\"true\"\n [icon]=\"col.icon\"\n />\n }\n <span aria-hidden=\"true\">{{ columnValue(col, i) ?? '' }}</span>\n </span>\n }\n <span class=\"si-weather-widget-forecast-range-cell\">\n <span class=\"si-weather-widget-forecast-range\">\n <span class=\"si-weather-widget-forecast-range-min\">{{ day.minTemperature }}</span>\n <span class=\"si-weather-widget-forecast-range-max\">{{ day.maxTemperature }}</span>\n </span>\n </span>\n </li>\n }\n </ul>\n }\n</div>\n", styles: [".si-weather-widget-forecast-range,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-range{font-size:1rem;font-weight:400;line-height:1.25}.si-weather-widget-forecast-day-range{display:flex;gap:4px}.si-weather-widget-forecast-range-min{color:var(--element-text-secondary)}.si-weather-widget-forecast-range-max{color:var(--element-text-primary);font-weight:600}@property --si-weather-forecast-extras{syntax: \"<integer>\"; inherits: true; initial-value: 0;}@property --si-weather-forecast-extras-cap{syntax: \"<integer>\"; inherits: true; initial-value: 5;}.si-weather-widget-forecast-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:max-content 1.25rem repeat(min(var(--si-weather-forecast-extras),var(--si-weather-forecast-extras-cap)),1fr auto) 1fr auto;row-gap:8px;align-items:center;inline-size:100%;container-type:inline-size}@container (max-width: 635px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 4}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}@container (max-width: 539px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 3}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-4,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}@container (max-width: 443px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 2}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-3,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-4,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}@container (max-width: 347px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 1}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-2,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-3,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-4,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}@container (max-width: 251px){.si-weather-widget-forecast-list{--si-weather-forecast-extras-cap: 0}.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-1,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-2,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-3,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-4,.si-weather-widget-forecast-list .si-weather-widget-forecast-extra-5{display:none}}.si-weather-widget-forecast-row{display:contents}.si-weather-widget-forecast-day-label{color:var(--element-text-secondary);margin-block:8px;white-space:nowrap}.si-weather-widget-forecast.si-weather-widget-vertical .si-weather-widget-forecast-day-label{padding-inline-end:16px;grid-column-start:1}.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-label{text-align:center}.si-weather-widget-forecast-illustration-cell{display:inline-flex;align-items:center;justify-content:center;margin-block:6px;grid-column-start:2}.si-weather-widget-forecast-extra{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}.si-weather-widget-forecast-extra-1{grid-column-start:4}.si-weather-widget-forecast-extra-2{grid-column-start:6}.si-weather-widget-forecast-extra-3{grid-column-start:8}.si-weather-widget-forecast-extra-4{grid-column-start:10}.si-weather-widget-forecast-extra-5{grid-column-start:12}.si-weather-widget-forecast-range-cell{white-space:nowrap;grid-column-end:-1}.si-weather-widget-forecast-range{display:inline-flex;align-items:baseline;justify-content:flex-end;gap:4px;margin-block:6px}:host{display:contents}.si-weather-widget-forecast{display:flex;flex-wrap:wrap;gap:8px}.si-weather-widget-forecast.si-weather-widget-vertical{display:block}.si-weather-widget-forecast.si-weather-widget-horizontal{flex-wrap:nowrap;overflow:hidden;container-type:inline-size}@container (max-width: 351px){.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-5{display:none}}@container (max-width: 279px){.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-4,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-5{display:none}}@container (max-width: 207px){.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-3,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-4,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-5{display:none}}@container (max-width: 135px){.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-2,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-3,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-4,.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-5{display:none}}.si-weather-widget-forecast-day{flex:1 1 0;min-inline-size:64px;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day{padding-block:2px}.si-weather-widget-forecast.si-weather-widget-horizontal .si-weather-widget-forecast-day-label{margin-block:0}.si-weather-widget-forecast-extra-icon{display:inline-flex;vertical-align:middle;margin-inline-end:2px;color:var(--element-text-secondary);margin-block:6px}\n"] }]
1367
+ }], propDecorators: { forecast: [{ type: i0.Input, args: [{ isSignal: true, alias: "forecast", required: true }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], forecastLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "forecastLabel", required: false }] }] } });
1368
+
1369
+ /**
1370
+ * Copyright (c) Siemens 2016 - 2026
1371
+ * SPDX-License-Identifier: MIT
1372
+ */
1373
+ /**
1374
+ * Skeleton loading state for the `<si-weather-widget-body>`. Not exported from
1375
+ * the public entry point.
1376
+ *
1377
+ * @internal
1378
+ */
1379
+ class SiWeatherWidgetSkeletonComponent {
1380
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1381
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.8", type: SiWeatherWidgetSkeletonComponent, isStandalone: true, selector: "si-weather-widget-skeleton", ngImport: i0, template: `
1382
+ <div class="si-weather-widget-skeleton-row">
1383
+ <div class="si-weather-widget-skeleton-value si-skeleton"></div>
1384
+ <div class="si-weather-widget-skeleton-col">
1385
+ <div class="si-weather-widget-skeleton-illustration si-skeleton"></div>
1386
+ <div class="si-weather-widget-skeleton-line si-skeleton"></div>
1387
+ <div class="si-weather-widget-skeleton-line si-skeleton"></div>
1388
+ </div>
1389
+ </div>
1390
+ `, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:6px}.si-weather-widget-skeleton-row{display:flex;align-items:stretch;justify-content:space-between;gap:8px}.si-weather-widget-skeleton-col{display:flex;flex:0 0 auto;flex-direction:column;align-items:flex-end;gap:6px}.si-weather-widget-skeleton-illustration{flex:0 0 auto;inline-size:40px;block-size:40px;border-radius:50%}.si-weather-widget-skeleton-value{flex:0 0 auto;align-self:stretch;inline-size:5.3125rem;block-size:auto}.si-weather-widget-skeleton-line{block-size:.875rem;inline-size:7.5rem}.si-weather-widget-skeleton-line:last-child{inline-size:5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1391
+ }
1392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetSkeletonComponent, decorators: [{
1393
+ type: Component,
1394
+ args: [{ selector: 'si-weather-widget-skeleton', template: `
1395
+ <div class="si-weather-widget-skeleton-row">
1396
+ <div class="si-weather-widget-skeleton-value si-skeleton"></div>
1397
+ <div class="si-weather-widget-skeleton-col">
1398
+ <div class="si-weather-widget-skeleton-illustration si-skeleton"></div>
1399
+ <div class="si-weather-widget-skeleton-line si-skeleton"></div>
1400
+ <div class="si-weather-widget-skeleton-line si-skeleton"></div>
1401
+ </div>
1402
+ </div>
1403
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:flex;flex-direction:column;gap:6px}.si-weather-widget-skeleton-row{display:flex;align-items:stretch;justify-content:space-between;gap:8px}.si-weather-widget-skeleton-col{display:flex;flex:0 0 auto;flex-direction:column;align-items:flex-end;gap:6px}.si-weather-widget-skeleton-illustration{flex:0 0 auto;inline-size:40px;block-size:40px;border-radius:50%}.si-weather-widget-skeleton-value{flex:0 0 auto;align-self:stretch;inline-size:5.3125rem;block-size:auto}.si-weather-widget-skeleton-line{block-size:.875rem;inline-size:7.5rem}.si-weather-widget-skeleton-line:last-child{inline-size:5rem}\n"] }]
1404
+ }] });
1405
+
1406
+ /**
1407
+ * Copyright (c) Siemens 2016 - 2026
1408
+ * SPDX-License-Identifier: MIT
1409
+ */
1410
+ const LAYOUT_CLASS = {
1411
+ vertical: 'si-weather-widget-vertical',
1412
+ horizontal: 'si-weather-widget-horizontal',
1413
+ compact: 'si-weather-widget-compact'
1414
+ };
1415
+ /**
1416
+ * Marker directive that types the `let-` context of the shared range
1417
+ * `<ng-template>` so its body gets full type checking instead of `any`.
1418
+ *
1419
+ * @internal
1420
+ */
1421
+ class SiWeatherRangeDefDirective {
1422
+ static ngTemplateContextGuard(_dir, ctx) {
1423
+ return true;
1424
+ }
1425
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherRangeDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1426
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: SiWeatherRangeDefDirective, isStandalone: true, selector: "[siWeatherRangeDef]", ngImport: i0 });
1427
+ }
1428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherRangeDefDirective, decorators: [{
1429
+ type: Directive,
1430
+ args: [{ selector: '[siWeatherRangeDef]' }]
1431
+ }] });
1432
+ /**
1433
+ * Body of the `<si-weather-widget>`. Useful for compositions that do not need
1434
+ * the surrounding `<si-card>` chrome (e.g. embedding the weather inside a
1435
+ * custom container).
1436
+ *
1437
+ * Data is supplied as a composite {@link value} payload of type
1438
+ * {@link SiWeatherWidgetData}.
1439
+ *
1440
+ * The body delegates illustration resolution to the injected
1441
+ * {@link SiWeatherIconResolver}. The library ships a default resolver that
1442
+ * maps the built-in {@link SiWeatherCondition} vocabulary to Element icons.
1443
+ *
1444
+ * In the `vertical` layout the forecast list responsively hides additional
1445
+ * data columns (wind, humidity, …) via pure CSS container queries when the
1446
+ * widget becomes too narrow. See `si-weather-widget-body.component.scss` for
1447
+ * the thresholds.
1448
+ */
1449
+ class SiWeatherWidgetBodyComponent extends SiWidgetBaseDirective {
1450
+ /**
1451
+ * Visual layout. {@link SiWeatherWidgetLayout}.
1452
+ *
1453
+ * @defaultValue 'vertical'
1454
+ */
1455
+ layout = input('vertical', ...(ngDevMode ? [{ debugName: "layout" }] : []));
1456
+ /**
1457
+ * Optional location label, shown inside the body in the compact layout only.
1458
+ * The non-compact layouts render the location via the `<si-card>` heading
1459
+ * managed by `SiWeatherWidgetComponent`.
1460
+ */
1461
+ location = input(...(ngDevMode ? [undefined, { debugName: "location" }] : []));
1462
+ /**
1463
+ * Accessible label for the additional data list.
1464
+ *
1465
+ * @defaultValue
1466
+ * ```
1467
+ * t(() => $localize`:@@SI_WEATHER_WIDGET.METRICS_LABEL:Additional weather data`)
1468
+ * ```
1469
+ */
1470
+ metricsLabel = input(t(() => $localize `:@@SI_WEATHER_WIDGET.METRICS_LABEL:Additional weather data`), ...(ngDevMode ? [{ debugName: "metricsLabel" }] : []));
1471
+ /**
1472
+ * Accessible label for the forecast section.
1473
+ *
1474
+ * @defaultValue
1475
+ * ```
1476
+ * t(() => $localize`:@@SI_WEATHER_WIDGET.FORECAST_LABEL:Weather forecast`)
1477
+ * ```
1478
+ */
1479
+ forecastLabel = input(t(() => $localize `:@@SI_WEATHER_WIDGET.FORECAST_LABEL:Weather forecast`), ...(ngDevMode ? [{ debugName: "forecastLabel" }] : []));
1480
+ layoutClass = computed(() => LAYOUT_CLASS[this.layout()], ...(ngDevMode ? [{ debugName: "layoutClass" }] : []));
1481
+ isCompact = computed(() => this.layout() === 'compact', ...(ngDevMode ? [{ debugName: "isCompact" }] : []));
1482
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetBodyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1483
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiWeatherWidgetBodyComponent, isStandalone: true, selector: "si-weather-widget-body", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, metricsLabel: { classPropertyName: "metricsLabel", publicName: "metricsLabel", isSignal: true, isRequired: false, transformFunction: null }, forecastLabel: { classPropertyName: "forecastLabel", publicName: "forecastLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "layoutClass()" } }, usesInheritance: true, ngImport: i0, template: "@let data = value();\n@let current = data?.current;\n@let metrics = data?.metrics;\n@let forecast = data?.forecast;\n@let loading = showLoadingIndicator();\n\n@if (loading) {\n <si-weather-widget-skeleton />\n} @else if (current) {\n @if (isCompact()) {\n <div class=\"si-weather-widget-today\">\n <si-weather-widget-illustration\n size=\"sm\"\n [illustration]=\"current.illustration\"\n [condition]=\"current.condition\"\n [altFallback]=\"current.illustrationAlt\"\n />\n <div class=\"si-weather-widget-today-info\">\n @if (location()) {\n <div class=\"si-weather-widget-location\">{{ location() | translate }}</div>\n }\n <ng-container *ngTemplateOutlet=\"rangeTpl; context: { $implicit: current }\" />\n </div>\n </div>\n } @else {\n <div class=\"si-weather-widget-today\">\n <div class=\"si-weather-widget-temperature\">{{ current.temperature }}</div>\n <div class=\"si-weather-widget-today-info\">\n <si-weather-widget-illustration\n size=\"lg\"\n [illustration]=\"current.illustration\"\n [condition]=\"current.condition\"\n [altFallback]=\"current.illustrationAlt\"\n />\n @if (current.condition) {\n <div class=\"si-weather-widget-condition\">{{ current.condition | translate }}</div>\n }\n <ng-container *ngTemplateOutlet=\"rangeTpl; context: { $implicit: current }\" />\n </div>\n </div>\n }\n\n @if (metrics?.length) {\n <ul class=\"si-weather-widget-metrics\" [attr.aria-label]=\"metricsLabel() | translate\">\n @for (metric of metrics; track $index) {\n <li class=\"si-weather-widget-metric\">\n <span class=\"si-weather-widget-metric-label\">{{ metric.label | translate }}</span>\n <span class=\"si-weather-widget-metric-value\">{{ metric.value }}</span>\n </li>\n }\n </ul>\n }\n\n @if (!isCompact() && forecast && forecast.days.length) {\n <si-weather-widget-forecast\n [forecast]=\"forecast\"\n [layout]=\"layout() === 'horizontal' ? 'horizontal' : 'vertical'\"\n [forecastLabel]=\"forecastLabel()\"\n />\n }\n}\n\n<ng-template #rangeTpl let-c siWeatherRangeDef>\n @if (c.minTemperature !== undefined || c.maxTemperature !== undefined) {\n <div class=\"si-weather-widget-range\">\n @if (c.minTemperature !== undefined) {\n <span class=\"si-weather-widget-range-min\">{{ c.minTemperature }}</span>\n }\n @if (c.maxTemperature !== undefined) {\n <span class=\"si-weather-widget-range-max\">{{ c.maxTemperature }}</span>\n }\n </div>\n }\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;gap:32px;block-size:100%}.si-weather-widget-condition,:host.si-weather-widget-vertical .si-weather-widget-range,:host.si-weather-widget-horizontal .si-weather-widget-range{font-size:1rem;font-weight:400;line-height:1.25}.si-weather-widget-today{display:flex;align-items:start;gap:8px}:host.si-weather-widget-vertical .si-weather-widget-today,:host.si-weather-widget-horizontal .si-weather-widget-today{justify-content:space-between}:host.si-weather-widget-vertical .si-weather-widget-today-info,:host.si-weather-widget-horizontal .si-weather-widget-today-info{align-items:flex-end;text-align:end}.si-weather-widget-today-info{display:flex;flex-direction:column;gap:2px;min-inline-size:0}.si-weather-widget-temperature{font-size:3.5rem;font-weight:400;line-height:1.2857142857;color:var(--element-text-primary)}.si-weather-widget-condition{color:var(--element-text-primary)}.si-weather-widget-location{font-weight:600;color:var(--element-text-primary)}.si-weather-widget-range{display:flex;gap:4px}.si-weather-widget-range-min{color:var(--element-text-secondary)}.si-weather-widget-range-max{color:var(--element-text-primary);font-weight:600}.si-weather-widget-metrics{list-style:none;padding:0;display:flex;flex-direction:column;gap:8px;margin-block:0;inline-size:100%}.si-weather-widget-metric{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.si-weather-widget-metric-label{color:var(--element-text-secondary)}.si-weather-widget-metric-value{color:var(--element-text-primary);font-weight:600;text-align:end}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SiWeatherRangeDefDirective, selector: "[siWeatherRangeDef]" }, { kind: "component", type: SiWeatherWidgetForecastComponent, selector: "si-weather-widget-forecast", inputs: ["forecast", "layout", "forecastLabel"] }, { kind: "component", type: SiWeatherWidgetIllustrationComponent, selector: "si-weather-widget-illustration", inputs: ["illustration", "condition", "altFallback", "size"] }, { kind: "component", type: SiWeatherWidgetSkeletonComponent, selector: "si-weather-widget-skeleton" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1484
+ }
1485
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetBodyComponent, decorators: [{
1486
+ type: Component,
1487
+ args: [{ selector: 'si-weather-widget-body', imports: [
1488
+ NgTemplateOutlet,
1489
+ SiTranslatePipe,
1490
+ SiWeatherRangeDefDirective,
1491
+ SiWeatherWidgetForecastComponent,
1492
+ SiWeatherWidgetIllustrationComponent,
1493
+ SiWeatherWidgetSkeletonComponent
1494
+ ], changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'layoutClass()' }, template: "@let data = value();\n@let current = data?.current;\n@let metrics = data?.metrics;\n@let forecast = data?.forecast;\n@let loading = showLoadingIndicator();\n\n@if (loading) {\n <si-weather-widget-skeleton />\n} @else if (current) {\n @if (isCompact()) {\n <div class=\"si-weather-widget-today\">\n <si-weather-widget-illustration\n size=\"sm\"\n [illustration]=\"current.illustration\"\n [condition]=\"current.condition\"\n [altFallback]=\"current.illustrationAlt\"\n />\n <div class=\"si-weather-widget-today-info\">\n @if (location()) {\n <div class=\"si-weather-widget-location\">{{ location() | translate }}</div>\n }\n <ng-container *ngTemplateOutlet=\"rangeTpl; context: { $implicit: current }\" />\n </div>\n </div>\n } @else {\n <div class=\"si-weather-widget-today\">\n <div class=\"si-weather-widget-temperature\">{{ current.temperature }}</div>\n <div class=\"si-weather-widget-today-info\">\n <si-weather-widget-illustration\n size=\"lg\"\n [illustration]=\"current.illustration\"\n [condition]=\"current.condition\"\n [altFallback]=\"current.illustrationAlt\"\n />\n @if (current.condition) {\n <div class=\"si-weather-widget-condition\">{{ current.condition | translate }}</div>\n }\n <ng-container *ngTemplateOutlet=\"rangeTpl; context: { $implicit: current }\" />\n </div>\n </div>\n }\n\n @if (metrics?.length) {\n <ul class=\"si-weather-widget-metrics\" [attr.aria-label]=\"metricsLabel() | translate\">\n @for (metric of metrics; track $index) {\n <li class=\"si-weather-widget-metric\">\n <span class=\"si-weather-widget-metric-label\">{{ metric.label | translate }}</span>\n <span class=\"si-weather-widget-metric-value\">{{ metric.value }}</span>\n </li>\n }\n </ul>\n }\n\n @if (!isCompact() && forecast && forecast.days.length) {\n <si-weather-widget-forecast\n [forecast]=\"forecast\"\n [layout]=\"layout() === 'horizontal' ? 'horizontal' : 'vertical'\"\n [forecastLabel]=\"forecastLabel()\"\n />\n }\n}\n\n<ng-template #rangeTpl let-c siWeatherRangeDef>\n @if (c.minTemperature !== undefined || c.maxTemperature !== undefined) {\n <div class=\"si-weather-widget-range\">\n @if (c.minTemperature !== undefined) {\n <span class=\"si-weather-widget-range-min\">{{ c.minTemperature }}</span>\n }\n @if (c.maxTemperature !== undefined) {\n <span class=\"si-weather-widget-range-max\">{{ c.maxTemperature }}</span>\n }\n </div>\n }\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;gap:32px;block-size:100%}.si-weather-widget-condition,:host.si-weather-widget-vertical .si-weather-widget-range,:host.si-weather-widget-horizontal .si-weather-widget-range{font-size:1rem;font-weight:400;line-height:1.25}.si-weather-widget-today{display:flex;align-items:start;gap:8px}:host.si-weather-widget-vertical .si-weather-widget-today,:host.si-weather-widget-horizontal .si-weather-widget-today{justify-content:space-between}:host.si-weather-widget-vertical .si-weather-widget-today-info,:host.si-weather-widget-horizontal .si-weather-widget-today-info{align-items:flex-end;text-align:end}.si-weather-widget-today-info{display:flex;flex-direction:column;gap:2px;min-inline-size:0}.si-weather-widget-temperature{font-size:3.5rem;font-weight:400;line-height:1.2857142857;color:var(--element-text-primary)}.si-weather-widget-condition{color:var(--element-text-primary)}.si-weather-widget-location{font-weight:600;color:var(--element-text-primary)}.si-weather-widget-range{display:flex;gap:4px}.si-weather-widget-range-min{color:var(--element-text-secondary)}.si-weather-widget-range-max{color:var(--element-text-primary);font-weight:600}.si-weather-widget-metrics{list-style:none;padding:0;display:flex;flex-direction:column;gap:8px;margin-block:0;inline-size:100%}.si-weather-widget-metric{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.si-weather-widget-metric-label{color:var(--element-text-secondary)}.si-weather-widget-metric-value{color:var(--element-text-primary);font-weight:600;text-align:end}\n"] }]
1495
+ }], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], location: [{ type: i0.Input, args: [{ isSignal: true, alias: "location", required: false }] }], metricsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "metricsLabel", required: false }] }], forecastLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "forecastLabel", required: false }] }] } });
1496
+
1497
+ /**
1498
+ * Copyright (c) Siemens 2016 - 2026
1499
+ * SPDX-License-Identifier: MIT
1500
+ */
1501
+ /**
1502
+ * Dashboard widget for current weather conditions, additional metrics and an
1503
+ * optional multi-day forecast.
1504
+ *
1505
+ * The widget supports three layouts (see {@link SiWeatherWidgetLayout}):
1506
+ *
1507
+ * - `vertical` (default): full vertical card with `<si-card>` heading,
1508
+ * illustration, today block, optional additional data and an optional
1509
+ * forecast table with up to five extra columns.
1510
+ * - `horizontal`: wider card with the today block laid out side by side and a
1511
+ * horizontal forecast strip below. The forecast SHOULD contain at least three
1512
+ * days for a visually balanced layout.
1513
+ * - `compact`: condensed variant without a card header. The {@link location} is
1514
+ * rendered next to the illustration. The forecast is not shown.
1515
+ *
1516
+ * Data is supplied as a composite {@link value} payload of type
1517
+ * {@link SiWeatherWidgetData}.
1518
+ *
1519
+ * Weather illustrations are resolved by an optional `SiWeatherIconResolver`
1520
+ * that application developers register. Without a resolver the widget only
1521
+ * renders illustrations when callers pass a direct `illustration.src`.
1522
+ */
1523
+ class SiWeatherWidgetComponent {
1524
+ /**
1525
+ * Card heading text. Used as the card header in `vertical` and `horizontal`
1526
+ * layouts. In the `compact` layout, the location is rendered inside the body
1527
+ * instead and this input is ignored.
1528
+ */
1529
+ heading = input(...(ngDevMode ? [undefined, { debugName: "heading" }] : []));
1530
+ /**
1531
+ * Location displayed next to the illustration in the `compact` layout. Has
1532
+ * no effect in `vertical` or `horizontal` layouts; use {@link heading} there.
1533
+ */
1534
+ location = input(...(ngDevMode ? [undefined, { debugName: "location" }] : []));
1535
+ /**
1536
+ * Visual layout. {@link SiWeatherWidgetLayout}.
1537
+ *
1538
+ * @defaultValue 'vertical'
1539
+ */
1540
+ layout = input('vertical', ...(ngDevMode ? [{ debugName: "layout" }] : []));
1541
+ /**
1542
+ * Composite weather payload of type {@link SiWeatherWidgetData}.
1543
+ */
1544
+ value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
1545
+ /**
1546
+ * Input list of primary action items. Supports up to **4** actions and omits additional ones.
1547
+ *
1548
+ * @defaultValue []
1549
+ */
1550
+ primaryActions = input([], ...(ngDevMode ? [{ debugName: "primaryActions" }] : []));
1551
+ /**
1552
+ * Input list of secondary action items.
1553
+ *
1554
+ * @defaultValue []
1555
+ */
1556
+ secondaryActions = input([], ...(ngDevMode ? [{ debugName: "secondaryActions" }] : []));
1557
+ /**
1558
+ * Option to disable automatic start of skeleton loading indication.
1559
+ *
1560
+ * @defaultValue false
1561
+ */
1562
+ disableAutoLoadingIndicator = input(false, { ...(ngDevMode ? { debugName: "disableAutoLoadingIndicator" } : {}), transform: booleanAttribute });
1563
+ /**
1564
+ * Input to start and stop the skeleton loading indication.
1565
+ *
1566
+ * @defaultValue false
1567
+ */
1568
+ showLoadingIndicator = input(false, { ...(ngDevMode ? { debugName: "showLoadingIndicator" } : {}), transform: booleanAttribute });
1569
+ /**
1570
+ * Initial delay time in milliseconds before enabling loading indicator.
1571
+ * Only used once initially during construction.
1572
+ *
1573
+ * @defaultValue 300
1574
+ */
1575
+ initialLoadingIndicatorDebounceTime = input(300, ...(ngDevMode ? [{ debugName: "initialLoadingIndicatorDebounceTime" }] : []));
1576
+ /**
1577
+ * Image source for the card.
1578
+ */
1579
+ imgSrc = input(...(ngDevMode ? [undefined, { debugName: "imgSrc" }] : []));
1580
+ /**
1581
+ * Alt text for a provided image.
1582
+ */
1583
+ imgAlt = input(...(ngDevMode ? [undefined, { debugName: "imgAlt" }] : []));
1584
+ /**
1585
+ * Defines if an image is placed on top or start (left) of the card.
1586
+ *
1587
+ * @defaultValue 'vertical'
1588
+ */
1589
+ imgDir = input('vertical', ...(ngDevMode ? [{ debugName: "imgDir" }] : []));
1590
+ /**
1591
+ * Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property.
1592
+ *
1593
+ * @defaultValue 'scale-down'
1594
+ */
1595
+ imgObjectFit = input('scale-down', ...(ngDevMode ? [{ debugName: "imgObjectFit" }] : []));
1596
+ /**
1597
+ * Sets the image [object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) CSS property.
1598
+ */
1599
+ imgObjectPosition = input(...(ngDevMode ? [undefined, { debugName: "imgObjectPosition" }] : []));
1600
+ /**
1601
+ * Optional accent line.
1602
+ */
1603
+ accentLine = input(...(ngDevMode ? [undefined, { debugName: "accentLine" }] : []));
1604
+ accentClass = computed(() => {
1605
+ const accentLine = this.accentLine();
1606
+ return accentLine ? 'accent-' + accentLine : '';
1607
+ }, ...(ngDevMode ? [{ debugName: "accentClass" }] : []));
1608
+ cardHeading = computed(() => this.layout() === 'compact' ? undefined : this.heading(), ...(ngDevMode ? [{ debugName: "cardHeading" }] : []));
1609
+ bodyLocation = computed(() => this.layout() === 'compact' ? this.location() : undefined, ...(ngDevMode ? [{ debugName: "bodyLocation" }] : []));
1610
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1611
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: SiWeatherWidgetComponent, isStandalone: true, selector: "si-weather-widget", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, primaryActions: { classPropertyName: "primaryActions", publicName: "primaryActions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, disableAutoLoadingIndicator: { classPropertyName: "disableAutoLoadingIndicator", publicName: "disableAutoLoadingIndicator", isSignal: true, isRequired: false, transformFunction: null }, showLoadingIndicator: { classPropertyName: "showLoadingIndicator", publicName: "showLoadingIndicator", isSignal: true, isRequired: false, transformFunction: null }, initialLoadingIndicatorDebounceTime: { classPropertyName: "initialLoadingIndicatorDebounceTime", publicName: "initialLoadingIndicatorDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, imgSrc: { classPropertyName: "imgSrc", publicName: "imgSrc", isSignal: true, isRequired: false, transformFunction: null }, imgAlt: { classPropertyName: "imgAlt", publicName: "imgAlt", isSignal: true, isRequired: false, transformFunction: null }, imgDir: { classPropertyName: "imgDir", publicName: "imgDir", isSignal: true, isRequired: false, transformFunction: null }, imgObjectFit: { classPropertyName: "imgObjectFit", publicName: "imgObjectFit", isSignal: true, isRequired: false, transformFunction: null }, imgObjectPosition: { classPropertyName: "imgObjectPosition", publicName: "imgObjectPosition", isSignal: true, isRequired: false, transformFunction: null }, accentLine: { classPropertyName: "accentLine", publicName: "accentLine", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "si-weather-widget" }, ngImport: i0, template: "<si-card\n class=\"h-100\"\n [class]=\"accentClass()\"\n [heading]=\"cardHeading()\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [imgSrc]=\"imgSrc()\"\n [imgDir]=\"imgDir()\"\n [imgAlt]=\"imgAlt()\"\n [imgObjectFit]=\"imgObjectFit()\"\n [imgObjectPosition]=\"imgObjectPosition()\"\n>\n <div class=\"card-body\" body>\n <si-weather-widget-body\n [layout]=\"layout()\"\n [value]=\"value()\"\n [location]=\"bodyLocation()\"\n [disableAutoLoadingIndicator]=\"disableAutoLoadingIndicator()\"\n [showLoadingIndicator]=\"showLoadingIndicator()\"\n [initialLoadingIndicatorDebounceTime]=\"initialLoadingIndicatorDebounceTime()\"\n />\n </div>\n</si-card>\n", dependencies: [{ kind: "component", type: SiCardComponent, selector: "si-card", inputs: ["primaryActions", "secondaryActions", "actionParam", "actionBarViewType", "actionBarTitle"] }, { kind: "component", type: SiWeatherWidgetBodyComponent, selector: "si-weather-widget-body", inputs: ["layout", "location", "metricsLabel", "forecastLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1612
+ }
1613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWeatherWidgetComponent, decorators: [{
1614
+ type: Component,
1615
+ args: [{ selector: 'si-weather-widget', imports: [SiCardComponent, SiWeatherWidgetBodyComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'si-weather-widget' }, template: "<si-card\n class=\"h-100\"\n [class]=\"accentClass()\"\n [heading]=\"cardHeading()\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [imgSrc]=\"imgSrc()\"\n [imgDir]=\"imgDir()\"\n [imgAlt]=\"imgAlt()\"\n [imgObjectFit]=\"imgObjectFit()\"\n [imgObjectPosition]=\"imgObjectPosition()\"\n>\n <div class=\"card-body\" body>\n <si-weather-widget-body\n [layout]=\"layout()\"\n [value]=\"value()\"\n [location]=\"bodyLocation()\"\n [disableAutoLoadingIndicator]=\"disableAutoLoadingIndicator()\"\n [showLoadingIndicator]=\"showLoadingIndicator()\"\n [initialLoadingIndicatorDebounceTime]=\"initialLoadingIndicatorDebounceTime()\"\n />\n </div>\n</si-card>\n" }]
1616
+ }], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], location: [{ type: i0.Input, args: [{ isSignal: true, alias: "location", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], primaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryActions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], disableAutoLoadingIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableAutoLoadingIndicator", required: false }] }], showLoadingIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLoadingIndicator", required: false }] }], initialLoadingIndicatorDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialLoadingIndicatorDebounceTime", required: false }] }], imgSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgSrc", required: false }] }], imgAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgAlt", required: false }] }], imgDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgDir", required: false }] }], imgObjectFit: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgObjectFit", required: false }] }], imgObjectPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgObjectPosition", required: false }] }], accentLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "accentLine", required: false }] }] } });
1617
+
1164
1618
  /**
1165
1619
  * Copyright (c) Siemens 2016 - 2026
1166
1620
  * SPDX-License-Identifier: MIT
@@ -1170,5 +1624,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
1170
1624
  * Generated bundle index. Do not edit.
1171
1625
  */
1172
1626
 
1173
- export { SiDashboardCardComponent, SiDashboardComponent, SiDashboardModule, SiDashboardService, SiLinkWidgetComponent, SiListWidgetBodyComponent, SiListWidgetComponent, SiListWidgetItemComponent, SiTimelineWidgetBodyComponent, SiTimelineWidgetComponent, SiTimelineWidgetItemComponent, SiValueWidgetBodyComponent, SiValueWidgetComponent };
1627
+ export { SiDashboardCardComponent, SiDashboardComponent, SiDashboardModule, SiDashboardService, SiDefaultWeatherIconResolver, SiLinkWidgetComponent, SiListWidgetBodyComponent, SiListWidgetComponent, SiListWidgetItemComponent, SiTimelineWidgetBodyComponent, SiTimelineWidgetComponent, SiTimelineWidgetItemComponent, SiValueWidgetBodyComponent, SiValueWidgetComponent, SiWeatherIconResolver, SiWeatherRangeDefDirective, SiWeatherWidgetBodyComponent, SiWeatherWidgetComponent };
1174
1628
  //# sourceMappingURL=siemens-element-ng-dashboard.mjs.map