@siemens/element-ng 47.1.0 → 47.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.d.ts +9 -0
- package/accordion/package.json +3 -0
- package/accordion/si-accordion-hcollapse.service.d.ts +17 -0
- package/accordion/si-accordion.component.d.ts +37 -0
- package/accordion/si-accordion.module.d.ts +8 -0
- package/accordion/si-accordion.service.d.ts +17 -0
- package/accordion/si-collapsible-panel.component.d.ts +89 -0
- package/action-modal/index.d.ts +6 -0
- package/action-modal/package.json +3 -0
- package/action-modal/si-action-dialog.service.d.ts +49 -0
- package/action-modal/si-action-dialog.types.d.ts +92 -0
- package/action-modal/si-alert-dialog/si-alert-dialog.component.d.ts +32 -0
- package/action-modal/si-confirmation-dialog/si-confirmation-dialog.component.d.ts +40 -0
- package/action-modal/si-delete-confirmation-dialog/si-delete-confirmation-dialog.component.d.ts +45 -0
- package/action-modal/si-edit-discard-dialog/si-edit-discard-dialog.component.d.ts +68 -0
- package/auto-collapsable-list/index.d.ts +10 -0
- package/auto-collapsable-list/package.json +3 -0
- package/auto-collapsable-list/si-auto-collapsable-list-additional-content.directive.d.ts +6 -0
- package/auto-collapsable-list/si-auto-collapsable-list-item.directive.d.ts +29 -0
- package/auto-collapsable-list/si-auto-collapsable-list-measurable.class.d.ts +16 -0
- package/auto-collapsable-list/si-auto-collapsable-list-overflow-item.directive.d.ts +12 -0
- package/auto-collapsable-list/si-auto-collapsable-list.directive.d.ts +47 -0
- package/auto-collapsable-list/si-auto-collapsable-list.module.d.ts +10 -0
- package/color-picker/index.d.ts +5 -0
- package/color-picker/package.json +3 -0
- package/color-picker/si-color-picker.component.d.ts +61 -0
- package/common/models/menu.model.d.ts +2 -2
- package/connection-strength/index.d.ts +6 -0
- package/connection-strength/package.json +3 -0
- package/connection-strength/si-connection-strength.component.d.ts +19 -0
- package/connection-strength/si-connection-strength.module.d.ts +7 -0
- package/copyright-notice/index.d.ts +7 -0
- package/copyright-notice/package.json +3 -0
- package/copyright-notice/si-copyright-notice.component.d.ts +18 -0
- package/copyright-notice/si-copyright-notice.d.ts +23 -0
- package/copyright-notice/si-copyright-notice.module.d.ts +7 -0
- package/empty-state/index.d.ts +6 -0
- package/empty-state/package.json +3 -0
- package/empty-state/si-empty-state.component.d.ts +18 -0
- package/empty-state/si-empty-state.module.d.ts +7 -0
- package/fesm2022/siemens-element-ng-accordion.mjs +314 -0
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-action-modal.mjs +363 -0
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +312 -0
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-color-picker.mjs +176 -0
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-connection-strength.mjs +58 -0
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +71 -0
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-empty-state.mjs +59 -0
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-footer.mjs +55 -0
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-icon.mjs +8 -1
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +82 -0
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +248 -0
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-menu.mjs +350 -0
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-modal.mjs +345 -0
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-pagination.mjs +145 -0
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-password-toggle.mjs +88 -0
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-summary-chip.mjs +77 -0
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-tooltip.mjs +233 -0
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/footer/index.d.ts +6 -0
- package/footer/package.json +3 -0
- package/footer/si-footer.component.d.ts +14 -0
- package/footer/si-footer.module.d.ts +7 -0
- package/icon/element-icons.d.ts +7 -0
- package/inline-notification/index.d.ts +6 -0
- package/inline-notification/package.json +3 -0
- package/inline-notification/si-inline-notification.component.d.ts +42 -0
- package/inline-notification/si-inline-notification.module.d.ts +7 -0
- package/loading-spinner/index.d.ts +9 -0
- package/loading-spinner/package.json +3 -0
- package/loading-spinner/si-loading-button.component.d.ts +31 -0
- package/loading-spinner/si-loading-spinner.component.d.ts +32 -0
- package/loading-spinner/si-loading-spinner.directive.d.ts +36 -0
- package/loading-spinner/si-loading-spinner.module.d.ts +8 -0
- package/loading-spinner/si-loading-spinner.service.d.ts +18 -0
- package/menu/index.d.ts +15 -0
- package/menu/package.json +3 -0
- package/menu/si-menu-action.service.d.ts +13 -0
- package/menu/si-menu-bar.directive.d.ts +12 -0
- package/menu/si-menu-divider.directive.d.ts +5 -0
- package/menu/si-menu-factory-item-guard.directive.d.ts +11 -0
- package/menu/si-menu-factory.component.d.ts +15 -0
- package/menu/si-menu-header.directive.d.ts +5 -0
- package/menu/si-menu-item-base.directive.d.ts +16 -0
- package/menu/si-menu-item-checkbox.component.d.ts +10 -0
- package/menu/si-menu-item-radio.component.d.ts +10 -0
- package/menu/si-menu-item.component.d.ts +10 -0
- package/menu/si-menu-model.d.ts +91 -0
- package/menu/si-menu.directive.d.ts +6 -0
- package/menu/si-menu.module.d.ts +14 -0
- package/modal/index.d.ts +7 -0
- package/modal/modal.helpers.d.ts +8 -0
- package/modal/modalref.d.ts +64 -0
- package/modal/package.json +3 -0
- package/modal/si-modal.component.d.ts +32 -0
- package/modal/si-modal.service.d.ts +57 -0
- package/package.json +67 -3
- package/pagination/index.d.ts +6 -0
- package/pagination/package.json +3 -0
- package/pagination/si-pagination.component.d.ts +65 -0
- package/pagination/si-pagination.module.d.ts +7 -0
- package/password-toggle/index.d.ts +6 -0
- package/password-toggle/package.json +3 -0
- package/password-toggle/si-password-toggle.component.d.ts +39 -0
- package/password-toggle/si-password-toggle.module.d.ts +7 -0
- package/summary-chip/index.d.ts +5 -0
- package/summary-chip/package.json +3 -0
- package/summary-chip/si-summary-chip.component.d.ts +44 -0
- package/template-i18n.json +19 -1
- package/tooltip/index.d.ts +7 -0
- package/tooltip/package.json +3 -0
- package/tooltip/si-tooltip.component.d.ts +25 -0
- package/tooltip/si-tooltip.directive.d.ts +45 -0
- package/tooltip/si-tooltip.module.d.ts +7 -0
- package/tooltip/si-tooltip.service.d.ts +44 -0
- package/translate/si-translatable-keys.interface.d.ts +18 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Siemens 2016 - 2025.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { AfterViewInit, OnChanges, OnDestroy, QueryList, SimpleChanges } from '@angular/core';
|
|
6
|
+
import { SiAutoCollapsableListItemDirective } from './si-auto-collapsable-list-item.directive';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class SiAutoCollapsableListDirective implements AfterViewInit, OnChanges, OnDestroy {
|
|
9
|
+
/**
|
|
10
|
+
* The items which are displayed in the siAutoCollapsableList.
|
|
11
|
+
*/
|
|
12
|
+
items: QueryList<SiAutoCollapsableListItemDirective>;
|
|
13
|
+
private readonly overflowItem;
|
|
14
|
+
private additionalContent;
|
|
15
|
+
/** @defaultValue true */
|
|
16
|
+
readonly siAutoCollapsableList: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* The (flex) gap in pixels, will automatically be set if a pixel value is used in CSS.
|
|
19
|
+
*/
|
|
20
|
+
readonly gap: import("@angular/core").InputSignal<number | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* The element which size is available for the content of the siAutoCollapsableList.
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue undefined
|
|
25
|
+
*/
|
|
26
|
+
readonly containerElement: import("@angular/core").InputSignal<HTMLElement | null | undefined>;
|
|
27
|
+
private resizeSubscription?;
|
|
28
|
+
private disableInitSubscription?;
|
|
29
|
+
private readonly elementRef;
|
|
30
|
+
private readonly resizeObserverService;
|
|
31
|
+
private readonly changeDetectorRef;
|
|
32
|
+
private readonly containerElementSubject;
|
|
33
|
+
/**
|
|
34
|
+
* The same as {@link gap}, but automatically read from the computed styles.
|
|
35
|
+
* Used if not set by user.
|
|
36
|
+
*/
|
|
37
|
+
private computedGap;
|
|
38
|
+
ngAfterViewInit(): void;
|
|
39
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
40
|
+
ngOnDestroy(): void;
|
|
41
|
+
private setupResizeListener;
|
|
42
|
+
private updateItemVisibility;
|
|
43
|
+
private reset;
|
|
44
|
+
private readGapSize;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiAutoCollapsableListDirective, never>;
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SiAutoCollapsableListDirective, "[siAutoCollapsableList]", ["siAutoCollapsableList"], { "siAutoCollapsableList": { "alias": "siAutoCollapsableList"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "containerElement": { "alias": "siAutoCollapsableListContainerElement"; "required": false; "isSignal": true; }; }, {}, ["overflowItem", "items", "additionalContent"], never, true, never>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./si-auto-collapsable-list-additional-content.directive";
|
|
3
|
+
import * as i2 from "./si-auto-collapsable-list.directive";
|
|
4
|
+
import * as i3 from "./si-auto-collapsable-list-item.directive";
|
|
5
|
+
import * as i4 from "./si-auto-collapsable-list-overflow-item.directive";
|
|
6
|
+
export declare class SiAutoCollapsableListModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiAutoCollapsableListModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SiAutoCollapsableListModule, never, [typeof i1.SiAutoCollapsableListAdditionalContentDirective, typeof i2.SiAutoCollapsableListDirective, typeof i3.SiAutoCollapsableListItemDirective, typeof i4.SiAutoCollapsableListOverflowItemDirective], [typeof i1.SiAutoCollapsableListAdditionalContentDirective, typeof i2.SiAutoCollapsableListDirective, typeof i3.SiAutoCollapsableListItemDirective, typeof i4.SiAutoCollapsableListOverflowItemDirective]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SiAutoCollapsableListModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import { TranslatableString } from '@siemens/element-translate-ng/translate';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SiColorPickerComponent implements ControlValueAccessor {
|
|
5
|
+
/**
|
|
6
|
+
* The color palette to choose the colors from. As colors, only valid CSS
|
|
7
|
+
* variable names omitting the `--` prefix or Element color tokens omitting
|
|
8
|
+
* the `$` prefix are supported.
|
|
9
|
+
*
|
|
10
|
+
* Note: If custom CSS variables are provided, they need to be defined for
|
|
11
|
+
* both light and dark mode.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue The first 16 colors of the Element data color palette.
|
|
14
|
+
*/
|
|
15
|
+
readonly colorPalette: import("@angular/core").InputSignal<string[]>;
|
|
16
|
+
/**
|
|
17
|
+
* The selected color.
|
|
18
|
+
*/
|
|
19
|
+
readonly color: import("@angular/core").ModelSignal<string | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* Specifies whether the color popup should automatically close on a color selection.
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue false
|
|
24
|
+
*/
|
|
25
|
+
readonly autoClose: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies whether the color picker component is disabled.
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue false
|
|
30
|
+
*/
|
|
31
|
+
readonly disabledInput: import("@angular/core").InputSignal<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Aria label for the color input button.
|
|
34
|
+
*/
|
|
35
|
+
readonly ariaLabel: import("@angular/core").InputSignal<TranslatableString | undefined>;
|
|
36
|
+
private onChange;
|
|
37
|
+
private onTouched;
|
|
38
|
+
private readonly colorInputRef;
|
|
39
|
+
private readonly colorPaletteRef;
|
|
40
|
+
private readonly disabledNgControl;
|
|
41
|
+
private readonly numberOfColumns;
|
|
42
|
+
protected readonly disabled: import("@angular/core").Signal<boolean>;
|
|
43
|
+
protected readonly isOverlayOpen: import("@angular/core").WritableSignal<boolean>;
|
|
44
|
+
protected readonly icons: Record<"elementOk", string>;
|
|
45
|
+
protected blur(): void;
|
|
46
|
+
protected arrowDown(index: number, event: Event): void;
|
|
47
|
+
protected arrowUp(index: number, event: Event): void;
|
|
48
|
+
protected arrowLeft(index: number, event: Event): void;
|
|
49
|
+
protected arrowRight(index: number, event: Event): void;
|
|
50
|
+
private focusLabel;
|
|
51
|
+
protected openOverlay(): void;
|
|
52
|
+
protected overlayDetach(): void;
|
|
53
|
+
private focusSelectedColor;
|
|
54
|
+
protected selectColor(color: string): void;
|
|
55
|
+
writeValue(value: string): void;
|
|
56
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
57
|
+
registerOnTouched(fn: () => void): void;
|
|
58
|
+
setDisabledState(isDisabled: boolean): void;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiColorPickerComponent, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SiColorPickerComponent, "si-color-picker", never, { "colorPalette": { "alias": "colorPalette"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "autoClose": { "alias": "autoClose"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "color": "colorChange"; }, never, never, true, never>;
|
|
61
|
+
}
|
|
@@ -12,8 +12,8 @@ import { Link } from '@siemens/element-ng/link';
|
|
|
12
12
|
* - for {@link SiMenuFactoryComponent} use {@link @siemens/element-ng/menu#MenuItem}
|
|
13
13
|
* - for {@link SiContentActionBarComponent} use {@link @siemens/element-ng/menu#MenuItem} and {@link ContentActionBarMainItem}
|
|
14
14
|
* - for {@link SiNavbarVerticalComponent} use {@link NavbarVerticalItem}
|
|
15
|
-
* - for {@link @
|
|
16
|
-
* use {@link @
|
|
15
|
+
* - for {@link @siemens/dashboards-ng#SiFlexibleDashboardComponent}
|
|
16
|
+
* use {@link @siemens/dashboards-ng#DashboardToolbarItem}
|
|
17
17
|
*/
|
|
18
18
|
export interface MenuItem extends Link {
|
|
19
19
|
/**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export type ConnectionStrength = 'none' | 'low' | 'medium' | 'strong';
|
|
3
|
+
export declare class SiConnectionStrengthComponent {
|
|
4
|
+
/**
|
|
5
|
+
* Shows the signal representation in an alternative *WLAN* format
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue false
|
|
8
|
+
*/
|
|
9
|
+
readonly wlan: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
10
|
+
/**
|
|
11
|
+
* Main value representing the current connection strength.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue 'none'
|
|
14
|
+
*/
|
|
15
|
+
readonly value: import("@angular/core").InputSignal<ConnectionStrength>;
|
|
16
|
+
protected readonly numberValue: import("@angular/core").Signal<number>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiConnectionStrengthComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SiConnectionStrengthComponent, "si-connection-strength", never, { "wlan": { "alias": "wlan"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./si-connection-strength.component";
|
|
3
|
+
export declare class SiConnectionStrengthModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiConnectionStrengthModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SiConnectionStrengthModule, never, [typeof i1.SiConnectionStrengthComponent], [typeof i1.SiConnectionStrengthComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SiConnectionStrengthModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CopyrightDetails } from './si-copyright-notice';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SiCopyrightNoticeComponent {
|
|
4
|
+
private globalCopyrightInfo;
|
|
5
|
+
/**
|
|
6
|
+
* Copyright information to be displayed.
|
|
7
|
+
*
|
|
8
|
+
* Note: The {@link CopyrightDetails#company} defaults to `Sample Company`,
|
|
9
|
+
* only set it for other companies.
|
|
10
|
+
*/
|
|
11
|
+
readonly copyright: import("@angular/core").InputSignal<CopyrightDetails | undefined>;
|
|
12
|
+
protected readonly copyrightInfo: import("@angular/core").Signal<string>;
|
|
13
|
+
protected readonly company: import("@angular/core").Signal<string>;
|
|
14
|
+
protected readonly startYear: import("@angular/core").Signal<number>;
|
|
15
|
+
protected readonly lastUpdateYear: import("@angular/core").Signal<number | undefined>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiCopyrightNoticeComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SiCopyrightNoticeComponent, "si-copyright-notice", never, { "copyright": { "alias": "copyright"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Siemens 2016 - 2025.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { InjectionToken } from '@angular/core';
|
|
6
|
+
export interface CopyrightDetails {
|
|
7
|
+
/**
|
|
8
|
+
* The year when the app was first released.
|
|
9
|
+
*/
|
|
10
|
+
startYear: number;
|
|
11
|
+
/**
|
|
12
|
+
* The year when the app was last updated. Must be left blank if it equals {@link startYear}
|
|
13
|
+
*/
|
|
14
|
+
lastUpdateYear?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The company name to be displayed in the copyright notice (not to be translated).
|
|
17
|
+
*/
|
|
18
|
+
company?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The injection token to be used when used globally across the app
|
|
22
|
+
*/
|
|
23
|
+
export declare const SI_COPYRIGHT_DETAILS: InjectionToken<CopyrightDetails>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./si-copyright-notice.component";
|
|
3
|
+
export declare class SiCopyrightNoticeModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiCopyrightNoticeModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SiCopyrightNoticeModule, never, [typeof i1.SiCopyrightNoticeComponent], [typeof i1.SiCopyrightNoticeComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SiCopyrightNoticeModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TranslatableString } from '@siemens/element-translate-ng/translate';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SiEmptyStateComponent {
|
|
4
|
+
/**
|
|
5
|
+
* CSS class name of the desired icon.
|
|
6
|
+
*/
|
|
7
|
+
readonly icon: import("@angular/core").InputSignal<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Heading of empty state content.
|
|
10
|
+
*/
|
|
11
|
+
readonly heading: import("@angular/core").InputSignal<TranslatableString>;
|
|
12
|
+
/**
|
|
13
|
+
* Description of empty state content.
|
|
14
|
+
*/
|
|
15
|
+
readonly content: import("@angular/core").InputSignal<TranslatableString | undefined>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiEmptyStateComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SiEmptyStateComponent, "si-empty-state", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "heading": { "alias": "heading"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./si-empty-state.component";
|
|
3
|
+
export declare class SiEmptyStateModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiEmptyStateModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SiEmptyStateModule, never, [typeof i1.SiEmptyStateComponent], [typeof i1.SiEmptyStateComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SiEmptyStateModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { trigger, transition, style, query, animate } from '@angular/animations';
|
|
2
|
+
import { NgClass } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { signal, Injectable, input, model, booleanAttribute, output, computed, inject, DestroyRef, viewChild, ChangeDetectionStrategy, Component, contentChildren, ElementRef, NgModule } from '@angular/core';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { areAnimationsDisabled } from '@siemens/element-ng/common';
|
|
7
|
+
import { addIcons, elementDown2, SiIconNextComponent } from '@siemens/element-ng/icon';
|
|
8
|
+
import * as i1 from '@siemens/element-translate-ng/translate';
|
|
9
|
+
import { SiTranslateModule } from '@siemens/element-translate-ng/translate';
|
|
10
|
+
import { Subject, filter } from 'rxjs';
|
|
11
|
+
import { ResizeObserverService } from '@siemens/element-ng/resize-observer';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Copyright Siemens 2016 - 2025.
|
|
15
|
+
* SPDX-License-Identifier: MIT
|
|
16
|
+
*/
|
|
17
|
+
/** @internal */
|
|
18
|
+
class SiAccordionHCollapseService {
|
|
19
|
+
/**
|
|
20
|
+
* Emitting the current horizontal collapsed state.
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue undefined
|
|
23
|
+
*/
|
|
24
|
+
hcollapsed = signal(undefined);
|
|
25
|
+
/**
|
|
26
|
+
* Subject to emit to open the accordion.
|
|
27
|
+
*/
|
|
28
|
+
open$ = new Subject();
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionHCollapseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
30
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionHCollapseService, providedIn: null });
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionHCollapseService, decorators: [{
|
|
33
|
+
type: Injectable,
|
|
34
|
+
args: [{
|
|
35
|
+
providedIn: null
|
|
36
|
+
}]
|
|
37
|
+
}] });
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Copyright Siemens 2016 - 2025.
|
|
41
|
+
* SPDX-License-Identifier: MIT
|
|
42
|
+
*/
|
|
43
|
+
/** @internal */
|
|
44
|
+
class SiAccordionService {
|
|
45
|
+
/**
|
|
46
|
+
* Emit an item in the accordion which should be toggled.
|
|
47
|
+
*/
|
|
48
|
+
toggle$ = new Subject();
|
|
49
|
+
/**
|
|
50
|
+
* Subject to emit when the items should be expanded to their full height or restored to normal height.
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue null
|
|
53
|
+
*/
|
|
54
|
+
fullHeight = signal(null);
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
56
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionService, providedIn: null });
|
|
57
|
+
}
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionService, decorators: [{
|
|
59
|
+
type: Injectable,
|
|
60
|
+
args: [{
|
|
61
|
+
providedIn: null
|
|
62
|
+
}]
|
|
63
|
+
}] });
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Copyright Siemens 2016 - 2025.
|
|
67
|
+
* SPDX-License-Identifier: MIT
|
|
68
|
+
*/
|
|
69
|
+
let controlIdCounter = 1;
|
|
70
|
+
class SiCollapsiblePanelComponent {
|
|
71
|
+
/**
|
|
72
|
+
* Heading for the collapsible panel.
|
|
73
|
+
*/
|
|
74
|
+
heading = input();
|
|
75
|
+
/**
|
|
76
|
+
* Additional CSS classes for the top element.
|
|
77
|
+
*
|
|
78
|
+
* @defaultValue ''
|
|
79
|
+
*/
|
|
80
|
+
headerCssClasses = input('');
|
|
81
|
+
/**
|
|
82
|
+
* Additional CSS classes for the collapsible content region.
|
|
83
|
+
*
|
|
84
|
+
* @defaultValue ''
|
|
85
|
+
*/
|
|
86
|
+
contentBgClasses = input('');
|
|
87
|
+
/**
|
|
88
|
+
* Additional CSS classes for the wrapping content element.
|
|
89
|
+
*
|
|
90
|
+
* @defaultValue ''
|
|
91
|
+
*/
|
|
92
|
+
contentCssClasses = input('');
|
|
93
|
+
/**
|
|
94
|
+
* Expand/collapse the panel.
|
|
95
|
+
*
|
|
96
|
+
* @defaultValue false
|
|
97
|
+
*/
|
|
98
|
+
opened = model(false);
|
|
99
|
+
/**
|
|
100
|
+
* The icon to be displayed besides the heading.
|
|
101
|
+
*/
|
|
102
|
+
icon = input();
|
|
103
|
+
/**
|
|
104
|
+
* Whether the si-collapsible-panel is disabled.
|
|
105
|
+
*
|
|
106
|
+
* @defaultValue false
|
|
107
|
+
*/
|
|
108
|
+
disabled = input(false, { transform: booleanAttribute });
|
|
109
|
+
/** Color to use for component background */
|
|
110
|
+
colorVariant = input();
|
|
111
|
+
/**
|
|
112
|
+
* Defines the content of the optional badge. Should be a number or something like "100+".
|
|
113
|
+
* if undefined or empty string, no badge is displayed
|
|
114
|
+
*/
|
|
115
|
+
badge = input();
|
|
116
|
+
/**
|
|
117
|
+
* Defines the background color of the badge. Default is specific to SiMPL flavour.
|
|
118
|
+
*/
|
|
119
|
+
badgeColor = input();
|
|
120
|
+
/**
|
|
121
|
+
* An event emitted when the user triggered expand/collapse and emit with the new open state.
|
|
122
|
+
* The event is emitted before the animation happens.
|
|
123
|
+
*/
|
|
124
|
+
panelToggle = output();
|
|
125
|
+
/**
|
|
126
|
+
* An event emitted when the user triggered expand/collapse.
|
|
127
|
+
* The event is emitted before the animation happens.
|
|
128
|
+
* @deprecated use {@link panelToggle} instead
|
|
129
|
+
*/
|
|
130
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
131
|
+
toggle = output();
|
|
132
|
+
hcollapsed = computed(() => this.accordionHCollapseService?.hcollapsed() ?? false);
|
|
133
|
+
fullHeight = computed(() => this.accordionService?.fullHeight() ?? false);
|
|
134
|
+
controlId = '__si-collapsible-' + controlIdCounter++;
|
|
135
|
+
headerId = this.controlId + '-header';
|
|
136
|
+
isHCollapsible = false;
|
|
137
|
+
icons = addIcons({ elementDown2 });
|
|
138
|
+
destroyRef = inject(DestroyRef);
|
|
139
|
+
accordionService = inject(SiAccordionService, { optional: true });
|
|
140
|
+
accordionHCollapseService = inject(SiAccordionHCollapseService, {
|
|
141
|
+
optional: true
|
|
142
|
+
});
|
|
143
|
+
enableAnimation = true;
|
|
144
|
+
animationsGloballyDisabled = areAnimationsDisabled();
|
|
145
|
+
lastScrollPos = 0;
|
|
146
|
+
contentRef = viewChild.required('content');
|
|
147
|
+
constructor() {
|
|
148
|
+
this.isHCollapsible = !!this.accordionHCollapseService;
|
|
149
|
+
this.accordionService?.toggle$
|
|
150
|
+
.pipe(takeUntilDestroyed(this.destroyRef), filter(item => item !== this))
|
|
151
|
+
.subscribe(() => this.openClose(false));
|
|
152
|
+
this.panelToggle.subscribe(open => this.toggle.emit(open));
|
|
153
|
+
}
|
|
154
|
+
get showHide() {
|
|
155
|
+
if (this.enableAnimation && !this.animationsGloballyDisabled) {
|
|
156
|
+
return this.opened() ? 'show' : 'hide';
|
|
157
|
+
}
|
|
158
|
+
return 'disabled';
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Expand/collapse panel.
|
|
162
|
+
* @param open - indicate the panel shall open or close
|
|
163
|
+
* @param enableAnimation - with animation
|
|
164
|
+
*/
|
|
165
|
+
openClose(open, enableAnimation = true) {
|
|
166
|
+
this.opened.set(open);
|
|
167
|
+
this.enableAnimation = enableAnimation;
|
|
168
|
+
if (open) {
|
|
169
|
+
setTimeout(() => {
|
|
170
|
+
this.contentRef().nativeElement.scrollTop = this.lastScrollPos;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this.lastScrollPos = this.contentRef().nativeElement.scrollTop;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
doToggle(event) {
|
|
178
|
+
if (this.disabled()) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
event?.preventDefault();
|
|
182
|
+
const opened = this.opened();
|
|
183
|
+
this.panelToggle.emit(!opened);
|
|
184
|
+
this.openClose(this.hcollapsed() || !opened);
|
|
185
|
+
this.accordionService?.toggle$.next(this);
|
|
186
|
+
if (this.hcollapsed()) {
|
|
187
|
+
this.accordionHCollapseService?.open$.next(this);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
keydown(event) {
|
|
191
|
+
if (event.key === 'Enter' || event.key === 'Space' || event.key === ' ') {
|
|
192
|
+
this.doToggle(undefined);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiCollapsiblePanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
196
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiCollapsiblePanelComponent, isStandalone: true, selector: "si-collapsible-panel", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, headerCssClasses: { classPropertyName: "headerCssClasses", publicName: "headerCssClasses", isSignal: true, isRequired: false, transformFunction: null }, contentBgClasses: { classPropertyName: "contentBgClasses", publicName: "contentBgClasses", isSignal: true, isRequired: false, transformFunction: null }, contentCssClasses: { classPropertyName: "contentCssClasses", publicName: "contentCssClasses", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeColor: { classPropertyName: "badgeColor", publicName: "badgeColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange", panelToggle: "panelToggle", toggle: "toggle" }, host: { properties: { "class": "colorVariant()", "class.opened": "opened()", "class.hcollapsed": "hcollapsed()", "class.full-height": "fullHeight()" } }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"collapsible-header focus-inside px-6\"\n role=\"button\"\n [ngClass]=\"headerCssClasses()\"\n [attr.tabindex]=\"disabled() ? '' : '0'\"\n [id]=\"headerId\"\n [class.open]=\"opened()\"\n [class.disabled]=\"disabled()\"\n [title]=\"hcollapsed() ? (heading() | translate) : ''\"\n [attr.aria-expanded]=\"opened() && !hcollapsed()\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-controls]=\"controlId\"\n [attr.aria-label]=\"hcollapsed() ? (heading() | translate) : ''\"\n (keydown)=\"keydown($event)\"\n (click)=\"doToggle($event)\"\n>\n @let headerIcon = icon();\n @if (headerIcon) {\n <si-icon-next\n class=\"icon ms-n2 me-2\"\n [icon]=\"headerIcon\"\n [class.collapsed-icon]=\"isHCollapsible\"\n />\n }\n @if (icon() && badge() !== undefined && badge() !== '') {\n <span class=\"badge-text\">\n {{ badge() }}\n </span>\n }\n <div class=\"si-title-2 autohide\">\n {{ heading() | translate }}\n <ng-content select=\"[si-panel-heading]\" />\n </div>\n\n @if (badge() !== undefined && badge() !== '') {\n <span class=\"badge autohide\" [ngClass]=\"'bg-' + badgeColor()\">\n {{ badge() }}\n </span>\n }\n <span class=\"ms-auto overflow-hidden\">\n <si-icon-next class=\"icon dropdown-caret\" [icon]=\"icons.elementDown2\" />\n </span>\n</div>\n<div\n #content\n class=\"collapsible-content\"\n role=\"region\"\n [id]=\"controlId\"\n [ngClass]=\"contentBgClasses()\"\n [@showHide]=\"showHide\"\n [attr.aria-labelledby]=\"headerId\"\n [class.full-height]=\"fullHeight()\"\n>\n @if (opened()) {\n <div>\n <div [ngClass]=\"contentCssClasses()\">\n <ng-content />\n </div>\n </div>\n }\n</div>\n", styles: [":host{--__radius: var(--si-accordion-radius, var(--element-button-radius));display:flex;flex-direction:column;background:var(--element-base-0);padding-block-end:2px}:host:not(.hcollapsed) .collapsed-icon,:host:not(.hcollapsed) .badge-text{display:none}:host.hcollapsed{background:var(--element-base-1)}:host.hcollapsed .collapsible-header .autohide,:host.hcollapsed .collapsible-content{display:none}:host.hcollapsed .collapsible-header{padding-block:8px}:host.hcollapsed .collapsible-header:hover{background:var(--element-base-1-hover)}:host.full-height{transition:flex-grow calc(.5s * var(--element-animations-enabled, 1))}:host.full-height.opened,:host.full-height .collapsible-content{flex:1 1 0}:host.full-height .collapsible-content>div{flex:1 0 0}.collapsible-header{display:flex;align-items:center;background:var(--element-base-1);color:var(--element-text-primary);padding-block:12px;border-radius:var(--__radius)}.collapsible-header.disabled{color:var(--element-text-disabled)}.collapsible-header.open{border-end-start-radius:0;border-end-end-radius:0}.collapsible-header:not(.disabled){cursor:pointer}.collapsible-header:not(.disabled):hover{text-decoration:none;background:var(--element-base-1-hover)}.dropdown-caret{transition:transform calc(.5s * var(--element-animations-enabled, 1));color:var(--element-ui-1)}.open .dropdown-caret{transform:rotate(180deg)}.collapsible-content{overflow:hidden;display:flex;flex-direction:column;background:var(--element-base-1);border-end-start-radius:var(--__radius);border-end-end-radius:var(--__radius)}.collapsible-content.full-height{overflow:auto}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i1.SiTranslatePipe, name: "translate" }], animations: [
|
|
197
|
+
trigger('showHide', [
|
|
198
|
+
transition('*=>hide', [
|
|
199
|
+
style({ overflow: 'hidden' }),
|
|
200
|
+
query(':leave', [style({ blockSize: '*' }), animate('0.5s ease', style({ blockSize: '0' }))], { optional: true })
|
|
201
|
+
]),
|
|
202
|
+
transition('*=>show', [
|
|
203
|
+
style({ overflow: 'hidden' }),
|
|
204
|
+
query(':enter', [style({ blockSize: '0' }), animate('0.5s ease', style({ blockSize: '*' }))], { optional: true })
|
|
205
|
+
])
|
|
206
|
+
])
|
|
207
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
208
|
+
}
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiCollapsiblePanelComponent, decorators: [{
|
|
210
|
+
type: Component,
|
|
211
|
+
args: [{ selector: 'si-collapsible-panel', animations: [
|
|
212
|
+
trigger('showHide', [
|
|
213
|
+
transition('*=>hide', [
|
|
214
|
+
style({ overflow: 'hidden' }),
|
|
215
|
+
query(':leave', [style({ blockSize: '*' }), animate('0.5s ease', style({ blockSize: '0' }))], { optional: true })
|
|
216
|
+
]),
|
|
217
|
+
transition('*=>show', [
|
|
218
|
+
style({ overflow: 'hidden' }),
|
|
219
|
+
query(':enter', [style({ blockSize: '0' }), animate('0.5s ease', style({ blockSize: '*' }))], { optional: true })
|
|
220
|
+
])
|
|
221
|
+
])
|
|
222
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, SiIconNextComponent, SiTranslateModule], host: {
|
|
223
|
+
'[class]': 'colorVariant()',
|
|
224
|
+
'[class.opened]': 'opened()',
|
|
225
|
+
'[class.hcollapsed]': 'hcollapsed()',
|
|
226
|
+
'[class.full-height]': 'fullHeight()'
|
|
227
|
+
}, template: "<div\n class=\"collapsible-header focus-inside px-6\"\n role=\"button\"\n [ngClass]=\"headerCssClasses()\"\n [attr.tabindex]=\"disabled() ? '' : '0'\"\n [id]=\"headerId\"\n [class.open]=\"opened()\"\n [class.disabled]=\"disabled()\"\n [title]=\"hcollapsed() ? (heading() | translate) : ''\"\n [attr.aria-expanded]=\"opened() && !hcollapsed()\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-controls]=\"controlId\"\n [attr.aria-label]=\"hcollapsed() ? (heading() | translate) : ''\"\n (keydown)=\"keydown($event)\"\n (click)=\"doToggle($event)\"\n>\n @let headerIcon = icon();\n @if (headerIcon) {\n <si-icon-next\n class=\"icon ms-n2 me-2\"\n [icon]=\"headerIcon\"\n [class.collapsed-icon]=\"isHCollapsible\"\n />\n }\n @if (icon() && badge() !== undefined && badge() !== '') {\n <span class=\"badge-text\">\n {{ badge() }}\n </span>\n }\n <div class=\"si-title-2 autohide\">\n {{ heading() | translate }}\n <ng-content select=\"[si-panel-heading]\" />\n </div>\n\n @if (badge() !== undefined && badge() !== '') {\n <span class=\"badge autohide\" [ngClass]=\"'bg-' + badgeColor()\">\n {{ badge() }}\n </span>\n }\n <span class=\"ms-auto overflow-hidden\">\n <si-icon-next class=\"icon dropdown-caret\" [icon]=\"icons.elementDown2\" />\n </span>\n</div>\n<div\n #content\n class=\"collapsible-content\"\n role=\"region\"\n [id]=\"controlId\"\n [ngClass]=\"contentBgClasses()\"\n [@showHide]=\"showHide\"\n [attr.aria-labelledby]=\"headerId\"\n [class.full-height]=\"fullHeight()\"\n>\n @if (opened()) {\n <div>\n <div [ngClass]=\"contentCssClasses()\">\n <ng-content />\n </div>\n </div>\n }\n</div>\n", styles: [":host{--__radius: var(--si-accordion-radius, var(--element-button-radius));display:flex;flex-direction:column;background:var(--element-base-0);padding-block-end:2px}:host:not(.hcollapsed) .collapsed-icon,:host:not(.hcollapsed) .badge-text{display:none}:host.hcollapsed{background:var(--element-base-1)}:host.hcollapsed .collapsible-header .autohide,:host.hcollapsed .collapsible-content{display:none}:host.hcollapsed .collapsible-header{padding-block:8px}:host.hcollapsed .collapsible-header:hover{background:var(--element-base-1-hover)}:host.full-height{transition:flex-grow calc(.5s * var(--element-animations-enabled, 1))}:host.full-height.opened,:host.full-height .collapsible-content{flex:1 1 0}:host.full-height .collapsible-content>div{flex:1 0 0}.collapsible-header{display:flex;align-items:center;background:var(--element-base-1);color:var(--element-text-primary);padding-block:12px;border-radius:var(--__radius)}.collapsible-header.disabled{color:var(--element-text-disabled)}.collapsible-header.open{border-end-start-radius:0;border-end-end-radius:0}.collapsible-header:not(.disabled){cursor:pointer}.collapsible-header:not(.disabled):hover{text-decoration:none;background:var(--element-base-1-hover)}.dropdown-caret{transition:transform calc(.5s * var(--element-animations-enabled, 1));color:var(--element-ui-1)}.open .dropdown-caret{transform:rotate(180deg)}.collapsible-content{overflow:hidden;display:flex;flex-direction:column;background:var(--element-base-1);border-end-start-radius:var(--__radius);border-end-end-radius:var(--__radius)}.collapsible-content.full-height{overflow:auto}\n"] }]
|
|
228
|
+
}], ctorParameters: () => [] });
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Copyright Siemens 2016 - 2025.
|
|
232
|
+
* SPDX-License-Identifier: MIT
|
|
233
|
+
*/
|
|
234
|
+
const PANEL_MIN_HEIGHT = 100;
|
|
235
|
+
class SiAccordionComponent {
|
|
236
|
+
/** @defaultValue true */
|
|
237
|
+
expandFirstPanel = input(true, { transform: booleanAttribute });
|
|
238
|
+
/** @defaultValue false */
|
|
239
|
+
fullHeight = input(false, { transform: booleanAttribute });
|
|
240
|
+
/** @defaultValue false */
|
|
241
|
+
hcollapsed = input(false);
|
|
242
|
+
/**
|
|
243
|
+
* Color to use for component background
|
|
244
|
+
* @deprecated This has no effect anymore. Will be removed in v48
|
|
245
|
+
**/
|
|
246
|
+
colorVariant = input();
|
|
247
|
+
/**
|
|
248
|
+
* Indicate whether the accordion is collapsed.
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
collapsed = computed(() => this.accordionHCollapseService?.hcollapsed() ?? this.hcollapsed());
|
|
252
|
+
panels = contentChildren(SiCollapsiblePanelComponent);
|
|
253
|
+
responsive = false;
|
|
254
|
+
destroyer = inject(DestroyRef);
|
|
255
|
+
service = inject(SiAccordionService);
|
|
256
|
+
resizeObserver = inject(ResizeObserverService);
|
|
257
|
+
element = inject(ElementRef);
|
|
258
|
+
accordionHCollapseService = inject(SiAccordionHCollapseService, { optional: true });
|
|
259
|
+
ngOnChanges() {
|
|
260
|
+
this.service.fullHeight.set(this.fullHeight() && !this.responsive);
|
|
261
|
+
}
|
|
262
|
+
ngAfterContentInit() {
|
|
263
|
+
this.resizeObserver
|
|
264
|
+
.observe(this.element.nativeElement, 100, true, true)
|
|
265
|
+
.pipe(takeUntilDestroyed(this.destroyer))
|
|
266
|
+
.subscribe(() => this.calcFullHeight());
|
|
267
|
+
this.panels().at(0)?.openClose(this.expandFirstPanel(), false);
|
|
268
|
+
}
|
|
269
|
+
calcFullHeight() {
|
|
270
|
+
if (this.panels?.length) {
|
|
271
|
+
const height = this.element.nativeElement.offsetHeight;
|
|
272
|
+
this.responsive = !this.hcollapsed() && height < this.panels.length * PANEL_MIN_HEIGHT;
|
|
273
|
+
this.service.fullHeight.set(this.fullHeight() && !this.responsive);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
277
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.6", type: SiAccordionComponent, isStandalone: true, selector: "si-accordion", inputs: { expandFirstPanel: { classPropertyName: "expandFirstPanel", publicName: "expandFirstPanel", isSignal: true, isRequired: false, transformFunction: null }, fullHeight: { classPropertyName: "fullHeight", publicName: "fullHeight", isSignal: true, isRequired: false, transformFunction: null }, hcollapsed: { classPropertyName: "hcollapsed", publicName: "hcollapsed", isSignal: true, isRequired: false, transformFunction: null }, colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.full-height": "fullHeight()", "class.hcollapsed": "collapsed()" } }, providers: [SiAccordionService], queries: [{ propertyName: "panels", predicate: SiCollapsiblePanelComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: '<div><ng-content /></div>', isInline: true, styles: [":host,:host>div{display:flex;flex-direction:column}:host.full-height{block-size:100%}:host.full-height>div{overflow-y:auto;flex:1 1 0}:host.full-height.hcollapsed>div{overflow-y:unset;flex-basis:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
278
|
+
}
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionComponent, decorators: [{
|
|
280
|
+
type: Component,
|
|
281
|
+
args: [{ selector: 'si-accordion', template: '<div><ng-content /></div>', providers: [SiAccordionService], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
282
|
+
'[class.full-height]': 'fullHeight()',
|
|
283
|
+
'[class.hcollapsed]': 'collapsed()'
|
|
284
|
+
}, styles: [":host,:host>div{display:flex;flex-direction:column}:host.full-height{block-size:100%}:host.full-height>div{overflow-y:auto;flex:1 1 0}:host.full-height.hcollapsed>div{overflow-y:unset;flex-basis:auto}\n"] }]
|
|
285
|
+
}] });
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Copyright Siemens 2016 - 2025.
|
|
289
|
+
* SPDX-License-Identifier: MIT
|
|
290
|
+
*/
|
|
291
|
+
class SiAccordionModule {
|
|
292
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
293
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionModule, imports: [SiAccordionComponent, SiCollapsiblePanelComponent], exports: [SiAccordionComponent, SiCollapsiblePanelComponent] });
|
|
294
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionModule, imports: [SiCollapsiblePanelComponent] });
|
|
295
|
+
}
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiAccordionModule, decorators: [{
|
|
297
|
+
type: NgModule,
|
|
298
|
+
args: [{
|
|
299
|
+
imports: [SiAccordionComponent, SiCollapsiblePanelComponent],
|
|
300
|
+
exports: [SiAccordionComponent, SiCollapsiblePanelComponent]
|
|
301
|
+
}]
|
|
302
|
+
}] });
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Copyright Siemens 2016 - 2025.
|
|
306
|
+
* SPDX-License-Identifier: MIT
|
|
307
|
+
*/
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Generated bundle index. Do not edit.
|
|
311
|
+
*/
|
|
312
|
+
|
|
313
|
+
export { SiAccordionComponent, SiAccordionHCollapseService, SiAccordionModule, SiAccordionService, SiCollapsiblePanelComponent };
|
|
314
|
+
//# sourceMappingURL=siemens-element-ng-accordion.mjs.map
|