@siemens/element-ng 49.13.0 → 51.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +56 -39
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +81 -51
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +15 -12
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +142 -137
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +31 -21
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +18 -15
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +71 -46
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +55 -32
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +175 -111
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +37 -24
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +24 -16
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +52 -33
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +12 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +35 -26
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +327 -213
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +8 -8
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +119 -72
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +358 -234
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +21 -16
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +93 -81
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +29 -22
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +243 -147
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +267 -84
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +220 -315
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +38 -29
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +5 -5
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +46 -47
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +19 -15
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +118 -72
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +73 -54
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +42 -33
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +46 -29
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +6 -5
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +56 -48
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +12 -10
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +133 -94
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +117 -81
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +67 -41
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +38 -27
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +31 -22
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +18 -13
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +121 -138
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +76 -45
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +63 -58
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +33 -26
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +32 -24
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +212 -154
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +3 -3
- package/fesm2022/siemens-element-ng-side-panel.mjs +119 -75
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +14 -13
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +42 -28
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +268 -254
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +57 -47
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +22 -14
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +11 -8
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +16 -15
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +59 -45
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +5 -4
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +59 -40
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +45 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +52 -54
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +28 -19
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +92 -73
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +75 -67
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +72 -48
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/package.json +20 -22
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/element-class-changes.js +1 -28
- package/schematics/migrations/data/element-migration-data.js +2 -0
- package/schematics/migrations/data/element-selectors.js +1 -11
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +9 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +7 -7
- package/schematics/migrations/data/symbol-renaming.js +1 -48
- package/schematics/migrations/element-migration/element-migration.js +3 -6
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +2 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/{migrate-to-v49.js → migrate-to-v51.js} +2 -2
- package/template-i18n.json +3 -6
- package/types/siemens-element-ng-application-header.d.ts +1 -21
- package/types/siemens-element-ng-chat-messages.d.ts +6 -4
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +1 -12
- package/types/siemens-element-ng-file-uploader.d.ts +5 -23
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-form.d.ts +134 -37
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +6 -1
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +5 -8
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-split.d.ts +95 -63
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-translate.d.ts +1 -5
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -18,45 +18,53 @@ import { SiTranslatePipe } from '@siemens/element-translate-ng/translate';
|
|
|
18
18
|
* This component represents a single notification that can be used within notification
|
|
19
19
|
* centers, popovers, or other containers. It supports various action types including
|
|
20
20
|
* router links, standard links, action buttons, and menus.
|
|
21
|
+
*
|
|
22
|
+
* @deprecated Use the CSS-based list item component instead.
|
|
21
23
|
*/
|
|
22
24
|
class SiNotificationItemComponent {
|
|
23
25
|
icons = addIcons({ elementOptionsVertical });
|
|
24
26
|
/**
|
|
25
27
|
* The timestamp of the notification item.
|
|
26
28
|
*/
|
|
27
|
-
timeStamp = input.required(
|
|
29
|
+
timeStamp = input.required(/* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "timeStamp" }] : /* istanbul ignore next */ []));
|
|
28
31
|
/**
|
|
29
32
|
* The heading of the notification item.
|
|
30
33
|
*/
|
|
31
|
-
heading = input.required(
|
|
34
|
+
heading = input.required(/* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
32
36
|
/**
|
|
33
37
|
* Optional translatable description.
|
|
34
38
|
*/
|
|
35
|
-
description = input(
|
|
39
|
+
description = input(/* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [undefined, { debugName: "description" }] : /* istanbul ignore next */ []));
|
|
36
41
|
/**
|
|
37
42
|
* Unread messages are emphasized with a bolder font.
|
|
38
43
|
*
|
|
39
44
|
* @defaultValue false
|
|
40
45
|
*/
|
|
41
|
-
unread = input(false, { ...(ngDevMode ? { debugName: "unread" } : {}), transform: booleanAttribute });
|
|
46
|
+
unread = input(false, { ...(ngDevMode ? { debugName: "unread" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
42
47
|
/**
|
|
43
48
|
* Link to the source or relevant information of the notification,
|
|
44
49
|
* which triggers when clicking on the notification item text area.
|
|
45
50
|
*/
|
|
46
|
-
itemLink = input(
|
|
51
|
+
itemLink = input(/* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [undefined, { debugName: "itemLink" }] : /* istanbul ignore next */ []));
|
|
47
53
|
/**
|
|
48
54
|
* Actions that are displayed below the text of the notification.
|
|
49
55
|
*/
|
|
50
|
-
quickActions = input(
|
|
56
|
+
quickActions = input(/* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [undefined, { debugName: "quickActions" }] : /* istanbul ignore next */ []));
|
|
51
58
|
/**
|
|
52
59
|
* Action that is displayed on the right side of the notification.
|
|
53
60
|
*/
|
|
54
|
-
primaryAction = input(
|
|
61
|
+
primaryAction = input(/* @ts-ignore */
|
|
62
|
+
...(ngDevMode ? [undefined, { debugName: "primaryAction" }] : /* istanbul ignore next */ []));
|
|
55
63
|
activatedRoute = inject(ActivatedRoute, { optional: true });
|
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
57
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiNotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiNotificationItemComponent, isStandalone: true, selector: "si-notification-item", inputs: { timeStamp: { classPropertyName: "timeStamp", publicName: "timeStamp", isSignal: true, isRequired: true, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, unread: { classPropertyName: "unread", publicName: "unread", isSignal: true, isRequired: false, transformFunction: null }, itemLink: { classPropertyName: "itemLink", publicName: "itemLink", isSignal: true, isRequired: false, transformFunction: null }, quickActions: { classPropertyName: "quickActions", publicName: "quickActions", isSignal: true, isRequired: false, transformFunction: null }, primaryAction: { classPropertyName: "primaryAction", publicName: "primaryAction", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"notification-item px-6 py-5\">\n <div class=\"notification-item-indicator\">\n <div>\n @if (unread()) {\n <span class=\"dot\"></span>\n }\n <ng-content select=\"si-avatar,si-circle-status,si-icon,si-status-icon\" />\n </div>\n </div>\n\n <div class=\"notification-item-content\">\n @let itemLinkValue = itemLink();\n @if (itemLinkValue) {\n @switch (itemLinkValue.type) {\n @case ('link') {\n <a\n [href]=\"itemLinkValue.href\"\n [target]=\"itemLinkValue.target\"\n [attr.aria-label]=\"heading() + ' link'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </a>\n }\n @case ('router-link') {\n <a\n [routerLink]=\"itemLinkValue.routerLink\"\n [queryParams]=\"itemLinkValue.extras?.queryParams\"\n [queryParamsHandling]=\"itemLinkValue.extras?.queryParamsHandling\"\n [fragment]=\"itemLinkValue.extras?.fragment\"\n [state]=\"itemLinkValue.extras?.state\"\n [relativeTo]=\"itemLinkValue.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"itemLinkValue.extras?.preserveFragment\"\n [skipLocationChange]=\"itemLinkValue.extras?.skipLocationChange\"\n [replaceUrl]=\"itemLinkValue.extras?.replaceUrl\"\n [attr.aria-label]=\"heading() + ' link'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </a>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"content\" />\n }\n </div>\n\n @let primaryActionValue = primaryAction();\n @if (primaryActionValue) {\n <div class=\"notification-item-primary-action\">\n @if (primaryActionValue.type === 'menu') {\n <ng-container *ngTemplateOutlet=\"menu; context: { $implicit: primaryActionValue }\" />\n } @else if (primaryActionValue.type === 'action-button') {\n <button\n type=\"button\"\n class=\"btn btn-tertiary\"\n (click)=\"primaryActionValue.action(primaryActionValue)\"\n >{{ primaryActionValue.label | translate }}</button\n >\n } @else {\n <ng-container *ngTemplateOutlet=\"action; context: { $implicit: primaryActionValue }\" />\n }\n </div>\n } @else {\n <div class=\"notification-item-primary-action\">\n <ng-content select=\"[action]\" />\n </div>\n }\n\n @let quickActionsValue = quickActions();\n @if (quickActionsValue) {\n <div class=\"notification-item-quick-actions\">\n @for (quickAction of quickActionsValue; track $index) {\n <ng-container *ngTemplateOutlet=\"action; context: { $implicit: quickAction }\" />\n }\n </div>\n } @else {\n <div class=\"notification-item-quick-actions\">\n <ng-content select=\"[quick-actions]\" />\n </div>\n }\n</div>\n\n<ng-template #action let-action>\n @switch (action.type) {\n @case ('action-circle-button') {\n <ng-container *ngTemplateOutlet=\"actionButton; context: { $implicit: action }\" />\n }\n @case ('action-icon-button') {\n <ng-container *ngTemplateOutlet=\"actionButton; context: { $implicit: action }\" />\n }\n @case ('router-link') {\n <ng-container *ngTemplateOutlet=\"routerLink; context: { $implicit: action }\" />\n }\n @case ('link') {\n <ng-container *ngTemplateOutlet=\"link; context: { $implicit: action }\" />\n }\n }\n</ng-template>\n\n<ng-template #content>\n <div class=\"d-flex flex-column gap-3 text-body\">\n <span class=\"si-body text-secondary\">{{ timeStamp() | translate }}</span>\n <span [class.si-h5-bold]=\"unread()\" [class.si-h5]=\"!unread()\">{{ heading() | translate }}</span>\n @if (description()) {\n <span class=\"si-body\">{{ description() | translate }}</span>\n }\n <div class=\"si-body\">\n <ng-content select=\"[description]\" />\n </div>\n </div>\n</ng-template>\n\n<ng-template #actionButton let-action>\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [attr.aria-label]=\"action.ariaLabel\"\n (click)=\"action.action(action)\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </button>\n</ng-template>\n\n<ng-template #routerLink let-action>\n <a\n class=\"btn btn-tertiary-ghost p-2 btn-icon\"\n [routerLink]=\"action.routerLink\"\n [queryParams]=\"action.extras?.queryParams\"\n [queryParamsHandling]=\"action.extras?.queryParamsHandling\"\n [fragment]=\"action.extras?.fragment\"\n [state]=\"action.extras?.state\"\n [relativeTo]=\"action.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"action.extras?.preserveFragment\"\n [skipLocationChange]=\"action.extras?.skipLocationChange\"\n [replaceUrl]=\"action.extras?.replaceUrl\"\n [attr.aria-label]=\"action.ariaLabel\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </a>\n</ng-template>\n\n<ng-template #link let-action>\n <a\n class=\"btn btn-tertiary-ghost p-2 btn-icon\"\n [href]=\"action.href\"\n [target]=\"action.target\"\n [attr.aria-label]=\"action.ariaLabel\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </a>\n</ng-template>\n\n<ng-template #menu let-action>\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [attr.aria-label]=\"heading() + ' dropdown'\"\n [cdkMenuTriggerFor]=\"actionMenu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #actionMenu>\n <si-menu-factory [items]=\"action.menuItems\" />\n </ng-template>\n</ng-template>\n", styles: ["div:empty{display:none!important}div:has(.notification-item-content a):hover{background-color:var(--element-base-1-hover)}.notification-item{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto auto}.notification-item a{text-decoration:none}.notification-item a:focus-visible div{outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}.notification-item-indicator{grid-column:1;grid-row:1}.notification-item-indicator div{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center}.notification-item-indicator:has(si-avatar){margin-inline-end:16px}.notification-item-indicator:has(si-circle-status){margin-inline-end:4px}.notification-item-indicator:not(:has(si-avatar,si-circle-status)):has(si-icon){margin-inline-end:8px;margin-block-start:calc(1lh + 4px)}.notification-item-indicator:not(:has(si-avatar,si-circle-status,si-icon)){inline-size:0;margin-block-start:calc(1lh + 6px)}.notification-item-indicator:not(:has(si-avatar,si-circle-status,si-icon)) div{block-size:1rem}.notification-item-content{grid-column:2;grid-row:1;flex-grow:1}.notification-item-primary-action{grid-column:3;grid-row:1/span 2;display:flex;align-items:center;margin-inline-start:8px}.notification-item-quick-actions{grid-column:2;grid-row:2;display:flex;gap:8px;margin-block-start:8px}.dot{display:block;position:absolute;block-size:6px;inline-size:6px;border-radius:50%;background-color:var(--element-ui-1);inset-inline-start:-10px}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
58
66
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiNotificationItemComponent, decorators: [{
|
|
60
68
|
type: Component,
|
|
61
69
|
args: [{ selector: 'si-notification-item', imports: [
|
|
62
70
|
SiTranslatePipe,
|
|
@@ -65,7 +73,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
65
73
|
SiMenuFactoryComponent,
|
|
66
74
|
CdkMenuTrigger,
|
|
67
75
|
SiIconComponent
|
|
68
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
76
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<div class=\"notification-item px-6 py-5\">\n <div class=\"notification-item-indicator\">\n <div>\n @if (unread()) {\n <span class=\"dot\"></span>\n }\n <ng-content select=\"si-avatar,si-circle-status,si-icon,si-status-icon\" />\n </div>\n </div>\n\n <div class=\"notification-item-content\">\n @let itemLinkValue = itemLink();\n @if (itemLinkValue) {\n @switch (itemLinkValue.type) {\n @case ('link') {\n <a\n [href]=\"itemLinkValue.href\"\n [target]=\"itemLinkValue.target\"\n [attr.aria-label]=\"heading() + ' link'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </a>\n }\n @case ('router-link') {\n <a\n [routerLink]=\"itemLinkValue.routerLink\"\n [queryParams]=\"itemLinkValue.extras?.queryParams\"\n [queryParamsHandling]=\"itemLinkValue.extras?.queryParamsHandling\"\n [fragment]=\"itemLinkValue.extras?.fragment\"\n [state]=\"itemLinkValue.extras?.state\"\n [relativeTo]=\"itemLinkValue.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"itemLinkValue.extras?.preserveFragment\"\n [skipLocationChange]=\"itemLinkValue.extras?.skipLocationChange\"\n [replaceUrl]=\"itemLinkValue.extras?.replaceUrl\"\n [attr.aria-label]=\"heading() + ' link'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </a>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"content\" />\n }\n </div>\n\n @let primaryActionValue = primaryAction();\n @if (primaryActionValue) {\n <div class=\"notification-item-primary-action\">\n @if (primaryActionValue.type === 'menu') {\n <ng-container *ngTemplateOutlet=\"menu; context: { $implicit: primaryActionValue }\" />\n } @else if (primaryActionValue.type === 'action-button') {\n <button\n type=\"button\"\n class=\"btn btn-tertiary\"\n (click)=\"primaryActionValue.action(primaryActionValue)\"\n >{{ primaryActionValue.label | translate }}</button\n >\n } @else {\n <ng-container *ngTemplateOutlet=\"action; context: { $implicit: primaryActionValue }\" />\n }\n </div>\n } @else {\n <div class=\"notification-item-primary-action\">\n <ng-content select=\"[action]\" />\n </div>\n }\n\n @let quickActionsValue = quickActions();\n @if (quickActionsValue) {\n <div class=\"notification-item-quick-actions\">\n @for (quickAction of quickActionsValue; track $index) {\n <ng-container *ngTemplateOutlet=\"action; context: { $implicit: quickAction }\" />\n }\n </div>\n } @else {\n <div class=\"notification-item-quick-actions\">\n <ng-content select=\"[quick-actions]\" />\n </div>\n }\n</div>\n\n<ng-template #action let-action>\n @switch (action.type) {\n @case ('action-circle-button') {\n <ng-container *ngTemplateOutlet=\"actionButton; context: { $implicit: action }\" />\n }\n @case ('action-icon-button') {\n <ng-container *ngTemplateOutlet=\"actionButton; context: { $implicit: action }\" />\n }\n @case ('router-link') {\n <ng-container *ngTemplateOutlet=\"routerLink; context: { $implicit: action }\" />\n }\n @case ('link') {\n <ng-container *ngTemplateOutlet=\"link; context: { $implicit: action }\" />\n }\n }\n</ng-template>\n\n<ng-template #content>\n <div class=\"d-flex flex-column gap-3 text-body\">\n <span class=\"si-body text-secondary\">{{ timeStamp() | translate }}</span>\n <span [class.si-h5-bold]=\"unread()\" [class.si-h5]=\"!unread()\">{{ heading() | translate }}</span>\n @if (description()) {\n <span class=\"si-body\">{{ description() | translate }}</span>\n }\n <div class=\"si-body\">\n <ng-content select=\"[description]\" />\n </div>\n </div>\n</ng-template>\n\n<ng-template #actionButton let-action>\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [attr.aria-label]=\"action.ariaLabel\"\n (click)=\"action.action(action)\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </button>\n</ng-template>\n\n<ng-template #routerLink let-action>\n <a\n class=\"btn btn-tertiary-ghost p-2 btn-icon\"\n [routerLink]=\"action.routerLink\"\n [queryParams]=\"action.extras?.queryParams\"\n [queryParamsHandling]=\"action.extras?.queryParamsHandling\"\n [fragment]=\"action.extras?.fragment\"\n [state]=\"action.extras?.state\"\n [relativeTo]=\"action.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"action.extras?.preserveFragment\"\n [skipLocationChange]=\"action.extras?.skipLocationChange\"\n [replaceUrl]=\"action.extras?.replaceUrl\"\n [attr.aria-label]=\"action.ariaLabel\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </a>\n</ng-template>\n\n<ng-template #link let-action>\n <a\n class=\"btn btn-tertiary-ghost p-2 btn-icon\"\n [href]=\"action.href\"\n [target]=\"action.target\"\n [attr.aria-label]=\"action.ariaLabel\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </a>\n</ng-template>\n\n<ng-template #menu let-action>\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [attr.aria-label]=\"heading() + ' dropdown'\"\n [cdkMenuTriggerFor]=\"actionMenu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #actionMenu>\n <si-menu-factory [items]=\"action.menuItems\" />\n </ng-template>\n</ng-template>\n", styles: ["div:empty{display:none!important}div:has(.notification-item-content a):hover{background-color:var(--element-base-1-hover)}.notification-item{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto auto}.notification-item a{text-decoration:none}.notification-item a:focus-visible div{outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}.notification-item-indicator{grid-column:1;grid-row:1}.notification-item-indicator div{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center}.notification-item-indicator:has(si-avatar){margin-inline-end:16px}.notification-item-indicator:has(si-circle-status){margin-inline-end:4px}.notification-item-indicator:not(:has(si-avatar,si-circle-status)):has(si-icon){margin-inline-end:8px;margin-block-start:calc(1lh + 4px)}.notification-item-indicator:not(:has(si-avatar,si-circle-status,si-icon)){inline-size:0;margin-block-start:calc(1lh + 6px)}.notification-item-indicator:not(:has(si-avatar,si-circle-status,si-icon)) div{block-size:1rem}.notification-item-content{grid-column:2;grid-row:1;flex-grow:1}.notification-item-primary-action{grid-column:3;grid-row:1/span 2;display:flex;align-items:center;margin-inline-start:8px}.notification-item-quick-actions{grid-column:2;grid-row:2;display:flex;gap:8px;margin-block-start:8px}.dot{display:block;position:absolute;block-size:6px;inline-size:6px;border-radius:50%;background-color:var(--element-ui-1);inset-inline-start:-10px}\n"] }]
|
|
69
77
|
}], propDecorators: { timeStamp: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeStamp", required: true }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], unread: [{ type: i0.Input, args: [{ isSignal: true, alias: "unread", required: false }] }], itemLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemLink", required: false }] }], quickActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "quickActions", required: false }] }], primaryAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryAction", required: false }] }] } });
|
|
70
78
|
|
|
71
79
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-notification-item.mjs","sources":["../../../../projects/element-ng/notification-item/si-notification-item.component.ts","../../../../projects/element-ng/notification-item/si-notification-item.component.html","../../../../projects/element-ng/notification-item/index.ts","../../../../projects/element-ng/notification-item/siemens-element-ng-notification-item.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkMenuTrigger } from '@angular/cdk/menu';\nimport { CommonModule } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport { ActivatedRoute, RouterModule, type NavigationExtras } from '@angular/router';\nimport { elementOptionsVertical } from '@siemens/element-icons';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiMenuFactoryComponent, type MenuItem } from '@siemens/element-ng/menu';\nimport { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';\n\n/**\n * Interface for a router link in a notification item.\n * @param type - The type of the link, always 'router-link'.\n * @param routerLink - The router link to navigate to.\n * @param extras - Optional navigation extras for the router.\n */\nexport interface NotificationItemRouterLink {\n type: 'router-link';\n routerLink: string | any[];\n extras?: NavigationExtras;\n}\n\n/**\n * Interface for a standard link in a notification item.\n * @param type - The type of the link, always 'link'.\n * @param href - The URL to navigate to.\n * @param target - Optional target attribute for the link.\n */\nexport interface NotificationItemLink {\n type: 'link';\n href: string;\n target?: string;\n}\n\n/**\n * Base interface for notification item actions.\n * @param ariaLabel - The ARIA label for accessibility.\n * @param icon - The icon to display for the action.\n */\nexport interface NotificationItemBase {\n ariaLabel: TranslatableString;\n icon: string;\n}\n\n/**\n * Interface for an action circle button in a notification item.\n * @param type - The type of the action, always 'action-circle-button'.\n * @param customClass - Optional custom CSS class for styling.\n * @param action - The action to perform when the button is clicked.\n * @deprecated Use NotificationItemActionIconButton instead. This will be removed in a future release.\n */\nexport interface NotificationItemActionCircleButton extends NotificationItemBase {\n type: 'action-circle-button';\n customClass?: string;\n action: (source: this) => void;\n}\n\n/**\n * Interface for an action icon button in a notification item.\n * @param type - The type of the action, always 'action-icon-button'.\n * @param customClass - Optional custom CSS class for styling.\n * @param action - The action to perform when the button is clicked.\n */\nexport interface NotificationItemActionIconButton extends NotificationItemBase {\n type: 'action-icon-button';\n customClass?: string;\n action: (source: this) => void;\n}\n\n/**\n * Interface for a router link with an icon in a notification item.\n * @param type - The type of the link, always 'router-link'.\n * @param routerLink - The router link to navigate to.\n * @param extras - Optional navigation extras for the router.\n */\nexport interface NotificationItemRouterLinkIcon extends NotificationItemBase {\n type: 'router-link';\n routerLink: string | any[];\n extras?: NavigationExtras;\n}\n\n/**\n * Interface for a standard link with an icon in a notification item.\n * @param type - The type of the link, always 'link'.\n * @param href - The URL to navigate to.\n * @param target - Optional target attribute for the link.\n */\nexport interface NotificationItemLinkIcon extends NotificationItemBase {\n type: 'link';\n href: string;\n target?: string;\n}\n\n/**\n * Interface for an action button in a notification item.\n * @param type - The type of the action, always 'action-button'.\n * @param label - The label to display on the button.\n * @param action - The action to perform when the button is clicked.\n */\nexport interface NotificationItemActionButton {\n type: 'action-button';\n label: TranslatableString;\n action: (source: this) => void;\n}\n\n/**\n * Interface for a menu in a notification item.\n * @param type - The type of the action, always 'menu'.\n * @param menuItems - The menu items to display in the menu.\n */\nexport interface NotificationItemMenu {\n type: 'menu';\n menuItems: MenuItem[];\n}\n\n/**\n * Union type for quick actions in a notification item.\n */\nexport type NotificationItemQuickAction =\n | NotificationItemActionCircleButton\n | NotificationItemActionIconButton\n | NotificationItemLinkIcon\n | NotificationItemRouterLinkIcon;\n\n/**\n * Union type for primary actions in a notification item.\n */\nexport type NotificationItemPrimaryAction =\n | NotificationItemActionCircleButton\n | NotificationItemActionIconButton\n | NotificationItemLinkIcon\n | NotificationItemRouterLinkIcon\n | NotificationItemMenu\n | NotificationItemActionButton;\n\n/**\n * This component represents a single notification that can be used within notification\n * centers, popovers, or other containers. It supports various action types including\n * router links, standard links, action buttons, and menus.\n */\n@Component({\n selector: 'si-notification-item',\n imports: [\n SiTranslatePipe,\n RouterModule,\n CommonModule,\n SiMenuFactoryComponent,\n CdkMenuTrigger,\n SiIconComponent\n ],\n templateUrl: './si-notification-item.component.html',\n styleUrl: './si-notification-item.component.scss',\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class SiNotificationItemComponent {\n protected readonly icons = addIcons({ elementOptionsVertical });\n\n /**\n * The timestamp of the notification item.\n */\n readonly timeStamp = input.required<TranslatableString>();\n /**\n * The heading of the notification item.\n */\n readonly heading = input.required<TranslatableString>();\n /**\n * Optional translatable description.\n */\n readonly description = input<TranslatableString>();\n /**\n * Unread messages are emphasized with a bolder font.\n *\n * @defaultValue false\n */\n readonly unread = input(false, { transform: booleanAttribute });\n /**\n * Link to the source or relevant information of the notification,\n * which triggers when clicking on the notification item text area.\n */\n readonly itemLink = input<NotificationItemRouterLink | NotificationItemLink>();\n /**\n * Actions that are displayed below the text of the notification.\n */\n readonly quickActions = input<NotificationItemQuickAction[]>();\n /**\n * Action that is displayed on the right side of the notification.\n */\n readonly primaryAction = input<NotificationItemPrimaryAction>();\n\n protected readonly activatedRoute = inject(ActivatedRoute, { optional: true });\n}\n","<div class=\"notification-item px-6 py-5\">\n <div class=\"notification-item-indicator\">\n <div>\n @if (unread()) {\n <span class=\"dot\"></span>\n }\n <ng-content select=\"si-avatar,si-circle-status,si-icon,si-status-icon\" />\n </div>\n </div>\n\n <div class=\"notification-item-content\">\n @let itemLinkValue = itemLink();\n @if (itemLinkValue) {\n @switch (itemLinkValue.type) {\n @case ('link') {\n <a\n [href]=\"itemLinkValue.href\"\n [target]=\"itemLinkValue.target\"\n [attr.aria-label]=\"heading() + ' link'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </a>\n }\n @case ('router-link') {\n <a\n [routerLink]=\"itemLinkValue.routerLink\"\n [queryParams]=\"itemLinkValue.extras?.queryParams\"\n [queryParamsHandling]=\"itemLinkValue.extras?.queryParamsHandling\"\n [fragment]=\"itemLinkValue.extras?.fragment\"\n [state]=\"itemLinkValue.extras?.state\"\n [relativeTo]=\"itemLinkValue.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"itemLinkValue.extras?.preserveFragment\"\n [skipLocationChange]=\"itemLinkValue.extras?.skipLocationChange\"\n [replaceUrl]=\"itemLinkValue.extras?.replaceUrl\"\n [attr.aria-label]=\"heading() + ' link'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </a>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"content\" />\n }\n </div>\n\n @let primaryActionValue = primaryAction();\n @if (primaryActionValue) {\n <div class=\"notification-item-primary-action\">\n @if (primaryActionValue.type === 'menu') {\n <ng-container *ngTemplateOutlet=\"menu; context: { $implicit: primaryActionValue }\" />\n } @else if (primaryActionValue.type === 'action-button') {\n <button\n type=\"button\"\n class=\"btn btn-tertiary\"\n (click)=\"primaryActionValue.action(primaryActionValue)\"\n >{{ primaryActionValue.label | translate }}</button\n >\n } @else {\n <ng-container *ngTemplateOutlet=\"action; context: { $implicit: primaryActionValue }\" />\n }\n </div>\n } @else {\n <div class=\"notification-item-primary-action\">\n <ng-content select=\"[action]\" />\n </div>\n }\n\n @let quickActionsValue = quickActions();\n @if (quickActionsValue) {\n <div class=\"notification-item-quick-actions\">\n @for (quickAction of quickActionsValue; track $index) {\n <ng-container *ngTemplateOutlet=\"action; context: { $implicit: quickAction }\" />\n }\n </div>\n } @else {\n <div class=\"notification-item-quick-actions\">\n <ng-content select=\"[quick-actions]\" />\n </div>\n }\n</div>\n\n<ng-template #action let-action>\n @switch (action.type) {\n @case ('action-circle-button') {\n <ng-container *ngTemplateOutlet=\"actionButton; context: { $implicit: action }\" />\n }\n @case ('action-icon-button') {\n <ng-container *ngTemplateOutlet=\"actionButton; context: { $implicit: action }\" />\n }\n @case ('router-link') {\n <ng-container *ngTemplateOutlet=\"routerLink; context: { $implicit: action }\" />\n }\n @case ('link') {\n <ng-container *ngTemplateOutlet=\"link; context: { $implicit: action }\" />\n }\n }\n</ng-template>\n\n<ng-template #content>\n <div class=\"d-flex flex-column gap-3 text-body\">\n <span class=\"si-body text-secondary\">{{ timeStamp() | translate }}</span>\n <span [class.si-h5-bold]=\"unread()\" [class.si-h5]=\"!unread()\">{{ heading() | translate }}</span>\n @if (description()) {\n <span class=\"si-body\">{{ description() | translate }}</span>\n }\n <div class=\"si-body\">\n <ng-content select=\"[description]\" />\n </div>\n </div>\n</ng-template>\n\n<ng-template #actionButton let-action>\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [attr.aria-label]=\"action.ariaLabel\"\n (click)=\"action.action(action)\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </button>\n</ng-template>\n\n<ng-template #routerLink let-action>\n <a\n class=\"btn btn-tertiary-ghost p-2 btn-icon\"\n [routerLink]=\"action.routerLink\"\n [queryParams]=\"action.extras?.queryParams\"\n [queryParamsHandling]=\"action.extras?.queryParamsHandling\"\n [fragment]=\"action.extras?.fragment\"\n [state]=\"action.extras?.state\"\n [relativeTo]=\"action.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"action.extras?.preserveFragment\"\n [skipLocationChange]=\"action.extras?.skipLocationChange\"\n [replaceUrl]=\"action.extras?.replaceUrl\"\n [attr.aria-label]=\"action.ariaLabel\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </a>\n</ng-template>\n\n<ng-template #link let-action>\n <a\n class=\"btn btn-tertiary-ghost p-2 btn-icon\"\n [href]=\"action.href\"\n [target]=\"action.target\"\n [attr.aria-label]=\"action.ariaLabel\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </a>\n</ng-template>\n\n<ng-template #menu let-action>\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [attr.aria-label]=\"heading() + ' dropdown'\"\n [cdkMenuTriggerFor]=\"actionMenu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #actionMenu>\n <si-menu-factory [items]=\"action.menuItems\" />\n </ng-template>\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-notification-item.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAuIH;;;;AAIG;MAeU,2BAA2B,CAAA;AACnB,IAAA,KAAK,GAAG,QAAQ,CAAC,EAAE,sBAAsB,EAAE,CAAC;AAE/D;;AAEG;AACM,IAAA,SAAS,GAAG,KAAK,CAAC,QA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;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-notification-item.mjs","sources":["../../../../projects/element-ng/notification-item/si-notification-item.component.ts","../../../../projects/element-ng/notification-item/si-notification-item.component.html","../../../../projects/element-ng/notification-item/index.ts","../../../../projects/element-ng/notification-item/siemens-element-ng-notification-item.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkMenuTrigger } from '@angular/cdk/menu';\nimport { CommonModule } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport { ActivatedRoute, RouterModule, type NavigationExtras } from '@angular/router';\nimport { elementOptionsVertical } from '@siemens/element-icons';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiMenuFactoryComponent, type MenuItem } from '@siemens/element-ng/menu';\nimport { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';\n\n/**\n * Interface for a router link in a notification item.\n * @param type - The type of the link, always 'router-link'.\n * @param routerLink - The router link to navigate to.\n * @param extras - Optional navigation extras for the router.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport interface NotificationItemRouterLink {\n type: 'router-link';\n routerLink: string | any[];\n extras?: NavigationExtras;\n}\n\n/**\n * Interface for a standard link in a notification item.\n * @param type - The type of the link, always 'link'.\n * @param href - The URL to navigate to.\n * @param target - Optional target attribute for the link.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport interface NotificationItemLink {\n type: 'link';\n href: string;\n target?: string;\n}\n\n/**\n * Base interface for notification item actions.\n * @param ariaLabel - The ARIA label for accessibility.\n * @param icon - The icon to display for the action.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport interface NotificationItemBase {\n ariaLabel: TranslatableString;\n icon: string;\n}\n\n/**\n * Interface for an action circle button in a notification item.\n * @param type - The type of the action, always 'action-circle-button'.\n * @param customClass - Optional custom CSS class for styling.\n * @param action - The action to perform when the button is clicked.\n * @deprecated Use NotificationItemActionIconButton instead. This will be removed in a future release.\n */\nexport interface NotificationItemActionCircleButton extends NotificationItemBase {\n type: 'action-circle-button';\n customClass?: string;\n action: (source: this) => void;\n}\n\n/**\n * Interface for an action icon button in a notification item.\n * @param type - The type of the action, always 'action-icon-button'.\n * @param customClass - Optional custom CSS class for styling.\n * @param action - The action to perform when the button is clicked.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport interface NotificationItemActionIconButton extends NotificationItemBase {\n type: 'action-icon-button';\n customClass?: string;\n action: (source: this) => void;\n}\n\n/**\n * Interface for a router link with an icon in a notification item.\n * @param type - The type of the link, always 'router-link'.\n * @param routerLink - The router link to navigate to.\n * @param extras - Optional navigation extras for the router.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport interface NotificationItemRouterLinkIcon extends NotificationItemBase {\n type: 'router-link';\n routerLink: string | any[];\n extras?: NavigationExtras;\n}\n\n/**\n * Interface for a standard link with an icon in a notification item.\n * @param type - The type of the link, always 'link'.\n * @param href - The URL to navigate to.\n * @param target - Optional target attribute for the link.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport interface NotificationItemLinkIcon extends NotificationItemBase {\n type: 'link';\n href: string;\n target?: string;\n}\n\n/**\n * Interface for an action button in a notification item.\n * @param type - The type of the action, always 'action-button'.\n * @param label - The label to display on the button.\n * @param action - The action to perform when the button is clicked.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport interface NotificationItemActionButton {\n type: 'action-button';\n label: TranslatableString;\n action: (source: this) => void;\n}\n\n/**\n * Interface for a menu in a notification item.\n * @param type - The type of the action, always 'menu'.\n * @param menuItems - The menu items to display in the menu.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport interface NotificationItemMenu {\n type: 'menu';\n menuItems: MenuItem[];\n}\n\n/**\n * Union type for quick actions in a notification item.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport type NotificationItemQuickAction =\n | NotificationItemActionCircleButton\n | NotificationItemActionIconButton\n | NotificationItemLinkIcon\n | NotificationItemRouterLinkIcon;\n\n/**\n * Union type for primary actions in a notification item.\n * @deprecated Use the CSS-based list item component instead.\n */\nexport type NotificationItemPrimaryAction =\n | NotificationItemActionCircleButton\n | NotificationItemActionIconButton\n | NotificationItemLinkIcon\n | NotificationItemRouterLinkIcon\n | NotificationItemMenu\n | NotificationItemActionButton;\n\n/**\n * This component represents a single notification that can be used within notification\n * centers, popovers, or other containers. It supports various action types including\n * router links, standard links, action buttons, and menus.\n *\n * @deprecated Use the CSS-based list item component instead.\n */\n@Component({\n selector: 'si-notification-item',\n imports: [\n SiTranslatePipe,\n RouterModule,\n CommonModule,\n SiMenuFactoryComponent,\n CdkMenuTrigger,\n SiIconComponent\n ],\n templateUrl: './si-notification-item.component.html',\n styleUrl: './si-notification-item.component.scss',\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class SiNotificationItemComponent {\n protected readonly icons = addIcons({ elementOptionsVertical });\n\n /**\n * The timestamp of the notification item.\n */\n readonly timeStamp = input.required<TranslatableString>();\n /**\n * The heading of the notification item.\n */\n readonly heading = input.required<TranslatableString>();\n /**\n * Optional translatable description.\n */\n readonly description = input<TranslatableString>();\n /**\n * Unread messages are emphasized with a bolder font.\n *\n * @defaultValue false\n */\n readonly unread = input(false, { transform: booleanAttribute });\n /**\n * Link to the source or relevant information of the notification,\n * which triggers when clicking on the notification item text area.\n */\n readonly itemLink = input<NotificationItemRouterLink | NotificationItemLink>();\n /**\n * Actions that are displayed below the text of the notification.\n */\n readonly quickActions = input<NotificationItemQuickAction[]>();\n /**\n * Action that is displayed on the right side of the notification.\n */\n readonly primaryAction = input<NotificationItemPrimaryAction>();\n\n protected readonly activatedRoute = inject(ActivatedRoute, { optional: true });\n}\n","<div class=\"notification-item px-6 py-5\">\n <div class=\"notification-item-indicator\">\n <div>\n @if (unread()) {\n <span class=\"dot\"></span>\n }\n <ng-content select=\"si-avatar,si-circle-status,si-icon,si-status-icon\" />\n </div>\n </div>\n\n <div class=\"notification-item-content\">\n @let itemLinkValue = itemLink();\n @if (itemLinkValue) {\n @switch (itemLinkValue.type) {\n @case ('link') {\n <a\n [href]=\"itemLinkValue.href\"\n [target]=\"itemLinkValue.target\"\n [attr.aria-label]=\"heading() + ' link'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </a>\n }\n @case ('router-link') {\n <a\n [routerLink]=\"itemLinkValue.routerLink\"\n [queryParams]=\"itemLinkValue.extras?.queryParams\"\n [queryParamsHandling]=\"itemLinkValue.extras?.queryParamsHandling\"\n [fragment]=\"itemLinkValue.extras?.fragment\"\n [state]=\"itemLinkValue.extras?.state\"\n [relativeTo]=\"itemLinkValue.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"itemLinkValue.extras?.preserveFragment\"\n [skipLocationChange]=\"itemLinkValue.extras?.skipLocationChange\"\n [replaceUrl]=\"itemLinkValue.extras?.replaceUrl\"\n [attr.aria-label]=\"heading() + ' link'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n </a>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"content\" />\n }\n </div>\n\n @let primaryActionValue = primaryAction();\n @if (primaryActionValue) {\n <div class=\"notification-item-primary-action\">\n @if (primaryActionValue.type === 'menu') {\n <ng-container *ngTemplateOutlet=\"menu; context: { $implicit: primaryActionValue }\" />\n } @else if (primaryActionValue.type === 'action-button') {\n <button\n type=\"button\"\n class=\"btn btn-tertiary\"\n (click)=\"primaryActionValue.action(primaryActionValue)\"\n >{{ primaryActionValue.label | translate }}</button\n >\n } @else {\n <ng-container *ngTemplateOutlet=\"action; context: { $implicit: primaryActionValue }\" />\n }\n </div>\n } @else {\n <div class=\"notification-item-primary-action\">\n <ng-content select=\"[action]\" />\n </div>\n }\n\n @let quickActionsValue = quickActions();\n @if (quickActionsValue) {\n <div class=\"notification-item-quick-actions\">\n @for (quickAction of quickActionsValue; track $index) {\n <ng-container *ngTemplateOutlet=\"action; context: { $implicit: quickAction }\" />\n }\n </div>\n } @else {\n <div class=\"notification-item-quick-actions\">\n <ng-content select=\"[quick-actions]\" />\n </div>\n }\n</div>\n\n<ng-template #action let-action>\n @switch (action.type) {\n @case ('action-circle-button') {\n <ng-container *ngTemplateOutlet=\"actionButton; context: { $implicit: action }\" />\n }\n @case ('action-icon-button') {\n <ng-container *ngTemplateOutlet=\"actionButton; context: { $implicit: action }\" />\n }\n @case ('router-link') {\n <ng-container *ngTemplateOutlet=\"routerLink; context: { $implicit: action }\" />\n }\n @case ('link') {\n <ng-container *ngTemplateOutlet=\"link; context: { $implicit: action }\" />\n }\n }\n</ng-template>\n\n<ng-template #content>\n <div class=\"d-flex flex-column gap-3 text-body\">\n <span class=\"si-body text-secondary\">{{ timeStamp() | translate }}</span>\n <span [class.si-h5-bold]=\"unread()\" [class.si-h5]=\"!unread()\">{{ heading() | translate }}</span>\n @if (description()) {\n <span class=\"si-body\">{{ description() | translate }}</span>\n }\n <div class=\"si-body\">\n <ng-content select=\"[description]\" />\n </div>\n </div>\n</ng-template>\n\n<ng-template #actionButton let-action>\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [attr.aria-label]=\"action.ariaLabel\"\n (click)=\"action.action(action)\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </button>\n</ng-template>\n\n<ng-template #routerLink let-action>\n <a\n class=\"btn btn-tertiary-ghost p-2 btn-icon\"\n [routerLink]=\"action.routerLink\"\n [queryParams]=\"action.extras?.queryParams\"\n [queryParamsHandling]=\"action.extras?.queryParamsHandling\"\n [fragment]=\"action.extras?.fragment\"\n [state]=\"action.extras?.state\"\n [relativeTo]=\"action.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"action.extras?.preserveFragment\"\n [skipLocationChange]=\"action.extras?.skipLocationChange\"\n [replaceUrl]=\"action.extras?.replaceUrl\"\n [attr.aria-label]=\"action.ariaLabel\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </a>\n</ng-template>\n\n<ng-template #link let-action>\n <a\n class=\"btn btn-tertiary-ghost p-2 btn-icon\"\n [href]=\"action.href\"\n [target]=\"action.target\"\n [attr.aria-label]=\"action.ariaLabel\"\n >\n <si-icon class=\"icon\" [icon]=\"action.icon\" />\n </a>\n</ng-template>\n\n<ng-template #menu let-action>\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [attr.aria-label]=\"heading() + ' dropdown'\"\n [cdkMenuTriggerFor]=\"actionMenu\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #actionMenu>\n <si-menu-factory [items]=\"action.menuItems\" />\n </ng-template>\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-notification-item.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAiJH;;;;;;AAMG;MAeU,2BAA2B,CAAA;AACnB,IAAA,KAAK,GAAG,QAAQ,CAAC,EAAE,sBAAsB,EAAE,CAAC;AAE/D;;AAEG;IACM,SAAS,GAAG,KAAK,CAAC,QAAQ;kFAAsB;AACzD;;AAEG;IACM,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAsB;AACvD;;AAEG;AACM,IAAA,WAAW,GAAG,KAAK;+FAAsB;AAClD;;;;AAIG;IACM,MAAM,GAAG,KAAK,CAAC,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC/D;;;AAGG;AACM,IAAA,QAAQ,GAAG,KAAK;4FAAqD;AAC9E;;AAEG;AACM,IAAA,YAAY,GAAG,KAAK;gGAAiC;AAC9D;;AAEG;AACM,IAAA,aAAa,GAAG,KAAK;iGAAiC;IAE5C,cAAc,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;uGAnCnE,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA3B,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AA,CAAA;kBAdvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,OAAA,EACvB;wBACP,eAAe;wBACf,YAAY;wBACZ,YAAY;wBACZ,sBAAsB;wBACtB,cAAc;wBACd;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,KAAK,EAAA,QAAA,EAAA,+gLAAA,EAAA,MAAA,EAAA,CAAA,6gDAAA,CAAA,EAAA;;;AEvKhD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, numberAttribute, booleanAttribute, computed, output, viewChild, signal, inject, ChangeDetectorRef,
|
|
2
|
+
import { input, numberAttribute, booleanAttribute, computed, output, viewChild, signal, inject, ChangeDetectorRef, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
4
4
|
import { elementPlus, elementMinus } from '@siemens/element-icons';
|
|
5
5
|
import { SI_FORM_ITEM_CONTROL } from '@siemens/element-ng/form';
|
|
@@ -24,7 +24,7 @@ class SiNumberInputComponent {
|
|
|
24
24
|
*
|
|
25
25
|
* @defaultValue undefined
|
|
26
26
|
*/
|
|
27
|
-
minInput = input(undefined, { ...(ngDevMode ? { debugName: "minInput" } : {}),
|
|
27
|
+
minInput = input(undefined, { ...(ngDevMode ? { debugName: "minInput" } : /* istanbul ignore next */ {}),
|
|
28
28
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
29
29
|
alias: 'min',
|
|
30
30
|
transform: numberAttribute });
|
|
@@ -33,7 +33,7 @@ class SiNumberInputComponent {
|
|
|
33
33
|
*
|
|
34
34
|
* @defaultValue undefined
|
|
35
35
|
*/
|
|
36
|
-
maxInput = input(undefined, { ...(ngDevMode ? { debugName: "maxInput" } : {}),
|
|
36
|
+
maxInput = input(undefined, { ...(ngDevMode ? { debugName: "maxInput" } : /* istanbul ignore next */ {}),
|
|
37
37
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
38
38
|
alias: 'max',
|
|
39
39
|
transform: numberAttribute });
|
|
@@ -42,24 +42,27 @@ class SiNumberInputComponent {
|
|
|
42
42
|
*
|
|
43
43
|
* @defaultValue 1
|
|
44
44
|
*/
|
|
45
|
-
step = input(1,
|
|
45
|
+
step = input(1, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
46
47
|
/** The value */
|
|
47
48
|
// eslint-disable-next-line @angular-eslint/prefer-signal-model
|
|
48
|
-
value = input(
|
|
49
|
+
value = input(/* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
49
51
|
/** Optional unit label */
|
|
50
|
-
unit = input(
|
|
52
|
+
unit = input(/* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [undefined, { debugName: "unit" }] : /* istanbul ignore next */ []));
|
|
51
54
|
/**
|
|
52
55
|
* Show increment/decrement buttons?
|
|
53
56
|
*
|
|
54
57
|
* @defaultValue true
|
|
55
58
|
*/
|
|
56
|
-
showButtons = input(true, { ...(ngDevMode ? { debugName: "showButtons" } : {}), transform: booleanAttribute });
|
|
59
|
+
showButtons = input(true, { ...(ngDevMode ? { debugName: "showButtons" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
57
60
|
/**
|
|
58
61
|
* The aria-label passed to the input
|
|
59
62
|
*
|
|
60
63
|
* @defaultValue undefined
|
|
61
64
|
*/
|
|
62
|
-
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
|
|
65
|
+
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
63
66
|
/**
|
|
64
67
|
* ID that is set on the input, e.g. for `<label for="...">`
|
|
65
68
|
*
|
|
@@ -68,17 +71,20 @@ class SiNumberInputComponent {
|
|
|
68
71
|
* `__si-number-input-${SiNumberInputComponent.idCounter++}`
|
|
69
72
|
* ```
|
|
70
73
|
*/
|
|
71
|
-
inputId = input(`__si-number-input-${SiNumberInputComponent.idCounter++}`,
|
|
72
|
-
|
|
74
|
+
inputId = input(`__si-number-input-${SiNumberInputComponent.idCounter++}`, /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
76
|
+
id = computed(() => this.inputId(), /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
73
78
|
/** @defaultValue false */
|
|
74
79
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
75
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled', transform: booleanAttribute });
|
|
80
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
76
81
|
/** @defaultValue false */
|
|
77
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
82
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
78
83
|
/**
|
|
79
84
|
* The placeholder for input field.
|
|
80
85
|
*/
|
|
81
|
-
placeholder = input(
|
|
86
|
+
placeholder = input(/* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
82
88
|
valueChange = output();
|
|
83
89
|
inputElement = viewChild.required('inputElement');
|
|
84
90
|
/**
|
|
@@ -91,11 +97,14 @@ class SiNumberInputComponent {
|
|
|
91
97
|
* `${this.id()}-errormessage`
|
|
92
98
|
* ```
|
|
93
99
|
*/
|
|
94
|
-
errormessageId = input(`${this.id()}-errormessage`,
|
|
100
|
+
errormessageId = input(`${this.id()}-errormessage`, /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
95
102
|
canInc = true;
|
|
96
103
|
canDec = true;
|
|
97
|
-
disabled = computed(() => this.disabledInput() || this.disabledNgControl(),
|
|
98
|
-
|
|
104
|
+
disabled = computed(() => this.disabledInput() || this.disabledNgControl(), /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
106
|
+
disabledNgControl = signal(false, /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "disabledNgControl" }] : /* istanbul ignore next */ []));
|
|
99
108
|
onTouched = () => { };
|
|
100
109
|
onChange = () => { };
|
|
101
110
|
validator = SiNumberInputComponent.formatValidator;
|
|
@@ -103,11 +112,13 @@ class SiNumberInputComponent {
|
|
|
103
112
|
min = computed(() => {
|
|
104
113
|
const minVal = this.minInput();
|
|
105
114
|
return minVal === undefined || isNaN(minVal) ? undefined : minVal;
|
|
106
|
-
},
|
|
115
|
+
}, /* @ts-ignore */
|
|
116
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
107
117
|
max = computed(() => {
|
|
108
118
|
const maxVal = this.maxInput();
|
|
109
119
|
return maxVal === undefined || isNaN(maxVal) ? undefined : maxVal;
|
|
110
|
-
},
|
|
120
|
+
}, /* @ts-ignore */
|
|
121
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
111
122
|
icons = addIcons({ elementMinus, elementPlus });
|
|
112
123
|
internalValue;
|
|
113
124
|
autoUpdate$ = timer(400, 80);
|
|
@@ -203,8 +214,8 @@ class SiNumberInputComponent {
|
|
|
203
214
|
this.inputElement().nativeElement.value = value == null ? '' : value.toString();
|
|
204
215
|
this.internalValue = value;
|
|
205
216
|
}
|
|
206
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
207
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
217
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiNumberInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
218
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiNumberInputComponent, isStandalone: true, selector: "si-number-input", inputs: { minInput: { classPropertyName: "minInput", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, maxInput: { classPropertyName: "maxInput", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, showButtons: { classPropertyName: "showButtons", publicName: "showButtons", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, errormessageId: { classPropertyName: "errormessageId", publicName: "errormessageId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.show-step-buttons": "showButtons()", "class.disabled": "disabled()", "class.readonly": "readonly()" } }, providers: [
|
|
208
219
|
{
|
|
209
220
|
provide: NG_VALUE_ACCESSOR,
|
|
210
221
|
useExisting: SiNumberInputComponent,
|
|
@@ -219,9 +230,9 @@ class SiNumberInputComponent {
|
|
|
219
230
|
provide: SI_FORM_ITEM_CONTROL,
|
|
220
231
|
useExisting: SiNumberInputComponent
|
|
221
232
|
}
|
|
222
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<input\n #inputElement\n type=\"number\"\n class=\"focus-none\"\n [attr.id]=\"inputId()\"\n [step]=\"step()\"\n [readonly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [attr.placeholder]=\"placeholder() | translate\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n (blur)=\"onTouched()\"\n (input)=\"modelChanged()\"\n/>\n@if (unit()) {\n <span class=\"unit\" [class.text-secondary]=\"!disabled()\" [class.text-disabled]=\"disabled()\">{{\n unit()\n }}</span>\n}\n@if (showButtons()) {\n <div class=\"form-control-actions\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"dec btn btn-icon btn-tertiary btn-sm\"\n [disabled]=\"disabled() || readonly() || !canDec\"\n (mousedown)=\"autoUpdateStart($event, false)\"\n (touchstart)=\"autoUpdateStart($event, false)\"\n (touchend)=\"autoUpdateStop()\"\n (mouseup)=\"autoUpdateStop()\"\n (mouseleave)=\"autoUpdateStop()\"\n >\n <si-icon [icon]=\"icons.elementMinus\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"inc btn btn-icon btn-tertiary btn-sm\"\n [disabled]=\"disabled() || readonly() || !canInc\"\n (mousedown)=\"autoUpdateStart($event, true)\"\n (touchstart)=\"autoUpdateStart($event, true)\"\n (touchend)=\"autoUpdateStop()\"\n (mouseup)=\"autoUpdateStop()\"\n (mouseleave)=\"autoUpdateStop()\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n </div>\n}\n", styles: [":host{display:flex;align-items:center}:host:focus-within{outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}input{-moz-appearance:textfield;border:0;margin:0;padding-block:0;background:transparent;color:inherit;text-align:inherit;flex:1 0 0;min-inline-size:0}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }]
|
|
233
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<input\n #inputElement\n type=\"number\"\n class=\"focus-none\"\n [attr.id]=\"inputId()\"\n [step]=\"step()\"\n [readonly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [attr.placeholder]=\"placeholder() | translate\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n (blur)=\"onTouched()\"\n (input)=\"modelChanged()\"\n/>\n@if (unit()) {\n <span class=\"unit\" [class.text-secondary]=\"!disabled()\" [class.text-disabled]=\"disabled()\">{{\n unit()\n }}</span>\n}\n@if (showButtons()) {\n <div class=\"form-control-actions\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"dec btn btn-icon btn-tertiary btn-sm\"\n [disabled]=\"disabled() || readonly() || !canDec\"\n (mousedown)=\"autoUpdateStart($event, false)\"\n (touchstart)=\"autoUpdateStart($event, false)\"\n (touchend)=\"autoUpdateStop()\"\n (mouseup)=\"autoUpdateStop()\"\n (mouseleave)=\"autoUpdateStop()\"\n >\n <si-icon [icon]=\"icons.elementMinus\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"inc btn btn-icon btn-tertiary btn-sm\"\n [disabled]=\"disabled() || readonly() || !canInc\"\n (mousedown)=\"autoUpdateStart($event, true)\"\n (touchstart)=\"autoUpdateStart($event, true)\"\n (touchend)=\"autoUpdateStop()\"\n (mouseup)=\"autoUpdateStop()\"\n (mouseleave)=\"autoUpdateStop()\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n </div>\n}\n", styles: [":host{display:flex;align-items:center}:host:focus-within{outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}input{-moz-appearance:textfield;border:0;margin:0;padding-block:0;background:transparent;color:inherit;text-align:inherit;flex:1 0 0;min-inline-size:0}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
223
234
|
}
|
|
224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiNumberInputComponent, decorators: [{
|
|
225
236
|
type: Component,
|
|
226
237
|
args: [{ selector: 'si-number-input', imports: [SiIconComponent, SiTranslatePipe], providers: [
|
|
227
238
|
{
|
|
@@ -238,7 +249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
238
249
|
provide: SI_FORM_ITEM_CONTROL,
|
|
239
250
|
useExisting: SiNumberInputComponent
|
|
240
251
|
}
|
|
241
|
-
],
|
|
252
|
+
], host: {
|
|
242
253
|
'[class.show-step-buttons]': 'showButtons()',
|
|
243
254
|
'[class.disabled]': 'disabled()',
|
|
244
255
|
'[class.readonly]': 'readonly()'
|
|
@@ -250,11 +261,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
250
261
|
* SPDX-License-Identifier: MIT
|
|
251
262
|
*/
|
|
252
263
|
class SiNumberInputModule {
|
|
253
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
254
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
255
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
264
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiNumberInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
265
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: SiNumberInputModule, imports: [SiNumberInputComponent], exports: [SiNumberInputComponent] });
|
|
266
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiNumberInputModule, imports: [SiNumberInputComponent] });
|
|
256
267
|
}
|
|
257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiNumberInputModule, decorators: [{
|
|
258
269
|
type: NgModule,
|
|
259
270
|
args: [{
|
|
260
271
|
imports: [SiNumberInputComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-number-input.mjs","sources":["../../../../projects/element-ng/number-input/si-number-input.component.ts","../../../../projects/element-ng/number-input/si-number-input.component.html","../../../../projects/element-ng/number-input/si-number-input.module.ts","../../../../projects/element-ng/number-input/index.ts","../../../../projects/element-ng/number-input/siemens-element-ng-number-input.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n numberAttribute,\n OnChanges,\n output,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport { elementMinus, elementPlus } from '@siemens/element-icons';\nimport { SI_FORM_ITEM_CONTROL, SiFormItemControl } from '@siemens/element-ng/form';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { Subscription, timer } from 'rxjs';\n\n@Component({\n selector: 'si-number-input',\n imports: [SiIconComponent, SiTranslatePipe],\n templateUrl: './si-number-input.component.html',\n styleUrl: './si-number-input.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SiNumberInputComponent,\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: SiNumberInputComponent,\n multi: true\n },\n {\n provide: SI_FORM_ITEM_CONTROL,\n useExisting: SiNumberInputComponent\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.show-step-buttons]': 'showButtons()',\n '[class.disabled]': 'disabled()',\n '[class.readonly]': 'readonly()'\n }\n})\nexport class SiNumberInputComponent\n implements OnChanges, ControlValueAccessor, Validator, SiFormItemControl\n{\n private static idCounter = 0;\n private static formatValidator: ValidatorFn = control => {\n if (control.value != null && isNaN(control.value)) {\n return { numberFormat: true };\n }\n return null;\n };\n\n /**\n * The min. value for HTML input\n *\n * @defaultValue undefined\n */\n readonly minInput = input<number | undefined, unknown>(undefined, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'min',\n transform: numberAttribute\n });\n /**\n * The max. value for HTML input\n *\n * @defaultValue undefined\n */\n readonly maxInput = input<number | undefined, unknown>(undefined, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'max',\n transform: numberAttribute\n });\n /**\n * The step size for HTML input\n *\n * @defaultValue 1\n */\n readonly step = input<number | 'any'>(1);\n /** The value */\n // eslint-disable-next-line @angular-eslint/prefer-signal-model\n readonly value = input<number>();\n /** Optional unit label */\n readonly unit = input<string>();\n /**\n * Show increment/decrement buttons?\n *\n * @defaultValue true\n */\n readonly showButtons = input(true, { transform: booleanAttribute });\n /**\n * The aria-label passed to the input\n *\n * @defaultValue undefined\n */\n readonly ariaLabel = input<TranslatableString>(undefined, { alias: 'aria-label' });\n /**\n * ID that is set on the input, e.g. for `<label for=\"...\">`\n *\n * @defaultValue\n * ```\n * `__si-number-input-${SiNumberInputComponent.idCounter++}`\n * ```\n */\n readonly inputId = input(`__si-number-input-${SiNumberInputComponent.idCounter++}`);\n\n readonly id = computed(() => this.inputId());\n\n /** @defaultValue false */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n /** @defaultValue false */\n readonly readonly = input(false, { transform: booleanAttribute });\n\n /**\n * The placeholder for input field.\n */\n readonly placeholder = input<TranslatableString>();\n\n readonly valueChange = output<number | undefined>();\n\n readonly inputElement = viewChild.required<ElementRef<HTMLInputElement>>('inputElement');\n\n /**\n * This ID will be bound to the `aria-describedby` attribute of the number-input.\n * Use this to reference the element containing the error message(s) for the number-input.\n * It will be picked by the {@link SiFormItemComponent} if the number-input is used inside a form item.\n *\n * @defaultValue\n * ```\n * `${this.id()}-errormessage`\n * ```\n */\n readonly errormessageId = input(`${this.id()}-errormessage`);\n\n protected canInc = true;\n protected canDec = true;\n protected readonly disabled = computed(() => this.disabledInput() || this.disabledNgControl());\n private readonly disabledNgControl = signal(false);\n protected onTouched: () => void = () => {};\n protected onChange: (val: any) => void = () => {};\n protected validator: ValidatorFn | null = SiNumberInputComponent.formatValidator;\n protected onValidatorChanged: () => void = () => {};\n protected readonly min = computed(() => {\n const minVal = this.minInput();\n return minVal === undefined || isNaN(minVal) ? undefined : minVal;\n });\n protected readonly max = computed(() => {\n const maxVal = this.maxInput();\n return maxVal === undefined || isNaN(maxVal) ? undefined : maxVal;\n });\n protected readonly icons = addIcons({ elementMinus, elementPlus });\n private internalValue?: number;\n private autoUpdate$ = timer(400, 80);\n private autoUpdateSubs?: Subscription;\n private changeDetectorRef = inject(ChangeDetectorRef);\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.value) {\n this.writeValueToInput(this.value());\n }\n if (changes.minInput || changes.maxInput) {\n const minValue = this.min();\n const maxValue = this.max();\n this.validator = Validators.compose([\n minValue != null ? Validators.min(minValue) : null,\n maxValue != null ? Validators.max(maxValue) : null,\n SiNumberInputComponent.formatValidator\n ])!;\n this.onValidatorChanged();\n }\n this.updateStepButtons();\n }\n\n /** @internal */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** @internal */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @internal */\n setDisabledState(isDisabled: boolean): void {\n this.disabledNgControl.set(isDisabled);\n }\n\n /** @internal */\n writeValue(value: number | undefined): void {\n this.writeValueToInput(value);\n this.updateStepButtons();\n this.changeDetectorRef.markForCheck();\n }\n\n /** @internal */\n validate(control: AbstractControl): ValidationErrors | null {\n return this.validator ? this.validator(control) : null;\n }\n\n /** @internal */\n registerOnValidatorChange?(fn: () => void): void {\n this.onValidatorChanged = fn;\n }\n\n protected modelChanged(): void {\n const value = this.inputElement().nativeElement.value\n ? this.inputElement().nativeElement.valueAsNumber\n : undefined;\n this.internalValue = value;\n this.updateStepButtons();\n this.onChange(value);\n this.valueChange.emit(value);\n }\n\n protected autoUpdateStart(event: Event, isIncrement: boolean): void {\n const mouseButton = (event as MouseEvent).button;\n if (mouseButton) {\n return;\n }\n\n this.onTouched();\n event.preventDefault();\n const trigger = isIncrement ? () => this.increment() : () => this.decrement();\n this.autoUpdateSubs?.unsubscribe();\n this.autoUpdateSubs = this.autoUpdate$.subscribe(trigger);\n trigger();\n }\n\n protected autoUpdateStop(): void {\n this.autoUpdateSubs?.unsubscribe();\n this.autoUpdateSubs = undefined;\n }\n\n private updateStepButtons(): void {\n const stepValue = this.step();\n const step = typeof stepValue === 'number' ? stepValue : 1;\n const max = this.max();\n this.canInc = max == null || this.internalValue == null || this.internalValue + step <= max;\n const min = this.min();\n this.canDec = min == null || this.internalValue == null || this.internalValue - step >= min;\n if (!this.canInc || !this.canDec) {\n this.autoUpdateStop();\n }\n }\n\n private decrement(): void {\n this.inputElement().nativeElement.stepDown();\n this.modelChanged();\n }\n\n private increment(): void {\n this.inputElement().nativeElement.stepUp();\n this.modelChanged();\n }\n\n private writeValueToInput(value: number | undefined): void {\n this.inputElement().nativeElement.value = value == null ? '' : value.toString();\n this.internalValue = value;\n }\n}\n","<input\n #inputElement\n type=\"number\"\n class=\"focus-none\"\n [attr.id]=\"inputId()\"\n [step]=\"step()\"\n [readonly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [attr.placeholder]=\"placeholder() | translate\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n (blur)=\"onTouched()\"\n (input)=\"modelChanged()\"\n/>\n@if (unit()) {\n <span class=\"unit\" [class.text-secondary]=\"!disabled()\" [class.text-disabled]=\"disabled()\">{{\n unit()\n }}</span>\n}\n@if (showButtons()) {\n <div class=\"form-control-actions\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"dec btn btn-icon btn-tertiary btn-sm\"\n [disabled]=\"disabled() || readonly() || !canDec\"\n (mousedown)=\"autoUpdateStart($event, false)\"\n (touchstart)=\"autoUpdateStart($event, false)\"\n (touchend)=\"autoUpdateStop()\"\n (mouseup)=\"autoUpdateStop()\"\n (mouseleave)=\"autoUpdateStop()\"\n >\n <si-icon [icon]=\"icons.elementMinus\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"inc btn btn-icon btn-tertiary btn-sm\"\n [disabled]=\"disabled() || readonly() || !canInc\"\n (mousedown)=\"autoUpdateStart($event, true)\"\n (touchstart)=\"autoUpdateStart($event, true)\"\n (touchend)=\"autoUpdateStop()\"\n (mouseup)=\"autoUpdateStop()\"\n (mouseleave)=\"autoUpdateStop()\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n </div>\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiNumberInputComponent } from './si-number-input.component';\n\n@NgModule({\n imports: [SiNumberInputComponent],\n exports: [SiNumberInputComponent]\n})\nexport class SiNumberInputModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-number-input.component';\nexport * from './si-number-input.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAGG;MA6DU,sBAAsB,CAAA;AAGzB,IAAA,OAAO,SAAS,GAAG,CAAC;AACpB,IAAA,OAAO,eAAe,GAAgB,OAAO,IAAG;AACtD,QAAA,IAAI,OAAO,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjD,YAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE;QAC/B;AACA,QAAA,OAAO,IAAI;AACb,IAAA,CAAC;AAED;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAA8B,SAAS,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,UAAA,EAAA,GAAA,EAAA,CAAA;;AAE9D,QAAA,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,eAAe,EAAA,CAC1B;AACF;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAA8B,SAAS,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,UAAA,EAAA,GAAA,EAAA,CAAA;;AAE9D,QAAA,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,eAAe,EAAA,CAC1B;AACF;;;;AAIG;AACM,IAAA,IAAI,GAAG,KAAK,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AAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/IzF;;;AAGG;MASU,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CAHpB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CACtB,sBAAsB,CAAA,EAAA,CAAA;AAErB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHpB,sBAAsB,CAAA,EAAA,CAAA;;2FAGrB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,sBAAsB;AACjC,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-number-input.mjs","sources":["../../../../projects/element-ng/number-input/si-number-input.component.ts","../../../../projects/element-ng/number-input/si-number-input.component.html","../../../../projects/element-ng/number-input/si-number-input.module.ts","../../../../projects/element-ng/number-input/index.ts","../../../../projects/element-ng/number-input/siemens-element-ng-number-input.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n booleanAttribute,\n ChangeDetectorRef,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n numberAttribute,\n OnChanges,\n output,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport { elementMinus, elementPlus } from '@siemens/element-icons';\nimport { SI_FORM_ITEM_CONTROL, SiFormItemControl } from '@siemens/element-ng/form';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { Subscription, timer } from 'rxjs';\n\n@Component({\n selector: 'si-number-input',\n imports: [SiIconComponent, SiTranslatePipe],\n templateUrl: './si-number-input.component.html',\n styleUrl: './si-number-input.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SiNumberInputComponent,\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: SiNumberInputComponent,\n multi: true\n },\n {\n provide: SI_FORM_ITEM_CONTROL,\n useExisting: SiNumberInputComponent\n }\n ],\n host: {\n '[class.show-step-buttons]': 'showButtons()',\n '[class.disabled]': 'disabled()',\n '[class.readonly]': 'readonly()'\n }\n})\nexport class SiNumberInputComponent\n implements OnChanges, ControlValueAccessor, Validator, SiFormItemControl\n{\n private static idCounter = 0;\n private static formatValidator: ValidatorFn = control => {\n if (control.value != null && isNaN(control.value)) {\n return { numberFormat: true };\n }\n return null;\n };\n\n /**\n * The min. value for HTML input\n *\n * @defaultValue undefined\n */\n readonly minInput = input<number | undefined, unknown>(undefined, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'min',\n transform: numberAttribute\n });\n /**\n * The max. value for HTML input\n *\n * @defaultValue undefined\n */\n readonly maxInput = input<number | undefined, unknown>(undefined, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'max',\n transform: numberAttribute\n });\n /**\n * The step size for HTML input\n *\n * @defaultValue 1\n */\n readonly step = input<number | 'any'>(1);\n /** The value */\n // eslint-disable-next-line @angular-eslint/prefer-signal-model\n readonly value = input<number>();\n /** Optional unit label */\n readonly unit = input<string>();\n /**\n * Show increment/decrement buttons?\n *\n * @defaultValue true\n */\n readonly showButtons = input(true, { transform: booleanAttribute });\n /**\n * The aria-label passed to the input\n *\n * @defaultValue undefined\n */\n readonly ariaLabel = input<TranslatableString>(undefined, { alias: 'aria-label' });\n /**\n * ID that is set on the input, e.g. for `<label for=\"...\">`\n *\n * @defaultValue\n * ```\n * `__si-number-input-${SiNumberInputComponent.idCounter++}`\n * ```\n */\n readonly inputId = input(`__si-number-input-${SiNumberInputComponent.idCounter++}`);\n\n readonly id = computed(() => this.inputId());\n\n /** @defaultValue false */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n /** @defaultValue false */\n readonly readonly = input(false, { transform: booleanAttribute });\n\n /**\n * The placeholder for input field.\n */\n readonly placeholder = input<TranslatableString>();\n\n readonly valueChange = output<number | undefined>();\n\n readonly inputElement = viewChild.required<ElementRef<HTMLInputElement>>('inputElement');\n\n /**\n * This ID will be bound to the `aria-describedby` attribute of the number-input.\n * Use this to reference the element containing the error message(s) for the number-input.\n * It will be picked by the {@link SiFormItemComponent} if the number-input is used inside a form item.\n *\n * @defaultValue\n * ```\n * `${this.id()}-errormessage`\n * ```\n */\n readonly errormessageId = input(`${this.id()}-errormessage`);\n\n protected canInc = true;\n protected canDec = true;\n protected readonly disabled = computed(() => this.disabledInput() || this.disabledNgControl());\n private readonly disabledNgControl = signal(false);\n protected onTouched: () => void = () => {};\n protected onChange: (val: any) => void = () => {};\n protected validator: ValidatorFn | null = SiNumberInputComponent.formatValidator;\n protected onValidatorChanged: () => void = () => {};\n protected readonly min = computed(() => {\n const minVal = this.minInput();\n return minVal === undefined || isNaN(minVal) ? undefined : minVal;\n });\n protected readonly max = computed(() => {\n const maxVal = this.maxInput();\n return maxVal === undefined || isNaN(maxVal) ? undefined : maxVal;\n });\n protected readonly icons = addIcons({ elementMinus, elementPlus });\n private internalValue?: number;\n private autoUpdate$ = timer(400, 80);\n private autoUpdateSubs?: Subscription;\n private changeDetectorRef = inject(ChangeDetectorRef);\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.value) {\n this.writeValueToInput(this.value());\n }\n if (changes.minInput || changes.maxInput) {\n const minValue = this.min();\n const maxValue = this.max();\n this.validator = Validators.compose([\n minValue != null ? Validators.min(minValue) : null,\n maxValue != null ? Validators.max(maxValue) : null,\n SiNumberInputComponent.formatValidator\n ])!;\n this.onValidatorChanged();\n }\n this.updateStepButtons();\n }\n\n /** @internal */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** @internal */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @internal */\n setDisabledState(isDisabled: boolean): void {\n this.disabledNgControl.set(isDisabled);\n }\n\n /** @internal */\n writeValue(value: number | undefined): void {\n this.writeValueToInput(value);\n this.updateStepButtons();\n this.changeDetectorRef.markForCheck();\n }\n\n /** @internal */\n validate(control: AbstractControl): ValidationErrors | null {\n return this.validator ? this.validator(control) : null;\n }\n\n /** @internal */\n registerOnValidatorChange?(fn: () => void): void {\n this.onValidatorChanged = fn;\n }\n\n protected modelChanged(): void {\n const value = this.inputElement().nativeElement.value\n ? this.inputElement().nativeElement.valueAsNumber\n : undefined;\n this.internalValue = value;\n this.updateStepButtons();\n this.onChange(value);\n this.valueChange.emit(value);\n }\n\n protected autoUpdateStart(event: Event, isIncrement: boolean): void {\n const mouseButton = (event as MouseEvent).button;\n if (mouseButton) {\n return;\n }\n\n this.onTouched();\n event.preventDefault();\n const trigger = isIncrement ? () => this.increment() : () => this.decrement();\n this.autoUpdateSubs?.unsubscribe();\n this.autoUpdateSubs = this.autoUpdate$.subscribe(trigger);\n trigger();\n }\n\n protected autoUpdateStop(): void {\n this.autoUpdateSubs?.unsubscribe();\n this.autoUpdateSubs = undefined;\n }\n\n private updateStepButtons(): void {\n const stepValue = this.step();\n const step = typeof stepValue === 'number' ? stepValue : 1;\n const max = this.max();\n this.canInc = max == null || this.internalValue == null || this.internalValue + step <= max;\n const min = this.min();\n this.canDec = min == null || this.internalValue == null || this.internalValue - step >= min;\n if (!this.canInc || !this.canDec) {\n this.autoUpdateStop();\n }\n }\n\n private decrement(): void {\n this.inputElement().nativeElement.stepDown();\n this.modelChanged();\n }\n\n private increment(): void {\n this.inputElement().nativeElement.stepUp();\n this.modelChanged();\n }\n\n private writeValueToInput(value: number | undefined): void {\n this.inputElement().nativeElement.value = value == null ? '' : value.toString();\n this.internalValue = value;\n }\n}\n","<input\n #inputElement\n type=\"number\"\n class=\"focus-none\"\n [attr.id]=\"inputId()\"\n [step]=\"step()\"\n [readonly]=\"readonly()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [attr.placeholder]=\"placeholder() | translate\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n (blur)=\"onTouched()\"\n (input)=\"modelChanged()\"\n/>\n@if (unit()) {\n <span class=\"unit\" [class.text-secondary]=\"!disabled()\" [class.text-disabled]=\"disabled()\">{{\n unit()\n }}</span>\n}\n@if (showButtons()) {\n <div class=\"form-control-actions\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"dec btn btn-icon btn-tertiary btn-sm\"\n [disabled]=\"disabled() || readonly() || !canDec\"\n (mousedown)=\"autoUpdateStart($event, false)\"\n (touchstart)=\"autoUpdateStart($event, false)\"\n (touchend)=\"autoUpdateStop()\"\n (mouseup)=\"autoUpdateStop()\"\n (mouseleave)=\"autoUpdateStop()\"\n >\n <si-icon [icon]=\"icons.elementMinus\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"inc btn btn-icon btn-tertiary btn-sm\"\n [disabled]=\"disabled() || readonly() || !canInc\"\n (mousedown)=\"autoUpdateStart($event, true)\"\n (touchstart)=\"autoUpdateStart($event, true)\"\n (touchend)=\"autoUpdateStop()\"\n (mouseup)=\"autoUpdateStop()\"\n (mouseleave)=\"autoUpdateStop()\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n </div>\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiNumberInputComponent } from './si-number-input.component';\n\n@NgModule({\n imports: [SiNumberInputComponent],\n exports: [SiNumberInputComponent]\n})\nexport class SiNumberInputModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-number-input.component';\nexport * from './si-number-input.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAGG;MA2DU,sBAAsB,CAAA;AAGzB,IAAA,OAAO,SAAS,GAAG,CAAC;AACpB,IAAA,OAAO,eAAe,GAAgB,OAAO,IAAG;AACtD,QAAA,IAAI,OAAO,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjD,YAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE;QAC/B;AACA,QAAA,OAAO,IAAI;AACb,IAAA,CAAC;AAED;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAA8B,SAAS,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,UAAA,EAAA,8BAAA,EAAA,CAAA;;AAE9D,QAAA,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,eAAe,EAAA,CAC1B;AACF;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAA8B,SAAS,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,UAAA,EAAA,8BAAA,EAAA,CAAA;;AAE9D,QAAA,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,eAAe,EAAA,CAC1B;AACF;;;;AAIG;IACM,IAAI,GAAG,KAAK,CAAiB,CAAC;6EAAC;;;AAG/B,IA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