@siemens/element-ng 47.3.0 → 47.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/badge/si-badge.component.d.ts +1 -1
  2. package/breadcrumb/breadcrumb-item.model.d.ts +36 -0
  3. package/breadcrumb/index.d.ts +7 -0
  4. package/breadcrumb/package.json +3 -0
  5. package/breadcrumb/si-breadcrumb-item-template.directive.d.ts +10 -0
  6. package/breadcrumb/si-breadcrumb.component.d.ts +46 -0
  7. package/breadcrumb/si-breadcrumb.module.d.ts +7 -0
  8. package/card/index.d.ts +6 -0
  9. package/card/package.json +3 -0
  10. package/card/si-card.component.d.ts +79 -0
  11. package/card/si-card.module.d.ts +7 -0
  12. package/circle-status/index.d.ts +6 -0
  13. package/circle-status/package.json +3 -0
  14. package/circle-status/si-circle-status.component.d.ts +66 -0
  15. package/circle-status/si-circle-status.module.d.ts +7 -0
  16. package/column-selection-dialog/column-selection-editor/si-column-selection-editor.component.d.ts +23 -0
  17. package/column-selection-dialog/index.d.ts +6 -0
  18. package/column-selection-dialog/package.json +3 -0
  19. package/column-selection-dialog/si-column-selection-dialog.component.d.ts +114 -0
  20. package/column-selection-dialog/si-column-selection-dialog.service.d.ts +20 -0
  21. package/column-selection-dialog/si-column-selection-dialog.types.d.ts +68 -0
  22. package/common/models/status-type.model.d.ts +2 -2
  23. package/date-range-filter/index.d.ts +8 -0
  24. package/date-range-filter/package.json +3 -0
  25. package/date-range-filter/si-date-range-calculation.service.d.ts +33 -0
  26. package/date-range-filter/si-date-range-filter.component.d.ts +248 -0
  27. package/date-range-filter/si-date-range-filter.module.d.ts +7 -0
  28. package/date-range-filter/si-date-range-filter.types.d.ts +40 -0
  29. package/date-range-filter/si-relative-date.component.d.ts +31 -0
  30. package/datepicker/components/si-calendar-body.component.d.ts +137 -0
  31. package/datepicker/components/si-calendar-date-cell.directive.d.ts +16 -0
  32. package/datepicker/components/si-calendar-direction-button.component.d.ts +18 -0
  33. package/datepicker/components/si-compare-adapter.d.ts +37 -0
  34. package/datepicker/components/si-day-selection.component.d.ts +76 -0
  35. package/datepicker/components/si-initial-focus.component.d.ts +74 -0
  36. package/datepicker/components/si-month-selection.component.d.ts +62 -0
  37. package/datepicker/components/si-year-selection.component.d.ts +65 -0
  38. package/datepicker/date-time-helper.d.ts +302 -0
  39. package/datepicker/index.d.ts +15 -0
  40. package/datepicker/package.json +3 -0
  41. package/datepicker/si-calendar-button.component.d.ts +49 -0
  42. package/datepicker/si-date-input.directive.d.ts +114 -0
  43. package/datepicker/si-date-range.component.d.ts +150 -0
  44. package/datepicker/si-datepicker-overlay.component.d.ts +82 -0
  45. package/datepicker/si-datepicker-overlay.directive.d.ts +104 -0
  46. package/datepicker/si-datepicker.component.d.ts +228 -0
  47. package/datepicker/si-datepicker.directive.d.ts +62 -0
  48. package/datepicker/si-datepicker.model.d.ts +129 -0
  49. package/datepicker/si-datepicker.module.d.ts +12 -0
  50. package/datepicker/si-timepicker.component.d.ts +214 -0
  51. package/electron-titlebar/electron.helpers.d.ts +5 -0
  52. package/electron-titlebar/index.d.ts +7 -0
  53. package/electron-titlebar/package.json +3 -0
  54. package/electron-titlebar/si-electron-titlebar.component.d.ts +72 -0
  55. package/electron-titlebar/si-electron-titlebar.module.d.ts +7 -0
  56. package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
  57. package/fesm2022/siemens-element-ng-breadcrumb.mjs +302 -0
  58. package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -0
  59. package/fesm2022/siemens-element-ng-card.mjs +122 -0
  60. package/fesm2022/siemens-element-ng-card.mjs.map +1 -0
  61. package/fesm2022/siemens-element-ng-circle-status.mjs +146 -0
  62. package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -0
  63. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +369 -0
  64. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -0
  65. package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
  66. package/fesm2022/siemens-element-ng-date-range-filter.mjs +649 -0
  67. package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -0
  68. package/fesm2022/siemens-element-ng-datepicker.mjs +4231 -0
  69. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -0
  70. package/fesm2022/siemens-element-ng-electron-titlebar.mjs +142 -0
  71. package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -0
  72. package/fesm2022/siemens-element-ng-file-uploader.mjs +751 -0
  73. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -0
  74. package/fesm2022/siemens-element-ng-filter-bar.mjs +153 -0
  75. package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -0
  76. package/fesm2022/siemens-element-ng-icon.mjs +11 -1
  77. package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
  78. package/fesm2022/siemens-element-ng-info-page.mjs +63 -0
  79. package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -0
  80. package/fesm2022/siemens-element-ng-inline-notification.mjs +4 -6
  81. package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
  82. package/fesm2022/siemens-element-ng-ip-input.mjs +451 -0
  83. package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -0
  84. package/fesm2022/siemens-element-ng-localization.mjs +306 -0
  85. package/fesm2022/siemens-element-ng-localization.mjs.map +1 -0
  86. package/fesm2022/siemens-element-ng-photo-upload.mjs +480 -0
  87. package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -0
  88. package/fesm2022/siemens-element-ng-search-bar.mjs +193 -0
  89. package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -0
  90. package/fesm2022/siemens-element-ng-slider.mjs +313 -0
  91. package/fesm2022/siemens-element-ng-slider.mjs.map +1 -0
  92. package/fesm2022/siemens-element-ng-sort-bar.mjs +89 -0
  93. package/fesm2022/siemens-element-ng-sort-bar.mjs.map +1 -0
  94. package/fesm2022/siemens-element-ng-split.mjs +575 -0
  95. package/fesm2022/siemens-element-ng-split.mjs.map +1 -0
  96. package/fesm2022/siemens-element-ng-status-toggle.mjs +196 -0
  97. package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -0
  98. package/fesm2022/siemens-element-ng-system-banner.mjs +47 -0
  99. package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -0
  100. package/fesm2022/siemens-element-ng-tabs.mjs +395 -0
  101. package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -0
  102. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  103. package/fesm2022/siemens-element-ng-unauthorized-page.mjs +76 -0
  104. package/fesm2022/siemens-element-ng-unauthorized-page.mjs.map +1 -0
  105. package/file-uploader/index.d.ts +8 -0
  106. package/file-uploader/package.json +3 -0
  107. package/file-uploader/si-file-dropzone.component.d.ts +106 -0
  108. package/file-uploader/si-file-uploader.component.d.ts +296 -0
  109. package/file-uploader/si-file-uploader.model.d.ts +12 -0
  110. package/file-uploader/si-file-uploader.module.d.ts +8 -0
  111. package/filter-bar/filter.d.ts +26 -0
  112. package/filter-bar/index.d.ts +8 -0
  113. package/filter-bar/package.json +3 -0
  114. package/filter-bar/si-filter-bar.component.d.ts +65 -0
  115. package/filter-bar/si-filter-bar.module.d.ts +7 -0
  116. package/filter-bar/si-filter-pill.component.d.ts +20 -0
  117. package/icon/element-icons.d.ts +10 -0
  118. package/info-page/index.d.ts +5 -0
  119. package/info-page/package.json +3 -0
  120. package/info-page/si-info-page.component.d.ts +38 -0
  121. package/inline-notification/si-inline-notification.component.d.ts +0 -2
  122. package/ip-input/address-utils.d.ts +28 -0
  123. package/ip-input/address-validators.d.ts +21 -0
  124. package/ip-input/index.d.ts +7 -0
  125. package/ip-input/package.json +3 -0
  126. package/ip-input/si-ip-input.directive.d.ts +53 -0
  127. package/ip-input/si-ip4-input.directive.d.ts +9 -0
  128. package/ip-input/si-ip6-input.directive.d.ts +10 -0
  129. package/localization/index.d.ts +8 -0
  130. package/localization/package.json +3 -0
  131. package/localization/si-directionality.d.ts +41 -0
  132. package/localization/si-locale-id.d.ts +22 -0
  133. package/localization/si-locale-store.d.ts +16 -0
  134. package/localization/si-locale.service.d.ts +73 -0
  135. package/package.json +91 -3
  136. package/photo-upload/index.d.ts +6 -0
  137. package/photo-upload/package.json +3 -0
  138. package/photo-upload/si-image-cropper-style.component.d.ts +5 -0
  139. package/photo-upload/si-photo-upload.component.d.ts +298 -0
  140. package/search-bar/index.d.ts +6 -0
  141. package/search-bar/package.json +3 -0
  142. package/search-bar/si-search-bar.component.d.ts +87 -0
  143. package/search-bar/si-search-bar.module.d.ts +7 -0
  144. package/slider/index.d.ts +6 -0
  145. package/slider/package.json +3 -0
  146. package/slider/si-slider.component.d.ts +129 -0
  147. package/slider/si-slider.module.d.ts +7 -0
  148. package/sort-bar/index.d.ts +6 -0
  149. package/sort-bar/package.json +3 -0
  150. package/sort-bar/si-sort-bar.component.d.ts +42 -0
  151. package/sort-bar/si-sort-bar.module.d.ts +7 -0
  152. package/split/index.d.ts +8 -0
  153. package/split/package.json +3 -0
  154. package/split/si-split-part.component.d.ts +154 -0
  155. package/split/si-split.component.d.ts +48 -0
  156. package/split/si-split.interfaces.d.ts +17 -0
  157. package/split/si-split.module.d.ts +8 -0
  158. package/status-toggle/index.d.ts +6 -0
  159. package/status-toggle/package.json +3 -0
  160. package/status-toggle/si-status-toggle.component.d.ts +54 -0
  161. package/status-toggle/status-toggle.model.d.ts +26 -0
  162. package/system-banner/index.d.ts +5 -0
  163. package/system-banner/package.json +3 -0
  164. package/system-banner/system-banner.component.d.ts +23 -0
  165. package/tabs/index.d.ts +7 -0
  166. package/tabs/package.json +3 -0
  167. package/tabs/si-tab/index.d.ts +5 -0
  168. package/tabs/si-tab/si-tab.component.d.ts +58 -0
  169. package/tabs/si-tabs.module.d.ts +8 -0
  170. package/tabs/si-tabset/index.d.ts +5 -0
  171. package/tabs/si-tabset/si-tabset.component.d.ts +100 -0
  172. package/template-i18n.json +82 -0
  173. package/translate/si-translatable-keys.interface.d.ts +82 -0
  174. package/unauthorized-page/index.d.ts +6 -0
  175. package/unauthorized-page/package.json +3 -0
  176. package/unauthorized-page/si-unauthorized-page.component.d.ts +35 -0
  177. package/unauthorized-page/si-unauthorized-page.module.d.ts +7 -0
