@siemens/element-ng 49.13.0 → 51.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/README.md +1 -1
  2. package/fesm2022/siemens-element-ng-about.mjs +41 -25
  3. package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
  4. package/fesm2022/siemens-element-ng-accordion.mjs +56 -39
  5. package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
  6. package/fesm2022/siemens-element-ng-action-modal.mjs +81 -51
  7. package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
  8. package/fesm2022/siemens-element-ng-ag-grid.mjs +15 -12
  9. package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
  10. package/fesm2022/siemens-element-ng-application-header.mjs +142 -137
  11. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
  12. package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
  13. package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
  14. package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
  15. package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
  16. package/fesm2022/siemens-element-ng-avatar.mjs +31 -21
  17. package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
  18. package/fesm2022/siemens-element-ng-badge.mjs +9 -8
  19. package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
  20. package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
  21. package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
  22. package/fesm2022/siemens-element-ng-breadcrumb.mjs +18 -15
  23. package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/siemens-element-ng-card.mjs +71 -46
  25. package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
  26. package/fesm2022/siemens-element-ng-carousel.mjs +55 -32
  27. package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
  28. package/fesm2022/siemens-element-ng-chat-messages.mjs +175 -111
  29. package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
  30. package/fesm2022/siemens-element-ng-circle-status.mjs +37 -24
  31. package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
  32. package/fesm2022/siemens-element-ng-color-picker.mjs +24 -16
  33. package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
  34. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +52 -33
  35. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
  36. package/fesm2022/siemens-element-ng-common.mjs +12 -12
  37. package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
  38. package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
  39. package/fesm2022/siemens-element-ng-content-action-bar.mjs +35 -26
  40. package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
  41. package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
  42. package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
  43. package/fesm2022/siemens-element-ng-dashboard.mjs +327 -213
  44. package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
  45. package/fesm2022/siemens-element-ng-datatable.mjs +8 -8
  46. package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
  47. package/fesm2022/siemens-element-ng-date-range-filter.mjs +119 -72
  48. package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
  49. package/fesm2022/siemens-element-ng-datepicker.mjs +358 -234
  50. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  51. package/fesm2022/siemens-element-ng-electron-titlebar.mjs +21 -16
  52. package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
  53. package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
  54. package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
  55. package/fesm2022/siemens-element-ng-file-uploader.mjs +93 -81
  56. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  57. package/fesm2022/siemens-element-ng-filter-bar.mjs +29 -22
  58. package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
  59. package/fesm2022/siemens-element-ng-filtered-search.mjs +243 -147
  60. package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
  61. package/fesm2022/siemens-element-ng-footer.mjs +12 -10
  62. package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
  63. package/fesm2022/siemens-element-ng-form.mjs +267 -84
  64. package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
  65. package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
  66. package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
  67. package/fesm2022/siemens-element-ng-formly.mjs +220 -315
  68. package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
  69. package/fesm2022/siemens-element-ng-header-dropdown.mjs +38 -29
  70. package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
  71. package/fesm2022/siemens-element-ng-help-button.mjs +5 -5
  72. package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
  73. package/fesm2022/siemens-element-ng-icon.mjs +46 -47
  74. package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
  75. package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
  76. package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
  77. package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
  78. package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
  79. package/fesm2022/siemens-element-ng-ip-input.mjs +19 -15
  80. package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
  81. package/fesm2022/siemens-element-ng-landing-page.mjs +118 -72
  82. package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
  83. package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
  84. package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
  85. package/fesm2022/siemens-element-ng-link.mjs +31 -21
  86. package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
  87. package/fesm2022/siemens-element-ng-list-details.mjs +73 -54
  88. package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
  89. package/fesm2022/siemens-element-ng-loading-spinner.mjs +42 -33
  90. package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
  91. package/fesm2022/siemens-element-ng-localization.mjs +14 -12
  92. package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
  93. package/fesm2022/siemens-element-ng-main-detail-container.mjs +46 -29
  94. package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
  95. package/fesm2022/siemens-element-ng-markdown-renderer.mjs +6 -5
  96. package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
  97. package/fesm2022/siemens-element-ng-menu.mjs +56 -48
  98. package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
  99. package/fesm2022/siemens-element-ng-modal.mjs +12 -10
  100. package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
  101. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +133 -94
  102. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
  103. package/fesm2022/siemens-element-ng-navbar-vertical.mjs +117 -81
  104. package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
  105. package/fesm2022/siemens-element-ng-navbar.mjs +67 -41
  106. package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
  107. package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
  108. package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
  109. package/fesm2022/siemens-element-ng-number-input.mjs +38 -27
  110. package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
  111. package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
  112. package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
  113. package/fesm2022/siemens-element-ng-password-strength.mjs +31 -22
  114. package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
  115. package/fesm2022/siemens-element-ng-password-toggle.mjs +18 -13
  116. package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
  117. package/fesm2022/siemens-element-ng-phone-number.mjs +121 -138
  118. package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
  119. package/fesm2022/siemens-element-ng-photo-upload.mjs +76 -45
  120. package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
  121. package/fesm2022/siemens-element-ng-pills-input.mjs +63 -58
  122. package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
  123. package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
  124. package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
  125. package/fesm2022/siemens-element-ng-popover.mjs +33 -26
  126. package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
  127. package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
  128. package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
  129. package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
  130. package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
  131. package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
  132. package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
  133. package/fesm2022/siemens-element-ng-search-bar.mjs +32 -24
  134. package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
  135. package/fesm2022/siemens-element-ng-select.mjs +212 -154
  136. package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
  137. package/fesm2022/siemens-element-ng-shadow-root.mjs +3 -3
  138. package/fesm2022/siemens-element-ng-side-panel.mjs +119 -75
  139. package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
  140. package/fesm2022/siemens-element-ng-skip-links.mjs +14 -13
  141. package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
  142. package/fesm2022/siemens-element-ng-slider.mjs +42 -28
  143. package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
  144. package/fesm2022/siemens-element-ng-split.mjs +268 -254
  145. package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
  146. package/fesm2022/siemens-element-ng-status-bar.mjs +57 -47
  147. package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
  148. package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
  149. package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
  150. package/fesm2022/siemens-element-ng-status-toggle.mjs +22 -14
  151. package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
  152. package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
  153. package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
  154. package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
  155. package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
  156. package/fesm2022/siemens-element-ng-system-banner.mjs +11 -8
  157. package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
  158. package/fesm2022/siemens-element-ng-tabs-legacy.mjs +16 -15
  159. package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
  160. package/fesm2022/siemens-element-ng-tabs.mjs +59 -45
  161. package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
  162. package/fesm2022/siemens-element-ng-theme.mjs +5 -4
  163. package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
  164. package/fesm2022/siemens-element-ng-threshold.mjs +59 -40
  165. package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
  166. package/fesm2022/siemens-element-ng-toast-notification.mjs +45 -40
  167. package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
  168. package/fesm2022/siemens-element-ng-tooltip.mjs +52 -54
  169. package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
  170. package/fesm2022/siemens-element-ng-tour.mjs +28 -19
  171. package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
  172. package/fesm2022/siemens-element-ng-translate.mjs +0 -1
  173. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  174. package/fesm2022/siemens-element-ng-tree-view.mjs +92 -73
  175. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  176. package/fesm2022/siemens-element-ng-typeahead.mjs +75 -67
  177. package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
  178. package/fesm2022/siemens-element-ng-wizard.mjs +72 -48
  179. package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
  180. package/formly-legacy/package.json +4 -0
  181. package/package.json +20 -22
  182. package/schematics/migration.json +4 -4
  183. package/schematics/migrations/data/class-member-replacement.js +1 -19
  184. package/schematics/migrations/data/component-property-names.js +1 -25
  185. package/schematics/migrations/data/element-class-changes.js +1 -28
  186. package/schematics/migrations/data/element-migration-data.js +2 -0
  187. package/schematics/migrations/data/element-selectors.js +1 -11
  188. package/schematics/migrations/data/index.js +0 -4
  189. package/schematics/migrations/data/migration-test-data.js +9 -6
  190. package/schematics/migrations/data/provider-function-removals.js +7 -0
  191. package/schematics/migrations/data/symbol-removals.js +7 -7
  192. package/schematics/migrations/data/symbol-renaming.js +1 -48
  193. package/schematics/migrations/element-migration/element-migration.js +3 -6
  194. package/schematics/migrations/utilities/import-removal.js +39 -0
  195. package/schematics/migrations/utilities/index.js +2 -0
  196. package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
  197. package/schematics/ng-update/index.js +1 -1
  198. package/schematics/ng-update/{migrate-to-v49.js → migrate-to-v51.js} +2 -2
  199. package/template-i18n.json +3 -6
  200. package/types/siemens-element-ng-application-header.d.ts +1 -21
  201. package/types/siemens-element-ng-chat-messages.d.ts +6 -4
  202. package/types/siemens-element-ng-circle-status.d.ts +1 -1
  203. package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
  204. package/types/siemens-element-ng-datepicker.d.ts +1 -12
  205. package/types/siemens-element-ng-file-uploader.d.ts +5 -23
  206. package/types/siemens-element-ng-filtered-search.d.ts +1 -1
  207. package/types/siemens-element-ng-form.d.ts +134 -37
  208. package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
  209. package/types/siemens-element-ng-formly.d.ts +34 -167
  210. package/types/siemens-element-ng-icon.d.ts +2 -19
  211. package/types/siemens-element-ng-navbar-vertical-next.d.ts +6 -1
  212. package/types/siemens-element-ng-notification-item.d.ts +12 -0
  213. package/types/siemens-element-ng-phone-number.d.ts +5 -8
  214. package/types/siemens-element-ng-resize-observer.d.ts +0 -17
  215. package/types/siemens-element-ng-split.d.ts +95 -63
  216. package/types/siemens-element-ng-status-bar.d.ts +5 -13
  217. package/types/siemens-element-ng-status-counter.d.ts +1 -1
  218. package/types/siemens-element-ng-toast-notification.d.ts +0 -1
  219. package/types/siemens-element-ng-translate.d.ts +1 -5
  220. package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
  221. package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
  222. package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
  223. package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
  224. package/icon-status/package.json +0 -4
  225. package/schematics/vitest-setup.js +0 -5
  226. package/sort-bar/package.json +0 -4
  227. package/types/siemens-element-ng-icon-status.d.ts +0 -25
  228. package/types/siemens-element-ng-sort-bar.d.ts +0 -59
  229. /package/{LICENSE.md → LICENSE} +0 -0
