@sixbell-telco/sdk 4.1.2 → 4.3.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 (252) hide show
  1. package/CHANGELOG.md +102 -1
  2. package/README.md +98 -66
  3. package/_index.css +2 -1498
  4. package/components/accordion/accordion-item/accordion-item.component.d.ts +1 -1
  5. package/components/alert/README.md +27 -0
  6. package/components/alert/index.d.ts +5 -0
  7. package/components/alert/public-api.d.ts +1 -0
  8. package/components/alert/src/alert.component.d.ts +85 -0
  9. package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +1 -1
  10. package/components/audio-player/button-play/button-play.component.d.ts +7 -7
  11. package/components/audio-player/src/audio-player.component.d.ts +2 -2
  12. package/components/audio-player/volume-control/volume-control.component.d.ts +1 -1
  13. package/components/avatar/README.md +1 -0
  14. package/components/avatar/src/avatar.component.d.ts +2 -2
  15. package/components/badge/src/badge.component.d.ts +4 -4
  16. package/components/button/README.md +5 -4
  17. package/components/button/src/button.component.d.ts +38 -16
  18. package/components/card/README.md +2 -0
  19. package/components/card/card-footer/card-footer.component.d.ts +37 -2
  20. package/components/card/card-section-group/card-section-group.component.d.ts +1 -1
  21. package/components/card/src/card.component.d.ts +6 -6
  22. package/components/countdown/src/countdown.component.d.ts +4 -4
  23. package/components/data-table/README.md +26 -0
  24. package/components/data-table/expandable/expandable.component.d.ts +4 -4
  25. package/components/data-table/sortable-header/sortable-header.component.d.ts +1 -1
  26. package/components/data-table/src/data-table.component.d.ts +15 -8
  27. package/components/data-table/sub-component-toggle/sub-component-toggle.component.d.ts +1 -1
  28. package/components/description-list/README.md +27 -0
  29. package/components/description-list/index.d.ts +5 -0
  30. package/components/description-list/public-api.d.ts +1 -0
  31. package/components/description-list/src/description-list.component.d.ts +90 -0
  32. package/components/dialog/README.md +10 -6
  33. package/components/dialog/dialog-actions/dialog-actions.component.d.ts +4 -0
  34. package/components/dialog/src/dialog.component.d.ts +27 -6
  35. package/components/dialog/src/fullscreen-block-scroll-strategy.d.ts +31 -0
  36. package/components/divider/src/divider.component.d.ts +1 -1
  37. package/components/dropdown/README.md +1 -1
  38. package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +1 -1
  39. package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +4 -4
  40. package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +5 -5
  41. package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +5 -5
  42. package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +1 -1
  43. package/components/dropdown-menu/README.md +1 -1
  44. package/components/dropdown-menu/bar/dropdown-menu-bar/dropdown-menu-bar.component.d.ts +1 -1
  45. package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +1 -1
  46. package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +3 -3
  47. package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +4 -4
  48. package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +4 -4
  49. package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +1 -1
  50. package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +1 -1
  51. package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +1 -1
  52. package/components/dropdown-menu/dropdown-menu-chevron/dropdown-menu-chevron.component.d.ts +1 -1
  53. package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +3 -3
  54. package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +1 -1
  55. package/components/empty-state/README.md +40 -0
  56. package/components/empty-state/index.d.ts +5 -0
  57. package/components/empty-state/public-api.d.ts +1 -0
  58. package/components/empty-state/src/empty-state.component.d.ts +73 -0
  59. package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +4 -4
  60. package/components/file-upload/file-uploader/file-uploader.component.d.ts +2 -2
  61. package/components/forms/checkbox/src/checkbox.component.d.ts +1 -1
  62. package/components/forms/combobox/README.md +1 -0
  63. package/components/forms/combobox/src/combobox.component.d.ts +29 -7
  64. package/components/forms/date-picker/src/date-picker.component.d.ts +21 -9
  65. package/components/forms/form-hint/README.md +29 -0
  66. package/components/forms/form-hint/index.d.ts +5 -0
  67. package/components/forms/form-hint/public-api.d.ts +1 -0
  68. package/components/forms/form-hint/src/form-hint.component.d.ts +38 -0
  69. package/components/forms/form-item/src/form-item.component.d.ts +45 -1
  70. package/components/forms/input/README.md +2 -0
  71. package/components/forms/input/src/input.component.d.ts +41 -7
  72. package/components/forms/radio/src/radio.component.d.ts +1 -1
  73. package/components/forms/range/src/range.component.d.ts +26 -4
  74. package/components/forms/select/README.md +1 -0
  75. package/components/forms/select/src/select.component.d.ts +28 -5
  76. package/components/forms/switch/src/switch.component.d.ts +1 -1
  77. package/components/forms/textarea/src/textarea.component.d.ts +20 -5
  78. package/components/forms/toggle/src/toggle.component.d.ts +1 -1
  79. package/components/notification/src/notification.component.d.ts +1 -1
  80. package/components/overlay/README.md +1 -1
  81. package/components/overlay/overlay-trigger/overlay-trigger.component.d.ts +1 -1
  82. package/components/overlay/src/overlay.component.d.ts +1 -1
  83. package/components/paginator/components/pagination-item/pagination-item.component.d.ts +3 -3
  84. package/components/progress/src/progress.component.d.ts +1 -1
  85. package/components/segmented-button/README.md +57 -0
  86. package/components/segmented-button/index.d.ts +5 -0
  87. package/components/segmented-button/public-api.d.ts +1 -0
  88. package/components/segmented-button/src/segmented-button.component.d.ts +110 -0
  89. package/components/sonner/toaster/src/toaster.component.d.ts +3 -3
  90. package/components/tab/src/tab.component.d.ts +2 -2
  91. package/components/table/README.md +51 -3
  92. package/components/table/public-api.d.ts +1 -0
  93. package/components/table/src/table.component.d.ts +20 -13
  94. package/components/table/table-action/table-action.component.d.ts +14 -3
  95. package/components/table/table-actions/table-actions.component.d.ts +12 -1
  96. package/components/table/tokens/README.md +7 -0
  97. package/components/table/tokens/index.d.ts +5 -0
  98. package/components/table/tokens/public-api.d.ts +1 -0
  99. package/components/table/tokens/table-empty-state.d.ts +6 -0
  100. package/components/tooltip/README.md +22 -5
  101. package/components/tooltip/src/tooltip.component.d.ts +36 -4
  102. package/components/tree/README.md +73 -0
  103. package/components/tree/index.d.ts +5 -0
  104. package/components/tree/public-api.d.ts +1 -0
  105. package/components/tree/src/tree.component.d.ts +180 -0
  106. package/components/wizard/README.md +9 -0
  107. package/components/wizard/wizard-content/wizard-content.component.d.ts +1 -1
  108. package/components/wizard/wizard-wrapper/wizard-wrapper.component.d.ts +15 -6
  109. package/directives/auto-focus/src/auto-focus.directive.d.ts +1 -1
  110. package/directives/only-numbers/src/only-numbers.directive.d.ts +1 -1
  111. package/directives/truncate/README.md +49 -0
  112. package/directives/truncate/index.d.ts +5 -0
  113. package/directives/truncate/public-api.d.ts +1 -0
  114. package/directives/truncate/src/truncate-popover.component.d.ts +11 -0
  115. package/directives/truncate/src/truncate.directive.d.ts +96 -0
  116. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +2 -2
  117. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
  118. package/fesm2022/sixbell-telco-sdk-components-alert.mjs +152 -0
  119. package/fesm2022/sixbell-telco-sdk-components-alert.mjs.map +1 -0
  120. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +15 -15
  121. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
  122. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +4 -4
  123. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
  124. package/fesm2022/sixbell-telco-sdk-components-badge.mjs +5 -5
  125. package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
  126. package/fesm2022/sixbell-telco-sdk-components-button.mjs +53 -19
  127. package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
  128. package/fesm2022/sixbell-telco-sdk-components-card.mjs +61 -14
  129. package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
  130. package/fesm2022/sixbell-telco-sdk-components-countdown.mjs +5 -5
  131. package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
  132. package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +3 -3
  133. package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
  134. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +34 -33
  135. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
  136. package/fesm2022/sixbell-telco-sdk-components-description-list.mjs +200 -0
  137. package/fesm2022/sixbell-telco-sdk-components-description-list.mjs.map +1 -0
  138. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +128 -17
  139. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
  140. package/fesm2022/sixbell-telco-sdk-components-divider.mjs +2 -2
  141. package/fesm2022/sixbell-telco-sdk-components-divider.mjs.map +1 -1
  142. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +16 -16
  143. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
  144. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +2 -2
  145. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -1
  146. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +6 -6
  147. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
  148. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +17 -17
  149. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
  150. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +1 -1
  151. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
  152. package/fesm2022/sixbell-telco-sdk-components-empty-state.mjs +131 -0
  153. package/fesm2022/sixbell-telco-sdk-components-empty-state.mjs.map +1 -0
  154. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +9 -9
  155. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
  156. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +2 -2
  157. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
  158. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +80 -25
  159. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  160. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +28 -12
  161. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
  162. package/fesm2022/sixbell-telco-sdk-components-forms-form-hint.mjs +81 -0
  163. package/fesm2022/sixbell-telco-sdk-components-forms-form-hint.mjs.map +1 -0
  164. package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +45 -3
  165. package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -1
  166. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +62 -13
  167. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
  168. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +2 -2
  169. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
  170. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +38 -7
  171. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
  172. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +60 -15
  173. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  174. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +2 -2
  175. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
  176. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +36 -22
  177. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  178. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +2 -2
  179. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
  180. package/fesm2022/sixbell-telco-sdk-components-notification.mjs +2 -2
  181. package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
  182. package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +3 -3
  183. package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
  184. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +4 -4
  185. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
  186. package/fesm2022/sixbell-telco-sdk-components-progress.mjs +2 -2
  187. package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
  188. package/fesm2022/sixbell-telco-sdk-components-segmented-button.mjs +329 -0
  189. package/fesm2022/sixbell-telco-sdk-components-segmented-button.mjs.map +1 -0
  190. package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs +4 -4
  191. package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs.map +1 -1
  192. package/fesm2022/sixbell-telco-sdk-components-sonner.mjs +4 -4
  193. package/fesm2022/sixbell-telco-sdk-components-sonner.mjs.map +1 -1
  194. package/fesm2022/sixbell-telco-sdk-components-tab.mjs +3 -3
  195. package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
  196. package/fesm2022/sixbell-telco-sdk-components-table-tokens.mjs +14 -0
  197. package/fesm2022/sixbell-telco-sdk-components-table-tokens.mjs.map +1 -0
  198. package/fesm2022/sixbell-telco-sdk-components-table.mjs +63 -32
  199. package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
  200. package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +156 -25
  201. package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
  202. package/fesm2022/sixbell-telco-sdk-components-tree.mjs +478 -0
  203. package/fesm2022/sixbell-telco-sdk-components-tree.mjs.map +1 -0
  204. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +18 -9
  205. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
  206. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +2 -2
  207. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
  208. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +2 -2
  209. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
  210. package/fesm2022/sixbell-telco-sdk-directives-truncate.mjs +339 -0
  211. package/fesm2022/sixbell-telco-sdk-directives-truncate.mjs.map +1 -0
  212. package/fesm2022/sixbell-telco-sdk-layouts.mjs +43 -35
  213. package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
  214. package/fesm2022/sixbell-telco-sdk-utils-date.mjs +15 -2
  215. package/fesm2022/sixbell-telco-sdk-utils-date.mjs.map +1 -1
  216. package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs +87 -2
  217. package/fesm2022/sixbell-telco-sdk-utils-mfe.mjs.map +1 -1
  218. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +242 -4
  219. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
  220. package/fesm2022/sixbell-telco-sdk-utils-translation-testing.mjs +203 -0
  221. package/fesm2022/sixbell-telco-sdk-utils-translation-testing.mjs.map +1 -0
  222. package/fesm2022/sixbell-telco-sdk-utils-unsaved-changes.mjs +150 -0
  223. package/fesm2022/sixbell-telco-sdk-utils-unsaved-changes.mjs.map +1 -0
  224. package/i18n/sdk/en.json +224 -0
  225. package/i18n/sdk/es.json +224 -0
  226. package/i18n/sdk/pt.json +224 -0
  227. package/layouts/README.md +11 -10
  228. package/layouts/src/app-layout/app-layout.component.d.ts +11 -8
  229. package/layouts/src/layout.config.d.ts +1 -1
  230. package/layouts/src/navbar/navbar.component.d.ts +5 -5
  231. package/layouts/src/page-banner/page-banner.component.d.ts +6 -1
  232. package/layouts/src/side-menu/side-menu.component.d.ts +2 -2
  233. package/layouts/src/user-menu/user-menu.component.d.ts +5 -5
  234. package/package.json +63 -23
  235. package/src/_index.css +1616 -0
  236. package/utils/mfe/README.md +1 -0
  237. package/utils/mfe/src/hoist-property-rules.d.ts +13 -0
  238. package/utils/mfe/src/mfe-shadow-shell.component.d.ts +3 -0
  239. package/utils/theme/README.md +94 -1
  240. package/utils/theme/public-api.d.ts +2 -1
  241. package/utils/theme/src/models/theme.d.ts +32 -0
  242. package/utils/theme/src/overlay/theme-overlay.d.ts +33 -0
  243. package/utils/theme/src/providers/theme.provider.types.d.ts +7 -0
  244. package/utils/translation/README.md +61 -0
  245. package/utils/translation/testing/index.d.ts +5 -0
  246. package/utils/translation/testing/public-api.d.ts +2 -0
  247. package/utils/translation/testing/src/translation-testing.d.ts +96 -0
  248. package/utils/unsaved-changes/README.md +33 -0
  249. package/utils/unsaved-changes/index.d.ts +5 -0
  250. package/utils/unsaved-changes/public-api.d.ts +1 -0
  251. package/utils/unsaved-changes/src/unsaved-changes-dialog.component.d.ts +24 -0
  252. package/utils/unsaved-changes/src/unsaved-changes.d.ts +50 -0
