import * as _siemens_element_ng_content_action_bar from '@siemens/element-ng/content-action-bar'; import { ContentActionBarMainItem } from '@siemens/element-ng/content-action-bar'; import * as _angular_core from '@angular/core'; import { OnDestroy, ElementRef, OnChanges, AfterViewInit, SimpleChanges, OnInit } from '@angular/core'; import * as _siemens_element_translate_ng_translate from '@siemens/element-translate-ng/translate'; import { TranslatableString } from '@siemens/element-translate-ng/translate'; import { SiCardComponent } from '@siemens/element-ng/card'; import { MenuItem, AccentLineType, EntityStatusType } from '@siemens/element-ng/common'; import * as rxjs from 'rxjs'; import { Link } from '@siemens/element-ng/link'; import { MenuItem as MenuItem$1 } from '@siemens/element-ng/menu'; import { NavigationExtras, ActivatedRoute } from '@angular/router'; declare class SiDashboardCardComponent extends SiCardComponent implements OnDestroy { /** * Description of cancel button & action. * * @defaultValue * ``` * t(() => $localize`:@@SI_DASHBOARD.RESTORE:Restore`) * ``` */ readonly restoreText: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * Description of expand button & action. * * @defaultValue * ``` * t(() => $localize`:@@SI_DASHBOARD.EXPAND:Expand`) * ``` */ readonly expandText: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * Option to enable and show the UI controls for card expand functionality. * `Expand` and `restore` action items will be added to the content action bar. * The expand resizing has to be implemented by the container of the card. * * @defaultValue false */ readonly enableExpandInteraction: _angular_core.InputSignalWithTransform; /** * Used in combination with si-dashboard to show filters when a card is expanded or not. * * @defaultValue true */ readonly showMenubar: _angular_core.InputSignalWithTransform; /** * Emitter for size state change */ readonly expandChange: _angular_core.OutputEmitterRef; /** * Whether the card is currently expanded. * * @defaultValue false */ readonly isExpanded: _angular_core.WritableSignal; /** @internal */ readonly hide: _angular_core.WritableSignal; /** @internal */ readonly enableExpandInteractionInternal: _angular_core.WritableSignal; readonly enableExpandInteractionComputed: _angular_core.Signal; /** @internal */ element: ElementRef; readonly displayContentActionBar: _angular_core.Signal; protected readonly actionBarViewTypeComputed: _angular_core.Signal<_siemens_element_ng_content_action_bar.ViewType>; protected readonly actionBarTitleComputed: _angular_core.Signal<_siemens_element_translate_ng_translate.TranslatableString>; protected readonly primaryActionsComputed: _angular_core.Signal<(MenuItem | ContentActionBarMainItem)[]>; private readonly icons; private readonly expandRestoreIconTooltip; private readonly expandActionItem; private readonly restoreActionItem; private readonly hasContentBarActions; private dashboardService; constructor(); ngOnDestroy(): void; /** * Expand the dashboard card. */ expand(): void; /** * Restore the dashboard card to the original, non-expanded state. */ restore(): void; private expandCard; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class SiDashboardComponent implements OnChanges, AfterViewInit { private readonly destroyRef; /** * Heading for the dashboard page. * * To show a custom header instead, e.g. with a description or page actions, * project it using the `header` attribute. The heading is ignored in that case. */ readonly heading: _angular_core.InputSignal; /** * Opt-in to enable expand interaction for all cards. * * @defaultValue false */ readonly enableExpandInteractions: _angular_core.InputSignalWithTransform; /** * Option to turn off the sticky behavior of the heading and menu bar. * * @defaultValue true */ readonly sticky: _angular_core.InputSignalWithTransform; /** * Option to hide the menu bar. * * @defaultValue false */ readonly hideMenubar: _angular_core.InputSignalWithTransform; /** * Is `true` if a card is expanded. * * @defaultValue false */ get isExpanded(): boolean; protected readonly dashboardFrameEndPadding: _angular_core.WritableSignal; protected readonly hideMenubarComputed: _angular_core.Signal; protected readonly isExpandedSignal: _angular_core.WritableSignal; private scrollPosition; private readonly reinitCards$; private cards; private readonly expandedPortalOutlet; private readonly dashboardFrame; private readonly dashboard; private dashboardFrameDimensions?; private dashboardDimensions?; private scroller; private dashboardService; private resizeObserver; private cdRef; private document; private injector; private readonly hideMenubarInternal; constructor(); ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; private subscribeToCards; private initCards; /** * Expands the provided card to full size in the dashboard. * @param card - The card to be expanded. */ expand(card: SiDashboardCardComponent): void; /** * Restores the expanded card to it's previous position. */ restore(): void; /** * Restored the UI state of the dashboard. This method is only part * of restoring a card and needs to be invoked after the card.restore() * method. In general this is achieved by listening to card events. */ private restoreDashboard; private restoreCardFocus; private toggleCardsHide; private setDashboardFrameEndPadding; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class SiDashboardModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } declare class SiDashboardService { private cards; /** * Subject containing the current dashboard cards as a list. * * @defaultValue this.cards.asObservable() */ readonly cards$: rxjs.Observable; /** * Registers a new dashboard card. */ register(card: SiDashboardCardComponent): void; /** * Removes a registered dashboard card. */ unregister(card: SiDashboardCardComponent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * The SiWidgetBaseDirective implements the timing for the skeleton loading * indicator of widgets. It supports a generic value input property that represents * the main value to be displayed by a widget. When the value is not set, the `showLoadingIndicator` * changes after the `initialLoadingIndicatorDebounceTime` delay to `true` and subclasses * should show the skeleton loading indicator. */ declare abstract class SiWidgetBaseDirective implements OnInit, OnChanges { /** * The main value to be displayed. If no value is set, * the skeleton indicates the loading of the value. Disable * the automatic loading mechanism by setting `SiWidgetBodyBaseComponent.disableAutoLoadingIndicator`. */ readonly value: _angular_core.InputSignal; /** * Option to disable automatic start of skeleton loading indication. * * @defaultValue false */ readonly disableAutoLoadingIndicator: _angular_core.InputSignalWithTransform; /** * Input to start and stop the skeleton loading indication. * * @defaultValue false */ readonly showLoadingIndicatorInput: _angular_core.InputSignalWithTransform; private readonly showLoadingIndicatorInternal; readonly showLoadingIndicator: _angular_core.Signal; /** * Initial delay time in milliseconds before enabling loading indicator. * Only used once initially during construction. * * @defaultValue 300 */ readonly initialLoadingIndicatorDebounceTime: _angular_core.InputSignal; protected loadingTimer?: ReturnType; ngOnChanges(): void; ngOnInit(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; static ɵdir: _angular_core.ɵɵDirectiveDeclaration, never, never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disableAutoLoadingIndicator": { "alias": "disableAutoLoadingIndicator"; "required": false; "isSignal": true; }; "showLoadingIndicatorInput": { "alias": "showLoadingIndicator"; "required": false; "isSignal": true; }; "initialLoadingIndicatorDebounceTime": { "alias": "initialLoadingIndicatorDebounceTime"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } /** * The `` supports an easy composition of links and actions * with support for skeleton loading indicator. */ declare class SiLinkWidgetComponent extends SiWidgetBaseDirective { /** * Option to enable trailing link arrow icons for each link. * * @defaultValue false */ readonly showLinkIcons: _angular_core.InputSignalWithTransform; /** * The number of skeleton progress indication rows. * * @defaultValue 3 */ readonly numberOfLinks: _angular_core.InputSignal; protected readonly ghosts: _angular_core.Signal; protected readonly icons: Record<"elementRight2", string>; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Interface for objects to configure the the list widget. */ interface SiListWidgetItem { /** Label is either a translatable string or a link. */ label: TranslatableString | Link; /** Optional translatable description. */ description?: TranslatableString; /** Optional translatable string to be displayed in a badge. */ badge?: TranslatableString; /** * Defines the badge color. Must be one of the element `bg-` CSS classes, * like `bg-primary`, `bg-secondary`, 'bg-caution'. Use only the name without `bg`. */ badgeColor?: string; /** Optional translatable text that is display to the right. */ text?: TranslatableString; /** Optional right aligned action. */ action?: Link; /** The action icon. */ actionIcon?: string; } /** * The `` supports an easy composition of links and actions * with support for skeleton loading indicator. */ declare class SiListWidgetItemComponent extends SiWidgetBaseDirective { protected readonly isLink: _angular_core.Signal; protected readonly badgeColor: _angular_core.Signal; protected readonly link: _angular_core.Signal; protected readonly label: _angular_core.Signal; protected readonly icons: Record<"elementRight2", string>; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** Defines the sort order. */ type SortOrder = 'ASC' | 'DSC'; /** * The `` implements the body of the that can be * used for composition within other components. */ declare class SiListWidgetBodyComponent extends SiWidgetBaseDirective implements OnChanges { private readonly translateService; /** Optional footer link for the list widget */ readonly link: _angular_core.InputSignal; /** * label for the "search placeholder" name * * @defaultValue * ``` * t(() => $localize`:@@SI_LIST_WIDGET.SEARCH_PLACEHOLDER:Search…`) * ``` */ readonly searchPlaceholderLabel: _angular_core.InputSignal; /** * Enable ascending and descending SiListWidgetItem sorting. If enabled, * items are initially ascending sorted. */ readonly sort: _angular_core.InputSignal; /** * Enables the search functionality. * * @defaultValue false */ readonly search: _angular_core.InputSignalWithTransform; /** * Compare function of for two `SiListWidgetItem`s that is used to sort * the array of items. The default compares the item labels by using the * string `localeCompare()` function. * * @param a - first `SiListWidgetItem` of the comparison. * * @param b - second `SiListWidgetItem` of the comparison. * * @returns A value `< 0` if `a` is smaller, `> 0` if `b` is smaller, otherwise `0`. * * @defaultValue * ``` * ( * a: SiListWidgetItem, * b: SiListWidgetItem * ) => { * const aLabel = typeof a.label === 'object' ? a.label.title! : a.label; * const bLabel = typeof b.label === 'object' ? b.label.title! : b.label; * return aLabel.localeCompare(bLabel); * } * ``` */ readonly compareFn: _angular_core.InputSignal<(a: SiListWidgetItem, b: SiListWidgetItem) => number | undefined>; /** * Filter function that is used to filter down the list items when the user enters * a term in the search bar. Default function. * * @param item - The item be checked if it matches the searchTerm. * * @param searchTerm - The string the user typed in the search bar. * * @returns `true` if the `searchTerm` matches the `item` and the `item` shall be kept in the list. * * @defaultValue * ``` * ( * item: SiListWidgetItem, * searchTerm: string * ) => { * const aLabel = typeof item.label === 'object' ? item.label.title! : item.label; * return aLabel.toLowerCase().includes(searchTerm.toLowerCase()); * } * ``` */ readonly filterFn: _angular_core.InputSignal<(item: SiListWidgetItem, searchTerm: string) => boolean | undefined>; /** * The number of skeleton progress indication rows. * * @defaultValue 6 */ readonly numberOfLinks: _angular_core.InputSignal; /** Used to display the defined number of ghost items */ protected readonly ghosts: _angular_core.Signal; /** Replica of value with pre-translated labels, recomputed when value or language changes. */ private readonly translatedItems; /** Holds the list items that are displayed. May be filtered and sorted. */ protected readonly filteredListWidgetItems: _angular_core.Signal; /** * Current search term used to filter the displayed list items. * * @defaultValue '' */ protected readonly searchText: _angular_core.ModelSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * The `` supports an easy composition of links and actions * with support for skeleton loading indicator, wrapped in a card. */ declare class SiListWidgetComponent extends SiWidgetBaseDirective implements OnChanges { protected readonly icons: Record<"elementRight2" | "elementSortDown" | "elementSortUp", string>; /** List widget heading. */ readonly heading: _angular_core.InputSignal; /** Optional footer link for the list widget */ readonly link: _angular_core.InputSignal; /** * label for the "search placeholder" name * * @defaultValue * ``` * t(() => $localize`:@@SI_LIST_WIDGET.SEARCH_PLACEHOLDER:Search…`) * ``` */ readonly searchPlaceholderLabel: _angular_core.InputSignal; /** * @defaultValue * ``` * t(() => $localize`:@@SI_LIST_WIDGET.SORT_ASCENDING:Sort ascending`) * ``` */ readonly sortAscendingLabel: _angular_core.InputSignal; /** * @defaultValue * ``` * t(() => $localize`:@@SI_LIST_WIDGET.SORT_DESCENDING:Sort descending`) * ``` */ readonly sortDescendingLabel: _angular_core.InputSignal; /** * Set `ASC` of ascending sorting, `DSC` for descending sorting and `undefined` for no sorting. */ readonly sort: _angular_core.ModelSignal; /** * Enables the search functionality. * * @defaultValue false */ readonly search: _angular_core.InputSignalWithTransform; /** * Compare function of for two `SiListWidgetItem`s that is used to sort * the array of items. The default compares the item labels by using the * string `localeCompare()` function. * * @param a - first `SiListWidgetItem` of the comparison. * * @param b - second `SiListWidgetItem` of the comparison. * * @returns A value `< 0` if `a` is smaller, `> 0` if `b` is smaller, otherwise `0`. * * @defaultValue * ``` * ( * a: SiListWidgetItem, * b: SiListWidgetItem * ) => { * const aLabel = typeof a.label === 'object' ? a.label.title! : a.label; * const bLabel = typeof b.label === 'object' ? b.label.title! : b.label; * return aLabel.localeCompare(bLabel); * } * ``` */ readonly compareFn: _angular_core.InputSignal<(a: SiListWidgetItem, b: SiListWidgetItem) => number | undefined>; /** * Filter function that is used to filter down the list items when the user enters * a term in the search bar. Default function. * * @param item - The item be checked if it matches the searchTerm. * * @param searchTerm - The string the user typed in the search bar. * * @returns `true` if the `searchTerm` matches the `item` and the `item` shall be kept in the list. * * @defaultValue * ``` * ( * item: SiListWidgetItem, * searchTerm: string * ) => { * const aLabel = typeof item.label === 'object' ? item.label.title! : item.label; * return aLabel.toLowerCase().includes(searchTerm.toLowerCase()); * } * ``` */ readonly filterFn: _angular_core.InputSignal<(item: SiListWidgetItem, searchTerm: string) => boolean | undefined>; /** * The number of skeleton progress indication rows. * * @defaultValue 6 */ readonly numberOfLinks: _angular_core.InputSignal; /** * Optional accent line */ readonly accentLine: _angular_core.InputSignal; protected readonly accentClass: _angular_core.Signal; /** The menu item array used to display the sort button. */ protected readonly sortAction: _angular_core.Signal; private doSort; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** Base for action items in the timeline widget. */ interface TimelineWidgetActionBase { /** Label that is shown to the user. */ label: TranslatableString; /** The web font icon class name (e.g. element-settings-outline). */ icon?: string; /** Defines if only the icon is shown in the default navigation bar. */ iconOnly?: boolean; } /** Interface representing an action item in the timeline widget. */ interface TimelineWidgetActionButton extends TimelineWidgetActionBase { type: 'action'; /** The class name to define the button style */ customClass?: string; /** Action that called when the item action is triggered. */ action: (source: this) => void; } /** Interface representing a router link item in the timeline widget. */ interface TimeLineWidgetRouterLink extends TimelineWidgetActionBase { type: 'router-link'; /** Link for the angular router. Accepts the same values as {@link RouterLink}. */ routerLink: string | any[]; /** Navigation extras that are passed to the {@link RouterLink}. */ extras?: NavigationExtras; } /** Interface representing a link item in the timeline widget. */ interface TimeLineWidgetLink extends TimelineWidgetActionBase { type: 'link'; /** The href property of the anchor. */ href: string; /** The target property of the anchor. */ target?: string; } /** Interface representing a menu item in the timeline widget. */ interface TimelineWidgetMenu { type: 'menu'; menuItems: MenuItem$1[]; } /** Union type for all possible action items in the timeline widget. */ type TimelineWidgetItemAction = TimelineWidgetActionButton | TimeLineWidgetLink | TimeLineWidgetRouterLink | TimelineWidgetMenu; /** * Represents an item in the timeline widget. * Each item may contain a timestamp, a title, an icon, an optional description and optional action elements. * Actions can be buttons, links, router links, or menus. */ interface SiTimelineWidgetItem { /** * The timestamp of the item. */ timeStamp: TranslatableString; /** * The title of the item. */ title: TranslatableString; /** * Optional translatable description. */ description?: TranslatableString; /** * The icon of the item. */ icon: string; /** * The color of the icon. */ iconColor?: string; /** * The stacked icon of the item. */ stackedIcon?: string; /** * The color of the stacked icon. */ stackedIconColor?: string; /** * The alt text of the icon */ iconAlt?: TranslatableString; /** * The related action of the item */ action?: TimelineWidgetItemAction; } /** * The items of the ``. */ declare class SiTimelineWidgetItemComponent extends SiWidgetBaseDirective implements OnInit, OnChanges { /** * Whether to show or hide the description row during skeleton progress indication. * * @defaultValue `true` */ readonly showDescription: _angular_core.InputSignal; /** * Aria label text for actions button dropdown. */ readonly ariaLabelDropdown: TranslatableString; protected readonly activatedRoute: ActivatedRoute | null; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class SiTimelineWidgetComponent extends SiWidgetBaseDirective implements OnChanges { /** * Timeline widget header text. */ readonly heading: _angular_core.InputSignal; /** * Input list of primary action items. Supports up to **4** actions and omits additional ones. * * @defaultValue [] */ readonly primaryActions: _angular_core.InputSignal<(MenuItem | ContentActionBarMainItem)[]>; /** * Input list of secondary action items. * * @defaultValue [] */ readonly secondaryActions: _angular_core.InputSignal<(MenuItem | MenuItem$1)[]>; /** * Link that leads the user to more information * or triggers and action. The `link.title` is displayed. * The title will be translated. */ readonly link: _angular_core.InputSignal; /** * Number of skeleton progress indication items. * * @defaultValue 4 */ readonly numberOfItems: _angular_core.InputSignal; /** * Whether to show or hide the description row during skeleton progress indication. * * @defaultValue `true` */ readonly showDescription: _angular_core.InputSignal; /** * Optional accent line */ readonly accentLine: _angular_core.InputSignal; protected readonly accentClass: _angular_core.Signal; protected readonly icons: Record<"elementRight2", string>; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class SiTimelineWidgetBodyComponent extends SiWidgetBaseDirective { /** * Number of skeleton progress indication items. * * @defaultValue 4 */ readonly numberOfItems: _angular_core.InputSignal; /** * Whether to show or hide the description row during skeleton progress indication. * * @defaultValue `true` */ readonly showDescription: _angular_core.InputSignal; /** Used to display the defined number of ghost items */ protected readonly ghosts: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * The body of the ``. Useful for compositions. */ declare class SiValueWidgetBodyComponent extends SiWidgetBaseDirective implements OnInit { /** * The unit of the value (e.g. kWh or users). Only visible if `value` is available. */ readonly unit: _angular_core.InputSignal; /** * The element icon name. Only visible if `value` is available. */ readonly icon: _angular_core.InputSignal; /** * Show a status icon instead of the {@link icon}. */ readonly status: _angular_core.InputSignal; /** * Short description of the value. A description is mandatory * to show an icon. Only visible if `value` is available. */ readonly description: _angular_core.InputSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Is a dynamic UI component that not only displays information, but also includes * embedded actions which the user can interact with to perform tasks directly * related to the card's content. Actions might include editing settings, * initiating processes, or deleting resources. * * The actionable widget turns data representation into an interactive hub, * streamlining the user's tasks and decisions associated with the card's content. * * This component is a wrapper using the `.si-value-widget` CSS classes and the * `` component. For more configuration options, use the CSS classes directly. */ declare class SiValueWidgetComponent { /** * Value widget header text. */ readonly heading: _angular_core.InputSignal; /** * Input list of primary action items. Supports up to **4** actions and omits additional ones. * * @defaultValue [] */ readonly primaryActions: _angular_core.InputSignal<(MenuItem | ContentActionBarMainItem)[]>; /** * Input list of secondary action items. * * @defaultValue [] */ readonly secondaryActions: _angular_core.InputSignal<(MenuItem | MenuItem$1)[]>; /** * The main value to be displayed. If no value is set, * the skeleton indicates the loading of the value. Disable * the automatic loading mechanism by setting `SiValueWidgetComponent.disableAutoLoadingIndicator`. */ readonly value: _angular_core.InputSignal; /** * The unit of the value (e.g. kWh or users). Only visible if `value` is available. */ readonly unit: _angular_core.InputSignal; /** * The element icon name. Only visible if `value` is available. */ readonly icon: _angular_core.InputSignal; /** * Show a status icon instead of the {@link icon}. */ readonly status: _angular_core.InputSignal; /** * Short description of the value. A description is mandatory * to show an icon. Only visible if `value` is available. */ readonly description: _angular_core.InputSignal; /** * Link that leads the user to more information * or triggers and action. The `link.title` is displayed. * The title will be translated. */ readonly link: _angular_core.InputSignal; /** * Option to disable automatic start of skeleton loading indication. * * @defaultValue false */ readonly disableAutoLoadingIndicator: _angular_core.InputSignalWithTransform; /** * Input to start and stop the skeleton loading indication. * * @defaultValue false */ readonly showLoadingIndicator: _angular_core.InputSignalWithTransform; /** * Initial delay time in milliseconds before enabling loading indicator. * Only used once initially during construction. * * @defaultValue 300 */ readonly initialLoadingIndicatorDebounceTime: _angular_core.InputSignal; /** * Image source for the card. */ readonly imgSrc: _angular_core.InputSignal; /** * Alt text for a provided image. */ readonly imgAlt: _angular_core.InputSignal; /** * Defines if an image is placed on top or start (left) of the card. * * @defaultValue 'vertical' */ readonly imgDir: _angular_core.InputSignal<"horizontal" | "vertical">; /** * Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property. * * @defaultValue 'scale-down' */ readonly imgObjectFit: _angular_core.InputSignal<"fill" | "contain" | "cover" | "none" | "scale-down">; /** * Sets the image [object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) CSS property. */ readonly imgObjectPosition: _angular_core.InputSignal; /** * Optional accent line */ readonly accentLine: _angular_core.InputSignal; protected readonly accentClass: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ /** * Visual layout of the {@link SiWeatherWidgetComponent}. * * - `vertical`: full vertical card layout with header, today block, optional * additional data and an optional vertical forecast table. * - `horizontal`: wider card with the today block laid out side by side and a * horizontal forecast strip below. * - `compact`: condensed card without a card header. Location and min/max * temperature are rendered next to the illustration. Does not show a forecast. */ type SiWeatherWidgetLayout = 'vertical' | 'horizontal' | 'compact'; /** * Built-in weather condition vocabulary. Mapped 1:1 by the library's default * {@link SiWeatherIconResolver} to Element icons. Applications that need * provider-specific vocabularies (Xweather, OpenWeather, …) should register * their own resolver and may accept any string in their public APIs. */ type SiWeatherCondition = 'clear' | 'clouds' | 'rain' | 'storm' | 'wind' | 'unknown'; /** * Describes how a weather illustration should be resolved. Callers can either * provide a direct {@link SiWeatherIcon.src} or a semantic * {@link SiWeatherIcon.condition} token resolved by a * {@link SiWeatherIconResolver}. */ interface SiWeatherIcon { /** Semantic condition token, used by the resolver. Apps with custom resolvers may pass any string. */ condition?: SiWeatherCondition | string; /** Direct URL/path. Wins over {@link condition}. */ src?: string; /** Translatable alt text for accessibility. */ alt?: TranslatableString; } /** * Today block of the weather widget. */ interface SiWeatherWidgetCurrent { /** Current temperature, pre-formatted by the caller (e.g. `"26°"` or `26`). */ temperature: string | number; /** Translatable condition label, e.g. `"Sunny"`. */ condition?: TranslatableString; /** Weather illustration. A string is shorthand for `{ src }`. */ illustration?: SiWeatherIcon | string; /** Optional alt text used when {@link illustration} is given as a string. */ illustrationAlt?: TranslatableString; /** Today's minimum temperature, pre-formatted by the caller. */ minTemperature?: string | number; /** Today's maximum temperature, pre-formatted by the caller. */ maxTemperature?: string | number; } /** * A single metric row in the additional-data block (e.g. wind, precipitation). */ interface SiWeatherWidgetMetric { /** Translatable label, e.g. `"Wind"`. */ label: TranslatableString; /** Pre-formatted value, e.g. `"7km/h"`. */ value: string | number; } /** * An optional forecast column shown left of the temperature column in vertical * layouts. The widget supports up to five of these columns; additional columns * are ignored. The temperature column is mandatory and always rendered on the * right; it does not need to be modelled as a column here. */ interface SiWeatherWidgetForecastColumn { /** Translatable column label, used as `aria-label` for the column. */ label?: TranslatableString; /** element-icons icon name shown next to each row value. */ icon?: string; /** * Per-day values, aligned by index with {@link SiWeatherWidgetForecast.days}. * Missing entries are rendered as empty cells. */ values: readonly (string | number | undefined)[]; } /** * A single day in the forecast block. */ interface SiWeatherWidgetForecastDay { /** Translatable day label, e.g. `"Mon"`. */ label: TranslatableString; /** Weather illustration for the day. A string is shorthand for `{ src }`. */ illustration?: SiWeatherIcon | string; /** Minimum temperature, pre-formatted by the caller. */ minTemperature: string | number; /** Maximum temperature, pre-formatted by the caller. */ maxTemperature: string | number; } /** * Forecast block of the weather widget. * * The vertical layout supports up to five optional {@link columns} in addition * to the mandatory rightmost min/max temperature column. The horizontal layout * ignores {@link columns} and renders only day label, illustration and min/max * temperature per column. A horizontal forecast should provide at least three * days for a visually balanced layout. */ interface SiWeatherWidgetForecast { /** The forecast days in display order. */ days: readonly SiWeatherWidgetForecastDay[]; /** Optional extra columns (vertical layout only). At most five are rendered. */ columns?: readonly SiWeatherWidgetForecastColumn[]; } /** * Composite payload accepted by the body component. Granular widget/body inputs * (`current`, `metrics`, `forecast`) take precedence when set. */ interface SiWeatherWidgetData { current: SiWeatherWidgetCurrent; metrics?: readonly SiWeatherWidgetMetric[]; forecast?: SiWeatherWidgetForecast; } /** * Result returned by a {@link SiWeatherIconResolver}. Implementations should * return either {@link icon} (rendered via ``) or {@link src} * (rendered as a plain ``). When both are present, {@link icon} wins. */ interface SiWeatherIconResolution { /** Resolved Element icon name (e.g. `"element-sun"`). Rendered via ``. */ icon?: string; /** Resolved image URL. Rendered as a plain ``. */ src?: string; /** Resolved alt text. The widget falls back to a sensible default. */ alt?: TranslatableString; } /** * Maps a semantic {@link SiWeatherIcon} to a renderable illustration. The * library ships a {@link SiDefaultWeatherIconResolver} that maps the built-in * {@link SiWeatherCondition} vocabulary to Element icons, so the widget renders * a reasonable illustration out of the box. Applications can override the * mapping or add provider-specific vocabularies by registering their own * resolver: * * @example * ```ts * @Injectable({ providedIn: 'root' }) * export class MyWeatherIconResolver extends SiWeatherIconResolver { * override resolve(icon: SiWeatherIcon): SiWeatherIconResolution | null { * // ... * } * } * ``` * * Resolvers SHOULD return `null` for unknown or `'unknown'` conditions so the * widget can skip the illustration. */ declare abstract class SiWeatherIconResolver { abstract resolve(icon: SiWeatherIcon): SiWeatherIconResolution | null; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Built-in resolver that maps the library's minimal * {@link SiWeatherCondition} vocabulary to Element icons: * * - `clear` → `element-sun` * - `clouds` → `element-cloudy` * - `rain` → `element-rain` * - `storm` → `element-storm` * - `wind` → `element-wind` * - `unknown` → no illustration * * Unknown tokens fall through to `null` so callers can register a more * capable resolver without losing the built-in fallback. */ declare class SiDefaultWeatherIconResolver extends SiWeatherIconResolver { resolve(icon: SiWeatherIcon): SiWeatherIconResolution | null; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Marker directive that types the `let-` context of the shared range * `` so its body gets full type checking instead of `any`. * * @internal */ declare class SiWeatherRangeDefDirective { static ngTemplateContextGuard(_dir: SiWeatherRangeDefDirective, ctx: unknown): ctx is { $implicit: SiWeatherWidgetCurrent; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Body of the ``. Useful for compositions that do not need * the surrounding `` chrome (e.g. embedding the weather inside a * custom container). * * Data is supplied as a composite {@link value} payload of type * {@link SiWeatherWidgetData}. * * The body delegates illustration resolution to the injected * {@link SiWeatherIconResolver}. The library ships a default resolver that * maps the built-in {@link SiWeatherCondition} vocabulary to Element icons. * * In the `vertical` layout the forecast list responsively hides additional * data columns (wind, humidity, …) via pure CSS container queries when the * widget becomes too narrow. See `si-weather-widget-body.component.scss` for * the thresholds. */ declare class SiWeatherWidgetBodyComponent extends SiWidgetBaseDirective { /** * Visual layout. {@link SiWeatherWidgetLayout}. * * @defaultValue 'vertical' */ readonly layout: _angular_core.InputSignal; /** * Optional location label, shown inside the body in the compact layout only. * The non-compact layouts render the location via the `` heading * managed by `SiWeatherWidgetComponent`. */ readonly location: _angular_core.InputSignal; /** * Accessible label for the additional data list. * * @defaultValue * ``` * t(() => $localize`:@@SI_WEATHER_WIDGET.METRICS_LABEL:Additional weather data`) * ``` */ readonly metricsLabel: _angular_core.InputSignal; /** * Accessible label for the forecast section. * * @defaultValue * ``` * t(() => $localize`:@@SI_WEATHER_WIDGET.FORECAST_LABEL:Weather forecast`) * ``` */ readonly forecastLabel: _angular_core.InputSignal; protected readonly layoutClass: _angular_core.Signal; protected readonly isCompact: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Dashboard widget for current weather conditions, additional metrics and an * optional multi-day forecast. * * The widget supports three layouts (see {@link SiWeatherWidgetLayout}): * * - `vertical` (default): full vertical card with `` heading, * illustration, today block, optional additional data and an optional * forecast table with up to five extra columns. * - `horizontal`: wider card with the today block laid out side by side and a * horizontal forecast strip below. The forecast SHOULD contain at least three * days for a visually balanced layout. * - `compact`: condensed variant without a card header. The {@link location} is * rendered next to the illustration. The forecast is not shown. * * Data is supplied as a composite {@link value} payload of type * {@link SiWeatherWidgetData}. * * Weather illustrations are resolved by an optional `SiWeatherIconResolver` * that application developers register. Without a resolver the widget only * renders illustrations when callers pass a direct `illustration.src`. */ declare class SiWeatherWidgetComponent { /** * Card heading text. Used as the card header in `vertical` and `horizontal` * layouts. In the `compact` layout, the location is rendered inside the body * instead and this input is ignored. */ readonly heading: _angular_core.InputSignal; /** * Location displayed next to the illustration in the `compact` layout. Has * no effect in `vertical` or `horizontal` layouts; use {@link heading} there. */ readonly location: _angular_core.InputSignal; /** * Visual layout. {@link SiWeatherWidgetLayout}. * * @defaultValue 'vertical' */ readonly layout: _angular_core.InputSignal; /** * Composite weather payload of type {@link SiWeatherWidgetData}. */ readonly value: _angular_core.InputSignal; /** * Input list of primary action items. Supports up to **4** actions and omits additional ones. * * @defaultValue [] */ readonly primaryActions: _angular_core.InputSignal; /** * Input list of secondary action items. * * @defaultValue [] */ readonly secondaryActions: _angular_core.InputSignal; /** * Option to disable automatic start of skeleton loading indication. * * @defaultValue false */ readonly disableAutoLoadingIndicator: _angular_core.InputSignalWithTransform; /** * Input to start and stop the skeleton loading indication. * * @defaultValue false */ readonly showLoadingIndicator: _angular_core.InputSignalWithTransform; /** * Initial delay time in milliseconds before enabling loading indicator. * Only used once initially during construction. * * @defaultValue 300 */ readonly initialLoadingIndicatorDebounceTime: _angular_core.InputSignal; /** * Image source for the card. */ readonly imgSrc: _angular_core.InputSignal; /** * Alt text for a provided image. */ readonly imgAlt: _angular_core.InputSignal; /** * Defines if an image is placed on top or start (left) of the card. * * @defaultValue 'vertical' */ readonly imgDir: _angular_core.InputSignal<"horizontal" | "vertical">; /** * Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property. * * @defaultValue 'scale-down' */ readonly imgObjectFit: _angular_core.InputSignal<"fill" | "contain" | "cover" | "none" | "scale-down">; /** * Sets the image [object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) CSS property. */ readonly imgObjectPosition: _angular_core.InputSignal; /** * Optional accent line. */ readonly accentLine: _angular_core.InputSignal; protected readonly accentClass: _angular_core.Signal; protected readonly cardHeading: _angular_core.Signal; protected readonly bodyLocation: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { SiDashboardCardComponent, SiDashboardComponent, SiDashboardModule, SiDashboardService, SiDefaultWeatherIconResolver, SiLinkWidgetComponent, SiListWidgetBodyComponent, SiListWidgetComponent, SiListWidgetItemComponent, SiTimelineWidgetBodyComponent, SiTimelineWidgetComponent, SiTimelineWidgetItemComponent, SiValueWidgetBodyComponent, SiValueWidgetComponent, SiWeatherIconResolver, SiWeatherRangeDefDirective, SiWeatherWidgetBodyComponent, SiWeatherWidgetComponent }; export type { SiListWidgetItem, SiTimelineWidgetItem, SiWeatherCondition, SiWeatherIcon, SiWeatherIconResolution, SiWeatherWidgetCurrent, SiWeatherWidgetData, SiWeatherWidgetForecast, SiWeatherWidgetForecastColumn, SiWeatherWidgetForecastDay, SiWeatherWidgetLayout, SiWeatherWidgetMetric, SortOrder, TimeLineWidgetLink, TimeLineWidgetRouterLink, TimelineWidgetActionBase, TimelineWidgetActionButton, TimelineWidgetItemAction, TimelineWidgetMenu };