@@ -0,0 +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 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 { SiTranslateModule, TranslatableString } from '@siemens/element-translate-ng/translate';\n\n@Component({\n selector: 'si-card',\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 imports: [SiContentActionBarComponent, SiTranslateModule]\n})\nexport class SiCardComponent {\n /**\n * Card header text.\n */\n readonly heading = 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<string>();\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 * 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 @if (heading()) {\n <div class=\"text-truncate\">{{ heading() | translate }}</div>\n }\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 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 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;;;;AAIG;AACM,IAAA,cAAc,GAAG,KAAK,CAAgD,EAAE,CAAC;AAClF;;;;AAIG;AACM,IAAA,gBAAgB,GAAG,KAAK,CAAgC,EAAE,CAAC;AACpE;;;;AAIG;IACM,WAAW,GAAG,KAAK,EAAO;AACnC;;;;;;AAMG;AACM,IAAA,iBAAiB,GAAG,KAAK,CAAW,aAAa,CAAC;AAC3D;;;;;AAKG;AACM,IAAA,cAAc,GAAG,KAAK,CAAqB,EAAE,CAAC;AACvD;;AAEG;IACM,MAAM,GAAG,KAAK,EAAU;AACjC;;AAEG;IACM,MAAM,GAAG,KAAK,EAAU;AACjC;;;;AAIG;AACM,IAAA,MAAM,GAAG,KAAK,CAA0C,UAAU,CAAC;AAC5E;;;;;AAKG;AACM,IAAA,Y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1B,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
@@ -0,0 +1,146 @@
1
+ import { NgClass } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, input, booleanAttribute, computed, signal, viewChild, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
4
+ import { BlinkService } from '@siemens/element-ng/common';
5
+ import { STATUS_ICON_CONFIG, addIcons, elementRight4, SiIconNextComponent } from '@siemens/element-ng/icon';
6
+ import * as i1 from '@siemens/element-translate-ng/translate';
7
+ import { SiTranslateModule } from '@siemens/element-translate-ng/translate';
8
+
9
+ /**
10
+ * Copyright Siemens 2016 - 2025.
11
+ * SPDX-License-Identifier: MIT
12
+ */
13
+ class SiCircleStatusComponent {
14
+ statusIcons = inject(STATUS_ICON_CONFIG);
15
+ /**
16
+ * The status (success, info, warning, danger) to be visualized.
17
+ */
18
+ status = input();
19
+ /* DO NOT REMOVE: Even though the input is marked as deprecated, the core-team decided not to remove the
20
+ input. The possibility to have custom color is often requested by projects, so we keep it.
21
+ however in order to discourage it's use, we keep it marked deprecated.
22
+ */
23
+ /**
24
+ * A custom color (e.g. `#fefefe`) for exceptional cases.
25
+ * @deprecated use the semantic `status` input instead.
26
+ */
27
+ color = input();
28
+ /**
29
+ * Set a domain type icon (e.g. `element-door`) for which the status shall be shown.
30
+ * Leave undefined for visualizing the status without an icon.
31
+ */
32
+ icon = input();
33
+ /**
34
+ * Set the size using either regular or small only works when used together with `icon`
35
+ *
36
+ * @defaultValue 'regular'
37
+ */
38
+ size = input('regular');
39
+ /**
40
+ * event direction is out
41
+ *
42
+ * @defaultValue false
43
+ */
44
+ eventOut = input(false, { transform: booleanAttribute });
45
+ /**
46
+ * Custom icon class for event out
47
+ */
48
+ eventIcon = input();
49
+ /**
50
+ * Whether the status should appear with a pulsing circle around the badge.
51
+ *
52
+ * @defaultValue false
53
+ */
54
+ blink = input(false, { transform: booleanAttribute });
55
+ /**
56
+ * Blink pulse generator for synchronized blinking with other components
57
+ */
58
+ blinkPulse = input();
59
+ /**
60
+ * Aria label for icon and status combo. Needed for a11y
61
+ */
62
+ ariaLabel = input();
63
+ backgroundClass = computed(() => this.statusIcon()?.background ?? '');
64
+ theAriaLabel = computed(() => this.ariaLabel() ?? this.autoLabel());
65
+ autoLabel = computed(() => {
66
+ const status = this.status();
67
+ const statusName = status && this.statusIcons[status] ? status : 'none';
68
+ const direction = this.eventOut() ? ' out' : '';
69
+ const iconName = this.icon()?.replace(/^element-{0,1}/, '') ?? '';
70
+ return `${iconName.toLocaleLowerCase()}${this.status() && this.icon() ? ' in ' : ''}status ${statusName}${direction}`;
71
+ });
72
+ statusIcon = computed(() => {
73
+ const status = this.status();
74
+ return status ? this.statusIcons[status] : undefined;
75
+ });
76
+ blinkOn = signal(false);
77
+ contrastFix = signal(false);
78
+ icons = addIcons({ elementRight4 });
79
+ blinkSubs;
80
+ bg = viewChild.required('bg');
81
+ blinkService = inject(BlinkService);
82
+ ngOnChanges(changes) {
83
+ if (this.blinkService && changes.blink) {
84
+ this.blinkSubs?.unsubscribe();
85
+ if (this.blink()) {
86
+ const pulse = this.blinkPulse() ?? this.blinkService.pulse$;
87
+ this.blinkSubs = pulse.subscribe(onOff => {
88
+ this.blinkOn.set(onOff);
89
+ });
90
+ }
91
+ else {
92
+ this.blinkOn.set(false);
93
+ }
94
+ }
95
+ if (changes.color || changes.blink) {
96
+ queueMicrotask(() => {
97
+ this.contrastFix.set(!!this.color() && this.blink() && this.calculateContrastFix());
98
+ });
99
+ }
100
+ }
101
+ ngOnDestroy() {
102
+ this.blinkSubs?.unsubscribe();
103
+ }
104
+ calculateContrastFix() {
105
+ // see https://www.w3.org/TR/AERT/#color-contrast
106
+ const rgb = getComputedStyle(this.bg().nativeElement)
107
+ .backgroundColor?.match(/\d+/g)
108
+ ?.map(v => +v);
109
+ return !!rgb && Math.round((rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000) <= 128;
110
+ }
111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiCircleStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
112
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiCircleStatusComponent, isStandalone: true, selector: "si-circle-status", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, eventOut: { classPropertyName: "eventOut", publicName: "eventOut", isSignal: true, isRequired: false, transformFunction: null }, eventIcon: { classPropertyName: "eventIcon", publicName: "eventIcon", isSignal: true, isRequired: false, transformFunction: null }, blink: { classPropertyName: "blink", publicName: "blink", isSignal: true, isRequired: false, transformFunction: null }, blinkPulse: { classPropertyName: "blinkPulse", publicName: "blinkPulse", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "bg", first: true, predicate: ["bg"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"status-indication d-flex align-items-center justify-content-center\"\n role=\"status\"\n [class.has-icon]=\"icon()\"\n [class.small]=\"size() === 'small'\"\n [attr.aria-label]=\"theAriaLabel() | translate\"\n>\n <div\n #bg\n class=\"bg\"\n [class.pulse]=\"blinkOn()\"\n [class.deprecated-color]=\"!status()\"\n [class.contrast-fix]=\"contrastFix()\"\n [ngClass]=\"backgroundClass()\"\n [style.background-color]=\"color()\"\n ></div>\n @if (!status()) {\n <div class=\"deprecated-dot\" [style.background-color]=\"color()\"></div>\n }\n @let iconConfig = statusIcon();\n @if (iconConfig) {\n <span class=\"status-icon icon-stack indicator\">\n <si-icon-next class=\"status-icon\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon-next\n class=\"status-icon\"\n [ngClass]=\"iconConfig.stackedColor\"\n [icon]=\"iconConfig.stacked\"\n />\n </span>\n }\n @let eventIconValue = eventIcon();\n @if (eventOut()) {\n <si-icon-next class=\"icon text-body event-out flip-rtl\" [icon]=\"icons.elementRight4\" />\n } @else if (eventIconValue) {\n <si-icon-next class=\"icon text-body event-out\" [icon]=\"eventIconValue\" />\n }\n @let iconValue = icon();\n @if (iconValue) {\n <si-icon-next class=\"icon position-relative text-body\" [icon]=\"iconValue\" />\n }\n</div>\n", styles: [":host{display:inline-block;vertical-align:middle}:host .status-indication ::ng-deep .status-icon{font-size:24px}:host .status-indication.has-icon.small ::ng-deep .status-icon,:host .status-indication.has-icon.small ::ng-deep .event-out{font-size:16px}.deprecated-dot{inline-size:10px;block-size:10px;border-radius:50%}.event-out{position:absolute;inset-block-end:-2px;inset-inline-end:-13px}.status-indication{position:relative;inline-size:40px;block-size:40px;border-radius:50%;border:1px solid transparent}.status-indication.has-icon{border-color:var(--element-ui-4);background-color:var(--element-base-1);margin-block:6px;margin-inline:0 12px}.status-indication.has-icon .deprecated-dot,.status-indication.has-icon .indicator{position:absolute}.status-indication.has-icon .deprecated-dot{inset-block-start:-2px;inset-inline-end:0}.status-indication.has-icon .indicator{inset-block-start:-9px;inset-inline-end:-13px}.status-indication.has-icon.small{inline-size:32px;block-size:32px;margin-block:4px;margin-inline:0 8px}.status-indication.has-icon.small .event-out{inset-block-end:1px;inset-inline-end:-9px}.status-indication.has-icon.small .deprecated-dot{inline-size:8px;block-size:8px;inset-block-start:-1px;inset-inline-end:-1px}.status-indication.has-icon.small .indicator{inset-block-start:-6px;inset-inline-end:-8px}.status-indication>*{pointer-events:none;line-height:0}.bg{position:absolute;inset:0;border-radius:50%;transition:opacity calc(.5s * var(--element-animations-enabled, 1));opacity:0}.pulse.deprecated-color{opacity:.5}.pulse.deprecated-color.contrast-fix{opacity:.25}.pulse:not(.deprecated-color){opacity:1}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i1.SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
113
+ }
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiCircleStatusComponent, decorators: [{
115
+ type: Component,
116
+ args: [{ selector: 'si-circle-status', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, SiIconNextComponent, SiTranslateModule], template: "<div\n class=\"status-indication d-flex align-items-center justify-content-center\"\n role=\"status\"\n [class.has-icon]=\"icon()\"\n [class.small]=\"size() === 'small'\"\n [attr.aria-label]=\"theAriaLabel() | translate\"\n>\n <div\n #bg\n class=\"bg\"\n [class.pulse]=\"blinkOn()\"\n [class.deprecated-color]=\"!status()\"\n [class.contrast-fix]=\"contrastFix()\"\n [ngClass]=\"backgroundClass()\"\n [style.background-color]=\"color()\"\n ></div>\n @if (!status()) {\n <div class=\"deprecated-dot\" [style.background-color]=\"color()\"></div>\n }\n @let iconConfig = statusIcon();\n @if (iconConfig) {\n <span class=\"status-icon icon-stack indicator\">\n <si-icon-next class=\"status-icon\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon-next\n class=\"status-icon\"\n [ngClass]=\"iconConfig.stackedColor\"\n [icon]=\"iconConfig.stacked\"\n />\n </span>\n }\n @let eventIconValue = eventIcon();\n @if (eventOut()) {\n <si-icon-next class=\"icon text-body event-out flip-rtl\" [icon]=\"icons.elementRight4\" />\n } @else if (eventIconValue) {\n <si-icon-next class=\"icon text-body event-out\" [icon]=\"eventIconValue\" />\n }\n @let iconValue = icon();\n @if (iconValue) {\n <si-icon-next class=\"icon position-relative text-body\" [icon]=\"iconValue\" />\n }\n</div>\n", styles: [":host{display:inline-block;vertical-align:middle}:host .status-indication ::ng-deep .status-icon{font-size:24px}:host .status-indication.has-icon.small ::ng-deep .status-icon,:host .status-indication.has-icon.small ::ng-deep .event-out{font-size:16px}.deprecated-dot{inline-size:10px;block-size:10px;border-radius:50%}.event-out{position:absolute;inset-block-end:-2px;inset-inline-end:-13px}.status-indication{position:relative;inline-size:40px;block-size:40px;border-radius:50%;border:1px solid transparent}.status-indication.has-icon{border-color:var(--element-ui-4);background-color:var(--element-base-1);margin-block:6px;margin-inline:0 12px}.status-indication.has-icon .deprecated-dot,.status-indication.has-icon .indicator{position:absolute}.status-indication.has-icon .deprecated-dot{inset-block-start:-2px;inset-inline-end:0}.status-indication.has-icon .indicator{inset-block-start:-9px;inset-inline-end:-13px}.status-indication.has-icon.small{inline-size:32px;block-size:32px;margin-block:4px;margin-inline:0 8px}.status-indication.has-icon.small .event-out{inset-block-end:1px;inset-inline-end:-9px}.status-indication.has-icon.small .deprecated-dot{inline-size:8px;block-size:8px;inset-block-start:-1px;inset-inline-end:-1px}.status-indication.has-icon.small .indicator{inset-block-start:-6px;inset-inline-end:-8px}.status-indication>*{pointer-events:none;line-height:0}.bg{position:absolute;inset:0;border-radius:50%;transition:opacity calc(.5s * var(--element-animations-enabled, 1));opacity:0}.pulse.deprecated-color{opacity:.5}.pulse.deprecated-color.contrast-fix{opacity:.25}.pulse:not(.deprecated-color){opacity:1}\n"] }]
117
+ }] });
118
+
119
+ /**
120
+ * Copyright Siemens 2016 - 2025.
121
+ * SPDX-License-Identifier: MIT
122
+ */
123
+ class SiCircleStatusModule {
124
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiCircleStatusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
125
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: SiCircleStatusModule, imports: [SiCircleStatusComponent], exports: [SiCircleStatusComponent] });
126
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiCircleStatusModule, imports: [SiCircleStatusComponent] });
127
+ }
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiCircleStatusModule, decorators: [{
129
+ type: NgModule,
130
+ args: [{
131
+ imports: [SiCircleStatusComponent],
132
+ exports: [SiCircleStatusComponent]
133
+ }]
134
+ }] });
135
+
136
+ /**
137
+ * Copyright Siemens 2016 - 2025.
138
+ * SPDX-License-Identifier: MIT
139
+ */
140
+
141
+ /**
142
+ * Generated bundle index. Do not edit.
143
+ */
144
+
145
+ export { SiCircleStatusComponent, SiCircleStatusModule };
146
+ //# sourceMappingURL=siemens-element-ng-circle-status.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"siemens-element-ng-circle-status.mjs","sources":["../../../../projects/element-ng/circle-status/si-circle-status.component.ts","../../../../projects/element-ng/circle-status/si-circle-status.component.html","../../../../projects/element-ng/circle-status/si-circle-status.module.ts","../../../../projects/element-ng/circle-status/index.ts","../../../../projects/element-ng/circle-status/siemens-element-ng-circle-status.ts"],"sourcesContent":["/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nimport { NgClass } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport { BlinkService, EntityStatusType, StatusIcon } from '@siemens/element-ng/common';\nimport {\n addIcons,\n elementRight4,\n SiIconNextComponent,\n STATUS_ICON_CONFIG\n} from '@siemens/element-ng/icon';\nimport { SiTranslateModule } from '@siemens/element-translate-ng/translate';\nimport { Observable, Subscription } from 'rxjs';\n\n@Component({\n selector: 'si-circle-status',\n templateUrl: './si-circle-status.component.html',\n styleUrl: './si-circle-status.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgClass, SiIconNextComponent, SiTranslateModule]\n})\nexport class SiCircleStatusComponent implements OnChanges, OnDestroy {\n private readonly statusIcons = inject(STATUS_ICON_CONFIG);\n /**\n * The status (success, info, warning, danger) to be visualized.\n */\n readonly status = input<EntityStatusType>();\n\n /* DO NOT REMOVE: Even though the input is marked as deprecated, the core-team decided not to remove the\n input. The possibility to have custom color is often requested by projects, so we keep it.\n however in order to discourage it's use, we keep it marked deprecated.\n */\n /**\n * A custom color (e.g. `#fefefe`) for exceptional cases.\n * @deprecated use the semantic `status` input instead.\n */\n readonly color = input<string>();\n\n /**\n * Set a domain type icon (e.g. `element-door`) for which the status shall be shown.\n * Leave undefined for visualizing the status without an icon.\n */\n readonly icon = input<string>();\n\n /**\n * Set the size using either regular or small only works when used together with `icon`\n *\n * @defaultValue 'regular'\n */\n readonly size = input<'regular' | 'small'>('regular');\n\n /**\n * event direction is out\n *\n * @defaultValue false\n */\n readonly eventOut = input(false, { transform: booleanAttribute });\n\n /**\n * Custom icon class for event out\n */\n readonly eventIcon = input<string>();\n\n /**\n * Whether the status should appear with a pulsing circle around the badge.\n *\n * @defaultValue false\n */\n readonly blink = input(false, { transform: booleanAttribute });\n\n /**\n * Blink pulse generator for synchronized blinking with other components\n */\n readonly blinkPulse = input<Observable<boolean>>();\n\n /**\n * Aria label for icon and status combo. Needed for a11y\n */\n readonly ariaLabel = input<string>();\n\n protected readonly backgroundClass = computed(() => this.statusIcon()?.background ?? '');\n protected readonly theAriaLabel = computed(() => this.ariaLabel() ?? this.autoLabel());\n protected readonly autoLabel = computed(() => {\n const status = this.status();\n const statusName = status && this.statusIcons[status] ? status : 'none';\n const direction = this.eventOut() ? ' out' : '';\n const iconName = this.icon()?.replace(/^element-{0,1}/, '') ?? '';\n return `${iconName.toLocaleLowerCase()}${\n this.status() && this.icon() ? ' in ' : ''\n }status ${statusName}${direction}`;\n });\n protected readonly statusIcon = computed<StatusIcon | undefined>(() => {\n const status = this.status();\n return status ? this.statusIcons[status] : undefined;\n });\n protected readonly blinkOn = signal(false);\n protected readonly contrastFix = signal(false);\n protected readonly icons = addIcons({ elementRight4 });\n private blinkSubs?: Subscription;\n\n private readonly bg = viewChild.required<ElementRef>('bg');\n\n private blinkService = inject(BlinkService);\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.blinkService && changes.blink) {\n this.blinkSubs?.unsubscribe();\n\n if (this.blink()) {\n const pulse = this.blinkPulse() ?? this.blinkService.pulse$;\n this.blinkSubs = pulse.subscribe(onOff => {\n this.blinkOn.set(onOff);\n });\n } else {\n this.blinkOn.set(false);\n }\n }\n if (changes.color || changes.blink) {\n queueMicrotask(() => {\n this.contrastFix.set(!!this.color() && this.blink() && this.calculateContrastFix());\n });\n }\n }\n\n ngOnDestroy(): void {\n this.blinkSubs?.unsubscribe();\n }\n\n private calculateContrastFix(): boolean {\n // see https://www.w3.org/TR/AERT/#color-contrast\n const rgb = getComputedStyle(this.bg().nativeElement)\n .backgroundColor?.match(/\\d+/g)\n ?.map(v => +v);\n return !!rgb && Math.round((rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000) <= 128;\n }\n}\n","<div\n class=\"status-indication d-flex align-items-center justify-content-center\"\n role=\"status\"\n [class.has-icon]=\"icon()\"\n [class.small]=\"size() === 'small'\"\n [attr.aria-label]=\"theAriaLabel() | translate\"\n>\n <div\n #bg\n class=\"bg\"\n [class.pulse]=\"blinkOn()\"\n [class.deprecated-color]=\"!status()\"\n [class.contrast-fix]=\"contrastFix()\"\n [ngClass]=\"backgroundClass()\"\n [style.background-color]=\"color()\"\n ></div>\n @if (!status()) {\n <div class=\"deprecated-dot\" [style.background-color]=\"color()\"></div>\n }\n @let iconConfig = statusIcon();\n @if (iconConfig) {\n <span class=\"status-icon icon-stack indicator\">\n <si-icon-next class=\"status-icon\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon-next\n class=\"status-icon\"\n [ngClass]=\"iconConfig.stackedColor\"\n [icon]=\"iconConfig.stacked\"\n />\n </span>\n }\n @let eventIconValue = eventIcon();\n @if (eventOut()) {\n <si-icon-next class=\"icon text-body event-out flip-rtl\" [icon]=\"icons.elementRight4\" />\n } @else if (eventIconValue) {\n <si-icon-next class=\"icon text-body event-out\" [icon]=\"eventIconValue\" />\n }\n @let iconValue = icon();\n @if (iconValue) {\n <si-icon-next class=\"icon position-relative text-body\" [icon]=\"iconValue\" />\n }\n</div>\n","/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiCircleStatusComponent } from './si-circle-status.component';\n\n@NgModule({\n imports: [SiCircleStatusComponent],\n exports: [SiCircleStatusComponent]\n})\nexport class SiCircleStatusModule {}\n","/**\n * Copyright Siemens 2016 - 2025.\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-circle-status.component';\nexport * from './si-circle-status.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;AAGG;MAiCU,uBAAuB,CAAA;AACjB,IAAA,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACzD;;AAEG;IACM,MAAM,GAAG,KAAK,EAAoB;AAE3C;;;AAGG;AACH;;;AAGG;IACM,KAAK,GAAG,KAAK,EAAU;AAEhC;;;AAGG;IACM,IAAI,GAAG,KAAK,EAAU;AAE/B;;;;AAIG;AACM,IAAA,IAAI,GAAG,KAAK,CAAsB,SAAS,CAAC;AAErD;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAEjE;;AAEG;IACM,SAAS,GAAG,KAAK,EAAU;AAEpC;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAE9D;;AAEG;IACM,UAAU,GAAG,K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,CAHrB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CACvB,uBAAuB,CAAA,EAAA,CAAA;AAEtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAHrB,uBAAuB,CAAA,EAAA,CAAA;;2FAGtB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,uBAAuB,CAAC;oBAClC,OAAO,EAAE,CAAC,uBAAuB;AAClC,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
@@ -0,0 +1,369 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, inject, viewChild, ElementRef, HostListener, ChangeDetectionStrategy, Component, booleanAttribute, model, viewChildren, Injectable } from '@angular/core';
3
+ import { ModalRef, SiModalService, createModalConfig } from '@siemens/element-ng/modal';
4
+ import { Observable } from 'rxjs';
5
+ import { LiveAnnouncer } from '@angular/cdk/a11y';
6
+ import { CdkDragHandle, moveItemInArray, CdkDrag, CdkDropList, CDK_DRAG_CONFIG } from '@angular/cdk/drag-drop';
7
+ import { CdkOption, CdkListbox } from '@angular/cdk/listbox';
8
+ import * as i1 from '@angular/cdk/scrolling';
9
+ import { CdkScrollableModule } from '@angular/cdk/scrolling';
10
+ import { addIcons, elementShow, elementLock, elementMenu, elementHide, SiIconNextComponent, elementCancel } from '@siemens/element-ng/icon';
11
+ import * as i2 from '@siemens/element-translate-ng/translate';
12
+ import { SiTranslateService, SiTranslateModule } from '@siemens/element-translate-ng/translate';
13
+ import { first } from 'rxjs/operators';
14
+
15
+ /**
16
+ * Copyright Siemens 2016 - 2025.
17
+ * SPDX-License-Identifier: MIT
18
+ */
19
+ class SiColumnSelectionEditorComponent {
20
+ column = input.required();
21
+ selected = input.required();
22
+ renameInputLabel = input.required();
23
+ columnVisibilityConfigurable = input.required();
24
+ titleChange = output();
25
+ visibilityChange = output();
26
+ cdkOption = inject(CdkOption);
27
+ editing = false;
28
+ title = viewChild.required('title');
29
+ elementRef = inject(ElementRef);
30
+ icons = addIcons({
31
+ elementHide,
32
+ elementMenu,
33
+ elementLock,
34
+ elementShow
35
+ });
36
+ tryEdit(event) {
37
+ if (this.column().editable) {
38
+ event.stopPropagation();
39
+ this.startEdit();
40
+ }
41
+ }
42
+ updateTitle(value) {
43
+ this.column().title = value;
44
+ this.titleChange.emit();
45
+ }
46
+ startEdit() {
47
+ if (this.column().editable) {
48
+ this.editing = true;
49
+ setTimeout(() => this.title().nativeElement.focus());
50
+ }
51
+ }
52
+ stopEdit() {
53
+ this.editing = false;
54
+ this.elementRef.nativeElement.focus();
55
+ }
56
+ toggleVisibility() {
57
+ this.cdkOption.toggle();
58
+ // manually toggling does not emit an event, so we have to fire one
59
+ this.visibilityChange.emit();
60
+ }
61
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiColumnSelectionEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
62
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiColumnSelectionEditorComponent, isStandalone: true, selector: "si-column-selection-editor", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: true, transformFunction: null }, renameInputLabel: { classPropertyName: "renameInputLabel", publicName: "renameInputLabel", isSignal: true, isRequired: true, transformFunction: null }, columnVisibilityConfigurable: { classPropertyName: "columnVisibilityConfigurable", publicName: "columnVisibilityConfigurable", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { titleChange: "titleChange", visibilityChange: "visibilityChange" }, host: { listeners: { "keydown.enter": "tryEdit($event)" }, classAttribute: "d-block my-4 mx-1 rounded-2 elevation-1" }, viewQueries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"d-flex p-4\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <div class=\"d-flex w-100\" [attr.aria-label]=\"column().title\">\n @if (editing) {\n <input\n #title\n type=\"text\"\n class=\"form-control w-100\"\n [attr.aria-label]=\"renameInputLabel()\"\n [value]=\"column().title\"\n (input)=\"updateTitle(title.value)\"\n (keydown.enter)=\"stopEdit()\"\n (blur)=\"stopEdit()\"\n />\n } @else {\n <span\n class=\"form-control text-truncate w-100\"\n [class.border-0]=\"!column().editable\"\n [class.px-0]=\"!column().editable\"\n [class.disabled]=\"column().disabled\"\n (click)=\"startEdit()\"\n >{{ column().title }}</span\n >\n }\n </div>\n\n <div class=\"d-flex align-items-center\">\n @if (columnVisibilityConfigurable()) {\n <span\n class=\"btn btn-circle btn-sm btn-tertiary ms-4\"\n [class.text-primary]=\"!column().disabled\"\n [class.disabled]=\"column().disabled\"\n (click)=\"toggleVisibility()\"\n >\n <si-icon-next [icon]=\"selected() ? icons.elementShow : icons.elementHide\" />\n </span>\n }\n <span\n cdkDragHandle\n class=\"btn btn-circle btn-sm btn-tertiary ms-4\"\n [class.disabled]=\"column().disabled\"\n [class.pe-none]=\"!column().draggable\"\n >\n <si-icon-next\n [class.pe-none]=\"!column().draggable\"\n [icon]=\"column().draggable ? icons.elementMenu : icons.elementLock\"\n />\n </span>\n </div>\n</div>\n", styles: [".form-control{cursor:text}\n"], dependencies: [{ kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
63
+ }
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiColumnSelectionEditorComponent, decorators: [{
65
+ type: Component,
66
+ args: [{ selector: 'si-column-selection-editor', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkDragHandle, SiIconNextComponent], host: {
67
+ class: 'd-block my-4 mx-1 rounded-2 elevation-1'
68
+ }, template: "<div class=\"d-flex p-4\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <div class=\"d-flex w-100\" [attr.aria-label]=\"column().title\">\n @if (editing) {\n <input\n #title\n type=\"text\"\n class=\"form-control w-100\"\n [attr.aria-label]=\"renameInputLabel()\"\n [value]=\"column().title\"\n (input)=\"updateTitle(title.value)\"\n (keydown.enter)=\"stopEdit()\"\n (blur)=\"stopEdit()\"\n />\n } @else {\n <span\n class=\"form-control text-truncate w-100\"\n [class.border-0]=\"!column().editable\"\n [class.px-0]=\"!column().editable\"\n [class.disabled]=\"column().disabled\"\n (click)=\"startEdit()\"\n >{{ column().title }}</span\n >\n }\n </div>\n\n <div class=\"d-flex align-items-center\">\n @if (columnVisibilityConfigurable()) {\n <span\n class=\"btn btn-circle btn-sm btn-tertiary ms-4\"\n [class.text-primary]=\"!column().disabled\"\n [class.disabled]=\"column().disabled\"\n (click)=\"toggleVisibility()\"\n >\n <si-icon-next [icon]=\"selected() ? icons.elementShow : icons.elementHide\" />\n </span>\n }\n <span\n cdkDragHandle\n class=\"btn btn-circle btn-sm btn-tertiary ms-4\"\n [class.disabled]=\"column().disabled\"\n [class.pe-none]=\"!column().draggable\"\n >\n <si-icon-next\n [class.pe-none]=\"!column().draggable\"\n [icon]=\"column().draggable ? icons.elementMenu : icons.elementLock\"\n />\n </span>\n </div>\n</div>\n", styles: [".form-control{cursor:text}\n"] }]
69
+ }], propDecorators: { tryEdit: [{
70
+ type: HostListener,
71
+ args: ['keydown.enter', ['$event']]
72
+ }] } });
73
+
74
+ /**
75
+ * Copyright Siemens 2016 - 2025.
76
+ * SPDX-License-Identifier: MIT
77
+ */
78
+ const dragConfig = {
79
+ dragStartThreshold: 0,
80
+ pointerDirectionChangeThreshold: 5,
81
+ zIndex: 10000
82
+ };
83
+ class SiColumnSelectionDialogComponent {
84
+ titleId = input();
85
+ heading = input();
86
+ bodyTitle = input();
87
+ /**
88
+ * @defaultValue
89
+ * ```
90
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.SUBMIT:Apply`
91
+ * ```
92
+ */
93
+ submitBtnName = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.SUBMIT:Apply`);
94
+ /**
95
+ * @defaultValue
96
+ * ```
97
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.CANCEL:Cancel`
98
+ * ```
99
+ */
100
+ cancelBtnName = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.CANCEL:Cancel`);
101
+ /**
102
+ * @defaultValue
103
+ * ```
104
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.RESTORE_TO_DEFAULT:Restore to default`
105
+ * ```
106
+ */
107
+ restoreToDefaultBtnName = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.RESTORE_TO_DEFAULT:Restore to default`);
108
+ /**
109
+ * @defaultValue
110
+ * ```
111
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.HIDDEN:Hidden`
112
+ * ```
113
+ */
114
+ hiddenText = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.HIDDEN:Hidden`);
115
+ /**
116
+ * @defaultValue
117
+ * ```
118
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.VISIBLE:Visible`
119
+ * ```
120
+ */
121
+ visibleText = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.VISIBLE:Visible`);
122
+ /** @defaultValue false */
123
+ restoreEnabled = input(false, { transform: booleanAttribute });
124
+ columns = model.required();
125
+ /**
126
+ * @defaultValue
127
+ * ```
128
+ * {}
129
+ * ```
130
+ */
131
+ translationParams = input({});
132
+ /**
133
+ * @defaultValue
134
+ * ```
135
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.LIST_ARIA_LABEL:
136
+ * List of possible columns.
137
+ * Items can be moved using Alt+ArrowUp or Alt+ArrowDown.
138
+ * Press Enter to rename supported items.`
139
+ * ```
140
+ */
141
+ listAriaLabel = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.LIST_ARIA_LABEL:List of possible columns. Items can be moved using Alt+ArrowUp or Alt+ArrowDown. Press Enter to rename supported items.`);
142
+ /**
143
+ * @defaultValue
144
+ * ```
145
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.RENAME_INPUT_ARIA_LABEL:Rename column`
146
+ * ```
147
+ */
148
+ renameInputAriaLabel = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.RENAME_INPUT_ARIA_LABEL:Rename column`);
149
+ /**
150
+ * @defaultValue
151
+ * ```
152
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.ITEM_MOVED:Item is now at position {{targetPosition}}`
153
+ * ```
154
+ */
155
+ a11yItemMovedMessage = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.ITEM_MOVED:Item is now at position {{targetPosition}}`);
156
+ /**
157
+ * @defaultValue
158
+ * ```
159
+ * $localize`:@@SI_COLUMN_SELECTION_DIALOG.ITEM_NOT_MOVED:Item was not moved`
160
+ * ```
161
+ */
162
+ a11yItemNotMovedMessage = input($localize `:@@SI_COLUMN_SELECTION_DIALOG.ITEM_NOT_MOVED:Item was not moved`);
163
+ /** @defaultValue true */
164
+ columnVisibilityConfigurable = input(true, { transform: booleanAttribute });
165
+ listOptions = viewChildren(CdkOption);
166
+ modalBodyElement = viewChild.required('modalBody');
167
+ tempHeaderData = [];
168
+ modalRef = inject((ModalRef));
169
+ icons = addIcons({ elementCancel });
170
+ visibleIds = [];
171
+ liveAnnouncer = inject(LiveAnnouncer);
172
+ translateService = inject(SiTranslateService);
173
+ ngOnInit() {
174
+ this.setupColumnData();
175
+ }
176
+ /** @internal */
177
+ get backupColumns() {
178
+ return this.tempHeaderData;
179
+ }
180
+ submitColumnSelection() {
181
+ this.modalRef.hide({ type: 'ok', columns: this.columns() });
182
+ }
183
+ cancelColumnSelection() {
184
+ this.columns.set([]);
185
+ this.tempHeaderData.forEach(element => this.columns.update(a => [...a, element]));
186
+ this.modalRef.hide({ type: 'cancel', columns: this.columns() });
187
+ }
188
+ drop(event) {
189
+ const columns = this.columns();
190
+ if (columns[event.currentIndex].draggable) {
191
+ moveItemInArray(columns, event.previousIndex, event.currentIndex);
192
+ this.emitChange();
193
+ }
194
+ }
195
+ restoreToDefault() {
196
+ this.modalRef.hidden.next({
197
+ type: 'restoreDefault',
198
+ columns: this.columns(),
199
+ updateColumns: columns => {
200
+ this.columns.set(columns);
201
+ this.setupColumnData();
202
+ }
203
+ });
204
+ }
205
+ moveDown(index, event) {
206
+ const columns = this.columns();
207
+ const listOptions = this.listOptions();
208
+ if (columns[index].draggable) {
209
+ let targetIndex = index + 1;
210
+ while (columns[targetIndex] && !columns[targetIndex].draggable) {
211
+ targetIndex++;
212
+ }
213
+ if (targetIndex !== index && columns[targetIndex]?.draggable) {
214
+ event.preventDefault();
215
+ moveItemInArray(columns, index, targetIndex);
216
+ // When moving the first partially visible item down,
217
+ // the browser tries to keep its position stable within the viewport by automatically scrolling down.
218
+ // This behavior is not wanted here, so we restore the previous scroll after moving the item
219
+ // TODO: check if this could be solved easier
220
+ if (listOptions.at(index).element.getBoundingClientRect().top <=
221
+ this.modalBodyElement().nativeElement.getBoundingClientRect().top) {
222
+ const previousScrollTop = this.modalBodyElement().nativeElement.scrollTop;
223
+ setTimeout(() => (this.modalBodyElement().nativeElement.scrollTop = previousScrollTop));
224
+ }
225
+ // When moving the last visible element down, the scroll position is not adopted. So its scroll out of view.
226
+ // We correct this manually by scrolling it back into view
227
+ const targetElement = listOptions.at(targetIndex).element;
228
+ if (targetElement.getBoundingClientRect().bottom >
229
+ this.modalBodyElement().nativeElement.getBoundingClientRect().bottom) {
230
+ targetElement.scrollIntoView({ block: 'end' });
231
+ }
232
+ this.announceSuccessfulMove(targetIndex);
233
+ this.emitChange();
234
+ }
235
+ else {
236
+ this.announceNotSuccessfulMove();
237
+ }
238
+ }
239
+ }
240
+ moveUp(index, event) {
241
+ const columns = this.columns();
242
+ if (columns[index].draggable) {
243
+ let targetIndex = index - 1;
244
+ while (columns[targetIndex] && !columns[targetIndex].draggable) {
245
+ targetIndex--;
246
+ }
247
+ if (targetIndex !== index && columns[targetIndex]?.draggable) {
248
+ event.preventDefault();
249
+ moveItemInArray(columns, index, targetIndex);
250
+ // it seems like this is only necessary for move up. Don't know why
251
+ setTimeout(() => this.listOptions().at(targetIndex).focus());
252
+ this.announceSuccessfulMove(targetIndex);
253
+ this.emitChange();
254
+ }
255
+ else {
256
+ this.announceNotSuccessfulMove();
257
+ }
258
+ }
259
+ }
260
+ emitChange() {
261
+ this.modalRef.hidden.next({ type: 'instant', columns: this.columns() });
262
+ }
263
+ updateVisibility() {
264
+ const value = this.listOptions()
265
+ .filter(option => option.isSelected())
266
+ .map(option => option.value);
267
+ for (const column of this.columns()) {
268
+ column.visible = value.includes(column.id);
269
+ }
270
+ this.emitChange();
271
+ }
272
+ setupColumnData() {
273
+ const columns = this.columns();
274
+ this.tempHeaderData = columns.map(x => Object.assign({}, x));
275
+ this.visibleIds = columns.filter(column => column.visible).map(column => column.id);
276
+ }
277
+ announceSuccessfulMove(index) {
278
+ this.announceMove(this.a11yItemMovedMessage(), {
279
+ ...this.translationParams,
280
+ targetPosition: index + 1
281
+ });
282
+ }
283
+ announceNotSuccessfulMove() {
284
+ this.announceMove(this.a11yItemNotMovedMessage(), this.translationParams());
285
+ }
286
+ announceMove(message, translationParams) {
287
+ if (message) {
288
+ this.translateService
289
+ .translateAsync(message, translationParams)
290
+ .pipe(first())
291
+ .subscribe(translatedMessage => this.liveAnnouncer.announce(translatedMessage));
292
+ }
293
+ }
294
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiColumnSelectionDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
295
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: SiColumnSelectionDialogComponent, isStandalone: true, selector: "si-column-selection-dialog", inputs: { titleId: { classPropertyName: "titleId", publicName: "titleId", isSignal: true, isRequired: false, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, bodyTitle: { classPropertyName: "bodyTitle", publicName: "bodyTitle", isSignal: true, isRequired: false, transformFunction: null }, submitBtnName: { classPropertyName: "submitBtnName", publicName: "submitBtnName", isSignal: true, isRequired: false, transformFunction: null }, cancelBtnName: { classPropertyName: "cancelBtnName", publicName: "cancelBtnName", isSignal: true, isRequired: false, transformFunction: null }, restoreToDefaultBtnName: { classPropertyName: "restoreToDefaultBtnName", publicName: "restoreToDefaultBtnName", isSignal: true, isRequired: false, transformFunction: null }, hiddenText: { classPropertyName: "hiddenText", publicName: "hiddenText", isSignal: true, isRequired: false, transformFunction: null }, visibleText: { classPropertyName: "visibleText", publicName: "visibleText", isSignal: true, isRequired: false, transformFunction: null }, restoreEnabled: { classPropertyName: "restoreEnabled", publicName: "restoreEnabled", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, translationParams: { classPropertyName: "translationParams", publicName: "translationParams", isSignal: true, isRequired: false, transformFunction: null }, listAriaLabel: { classPropertyName: "listAriaLabel", publicName: "listAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, renameInputAriaLabel: { classPropertyName: "renameInputAriaLabel", publicName: "renameInputAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, a11yItemMovedMessage: { classPropertyName: "a11yItemMovedMessage", publicName: "a11yItemMovedMessage", isSignal: true, isRequired: false, transformFunction: null }, a11yItemNotMovedMessage: { classPropertyName: "a11yItemNotMovedMessage", publicName: "a11yItemNotMovedMessage", isSignal: true, isRequired: false, transformFunction: null }, columnVisibilityConfigurable: { classPropertyName: "columnVisibilityConfigurable", publicName: "columnVisibilityConfigurable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columns: "columnsChange" }, providers: [{ provide: CDK_DRAG_CONFIG, useValue: dragConfig }], viewQueries: [{ propertyName: "listOptions", predicate: CdkOption, descendants: true, isSignal: true }, { propertyName: "modalBodyElement", first: true, predicate: ["modalBody"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"modal-header\">\n <span class=\"modal-title\" [id]=\"titleId()\">{{ heading() | translate: translationParams() }}</span>\n <button\n type=\"button\"\n class=\"btn btn-circle btn-sm btn-ghost\"\n [attr.aria-label]=\"cancelBtnName() | translate\"\n (click)=\"cancelColumnSelection()\"\n >\n <si-icon-next [icon]=\"icons.elementCancel\" />\n </button>\n</div>\n<p class=\"text-secondary px-8 pb-5 mb-0\">{{ bodyTitle() | translate: translationParams() }}</p>\n<div #modalBody class=\"modal-body\" tabindex=\"-1\" cdkScrollable>\n <div\n cdkListbox\n cdkListboxMultiple\n cdkDropList\n [cdkListboxValue]=\"visibleIds\"\n [attr.aria-label]=\"listAriaLabel() | translate: translationParams\"\n (cdkListboxValueChange)=\"updateVisibility()\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (column of columns(); track column) {\n <si-column-selection-editor\n #cdkOption=\"cdkOption\"\n cdkDrag\n class=\"focus-inside\"\n [cdkDragDisabled]=\"!column.draggable\"\n [cdkOption]=\"column.id\"\n [cdkOptionDisabled]=\"column.disabled\"\n [column]=\"column\"\n [selected]=\"cdkOption.isSelected()\"\n [renameInputLabel]=\"renameInputAriaLabel() | translate: translationParams\"\n [columnVisibilityConfigurable]=\"columnVisibilityConfigurable()\"\n (titleChange)=\"emitChange()\"\n (visibilityChange)=\"updateVisibility()\"\n (keydown.alt.arrowUp)=\"moveUp($index, $event)\"\n (keydown.alt.arrowDown)=\"moveDown($index, $event)\"\n />\n }\n </div>\n</div>\n<div class=\"modal-footer\">\n @if (restoreEnabled()) {\n <button type=\"button\" class=\"btn btn-tertiary me-auto\" (click)=\"restoreToDefault()\">\n {{ restoreToDefaultBtnName() | translate }}\n </button>\n }\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"cancelColumnSelection()\">\n {{ cancelBtnName() | translate }}\n </button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"submitColumnSelection()\">\n {{ submitBtnName() | translate }}\n </button>\n</div>\n", styles: [":host{-webkit-user-select:none;user-select:none;max-block-size:100%;overflow:hidden;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "ngmodule", type: CdkScrollableModule }, { kind: "directive", type: i1.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: SiIconNextComponent, selector: "si-icon-next", inputs: ["icon"] }, { kind: "ngmodule", type: SiTranslateModule }, { kind: "pipe", type: i2.SiTranslatePipe, name: "translate" }, { kind: "component", type: SiColumnSelectionEditorComponent, selector: "si-column-selection-editor", inputs: ["column", "selected", "renameInputLabel", "columnVisibilityConfigurable"], outputs: ["titleChange", "visibilityChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
296
+ }
297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiColumnSelectionDialogComponent, decorators: [{
298
+ type: Component,
299
+ args: [{ selector: 'si-column-selection-dialog', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
300
+ CdkDrag,
301
+ CdkDropList,
302
+ CdkListbox,
303
+ CdkOption,
304
+ CdkScrollableModule,
305
+ SiIconNextComponent,
306
+ SiTranslateModule,
307
+ SiColumnSelectionEditorComponent
308
+ ], providers: [{ provide: CDK_DRAG_CONFIG, useValue: dragConfig }], template: "<div class=\"modal-header\">\n <span class=\"modal-title\" [id]=\"titleId()\">{{ heading() | translate: translationParams() }}</span>\n <button\n type=\"button\"\n class=\"btn btn-circle btn-sm btn-ghost\"\n [attr.aria-label]=\"cancelBtnName() | translate\"\n (click)=\"cancelColumnSelection()\"\n >\n <si-icon-next [icon]=\"icons.elementCancel\" />\n </button>\n</div>\n<p class=\"text-secondary px-8 pb-5 mb-0\">{{ bodyTitle() | translate: translationParams() }}</p>\n<div #modalBody class=\"modal-body\" tabindex=\"-1\" cdkScrollable>\n <div\n cdkListbox\n cdkListboxMultiple\n cdkDropList\n [cdkListboxValue]=\"visibleIds\"\n [attr.aria-label]=\"listAriaLabel() | translate: translationParams\"\n (cdkListboxValueChange)=\"updateVisibility()\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (column of columns(); track column) {\n <si-column-selection-editor\n #cdkOption=\"cdkOption\"\n cdkDrag\n class=\"focus-inside\"\n [cdkDragDisabled]=\"!column.draggable\"\n [cdkOption]=\"column.id\"\n [cdkOptionDisabled]=\"column.disabled\"\n [column]=\"column\"\n [selected]=\"cdkOption.isSelected()\"\n [renameInputLabel]=\"renameInputAriaLabel() | translate: translationParams\"\n [columnVisibilityConfigurable]=\"columnVisibilityConfigurable()\"\n (titleChange)=\"emitChange()\"\n (visibilityChange)=\"updateVisibility()\"\n (keydown.alt.arrowUp)=\"moveUp($index, $event)\"\n (keydown.alt.arrowDown)=\"moveDown($index, $event)\"\n />\n }\n </div>\n</div>\n<div class=\"modal-footer\">\n @if (restoreEnabled()) {\n <button type=\"button\" class=\"btn btn-tertiary me-auto\" (click)=\"restoreToDefault()\">\n {{ restoreToDefaultBtnName() | translate }}\n </button>\n }\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"cancelColumnSelection()\">\n {{ cancelBtnName() | translate }}\n </button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"submitColumnSelection()\">\n {{ submitBtnName() | translate }}\n </button>\n</div>\n", styles: [":host{-webkit-user-select:none;user-select:none;max-block-size:100%;overflow:hidden;display:flex;flex-direction:column}\n"] }]
309
+ }] });
310
+
311
+ /**
312
+ * Copyright Siemens 2016 - 2025.
313
+ * SPDX-License-Identifier: MIT
314
+ */
315
+ class SiColumnSelectionDialogService {
316
+ modalService = inject(SiModalService);
317
+ /**
318
+ * Opens a column selection dialog.
319
+ *
320
+ * Despite other dialogs,
321
+ * this dialog informs the consumer not ONLY with clicking `submit` or `cancel`,
322
+ * but also with changing the place or visibility of a dialog row
323
+ * thanks to the `instant` type of emitted event.
324
+ *
325
+ * {@label WITH_OBJECT}
326
+ */
327
+ showColumnSelectionDialog(dialogConfig, diOptions) {
328
+ return new Observable(subscriber => {
329
+ const config = createModalConfig(dialogConfig);
330
+ Object.assign(config, diOptions);
331
+ config.class += ' modal-dialog-scrollable';
332
+ config.keyboard = true;
333
+ const modalRef = this.modalService.show(SiColumnSelectionDialogComponent, config);
334
+ const subscription = modalRef.hidden.subscribe((confirmationResult) => {
335
+ const keepModalOpen = confirmationResult?.type === 'instant' || confirmationResult?.type === 'restoreDefault';
336
+ confirmationResult ??= { type: 'cancel', columns: modalRef.content.backupColumns };
337
+ subscriber.next(confirmationResult);
338
+ if (!keepModalOpen) {
339
+ subscription.unsubscribe();
340
+ subscriber.complete();
341
+ }
342
+ });
343
+ return () => {
344
+ if (!subscription.closed) {
345
+ subscription.unsubscribe();
346
+ modalRef.detach();
347
+ }
348
+ };
349
+ });
350
+ }
351
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiColumnSelectionDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
352
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiColumnSelectionDialogService, providedIn: 'root' });
353
+ }
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SiColumnSelectionDialogService, decorators: [{
355
+ type: Injectable,
356
+ args: [{ providedIn: 'root' }]
357
+ }] });
358
+
359
+ /**
360
+ * Copyright Siemens 2016 - 2025.
361
+ * SPDX-License-Identifier: MIT
362
+ */
363
+
364
+ /**
365
+ * Generated bundle index. Do not edit.
366
+ */
367
+
368
+ export { SiColumnSelectionDialogService };
369
+ //# sourceMappingURL=siemens-element-ng-column-selection-dialog.mjs.map