@siemens/element-ng 47.2.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 (339) hide show
  1. package/README.md +18 -6
  2. package/autocomplete/index.d.ts +8 -0
  3. package/autocomplete/package.json +3 -0
  4. package/autocomplete/si-autocomplete-listbox.directive.d.ts +31 -0
  5. package/autocomplete/si-autocomplete-option.directive.d.ts +31 -0
  6. package/autocomplete/si-autocomplete.directive.d.ts +14 -0
  7. package/autocomplete/si-autocomplete.model.d.ts +7 -0
  8. package/autocomplete/si-autocomplete.module.d.ts +9 -0
  9. package/badge/index.d.ts +5 -0
  10. package/badge/package.json +3 -0
  11. package/badge/si-badge.component.d.ts +17 -0
  12. package/breadcrumb/breadcrumb-item.model.d.ts +36 -0
  13. package/breadcrumb/index.d.ts +7 -0
  14. package/breadcrumb/package.json +3 -0
  15. package/breadcrumb/si-breadcrumb-item-template.directive.d.ts +10 -0
  16. package/breadcrumb/si-breadcrumb.component.d.ts +46 -0
  17. package/breadcrumb/si-breadcrumb.module.d.ts +7 -0
  18. package/card/index.d.ts +6 -0
  19. package/card/package.json +3 -0
  20. package/card/si-card.component.d.ts +79 -0
  21. package/card/si-card.module.d.ts +7 -0
  22. package/circle-status/index.d.ts +6 -0
  23. package/circle-status/package.json +3 -0
  24. package/circle-status/si-circle-status.component.d.ts +66 -0
  25. package/circle-status/si-circle-status.module.d.ts +7 -0
  26. package/column-selection-dialog/column-selection-editor/si-column-selection-editor.component.d.ts +23 -0
  27. package/column-selection-dialog/index.d.ts +6 -0
  28. package/column-selection-dialog/package.json +3 -0
  29. package/column-selection-dialog/si-column-selection-dialog.component.d.ts +114 -0
  30. package/column-selection-dialog/si-column-selection-dialog.service.d.ts +20 -0
  31. package/column-selection-dialog/si-column-selection-dialog.types.d.ts +68 -0
  32. package/common/models/status-type.model.d.ts +2 -2
  33. package/content-action-bar/index.d.ts +7 -0
  34. package/content-action-bar/package.json +3 -0
  35. package/content-action-bar/si-content-action-bar-toggle.component.d.ts +6 -0
  36. package/content-action-bar/si-content-action-bar.component.d.ts +72 -0
  37. package/content-action-bar/si-content-action-bar.model.d.ts +9 -0
  38. package/content-action-bar/si-content-action-bar.module.d.ts +7 -0
  39. package/date-range-filter/index.d.ts +8 -0
  40. package/date-range-filter/package.json +3 -0
  41. package/date-range-filter/si-date-range-calculation.service.d.ts +33 -0
  42. package/date-range-filter/si-date-range-filter.component.d.ts +248 -0
  43. package/date-range-filter/si-date-range-filter.module.d.ts +7 -0
  44. package/date-range-filter/si-date-range-filter.types.d.ts +40 -0
  45. package/date-range-filter/si-relative-date.component.d.ts +31 -0
  46. package/datepicker/components/si-calendar-body.component.d.ts +137 -0
  47. package/datepicker/components/si-calendar-date-cell.directive.d.ts +16 -0
  48. package/datepicker/components/si-calendar-direction-button.component.d.ts +18 -0
  49. package/datepicker/components/si-compare-adapter.d.ts +37 -0
  50. package/datepicker/components/si-day-selection.component.d.ts +76 -0
  51. package/datepicker/components/si-initial-focus.component.d.ts +74 -0
  52. package/datepicker/components/si-month-selection.component.d.ts +62 -0
  53. package/datepicker/components/si-year-selection.component.d.ts +65 -0
  54. package/datepicker/date-time-helper.d.ts +302 -0
  55. package/datepicker/index.d.ts +15 -0
  56. package/datepicker/package.json +3 -0
  57. package/datepicker/si-calendar-button.component.d.ts +49 -0
  58. package/datepicker/si-date-input.directive.d.ts +114 -0
  59. package/datepicker/si-date-range.component.d.ts +150 -0
  60. package/datepicker/si-datepicker-overlay.component.d.ts +82 -0
  61. package/datepicker/si-datepicker-overlay.directive.d.ts +104 -0
  62. package/datepicker/si-datepicker.component.d.ts +228 -0
  63. package/datepicker/si-datepicker.directive.d.ts +62 -0
  64. package/datepicker/si-datepicker.model.d.ts +129 -0
  65. package/datepicker/si-datepicker.module.d.ts +12 -0
  66. package/datepicker/si-timepicker.component.d.ts +214 -0
  67. package/electron-titlebar/electron.helpers.d.ts +5 -0
  68. package/electron-titlebar/index.d.ts +7 -0
  69. package/electron-titlebar/package.json +3 -0
  70. package/electron-titlebar/si-electron-titlebar.component.d.ts +72 -0
  71. package/electron-titlebar/si-electron-titlebar.module.d.ts +7 -0
  72. package/fesm2022/siemens-element-ng-application-header.mjs +2 -2
  73. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
  74. package/fesm2022/siemens-element-ng-autocomplete.mjs +235 -0
  75. package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -0
  76. package/fesm2022/siemens-element-ng-badge.mjs +59 -0
  77. package/fesm2022/siemens-element-ng-badge.mjs.map +1 -0
  78. package/fesm2022/siemens-element-ng-breadcrumb.mjs +302 -0
  79. package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -0
  80. package/fesm2022/siemens-element-ng-card.mjs +122 -0
  81. package/fesm2022/siemens-element-ng-card.mjs.map +1 -0
  82. package/fesm2022/siemens-element-ng-circle-status.mjs +146 -0
  83. package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -0
  84. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +369 -0
  85. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -0
  86. package/fesm2022/siemens-element-ng-common.mjs +1 -1
  87. package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
  88. package/fesm2022/siemens-element-ng-content-action-bar.mjs +200 -0
  89. package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -0
  90. package/fesm2022/siemens-element-ng-date-range-filter.mjs +649 -0
  91. package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -0
  92. package/fesm2022/siemens-element-ng-datepicker.mjs +4231 -0
  93. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -0
  94. package/fesm2022/siemens-element-ng-electron-titlebar.mjs +142 -0
  95. package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -0
  96. package/fesm2022/siemens-element-ng-file-uploader.mjs +751 -0
  97. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -0
  98. package/fesm2022/siemens-element-ng-filter-bar.mjs +153 -0
  99. package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -0
  100. package/fesm2022/siemens-element-ng-form.mjs +827 -0
  101. package/fesm2022/siemens-element-ng-form.mjs.map +1 -0
  102. package/fesm2022/siemens-element-ng-icon-status.mjs +65 -0
  103. package/fesm2022/siemens-element-ng-icon-status.mjs.map +1 -0
  104. package/fesm2022/siemens-element-ng-icon.mjs +22 -2
  105. package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
  106. package/fesm2022/siemens-element-ng-info-page.mjs +63 -0
  107. package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -0
  108. package/fesm2022/siemens-element-ng-inline-notification.mjs +4 -6
  109. package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
  110. package/fesm2022/siemens-element-ng-ip-input.mjs +451 -0
  111. package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -0
  112. package/fesm2022/siemens-element-ng-language-switcher.mjs +90 -0
  113. package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -0
  114. package/fesm2022/siemens-element-ng-localization.mjs +306 -0
  115. package/fesm2022/siemens-element-ng-localization.mjs.map +1 -0
  116. package/fesm2022/siemens-element-ng-number-input.mjs +267 -0
  117. package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -0
  118. package/fesm2022/siemens-element-ng-password-strength.mjs +177 -0
  119. package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -0
  120. package/fesm2022/siemens-element-ng-photo-upload.mjs +480 -0
  121. package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -0
  122. package/fesm2022/siemens-element-ng-pills-input.mjs +397 -0
  123. package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -0
  124. package/fesm2022/siemens-element-ng-popover-next.mjs +259 -0
  125. package/fesm2022/siemens-element-ng-popover-next.mjs.map +1 -0
  126. package/fesm2022/siemens-element-ng-popover.mjs +256 -0
  127. package/fesm2022/siemens-element-ng-popover.mjs.map +1 -0
  128. package/fesm2022/siemens-element-ng-progressbar.mjs +83 -0
  129. package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -0
  130. package/fesm2022/siemens-element-ng-search-bar.mjs +193 -0
  131. package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -0
  132. package/fesm2022/siemens-element-ng-select.mjs +1166 -0
  133. package/fesm2022/siemens-element-ng-select.mjs.map +1 -0
  134. package/fesm2022/siemens-element-ng-skip-links.mjs +117 -0
  135. package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -0
  136. package/fesm2022/siemens-element-ng-slider.mjs +313 -0
  137. package/fesm2022/siemens-element-ng-slider.mjs.map +1 -0
  138. package/fesm2022/siemens-element-ng-sort-bar.mjs +89 -0
  139. package/fesm2022/siemens-element-ng-sort-bar.mjs.map +1 -0
  140. package/fesm2022/siemens-element-ng-split.mjs +575 -0
  141. package/fesm2022/siemens-element-ng-split.mjs.map +1 -0
  142. package/fesm2022/siemens-element-ng-status-toggle.mjs +196 -0
  143. package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -0
  144. package/fesm2022/siemens-element-ng-summary-widget.mjs +77 -0
  145. package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -0
  146. package/fesm2022/siemens-element-ng-system-banner.mjs +47 -0
  147. package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -0
  148. package/fesm2022/siemens-element-ng-tabs.mjs +395 -0
  149. package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -0
  150. package/fesm2022/siemens-element-ng-toast-notification.mjs +227 -0
  151. package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -0
  152. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  153. package/fesm2022/siemens-element-ng-typeahead.mjs +746 -0
  154. package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -0
  155. package/fesm2022/siemens-element-ng-unauthorized-page.mjs +76 -0
  156. package/fesm2022/siemens-element-ng-unauthorized-page.mjs.map +1 -0
  157. package/fesm2022/siemens-element-ng-wizard.mjs +465 -0
  158. package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -0
  159. package/file-uploader/index.d.ts +8 -0
  160. package/file-uploader/package.json +3 -0
  161. package/file-uploader/si-file-dropzone.component.d.ts +106 -0
  162. package/file-uploader/si-file-uploader.component.d.ts +296 -0
  163. package/file-uploader/si-file-uploader.model.d.ts +12 -0
  164. package/file-uploader/si-file-uploader.module.d.ts +8 -0
  165. package/filter-bar/filter.d.ts +26 -0
  166. package/filter-bar/index.d.ts +8 -0
  167. package/filter-bar/package.json +3 -0
  168. package/filter-bar/si-filter-bar.component.d.ts +65 -0
  169. package/filter-bar/si-filter-bar.module.d.ts +7 -0
  170. package/filter-bar/si-filter-pill.component.d.ts +20 -0
  171. package/form/form-fieldset/si-form-fieldset.component.d.ts +40 -0
  172. package/form/index.d.ts +14 -0
  173. package/form/package.json +3 -0
  174. package/form/si-form-container/si-form-container.component.d.ts +155 -0
  175. package/form/si-form-item/si-form-field-native.control.d.ts +22 -0
  176. package/form/si-form-item/si-form-item.component.d.ts +90 -0
  177. package/form/si-form-item-control-input.directive.d.ts +18 -0
  178. package/form/si-form-item.control.d.ts +35 -0
  179. package/form/si-form-validation-error.model.d.ts +55 -0
  180. package/form/si-form-validation-error.provider.d.ts +11 -0
  181. package/form/si-form-validation-error.service.d.ts +42 -0
  182. package/form/si-form-validation-tooltip/si-form-validation-tooltip.component.d.ts +13 -0
  183. package/form/si-form-validation-tooltip/si-form-validation-tooltip.directive.d.ts +42 -0
  184. package/form/si-form.module.d.ts +25 -0
  185. package/icon/element-icons.d.ts +20 -0
  186. package/icon-status/index.d.ts +6 -0
  187. package/icon-status/package.json +3 -0
  188. package/icon-status/si-icon-status.component.d.ts +24 -0
  189. package/icon-status/si-icon-status.module.d.ts +7 -0
  190. package/info-page/index.d.ts +5 -0
  191. package/info-page/package.json +3 -0
  192. package/info-page/si-info-page.component.d.ts +38 -0
  193. package/inline-notification/si-inline-notification.component.d.ts +0 -2
  194. package/ip-input/address-utils.d.ts +28 -0
  195. package/ip-input/address-validators.d.ts +21 -0
  196. package/ip-input/index.d.ts +7 -0
  197. package/ip-input/package.json +3 -0
  198. package/ip-input/si-ip-input.directive.d.ts +53 -0
  199. package/ip-input/si-ip4-input.directive.d.ts +9 -0
  200. package/ip-input/si-ip6-input.directive.d.ts +10 -0
  201. package/language-switcher/index.d.ts +7 -0
  202. package/language-switcher/iso-language-value.d.ts +14 -0
  203. package/language-switcher/package.json +3 -0
  204. package/language-switcher/si-language-switcher.component.d.ts +32 -0
  205. package/language-switcher/si-language-switcher.module.d.ts +7 -0
  206. package/localization/index.d.ts +8 -0
  207. package/localization/package.json +3 -0
  208. package/localization/si-directionality.d.ts +41 -0
  209. package/localization/si-locale-id.d.ts +22 -0
  210. package/localization/si-locale-store.d.ts +16 -0
  211. package/localization/si-locale.service.d.ts +73 -0
  212. package/number-input/index.d.ts +6 -0
  213. package/number-input/package.json +3 -0
  214. package/number-input/si-number-input.component.d.ts +106 -0
  215. package/number-input/si-number-input.module.d.ts +7 -0
  216. package/package.json +163 -3
  217. package/password-strength/index.d.ts +7 -0
  218. package/password-strength/package.json +3 -0
  219. package/password-strength/si-password-strength.component.d.ts +25 -0
  220. package/password-strength/si-password-strength.directive.d.ts +54 -0
  221. package/password-strength/si-password-strength.module.d.ts +8 -0
  222. package/photo-upload/index.d.ts +6 -0
  223. package/photo-upload/package.json +3 -0
  224. package/photo-upload/si-image-cropper-style.component.d.ts +5 -0
  225. package/photo-upload/si-photo-upload.component.d.ts +298 -0
  226. package/pills-input/index.d.ts +9 -0
  227. package/pills-input/package.json +3 -0
  228. package/pills-input/si-input-pill.component.d.ts +9 -0
  229. package/pills-input/si-pills-input-csv.directive.d.ts +8 -0
  230. package/pills-input/si-pills-input-email.directive.d.ts +10 -0
  231. package/pills-input/si-pills-input-pattern-base.d.ts +19 -0
  232. package/pills-input/si-pills-input-value-handler.d.ts +12 -0
  233. package/pills-input/si-pills-input.component.d.ts +87 -0
  234. package/pills-input/si-pills-input.module.d.ts +9 -0
  235. package/popover/index.d.ts +6 -0
  236. package/popover/package.json +3 -0
  237. package/popover/si-popover.component.d.ts +26 -0
  238. package/popover/si-popover.directive.d.ts +89 -0
  239. package/popover/si-popover.module.d.ts +7 -0
  240. package/popover-next/index.d.ts +7 -0
  241. package/popover-next/package.json +3 -0
  242. package/popover-next/si-popover-description.directive.d.ts +7 -0
  243. package/popover-next/si-popover-next.directive.d.ts +61 -0
  244. package/popover-next/si-popover-title.directive.d.ts +7 -0
  245. package/popover-next/si-popover.component.d.ts +27 -0
  246. package/progressbar/index.d.ts +6 -0
  247. package/progressbar/package.json +3 -0
  248. package/progressbar/si-progressbar.component.d.ts +43 -0
  249. package/progressbar/si-progressbar.module.d.ts +7 -0
  250. package/search-bar/index.d.ts +6 -0
  251. package/search-bar/package.json +3 -0
  252. package/search-bar/si-search-bar.component.d.ts +87 -0
  253. package/search-bar/si-search-bar.module.d.ts +7 -0
  254. package/select/index.d.ts +18 -0
  255. package/select/options/si-select-complex-options.directive.d.ts +69 -0
  256. package/select/options/si-select-lazy-options.directive.d.ts +38 -0
  257. package/select/options/si-select-option.source.d.ts +49 -0
  258. package/select/options/si-select-options-strategy.base.d.ts +35 -0
  259. package/select/options/si-select-options-strategy.d.ts +37 -0
  260. package/select/options/si-select-simple-options.directive.d.ts +34 -0
  261. package/select/package.json +3 -0
  262. package/select/select-input/si-select-input.component.d.ts +43 -0
  263. package/select/select-list/si-select-list-has-filter.component.d.ts +20 -0
  264. package/select/select-list/si-select-list.base.d.ts +37 -0
  265. package/select/select-list/si-select-list.component.d.ts +15 -0
  266. package/select/select-option/si-select-option-row.component.d.ts +16 -0
  267. package/select/select-option/si-select-option.component.d.ts +9 -0
  268. package/select/selection/si-select-multi-value.directive.d.ts +26 -0
  269. package/select/selection/si-select-selection-strategy.d.ts +58 -0
  270. package/select/selection/si-select-single-value.directive.d.ts +26 -0
  271. package/select/si-select-action.directive.d.ts +12 -0
  272. package/select/si-select-actions.directive.d.ts +5 -0
  273. package/select/si-select-group-template.directive.d.ts +20 -0
  274. package/select/si-select-option-row-template.directive.d.ts +9 -0
  275. package/select/si-select-option-template.directive.d.ts +21 -0
  276. package/select/si-select.component.d.ts +96 -0
  277. package/select/si-select.module.d.ts +15 -0
  278. package/select/si-select.types.d.ts +65 -0
  279. package/skip-links/index.d.ts +5 -0
  280. package/skip-links/package.json +3 -0
  281. package/skip-links/si-skip-link-target.directive.d.ts +27 -0
  282. package/skip-links/si-skip-links.component.d.ts +9 -0
  283. package/skip-links/skip-link.service.d.ts +14 -0
  284. package/slider/index.d.ts +6 -0
  285. package/slider/package.json +3 -0
  286. package/slider/si-slider.component.d.ts +129 -0
  287. package/slider/si-slider.module.d.ts +7 -0
  288. package/sort-bar/index.d.ts +6 -0
  289. package/sort-bar/package.json +3 -0
  290. package/sort-bar/si-sort-bar.component.d.ts +42 -0
  291. package/sort-bar/si-sort-bar.module.d.ts +7 -0
  292. package/split/index.d.ts +8 -0
  293. package/split/package.json +3 -0
  294. package/split/si-split-part.component.d.ts +154 -0
  295. package/split/si-split.component.d.ts +48 -0
  296. package/split/si-split.interfaces.d.ts +17 -0
  297. package/split/si-split.module.d.ts +8 -0
  298. package/status-toggle/index.d.ts +6 -0
  299. package/status-toggle/package.json +3 -0
  300. package/status-toggle/si-status-toggle.component.d.ts +54 -0
  301. package/status-toggle/status-toggle.model.d.ts +26 -0
  302. package/summary-widget/index.d.ts +5 -0
  303. package/summary-widget/package.json +3 -0
  304. package/summary-widget/si-summary-widget.component.d.ts +44 -0
  305. package/system-banner/index.d.ts +5 -0
  306. package/system-banner/package.json +3 -0
  307. package/system-banner/system-banner.component.d.ts +23 -0
  308. package/tabs/index.d.ts +7 -0
  309. package/tabs/package.json +3 -0
  310. package/tabs/si-tab/index.d.ts +5 -0
  311. package/tabs/si-tab/si-tab.component.d.ts +58 -0
  312. package/tabs/si-tabs.module.d.ts +8 -0
  313. package/tabs/si-tabset/index.d.ts +5 -0
  314. package/tabs/si-tabset/si-tabset.component.d.ts +100 -0
  315. package/template-i18n.json +111 -1
  316. package/toast-notification/index.d.ts +6 -0
  317. package/toast-notification/package.json +3 -0
  318. package/toast-notification/si-toast-notification/si-toast-notification.component.d.ts +17 -0
  319. package/toast-notification/si-toast-notification-drawer/si-toast-notification-drawer.component.d.ts +9 -0
  320. package/toast-notification/si-toast-notification.service.d.ts +41 -0
  321. package/toast-notification/si-toast.model.d.ts +25 -0
  322. package/translate/si-translatable-keys.interface.d.ts +110 -0
  323. package/typeahead/index.d.ts +8 -0
  324. package/typeahead/package.json +3 -0
  325. package/typeahead/si-typeahead-item-template.directive.d.ts +7 -0
  326. package/typeahead/si-typeahead.component.d.ts +22 -0
  327. package/typeahead/si-typeahead.directive.d.ts +196 -0
  328. package/typeahead/si-typeahead.model.d.ts +60 -0
  329. package/typeahead/si-typeahead.module.d.ts +8 -0
  330. package/typeahead/si-typeahead.sorting.d.ts +10 -0
  331. package/unauthorized-page/index.d.ts +6 -0
  332. package/unauthorized-page/package.json +3 -0
  333. package/unauthorized-page/si-unauthorized-page.component.d.ts +35 -0
  334. package/unauthorized-page/si-unauthorized-page.module.d.ts +7 -0
  335. package/wizard/index.d.ts +7 -0
  336. package/wizard/package.json +3 -0
  337. package/wizard/si-wizard-step.component.d.ts +21 -0
  338. package/wizard/si-wizard.component.d.ts +196 -0
  339. package/wizard/si-wizard.module.d.ts +8 -0
@@ -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":"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"}
@@ -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