@@ -0,0 +1,478 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, TemplateRef, Directive, input, model, contentChild, viewChildren, viewChild, signal, computed, linkedSignal, afterRenderEffect, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { BadgeComponent } from '@sixbell-telco/sdk/components/badge';
5
+ import { EmptyStateComponent } from '@sixbell-telco/sdk/components/empty-state';
6
+ import { IconComponent } from '@sixbell-telco/sdk/components/icon';
7
+ import { matTuneOutline, matLayersOutline, matChevronRightOutline, matExpandMoreOutline } from '@sixbell-telco/sdk/components/icon/material/outline';
8
+ import { cn } from '@sixbell-telco/sdk/utils/cn';
9
+ import { injectLabelTranslator } from '@sixbell-telco/sdk/utils/translation';
10
+ import { cva } from 'class-variance-authority';
11
+
12
+ /**
13
+ * Marks the `ng-template` rendered as the actions of a node (add, edit, delete…).
14
+ * The template is laid over the end of the row the actions belong to (the row whose actions hold focus, else the hovered row, else the selected row), inside a `role="group"` that is a sibling
15
+ * of the tree, so treeitems stay free of interactive content (APG treeview).
16
+ *
17
+ * @example
18
+ * ```html
19
+ * <st-tree [nodes]="nodes" label="Categories">
20
+ * <ng-template stTreeNodeActions let-node>
21
+ * <st-button size="xs" [ghost]="true" [square]="true" [icon]="plus" [ariaLabel]="'Add under ' + node.label" />
22
+ * </ng-template>
23
+ * </st-tree>
24
+ * ```
25
+ */
26
+ class TreeNodeActionsDirective {
27
+ template = inject(TemplateRef);
28
+ static ngTemplateContextGuard(_directive, _context) {
29
+ return true;
30
+ }
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TreeNodeActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
32
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TreeNodeActionsDirective, isStandalone: true, selector: "ng-template[stTreeNodeActions]", ngImport: i0 });
33
+ }
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TreeNodeActionsDirective, decorators: [{
35
+ type: Directive,
36
+ args: [{ selector: 'ng-template[stTreeNodeActions]' }]
37
+ }] });
38
+ const INDENT_PX = 20;
39
+ const BASE_PADDING_PX = 8;
40
+ const ROW_HEIGHT_PX = 32;
41
+ const ROW_GAP_PX = 2;
42
+ const ACTIONS_HEIGHT_PX = 24;
43
+ const TYPEAHEAD_RESET_MS = 500;
44
+ /**
45
+ * @internal
46
+ * Row classes: selected rows use the primary tint, the keyboard focus ring stays visible.
47
+ */
48
+ const treeRow = cva([
49
+ 'rounded-field flex cursor-pointer items-center gap-1.5 pr-1 text-sm outline-hidden select-none',
50
+ 'focus-visible:ring-primary focus-visible:ring-offset-base-100 focus-visible:ring-2 focus-visible:ring-offset-1',
51
+ 'motion-safe:transition-colors',
52
+ ], {
53
+ variants: {
54
+ selected: {
55
+ true: 'bg-primary/12 text-primary',
56
+ false: 'text-base-content hover:bg-base-content/10',
57
+ },
58
+ },
59
+ defaultVariants: { selected: false },
60
+ });
61
+ /**
62
+ * Single-select tree following the WAI-ARIA treeview pattern.
63
+ *
64
+ * Rows render flat with `aria-level`, `aria-setsize` and `aria-posinset`, and one roving `tabindex`:
65
+ * Up/Down move, Right expands or enters the first child, Left collapses or returns to the parent,
66
+ * Home/End jump, typing a character jumps to the next label that starts with it (Space joins the typed text while
67
+ * a type-ahead is in progress), `*` expands every sibling branch, Enter/Space select.
68
+ * While filtering, matches show with their ancestors expanded; Left and Right still collapse and
69
+ * expand them until the filter changes.
70
+ *
71
+ * Treeitems hold no interactive content. Project an `ng-template[stTreeNodeActions]` for node
72
+ * actions: it renders inside a `role="group"` toolbar that is a sibling of the tree, laid over the
73
+ * end of the hovered row, else the selected row, and next in the tab order. Hovering a row shows its
74
+ * actions as well, which adds to the keyboard path and never replaces it: Tab from a tree row goes to
75
+ * the actions of the selected node even if the pointer rests on another row, Shift+Tab returns, Escape
76
+ * inside the actions returns focus to the row they belong to. While focus is inside the actions, the
77
+ * pointer cannot move them to another row, not even when focus moves between two action buttons.
78
+ */
79
+ class TreeComponent {
80
+ /** Root nodes. Nodes nest to any depth through `children`. */
81
+ nodes = input.required();
82
+ /** Accessible name of the tree. Defaults to a translated "Tree"; name it for the screen reader user. */
83
+ label = input('');
84
+ /** Accessible name of the node actions group, e.g. "Actions for Delivery". Defaults to a translated "Actions for {label}". */
85
+ actionsLabel = input('');
86
+ /** Case-insensitive label filter. Matches keep their ancestors and expand them. */
87
+ filter = input('');
88
+ /** Heading of the empty state shown when there are no nodes. Defaults to a translated text. */
89
+ emptyHeading = input('');
90
+ /** Description of the empty state shown when there are no nodes. Defaults to a translated text. */
91
+ emptyDescription = input('');
92
+ /** Additional classes merged onto the host */
93
+ class = input('');
94
+ /** Id of the selected node, two-way with `[(selectedId)]`. */
95
+ selectedId = model(null);
96
+ /** Ids of the expanded branches, two-way with `[(expandedIds)]`. Ignored while a filter is active. */
97
+ expandedIds = model([]);
98
+ actionsTemplate = contentChild(TreeNodeActionsDirective);
99
+ rowElements = viewChildren('row');
100
+ actionsElement = viewChild('actions');
101
+ translateLabel = injectLabelTranslator();
102
+ /** @internal */
103
+ indent = INDENT_PX;
104
+ /** @internal */
105
+ basePadding = BASE_PADDING_PX;
106
+ /** @internal */
107
+ rowHeight = ROW_HEIGHT_PX;
108
+ /** @internal */
109
+ rowGap = ROW_GAP_PX;
110
+ /** @internal */
111
+ icons = { expanded: matExpandMoreOutline, collapsed: matChevronRightOutline, branch: matLayersOutline, leaf: matTuneOutline };
112
+ /** @internal */
113
+ focusedId = signal(null);
114
+ /** @internal Measured width of the actions group, reserved as end padding on the row showing the actions. */
115
+ actionsWidth = signal(0);
116
+ typeahead = { buffer: '', at: 0 };
117
+ normalizedFilter = computed(() => this.filter().trim().toLowerCase());
118
+ /** Branches collapsed by the user while filtering; a new filter starts with every match expanded again. */
119
+ collapsedWhileFiltering = linkedSignal({ source: this.normalizedFilter, computation: () => [] });
120
+ /** @internal */
121
+ hostClass = computed(() => cn('block', this.class()));
122
+ /** @internal */
123
+ hasActions = computed(() => !!this.actionsTemplate());
124
+ /** Visible rows: expanded branches only, or every match plus its ancestors while filtering. */
125
+ rows = computed(() => {
126
+ const query = this.normalizedFilter();
127
+ const expanded = new Set(this.expandedIds());
128
+ const collapsed = new Set(this.collapsedWhileFiltering());
129
+ const rows = [];
130
+ const matches = (node) => node.label.toLowerCase().includes(query) || (node.children ?? []).some(matches);
131
+ const visit = (nodes, level, parentId) => {
132
+ const visible = query ? nodes.filter(matches) : nodes;
133
+ visible.forEach((node, index) => {
134
+ const children = node.children ?? [];
135
+ const isExpanded = children.length > 0 && (query ? !collapsed.has(node.id) : expanded.has(node.id));
136
+ rows.push({ node, level, parentId, hasChildren: children.length > 0, expanded: isExpanded, posInSet: index + 1, setSize: visible.length });
137
+ if (isExpanded)
138
+ visit(children, level + 1, node.id);
139
+ });
140
+ };
141
+ visit(this.nodes(), 0, null);
142
+ return rows;
143
+ });
144
+ /** @internal The row holding the roving tab stop: last focused, else selected, else first. */
145
+ focusId = computed(() => {
146
+ const ids = this.rows().map((row) => row.node.id);
147
+ const candidate = [this.focusedId(), this.selectedId()].find((id) => id && ids.includes(id));
148
+ return candidate ?? ids[0] ?? null;
149
+ });
150
+ /** @internal Row under the pointer. Hover shows its actions in addition to the selected row's. */
151
+ hoveredId = signal(null);
152
+ /** @internal Node whose actions hold focus; the group stays on it whatever the pointer does. */
153
+ lockedId = signal(null);
154
+ /** @internal The row whose actions show (focused group, else hovered, else selected) and where they sit; none when that row is not visible or no actions template is projected. */
155
+ actionsRow = computed(() => {
156
+ const actions = this.actionsTemplate();
157
+ if (!actions)
158
+ return null;
159
+ const rows = this.rows();
160
+ const target = [this.lockedId(), this.hoveredId(), this.selectedId()].find((id) => id && rows.some((row) => row.node.id === id));
161
+ const index = rows.findIndex((row) => row.node.id === target);
162
+ if (index < 0)
163
+ return null;
164
+ return { row: rows[index], template: actions.template, top: index * (ROW_HEIGHT_PX + ROW_GAP_PX) + (ROW_HEIGHT_PX - ACTIONS_HEIGHT_PX) / 2 };
165
+ });
166
+ /** @internal */
167
+ treeLabel = computed(() => this.label() || this.translateLabel({ key: 'sdk.tree.label', fallback: 'Tree' }));
168
+ /** @internal */
169
+ actionsGroupLabel = computed(() => {
170
+ const explicit = this.actionsLabel();
171
+ if (explicit)
172
+ return explicit;
173
+ const label = this.actionsRow()?.row.node.label ?? '';
174
+ return this.translateLabel({ key: 'sdk.tree.actions', fallback: 'Actions for {{label}}', params: { label } });
175
+ });
176
+ /** @internal */
177
+ emptyText = computed(() => {
178
+ const filtering = this.normalizedFilter() !== '' && this.nodes().length > 0;
179
+ const heading = this.emptyHeading() || this.translateLabel(filtering ? NO_RESULTS_HEADING : EMPTY_HEADING);
180
+ const description = this.emptyDescription() || this.translateLabel(filtering ? NO_RESULTS_DESCRIPTION : EMPTY_DESCRIPTION);
181
+ return { heading, description };
182
+ });
183
+ constructor() {
184
+ afterRenderEffect(() => {
185
+ const group = this.actionsElement()?.nativeElement;
186
+ this.actionsWidth.set(group ? group.offsetWidth + BASE_PADDING_PX : 0);
187
+ });
188
+ }
189
+ /** @internal */
190
+ rowClass(selected) {
191
+ return cn(treeRow({ selected }));
192
+ }
193
+ /** @internal */
194
+ focusActionsRow() {
195
+ const id = this.actionsRow()?.row.node.id;
196
+ if (id)
197
+ this.focusRow(id);
198
+ }
199
+ /** @internal */
200
+ lockActions() {
201
+ if (this.lockedId() === null)
202
+ this.lockedId.set(this.actionsRow()?.row.node.id ?? null);
203
+ }
204
+ /** @internal Drops the lock unless focus is moving inside the actions group (between two action buttons, or from a row into it). */
205
+ releaseLock(event) {
206
+ const next = event.relatedTarget;
207
+ if (next && this.actionsElement()?.nativeElement.contains(next))
208
+ return;
209
+ this.lockedId.set(null);
210
+ }
211
+ /** @internal Tracks the hovered row; the actions group itself keeps the row it belongs to. */
212
+ onPointerOver(event) {
213
+ const target = event.target;
214
+ const id = target?.closest('[role="treeitem"]')?.dataset['nodeId'];
215
+ if (id)
216
+ this.hoveredId.set(id);
217
+ }
218
+ /** @internal */
219
+ onRowClick(row, event) {
220
+ const onToggle = event.target?.closest('[data-tree-toggle]');
221
+ if (onToggle && row.hasChildren) {
222
+ this.setExpanded(row.node.id, !row.expanded);
223
+ }
224
+ else {
225
+ this.selectedId.set(row.node.id);
226
+ }
227
+ this.focusedId.set(row.node.id);
228
+ }
229
+ /** @internal */
230
+ onKeydown(row, event) {
231
+ const rows = this.rows();
232
+ const index = rows.findIndex((candidate) => candidate.node.id === row.node.id);
233
+ switch (event.key) {
234
+ case 'ArrowDown':
235
+ this.moveFocus(rows[index + 1]);
236
+ break;
237
+ case 'ArrowUp':
238
+ this.moveFocus(rows[index - 1]);
239
+ break;
240
+ case 'Home':
241
+ this.moveFocus(rows[0]);
242
+ break;
243
+ case 'End':
244
+ this.moveFocus(rows.at(-1));
245
+ break;
246
+ case 'ArrowRight':
247
+ if (row.hasChildren && !row.expanded)
248
+ this.setExpanded(row.node.id, true);
249
+ else if (row.expanded)
250
+ this.moveFocus(rows[index + 1]);
251
+ break;
252
+ case 'ArrowLeft':
253
+ if (row.expanded)
254
+ this.setExpanded(row.node.id, false);
255
+ else
256
+ this.moveFocus(rows.find((candidate) => candidate.node.id === row.parentId));
257
+ break;
258
+ case '*':
259
+ this.expandSiblings(rows, row);
260
+ break;
261
+ case 'Tab':
262
+ this.lockSelectedActions(event);
263
+ return;
264
+ case 'Enter':
265
+ this.selectedId.set(row.node.id);
266
+ break;
267
+ case ' ':
268
+ if (this.typeaheadActive())
269
+ this.typeaheadMove(rows, index, event);
270
+ else
271
+ this.selectedId.set(row.node.id);
272
+ break;
273
+ default:
274
+ if (!this.typeaheadMove(rows, index, event))
275
+ return;
276
+ }
277
+ event.preventDefault();
278
+ }
279
+ /** Keyboard path wins while focus is in the tree: Tab goes to the actions of the selected node, whatever row the pointer rests on. */
280
+ lockSelectedActions(event) {
281
+ const selected = this.selectedId();
282
+ if (event.shiftKey || !selected || !this.rows().some((row) => row.node.id === selected))
283
+ return;
284
+ this.lockedId.set(selected);
285
+ }
286
+ typeaheadActive() {
287
+ return this.typeahead.buffer !== '' && Date.now() - this.typeahead.at <= TYPEAHEAD_RESET_MS;
288
+ }
289
+ /** APG `*`: expands every collapsed branch among the siblings of the focused row. */
290
+ expandSiblings(rows, row) {
291
+ const ids = rows
292
+ .filter((candidate) => candidate.parentId === row.parentId && candidate.hasChildren && !candidate.expanded)
293
+ .map((candidate) => candidate.node.id);
294
+ if (ids.length === 0)
295
+ return;
296
+ if (this.normalizedFilter()) {
297
+ this.collapsedWhileFiltering.set(this.collapsedWhileFiltering().filter((id) => !ids.includes(id)));
298
+ return;
299
+ }
300
+ this.expandedIds.set([...this.expandedIds().filter((id) => !ids.includes(id)), ...ids]);
301
+ }
302
+ /** Moves focus to the next row whose label starts with the typed characters. Returns whether the key was a type-ahead character. */
303
+ typeaheadMove(rows, index, event) {
304
+ if (event.key.length !== 1 || event.ctrlKey || event.metaKey || event.altKey)
305
+ return false;
306
+ const now = Date.now();
307
+ const continuing = now - this.typeahead.at <= TYPEAHEAD_RESET_MS;
308
+ const buffer = (continuing ? this.typeahead.buffer : '') + event.key.toLowerCase();
309
+ this.typeahead = { buffer, at: now };
310
+ const start = buffer.length === 1 ? index + 1 : index;
311
+ const ordered = [...rows.slice(start), ...rows.slice(0, start)];
312
+ this.moveFocus(ordered.find((candidate) => candidate.node.label.toLowerCase().startsWith(buffer)));
313
+ return true;
314
+ }
315
+ setExpanded(id, expanded) {
316
+ if (this.normalizedFilter()) {
317
+ const others = this.collapsedWhileFiltering().filter((candidate) => candidate !== id);
318
+ this.collapsedWhileFiltering.set(expanded ? others : [...others, id]);
319
+ return;
320
+ }
321
+ const others = this.expandedIds().filter((candidate) => candidate !== id);
322
+ this.expandedIds.set(expanded ? [...others, id] : others);
323
+ }
324
+ moveFocus(row) {
325
+ if (!row)
326
+ return;
327
+ this.focusedId.set(row.node.id);
328
+ this.focusRow(row.node.id);
329
+ }
330
+ focusRow(id) {
331
+ this.rowElements()
332
+ .find((element) => element.nativeElement.dataset['nodeId'] === id)
333
+ ?.nativeElement.focus();
334
+ }
335
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
336
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TreeComponent, isStandalone: true, selector: "st-tree", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, actionsLabel: { classPropertyName: "actionsLabel", publicName: "actionsLabel", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, emptyHeading: { classPropertyName: "emptyHeading", publicName: "emptyHeading", isSignal: true, isRequired: false, transformFunction: null }, emptyDescription: { classPropertyName: "emptyDescription", publicName: "emptyDescription", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedId: "selectedIdChange", expandedIds: "expandedIdsChange" }, host: { properties: { "class": "hostClass()" } }, queries: [{ propertyName: "actionsTemplate", first: true, predicate: TreeNodeActionsDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "rowElements", predicate: ["row"], descendants: true, isSignal: true }, { propertyName: "actionsElement", first: true, predicate: ["actions"], descendants: true, isSignal: true }], ngImport: i0, template: `
337
+ @if (rows().length) {
338
+ <div class="relative" (mouseover)="onPointerOver($event)" (mouseleave)="hoveredId.set(null)">
339
+ <div role="tree" class="flex flex-col" [attr.aria-label]="treeLabel()" [style.row-gap.px]="rowGap">
340
+ @for (row of rows(); track row.node.id) {
341
+ @let selected = row.node.id === selectedId();
342
+ <div
343
+ #row
344
+ role="treeitem"
345
+ [attr.data-node-id]="row.node.id"
346
+ [attr.aria-level]="row.level + 1"
347
+ [attr.aria-setsize]="row.setSize"
348
+ [attr.aria-posinset]="row.posInSet"
349
+ [attr.aria-expanded]="row.hasChildren ? row.expanded : null"
350
+ [attr.aria-selected]="selected"
351
+ [attr.tabindex]="row.node.id === focusId() ? 0 : -1"
352
+ [class]="rowClass(selected)"
353
+ [style.height.px]="rowHeight"
354
+ [style.padding-inline-start.px]="row.level * indent + basePadding"
355
+ [style.padding-inline-end.px]="row.node.id === actionsRow()?.row?.node?.id ? actionsWidth() : null"
356
+ (click)="onRowClick(row, $event)"
357
+ (keydown)="onKeydown(row, $event)"
358
+ (focus)="focusedId.set(row.node.id)"
359
+ (blur)="releaseLock($event)"
360
+ >
361
+ <span data-tree-toggle class="flex size-4 shrink-0 items-center justify-center text-sm" aria-hidden="true">
362
+ @if (row.hasChildren) {
363
+ <st-icon [icon]="row.expanded ? icons.expanded : icons.collapsed" />
364
+ }
365
+ </span>
366
+ <st-icon class="shrink-0" [icon]="row.node.icon ?? (row.hasChildren ? icons.branch : icons.leaf)" size="xs" aria-hidden="true" />
367
+ <span class="min-w-0 flex-1 truncate">{{ row.node.label }}</span>
368
+ @if (row.node.badge !== undefined) {
369
+ <st-badge size="xs" [variant]="selected ? 'primary' : 'base'" [soft]="true">{{ row.node.badge }}</st-badge>
370
+ }
371
+ </div>
372
+ }
373
+ </div>
374
+ @if (actionsRow(); as selection) {
375
+ <div
376
+ #actions
377
+ role="group"
378
+ class="absolute inset-e-1 flex items-center gap-0.5"
379
+ data-testid="tree-actions"
380
+ [attr.aria-label]="actionsGroupLabel()"
381
+ [style.top.px]="selection.top"
382
+ (keydown.escape)="focusActionsRow()"
383
+ (focusin)="lockActions()"
384
+ (focusout)="releaseLock($event)"
385
+ >
386
+ <ng-container
387
+ [ngTemplateOutlet]="selection.template"
388
+ [ngTemplateOutletContext]="{ $implicit: selection.row.node, level: selection.row.level, expanded: selection.row.expanded }"
389
+ />
390
+ </div>
391
+ }
392
+ </div>
393
+ } @else {
394
+ <st-empty-state size="sm" [illustration]="null" [heading]="emptyText().heading" [description]="emptyText().description" />
395
+ }
396
+ `, isInline: true, dependencies: [{ kind: "component", type: BadgeComponent, selector: "st-badge", inputs: ["variant", "size", "outline", "soft", "dash", "ghost", "icon", "iconPosition"] }, { kind: "component", type: EmptyStateComponent, selector: "st-empty-state", inputs: ["heading", "description", "illustration", "size", "class"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
397
+ }
398
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TreeComponent, decorators: [{
399
+ type: Component,
400
+ args: [{
401
+ selector: 'st-tree',
402
+ imports: [BadgeComponent, EmptyStateComponent, IconComponent, NgTemplateOutlet],
403
+ changeDetection: ChangeDetectionStrategy.OnPush,
404
+ host: { '[class]': 'hostClass()' },
405
+ template: `
406
+ @if (rows().length) {
407
+ <div class="relative" (mouseover)="onPointerOver($event)" (mouseleave)="hoveredId.set(null)">
408
+ <div role="tree" class="flex flex-col" [attr.aria-label]="treeLabel()" [style.row-gap.px]="rowGap">
409
+ @for (row of rows(); track row.node.id) {
410
+ @let selected = row.node.id === selectedId();
411
+ <div
412
+ #row
413
+ role="treeitem"
414
+ [attr.data-node-id]="row.node.id"
415
+ [attr.aria-level]="row.level + 1"
416
+ [attr.aria-setsize]="row.setSize"
417
+ [attr.aria-posinset]="row.posInSet"
418
+ [attr.aria-expanded]="row.hasChildren ? row.expanded : null"
419
+ [attr.aria-selected]="selected"
420
+ [attr.tabindex]="row.node.id === focusId() ? 0 : -1"
421
+ [class]="rowClass(selected)"
422
+ [style.height.px]="rowHeight"
423
+ [style.padding-inline-start.px]="row.level * indent + basePadding"
424
+ [style.padding-inline-end.px]="row.node.id === actionsRow()?.row?.node?.id ? actionsWidth() : null"
425
+ (click)="onRowClick(row, $event)"
426
+ (keydown)="onKeydown(row, $event)"
427
+ (focus)="focusedId.set(row.node.id)"
428
+ (blur)="releaseLock($event)"
429
+ >
430
+ <span data-tree-toggle class="flex size-4 shrink-0 items-center justify-center text-sm" aria-hidden="true">
431
+ @if (row.hasChildren) {
432
+ <st-icon [icon]="row.expanded ? icons.expanded : icons.collapsed" />
433
+ }
434
+ </span>
435
+ <st-icon class="shrink-0" [icon]="row.node.icon ?? (row.hasChildren ? icons.branch : icons.leaf)" size="xs" aria-hidden="true" />
436
+ <span class="min-w-0 flex-1 truncate">{{ row.node.label }}</span>
437
+ @if (row.node.badge !== undefined) {
438
+ <st-badge size="xs" [variant]="selected ? 'primary' : 'base'" [soft]="true">{{ row.node.badge }}</st-badge>
439
+ }
440
+ </div>
441
+ }
442
+ </div>
443
+ @if (actionsRow(); as selection) {
444
+ <div
445
+ #actions
446
+ role="group"
447
+ class="absolute inset-e-1 flex items-center gap-0.5"
448
+ data-testid="tree-actions"
449
+ [attr.aria-label]="actionsGroupLabel()"
450
+ [style.top.px]="selection.top"
451
+ (keydown.escape)="focusActionsRow()"
452
+ (focusin)="lockActions()"
453
+ (focusout)="releaseLock($event)"
454
+ >
455
+ <ng-container
456
+ [ngTemplateOutlet]="selection.template"
457
+ [ngTemplateOutletContext]="{ $implicit: selection.row.node, level: selection.row.level, expanded: selection.row.expanded }"
458
+ />
459
+ </div>
460
+ }
461
+ </div>
462
+ } @else {
463
+ <st-empty-state size="sm" [illustration]="null" [heading]="emptyText().heading" [description]="emptyText().description" />
464
+ }
465
+ `,
466
+ }]
467
+ }], ctorParameters: () => [] });
468
+ const EMPTY_HEADING = { key: 'sdk.tree.empty', fallback: 'Nothing here yet' };
469
+ const EMPTY_DESCRIPTION = { key: 'sdk.tree.emptyDescription', fallback: 'There are no items to show.' };
470
+ const NO_RESULTS_HEADING = { key: 'sdk.tree.noResults', fallback: 'No matches' };
471
+ const NO_RESULTS_DESCRIPTION = { key: 'sdk.tree.noResultsDescription', fallback: 'No item matches the filter.' };
472
+
473
+ /**
474
+ * Generated bundle index. Do not edit.
475
+ */
476
+
477
+ export { TreeComponent, TreeNodeActionsDirective, treeRow };
478
+ //# sourceMappingURL=sixbell-telco-sdk-components-tree.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sixbell-telco-sdk-components-tree.mjs","sources":["../../../projects/sdk/components/tree/src/tree.component.ts","../../../projects/sdk/components/tree/sixbell-telco-sdk-components-tree.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n\tafterRenderEffect,\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tcontentChild,\n\tDirective,\n\tElementRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\tsignal,\n\tTemplateRef,\n\tviewChild,\n\tviewChildren,\n} from '@angular/core';\nimport { BadgeComponent } from '@sixbell-telco/sdk/components/badge';\nimport { EmptyStateComponent } from '@sixbell-telco/sdk/components/empty-state';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { matChevronRightOutline, matExpandMoreOutline, matLayersOutline, matTuneOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { injectLabelTranslator } from '@sixbell-telco/sdk/utils/translation';\nimport { cva } from 'class-variance-authority';\n\n/** A node of `st-tree`. Nodes nest to any depth through `children`. */\nexport interface TreeNode<T = unknown> {\n\t/** Unique id, used by `selectedId` and `expandedIds`. */\n\tid: string;\n\t/** Visible text and the filter target. */\n\tlabel: string;\n\t/** Small badge after the label, such as the number of items the node owns. */\n\tbadge?: number | string;\n\t/** Icon SVG (same format as `st-icon` `icon`) shown before the label. Defaults to layers for a branch and tune for a leaf. */\n\ticon?: string;\n\tchildren?: TreeNode<T>[];\n\t/** Your own payload, handed back through the actions template context. */\n\tdata?: T;\n}\n\n/** Context of the `stTreeNodeActions` template. */\nexport interface TreeNodeActionsContext<T = unknown> {\n\t$implicit: TreeNode<T>;\n\t/** Zero-based depth of the node. */\n\tlevel: number;\n\texpanded: boolean;\n}\n\n/**\n * Marks the `ng-template` rendered as the actions of a node (add, edit, delete…).\n * The template is laid over the end of the row the actions belong to (the row whose actions hold focus, else the hovered row, else the selected row), inside a `role=\"group\"` that is a sibling\n * of the tree, so treeitems stay free of interactive content (APG treeview).\n *\n * @example\n * ```html\n * <st-tree [nodes]=\"nodes\" label=\"Categories\">\n * <ng-template stTreeNodeActions let-node>\n * <st-button size=\"xs\" [ghost]=\"true\" [square]=\"true\" [icon]=\"plus\" [ariaLabel]=\"'Add under ' + node.label\" />\n * </ng-template>\n * </st-tree>\n * ```\n */\n@Directive({ selector: 'ng-template[stTreeNodeActions]' })\nexport class TreeNodeActionsDirective<T = unknown> {\n\treadonly template = inject<TemplateRef<TreeNodeActionsContext<T>>>(TemplateRef);\n\n\tstatic ngTemplateContextGuard<T>(_directive: TreeNodeActionsDirective<T>, _context: unknown): _context is TreeNodeActionsContext<T> {\n\t\treturn true;\n\t}\n}\n\n/** A visible row of the flattened tree. */\ninterface TreeRow<T> {\n\tnode: TreeNode<T>;\n\tlevel: number;\n\tparentId: string | null;\n\thasChildren: boolean;\n\texpanded: boolean;\n\tposInSet: number;\n\tsetSize: number;\n}\n\nconst INDENT_PX = 20;\nconst BASE_PADDING_PX = 8;\nconst ROW_HEIGHT_PX = 32;\nconst ROW_GAP_PX = 2;\nconst ACTIONS_HEIGHT_PX = 24;\nconst TYPEAHEAD_RESET_MS = 500;\n\n/**\n * @internal\n * Row classes: selected rows use the primary tint, the keyboard focus ring stays visible.\n */\nexport const treeRow = cva(\n\t[\n\t\t'rounded-field flex cursor-pointer items-center gap-1.5 pr-1 text-sm outline-hidden select-none',\n\t\t'focus-visible:ring-primary focus-visible:ring-offset-base-100 focus-visible:ring-2 focus-visible:ring-offset-1',\n\t\t'motion-safe:transition-colors',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tselected: {\n\t\t\t\ttrue: 'bg-primary/12 text-primary',\n\t\t\t\tfalse: 'text-base-content hover:bg-base-content/10',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: { selected: false },\n\t},\n);\n\n/**\n * Single-select tree following the WAI-ARIA treeview pattern.\n *\n * Rows render flat with `aria-level`, `aria-setsize` and `aria-posinset`, and one roving `tabindex`:\n * Up/Down move, Right expands or enters the first child, Left collapses or returns to the parent,\n * Home/End jump, typing a character jumps to the next label that starts with it (Space joins the typed text while\n * a type-ahead is in progress), `*` expands every sibling branch, Enter/Space select.\n * While filtering, matches show with their ancestors expanded; Left and Right still collapse and\n * expand them until the filter changes.\n *\n * Treeitems hold no interactive content. Project an `ng-template[stTreeNodeActions]` for node\n * actions: it renders inside a `role=\"group\"` toolbar that is a sibling of the tree, laid over the\n * end of the hovered row, else the selected row, and next in the tab order. Hovering a row shows its\n * actions as well, which adds to the keyboard path and never replaces it: Tab from a tree row goes to\n * the actions of the selected node even if the pointer rests on another row, Shift+Tab returns, Escape\n * inside the actions returns focus to the row they belong to. While focus is inside the actions, the\n * pointer cannot move them to another row, not even when focus moves between two action buttons.\n */\n@Component({\n\tselector: 'st-tree',\n\timports: [BadgeComponent, EmptyStateComponent, IconComponent, NgTemplateOutlet],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: { '[class]': 'hostClass()' },\n\ttemplate: `\n\t\t@if (rows().length) {\n\t\t\t<div class=\"relative\" (mouseover)=\"onPointerOver($event)\" (mouseleave)=\"hoveredId.set(null)\">\n\t\t\t\t<div role=\"tree\" class=\"flex flex-col\" [attr.aria-label]=\"treeLabel()\" [style.row-gap.px]=\"rowGap\">\n\t\t\t\t\t@for (row of rows(); track row.node.id) {\n\t\t\t\t\t\t@let selected = row.node.id === selectedId();\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t#row\n\t\t\t\t\t\t\trole=\"treeitem\"\n\t\t\t\t\t\t\t[attr.data-node-id]=\"row.node.id\"\n\t\t\t\t\t\t\t[attr.aria-level]=\"row.level + 1\"\n\t\t\t\t\t\t\t[attr.aria-setsize]=\"row.setSize\"\n\t\t\t\t\t\t\t[attr.aria-posinset]=\"row.posInSet\"\n\t\t\t\t\t\t\t[attr.aria-expanded]=\"row.hasChildren ? row.expanded : null\"\n\t\t\t\t\t\t\t[attr.aria-selected]=\"selected\"\n\t\t\t\t\t\t\t[attr.tabindex]=\"row.node.id === focusId() ? 0 : -1\"\n\t\t\t\t\t\t\t[class]=\"rowClass(selected)\"\n\t\t\t\t\t\t\t[style.height.px]=\"rowHeight\"\n\t\t\t\t\t\t\t[style.padding-inline-start.px]=\"row.level * indent + basePadding\"\n\t\t\t\t\t\t\t[style.padding-inline-end.px]=\"row.node.id === actionsRow()?.row?.node?.id ? actionsWidth() : null\"\n\t\t\t\t\t\t\t(click)=\"onRowClick(row, $event)\"\n\t\t\t\t\t\t\t(keydown)=\"onKeydown(row, $event)\"\n\t\t\t\t\t\t\t(focus)=\"focusedId.set(row.node.id)\"\n\t\t\t\t\t\t\t(blur)=\"releaseLock($event)\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span data-tree-toggle class=\"flex size-4 shrink-0 items-center justify-center text-sm\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t@if (row.hasChildren) {\n\t\t\t\t\t\t\t\t\t<st-icon [icon]=\"row.expanded ? icons.expanded : icons.collapsed\" />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<st-icon class=\"shrink-0\" [icon]=\"row.node.icon ?? (row.hasChildren ? icons.branch : icons.leaf)\" size=\"xs\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t<span class=\"min-w-0 flex-1 truncate\">{{ row.node.label }}</span>\n\t\t\t\t\t\t\t@if (row.node.badge !== undefined) {\n\t\t\t\t\t\t\t\t<st-badge size=\"xs\" [variant]=\"selected ? 'primary' : 'base'\" [soft]=\"true\">{{ row.node.badge }}</st-badge>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t@if (actionsRow(); as selection) {\n\t\t\t\t\t<div\n\t\t\t\t\t\t#actions\n\t\t\t\t\t\trole=\"group\"\n\t\t\t\t\t\tclass=\"absolute inset-e-1 flex items-center gap-0.5\"\n\t\t\t\t\t\tdata-testid=\"tree-actions\"\n\t\t\t\t\t\t[attr.aria-label]=\"actionsGroupLabel()\"\n\t\t\t\t\t\t[style.top.px]=\"selection.top\"\n\t\t\t\t\t\t(keydown.escape)=\"focusActionsRow()\"\n\t\t\t\t\t\t(focusin)=\"lockActions()\"\n\t\t\t\t\t\t(focusout)=\"releaseLock($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t[ngTemplateOutlet]=\"selection.template\"\n\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: selection.row.node, level: selection.row.level, expanded: selection.row.expanded }\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t} @else {\n\t\t\t<st-empty-state size=\"sm\" [illustration]=\"null\" [heading]=\"emptyText().heading\" [description]=\"emptyText().description\" />\n\t\t}\n\t`,\n})\nexport class TreeComponent<T = unknown> {\n\t/** Root nodes. Nodes nest to any depth through `children`. */\n\tnodes = input.required<TreeNode<T>[]>();\n\t/** Accessible name of the tree. Defaults to a translated \"Tree\"; name it for the screen reader user. */\n\tlabel = input<string>('');\n\t/** Accessible name of the node actions group, e.g. \"Actions for Delivery\". Defaults to a translated \"Actions for {label}\". */\n\tactionsLabel = input<string>('');\n\t/** Case-insensitive label filter. Matches keep their ancestors and expand them. */\n\tfilter = input<string>('');\n\t/** Heading of the empty state shown when there are no nodes. Defaults to a translated text. */\n\temptyHeading = input<string>('');\n\t/** Description of the empty state shown when there are no nodes. Defaults to a translated text. */\n\temptyDescription = input<string>('');\n\t/** Additional classes merged onto the host */\n\tclass = input<string>('');\n\n\t/** Id of the selected node, two-way with `[(selectedId)]`. */\n\tselectedId = model<string | null>(null);\n\t/** Ids of the expanded branches, two-way with `[(expandedIds)]`. Ignored while a filter is active. */\n\texpandedIds = model<string[]>([]);\n\n\tprivate readonly actionsTemplate = contentChild(TreeNodeActionsDirective);\n\tprivate readonly rowElements = viewChildren<ElementRef<HTMLElement>>('row');\n\tprivate readonly actionsElement = viewChild<ElementRef<HTMLElement>>('actions');\n\tprivate readonly translateLabel = injectLabelTranslator();\n\n\t/** @internal */\n\tprotected readonly indent = INDENT_PX;\n\t/** @internal */\n\tprotected readonly basePadding = BASE_PADDING_PX;\n\t/** @internal */\n\tprotected readonly rowHeight = ROW_HEIGHT_PX;\n\t/** @internal */\n\tprotected readonly rowGap = ROW_GAP_PX;\n\t/** @internal */\n\tprotected readonly icons = { expanded: matExpandMoreOutline, collapsed: matChevronRightOutline, branch: matLayersOutline, leaf: matTuneOutline };\n\n\t/** @internal */\n\tprotected readonly focusedId = signal<string | null>(null);\n\t/** @internal Measured width of the actions group, reserved as end padding on the row showing the actions. */\n\tprotected readonly actionsWidth = signal(0);\n\tprivate typeahead = { buffer: '', at: 0 };\n\n\tprivate readonly normalizedFilter = computed(() => this.filter().trim().toLowerCase());\n\t/** Branches collapsed by the user while filtering; a new filter starts with every match expanded again. */\n\tprivate readonly collapsedWhileFiltering = linkedSignal<string, string[]>({ source: this.normalizedFilter, computation: () => [] });\n\n\t/** @internal */\n\tprotected readonly hostClass = computed(() => cn('block', this.class()));\n\t/** @internal */\n\tprotected readonly hasActions = computed(() => !!this.actionsTemplate());\n\n\t/** Visible rows: expanded branches only, or every match plus its ancestors while filtering. */\n\treadonly rows = computed<TreeRow<T>[]>(() => {\n\t\tconst query = this.normalizedFilter();\n\t\tconst expanded = new Set(this.expandedIds());\n\t\tconst collapsed = new Set(this.collapsedWhileFiltering());\n\t\tconst rows: TreeRow<T>[] = [];\n\n\t\tconst matches = (node: TreeNode<T>): boolean => node.label.toLowerCase().includes(query) || (node.children ?? []).some(matches);\n\n\t\tconst visit = (nodes: TreeNode<T>[], level: number, parentId: string | null) => {\n\t\t\tconst visible = query ? nodes.filter(matches) : nodes;\n\t\t\tvisible.forEach((node, index) => {\n\t\t\t\tconst children = node.children ?? [];\n\t\t\t\tconst isExpanded = children.length > 0 && (query ? !collapsed.has(node.id) : expanded.has(node.id));\n\t\t\t\trows.push({ node, level, parentId, hasChildren: children.length > 0, expanded: isExpanded, posInSet: index + 1, setSize: visible.length });\n\t\t\t\tif (isExpanded) visit(children, level + 1, node.id);\n\t\t\t});\n\t\t};\n\n\t\tvisit(this.nodes(), 0, null);\n\t\treturn rows;\n\t});\n\n\t/** @internal The row holding the roving tab stop: last focused, else selected, else first. */\n\tprotected readonly focusId = computed(() => {\n\t\tconst ids = this.rows().map((row) => row.node.id);\n\t\tconst candidate = [this.focusedId(), this.selectedId()].find((id) => id && ids.includes(id));\n\t\treturn candidate ?? ids[0] ?? null;\n\t});\n\n\t/** @internal Row under the pointer. Hover shows its actions in addition to the selected row's. */\n\tprotected readonly hoveredId = signal<string | null>(null);\n\t/** @internal Node whose actions hold focus; the group stays on it whatever the pointer does. */\n\tprotected readonly lockedId = signal<string | null>(null);\n\n\t/** @internal The row whose actions show (focused group, else hovered, else selected) and where they sit; none when that row is not visible or no actions template is projected. */\n\tprotected readonly actionsRow = computed(() => {\n\t\tconst actions = this.actionsTemplate();\n\t\tif (!actions) return null;\n\t\tconst rows = this.rows();\n\t\tconst target = [this.lockedId(), this.hoveredId(), this.selectedId()].find((id) => id && rows.some((row) => row.node.id === id));\n\t\tconst index = rows.findIndex((row) => row.node.id === target);\n\t\tif (index < 0) return null;\n\t\treturn { row: rows[index], template: actions.template, top: index * (ROW_HEIGHT_PX + ROW_GAP_PX) + (ROW_HEIGHT_PX - ACTIONS_HEIGHT_PX) / 2 };\n\t});\n\n\t/** @internal */\n\tprotected readonly treeLabel = computed(() => this.label() || this.translateLabel({ key: 'sdk.tree.label', fallback: 'Tree' }));\n\n\t/** @internal */\n\tprotected readonly actionsGroupLabel = computed(() => {\n\t\tconst explicit = this.actionsLabel();\n\t\tif (explicit) return explicit;\n\t\tconst label = this.actionsRow()?.row.node.label ?? '';\n\t\treturn this.translateLabel({ key: 'sdk.tree.actions', fallback: 'Actions for {{label}}', params: { label } });\n\t});\n\n\t/** @internal */\n\tprotected readonly emptyText = computed(() => {\n\t\tconst filtering = this.normalizedFilter() !== '' && this.nodes().length > 0;\n\t\tconst heading = this.emptyHeading() || this.translateLabel(filtering ? NO_RESULTS_HEADING : EMPTY_HEADING);\n\t\tconst description = this.emptyDescription() || this.translateLabel(filtering ? NO_RESULTS_DESCRIPTION : EMPTY_DESCRIPTION);\n\t\treturn { heading, description };\n\t});\n\n\tconstructor() {\n\t\tafterRenderEffect(() => {\n\t\t\tconst group = this.actionsElement()?.nativeElement;\n\t\t\tthis.actionsWidth.set(group ? group.offsetWidth + BASE_PADDING_PX : 0);\n\t\t});\n\t}\n\n\t/** @internal */\n\tprotected rowClass(selected: boolean): string {\n\t\treturn cn(treeRow({ selected }));\n\t}\n\n\t/** @internal */\n\tprotected focusActionsRow(): void {\n\t\tconst id = this.actionsRow()?.row.node.id;\n\t\tif (id) this.focusRow(id);\n\t}\n\n\t/** @internal */\n\tprotected lockActions(): void {\n\t\tif (this.lockedId() === null) this.lockedId.set(this.actionsRow()?.row.node.id ?? null);\n\t}\n\n\t/** @internal Drops the lock unless focus is moving inside the actions group (between two action buttons, or from a row into it). */\n\tprotected releaseLock(event: FocusEvent): void {\n\t\tconst next = event.relatedTarget as Node | null;\n\t\tif (next && this.actionsElement()?.nativeElement.contains(next)) return;\n\t\tthis.lockedId.set(null);\n\t}\n\n\t/** @internal Tracks the hovered row; the actions group itself keeps the row it belongs to. */\n\tprotected onPointerOver(event: MouseEvent): void {\n\t\tconst target = event.target as HTMLElement | null;\n\t\tconst id = target?.closest<HTMLElement>('[role=\"treeitem\"]')?.dataset['nodeId'];\n\t\tif (id) this.hoveredId.set(id);\n\t}\n\n\t/** @internal */\n\tprotected onRowClick(row: TreeRow<T>, event: MouseEvent): void {\n\t\tconst onToggle = (event.target as HTMLElement | null)?.closest('[data-tree-toggle]');\n\t\tif (onToggle && row.hasChildren) {\n\t\t\tthis.setExpanded(row.node.id, !row.expanded);\n\t\t} else {\n\t\t\tthis.selectedId.set(row.node.id);\n\t\t}\n\t\tthis.focusedId.set(row.node.id);\n\t}\n\n\t/** @internal */\n\tprotected onKeydown(row: TreeRow<T>, event: KeyboardEvent): void {\n\t\tconst rows = this.rows();\n\t\tconst index = rows.findIndex((candidate) => candidate.node.id === row.node.id);\n\n\t\tswitch (event.key) {\n\t\t\tcase 'ArrowDown':\n\t\t\t\tthis.moveFocus(rows[index + 1]);\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowUp':\n\t\t\t\tthis.moveFocus(rows[index - 1]);\n\t\t\t\tbreak;\n\t\t\tcase 'Home':\n\t\t\t\tthis.moveFocus(rows[0]);\n\t\t\t\tbreak;\n\t\t\tcase 'End':\n\t\t\t\tthis.moveFocus(rows.at(-1));\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowRight':\n\t\t\t\tif (row.hasChildren && !row.expanded) this.setExpanded(row.node.id, true);\n\t\t\t\telse if (row.expanded) this.moveFocus(rows[index + 1]);\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowLeft':\n\t\t\t\tif (row.expanded) this.setExpanded(row.node.id, false);\n\t\t\t\telse this.moveFocus(rows.find((candidate) => candidate.node.id === row.parentId));\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tthis.expandSiblings(rows, row);\n\t\t\t\tbreak;\n\t\t\tcase 'Tab':\n\t\t\t\tthis.lockSelectedActions(event);\n\t\t\t\treturn;\n\t\t\tcase 'Enter':\n\t\t\t\tthis.selectedId.set(row.node.id);\n\t\t\t\tbreak;\n\t\t\tcase ' ':\n\t\t\t\tif (this.typeaheadActive()) this.typeaheadMove(rows, index, event);\n\t\t\t\telse this.selectedId.set(row.node.id);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (!this.typeaheadMove(rows, index, event)) return;\n\t\t}\n\t\tevent.preventDefault();\n\t}\n\n\t/** Keyboard path wins while focus is in the tree: Tab goes to the actions of the selected node, whatever row the pointer rests on. */\n\tprivate lockSelectedActions(event: KeyboardEvent): void {\n\t\tconst selected = this.selectedId();\n\t\tif (event.shiftKey || !selected || !this.rows().some((row) => row.node.id === selected)) return;\n\t\tthis.lockedId.set(selected);\n\t}\n\n\tprivate typeaheadActive(): boolean {\n\t\treturn this.typeahead.buffer !== '' && Date.now() - this.typeahead.at <= TYPEAHEAD_RESET_MS;\n\t}\n\n\t/** APG `*`: expands every collapsed branch among the siblings of the focused row. */\n\tprivate expandSiblings(rows: TreeRow<T>[], row: TreeRow<T>): void {\n\t\tconst ids = rows\n\t\t\t.filter((candidate) => candidate.parentId === row.parentId && candidate.hasChildren && !candidate.expanded)\n\t\t\t.map((candidate) => candidate.node.id);\n\t\tif (ids.length === 0) return;\n\t\tif (this.normalizedFilter()) {\n\t\t\tthis.collapsedWhileFiltering.set(this.collapsedWhileFiltering().filter((id) => !ids.includes(id)));\n\t\t\treturn;\n\t\t}\n\t\tthis.expandedIds.set([...this.expandedIds().filter((id) => !ids.includes(id)), ...ids]);\n\t}\n\n\t/** Moves focus to the next row whose label starts with the typed characters. Returns whether the key was a type-ahead character. */\n\tprivate typeaheadMove(rows: TreeRow<T>[], index: number, event: KeyboardEvent): boolean {\n\t\tif (event.key.length !== 1 || event.ctrlKey || event.metaKey || event.altKey) return false;\n\t\tconst now = Date.now();\n\t\tconst continuing = now - this.typeahead.at <= TYPEAHEAD_RESET_MS;\n\t\tconst buffer = (continuing ? this.typeahead.buffer : '') + event.key.toLowerCase();\n\t\tthis.typeahead = { buffer, at: now };\n\n\t\tconst start = buffer.length === 1 ? index + 1 : index;\n\t\tconst ordered = [...rows.slice(start), ...rows.slice(0, start)];\n\t\tthis.moveFocus(ordered.find((candidate) => candidate.node.label.toLowerCase().startsWith(buffer)));\n\t\treturn true;\n\t}\n\n\tprivate setExpanded(id: string, expanded: boolean): void {\n\t\tif (this.normalizedFilter()) {\n\t\t\tconst others = this.collapsedWhileFiltering().filter((candidate) => candidate !== id);\n\t\t\tthis.collapsedWhileFiltering.set(expanded ? others : [...others, id]);\n\t\t\treturn;\n\t\t}\n\t\tconst others = this.expandedIds().filter((candidate) => candidate !== id);\n\t\tthis.expandedIds.set(expanded ? [...others, id] : others);\n\t}\n\n\tprivate moveFocus(row: TreeRow<T> | undefined): void {\n\t\tif (!row) return;\n\t\tthis.focusedId.set(row.node.id);\n\t\tthis.focusRow(row.node.id);\n\t}\n\n\tprivate focusRow(id: string): void {\n\t\tthis.rowElements()\n\t\t\t.find((element) => element.nativeElement.dataset['nodeId'] === id)\n\t\t\t?.nativeElement.focus();\n\t}\n}\n\nconst EMPTY_HEADING = { key: 'sdk.tree.empty', fallback: 'Nothing here yet' };\nconst EMPTY_DESCRIPTION = { key: 'sdk.tree.emptyDescription', fallback: 'There are no items to show.' };\nconst NO_RESULTS_HEADING = { key: 'sdk.tree.noResults', fallback: 'No matches' };\nconst NO_RESULTS_DESCRIPTION = { key: 'sdk.tree.noResultsDescription', fallback: 'No item matches the filter.' };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAiDA;;;;;;;;;;;;;AAaG;MAEU,wBAAwB,CAAA;AAC3B,IAAA,QAAQ,GAAG,MAAM,CAAyC,WAAW,CAAC;AAE/E,IAAA,OAAO,sBAAsB,CAAI,UAAuC,EAAE,QAAiB,EAAA;AAC1F,QAAA,OAAO,IAAI;IACZ;wGALY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,SAAS;mBAAC,EAAE,QAAQ,EAAE,gCAAgC,EAAE;;AAoBzD,MAAM,SAAS,GAAG,EAAE;AACpB,MAAM,eAAe,GAAG,CAAC;AACzB,MAAM,aAAa,GAAG,EAAE;AACxB,MAAM,UAAU,GAAG,CAAC;AACpB,MAAM,iBAAiB,GAAG,EAAE;AAC5B,MAAM,kBAAkB,GAAG,GAAG;AAE9B;;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