@@ -1,9 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, signal, computed, inject, ElementRef, booleanAttribute, numberAttribute, Input, Output, ChangeDetectionStrategy, Component, NgZone, ChangeDetectorRef, DOCUMENT, ContentChildren, NgModule } from '@angular/core';
2
+ import { input, booleanAttribute, numberAttribute, output, signal, computed, linkedSignal, inject, ElementRef, effect, untracked, Component, contentChildren, NgZone, ChangeDetectorRef, DOCUMENT, DestroyRef, NgModule } from '@angular/core';
3
3
  import { NgTemplateOutlet } from '@angular/common';
4
4
  import { SiIconComponent } from '@siemens/element-ng/icon';
5
5
  import { SiTranslatePipe } from '@siemens/element-translate-ng/translate';
6
6
  import { __decorate } from 'tslib';
7
+ import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
8
  import { SI_UI_STATE_SERVICE, isRTL, WebComponentContentChildren } from '@siemens/element-ng/common';
8
9
  import { asapScheduler, merge, fromEvent } from 'rxjs';
9
10
  import { observeOn, takeUntil } from 'rxjs/operators';
@@ -12,38 +13,51 @@ import { observeOn, takeUntil } from 'rxjs/operators';
12
13
  * Copyright (c) Siemens 2016 - 2026
13
14
  * SPDX-License-Identifier: MIT
14
15
  */
15
- /* eslint-disable @angular-eslint/prefer-output-emitter-ref */
16
16
  class SiSplitPartComponent {
17
- /** @defaultValue [] */
18
- actions = [];
19
17
  /**
18
+ * Action buttons displayed in the split part header.
19
+ *
20
+ * @defaultValue []
21
+ */
22
+ actions = input([], /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
24
+ /**
25
+ * Defines which direction the split part collapses to.
26
+ *
20
27
  * @defaultValue 'start'
21
28
  */
22
- collapseDirection = 'start';
29
+ collapseDirection = input('start', /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "collapseDirection" }] : /* istanbul ignore next */ []));
23
31
  /**
24
32
  * Sets the icon class that is used in the buttons of split parts to
25
33
  * collapse and uncollapse the parts.
26
34
  *
27
35
  * @defaultValue 'element-double-right'
28
36
  */
29
- collapseIconClass = 'element-double-right';
37
+ collapseIconClass = input('element-double-right', /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "collapseIconClass" }] : /* istanbul ignore next */ []));
30
39
  /**
31
40
  * Collapse only to the given min size.
32
41
  *
33
42
  * @defaultValue false
34
43
  */
