@siemens/element-ng 48.1.0 → 48.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/card/index.d.ts +68 -29
- package/common/index.d.ts +11 -0
- package/dashboard/index.d.ts +1 -0
- package/datepicker/index.d.ts +30 -34
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +2 -2
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +103 -37
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +6 -0
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-connection-strength.mjs +2 -2
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +2 -2
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +10 -8
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +5 -0
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +173 -151
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +2 -2
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +5 -5
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +15 -3
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +7 -1
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly.mjs +2 -2
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +13 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +62 -28
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +2 -2
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +2 -2
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +14 -4
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +2 -2
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +2 -2
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +2 -2
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +5 -5
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +5 -6
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +4 -4
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +329 -257
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/filter-bar/index.d.ts +9 -3
- package/header-dropdown/index.d.ts +7 -0
- package/ip-input/index.d.ts +42 -5
- package/package.json +23 -19
- package/schematics/collection.json +34 -0
- package/schematics/migrations/action-modal-migration/action-modal-migration.js +121 -0
- package/schematics/migrations/action-modal-migration/action-modal.mappings.js +98 -0
- package/schematics/migrations/action-modal-migration/index.js +5 -0
- package/schematics/migrations/index.js +13 -0
- package/schematics/migrations/schema.json +16 -0
- package/schematics/migrations/to-legacy-migration/to-legacy-migration.js +55 -0
- package/schematics/migrations/to-legacy-migration/to-legacy-replacement.js +35 -0
- package/schematics/ng-add/index.js +16 -0
- package/schematics/ng-add/schema.json +16 -0
- package/schematics/scss-import-to-siemens-migration/index.js +101 -0
- package/schematics/scss-import-to-siemens-migration/schema.json +16 -0
- package/schematics/scss-import-to-siemens-migration/style-mappings.js +46 -0
- package/schematics/simpl-siemens-migration/index.js +18 -0
- package/schematics/simpl-siemens-migration/schema.json +16 -0
- package/schematics/ts-import-to-siemens-migration/index.js +118 -0
- package/schematics/ts-import-to-siemens-migration/mappings/charts-ng-mappings.js +70 -0
- package/schematics/ts-import-to-siemens-migration/mappings/dashboards-ng-mappings.js +52 -0
- package/schematics/ts-import-to-siemens-migration/mappings/element-ng-mappings.js +651 -0
- package/schematics/ts-import-to-siemens-migration/mappings/element-translate-ng-mappings.js +21 -0
- package/schematics/ts-import-to-siemens-migration/mappings/index.js +9 -0
- package/schematics/ts-import-to-siemens-migration/mappings/maps-ng-mappings.js +46 -0
- package/schematics/ts-import-to-siemens-migration/model.js +4 -0
- package/schematics/ts-import-to-siemens-migration/schema.json +16 -0
- package/schematics/utils/html-utils.js +72 -0
- package/schematics/utils/index.js +10 -0
- package/schematics/utils/project-utils.js +75 -0
- package/schematics/utils/schematics-file-system.js +22 -0
- package/schematics/utils/template-utils.js +114 -0
- package/schematics/utils/testing.js +41 -0
- package/schematics/utils/ts-utils.js +195 -0
- package/search-bar/index.d.ts +11 -1
- package/template-i18n.json +7 -0
- package/tooltip/index.d.ts +1 -1
- package/translate/index.d.ts +7 -0
- package/typeahead/index.d.ts +85 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Component, NgModule } from '@angular/core';
|
|
2
|
+
import { input, computed, Directive, Component, booleanAttribute, model, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
3
|
import { SiContentActionBarComponent } from '@siemens/element-ng/content-action-bar';
|
|
4
4
|
import { SiTranslatePipe } from '@siemens/element-translate-ng/translate';
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ import { SiTranslatePipe } from '@siemens/element-translate-ng/translate';
|
|
|
7
7
|
* Copyright (c) Siemens 2016 - 2025
|
|
8
8
|
* SPDX-License-Identifier: MIT
|
|
9
9
|
*/
|
|
10
|
-
class
|
|
10
|
+
class SiCardBaseDirective {
|
|
11
11
|
/**
|
|
12
12
|
* Card header text.
|
|
13
13
|
*/
|
|
@@ -16,6 +16,54 @@ class SiCardComponent {
|
|
|
16
16
|
* Card secondary header text.
|
|
17
17
|
*/
|
|
18
18
|
subHeading = input();
|
|
19
|
+
/**
|
|
20
|
+
* Image source for the card.
|
|
21
|
+
*/
|
|
22
|
+
imgSrc = input();
|
|
23
|
+
/**
|
|
24
|
+
* Alt text for a provided image.
|
|
25
|
+
*/
|
|
26
|
+
imgAlt = input();
|
|
27
|
+
/**
|
|
28
|
+
* Defines if an image is placed on top or start (left) of the card.
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue 'vertical'
|
|
31
|
+
*/
|
|
32
|
+
imgDir = input('vertical');
|
|
33
|
+
/**
|
|
34
|
+
* Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property.
|
|
35
|
+
*
|
|
36
|
+
* @defaultValue 'scale-down'
|
|
37
|
+
*/
|
|
38
|
+
imgObjectFit = input('scale-down');
|
|
39
|
+
/**
|
|
40
|
+
* Sets the image [object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) CSS property.
|
|
41
|
+
*/
|
|
42
|
+
imgObjectPosition = input();
|
|
43
|
+
/**
|
|
44
|
+
* In case the card uses an image and horizontal direction is used we set flex row direction.
|
|
45
|
+
*/
|
|
46
|
+
classCardHorizontal = computed(() => !!this.imgSrc() && this.imgDir() === 'horizontal');
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiCardBaseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
48
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: SiCardBaseDirective, isStandalone: true, inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, subHeading: { classPropertyName: "subHeading", publicName: "subHeading", isSignal: true, isRequired: false, transformFunction: null }, imgSrc: { classPropertyName: "imgSrc", publicName: "imgSrc", isSignal: true, isRequired: false, transformFunction: null }, imgAlt: { classPropertyName: "imgAlt", publicName: "imgAlt", isSignal: true, isRequired: false, transformFunction: null }, imgDir: { classPropertyName: "imgDir", publicName: "imgDir", isSignal: true, isRequired: false, transformFunction: null }, imgObjectFit: { classPropertyName: "imgObjectFit", publicName: "imgObjectFit", isSignal: true, isRequired: false, transformFunction: null }, imgObjectPosition: { classPropertyName: "imgObjectPosition", publicName: "imgObjectPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.card-horizontal": "classCardHorizontal()", "style.--si-card-img-object-fit": "imgObjectFit()", "style.--si-card-img-object-position": "imgObjectPosition()" }, classAttribute: "card" }, ngImport: i0 });
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiCardBaseDirective, decorators: [{
|
|
51
|
+
type: Directive,
|
|
52
|
+
args: [{
|
|
53
|
+
host: {
|
|
54
|
+
class: 'card',
|
|
55
|
+
'[class.card-horizontal]': 'classCardHorizontal()',
|
|
56
|
+
'[style.--si-card-img-object-fit]': 'imgObjectFit()',
|
|
57
|
+
'[style.--si-card-img-object-position]': 'imgObjectPosition()'
|
|
58
|
+
}
|
|
59
|
+
}]
|
|
60
|
+
}] });
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Copyright (c) Siemens 2016 - 2025
|
|
64
|
+
* SPDX-License-Identifier: MIT
|
|
65
|
+
*/
|
|
66
|
+
class SiCardComponent extends SiCardBaseDirective {
|
|
19
67
|
/**
|
|
20
68
|
* Input list of primary action items. Supports up to **4** actions and omits additional ones.
|
|
21
69
|
*
|
|
@@ -50,48 +98,66 @@ class SiCardComponent {
|
|
|
50
98
|
*/
|
|
51
99
|
actionBarTitle = input('');
|
|
52
100
|
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
imgSrc = input();
|
|
56
|
-
/**
|
|
57
|
-
* Alt text for a provided image.
|
|
101
|
+
* Returns `true` when primary or secondary actions are set.
|
|
58
102
|
*/
|
|
59
|
-
|
|
103
|
+
displayContentActionBar = computed(() => this.primaryActions()?.length > 0 || this.secondaryActions()?.length > 0);
|
|
104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
105
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SiCardComponent, isStandalone: true, selector: "si-card", inputs: { primaryActions: { classPropertyName: "primaryActions", publicName: "primaryActions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, actionBarViewType: { classPropertyName: "actionBarViewType", publicName: "actionBarViewType", isSignal: true, isRequired: false, transformFunction: null }, actionBarTitle: { classPropertyName: "actionBarTitle", publicName: "actionBarTitle", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "@if (imgSrc()) {\n <img\n class=\"card-content-split\"\n [class.card-img-top]=\"imgDir() !== 'horizontal'\"\n [class.card-img-start]=\"imgDir() === 'horizontal'\"\n [attr.src]=\"imgSrc()\"\n [attr.alt]=\"imgAlt() | translate\"\n />\n}\n\n<div class=\"content-container\" [class.card-content-split]=\"imgSrc()\">\n @if (heading() || displayContentActionBar()) {\n <div class=\"card-header d-flex justify-content-between\">\n <ng-content #cardHeaderIcon select=\"[headerIcon]\" />\n <div class=\"heading\">\n @if (heading()) {\n <div class=\"text-truncate si-h5\">{{ heading() | translate }}</div>\n }\n @if (subHeading()) {\n <div class=\"text-truncate si-body text-secondary pt-2\">{{\n subHeading() | translate\n }}</div>\n }\n </div>\n\n <div class=\"cab d-flex ms-6 my-n4 me-n5\">\n @if (displayContentActionBar()) {\n <si-content-action-bar\n class=\"ms-auto\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [viewType]=\"actionBarViewType()\"\n [attr.title]=\"actionBarTitle() | translate\"\n />\n }\n </div>\n </div>\n }\n <ng-content #cardBody select=\"[body]\" />\n <ng-content #cardFooter select=\"[footer]\" />\n</div>\n", styles: [":host.card-horizontal{flex-direction:row}.text-truncate{flex:0 1 auto}.heading{flex:1 1 auto;min-inline-size:0;overflow:hidden}.cab{flex:1 0 0;min-inline-size:40px}.card-img-top{block-size:50%;inline-size:auto;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, center top)}.card-img-start{block-size:auto;inline-size:50%;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, left center)}.card-content-split{flex:0 0 50%}.content-container{overflow:hidden;position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-inline-size:0;word-wrap:break-word;border-radius:inherit}\n"], dependencies: [{ kind: "component", type: SiContentActionBarComponent, selector: "si-content-action-bar", inputs: ["primaryActions", "secondaryActions", "actionParam", "viewType", "toggleItemLabel", "preventIconsInDropdownMenus", "disabled"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
106
|
+
}
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiCardComponent, decorators: [{
|
|
108
|
+
type: Component,
|
|
109
|
+
args: [{ selector: 'si-card', imports: [SiContentActionBarComponent, SiTranslatePipe], template: "@if (imgSrc()) {\n <img\n class=\"card-content-split\"\n [class.card-img-top]=\"imgDir() !== 'horizontal'\"\n [class.card-img-start]=\"imgDir() === 'horizontal'\"\n [attr.src]=\"imgSrc()\"\n [attr.alt]=\"imgAlt() | translate\"\n />\n}\n\n<div class=\"content-container\" [class.card-content-split]=\"imgSrc()\">\n @if (heading() || displayContentActionBar()) {\n <div class=\"card-header d-flex justify-content-between\">\n <ng-content #cardHeaderIcon select=\"[headerIcon]\" />\n <div class=\"heading\">\n @if (heading()) {\n <div class=\"text-truncate si-h5\">{{ heading() | translate }}</div>\n }\n @if (subHeading()) {\n <div class=\"text-truncate si-body text-secondary pt-2\">{{\n subHeading() | translate\n }}</div>\n }\n </div>\n\n <div class=\"cab d-flex ms-6 my-n4 me-n5\">\n @if (displayContentActionBar()) {\n <si-content-action-bar\n class=\"ms-auto\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [viewType]=\"actionBarViewType()\"\n [attr.title]=\"actionBarTitle() | translate\"\n />\n }\n </div>\n </div>\n }\n <ng-content #cardBody select=\"[body]\" />\n <ng-content #cardFooter select=\"[footer]\" />\n</div>\n", styles: [":host.card-horizontal{flex-direction:row}.text-truncate{flex:0 1 auto}.heading{flex:1 1 auto;min-inline-size:0;overflow:hidden}.cab{flex:1 0 0;min-inline-size:40px}.card-img-top{block-size:50%;inline-size:auto;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, center top)}.card-img-start{block-size:auto;inline-size:50%;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, left center)}.card-content-split{flex:0 0 50%}.content-container{overflow:hidden;position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-inline-size:0;word-wrap:break-word;border-radius:inherit}\n"] }]
|
|
110
|
+
}] });
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Copyright (c) Siemens 2016 - 2025
|
|
114
|
+
* SPDX-License-Identifier: MIT
|
|
115
|
+
*/
|
|
116
|
+
/**
|
|
117
|
+
* An action card component that extends the base card component with option to
|
|
118
|
+
* either select the whole card or trigger an action.
|
|
119
|
+
*
|
|
120
|
+
* Usage:
|
|
121
|
+
* as selectable card:
|
|
122
|
+
* `<button si-card selectable type="button" [(selected)]="isSelected">...</button>`
|
|
123
|
+
*
|
|
124
|
+
* or as an action card:
|
|
125
|
+
* `<button si-card type="button" (click)="doSomeAction()">...</button>`
|
|
126
|
+
*/
|
|
127
|
+
class SiActionCardComponent extends SiCardBaseDirective {
|
|
128
|
+
static idCounter = 0;
|
|
129
|
+
id = `__si-action-card-${SiActionCardComponent.idCounter++}`;
|
|
60
130
|
/**
|
|
61
|
-
*
|
|
131
|
+
* Makes whole card selectable.
|
|
62
132
|
*
|
|
63
|
-
* @defaultValue
|
|
133
|
+
* @defaultValue false
|
|
64
134
|
*/
|
|
65
|
-
|
|
135
|
+
selectable = input(false, {
|
|
136
|
+
transform: booleanAttribute
|
|
137
|
+
});
|
|
66
138
|
/**
|
|
67
|
-
*
|
|
139
|
+
* Indicates if the card is selected.
|
|
140
|
+
* Ignored when `selectable` is not set to `true`.
|
|
68
141
|
*
|
|
69
|
-
* @defaultValue
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
* In case the card uses an image and horizontal direction is used we set flex row direction.
|
|
78
|
-
*/
|
|
79
|
-
classCardHorizontal = computed(() => !!this.imgSrc() && this.imgDir() === 'horizontal');
|
|
80
|
-
/**
|
|
81
|
-
* Returns `true` when primary or secondary actions are set.
|
|
82
|
-
*/
|
|
83
|
-
displayContentActionBar = computed(() => this.primaryActions()?.length > 0 || this.secondaryActions()?.length > 0);
|
|
84
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SiCardComponent, isStandalone: true, selector: "si-card", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, subHeading: { classPropertyName: "subHeading", publicName: "subHeading", isSignal: true, isRequired: false, transformFunction: null }, primaryActions: { classPropertyName: "primaryActions", publicName: "primaryActions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, actionBarViewType: { classPropertyName: "actionBarViewType", publicName: "actionBarViewType", isSignal: true, isRequired: false, transformFunction: null }, actionBarTitle: { classPropertyName: "actionBarTitle", publicName: "actionBarTitle", isSignal: true, isRequired: false, transformFunction: null }, imgSrc: { classPropertyName: "imgSrc", publicName: "imgSrc", isSignal: true, isRequired: false, transformFunction: null }, imgAlt: { classPropertyName: "imgAlt", publicName: "imgAlt", isSignal: true, isRequired: false, transformFunction: null }, imgDir: { classPropertyName: "imgDir", publicName: "imgDir", isSignal: true, isRequired: false, transformFunction: null }, imgObjectFit: { classPropertyName: "imgObjectFit", publicName: "imgObjectFit", isSignal: true, isRequired: false, transformFunction: null }, imgObjectPosition: { classPropertyName: "imgObjectPosition", publicName: "imgObjectPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.card-horizontal": "classCardHorizontal()", "style.--si-card-img-object-fit": "imgObjectFit()", "style.--si-card-img-object-position": "imgObjectPosition()" }, classAttribute: "card" }, ngImport: i0, template: "@if (imgSrc()) {\n <img\n class=\"card-content-split\"\n [class.card-img-top]=\"imgDir() !== 'horizontal'\"\n [class.card-img-start]=\"imgDir() === 'horizontal'\"\n [attr.src]=\"imgSrc()\"\n [attr.alt]=\"imgAlt() | translate\"\n />\n}\n\n<div class=\"content-container\" [class.card-content-split]=\"imgSrc()\">\n @if (heading() || displayContentActionBar()) {\n <div class=\"card-header d-flex justify-content-between\">\n <ng-content #cardHeaderIcon select=\"[headerIcon]\" />\n <div class=\"heading\">\n @if (heading()) {\n <div class=\"text-truncate si-h5\">{{ heading() | translate }}</div>\n }\n @if (subHeading()) {\n <div class=\"text-truncate si-body text-secondary pt-2\">{{\n subHeading() | translate\n }}</div>\n }\n </div>\n\n <div class=\"cab d-flex ms-6 my-n4 me-n5\">\n @if (displayContentActionBar()) {\n <si-content-action-bar\n class=\"ms-auto\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [viewType]=\"actionBarViewType()\"\n [attr.title]=\"actionBarTitle() | translate\"\n />\n }\n </div>\n </div>\n }\n <ng-content #cardBody select=\"[body]\" />\n <ng-content #cardFooter select=\"[footer]\" />\n</div>\n", styles: [":host.card-horizontal{flex-direction:row}.text-truncate{flex:0 1 auto}.heading{flex:1 1 auto;min-inline-size:0;overflow:hidden}.cab{flex:1 0 0;min-inline-size:40px}.card-img-top{block-size:50%;inline-size:auto;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, center top)}.card-img-start{block-size:auto;inline-size:50%;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, left center)}.card-content-split{flex:0 0 50%}.content-container{overflow:hidden;position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-inline-size:0;word-wrap:break-word;border-radius:inherit}\n"], dependencies: [{ kind: "component", type: SiContentActionBarComponent, selector: "si-content-action-bar", inputs: ["primaryActions", "secondaryActions", "actionParam", "viewType", "toggleItemLabel", "preventIconsInDropdownMenus", "disabled"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
142
|
+
* @defaultValue false
|
|
143
|
+
* */
|
|
144
|
+
selected = model(false);
|
|
145
|
+
headingId = `${this.id}-heading`;
|
|
146
|
+
subHeadingId = `${this.id}-subHeading`;
|
|
147
|
+
contentId = `${this.id}-content`;
|
|
148
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiActionCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
149
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SiActionCardComponent, isStandalone: true, selector: "button[si-action-card]", inputs: { selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, host: { listeners: { "click": "selectable() ? selected.set(!selected()) : null" }, properties: { "attr.aria-pressed": "selectable() ? (selected() ? \"true\" : \"false\") : undefined", "attr.aria-labelledby": "heading() ? headingId : undefined", "attr.aria-describedby": "subHeading() ? `${subHeadingId} ${contentId}` : contentId", "class.selected": "selectable() && selected()" }, classAttribute: "action-card" }, usesInheritance: true, ngImport: i0, template: "@if (imgSrc()) {\n <img\n class=\"card-content-split\"\n [class.card-img-top]=\"imgDir() !== 'horizontal'\"\n [class.card-img-start]=\"imgDir() === 'horizontal'\"\n [attr.src]=\"imgSrc()\"\n [attr.alt]=\"imgAlt() | translate\"\n />\n}\n\n<div class=\"content-container\" [class.card-content-split]=\"imgSrc()\">\n @if (heading()) {\n <div class=\"card-header d-flex justify-content-between\">\n <ng-content #cardHeaderIcon select=\"[headerIcon]\" />\n <div class=\"heading\">\n @if (heading()) {\n <div class=\"text-truncate si-h5\" [id]=\"headingId\">{{ heading() | translate }}</div>\n }\n @if (subHeading()) {\n <div class=\"text-truncate si-body text-secondary pt-2\" [id]=\"subHeadingId\">{{\n subHeading() | translate\n }}</div>\n }\n </div>\n </div>\n }\n <div class=\"d-contents\" [id]=\"contentId\">\n <ng-content #cardBody select=\"[body]\" />\n <ng-content #cardFooter select=\"[footer]\" />\n </div>\n</div>\n", styles: [":host.card-horizontal{flex-direction:row}.text-truncate{flex:0 1 auto}.heading{flex:1 1 auto;min-inline-size:0;overflow:hidden}.cab{flex:1 0 0;min-inline-size:40px}.card-img-top{block-size:50%;inline-size:auto;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, center top)}.card-img-start{block-size:auto;inline-size:50%;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, left center)}.card-content-split{flex:0 0 50%}.content-container{overflow:hidden;position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-inline-size:0;word-wrap:break-word;border-radius:inherit}\n"], dependencies: [{ kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
86
150
|
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type:
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiActionCardComponent, decorators: [{
|
|
88
152
|
type: Component,
|
|
89
|
-
args: [{ selector: 'si-card', imports: [
|
|
90
|
-
class: 'card',
|
|
91
|
-
'[
|
|
92
|
-
'[
|
|
93
|
-
'[
|
|
94
|
-
|
|
153
|
+
args: [{ selector: 'button[si-action-card]', imports: [SiTranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
154
|
+
class: 'action-card',
|
|
155
|
+
'[attr.aria-pressed]': 'selectable() ? (selected() ? "true" : "false") : undefined',
|
|
156
|
+
'[attr.aria-labelledby]': 'heading() ? headingId : undefined',
|
|
157
|
+
'[attr.aria-describedby]': 'subHeading() ? `${subHeadingId} ${contentId}` : contentId',
|
|
158
|
+
'[class.selected]': 'selectable() && selected()',
|
|
159
|
+
'(click)': 'selectable() ? selected.set(!selected()) : null'
|
|
160
|
+
}, template: "@if (imgSrc()) {\n <img\n class=\"card-content-split\"\n [class.card-img-top]=\"imgDir() !== 'horizontal'\"\n [class.card-img-start]=\"imgDir() === 'horizontal'\"\n [attr.src]=\"imgSrc()\"\n [attr.alt]=\"imgAlt() | translate\"\n />\n}\n\n<div class=\"content-container\" [class.card-content-split]=\"imgSrc()\">\n @if (heading()) {\n <div class=\"card-header d-flex justify-content-between\">\n <ng-content #cardHeaderIcon select=\"[headerIcon]\" />\n <div class=\"heading\">\n @if (heading()) {\n <div class=\"text-truncate si-h5\" [id]=\"headingId\">{{ heading() | translate }}</div>\n }\n @if (subHeading()) {\n <div class=\"text-truncate si-body text-secondary pt-2\" [id]=\"subHeadingId\">{{\n subHeading() | translate\n }}</div>\n }\n </div>\n </div>\n }\n <div class=\"d-contents\" [id]=\"contentId\">\n <ng-content #cardBody select=\"[body]\" />\n <ng-content #cardFooter select=\"[footer]\" />\n </div>\n</div>\n", styles: [":host.card-horizontal{flex-direction:row}.text-truncate{flex:0 1 auto}.heading{flex:1 1 auto;min-inline-size:0;overflow:hidden}.cab{flex:1 0 0;min-inline-size:40px}.card-img-top{block-size:50%;inline-size:auto;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, center top)}.card-img-start{block-size:auto;inline-size:50%;object-fit:var(--si-card-img-object-fit, scale-down);object-position:var(--si-card-img-object-position, left center)}.card-content-split{flex:0 0 50%}.content-container{overflow:hidden;position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-inline-size:0;word-wrap:break-word;border-radius:inherit}\n"] }]
|
|
95
161
|
}] });
|
|
96
162
|
|
|
97
163
|
/**
|
|
@@ -120,5 +186,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
120
186
|
* Generated bundle index. Do not edit.
|
|
121
187
|
*/
|
|
122
188
|
|
|
123
|
-
export { SiCardComponent, SiCardModule };
|
|
189
|
+
export { SiActionCardComponent, SiCardComponent, SiCardModule };
|
|
124
190
|
//# sourceMappingURL=siemens-element-ng-card.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-card.mjs","sources":["../../../../projects/element-ng/card/si-card.component.ts","../../../../projects/element-ng/card/si-card.component.html","../../../../projects/element-ng/card/si-card.module.ts","../../../../projects/element-ng/card/index.ts","../../../../projects/element-ng/card/siemens-element-ng-card.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Component, computed, input } from '@angular/core';\nimport { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport {\n ContentActionBarMainItem,\n SiContentActionBarComponent,\n ViewType\n} from '@siemens/element-ng/content-action-bar';\nimport { MenuItem } from '@siemens/element-ng/menu';\nimport { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';\n\n@Component({\n selector: 'si-card',\n imports: [SiContentActionBarComponent, SiTranslatePipe],\n templateUrl: './si-card.component.html',\n styleUrl: './si-card.component.scss',\n host: {\n class: 'card',\n '[class.card-horizontal]': 'classCardHorizontal()',\n '[style.--si-card-img-object-fit]': 'imgObjectFit()',\n '[style.--si-card-img-object-position]': 'imgObjectPosition()'\n }\n})\nexport class SiCardComponent {\n /**\n * Card header text.\n */\n readonly heading = input<TranslatableString>();\n /**\n * Card secondary header text.\n */\n readonly subHeading = input<TranslatableString>();\n /**\n * Input list of primary action items. Supports up to **4** actions and omits additional ones.\n *\n * @defaultValue []\n */\n readonly primaryActions = input<(MenuItemLegacy | ContentActionBarMainItem)[]>([]);\n /**\n * Input list of secondary action items.\n *\n * @defaultValue []\n */\n readonly secondaryActions = input<(MenuItemLegacy | MenuItem)[]>([]);\n /**\n * A param that will be passed to the `action` in the primary/secondary actions.\n * This allows to re-use the same primary/secondary action arrays across rows\n * in a table.\n */\n readonly actionParam = input<any>();\n /**\n * The view type of the content action bar of the card. Default is `collapsible`\n * for dashboards. However, in some cases you might need to change to `expanded`\n * or `mobile`.\n *\n * @defaultValue 'collapsible'\n */\n readonly actionBarViewType = input<ViewType>('collapsible');\n /**\n * Optional setting of html title attribute for the content action bar.\n * Helpful for a11y when only one action is configured in expand mode.\n *\n * @defaultValue ''\n */\n readonly actionBarTitle = input<TranslatableString>('');\n /**\n * Image source for the card.\n */\n readonly imgSrc = input<string>();\n /**\n * Alt text for a provided image.\n */\n readonly imgAlt = input<TranslatableString>();\n /**\n * Defines if an image is placed on top or start (left) of the card.\n *\n * @defaultValue 'vertical'\n */\n readonly imgDir = input<('horizontal' | 'vertical') | undefined>('vertical');\n /**\n * Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property.\n *\n * @defaultValue 'scale-down'\n */\n readonly imgObjectFit = input<('contain' | 'cover' | 'fill' | 'none' | 'scale-down') | undefined>(\n 'scale-down'\n );\n /**\n * Sets the image [object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) CSS property.\n */\n readonly imgObjectPosition = input<string>();\n /**\n * In case the card uses an image and horizontal direction is used we set flex row direction.\n */\n protected readonly classCardHorizontal = computed(\n () => !!this.imgSrc() && this.imgDir() === 'horizontal'\n );\n /**\n * Returns `true` when primary or secondary actions are set.\n */\n readonly displayContentActionBar = computed(\n () => this.primaryActions()?.length > 0 || this.secondaryActions()?.length > 0\n );\n}\n","@if (imgSrc()) {\n <img\n class=\"card-content-split\"\n [class.card-img-top]=\"imgDir() !== 'horizontal'\"\n [class.card-img-start]=\"imgDir() === 'horizontal'\"\n [attr.src]=\"imgSrc()\"\n [attr.alt]=\"imgAlt() | translate\"\n />\n}\n\n<div class=\"content-container\" [class.card-content-split]=\"imgSrc()\">\n @if (heading() || displayContentActionBar()) {\n <div class=\"card-header d-flex justify-content-between\">\n <ng-content #cardHeaderIcon select=\"[headerIcon]\" />\n <div class=\"heading\">\n @if (heading()) {\n <div class=\"text-truncate si-h5\">{{ heading() | translate }}</div>\n }\n @if (subHeading()) {\n <div class=\"text-truncate si-body text-secondary pt-2\">{{\n subHeading() | translate\n }}</div>\n }\n </div>\n\n <div class=\"cab d-flex ms-6 my-n4 me-n5\">\n @if (displayContentActionBar()) {\n <si-content-action-bar\n class=\"ms-auto\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [viewType]=\"actionBarViewType()\"\n [attr.title]=\"actionBarTitle() | translate\"\n />\n }\n </div>\n </div>\n }\n <ng-content #cardBody select=\"[body]\" />\n <ng-content #cardFooter select=\"[footer]\" />\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiCardComponent } from './si-card.component';\n\n@NgModule({\n imports: [SiCardComponent],\n exports: [SiCardComponent]\n})\nexport class SiCardModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-card.component';\nexport * from './si-card.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAuBU,eAAe,CAAA;AAC1B;;AAEG;IACM,OAAO,GAAG,KAAK,EAAsB;AAC9C;;AAEG;IACM,UAAU,GAAG,KAAK,EAAsB;AACjD;;;;AAIG;AACM,IAAA,cAAc,GAAG,KAAK,CAAgD,EAAE,CAAC;AAClF;;;;AAIG;AACM,IAAA,gBAAgB,GAAG,KAAK,CAAgC,EAAE,CAAC;AACpE;;;;AAIG;IACM,WAAW,G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,OAAA,EAAA,CAHb,eAAe,CAAA,EAAA,OAAA,EAAA,CACf,eAAe,CAAA,EAAA,CAAA;AAEd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAHb,eAAe,CAAA,EAAA,CAAA;;2FAGd,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-card.mjs","sources":["../../../../projects/element-ng/card/si-card-base.directive.ts","../../../../projects/element-ng/card/si-card.component.ts","../../../../projects/element-ng/card/si-card.component.html","../../../../projects/element-ng/card/si-action-card.component.ts","../../../../projects/element-ng/card/si-action-card.component.html","../../../../projects/element-ng/card/si-card.module.ts","../../../../projects/element-ng/card/index.ts","../../../../projects/element-ng/card/siemens-element-ng-card.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { computed, Directive, input } from '@angular/core';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate';\n\n@Directive({\n host: {\n class: 'card',\n '[class.card-horizontal]': 'classCardHorizontal()',\n '[style.--si-card-img-object-fit]': 'imgObjectFit()',\n '[style.--si-card-img-object-position]': 'imgObjectPosition()'\n }\n})\nexport abstract class SiCardBaseDirective {\n /**\n * Card header text.\n */\n readonly heading = input<TranslatableString>();\n /**\n * Card secondary header text.\n */\n readonly subHeading = input<TranslatableString>();\n /**\n * Image source for the card.\n */\n readonly imgSrc = input<string>();\n /**\n * Alt text for a provided image.\n */\n readonly imgAlt = input<TranslatableString>();\n /**\n * Defines if an image is placed on top or start (left) of the card.\n *\n * @defaultValue 'vertical'\n */\n readonly imgDir = input<('horizontal' | 'vertical') | undefined>('vertical');\n /**\n * Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property.\n *\n * @defaultValue 'scale-down'\n */\n readonly imgObjectFit = input<('contain' | 'cover' | 'fill' | 'none' | 'scale-down') | undefined>(\n 'scale-down'\n );\n /**\n * Sets the image [object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) CSS property.\n */\n readonly imgObjectPosition = input<string>();\n /**\n * In case the card uses an image and horizontal direction is used we set flex row direction.\n */\n protected readonly classCardHorizontal = computed(\n () => !!this.imgSrc() && this.imgDir() === 'horizontal'\n );\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Component, computed, input } from '@angular/core';\nimport { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport {\n ContentActionBarMainItem,\n SiContentActionBarComponent,\n ViewType\n} from '@siemens/element-ng/content-action-bar';\nimport { MenuItem } from '@siemens/element-ng/menu';\nimport { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';\n\nimport { SiCardBaseDirective } from './si-card-base.directive';\n\n@Component({\n selector: 'si-card',\n imports: [SiContentActionBarComponent, SiTranslatePipe],\n templateUrl: './si-card.component.html',\n styleUrl: './si-card.component.scss'\n})\nexport class SiCardComponent extends SiCardBaseDirective {\n /**\n * Input list of primary action items. Supports up to **4** actions and omits additional ones.\n *\n * @defaultValue []\n */\n readonly primaryActions = input<(MenuItemLegacy | ContentActionBarMainItem)[]>([]);\n /**\n * Input list of secondary action items.\n *\n * @defaultValue []\n */\n readonly secondaryActions = input<(MenuItemLegacy | MenuItem)[]>([]);\n /**\n * A param that will be passed to the `action` in the primary/secondary actions.\n * This allows to re-use the same primary/secondary action arrays across rows\n * in a table.\n */\n readonly actionParam = input<any>();\n /**\n * The view type of the content action bar of the card. Default is `collapsible`\n * for dashboards. However, in some cases you might need to change to `expanded`\n * or `mobile`.\n *\n * @defaultValue 'collapsible'\n */\n readonly actionBarViewType = input<ViewType>('collapsible');\n /**\n * Optional setting of html title attribute for the content action bar.\n * Helpful for a11y when only one action is configured in expand mode.\n *\n * @defaultValue ''\n */\n readonly actionBarTitle = input<TranslatableString>('');\n /**\n * Returns `true` when primary or secondary actions are set.\n */\n readonly displayContentActionBar = computed(\n () => this.primaryActions()?.length > 0 || this.secondaryActions()?.length > 0\n );\n}\n","@if (imgSrc()) {\n <img\n class=\"card-content-split\"\n [class.card-img-top]=\"imgDir() !== 'horizontal'\"\n [class.card-img-start]=\"imgDir() === 'horizontal'\"\n [attr.src]=\"imgSrc()\"\n [attr.alt]=\"imgAlt() | translate\"\n />\n}\n\n<div class=\"content-container\" [class.card-content-split]=\"imgSrc()\">\n @if (heading() || displayContentActionBar()) {\n <div class=\"card-header d-flex justify-content-between\">\n <ng-content #cardHeaderIcon select=\"[headerIcon]\" />\n <div class=\"heading\">\n @if (heading()) {\n <div class=\"text-truncate si-h5\">{{ heading() | translate }}</div>\n }\n @if (subHeading()) {\n <div class=\"text-truncate si-body text-secondary pt-2\">{{\n subHeading() | translate\n }}</div>\n }\n </div>\n\n <div class=\"cab d-flex ms-6 my-n4 me-n5\">\n @if (displayContentActionBar()) {\n <si-content-action-bar\n class=\"ms-auto\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [viewType]=\"actionBarViewType()\"\n [attr.title]=\"actionBarTitle() | translate\"\n />\n }\n </div>\n </div>\n }\n <ng-content #cardBody select=\"[body]\" />\n <ng-content #cardFooter select=\"[footer]\" />\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { booleanAttribute, ChangeDetectionStrategy, Component, input, model } from '@angular/core';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\n\nimport { SiCardBaseDirective } from './si-card-base.directive';\n\n/**\n * An action card component that extends the base card component with option to\n * either select the whole card or trigger an action.\n *\n * Usage:\n * as selectable card:\n * `<button si-card selectable type=\"button\" [(selected)]=\"isSelected\">...</button>`\n *\n * or as an action card:\n * `<button si-card type=\"button\" (click)=\"doSomeAction()\">...</button>`\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[si-action-card]',\n imports: [SiTranslatePipe],\n templateUrl: './si-action-card.component.html',\n styleUrl: './si-card.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'action-card',\n '[attr.aria-pressed]': 'selectable() ? (selected() ? \"true\" : \"false\") : undefined',\n '[attr.aria-labelledby]': 'heading() ? headingId : undefined',\n '[attr.aria-describedby]': 'subHeading() ? `${subHeadingId} ${contentId}` : contentId',\n '[class.selected]': 'selectable() && selected()',\n '(click)': 'selectable() ? selected.set(!selected()) : null'\n }\n})\nexport class SiActionCardComponent extends SiCardBaseDirective {\n private static idCounter = 0;\n private id = `__si-action-card-${SiActionCardComponent.idCounter++}`;\n /**\n * Makes whole card selectable.\n *\n * @defaultValue false\n */\n readonly selectable = input(false, {\n transform: booleanAttribute\n });\n /**\n * Indicates if the card is selected.\n * Ignored when `selectable` is not set to `true`.\n *\n * @defaultValue false\n * */\n readonly selected = model(false);\n\n protected headingId = `${this.id}-heading`;\n protected subHeadingId = `${this.id}-subHeading`;\n protected contentId = `${this.id}-content`;\n}\n","@if (imgSrc()) {\n <img\n class=\"card-content-split\"\n [class.card-img-top]=\"imgDir() !== 'horizontal'\"\n [class.card-img-start]=\"imgDir() === 'horizontal'\"\n [attr.src]=\"imgSrc()\"\n [attr.alt]=\"imgAlt() | translate\"\n />\n}\n\n<div class=\"content-container\" [class.card-content-split]=\"imgSrc()\">\n @if (heading()) {\n <div class=\"card-header d-flex justify-content-between\">\n <ng-content #cardHeaderIcon select=\"[headerIcon]\" />\n <div class=\"heading\">\n @if (heading()) {\n <div class=\"text-truncate si-h5\" [id]=\"headingId\">{{ heading() | translate }}</div>\n }\n @if (subHeading()) {\n <div class=\"text-truncate si-body text-secondary pt-2\" [id]=\"subHeadingId\">{{\n subHeading() | translate\n }}</div>\n }\n </div>\n </div>\n }\n <div class=\"d-contents\" [id]=\"contentId\">\n <ng-content #cardBody select=\"[body]\" />\n <ng-content #cardFooter select=\"[footer]\" />\n </div>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiCardComponent } from './si-card.component';\n\n@NgModule({\n imports: [SiCardComponent],\n exports: [SiCardComponent]\n})\nexport class SiCardModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-card.component';\nexport * from './si-action-card.component';\nexport * from './si-card.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAYmB,mBAAmB,CAAA;AACvC;;AAEG;IACM,OAAO,GAAG,KAAK,EAAsB;AAC9C;;AAEG;IACM,UAAU,GAAG,KAAK,EAAsB;AACjD;;AAEG;IACM,MAAM,GAAG,KAAK,EAAU;AACjC;;AAEG;IACM,MAAM,GAAG,KAAK,EAAsB;AAC7C;;;;AAIG;AACM,IAAA,MAAM,GAAG,KAAK,CAA0C,UAAU,CAAC;AAC5E;;;;AAIG;AACM,IAAA,YAAY,GAAG,KAAK,CAC3B,YAAY,CACb;AACD;;AAEG;IACM,iBAAiB,GAAG,KAAK,EAAU;AAC5C;;AAEG;IACgB,mBAAmB,GAAG,QAAQ,CAC/C,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,KAAK,YAAY,CACxD;uGAxCmB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA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;ACHH;;AAEG;;;;"}
|
|
@@ -468,6 +468,7 @@ const correctKeyRTL = (key) => {
|
|
|
468
468
|
* Copyright (c) Siemens 2016 - 2025
|
|
469
469
|
* SPDX-License-Identifier: MIT
|
|
470
470
|
*/
|
|
471
|
+
/** @deprecated Use the CDK Overlay instead. */
|
|
471
472
|
const AXIS_X = {
|
|
472
473
|
axis: 'X',
|
|
473
474
|
directionRegular: 'end',
|
|
@@ -477,6 +478,7 @@ const AXIS_X = {
|
|
|
477
478
|
size: 'width',
|
|
478
479
|
windowSize: 'innerWidth'
|
|
479
480
|
};
|
|
481
|
+
/** @deprecated Use the CDK Overlay instead. */
|
|
480
482
|
const AXIS_Y = {
|
|
481
483
|
axis: 'Y',
|
|
482
484
|
directionRegular: 'down',
|
|
@@ -486,6 +488,7 @@ const AXIS_Y = {
|
|
|
486
488
|
size: 'height',
|
|
487
489
|
windowSize: 'innerHeight'
|
|
488
490
|
};
|
|
491
|
+
/** @deprecated Use the CDK Overlay instead. */
|
|
489
492
|
const BOUNDING_RECT_WINDOW = {
|
|
490
493
|
getBoundingClientRect: () => ({
|
|
491
494
|
top: 0,
|
|
@@ -494,6 +497,7 @@ const BOUNDING_RECT_WINDOW = {
|
|
|
494
497
|
right: window.innerWidth
|
|
495
498
|
})
|
|
496
499
|
};
|
|
500
|
+
/** @deprecated Use the CDK Overlay instead. */
|
|
497
501
|
const resolveReference = (hostElement, reference) => {
|
|
498
502
|
if (reference) {
|
|
499
503
|
const childReferenceCheck = hostElement.querySelector(reference);
|
|
@@ -632,6 +636,7 @@ const getRelativeContentPosition = (params) => {
|
|
|
632
636
|
const topOffset = relativePosition.top - contentParentRect.top + contentParent.scrollTop;
|
|
633
637
|
return { left: leftOffset, top: topOffset };
|
|
634
638
|
};
|
|
639
|
+
/** @deprecated Use the CDK Overlay instead. */
|
|
635
640
|
const getContentPositionString = (params) => {
|
|
636
641
|
const { contentElement, direction, placement, placementReferenceElement, align, rtl } = params;
|
|
637
642
|
const position = getRelativeContentPosition({
|
|
@@ -644,6 +649,7 @@ const getContentPositionString = (params) => {
|
|
|
644
649
|
});
|
|
645
650
|
return `translate3d(${position.left}px, ${position.top}px, 0px)`;
|
|
646
651
|
};
|
|
652
|
+
/** @deprecated Use the CDK Overlay instead. */
|
|
647
653
|
const responsivelyCheckDirection = (params) => {
|
|
648
654
|
const { isScrolling, currentDirection, contentElements, hostElement, placement, placementReferenceElement, align, responsiveDirectionToPlacement, closeOnPlacementReferenceScrollOut, closeOnContentScrollOut, minSpaceThresholdFactor, placementReverse, rtl } = params;
|
|
649
655
|
const actualRtl = rtl ?? isRTL();
|