35
- collapseToMinSize = false;
36
- headerTemplate;
44
+ collapseToMinSize = input(false, { ...(ngDevMode ? { debugName: "collapseToMinSize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
45
+ /**
46
+ * Custom template for the split part header. The template receives the component instance as implicit context.
47
+ */
48
+ headerTemplate = input(/* @ts-ignore */
49
+ ...(ngDevMode ? [undefined, { debugName: "headerTemplate" }] : /* istanbul ignore next */ []));
37
50
  /**
38
51
  * Sets the title of the split part header.
39
52
  */
40
- heading;
53
+ heading = input(/* @ts-ignore */
54
+ ...(ngDevMode ? [undefined, { debugName: "heading" }] : /* istanbul ignore next */ []));
41
55
  /**
42
56
  * Minimum size in px.
43
57
  *
44
58
  * @defaultValue 0
45
59
  */
46
- minSize = 0;
60
+ minSize = input(0, { ...(ngDevMode ? { debugName: "minSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
47
61
  /**
48
62
  * When a split part is collapsed, the content gets hidden but it will
49
63
  * still remain within the DOM. If you want to remove and destroy the component
@@ -52,41 +66,46 @@ class SiSplitPartComponent {
52
66
  *
53
67
  * @defaultValue false
54
68
  */
55
- removeContentOnCollapse = false;
69
+ removeContentOnCollapse = input(false, { ...(ngDevMode ? { debugName: "removeContentOnCollapse" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
56
70
  /**
57
71
  * Defines the behavior of the split part during scaling.
58
72
  * E.g. when set to `none`, the spit part will keep its current size even when the parent container grows or shrinks.
59
73
  *
60
74
  * @defaultValue 'auto'
61
75
  */
62
- scale = 'auto';
76
+ scale = input('auto', /* @ts-ignore */
77
+ ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
63
78
  /**
64
79
  * Defines if the collapse button of a split part is displayed. Default value is true.
65
80
  *
66
81
  * @defaultValue true
67
82
  */
68
- showCollapseButton = true;
83
+ showCollapseButton = input(true, { ...(ngDevMode ? { debugName: "showCollapseButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
69
84
  /**
70
85
  * Defines if the header of the split part is visible. Default is true.
71
86
  *
72
87
  * @defaultValue true
73
88
  */
74
- showHeader = true;
89
+ showHeader = input(true, { ...(ngDevMode ? { debugName: "showHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
75
90
  /**
76
91
  * Aria label for collapse button. Needed for a11y
77
92
  *
78
93
  * @defaultValue 'collapse'
79
94
  */
80
- collapseLabel = 'collapse';
95
+ collapseLabel = input('collapse', /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "collapseLabel" }] : /* istanbul ignore next */ []));
81
97
  /**
82
98
  * An optional stateId to uniquely identify a component instance.
83
99
  * Required for persistence of ui state.
84
100
  */
85
- stateId;
101
+ stateId = input(/* @ts-ignore */
102
+ ...(ngDevMode ? [undefined, { debugName: "stateId" }] : /* istanbul ignore next */ []));
86
103
  /**
87
104
  * Expanded size in px.
105
+ *
106
+ * @defaultValue undefined
88
107
  */
89
- size;
108
+ size = input(undefined, { ...(ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {}), transform: numberAttribute });
90
109
  /**
91
110
  * This toggles the behavior when collapsing this split part.
92
111
  * If enabled, all split parts between this one and the end of the split in the respective direction will be collapsed if this part is collapsed.
@@ -94,21 +113,43 @@ class SiSplitPartComponent {
94
113
  *
95
114
  * @defaultValue false
96
115
  */
97
- collapseOthers = false;
98
- collapseChanged = new EventEmitter();
99
- stateChange = new EventEmitter();
116
+ collapseOthers = input(false, { ...(ngDevMode ? { debugName: "collapseOthers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
117
+ /**
118
+ * Sets the initial expanded or collapsed state of the split part.
119
+ *
120
+ * @defaultValue true
121
+ */
122
+ expanded = input(true, { ...(ngDevMode ? { debugName: "expanded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
123
+ collapseChanged = output();
124
+ stateChange = output();
100
125
  /** @internal */
101
126
  index = 0;
102
127
  /** @internal */
103
- before;
104
- /** @internal */
105
- after;
128
+ before = signal(undefined, /* @ts-ignore */
129
+ ...(ngDevMode ? [{ debugName: "before" }] : /* istanbul ignore next */ []));
106
130
  /** @internal */
107
- fractionalSize = signal(undefined, ...(ngDevMode ? [{ debugName: "fractionalSize" }] : []));
131
+ after = signal(undefined, /* @ts-ignore */
132
+ ...(ngDevMode ? [{ debugName: "after" }] : /* istanbul ignore next */ []));
108
133
  /** @internal */
109
- collapsedSize = signal(0, ...(ngDevMode ? [{ debugName: "collapsedSize" }] : []));
134
+ fractionalSize = signal(undefined, /* @ts-ignore */
135
+ ...(ngDevMode ? [{ debugName: "fractionalSize" }] : /* istanbul ignore next */ []));
110
136
  /** @internal */
111
- collapsedState = signal(false, ...(ngDevMode ? [{ debugName: "collapsedState" }] : []));
137
+ collapsedSize = computed(() => (this.collapseToMinSize() ? (this.minSize() ?? 40) : 40), /* @ts-ignore */
138
+ ...(ngDevMode ? [{ debugName: "collapsedSize" }] : /* istanbul ignore next */ []));
139
+ /**
140
+ * Internal, mutable collapsed state. Initialized from the {@link expanded} input but can be
141
+ * overwritten while toggling, cascading to sibling parts or restoring the persisted ui state.
142
+ * @internal
143
+ */
144
+ collapsedState = linkedSignal(() => !this.expanded(), /* @ts-ignore */
145
+ ...(ngDevMode ? [{ debugName: "collapsedState" }] : /* istanbul ignore next */ []));
146
+ /**
147
+ * Internal, mutable collapse direction. Initialized from the {@link collapseDirection}
148
+ * input but can be overwritten while cascading collapse state to sibling parts.
149
+ * @internal
150
+ */
151
+ collapseDirectionState = linkedSignal(() => this.collapseDirection(), /* @ts-ignore */
152
+ ...(ngDevMode ? [{ debugName: "collapseDirectionState" }] : /* istanbul ignore next */ []));
112
153
  /**
113
154
  * Get collapsed state.
114
155
  * @returns True if the split part is collapsed, false is expanded.
@@ -117,14 +158,16 @@ class SiSplitPartComponent {
117
158
  return this.collapsedState();
118
159
  }
119
160
  /** @internal */
120
- expandedSize = signal(undefined, ...(ngDevMode ? [{ debugName: "expandedSize" }] : []));
161
+ expandedSize = linkedSignal(() => this.size(), /* @ts-ignore */
162
+ ...(ngDevMode ? [{ debugName: "expandedSize" }] : /* istanbul ignore next */ []));
121
163
  /** @internal */
122
164
  actualSize = computed(() => {
123
165
  if (this.collapsedState()) {
124
166
  return this.collapsedSize();
125
167
  }
126
168
  return this.expandedSize() ?? 0;
127
- }, ...(ngDevMode ? [{ debugName: "actualSize" }] : []));
169
+ }, /* @ts-ignore */
170
+ ...(ngDevMode ? [{ debugName: "actualSize" }] : /* istanbul ignore next */ []));
128
171
  /** @internal */
129
172
  saveUIState;
130
173
  /** @internal */
@@ -132,34 +175,25 @@ class SiSplitPartComponent {
132
175
  if (!this.collapsedState()) {
133
176
  return this;
134
177
  }
135
- const nextExpanded = this.after ? this.after.nextExpandedAfter() : this;
178
+ const after = this.after();
179
+ const nextExpanded = after ? after.nextExpandedAfter() : this;
136
180
  return nextExpanded;
137
- }, ...(ngDevMode ? [{ debugName: "nextExpandedAfter" }] : []));
181
+ }, /* @ts-ignore */
182
+ ...(ngDevMode ? [{ debugName: "nextExpandedAfter" }] : /* istanbul ignore next */ []));
138
183
  elementRef = inject(ElementRef);
139
184
  headerContext = {
140
185
  $implicit: this
141
186
  };
142
- /** @defaultValue true */
143
- set expanded(value) {
144
- this.collapsedState.set(!value);
145
- if (this.collapseOthers) {
146
- this.before?.refreshCollapseToStart();
147
- this.after?.refreshCollapsedToEnd();
148
- }
149
- }
150
- get expanded() {
151
- return !this.collapsedState();
152
- }
153
- ngOnChanges(changes) {
154
- if (changes.collapseToMinSize && this.collapseToMinSize) {
155
- this.collapsedSize.set(this.minSize ?? 40);
156
- }
157
- else {
158
- this.collapsedSize.set(40); // 40px is default size of the header
159
- }
160
- if (changes.size) {
161
- this.expandedSize.set(this.size);
162
- }
187
+ constructor() {
188
+ effect(() => {
189
+ this.expanded();
190
+ untracked(() => {
191
+ if (this.collapseOthers()) {
192
+ this.before()?.refreshCollapseToStart();
193
+ this.after()?.refreshCollapsedToEnd();
194
+ }
195
+ });
196
+ });
163
197
  }
164
198
  /** @internal */
165
199
  refreshSizePx(orientation) {
@@ -178,187 +212,177 @@ class SiSplitPartComponent {
178
212
  */
179
213
  toggleCollapse() {
180
214
  this.collapsedState.update(v => !v);
181
- if (this.collapseOthers) {
182
- this.before?.refreshCollapseToStart();
183
- this.after?.refreshCollapsedToEnd();
215
+ if (this.collapseOthers()) {
216
+ this.before()?.refreshCollapseToStart();
217
+ this.after()?.refreshCollapsedToEnd();
184
218
  }
185
219
  this.collapseChanged.emit(this.collapsedState());
186
- this.stateChange.emit({ expanded: this.expanded, size: this.actualSize() });
220
+ this.stateChange.emit({ expanded: !this.collapsedState(), size: this.actualSize() });
187
221
  this.saveUIState();
188
222
  }
189
223
  refreshCollapsedToEnd() {
190
- if (this.before?.collapsedState() && this.before.collapseDirection === 'end') {
224
+ const before = this.before();
225
+ if (before?.collapsedState() && before.collapseDirectionState() === 'end') {
191
226
  this.collapsedState.set(true);
192
- this.collapseDirection = 'end';
193
- this.after?.refreshCollapsedToEnd();
227
+ this.collapseDirectionState.set('end');
228
+ this.after()?.refreshCollapsedToEnd();
194
229
  }
195
230
  }
196
231
  refreshCollapseToStart() {
197
- if (this.after?.collapsedState() && this.after.collapseDirection === 'start') {
232
+ const after = this.after();
233
+ if (after?.collapsedState() && after.collapseDirectionState() === 'start') {
198
234
  this.collapsedState.set(true);
199
- this.collapseDirection = 'start';
200
- this.before?.refreshCollapseToStart();
235
+ this.collapseDirectionState.set('start');
236
+ this.before()?.refreshCollapseToStart();
201
237
  }
202
238
  }
203
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSplitPartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
204
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiSplitPartComponent, isStandalone: true, selector: "si-split-part", inputs: { actions: "actions", collapseDirection: "collapseDirection", collapseIconClass: "collapseIconClass", collapseToMinSize: ["collapseToMinSize", "collapseToMinSize", booleanAttribute], headerTemplate: "headerTemplate", heading: "heading", minSize: ["minSize", "minSize", numberAttribute], removeContentOnCollapse: ["removeContentOnCollapse", "removeContentOnCollapse", booleanAttribute], scale: "scale", showCollapseButton: ["showCollapseButton", "showCollapseButton", booleanAttribute], showHeader: ["showHeader", "showHeader", booleanAttribute], collapseLabel: "collapseLabel", stateId: "stateId", size: ["size", "size", numberAttribute], collapseOthers: ["collapseOthers", "collapseOthers", booleanAttribute], expanded: ["expanded", "expanded", booleanAttribute] }, outputs: { collapseChanged: "collapseChanged", stateChange: "stateChange" }, host: { properties: { "class.is-collapsed": "collapsedState()", "class.collapse-start": "collapseDirection === \"start\"", "style.grid-area": "\"p-\" + this.index" } }, usesOnChanges: true, ngImport: i0, template: "@if (!headerTemplate && showHeader) {\n <div class=\"si-split-part-header\" [class.is-collapsed]=\"collapsedState()\">\n <div class=\"si-split-part-title text-truncate\">\n {{ heading | translate }}\n </div>\n @if (!collapsedState()) {\n <div class=\"si-split-part-actions\">\n @for (action of actions; track $index) {\n <button\n type=\"button\"\n class=\"si-split-button\"\n [title]=\"action.tooltip || ''\"\n [attr.aria-label]=\"action.tooltip\"\n (click)=\"action.click($event)\"\n >\n <si-icon [icon]=\"action.iconClass\" />\n </button>\n }\n </div>\n }\n @if (showCollapseButton) {\n <div class=\"si-split-part-collapse-button\">\n <button\n type=\"button\"\n class=\"si-split-button\"\n [attr.aria-label]=\"collapseLabel | translate\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon class=\"collapse-icon\" [icon]=\"collapseIconClass\" />\n </button>\n </div>\n }\n </div>\n}\n\n@if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: headerContext\" />\n}\n\n<div\n class=\"si-split-part-content\"\n [class.d-none]=\"!removeContentOnCollapse && collapsedState() && !collapseToMinSize\"\n>\n @if (!removeContentOnCollapse || !collapsedState()) {\n <ng-content />\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;overflow:hidden}.si-split-part-content{flex:1 1 auto;display:flex;overflow:hidden;flex-direction:column}.si-split-part-header{display:flex;flex-direction:row;flex:none;align-items:center;padding:6px;background:var(--element-base-0);block-size:40px}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header{flex:auto;flex-direction:column;max-block-size:100%;padding:6px}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header .si-split-part-title{inline-size:100%;writing-mode:vertical-rl;transform:rotate(180deg)}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header .si-split-part-collapse-button{order:-1}.si-split-part-title{font-weight:600;flex:1}.si-split-part-actions{padding-inline:8px;flex:0 0 auto}.si-split-button{display:inline-block;padding:4px;color:var(--element-text-primary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-decoration:none;font-size:20px;line-height:1;vertical-align:middle;-webkit-user-select:none;user-select:none;background:none;border:0;cursor:pointer}.si-split-button:hover{background:var(--element-action-secondary-hover)}:host-context(.vertical)>:host .si-split-button{--orientation-rotate: rotate(90deg)}[dir=rtl] :host-context(.horizontal)>:host .si-split-button{--orientation-rtl: scaleX(-1)}:dir(rtl) :host-context(.horizontal)>:host .si-split-button{--orientation-rtl: scaleX(-1)}:host(.is-collapsed) .si-split-button{--collapse-rotate: rotate(180deg)}:host(.collapse-start) .si-split-button{--collapse-direction: rotate(180deg)}.si-split-button .collapse-icon{transform:var(--orientation-rotate, rotate(0)) var(--collapse-rotate, rotate(0)) var(--collapse-direction, rotate(0)) var(--orientation-rtl, scaleX(1))}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Default });
239
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSplitPartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
240
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiSplitPartComponent, isStandalone: true, selector: "si-split-part", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, collapseDirection: { classPropertyName: "collapseDirection", publicName: "collapseDirection", isSignal: true, isRequired: false, transformFunction: null }, collapseIconClass: { classPropertyName: "collapseIconClass", publicName: "collapseIconClass", isSignal: true, isRequired: false, transformFunction: null }, collapseToMinSize: { classPropertyName: "collapseToMinSize", publicName: "collapseToMinSize", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null }, removeContentOnCollapse: { classPropertyName: "removeContentOnCollapse", publicName: "removeContentOnCollapse", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, showCollapseButton: { classPropertyName: "showCollapseButton", publicName: "showCollapseButton", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, collapseLabel: { classPropertyName: "collapseLabel", publicName: "collapseLabel", isSignal: true, isRequired: false, transformFunction: null }, stateId: { classPropertyName: "stateId", publicName: "stateId", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, collapseOthers: { classPropertyName: "collapseOthers", publicName: "collapseOthers", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapseChanged: "collapseChanged", stateChange: "stateChange" }, host: { properties: { "class.is-collapsed": "collapsedState()", "class.collapse-start": "collapseDirectionState() === \"start\"", "style.grid-area": "\"p-\" + this.index" } }, ngImport: i0, template: "@if (!headerTemplate() && showHeader()) {\n <div class=\"si-split-part-header\" [class.is-collapsed]=\"collapsedState()\">\n <div class=\"si-split-part-title text-truncate\">\n {{ heading() | translate }}\n </div>\n @if (!collapsedState()) {\n <div class=\"si-split-part-actions\">\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"si-split-button\"\n [title]=\"action.tooltip || ''\"\n [attr.aria-label]=\"action.tooltip\"\n (click)=\"action.click($event)\"\n >\n <si-icon [icon]=\"action.iconClass\" />\n </button>\n }\n </div>\n }\n @if (showCollapseButton()) {\n <div class=\"si-split-part-collapse-button\">\n <button\n type=\"button\"\n class=\"si-split-button\"\n [attr.aria-label]=\"collapseLabel() | translate\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon class=\"collapse-icon\" [icon]=\"collapseIconClass()\" />\n </button>\n </div>\n }\n </div>\n}\n\n@if (headerTemplate(); as headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: headerContext\" />\n}\n\n<div\n class=\"si-split-part-content\"\n [class.d-none]=\"!removeContentOnCollapse() && collapsedState() && !collapseToMinSize()\"\n>\n @if (!removeContentOnCollapse() || !collapsedState()) {\n <ng-content />\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;overflow:hidden}.si-split-part-content{flex:1 1 auto;display:flex;overflow:hidden;flex-direction:column}.si-split-part-header{display:flex;flex-direction:row;flex:none;align-items:center;padding:6px;background:var(--element-base-0);block-size:40px}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header{flex:auto;flex-direction:column;max-block-size:100%;padding:6px}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header .si-split-part-title{inline-size:100%;writing-mode:vertical-rl;transform:rotate(180deg)}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header .si-split-part-collapse-button{order:-1}.si-split-part-title{font-weight:600;flex:1}.si-split-part-actions{padding-inline:8px;flex:0 0 auto}.si-split-button{display:inline-block;padding:4px;color:var(--element-text-primary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-decoration:none;font-size:20px;line-height:1;vertical-align:middle;-webkit-user-select:none;user-select:none;background:none;border:0;cursor:pointer}.si-split-button:hover{background:var(--element-action-secondary-hover)}:host-context(.vertical)>:host .si-split-button{--orientation-rotate: rotate(90deg)}[dir=rtl] :host-context(.horizontal)>:host .si-split-button{--orientation-rtl: scaleX(-1)}:dir(rtl) :host-context(.horizontal)>:host .si-split-button{--orientation-rtl: scaleX(-1)}:host(.is-collapsed) .si-split-button{--collapse-rotate: rotate(180deg)}:host(.collapse-start) .si-split-button{--collapse-direction: rotate(180deg)}.si-split-button .collapse-icon{transform:var(--orientation-rotate, rotate(0)) var(--collapse-rotate, rotate(0)) var(--collapse-direction, rotate(0)) var(--orientation-rtl, scaleX(1))}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
205
241
  }
206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSplitPartComponent, decorators: [{
242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSplitPartComponent, decorators: [{
207
243
  type: Component,
208
- args: [{ selector: 'si-split-part', imports: [NgTemplateOutlet, SiIconComponent, SiTranslatePipe], changeDetection: ChangeDetectionStrategy.Default, host: {
244
+ args: [{ selector: 'si-split-part', imports: [NgTemplateOutlet, SiIconComponent, SiTranslatePipe], host: {
209
245
  '[class.is-collapsed]': 'collapsedState()',
210
- '[class.collapse-start]': 'collapseDirection === "start"',
246
+ '[class.collapse-start]': 'collapseDirectionState() === "start"',
211
247
  '[style.grid-area]': '"p-" + this.index'
212
- }, template: "@if (!headerTemplate && showHeader) {\n <div class=\"si-split-part-header\" [class.is-collapsed]=\"collapsedState()\">\n <div class=\"si-split-part-title text-truncate\">\n {{ heading | translate }}\n </div>\n @if (!collapsedState()) {\n <div class=\"si-split-part-actions\">\n @for (action of actions; track $index) {\n <button\n type=\"button\"\n class=\"si-split-button\"\n [title]=\"action.tooltip || ''\"\n [attr.aria-label]=\"action.tooltip\"\n (click)=\"action.click($event)\"\n >\n <si-icon [icon]=\"action.iconClass\" />\n </button>\n }\n </div>\n }\n @if (showCollapseButton) {\n <div class=\"si-split-part-collapse-button\">\n <button\n type=\"button\"\n class=\"si-split-button\"\n [attr.aria-label]=\"collapseLabel | translate\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon class=\"collapse-icon\" [icon]=\"collapseIconClass\" />\n </button>\n </div>\n }\n </div>\n}\n\n@if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: headerContext\" />\n}\n\n<div\n class=\"si-split-part-content\"\n [class.d-none]=\"!removeContentOnCollapse && collapsedState() && !collapseToMinSize\"\n>\n @if (!removeContentOnCollapse || !collapsedState()) {\n <ng-content />\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;overflow:hidden}.si-split-part-content{flex:1 1 auto;display:flex;overflow:hidden;flex-direction:column}.si-split-part-header{display:flex;flex-direction:row;flex:none;align-items:center;padding:6px;background:var(--element-base-0);block-size:40px}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header{flex:auto;flex-direction:column;max-block-size:100%;padding:6px}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header .si-split-part-title{inline-size:100%;writing-mode:vertical-rl;transform:rotate(180deg)}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header .si-split-part-collapse-button{order:-1}.si-split-part-title{font-weight:600;flex:1}.si-split-part-actions{padding-inline:8px;flex:0 0 auto}.si-split-button{display:inline-block;padding:4px;color:var(--element-text-primary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-decoration:none;font-size:20px;line-height:1;vertical-align:middle;-webkit-user-select:none;user-select:none;background:none;border:0;cursor:pointer}.si-split-button:hover{background:var(--element-action-secondary-hover)}:host-context(.vertical)>:host .si-split-button{--orientation-rotate: rotate(90deg)}[dir=rtl] :host-context(.horizontal)>:host .si-split-button{--orientation-rtl: scaleX(-1)}:dir(rtl) :host-context(.horizontal)>:host .si-split-button{--orientation-rtl: scaleX(-1)}:host(.is-collapsed) .si-split-button{--collapse-rotate: rotate(180deg)}:host(.collapse-start) .si-split-button{--collapse-direction: rotate(180deg)}.si-split-button .collapse-icon{transform:var(--orientation-rotate, rotate(0)) var(--collapse-rotate, rotate(0)) var(--collapse-direction, rotate(0)) var(--orientation-rtl, scaleX(1))}\n"] }]
213
- }], propDecorators: { actions: [{
214
- type: Input
215
- }], collapseDirection: [{
216
- type: Input
217
- }], collapseIconClass: [{
218
- type: Input
219
- }], collapseToMinSize: [{
220
- type: Input,
221
- args: [{ transform: booleanAttribute }]
222
- }], headerTemplate: [{
223
- type: Input
224
- }], heading: [{
225
- type: Input
226
- }], minSize: [{
227
- type: Input,
228
- args: [{ transform: numberAttribute }]
229
- }], removeContentOnCollapse: [{
230
- type: Input,
231
- args: [{ transform: booleanAttribute }]
232
- }], scale: [{
233
- type: Input
234
- }], showCollapseButton: [{
235
- type: Input,
236
- args: [{ transform: booleanAttribute }]
237
- }], showHeader: [{
238
- type: Input,
239
- args: [{ transform: booleanAttribute }]
240
- }], collapseLabel: [{
241
- type: Input
242
- }], stateId: [{
243
- type: Input
244
- }], size: [{
245
- type: Input,
246
- args: [{ transform: numberAttribute }]
247
- }], collapseOthers: [{
248
- type: Input,
249
- args: [{ transform: booleanAttribute }]
250
- }], collapseChanged: [{
251
- type: Output
252
- }], stateChange: [{
253
- type: Output
254
- }], expanded: [{
255
- type: Input,
256
- args: [{ transform: booleanAttribute }]
257
- }] } });
248
+ }, template: "@if (!headerTemplate() && showHeader()) {\n <div class=\"si-split-part-header\" [class.is-collapsed]=\"collapsedState()\">\n <div class=\"si-split-part-title text-truncate\">\n {{ heading() | translate }}\n </div>\n @if (!collapsedState()) {\n <div class=\"si-split-part-actions\">\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"si-split-button\"\n [title]=\"action.tooltip || ''\"\n [attr.aria-label]=\"action.tooltip\"\n (click)=\"action.click($event)\"\n >\n <si-icon [icon]=\"action.iconClass\" />\n </button>\n }\n </div>\n }\n @if (showCollapseButton()) {\n <div class=\"si-split-part-collapse-button\">\n <button\n type=\"button\"\n class=\"si-split-button\"\n [attr.aria-label]=\"collapseLabel() | translate\"\n (click)=\"toggleCollapse()\"\n >\n <si-icon class=\"collapse-icon\" [icon]=\"collapseIconClass()\" />\n </button>\n </div>\n }\n </div>\n}\n\n@if (headerTemplate(); as headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: headerContext\" />\n}\n\n<div\n class=\"si-split-part-content\"\n [class.d-none]=\"!removeContentOnCollapse() && collapsedState() && !collapseToMinSize()\"\n>\n @if (!removeContentOnCollapse() || !collapsedState()) {\n <ng-content />\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;overflow:hidden}.si-split-part-content{flex:1 1 auto;display:flex;overflow:hidden;flex-direction:column}.si-split-part-header{display:flex;flex-direction:row;flex:none;align-items:center;padding:6px;background:var(--element-base-0);block-size:40px}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header{flex:auto;flex-direction:column;max-block-size:100%;padding:6px}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header .si-split-part-title{inline-size:100%;writing-mode:vertical-rl;transform:rotate(180deg)}:host-context(.horizontal)>:host(.is-collapsed) .si-split-part-header .si-split-part-collapse-button{order:-1}.si-split-part-title{font-weight:600;flex:1}.si-split-part-actions{padding-inline:8px;flex:0 0 auto}.si-split-button{display:inline-block;padding:4px;color:var(--element-text-primary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-decoration:none;font-size:20px;line-height:1;vertical-align:middle;-webkit-user-select:none;user-select:none;background:none;border:0;cursor:pointer}.si-split-button:hover{background:var(--element-action-secondary-hover)}:host-context(.vertical)>:host .si-split-button{--orientation-rotate: rotate(90deg)}[dir=rtl] :host-context(.horizontal)>:host .si-split-button{--orientation-rtl: scaleX(-1)}:dir(rtl) :host-context(.horizontal)>:host .si-split-button{--orientation-rtl: scaleX(-1)}:host(.is-collapsed) .si-split-button{--collapse-rotate: rotate(180deg)}:host(.collapse-start) .si-split-button{--collapse-direction: rotate(180deg)}.si-split-button .collapse-icon{transform:var(--orientation-rotate, rotate(0)) var(--collapse-rotate, rotate(0)) var(--collapse-direction, rotate(0)) var(--orientation-rtl, scaleX(1))}\n"] }]
249
+ }], ctorParameters: () => [], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], collapseDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseDirection", required: false }] }], collapseIconClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseIconClass", required: false }] }], collapseToMinSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseToMinSize", required: false }] }], headerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTemplate", required: false }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }], removeContentOnCollapse: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeContentOnCollapse", required: false }] }], scale: [{ type: i0.Input, args: [{ isSignal: true, alias: "scale", required: false }] }], showCollapseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCollapseButton", required: false }] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], collapseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseLabel", required: false }] }], stateId: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateId", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], collapseOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseOthers", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], collapseChanged: [{ type: i0.Output, args: ["collapseChanged"] }], stateChange: [{ type: i0.Output, args: ["stateChange"] }] } });
258
250
 
259
251
  class SiSplitComponent {
260
- /** @defaultValue 16 */
261
- gutterSize = 16;
262
- // eslint-disable-next-line @typescript-eslint/naming-convention
263
- _orientation = signal('horizontal', ...(ngDevMode ? [{ debugName: "_orientation" }] : []));
264
- get orientation() {
265
- return this._orientation();
266
- }
267
- set orientation(value) {
268
- this._orientation.set(value);
269
- }
270
- /** @defaultValue [] */
271
- sizes = [];
252
+ /**
253
+ * Size of the gutter (divider) between split parts in pixels.
254
+ *
255
+ * @defaultValue 16
256
+ */
257
+ gutterSize = input(16, /* @ts-ignore */
258
+ ...(ngDevMode ? [{ debugName: "gutterSize" }] : /* istanbul ignore next */ []));
259
+ /**
260
+ * Defines the split layout direction.
261
+ *
262
+ * @defaultValue 'horizontal'
263
+ */
264
+ orientation = input('horizontal', /* @ts-ignore */
265
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
266
+ /**
267
+ * Initial relative sizes of the split parts as fractional values.
268
+ *
269
+ * @defaultValue []
270
+ */
271
+ // eslint-disable-next-line @angular-eslint/prefer-signal-model
272
+ sizes = input([], /* @ts-ignore */
273
+ ...(ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []));
272
274
  /**
273
275
  * An optional stateId to uniquely identify a component instance.
274
276
  * Required for persistence of ui state.
275
277
  */
276
- stateId;
277
- sizesChange = new EventEmitter();
278
- parts;
279
- gutters = [];
280
- // eslint-disable-next-line
281
- gridTemplateRows = signal('', ...(ngDevMode ? [{ debugName: "gridTemplateRows" }] : []));
282
- // eslint-disable-next-line
283
- gridTemplateColumns = signal('', ...(ngDevMode ? [{ debugName: "gridTemplateColumns" }] : []));
284
- // eslint-disable-next-line
285
- gridTemplateAreas = signal('', ...(ngDevMode ? [{ debugName: "gridTemplateAreas" }] : []));
278
+ stateId = input(/* @ts-ignore */
279
+ ...(ngDevMode ? [undefined, { debugName: "stateId" }] : /* istanbul ignore next */ []));
280
+ sizesChange = output();
281
+ parts = contentChildren(SiSplitPartComponent, /* @ts-ignore */
282
+ ...(ngDevMode ? [{ debugName: "parts" }] : /* istanbul ignore next */ []));
283
+ gutters = signal([], /* @ts-ignore */
284
+ ...(ngDevMode ? [{ debugName: "gutters" }] : /* istanbul ignore next */ []));
285
+ gridTemplate = computed(() => {
286
+ if (!this.initialized()) {
287
+ return '';
288
+ }
289
+ return this.parts()
290
+ .map(part => part.collapsedState()
291
+ ? part.collapseToMinSize()
292
+ ? `${part.minSize()}px`
293
+ : 'min-content'
294
+ : part.actualSize()
295
+ ? part.scale() === 'auto'
296
+ ? `minmax(${part.minSize()}px, ${part.actualSize()}fr)`
297
+ : `minmax(${part.minSize()}px, ${part.actualSize()}px)`
298
+ : `minmax(${part.minSize()}px, ${part.fractionalSize() * this.fractionalSizeToExpandedSizeFactor()}fr)`)
299
+ .join(' min-content ');
300
+ }, /* @ts-ignore */
301
+ ...(ngDevMode ? [{ debugName: "gridTemplate" }] : /* istanbul ignore next */ []));
302
+ gridTemplateRows = computed(() => this.orientation() === 'vertical' ? this.gridTemplate() : '1fr', /* @ts-ignore */
303
+ ...(ngDevMode ? [{ debugName: "gridTemplateRows" }] : /* istanbul ignore next */ []));
304
+ gridTemplateColumns = computed(() => this.orientation() === 'horizontal' ? this.gridTemplate() : '1fr', /* @ts-ignore */
305
+ ...(ngDevMode ? [{ debugName: "gridTemplateColumns" }] : /* istanbul ignore next */ []));
306
+ gridTemplateAreas = computed(() => {
307
+ if (!this.initialized()) {
308
+ return '';
309
+ }
310
+ const areaNames = this.parts()
311
+ .map((part, index) => [`p-${index}`, part.after() ? `g-${index}` : []])
312
+ .flat(2);
313
+ if (this.orientation() === 'horizontal') {
314
+ return `"${areaNames.join(' ')}"`;
315
+ }
316
+ else {
317
+ return `"${areaNames.join('" "')}"`;
318
+ }
319
+ }, /* @ts-ignore */
320
+ ...(ngDevMode ? [{ debugName: "gridTemplateAreas" }] : /* istanbul ignore next */ []));
286
321
  elementRef = inject((ElementRef));
287
322
  ngZone = inject(NgZone);
288
323
  changeDetectorRef = inject(ChangeDetectorRef);
289
324
  document = inject(DOCUMENT);
290
325
  uiStateService = inject(SI_UI_STATE_SERVICE, { optional: true });
326
+ destroyRef = inject(DestroyRef);
291
327
  // New parts won't be measured, so we need this to scale up their fractional size to the expanded size.
292
328
  // Using 10, as the sum of all fractional sizes is 1, so we need to scale them up as fr-values should be >= 1.
293
- fractionalSizeToExpandedSizeFactor = 10;
294
- ngOnChanges(changes) {
295
- if (changes.sizes && !changes.sizes.firstChange) {
296
- this.sizes.forEach((size, index) => {
297
- const part = this.parts.get(index);
298
- if (part) {
299
- part.fractionalSize.set(size);
300
- part.expandedSize.set(undefined);
329
+ fractionalSizeToExpandedSizeFactor = signal(10, /* @ts-ignore */
330
+ ...(ngDevMode ? [{ debugName: "fractionalSizeToExpandedSizeFactor" }] : /* istanbul ignore next */ []));
331
+ initialized = signal(false, /* @ts-ignore */
332
+ ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
333
+ constructor() {
334
+ effect(() => {
335
+ const sizes = this.sizes();
336
+ untracked(() => {
337
+ if (!this.initialized()) {
338
+ return;
301
339
  }
340
+ sizes.forEach((size, index) => {
341
+ const part = this.parts()[index];
342
+ if (part) {
343
+ part.fractionalSize.set(size);
344
+ part.expandedSize.set(undefined);
345
+ }
346
+ });
347
+ this.alignRelativeSizes();
302
348
  });
303
- this.alignRelativeSizes();
304
- }
349
+ });
350
+ toObservable(this.parts)
351
+ .pipe(observeOn(asapScheduler), takeUntilDestroyed())
352
+ .subscribe(() => this.setupParts());
305
353
  }
306
- ngAfterContentInit() {
307
- this.parts.changes.pipe(observeOn(asapScheduler)).subscribe(() => {
308
- this.changeDetectorRef.markForCheck();
309
- this.gutters = [];
310
- for (let index = 0; index < this.parts.length; index++) {
311
- const component = this.parts.get(index);
312
- component.index = index;
313
- component.after = this.parts.get(index + 1);
314
- component.before = this.parts.get(index - 1);
315
- component.fractionalSize.set(this.sizes[index]);
316
- component.saveUIState = () => this.saveUIState();
317
- if (component.after) {
318
- this.gutters.push({
319
- before: component,
320
- after: this.parts.get(index + 1),
321
- visible: computed(() => {
322
- const afterPart = component.after.nextExpandedAfter();
323
- return !afterPart.collapsedState() && !component.collapsedState();
324
- })
325
- });
326
- }
354
+ setupParts() {
355
+ this.initialized.set(true);
356
+ const gutters = [];
357
+ const parts = this.parts();
358
+ for (let index = 0; index < parts.length; index++) {
359
+ const component = parts[index];
360
+ component.index = index;
361
+ component.after.set(parts[index + 1]);
362
+ component.before.set(parts[index - 1]);
363
+ component.fractionalSize.set(this.sizes()[index]);
364
+ component.saveUIState = () => this.saveUIState();
365
+ if (component.after()) {
366
+ gutters.push({
367
+ before: component,
368
+ after: parts[index + 1],
369
+ visible: computed(() => {
370
+ const afterPart = component.after().nextExpandedAfter();
371
+ return !afterPart.collapsedState() && !component.collapsedState();
372
+ })
373
+ });
327
374
  }
328
- this.alignRelativeSizes();
329
- this.updateFractionalSizeToExpandSizeFactor();
330
- this.restoreFormUIState();
331
- const gridTemplate = computed(() => this.parts
332
- .map(part => part.collapsedState()
333
- ? part.collapseToMinSize
334
- ? `${part.minSize}px`
335
- : 'min-content'
336
- : part.actualSize()
337
- ? part.scale === 'auto'
338
- ? `minmax(${part.minSize}px, ${part.actualSize()}fr)`
339
- : `minmax(${part.minSize}px, ${part.actualSize()}px)`
340
- : `minmax(${part.minSize}px, ${part.fractionalSize() * this.fractionalSizeToExpandedSizeFactor}fr)`)
341
- .join(' min-content '), ...(ngDevMode ? [{ debugName: "gridTemplate" }] : []));
342
- this.gridTemplateRows = computed(() => this._orientation() === 'vertical' ? gridTemplate() : '1fr', ...(ngDevMode ? [{ debugName: "gridTemplateRows" }] : []));
343
- this.gridTemplateColumns = computed(() => this._orientation() === 'horizontal' ? gridTemplate() : '1fr', ...(ngDevMode ? [{ debugName: "gridTemplateColumns" }] : []));
344
- this.gridTemplateAreas = computed(() => {
345
- const areaNames = this.parts
346
- .map((part, index) => [`p-${index}`, part.after ? `g-${index}` : []])
347
- .flat(2);
348
- if (this._orientation() === 'horizontal') {
349
- return `"${areaNames.join(' ')}"`;
350
- }
351
- else {
352
- return `"${areaNames.join('" "')}"`;
353
- }
354
- }, ...(ngDevMode ? [{ debugName: "gridTemplateAreas" }] : []));
355
- setTimeout(() => this.refreshAllPartSizes());
356
- });
357
- this.parts.notifyOnChanges();
375
+ }
376
+ this.gutters.set(gutters);
377
+ this.alignRelativeSizes();
378
+ this.updateFractionalSizeToExpandSizeFactor();
379
+ this.restoreFromUIState();
380
+ setTimeout(() => this.refreshAllPartSizes());
358
381
  }
359
382
  alignRelativeSizes() {
360
- const requestedNoSize = this.parts.filter(part => !part.size && !part.fractionalSize());
361
- const requestedRelSize = this.parts.filter(part => part.fractionalSize() && !part.size);
383
+ const parts = this.parts();
384
+ const requestedNoSize = parts.filter(part => !part.size() && !part.fractionalSize());
385
+ const requestedRelSize = parts.filter(part => part.fractionalSize() && !part.size());
362
386
  if (requestedRelSize.length) {
363
387
  const totalRequestedRelSize = requestedRelSize.reduce((a, b) => a + b.fractionalSize(), 0);
364
388
  const averageRelSize = totalRequestedRelSize / requestedRelSize.length;
@@ -373,27 +397,27 @@ class SiSplitComponent {
373
397
  updateFractionalSizeToExpandSizeFactor() {
374
398
  let previousScalableFractionalSum = 0;
375
399
  let previousScalableExpandedSizeSum = 0;
376
- for (let index = 0; index < this.parts.length; index++) {
377
- const component = this.parts.get(index);
378
- if (component.scale === 'auto' && component.expandedSize() !== undefined) {
400
+ for (const component of this.parts()) {
401
+ if (component.scale() === 'auto' && component.expandedSize() !== undefined) {
379
402
  previousScalableExpandedSizeSum += component.expandedSize();
380
403
  previousScalableFractionalSum += component.fractionalSize();
381
404
  }
382
405
  }
383
- this.fractionalSizeToExpandedSizeFactor = previousScalableFractionalSum
406
+ this.fractionalSizeToExpandedSizeFactor.set(previousScalableFractionalSum
384
407
  ? previousScalableExpandedSizeSum / previousScalableFractionalSum
385
- : 10;
408
+ : 10);
386
409
  }
387
410
  refreshAllPartSizes() {
388
- const refParts = this.parts.filter(part => !part.collapsedState() &&
389
- part.scale === 'auto' &&
411
+ const parts = this.parts();
412
+ const refParts = parts.filter(part => !part.collapsedState() &&
413
+ part.scale() === 'auto' &&
390
414
  (part.expandedSize() || part.fractionalSize()));
391
415
  const beforeFrSum = refParts.reduce((a, b) => a + (b.expandedSize() ?? b.fractionalSize()), 0);
392
- this.parts.forEach(part => part.refreshSizePx(this.orientation));
416
+ parts.forEach(part => part.refreshSizePx(this.orientation()));
393
417
  const afterFrSum = refParts.reduce((a, b) => a + b.expandedSize(), 0);
394
- const beforeToAfterFactor = afterFrSum / beforeFrSum;
395
- this.parts
396
- .filter(part => part.collapsedState() && (part.scale === 'auto' || part.expandedSize() === undefined))
418
+ const beforeToAfterFactor = beforeFrSum > 0 ? afterFrSum / beforeFrSum : 1;
419
+ parts
420
+ .filter(part => part.collapsedState() && (part.scale() === 'auto' || part.expandedSize() === undefined))
397
421
  .forEach(part => part.expandedSize.update(prev => (prev ?? part.fractionalSize()) * beforeToAfterFactor));
398
422
  }
399
423
  resizeStart(gutter, event) {
@@ -405,17 +429,17 @@ class SiSplitComponent {
405
429
  let appliedDelta = 0;
406
430
  const rtl = isRTL();
407
431
  const startPosition = this.getPosition(event);
408
- const minDelta = -1 * (beforeSize - gutter.before.minSize);
409
- const maxDelta = afterSize - afterPart.minSize;
432
+ const minDelta = -1 * (beforeSize - gutter.before.minSize());
433
+ const maxDelta = afterSize - afterPart.minSize();
410
434
  const containerSize = this.measureContainerSize();
411
435
  event.preventDefault(); // prevents text-selection
412
436
  this.ngZone.runOutsideAngular(() => {
413
437
  merge(fromEvent(this.document, 'mousemove'), fromEvent(this.document, 'touchmove'))
414
- .pipe(takeUntil(merge(fromEvent(this.document, 'mouseup'), fromEvent(this.document, 'touchend'))))
438
+ .pipe(takeUntil(merge(fromEvent(this.document, 'mouseup'), fromEvent(this.document, 'touchend'))), takeUntilDestroyed(this.destroyRef))
415
439
  .subscribe({
416
440
  next: move => {
417
441
  let delta = this.getPosition(move) - startPosition;
418
- if (rtl && this.orientation === 'horizontal') {
442
+ if (rtl && this.orientation() === 'horizontal') {
419
443
  delta *= -1;
420
444
  }
421
445
  delta -= appliedDelta;
@@ -433,13 +457,13 @@ class SiSplitComponent {
433
457
  appliedDelta += delta;
434
458
  gutter.before.expandedSize.set(beforeSize);
435
459
  afterPart.expandedSize.set(afterSize);
436
- if (this.orientation === 'vertical') {
460
+ if (this.orientation() === 'vertical') {
437
461
  this.elementRef.nativeElement.style.setProperty('grid-template-rows', this.gridTemplateRows());
438
462
  }
439
463
  else {
440
464
  this.elementRef.nativeElement.style.setProperty('grid-template-columns', this.gridTemplateColumns());
441
465
  }
442
- this.ngZone.run(() => this.sizesChange.emit(this.parts.map(part => (part.actualSize() * 100) / containerSize)));
466
+ this.ngZone.run(() => this.sizesChange.emit(this.parts().map(part => (part.actualSize() * 100) / containerSize)));
443
467
  },
444
468
  complete: () => this.saveUIState()
445
469
  });
@@ -447,7 +471,7 @@ class SiSplitComponent {
447
471
  }
448
472
  measureContainerSize() {
449
473
  const rect = this.elementRef.nativeElement.getBoundingClientRect();
450
- if (this._orientation() === 'vertical') {
474
+ if (this.orientation() === 'vertical') {
451
475
  return rect.height;
452
476
  }
453
477
  else {
@@ -456,39 +480,42 @@ class SiSplitComponent {
456
480
  }
457
481
  getPosition(event) {
458
482
  const positionObject = event.touches?.[0] ?? event;
459
- return this.orientation === 'horizontal'
483
+ return this.orientation() === 'horizontal'
460
484
  ? (positionObject.clientX ?? 0)
461
485
  : (positionObject.clientY ?? 0);
462
486
  }
463
487
  saveUIState() {
464
- if (!this.stateId || !this.uiStateService) {
488
+ const stateId = this.stateId();
489
+ if (!stateId || !this.uiStateService) {
465
490
  return;
466
491
  }
467
492
  const containerSize = this.measureContainerSize();
468
- const state = this.parts.reduce((partState, part) => {
469
- if (part.stateId) {
470
- partState[part.stateId] = {
493
+ const state = this.parts().reduce((partState, part) => {
494
+ const partStateId = part.stateId();
495
+ if (partStateId) {
496
+ partState[partStateId] = {
471
497
  size: ((part.expandedSize() ?? 0) * 100) / containerSize,
472
- initialSize: this.sizes[part.index],
473
- expanded: part.expanded
498
+ initialSize: this.sizes()[part.index],
499
+ expanded: !part.collapsedState()
474
500
  };
475
501
  }
476
502
  return partState;
477
503
  }, {});
478
- this.uiStateService.save(this.stateId, state);
504
+ this.uiStateService.save(stateId, state);
479
505
  }
480
- restoreFormUIState() {
481
- if (!this.stateId || !this.uiStateService) {
506
+ restoreFromUIState() {
507
+ const stateId = this.stateId();
508
+ if (!stateId || !this.uiStateService) {
482
509
  return;
483
510
  }
484
- this.uiStateService.load(this.stateId).then(uiState => {
511
+ this.uiStateService.load(stateId).then(uiState => {
485
512
  if (!uiState) {
486
513
  return;
487
514
  }
488
- this.parts
489
- .filter(part => part.stateId)
490
- .map(part => ({ part, state: uiState[part.stateId] }))
491
- .filter(({ part, state }) => this.sizes[part.index] === state?.initialSize)
515
+ this.parts()
516
+ .filter(part => part.stateId())
517
+ .map(part => ({ part, state: uiState[part.stateId()] }))
518
+ .filter(({ part, state }) => this.sizes()[part.index] === state?.initialSize)
492
519
  .forEach(({ part, state }) => {
493
520
  part.expandedSize.set(undefined);
494
521
  part.fractionalSize.set(state?.size);
@@ -497,45 +524,32 @@ class SiSplitComponent {
497
524
  setTimeout(() => this.refreshAllPartSizes());
498
525
  });
499
526
  }
500
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSplitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
501
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiSplitComponent, isStandalone: true, selector: "si-split", inputs: { gutterSize: "gutterSize", orientation: "orientation", sizes: "sizes", stateId: "stateId" }, outputs: { sizesChange: "sizesChange" }, host: { properties: { "class": "_orientation()", "style.grid-template-rows": "gridTemplateRows()", "style.grid-template-columns": "gridTemplateColumns()", "style.grid-template-areas": "gridTemplateAreas()" } }, queries: [{ propertyName: "parts", predicate: SiSplitPartComponent }], usesOnChanges: true, ngImport: i0, template: "<ng-content />\n\n@for (gutter of gutters; track $index) {\n @if ($index < parts.length - 1) {\n <div\n class=\"si-split-gutter\"\n [class.d-none]=\"!gutter.visible()\"\n [style.grid-area]=\"'g-' + $index\"\n [style.width.px]=\"orientation === 'horizontal' ? gutterSize : null\"\n [style.height.px]=\"orientation === 'vertical' ? gutterSize : null\"\n (mousedown)=\"resizeStart(gutter, $event)\"\n (touchstart)=\"resizeStart(gutter, $event)\"\n ></div>\n }\n}\n", styles: [":host{display:grid;inline-size:100%;block-size:100%}.si-split-gutter{flex:0 0 auto;background:var(--element-base-0);cursor:ew-resize}.si-split-gutter:before{display:block;content:\"\";position:relative;inset-block-start:50%;margin-block-start:-20px;inset-inline-start:50%;margin-inline-start:-3px;inline-size:6px;block-size:40px;background:var(--element-ui-2);border-radius:3px}:host(.vertical)>.si-split-gutter{inline-size:auto;cursor:ns-resize}:host(.vertical)>.si-split-gutter:before{transform:rotate(90deg)}.si-split-gutter:hover:before{background:var(--element-ui-0-hover)}.si-split-gutter:active:before{background:var(--element-ui-0)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
527
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSplitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
528
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiSplitComponent, isStandalone: true, selector: "si-split", inputs: { gutterSize: { classPropertyName: "gutterSize", publicName: "gutterSize", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, sizes: { classPropertyName: "sizes", publicName: "sizes", isSignal: true, isRequired: false, transformFunction: null }, stateId: { classPropertyName: "stateId", publicName: "stateId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sizesChange: "sizesChange" }, host: { properties: { "class": "orientation()", "style.grid-template-rows": "gridTemplateRows()", "style.grid-template-columns": "gridTemplateColumns()", "style.grid-template-areas": "gridTemplateAreas()" } }, queries: [{ propertyName: "parts", predicate: SiSplitPartComponent, isSignal: true }], ngImport: i0, template: "<ng-content />\n\n@for (gutter of gutters(); track $index) {\n @if ($index < parts().length - 1) {\n <div\n class=\"si-split-gutter\"\n [class.d-none]=\"!gutter.visible()\"\n [style.grid-area]=\"'g-' + $index\"\n [style.width.px]=\"orientation() === 'horizontal' ? gutterSize() : null\"\n [style.height.px]=\"orientation() === 'vertical' ? gutterSize() : null\"\n (mousedown)=\"resizeStart(gutter, $event)\"\n (touchstart)=\"resizeStart(gutter, $event)\"\n ></div>\n }\n}\n", styles: [":host{display:grid;inline-size:100%;block-size:100%}.si-split-gutter{flex:0 0 auto;background:var(--element-base-0);cursor:col-resize}.si-split-gutter:before{display:block;content:\"\";position:relative;inset-block-start:50%;margin-block-start:-20px;inset-inline-start:50%;margin-inline-start:-1px;inline-size:2px;block-size:40px;background:var(--element-ui-2)}:host(.vertical)>.si-split-gutter{inline-size:auto;cursor:row-resize}:host(.vertical)>.si-split-gutter:before{transform:rotate(90deg)}.si-split-gutter:hover:before{background:var(--element-ui-0-hover)}.si-split-gutter:active:before{background:var(--element-ui-0)}\n"] });
502
529
  }
503
530
  __decorate([
504
531
  WebComponentContentChildren(SiSplitPartComponent)
505
532
  ], SiSplitComponent.prototype, "parts", void 0);
506
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSplitComponent, decorators: [{
533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSplitComponent, decorators: [{
507
534
  type: Component,
508
- args: [{ selector: 'si-split', changeDetection: ChangeDetectionStrategy.OnPush, host: {
509
- '[class]': '_orientation()',
535
+ args: [{ selector: 'si-split', host: {
536
+ '[class]': 'orientation()',
510
537
  '[style.grid-template-rows]': 'gridTemplateRows()',
511
538
  '[style.grid-template-columns]': 'gridTemplateColumns()',
512
539
  '[style.grid-template-areas]': 'gridTemplateAreas()'
513
- }, template: "<ng-content />\n\n@for (gutter of gutters; track $index) {\n @if ($index < parts.length - 1) {\n <div\n class=\"si-split-gutter\"\n [class.d-none]=\"!gutter.visible()\"\n [style.grid-area]=\"'g-' + $index\"\n [style.width.px]=\"orientation === 'horizontal' ? gutterSize : null\"\n [style.height.px]=\"orientation === 'vertical' ? gutterSize : null\"\n (mousedown)=\"resizeStart(gutter, $event)\"\n (touchstart)=\"resizeStart(gutter, $event)\"\n ></div>\n }\n}\n", styles: [":host{display:grid;inline-size:100%;block-size:100%}.si-split-gutter{flex:0 0 auto;background:var(--element-base-0);cursor:ew-resize}.si-split-gutter:before{display:block;content:\"\";position:relative;inset-block-start:50%;margin-block-start:-20px;inset-inline-start:50%;margin-inline-start:-3px;inline-size:6px;block-size:40px;background:var(--element-ui-2);border-radius:3px}:host(.vertical)>.si-split-gutter{inline-size:auto;cursor:ns-resize}:host(.vertical)>.si-split-gutter:before{transform:rotate(90deg)}.si-split-gutter:hover:before{background:var(--element-ui-0-hover)}.si-split-gutter:active:before{background:var(--element-ui-0)}\n"] }]
514
- }], propDecorators: { gutterSize: [{
515
- type: Input
516
- }], orientation: [{
517
- type: Input
518
- }], sizes: [{
519
- type: Input
520
- }], stateId: [{
521
- type: Input
522
- }], sizesChange: [{
523
- type: Output
524
- }], parts: [{
525
- type: ContentChildren,
526
- args: [SiSplitPartComponent]
527
- }] } });
540
+ }, template: "<ng-content />\n\n@for (gutter of gutters(); track $index) {\n @if ($index < parts().length - 1) {\n <div\n class=\"si-split-gutter\"\n [class.d-none]=\"!gutter.visible()\"\n [style.grid-area]=\"'g-' + $index\"\n [style.width.px]=\"orientation() === 'horizontal' ? gutterSize() : null\"\n [style.height.px]=\"orientation() === 'vertical' ? gutterSize() : null\"\n (mousedown)=\"resizeStart(gutter, $event)\"\n (touchstart)=\"resizeStart(gutter, $event)\"\n ></div>\n }\n}\n", styles: [":host{display:grid;inline-size:100%;block-size:100%}.si-split-gutter{flex:0 0 auto;background:var(--element-base-0);cursor:col-resize}.si-split-gutter:before{display:block;content:\"\";position:relative;inset-block-start:50%;margin-block-start:-20px;inset-inline-start:50%;margin-inline-start:-1px;inline-size:2px;block-size:40px;background:var(--element-ui-2)}:host(.vertical)>.si-split-gutter{inline-size:auto;cursor:row-resize}:host(.vertical)>.si-split-gutter:before{transform:rotate(90deg)}.si-split-gutter:hover:before{background:var(--element-ui-0-hover)}.si-split-gutter:active:before{background:var(--element-ui-0)}\n"] }]
541
+ }], ctorParameters: () => [], propDecorators: { gutterSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "gutterSize", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], sizes: [{ type: i0.Input, args: [{ isSignal: true, alias: "sizes", required: false }] }], stateId: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateId", required: false }] }], sizesChange: [{ type: i0.Output, args: ["sizesChange"] }], parts: [] } });
528
542
 
529
543
  /**
530
544
  * Copyright (c) Siemens 2016 - 2026
531
545
  * SPDX-License-Identifier: MIT
532
546
  */
533
547
  class SiSplitModule {
534
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSplitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
535
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: SiSplitModule, imports: [SiSplitComponent, SiSplitPartComponent], exports: [SiSplitComponent, SiSplitPartComponent] });
536
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSplitModule, imports: [SiSplitPartComponent] });
548
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSplitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
549
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: SiSplitModule, imports: [SiSplitComponent, SiSplitPartComponent], exports: [SiSplitComponent, SiSplitPartComponent] });
550
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSplitModule, imports: [SiSplitPartComponent] });
537
551
  }
538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiSplitModule, decorators: [{
552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiSplitModule, decorators: [{
539
553
  type: NgModule,
540
554
  args: [{
541
555
  imports: [SiSplitComponent, SiSplitPartComponent],