@aeris-ui/core 22.0.0-alpha.10 → 22.0.0-alpha.12

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 (260) hide show
  1. package/README.md +35 -3
  2. package/THIRD_PARTY_LICENSES.md +48 -0
  3. package/fesm2022/aeris-ui-core-accordion.mjs +34 -32
  4. package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
  5. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +3 -3
  6. package/fesm2022/aeris-ui-core-auto-complete.mjs +119 -50
  7. package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
  8. package/fesm2022/aeris-ui-core-auto-focus.mjs +3 -3
  9. package/fesm2022/aeris-ui-core-avatar.mjs +6 -6
  10. package/fesm2022/aeris-ui-core-badge.mjs +6 -6
  11. package/fesm2022/aeris-ui-core-block-ui.mjs +18 -6
  12. package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
  13. package/fesm2022/aeris-ui-core-breadcrumb.mjs +42 -24
  14. package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
  15. package/fesm2022/aeris-ui-core-button-forms.mjs +78 -0
  16. package/fesm2022/aeris-ui-core-button-forms.mjs.map +1 -0
  17. package/fesm2022/aeris-ui-core-button-group.mjs +417 -14
  18. package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
  19. package/fesm2022/aeris-ui-core-button.mjs +191 -19
  20. package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
  21. package/fesm2022/aeris-ui-core-card.mjs +18 -18
  22. package/fesm2022/aeris-ui-core-carousel.mjs +81 -19
  23. package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
  24. package/fesm2022/aeris-ui-core-cascade-select.mjs +165 -46
  25. package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
  26. package/fesm2022/aeris-ui-core-chart.mjs +171 -36
  27. package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
  28. package/fesm2022/aeris-ui-core-checkbox.mjs +191 -22
  29. package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
  30. package/fesm2022/aeris-ui-core-chip.mjs +702 -27
  31. package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
  32. package/fesm2022/aeris-ui-core-class-names.mjs +3 -3
  33. package/fesm2022/aeris-ui-core-code-block.mjs +57 -7
  34. package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -1
  35. package/fesm2022/aeris-ui-core-color-picker.mjs +1223 -503
  36. package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
  37. package/fesm2022/aeris-ui-core-command-palette.mjs +996 -0
  38. package/fesm2022/aeris-ui-core-command-palette.mjs.map +1 -0
  39. package/fesm2022/aeris-ui-core-compare.mjs +61 -34
  40. package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
  41. package/fesm2022/aeris-ui-core-confirm-dialog.mjs +68 -38
  42. package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
  43. package/fesm2022/aeris-ui-core-confirm-popup.mjs +46 -38
  44. package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
  45. package/fesm2022/aeris-ui-core-context-menu.mjs +94 -43
  46. package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
  47. package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-66V2U8rC.mjs +946 -0
  48. package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-66V2U8rC.mjs.map +1 -0
  49. package/fesm2022/aeris-ui-core-date-picker.mjs +1186 -650
  50. package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
  51. package/fesm2022/aeris-ui-core-dialog.mjs +157 -71
  52. package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
  53. package/fesm2022/aeris-ui-core-divider.mjs +3 -3
  54. package/fesm2022/aeris-ui-core-drawer.mjs +751 -77
  55. package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
  56. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +14 -6
  57. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
  58. package/fesm2022/aeris-ui-core-editor.mjs +847 -202
  59. package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
  60. package/fesm2022/aeris-ui-core-file-upload.mjs +204 -68
  61. package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
  62. package/fesm2022/aeris-ui-core-filter-service.mjs +3 -3
  63. package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
  64. package/fesm2022/aeris-ui-core-fluid.mjs +5 -5
  65. package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
  66. package/fesm2022/aeris-ui-core-focus-trap.mjs +3 -3
  67. package/fesm2022/aeris-ui-core-form-field.mjs +15 -15
  68. package/fesm2022/aeris-ui-core-galleria.mjs +472 -123
  69. package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
  70. package/fesm2022/aeris-ui-core-glass.mjs +3 -3
  71. package/fesm2022/aeris-ui-core-icon-field.mjs +12 -12
  72. package/fesm2022/aeris-ui-core-inplace.mjs +56 -14
  73. package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
  74. package/fesm2022/aeris-ui-core-input-group.mjs +17 -17
  75. package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
  76. package/fesm2022/aeris-ui-core-input-mask.mjs +61 -8
  77. package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
  78. package/fesm2022/aeris-ui-core-input-number.mjs +191 -28
  79. package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
  80. package/fesm2022/aeris-ui-core-input-otp.mjs +6 -6
  81. package/fesm2022/aeris-ui-core-input-text.mjs +102 -26
  82. package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
  83. package/fesm2022/aeris-ui-core-kbd.mjs +243 -0
  84. package/fesm2022/aeris-ui-core-kbd.mjs.map +1 -0
  85. package/fesm2022/aeris-ui-core-key-filter.mjs +3 -3
  86. package/fesm2022/aeris-ui-core-listbox.mjs +789 -0
  87. package/fesm2022/aeris-ui-core-listbox.mjs.map +1 -0
  88. package/fesm2022/aeris-ui-core-mega-menu.mjs +59 -16
  89. package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
  90. package/fesm2022/aeris-ui-core-menu.mjs +95 -52
  91. package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
  92. package/fesm2022/aeris-ui-core-menubar.mjs +103 -34
  93. package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
  94. package/fesm2022/aeris-ui-core-message.mjs +48 -14
  95. package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
  96. package/fesm2022/aeris-ui-core-meter-group.mjs +33 -15
  97. package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
  98. package/fesm2022/aeris-ui-core-multi-select.mjs +283 -65
  99. package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
  100. package/fesm2022/aeris-ui-core-navbar.mjs +1407 -0
  101. package/fesm2022/aeris-ui-core-navbar.mjs.map +1 -0
  102. package/fesm2022/aeris-ui-core-order-list.mjs +191 -35
  103. package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
  104. package/fesm2022/aeris-ui-core-organization-chart.mjs +48 -14
  105. package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
  106. package/fesm2022/aeris-ui-core-paginator.mjs +300 -61
  107. package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
  108. package/fesm2022/aeris-ui-core-panel.mjs +21 -29
  109. package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
  110. package/fesm2022/aeris-ui-core-password.mjs +166 -65
  111. package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
  112. package/fesm2022/aeris-ui-core-pick-list.mjs +528 -56
  113. package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
  114. package/fesm2022/aeris-ui-core-popover.mjs +504 -72
  115. package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
  116. package/fesm2022/aeris-ui-core-progress-bar.mjs +75 -21
  117. package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
  118. package/fesm2022/aeris-ui-core-progress-spinner.mjs +24 -6
  119. package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
  120. package/fesm2022/aeris-ui-core-radio-button.mjs +119 -19
  121. package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
  122. package/fesm2022/aeris-ui-core-rating.mjs +6 -6
  123. package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
  124. package/fesm2022/aeris-ui-core-scroll-panel.mjs +3 -3
  125. package/fesm2022/aeris-ui-core-scroll-top.mjs +59 -12
  126. package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
  127. package/fesm2022/aeris-ui-core-select-native.mjs +145 -0
  128. package/fesm2022/aeris-ui-core-select-native.mjs.map +1 -0
  129. package/fesm2022/aeris-ui-core-select.mjs +206 -87
  130. package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
  131. package/fesm2022/aeris-ui-core-sidebar.mjs +1293 -0
  132. package/fesm2022/aeris-ui-core-sidebar.mjs.map +1 -0
  133. package/fesm2022/aeris-ui-core-skeleton.mjs +3 -3
  134. package/fesm2022/aeris-ui-core-slider.mjs +3 -3
  135. package/fesm2022/aeris-ui-core-speed-dial.mjs +34 -13
  136. package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
  137. package/fesm2022/aeris-ui-core-split-button.mjs +26 -11
  138. package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
  139. package/fesm2022/aeris-ui-core-splitter.mjs +35 -20
  140. package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
  141. package/fesm2022/aeris-ui-core-stepper.mjs +23 -17
  142. package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
  143. package/fesm2022/aeris-ui-core-style-class.mjs +3 -3
  144. package/fesm2022/aeris-ui-core-table.mjs +945 -106
  145. package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
  146. package/fesm2022/aeris-ui-core-tabs.mjs +81 -19
  147. package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
  148. package/fesm2022/aeris-ui-core-textarea.mjs +89 -28
  149. package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
  150. package/fesm2022/aeris-ui-core-theme-builder.mjs +202 -126
  151. package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
  152. package/fesm2022/aeris-ui-core-theming.mjs +8 -8
  153. package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
  154. package/fesm2022/aeris-ui-core-tiered-menu.mjs +94 -43
  155. package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
  156. package/fesm2022/aeris-ui-core-timeline.mjs +17 -17
  157. package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
  158. package/fesm2022/aeris-ui-core-toast.mjs +73 -44
  159. package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
  160. package/fesm2022/aeris-ui-core-toggle-switch.mjs +3 -3
  161. package/fesm2022/aeris-ui-core-toolbar.mjs +916 -44
  162. package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
  163. package/fesm2022/aeris-ui-core-tooltip.mjs +6 -6
  164. package/fesm2022/aeris-ui-core-tree-select.mjs +252 -61
  165. package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
  166. package/fesm2022/aeris-ui-core-tree-table.mjs +493 -124
  167. package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
  168. package/fesm2022/aeris-ui-core-tree.mjs +165 -27
  169. package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
  170. package/fesm2022/aeris-ui-core.mjs +632 -12
  171. package/fesm2022/aeris-ui-core.mjs.map +1 -1
  172. package/package.json +29 -1
  173. package/schematics/runtime/theme-builder/aeris-color-derivation.js +1 -1
  174. package/schematics/runtime/theme-builder/aeris-contrast.js +32 -0
  175. package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
  176. package/schematics/runtime/theme-builder/aeris-foundation.js +8 -9
  177. package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
  178. package/schematics/runtime/theme-builder/aeris-semantic-tones.js +8 -21
  179. package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
  180. package/schematics/runtime/theme-builder/aeris-theme-generator.js +6 -0
  181. package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
  182. package/schematics/runtime/theme-builder/aeris-theme-resolver.js +64 -91
  183. package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
  184. package/schematics/runtime/theme-builder/aeris-theme-tokens.js +7 -5
  185. package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
  186. package/schematics/runtime/theme-builder/aeris-theme-validation.js +11 -1
  187. package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
  188. package/schematics/runtime/theme-builder/aeris-theme.js +81 -10
  189. package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
  190. package/styles/_choice-card.scss +93 -0
  191. package/styles/_icon-artwork.scss +14 -0
  192. package/styles/_icon-template.scss +42 -0
  193. package/styles/_selection-icons.scss +12 -0
  194. package/styles/_table-pinning.scss +119 -0
  195. package/styles/aeris.css +35 -12
  196. package/styles/controls.css +149 -11
  197. package/tools/aeris-theme.mjs +3 -3
  198. package/tools/aeris-theme.schema.json +13 -11
  199. package/types/aeris-ui-core-auto-complete.d.ts +12 -0
  200. package/types/aeris-ui-core-block-ui.d.ts +1 -0
  201. package/types/aeris-ui-core-button-forms.d.ts +18 -0
  202. package/types/aeris-ui-core-button-group.d.ts +116 -3
  203. package/types/aeris-ui-core-button.d.ts +52 -4
  204. package/types/aeris-ui-core-carousel.d.ts +12 -0
  205. package/types/aeris-ui-core-cascade-select.d.ts +18 -0
  206. package/types/aeris-ui-core-chart.d.ts +26 -10
  207. package/types/aeris-ui-core-checkbox.d.ts +36 -2
  208. package/types/aeris-ui-core-chip.d.ts +196 -1
  209. package/types/aeris-ui-core-code-block.d.ts +13 -4
  210. package/types/aeris-ui-core-color-picker.d.ts +117 -15
  211. package/types/aeris-ui-core-command-palette.d.ts +267 -0
  212. package/types/aeris-ui-core-compare.d.ts +6 -0
  213. package/types/aeris-ui-core-confirm-dialog.d.ts +9 -1
  214. package/types/aeris-ui-core-context-menu.d.ts +6 -0
  215. package/types/aeris-ui-core-date-picker.d.ts +90 -20
  216. package/types/aeris-ui-core-dialog.d.ts +15 -2
  217. package/types/aeris-ui-core-drawer.d.ts +105 -4
  218. package/types/aeris-ui-core-dynamic-dialog.d.ts +6 -2
  219. package/types/aeris-ui-core-editor.d.ts +8 -1
  220. package/types/aeris-ui-core-file-upload.d.ts +18 -0
  221. package/types/aeris-ui-core-galleria.d.ts +48 -0
  222. package/types/aeris-ui-core-inplace.d.ts +6 -0
  223. package/types/aeris-ui-core-input-mask.d.ts +8 -1
  224. package/types/aeris-ui-core-input-number.d.ts +20 -1
  225. package/types/aeris-ui-core-input-text.d.ts +11 -1
  226. package/types/aeris-ui-core-kbd.d.ts +74 -0
  227. package/types/aeris-ui-core-listbox.d.ts +222 -0
  228. package/types/aeris-ui-core-mega-menu.d.ts +6 -0
  229. package/types/aeris-ui-core-menu.d.ts +6 -0
  230. package/types/aeris-ui-core-menubar.d.ts +16 -0
  231. package/types/aeris-ui-core-message.d.ts +6 -0
  232. package/types/aeris-ui-core-meter-group.d.ts +6 -0
  233. package/types/aeris-ui-core-multi-select.d.ts +30 -0
  234. package/types/aeris-ui-core-navbar.d.ts +208 -0
  235. package/types/aeris-ui-core-order-list.d.ts +24 -0
  236. package/types/aeris-ui-core-organization-chart.d.ts +6 -0
  237. package/types/aeris-ui-core-paginator.d.ts +37 -1
  238. package/types/aeris-ui-core-password.d.ts +18 -0
  239. package/types/aeris-ui-core-pick-list.d.ts +54 -0
  240. package/types/aeris-ui-core-popover.d.ts +80 -5
  241. package/types/aeris-ui-core-progress-bar.d.ts +6 -0
  242. package/types/aeris-ui-core-progress-spinner.d.ts +6 -0
  243. package/types/aeris-ui-core-radio-button.d.ts +24 -2
  244. package/types/aeris-ui-core-rating.d.ts +1 -1
  245. package/types/aeris-ui-core-scroll-top.d.ts +7 -0
  246. package/types/aeris-ui-core-select-native.d.ts +40 -0
  247. package/types/aeris-ui-core-select.d.ts +12 -0
  248. package/types/aeris-ui-core-sidebar.d.ts +220 -0
  249. package/types/aeris-ui-core-splitter.d.ts +3 -4
  250. package/types/aeris-ui-core-table.d.ts +144 -11
  251. package/types/aeris-ui-core-tabs.d.ts +12 -0
  252. package/types/aeris-ui-core-textarea.d.ts +11 -1
  253. package/types/aeris-ui-core-theme-builder.d.ts +31 -296
  254. package/types/aeris-ui-core-tiered-menu.d.ts +6 -0
  255. package/types/aeris-ui-core-toast.d.ts +8 -2
  256. package/types/aeris-ui-core-toolbar.d.ts +213 -3
  257. package/types/aeris-ui-core-tree-select.d.ts +30 -0
  258. package/types/aeris-ui-core-tree-table.d.ts +75 -14
  259. package/types/aeris-ui-core-tree.d.ts +24 -0
  260. package/types/aeris-ui-core.d.ts +140 -3
@@ -1 +1 @@
1
- {"version":3,"file":"aeris-ui-core-tree.mjs","names":[],"sources":["../../../projects/aeris-ui/tree/aeris-tree.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n Directive,\n DestroyRef,\n ElementRef,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n viewChildren,\n} from '@angular/core';\n\nexport type AerisTreeSelectionMode = 'single' | 'multiple' | 'checkbox';\nexport type AerisTreeDropPosition = 'before' | 'inside' | 'after';\n\nexport interface AerisTreeNode<TData = unknown> {\n readonly key: string;\n readonly label: string;\n readonly children?: readonly AerisTreeNode<TData>[];\n readonly data?: TData;\n readonly leaf?: boolean;\n readonly disabled?: boolean;\n readonly selectable?: boolean;\n readonly draggable?: boolean;\n readonly droppable?: boolean;\n}\n\nexport interface AerisTreeNodeEvent<TData = unknown> {\n readonly originalEvent: Event;\n readonly node: AerisTreeNode<TData>;\n readonly key: string;\n}\n\nexport interface AerisTreeSelectionEvent<TData = unknown> extends AerisTreeNodeEvent<TData> {\n readonly selected: boolean;\n readonly selectedKeys: readonly string[];\n}\n\nexport interface AerisTreeFilterEvent {\n readonly originalEvent: Event;\n readonly value: string;\n}\n\nexport interface AerisTreeDropEvent<TData = unknown> {\n readonly originalEvent: Event;\n readonly node: AerisTreeNode<TData>;\n readonly key: string;\n readonly target: AerisTreeNode<TData>;\n readonly targetKey: string;\n readonly position: AerisTreeDropPosition;\n readonly value: readonly AerisTreeNode<TData>[];\n}\n\nexport interface AerisTreeNodeContext<TData = unknown> {\n readonly $implicit: AerisTreeNode<TData>;\n readonly node: AerisTreeNode<TData>;\n readonly key: string;\n readonly level: number;\n readonly selected: boolean;\n readonly partial: boolean;\n readonly expanded: boolean;\n readonly leaf: boolean;\n readonly active: boolean;\n readonly loading: boolean;\n readonly dragging: boolean;\n readonly dropPosition: AerisTreeDropPosition | null;\n}\n\ninterface TreeStructureEntry<TData> {\n readonly node: AerisTreeNode<TData>;\n readonly key: string;\n readonly level: number;\n readonly parentKey: string | null;\n readonly position: number;\n readonly setSize: number;\n readonly expanded: boolean;\n readonly expandable: boolean;\n}\n\ninterface TreeSelectionState {\n readonly selected: boolean;\n readonly partial: boolean;\n}\n\ninterface TreeRenderedEntry<TData> extends TreeStructureEntry<TData> {\n readonly id: string;\n readonly active: boolean;\n readonly disabled: boolean;\n readonly selected: boolean;\n readonly partial: boolean;\n readonly loading: boolean;\n readonly draggable: boolean;\n readonly dragging: boolean;\n readonly dropPosition: AerisTreeDropPosition | null;\n readonly tabIndex: 0 | -1;\n readonly context: AerisTreeNodeContext<TData>;\n}\n\n@Directive({ selector: 'ng-template[aerisTreeNode]' })\nexport class AerisTreeNodeTemplate<TData = unknown> {\n readonly template = inject<TemplateRef<AerisTreeNodeContext<TData>>>(TemplateRef);\n\n static ngTemplateContextGuard<TData>(\n _directive: AerisTreeNodeTemplate<TData>,\n context: unknown,\n ): context is AerisTreeNodeContext<TData> {\n return true;\n }\n}\n\n@Directive({ selector: 'ng-template[aerisTreeEmpty]' })\nexport class AerisTreeEmptyTemplate {\n readonly template = inject<TemplateRef<void>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[aerisTreeLoading]' })\nexport class AerisTreeLoadingTemplate {\n readonly template = inject<TemplateRef<void>>(TemplateRef);\n}\n\nlet treeId = 0;\n\n@Component({\n selector: 'aeris-tree',\n imports: [NgTemplateOutlet],\n template: `\n <div\n class=\"aeris-tree\"\n [attr.data-disabled]=\"disabled() || null\"\n [attr.data-fluid]=\"fluid() || null\"\n [attr.aria-busy]=\"loading() || null\"\n >\n @if (filter()) {\n <div class=\"aeris-tree__filter-wrap\">\n <span class=\"aeris-tree__search\" aria-hidden=\"true\"></span>\n <input\n #filterInput\n class=\"aeris-tree__filter\"\n type=\"search\"\n autocomplete=\"off\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder()\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"resolvedTreeId\"\n [disabled]=\"disabled()\"\n (input)=\"handleFilterInput($event)\"\n (keydown)=\"handleFilterKeydown($event)\"\n />\n @if (filterValue() && !disabled()) {\n <button\n class=\"aeris-tree__filter-clear\"\n type=\"button\"\n [attr.aria-label]=\"filterClearAriaLabel()\"\n (click)=\"clearFilter($event)\"\n >\n <span aria-hidden=\"true\"></span>\n </button>\n }\n </div>\n }\n\n @if (loading()) {\n <div class=\"aeris-tree__message\" role=\"status\">\n @if (loadingTemplate(); as customLoading) {\n <ng-container [ngTemplateOutlet]=\"customLoading.template\" />\n } @else {\n <span class=\"aeris-tree__spinner\" aria-hidden=\"true\"></span>\n {{ loadingMessage() }}\n }\n </div>\n } @else if (renderedNodes().length) {\n @if (dragDrop()) {\n <p class=\"aeris-tree__visually-hidden\" [id]=\"dragHelpId\">\n Reorder the focused node with Alt plus Arrow Up or Arrow Down. Use Alt plus Arrow Right\n to move it into the previous branch, or Alt plus Arrow Left to move it out of its\n parent.\n </p>\n }\n <div\n class=\"aeris-tree__items\"\n role=\"tree\"\n [id]=\"resolvedTreeId\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-describedby]=\"dragDrop() ? dragHelpId : null\"\n [attr.aria-multiselectable]=\"\n selectionMode() === 'multiple' || selectionMode() === 'checkbox' ? true : null\n \"\n >\n @for (entry of renderedNodes(); track entry.key) {\n <div\n #treeItem\n class=\"aeris-tree__node\"\n animate.enter=\"aeris-tree__node--enter\"\n animate.leave=\"aeris-tree__node--leave\"\n role=\"treeitem\"\n [id]=\"entry.id\"\n [attr.tabindex]=\"entry.tabIndex\"\n [attr.data-tree-key]=\"entry.key\"\n [attr.data-active]=\"entry.active || null\"\n [attr.data-selected]=\"entry.selected || null\"\n [attr.data-disabled]=\"entry.disabled || null\"\n [attr.data-loading]=\"entry.loading || null\"\n [attr.data-dragging]=\"entry.dragging || null\"\n [attr.data-drop-position]=\"entry.dropPosition\"\n [draggable]=\"entry.draggable\"\n [attr.aria-level]=\"entry.level\"\n [attr.aria-posinset]=\"entry.position\"\n [attr.aria-setsize]=\"entry.setSize\"\n [attr.aria-expanded]=\"entry.expandable ? entry.expanded : null\"\n [attr.aria-selected]=\"\n selectionMode() && selectionMode() !== 'checkbox' ? entry.selected : null\n \"\n [attr.aria-checked]=\"\n selectionMode() === 'checkbox' ? (entry.partial ? 'mixed' : entry.selected) : null\n \"\n [attr.aria-disabled]=\"entry.disabled || null\"\n [attr.aria-busy]=\"entry.loading || null\"\n [style.--aeris-tree-level]=\"entry.level - 1\"\n (click)=\"handleNodeClick($event, entry)\"\n (focus)=\"activate(entry.key)\"\n (keydown)=\"handleNodeKeydown($event, entry)\"\n (dragstart)=\"handleDragStart($event, entry)\"\n (dragover)=\"handleDragOver($event, entry)\"\n (dragleave)=\"handleDragLeave($event, entry)\"\n (drop)=\"handleDrop($event, entry)\"\n (dragend)=\"handleDragEnd()\"\n >\n <span\n class=\"aeris-tree__toggle\"\n [attr.data-expandable]=\"entry.expandable || null\"\n [attr.data-expanded]=\"entry.expanded || null\"\n aria-hidden=\"true\"\n >\n @if (entry.loading) {\n <span class=\"aeris-tree__spinner\"></span>\n } @else {\n <span class=\"aeris-tree__chevron\"></span>\n }\n </span>\n\n @if (selectionMode() === 'checkbox') {\n <span\n class=\"aeris-tree__box\"\n [attr.data-checked]=\"entry.selected || null\"\n [attr.data-mixed]=\"entry.partial || null\"\n aria-hidden=\"true\"\n ><span></span\n ></span>\n }\n\n <span class=\"aeris-tree__content\">\n @if (nodeTemplate(); as customNode) {\n <ng-container\n [ngTemplateOutlet]=\"customNode.template\"\n [ngTemplateOutletContext]=\"entry.context\"\n />\n } @else {\n {{ entry.node.label }}\n }\n </span>\n </div>\n }\n </div>\n @if (dragDrop()) {\n <p class=\"aeris-tree__visually-hidden\" aria-live=\"polite\">\n {{ dragAnnouncement() }}\n </p>\n }\n } @else {\n <div class=\"aeris-tree__message\" role=\"status\">\n @if (emptyTemplate(); as customEmpty) {\n <ng-container [ngTemplateOutlet]=\"customEmpty.template\" />\n } @else {\n {{ filterValue() ? emptyFilterMessage() : emptyMessage() }}\n }\n </div>\n }\n </div>\n `,\n styleUrl: './aeris-tree.scss',\n})\nexport class AerisTree<TData = unknown> {\n private readonly destroyRef = inject(DestroyRef);\n readonly value = model<readonly AerisTreeNode<TData>[]>([]);\n readonly selectionMode = input<AerisTreeSelectionMode | null>(null);\n readonly selectionKeys = model<readonly string[]>([]);\n readonly expandedKeys = model<readonly string[]>([]);\n readonly filterValue = model('');\n readonly filter = input(false, { transform: booleanAttribute });\n readonly propagateSelection = input(true, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly fluid = input(true, { transform: booleanAttribute });\n readonly loading = input(false, { transform: booleanAttribute });\n readonly loadingKeys = input<readonly string[]>([]);\n readonly dragDrop = input(false, { transform: booleanAttribute });\n readonly ariaLabel = input('Tree');\n readonly filterPlaceholder = input('Search tree');\n readonly filterAriaLabel = input('Search tree');\n readonly filterClearAriaLabel = input('Clear search');\n readonly emptyMessage = input('No tree nodes available');\n readonly emptyFilterMessage = input('No matching nodes');\n readonly loadingMessage = input('Loading tree');\n\n readonly selectionChanged = output<AerisTreeSelectionEvent<TData>>();\n readonly nodeSelected = output<AerisTreeSelectionEvent<TData>>();\n readonly nodeUnselected = output<AerisTreeSelectionEvent<TData>>();\n readonly nodeExpanded = output<AerisTreeNodeEvent<TData>>();\n readonly nodeCollapsed = output<AerisTreeNodeEvent<TData>>();\n readonly filterChanged = output<AerisTreeFilterEvent>();\n readonly nodeDropped = output<AerisTreeDropEvent<TData>>();\n\n protected readonly nodeTemplate = contentChild(AerisTreeNodeTemplate<TData>);\n protected readonly emptyTemplate = contentChild(AerisTreeEmptyTemplate);\n protected readonly loadingTemplate = contentChild(AerisTreeLoadingTemplate);\n private readonly treeItems = viewChildren<ElementRef<HTMLElement>>('treeItem');\n private readonly filterInput = viewChild<ElementRef<HTMLInputElement>>('filterInput');\n private readonly activeKey = signal<string | null>(null);\n private readonly draggingKey = signal<string | null>(null);\n private readonly dropTarget = signal<{\n readonly key: string;\n readonly position: AerisTreeDropPosition;\n } | null>(null);\n protected readonly dragAnnouncement = signal('');\n protected readonly resolvedTreeId = `aeris-tree-${++treeId}`;\n protected readonly dragHelpId = `${this.resolvedTreeId}-drag-help`;\n\n private readonly structure = computed(() =>\n this.buildStructure(this.value(), this.filterValue().trim().toLocaleLowerCase()),\n );\n private readonly resolvedActiveKey = computed(() => {\n const nodes = this.structure();\n const activeKey = this.activeKey();\n return nodes.some((entry) => entry.key === activeKey) ? activeKey : (nodes[0]?.key ?? null);\n });\n private readonly selectionStates = computed(() => this.buildSelectionStates(this.value()));\n protected readonly renderedNodes = computed<readonly TreeRenderedEntry<TData>[]>(() => {\n const activeKey = this.resolvedActiveKey();\n const selectionStates = this.selectionStates();\n const loadingKeys = new Set(this.loadingKeys());\n\n return this.structure().map((entry, index) => {\n const state = selectionStates.get(entry.key) ?? { selected: false, partial: false };\n const active = entry.key === activeKey;\n const loading = loadingKeys.has(entry.key);\n const dragging = this.draggingKey() === entry.key;\n const dropPosition =\n this.dropTarget()?.key === entry.key ? (this.dropTarget()?.position ?? null) : null;\n const context: AerisTreeNodeContext<TData> = {\n $implicit: entry.node,\n node: entry.node,\n key: entry.key,\n level: entry.level,\n selected: state.selected,\n partial: state.partial,\n expanded: entry.expanded,\n leaf: !entry.expandable,\n active,\n loading,\n dragging,\n dropPosition,\n };\n\n return {\n ...entry,\n id: `${this.resolvedTreeId}-node-${index}`,\n active,\n disabled: this.disabled() || entry.node.disabled === true,\n selected: state.selected,\n partial: state.partial,\n loading,\n draggable:\n this.dragDrop() &&\n !this.disabled() &&\n entry.node.disabled !== true &&\n entry.node.draggable !== false,\n dragging,\n dropPosition,\n tabIndex: active && !this.disabled() ? 0 : -1,\n context,\n };\n });\n });\n\n private typeahead = '';\n private typeaheadTimer: ReturnType<typeof setTimeout> | undefined;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n if (this.typeaheadTimer) clearTimeout(this.typeaheadTimer);\n });\n }\n\n public focus(key?: string): void {\n const targetKey = key ?? this.resolvedActiveKey();\n if (!targetKey || this.disabled()) return;\n this.activeKey.set(targetKey);\n this.focusKey(targetKey);\n }\n\n public expandAll(): void {\n this.expandedKeys.set(this.collectExpandableKeys(this.value()));\n }\n\n public collapseAll(): void {\n this.expandedKeys.set([]);\n }\n\n protected activate(key: string): void {\n this.activeKey.set(key);\n }\n\n protected handleFilterInput(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.filterValue.set(value);\n this.filterChanged.emit({ originalEvent: event, value });\n }\n\n protected clearFilter(event: Event): void {\n this.filterValue.set('');\n this.filterChanged.emit({ originalEvent: event, value: '' });\n queueMicrotask(() => this.filterInput()?.nativeElement.focus());\n }\n\n protected handleFilterKeydown(event: KeyboardEvent): void {\n if (event.key !== 'ArrowDown' || !this.renderedNodes().length) return;\n event.preventDefault();\n this.focus(this.renderedNodes()[0]?.key);\n }\n\n protected handleNodeClick(event: MouseEvent, entry: TreeRenderedEntry<TData>): void {\n this.activeKey.set(entry.key);\n (event.currentTarget as HTMLElement).focus();\n if (entry.disabled) return;\n\n if ((event.target as HTMLElement).closest('.aeris-tree__toggle') && entry.expandable) {\n this.toggleExpansion(entry, event);\n return;\n }\n if (this.selectionMode() && entry.node.selectable !== false) {\n this.toggleSelection(entry, event);\n }\n }\n\n protected handleNodeKeydown(event: KeyboardEvent, entry: TreeRenderedEntry<TData>): void {\n const nodes = this.renderedNodes();\n const index = nodes.findIndex((node) => node.key === entry.key);\n\n if (event.altKey && this.dragDrop() && !entry.disabled && entry.node.draggable !== false) {\n if (this.handleKeyboardMove(event, entry)) return;\n }\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.focusKey(nodes[Math.min(index + 1, nodes.length - 1)]?.key);\n return;\n case 'ArrowUp':\n event.preventDefault();\n this.focusKey(nodes[Math.max(index - 1, 0)]?.key);\n return;\n case 'ArrowRight':\n if (!entry.expandable) return;\n event.preventDefault();\n if (!entry.expanded) {\n this.toggleExpansion(entry, event);\n } else {\n this.focusKey(nodes.find((node) => node.parentKey === entry.key)?.key);\n }\n return;\n case 'ArrowLeft':\n event.preventDefault();\n if (entry.expandable && entry.expanded) {\n this.toggleExpansion(entry, event);\n } else {\n this.focusKey(entry.parentKey ?? entry.key);\n }\n return;\n case 'Home':\n event.preventDefault();\n this.focusKey(nodes[0]?.key);\n return;\n case 'End':\n event.preventDefault();\n this.focusKey(nodes[nodes.length - 1]?.key);\n return;\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (!entry.disabled && this.selectionMode() && entry.node.selectable !== false) {\n this.toggleSelection(entry, event);\n } else if (!entry.disabled && entry.expandable) {\n this.toggleExpansion(entry, event);\n }\n return;\n default:\n this.handleTypeahead(event, index);\n }\n }\n\n protected handleDragStart(originalEvent: DragEvent, entry: TreeRenderedEntry<TData>): void {\n if (!entry.draggable) {\n originalEvent.preventDefault();\n return;\n }\n this.draggingKey.set(entry.key);\n this.dropTarget.set(null);\n if (originalEvent.dataTransfer) {\n originalEvent.dataTransfer.effectAllowed = 'move';\n originalEvent.dataTransfer.setData('text/plain', entry.key);\n }\n this.dragAnnouncement.set(`Moving ${entry.node.label}.`);\n }\n\n protected handleDragOver(originalEvent: DragEvent, entry: TreeRenderedEntry<TData>): void {\n const sourceKey = this.draggingKey();\n if (!sourceKey || !this.canDrop(sourceKey, entry.key)) return;\n const position = this.pointerDropPosition(originalEvent, entry);\n if (position === 'inside' && !this.canReceiveChildren(entry.node)) return;\n originalEvent.preventDefault();\n originalEvent.stopPropagation();\n if (originalEvent.dataTransfer) originalEvent.dataTransfer.dropEffect = 'move';\n this.dropTarget.set({ key: entry.key, position });\n }\n\n protected handleDragLeave(originalEvent: DragEvent, entry: TreeRenderedEntry<TData>): void {\n if (\n this.dropTarget()?.key === entry.key &&\n !(originalEvent.currentTarget as HTMLElement).contains(originalEvent.relatedTarget as Node)\n ) {\n this.dropTarget.set(null);\n }\n }\n\n protected handleDrop(originalEvent: DragEvent, entry: TreeRenderedEntry<TData>): void {\n const sourceKey = this.draggingKey();\n const target = this.dropTarget();\n if (!sourceKey || target?.key !== entry.key) return;\n originalEvent.preventDefault();\n originalEvent.stopPropagation();\n this.commitMove(sourceKey, entry.key, target.position, originalEvent);\n this.handleDragEnd();\n }\n\n protected handleDragEnd(): void {\n this.draggingKey.set(null);\n this.dropTarget.set(null);\n }\n\n private toggleExpansion(entry: TreeRenderedEntry<TData>, originalEvent: Event): void {\n if (entry.loading) return;\n const keys = new Set(this.expandedKeys());\n if (entry.expanded) {\n keys.delete(entry.key);\n this.expandedKeys.set([...keys]);\n this.nodeCollapsed.emit({ originalEvent, node: entry.node, key: entry.key });\n } else {\n keys.add(entry.key);\n this.expandedKeys.set([...keys]);\n this.nodeExpanded.emit({ originalEvent, node: entry.node, key: entry.key });\n }\n }\n\n private handleKeyboardMove(event: KeyboardEvent, entry: TreeRenderedEntry<TData>): boolean {\n const location = this.findLocation(this.value(), entry.key);\n if (!location) return false;\n let targetKey: string | undefined;\n let position: AerisTreeDropPosition | undefined;\n\n if (event.key === 'ArrowUp') {\n targetKey = location.siblings[location.index - 1]?.key;\n position = 'before';\n } else if (event.key === 'ArrowDown') {\n targetKey = location.siblings[location.index + 1]?.key;\n position = 'after';\n } else if (event.key === 'ArrowRight') {\n const previous = location.siblings[location.index - 1];\n if (previous && this.canReceiveChildren(previous)) {\n targetKey = previous.key;\n position = 'inside';\n }\n } else if (event.key === 'ArrowLeft' && location.parentKey) {\n targetKey = location.parentKey;\n position = 'after';\n } else {\n return false;\n }\n\n event.preventDefault();\n if (targetKey && position) {\n this.commitMove(entry.key, targetKey, position, event);\n this.activeKey.set(entry.key);\n }\n return true;\n }\n\n private commitMove(\n sourceKey: string,\n targetKey: string,\n position: AerisTreeDropPosition,\n originalEvent: Event,\n ): void {\n if (!this.canDrop(sourceKey, targetKey)) return;\n const source = this.findNode(this.value(), sourceKey);\n const target = this.findNode(this.value(), targetKey);\n if (!source || !target || (position === 'inside' && !this.canReceiveChildren(target))) return;\n\n const removed = this.removeNode(this.value(), sourceKey);\n if (!removed) return;\n const movedValue = this.insertNode(removed.value, targetKey, removed.node, position);\n if (!movedValue) return;\n\n this.value.set(movedValue);\n if (position === 'inside' && !this.expandedKeys().includes(targetKey)) {\n this.expandedKeys.set([...this.expandedKeys(), targetKey]);\n }\n this.dragAnnouncement.set(`${source.label} moved ${position} ${target.label}.`);\n this.nodeDropped.emit({\n originalEvent,\n node: source,\n key: sourceKey,\n target,\n targetKey,\n position,\n value: movedValue,\n });\n }\n\n private canDrop(sourceKey: string, targetKey: string): boolean {\n return sourceKey !== targetKey && !this.isDescendant(sourceKey, targetKey);\n }\n\n private canReceiveChildren(node: AerisTreeNode<TData>): boolean {\n return node.leaf !== true && node.droppable !== false && node.disabled !== true;\n }\n\n private pointerDropPosition(\n originalEvent: DragEvent,\n entry: TreeRenderedEntry<TData>,\n ): AerisTreeDropPosition {\n const rect = (originalEvent.currentTarget as HTMLElement).getBoundingClientRect();\n const ratio = rect.height > 0 ? (originalEvent.clientY - rect.top) / rect.height : 0.5;\n if (!this.canReceiveChildren(entry.node)) return ratio < 0.5 ? 'before' : 'after';\n if (ratio < 0.25) return 'before';\n if (ratio > 0.75) return 'after';\n return 'inside';\n }\n\n private findNode(\n nodes: readonly AerisTreeNode<TData>[],\n key: string,\n ): AerisTreeNode<TData> | null {\n for (const node of nodes) {\n if (node.key === key) return node;\n const child = this.findNode(node.children ?? [], key);\n if (child) return child;\n }\n return null;\n }\n\n private findLocation(\n nodes: readonly AerisTreeNode<TData>[],\n key: string,\n parentKey: string | null = null,\n ): {\n readonly parentKey: string | null;\n readonly siblings: readonly AerisTreeNode<TData>[];\n readonly index: number;\n } | null {\n const index = nodes.findIndex((node) => node.key === key);\n if (index >= 0) return { parentKey, siblings: nodes, index };\n for (const node of nodes) {\n const location = this.findLocation(node.children ?? [], key, node.key);\n if (location) return location;\n }\n return null;\n }\n\n private removeNode(\n nodes: readonly AerisTreeNode<TData>[],\n key: string,\n ): {\n readonly value: readonly AerisTreeNode<TData>[];\n readonly node: AerisTreeNode<TData>;\n } | null {\n const index = nodes.findIndex((node) => node.key === key);\n if (index >= 0) {\n const node = nodes[index];\n if (!node) return null;\n return {\n value: [...nodes.slice(0, index), ...nodes.slice(index + 1)],\n node,\n };\n }\n for (let nodeIndex = 0; nodeIndex < nodes.length; nodeIndex += 1) {\n const node = nodes[nodeIndex];\n if (!node) continue;\n const removed = this.removeNode(node.children ?? [], key);\n if (!removed) continue;\n const value = [...nodes];\n value[nodeIndex] = { ...node, children: removed.value };\n return { value, node: removed.node };\n }\n return null;\n }\n\n private insertNode(\n nodes: readonly AerisTreeNode<TData>[],\n targetKey: string,\n node: AerisTreeNode<TData>,\n position: AerisTreeDropPosition,\n ): readonly AerisTreeNode<TData>[] | null {\n const index = nodes.findIndex((candidate) => candidate.key === targetKey);\n if (index >= 0) {\n if (position === 'before') {\n return [...nodes.slice(0, index), node, ...nodes.slice(index)];\n }\n if (position === 'after') {\n return [...nodes.slice(0, index + 1), node, ...nodes.slice(index + 1)];\n }\n const target = nodes[index];\n if (!target) return null;\n const value = [...nodes];\n value[index] = { ...target, leaf: false, children: [...(target.children ?? []), node] };\n return value;\n }\n for (let nodeIndex = 0; nodeIndex < nodes.length; nodeIndex += 1) {\n const current = nodes[nodeIndex];\n if (!current) continue;\n const children = this.insertNode(current.children ?? [], targetKey, node, position);\n if (!children) continue;\n const value = [...nodes];\n value[nodeIndex] = { ...current, children };\n return value;\n }\n return null;\n }\n\n private isDescendant(sourceKey: string, targetKey: string): boolean {\n const source = this.findNode(this.value(), sourceKey);\n return source ? this.findNode(source.children ?? [], targetKey) !== null : false;\n }\n\n private toggleSelection(entry: TreeRenderedEntry<TData>, originalEvent: Event): void {\n const mode = this.selectionMode();\n if (!mode) return;\n const keys = new Set(this.selectionKeys());\n const selected = entry.partial || !entry.selected;\n\n if (mode === 'single') {\n keys.clear();\n if (selected) keys.add(entry.key);\n } else if (mode === 'checkbox' && this.propagateSelection()) {\n for (const key of this.collectSelectableKeys(entry.node)) {\n if (selected) keys.add(key);\n else keys.delete(key);\n }\n } else if (selected) {\n keys.add(entry.key);\n } else {\n keys.delete(entry.key);\n }\n\n const selectedKeys = [...keys];\n this.selectionKeys.set(selectedKeys);\n const selectionEvent = {\n originalEvent,\n node: entry.node,\n key: entry.key,\n selected,\n selectedKeys,\n };\n this.selectionChanged.emit(selectionEvent);\n if (selected) this.nodeSelected.emit(selectionEvent);\n else this.nodeUnselected.emit(selectionEvent);\n }\n\n private buildStructure(\n nodes: readonly AerisTreeNode<TData>[],\n query: string,\n ): readonly TreeStructureEntry<TData>[] {\n if (query) return this.buildFilteredStructure(nodes, query, 1, null).entries;\n return this.buildExpandedStructure(nodes, 1, null, new Set(this.expandedKeys()));\n }\n\n private buildExpandedStructure(\n nodes: readonly AerisTreeNode<TData>[],\n level: number,\n parentKey: string | null,\n expandedKeys: ReadonlySet<string>,\n ): readonly TreeStructureEntry<TData>[] {\n const entries: TreeStructureEntry<TData>[] = [];\n nodes.forEach((node, index) => {\n const expandable = this.isExpandable(node);\n const expanded = expandable && expandedKeys.has(node.key);\n entries.push({\n node,\n key: node.key,\n level,\n parentKey,\n position: index + 1,\n setSize: nodes.length,\n expanded,\n expandable,\n });\n if (expanded && node.children?.length) {\n entries.push(\n ...this.buildExpandedStructure(node.children, level + 1, node.key, expandedKeys),\n );\n }\n });\n return entries;\n }\n\n private buildFilteredStructure(\n nodes: readonly AerisTreeNode<TData>[],\n query: string,\n level: number,\n parentKey: string | null,\n ): { readonly matched: boolean; readonly entries: readonly TreeStructureEntry<TData>[] } {\n const matches = nodes\n .map((node) => {\n const childResult = this.buildFilteredStructure(\n node.children ?? [],\n query,\n level + 1,\n node.key,\n );\n const matched = node.label.toLocaleLowerCase().includes(query) || childResult.matched;\n return { node, childResult, matched };\n })\n .filter((result) => result.matched);\n\n const entries: TreeStructureEntry<TData>[] = [];\n matches.forEach(({ node, childResult }, index) => {\n const expandable = this.isExpandable(node);\n entries.push({\n node,\n key: node.key,\n level,\n parentKey,\n position: index + 1,\n setSize: matches.length,\n expanded: childResult.entries.length > 0,\n expandable,\n });\n entries.push(...childResult.entries);\n });\n return { matched: matches.length > 0, entries };\n }\n\n private buildSelectionStates(\n nodes: readonly AerisTreeNode<TData>[],\n ): ReadonlyMap<string, TreeSelectionState> {\n const result = new Map<string, TreeSelectionState>();\n const selectedKeys = new Set(this.selectionKeys());\n const checkbox = this.selectionMode() === 'checkbox' && this.propagateSelection();\n\n const visit = (node: AerisTreeNode<TData>): { selected: number; selectable: number } => {\n let selectable = node.disabled || node.selectable === false ? 0 : 1;\n let selected = selectable && selectedKeys.has(node.key) ? 1 : 0;\n for (const child of node.children ?? []) {\n const childState = visit(child);\n selectable += childState.selectable;\n selected += childState.selected;\n }\n result.set(\n node.key,\n checkbox\n ? {\n selected: selectable > 0 && selected === selectable,\n partial: selected > 0 && selected < selectable,\n }\n : { selected: selectedKeys.has(node.key), partial: false },\n );\n return { selected, selectable };\n };\n\n nodes.forEach(visit);\n return result;\n }\n\n private collectSelectableKeys(node: AerisTreeNode<TData>): readonly string[] {\n const keys: string[] = [];\n if (!node.disabled && node.selectable !== false) keys.push(node.key);\n for (const child of node.children ?? []) keys.push(...this.collectSelectableKeys(child));\n return keys;\n }\n\n private collectExpandableKeys(nodes: readonly AerisTreeNode<TData>[]): readonly string[] {\n const keys: string[] = [];\n for (const node of nodes) {\n if (this.isExpandable(node)) keys.push(node.key);\n if (node.children?.length) keys.push(...this.collectExpandableKeys(node.children));\n }\n return keys;\n }\n\n private isExpandable(node: AerisTreeNode<TData>): boolean {\n return Boolean(node.children?.length) || node.leaf === false;\n }\n\n private focusKey(key: string | undefined): void {\n if (!key) return;\n this.activeKey.set(key);\n this.treeItems()\n .find((item) => item.nativeElement.dataset['treeKey'] === key)\n ?.nativeElement.focus();\n }\n\n private handleTypeahead(event: KeyboardEvent, currentIndex: number): void {\n if (event.ctrlKey || event.metaKey || event.altKey || event.key.length !== 1) return;\n this.typeahead += event.key.toLocaleLowerCase();\n if (this.typeaheadTimer) clearTimeout(this.typeaheadTimer);\n this.typeaheadTimer = setTimeout(() => {\n this.typeahead = '';\n }, 500);\n\n const nodes = this.renderedNodes();\n const ordered = [...nodes.slice(currentIndex + 1), ...nodes.slice(0, currentIndex + 1)];\n const match = ordered.find((entry) =>\n entry.node.label.toLocaleLowerCase().startsWith(this.typeahead),\n );\n if (match) {\n event.preventDefault();\n this.focusKey(match.key);\n }\n }\n}\n\nexport const AerisTreeModule = [\n AerisTree,\n AerisTreeNodeTemplate,\n AerisTreeEmptyTemplate,\n AerisTreeLoadingTemplate,\n] as const;\n"],"mappings":";;;AA0GA,IAAa,wBAAb,MAAa,sBAAqB;CACvB,WAAW,OAAiD,WAAW;CAEhF,OAAO,uBACL,YACA,SAAgB;EAEhB,OAAO;CACT;CARW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,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AA,CACN,eAAa,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AAsmBtF,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;AACQ"}
1
+ {"version":3,"file":"aeris-ui-core-tree.mjs","names":[],"sources":["../../../projects/aeris-ui/tree/aeris-tree.ts"],"sourcesContent":["import { ɵAerisIcon } from '@aeris-ui/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n Directive,\n DestroyRef,\n ElementRef,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n viewChildren,\n} from '@angular/core';\n\nexport type AerisTreeSelectionMode = 'single' | 'multiple' | 'checkbox';\nexport type AerisTreeDropPosition = 'before' | 'inside' | 'after';\n\nexport interface AerisTreeNode<TData = unknown> {\n readonly key: string;\n readonly label: string;\n readonly children?: readonly AerisTreeNode<TData>[];\n readonly data?: TData;\n readonly leaf?: boolean;\n readonly disabled?: boolean;\n readonly selectable?: boolean;\n readonly draggable?: boolean;\n readonly droppable?: boolean;\n}\n\nexport interface AerisTreeNodeEvent<TData = unknown> {\n readonly originalEvent: Event;\n readonly node: AerisTreeNode<TData>;\n readonly key: string;\n}\n\nexport interface AerisTreeSelectionEvent<TData = unknown> extends AerisTreeNodeEvent<TData> {\n readonly selected: boolean;\n readonly selectedKeys: readonly string[];\n}\n\nexport interface AerisTreeFilterEvent {\n readonly originalEvent: Event;\n readonly value: string;\n}\n\nexport interface AerisTreeDropEvent<TData = unknown> {\n readonly originalEvent: Event;\n readonly node: AerisTreeNode<TData>;\n readonly key: string;\n readonly target: AerisTreeNode<TData>;\n readonly targetKey: string;\n readonly position: AerisTreeDropPosition;\n readonly value: readonly AerisTreeNode<TData>[];\n}\n\nexport interface AerisTreeNodeContext<TData = unknown> {\n readonly $implicit: AerisTreeNode<TData>;\n readonly node: AerisTreeNode<TData>;\n readonly key: string;\n readonly level: number;\n readonly selected: boolean;\n readonly partial: boolean;\n readonly expanded: boolean;\n readonly leaf: boolean;\n readonly active: boolean;\n readonly loading: boolean;\n readonly dragging: boolean;\n readonly dropPosition: AerisTreeDropPosition | null;\n}\n\ninterface TreeStructureEntry<TData> {\n readonly node: AerisTreeNode<TData>;\n readonly key: string;\n readonly level: number;\n readonly parentKey: string | null;\n readonly position: number;\n readonly setSize: number;\n readonly expanded: boolean;\n readonly expandable: boolean;\n}\n\ninterface TreeSelectionState {\n readonly selected: boolean;\n readonly partial: boolean;\n}\n\ninterface TreeRenderedEntry<TData> extends TreeStructureEntry<TData> {\n readonly id: string;\n readonly active: boolean;\n readonly disabled: boolean;\n readonly selected: boolean;\n readonly partial: boolean;\n readonly loading: boolean;\n readonly draggable: boolean;\n readonly dragging: boolean;\n readonly dropPosition: AerisTreeDropPosition | null;\n readonly tabIndex: 0 | -1;\n readonly context: AerisTreeNodeContext<TData>;\n}\n\n@Directive({ selector: 'ng-template[aerisTreeNode]' })\nexport class AerisTreeNodeTemplate<TData = unknown> {\n readonly template = inject<TemplateRef<AerisTreeNodeContext<TData>>>(TemplateRef);\n\n static ngTemplateContextGuard<TData>(\n _directive: AerisTreeNodeTemplate<TData>,\n context: unknown,\n ): context is AerisTreeNodeContext<TData> {\n return true;\n }\n}\n\n@Directive({ selector: 'ng-template[aerisTreeEmpty]' })\nexport class AerisTreeEmptyTemplate {\n readonly template = inject<TemplateRef<void>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[aerisTreeLoading]' })\nexport class AerisTreeLoadingTemplate {\n readonly template = inject<TemplateRef<void>>(TemplateRef);\n}\n\nlet treeId = 0;\n\n@Component({\n selector: 'aeris-tree',\n imports: [ɵAerisIcon, NgTemplateOutlet],\n template: `\n <div\n class=\"aeris-tree\"\n [attr.data-disabled]=\"disabled() || null\"\n [attr.data-fluid]=\"fluid() || null\"\n [attr.aria-busy]=\"loading() || null\"\n >\n @if (filter()) {\n <div class=\"aeris-tree__filter-wrap\">\n @if (filterIconTemplate(); as customIcon) {\n <span class=\"aeris-tree__search\" aria-hidden=\"true\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span aerisInternalIcon=\"search\" class=\"aeris-tree__search\" aria-hidden=\"true\"></span>\n }\n <input\n #filterInput\n class=\"aeris-tree__filter\"\n type=\"search\"\n autocomplete=\"off\"\n [value]=\"filterValue()\"\n [placeholder]=\"filterPlaceholder()\"\n [attr.aria-label]=\"filterAriaLabel()\"\n [attr.aria-controls]=\"resolvedTreeId\"\n [disabled]=\"disabled()\"\n (input)=\"handleFilterInput($event)\"\n (keydown)=\"handleFilterKeydown($event)\"\n />\n @if (filterValue() && !disabled()) {\n <button\n class=\"aeris-tree__filter-clear\"\n type=\"button\"\n [attr.aria-label]=\"filterClearAriaLabel()\"\n (click)=\"clearFilter($event)\"\n >\n @if (filterClearIconTemplate(); as customIcon) {\n <span aria-hidden=\"true\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span aerisInternalIcon=\"close\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n </div>\n }\n\n @if (loading()) {\n <div class=\"aeris-tree__message\" role=\"status\">\n @if (loadingTemplate(); as customLoading) {\n <ng-container [ngTemplateOutlet]=\"customLoading.template\" />\n } @else {\n @if (loadingIconTemplate(); as customIcon) {\n <span class=\"aeris-tree__spinner\" aria-hidden=\"true\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span class=\"aeris-tree__spinner\" aria-hidden=\"true\"></span>\n }\n {{ loadingMessage() }}\n }\n </div>\n } @else if (renderedNodes().length) {\n @if (dragDrop()) {\n <p class=\"aeris-tree__visually-hidden\" [id]=\"dragHelpId\">\n Reorder the focused node with Alt plus Arrow Up or Arrow Down. Use Alt plus Arrow Right\n to move it into the previous branch, or Alt plus Arrow Left to move it out of its\n parent.\n </p>\n }\n <div\n class=\"aeris-tree__items\"\n role=\"tree\"\n [id]=\"resolvedTreeId\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-describedby]=\"dragDrop() ? dragHelpId : null\"\n [attr.aria-multiselectable]=\"\n selectionMode() === 'multiple' || selectionMode() === 'checkbox' ? true : null\n \"\n >\n @for (entry of renderedNodes(); track entry.key) {\n <div\n #treeItem\n class=\"aeris-tree__node\"\n animate.enter=\"aeris-tree__node--enter\"\n animate.leave=\"aeris-tree__node--leave\"\n role=\"treeitem\"\n [id]=\"entry.id\"\n [attr.tabindex]=\"entry.tabIndex\"\n [attr.data-tree-key]=\"entry.key\"\n [attr.data-active]=\"entry.active || null\"\n [attr.data-selected]=\"entry.selected || null\"\n [attr.data-disabled]=\"entry.disabled || null\"\n [attr.data-loading]=\"entry.loading || null\"\n [attr.data-dragging]=\"entry.dragging || null\"\n [attr.data-drop-position]=\"entry.dropPosition\"\n [draggable]=\"entry.draggable\"\n [attr.aria-level]=\"entry.level\"\n [attr.aria-posinset]=\"entry.position\"\n [attr.aria-setsize]=\"entry.setSize\"\n [attr.aria-expanded]=\"entry.expandable ? entry.expanded : null\"\n [attr.aria-selected]=\"\n selectionMode() && selectionMode() !== 'checkbox' ? entry.selected : null\n \"\n [attr.aria-checked]=\"\n selectionMode() === 'checkbox' ? (entry.partial ? 'mixed' : entry.selected) : null\n \"\n [attr.aria-disabled]=\"entry.disabled || null\"\n [attr.aria-busy]=\"entry.loading || null\"\n [style.--aeris-tree-level]=\"entry.level - 1\"\n (click)=\"handleNodeClick($event, entry)\"\n (focus)=\"activate(entry.key)\"\n (keydown)=\"handleNodeKeydown($event, entry)\"\n (dragstart)=\"handleDragStart($event, entry)\"\n (dragover)=\"handleDragOver($event, entry)\"\n (dragleave)=\"handleDragLeave($event, entry)\"\n (drop)=\"handleDrop($event, entry)\"\n (dragend)=\"handleDragEnd()\"\n >\n <span\n class=\"aeris-tree__toggle\"\n [attr.data-expandable]=\"entry.expandable || null\"\n [attr.data-expanded]=\"entry.expanded || null\"\n aria-hidden=\"true\"\n >\n @if (entry.loading) {\n @if (loadingIconTemplate(); as customIcon) {\n <span class=\"aeris-tree__spinner\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span class=\"aeris-tree__spinner\"></span>\n }\n } @else {\n @if (toggleIconTemplate(); as customIcon) {\n <span class=\"aeris-tree__chevron\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span aerisInternalIcon=\"chevron\" class=\"aeris-tree__chevron\"></span>\n }\n }\n </span>\n\n @if (selectionMode() === 'checkbox') {\n <span\n class=\"aeris-tree__box\"\n [attr.data-checked]=\"entry.selected || null\"\n [attr.data-mixed]=\"entry.partial || null\"\n aria-hidden=\"true\"\n ><span\n [aerisInternalIcon]=\"\n entry.partial || null ? 'minus' : entry.selected || null ? 'check' : null\n \"\n ></span\n ></span>\n }\n\n <span class=\"aeris-tree__content\">\n @if (nodeTemplate(); as customNode) {\n <ng-container\n [ngTemplateOutlet]=\"customNode.template\"\n [ngTemplateOutletContext]=\"entry.context\"\n />\n } @else {\n {{ entry.node.label }}\n }\n </span>\n </div>\n }\n </div>\n @if (dragDrop()) {\n <p class=\"aeris-tree__visually-hidden\" aria-live=\"polite\">\n {{ dragAnnouncement() }}\n </p>\n }\n } @else {\n <div class=\"aeris-tree__message\" role=\"status\">\n @if (emptyTemplate(); as customEmpty) {\n <ng-container [ngTemplateOutlet]=\"customEmpty.template\" />\n } @else {\n {{ filterValue() ? emptyFilterMessage() : emptyMessage() }}\n }\n </div>\n }\n </div>\n `,\n styleUrl: './aeris-tree.scss',\n})\nexport class AerisTree<TData = unknown> {\n readonly filterIconTemplate = input<TemplateRef<void>>();\n readonly filterClearIconTemplate = input<TemplateRef<void>>();\n readonly loadingIconTemplate = input<TemplateRef<void>>();\n readonly toggleIconTemplate = input<TemplateRef<void>>();\n\n private readonly destroyRef = inject(DestroyRef);\n readonly value = model<readonly AerisTreeNode<TData>[]>([]);\n readonly selectionMode = input<AerisTreeSelectionMode | null>(null);\n readonly selectionKeys = model<readonly string[]>([]);\n readonly expandedKeys = model<readonly string[]>([]);\n readonly filterValue = model('');\n readonly filter = input(false, { transform: booleanAttribute });\n readonly propagateSelection = input(true, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly fluid = input(true, { transform: booleanAttribute });\n readonly loading = input(false, { transform: booleanAttribute });\n readonly loadingKeys = input<readonly string[]>([]);\n readonly dragDrop = input(false, { transform: booleanAttribute });\n readonly ariaLabel = input('Tree');\n readonly filterPlaceholder = input('Search tree');\n readonly filterAriaLabel = input('Search tree');\n readonly filterClearAriaLabel = input('Clear search');\n readonly emptyMessage = input('No tree nodes available');\n readonly emptyFilterMessage = input('No matching nodes');\n readonly loadingMessage = input('Loading tree');\n\n readonly selectionChanged = output<AerisTreeSelectionEvent<TData>>();\n readonly nodeSelected = output<AerisTreeSelectionEvent<TData>>();\n readonly nodeUnselected = output<AerisTreeSelectionEvent<TData>>();\n readonly nodeExpanded = output<AerisTreeNodeEvent<TData>>();\n readonly nodeCollapsed = output<AerisTreeNodeEvent<TData>>();\n readonly filterChanged = output<AerisTreeFilterEvent>();\n readonly nodeDropped = output<AerisTreeDropEvent<TData>>();\n\n protected readonly nodeTemplate = contentChild(AerisTreeNodeTemplate<TData>);\n protected readonly emptyTemplate = contentChild(AerisTreeEmptyTemplate);\n protected readonly loadingTemplate = contentChild(AerisTreeLoadingTemplate);\n private readonly treeItems = viewChildren<ElementRef<HTMLElement>>('treeItem');\n private readonly filterInput = viewChild<ElementRef<HTMLInputElement>>('filterInput');\n private readonly activeKey = signal<string | null>(null);\n private readonly draggingKey = signal<string | null>(null);\n private readonly dropTarget = signal<{\n readonly key: string;\n readonly position: AerisTreeDropPosition;\n } | null>(null);\n protected readonly dragAnnouncement = signal('');\n protected readonly resolvedTreeId = `aeris-tree-${++treeId}`;\n protected readonly dragHelpId = `${this.resolvedTreeId}-drag-help`;\n\n private readonly structure = computed(() =>\n this.buildStructure(this.value(), this.filterValue().trim().toLocaleLowerCase()),\n );\n private readonly resolvedActiveKey = computed(() => {\n const nodes = this.structure();\n const activeKey = this.activeKey();\n return nodes.some((entry) => entry.key === activeKey) ? activeKey : (nodes[0]?.key ?? null);\n });\n private readonly selectionStates = computed(() => this.buildSelectionStates(this.value()));\n protected readonly renderedNodes = computed<readonly TreeRenderedEntry<TData>[]>(() => {\n const activeKey = this.resolvedActiveKey();\n const selectionStates = this.selectionStates();\n const loadingKeys = new Set(this.loadingKeys());\n\n return this.structure().map((entry, index) => {\n const state = selectionStates.get(entry.key) ?? { selected: false, partial: false };\n const active = entry.key === activeKey;\n const loading = loadingKeys.has(entry.key);\n const dragging = this.draggingKey() === entry.key;\n const dropPosition =\n this.dropTarget()?.key === entry.key ? (this.dropTarget()?.position ?? null) : null;\n const context: AerisTreeNodeContext<TData> = {\n $implicit: entry.node,\n node: entry.node,\n key: entry.key,\n level: entry.level,\n selected: state.selected,\n partial: state.partial,\n expanded: entry.expanded,\n leaf: !entry.expandable,\n active,\n loading,\n dragging,\n dropPosition,\n };\n\n return {\n ...entry,\n id: `${this.resolvedTreeId}-node-${index}`,\n active,\n disabled: this.disabled() || entry.node.disabled === true,\n selected: state.selected,\n partial: state.partial,\n loading,\n draggable:\n this.dragDrop() &&\n !this.disabled() &&\n entry.node.disabled !== true &&\n entry.node.draggable !== false,\n dragging,\n dropPosition,\n tabIndex: active && !this.disabled() ? 0 : -1,\n context,\n };\n });\n });\n\n private typeahead = '';\n private typeaheadTimer: ReturnType<typeof setTimeout> | undefined;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n if (this.typeaheadTimer) clearTimeout(this.typeaheadTimer);\n });\n }\n\n public focus(key?: string): void {\n const targetKey = key ?? this.resolvedActiveKey();\n if (!targetKey || this.disabled()) return;\n this.activeKey.set(targetKey);\n this.focusKey(targetKey);\n }\n\n public expandAll(): void {\n this.expandedKeys.set(this.collectExpandableKeys(this.value()));\n }\n\n public collapseAll(): void {\n this.expandedKeys.set([]);\n }\n\n protected activate(key: string): void {\n this.activeKey.set(key);\n }\n\n protected handleFilterInput(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.filterValue.set(value);\n this.filterChanged.emit({ originalEvent: event, value });\n }\n\n protected clearFilter(event: Event): void {\n this.filterValue.set('');\n this.filterChanged.emit({ originalEvent: event, value: '' });\n queueMicrotask(() => this.filterInput()?.nativeElement.focus());\n }\n\n protected handleFilterKeydown(event: KeyboardEvent): void {\n if (event.key !== 'ArrowDown' || !this.renderedNodes().length) return;\n event.preventDefault();\n this.focus(this.renderedNodes()[0]?.key);\n }\n\n protected handleNodeClick(event: MouseEvent, entry: TreeRenderedEntry<TData>): void {\n this.activeKey.set(entry.key);\n (event.currentTarget as HTMLElement).focus();\n if (entry.disabled) return;\n\n if ((event.target as HTMLElement).closest('.aeris-tree__toggle') && entry.expandable) {\n this.toggleExpansion(entry, event);\n return;\n }\n if (this.selectionMode() && entry.node.selectable !== false) {\n this.toggleSelection(entry, event);\n }\n }\n\n protected handleNodeKeydown(event: KeyboardEvent, entry: TreeRenderedEntry<TData>): void {\n const nodes = this.renderedNodes();\n const index = nodes.findIndex((node) => node.key === entry.key);\n\n if (event.altKey && this.dragDrop() && !entry.disabled && entry.node.draggable !== false) {\n if (this.handleKeyboardMove(event, entry)) return;\n }\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.focusKey(nodes[Math.min(index + 1, nodes.length - 1)]?.key);\n return;\n case 'ArrowUp':\n event.preventDefault();\n this.focusKey(nodes[Math.max(index - 1, 0)]?.key);\n return;\n case 'ArrowRight':\n if (!entry.expandable) return;\n event.preventDefault();\n if (!entry.expanded) {\n this.toggleExpansion(entry, event);\n } else {\n this.focusKey(nodes.find((node) => node.parentKey === entry.key)?.key);\n }\n return;\n case 'ArrowLeft':\n event.preventDefault();\n if (entry.expandable && entry.expanded) {\n this.toggleExpansion(entry, event);\n } else {\n this.focusKey(entry.parentKey ?? entry.key);\n }\n return;\n case 'Home':\n event.preventDefault();\n this.focusKey(nodes[0]?.key);\n return;\n case 'End':\n event.preventDefault();\n this.focusKey(nodes[nodes.length - 1]?.key);\n return;\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (!entry.disabled && this.selectionMode() && entry.node.selectable !== false) {\n this.toggleSelection(entry, event);\n } else if (!entry.disabled && entry.expandable) {\n this.toggleExpansion(entry, event);\n }\n return;\n default:\n this.handleTypeahead(event, index);\n }\n }\n\n protected handleDragStart(originalEvent: DragEvent, entry: TreeRenderedEntry<TData>): void {\n if (!entry.draggable) {\n originalEvent.preventDefault();\n return;\n }\n this.draggingKey.set(entry.key);\n this.dropTarget.set(null);\n if (originalEvent.dataTransfer) {\n originalEvent.dataTransfer.effectAllowed = 'move';\n originalEvent.dataTransfer.setData('text/plain', entry.key);\n }\n this.dragAnnouncement.set(`Moving ${entry.node.label}.`);\n }\n\n protected handleDragOver(originalEvent: DragEvent, entry: TreeRenderedEntry<TData>): void {\n const sourceKey = this.draggingKey();\n if (!sourceKey || !this.canDrop(sourceKey, entry.key)) return;\n const position = this.pointerDropPosition(originalEvent, entry);\n if (position === 'inside' && !this.canReceiveChildren(entry.node)) return;\n originalEvent.preventDefault();\n originalEvent.stopPropagation();\n if (originalEvent.dataTransfer) originalEvent.dataTransfer.dropEffect = 'move';\n this.dropTarget.set({ key: entry.key, position });\n }\n\n protected handleDragLeave(originalEvent: DragEvent, entry: TreeRenderedEntry<TData>): void {\n if (\n this.dropTarget()?.key === entry.key &&\n !(originalEvent.currentTarget as HTMLElement).contains(originalEvent.relatedTarget as Node)\n ) {\n this.dropTarget.set(null);\n }\n }\n\n protected handleDrop(originalEvent: DragEvent, entry: TreeRenderedEntry<TData>): void {\n const sourceKey = this.draggingKey();\n const target = this.dropTarget();\n if (!sourceKey || target?.key !== entry.key) return;\n originalEvent.preventDefault();\n originalEvent.stopPropagation();\n this.commitMove(sourceKey, entry.key, target.position, originalEvent);\n this.handleDragEnd();\n }\n\n protected handleDragEnd(): void {\n this.draggingKey.set(null);\n this.dropTarget.set(null);\n }\n\n private toggleExpansion(entry: TreeRenderedEntry<TData>, originalEvent: Event): void {\n if (entry.loading) return;\n const keys = new Set(this.expandedKeys());\n if (entry.expanded) {\n keys.delete(entry.key);\n this.expandedKeys.set([...keys]);\n this.nodeCollapsed.emit({ originalEvent, node: entry.node, key: entry.key });\n } else {\n keys.add(entry.key);\n this.expandedKeys.set([...keys]);\n this.nodeExpanded.emit({ originalEvent, node: entry.node, key: entry.key });\n }\n }\n\n private handleKeyboardMove(event: KeyboardEvent, entry: TreeRenderedEntry<TData>): boolean {\n const location = this.findLocation(this.value(), entry.key);\n if (!location) return false;\n let targetKey: string | undefined;\n let position: AerisTreeDropPosition | undefined;\n\n if (event.key === 'ArrowUp') {\n targetKey = location.siblings[location.index - 1]?.key;\n position = 'before';\n } else if (event.key === 'ArrowDown') {\n targetKey = location.siblings[location.index + 1]?.key;\n position = 'after';\n } else if (event.key === 'ArrowRight') {\n const previous = location.siblings[location.index - 1];\n if (previous && this.canReceiveChildren(previous)) {\n targetKey = previous.key;\n position = 'inside';\n }\n } else if (event.key === 'ArrowLeft' && location.parentKey) {\n targetKey = location.parentKey;\n position = 'after';\n } else {\n return false;\n }\n\n event.preventDefault();\n if (targetKey && position) {\n this.commitMove(entry.key, targetKey, position, event);\n this.activeKey.set(entry.key);\n }\n return true;\n }\n\n private commitMove(\n sourceKey: string,\n targetKey: string,\n position: AerisTreeDropPosition,\n originalEvent: Event,\n ): void {\n if (!this.canDrop(sourceKey, targetKey)) return;\n const source = this.findNode(this.value(), sourceKey);\n const target = this.findNode(this.value(), targetKey);\n if (!source || !target || (position === 'inside' && !this.canReceiveChildren(target))) return;\n\n const removed = this.removeNode(this.value(), sourceKey);\n if (!removed) return;\n const movedValue = this.insertNode(removed.value, targetKey, removed.node, position);\n if (!movedValue) return;\n\n this.value.set(movedValue);\n if (position === 'inside' && !this.expandedKeys().includes(targetKey)) {\n this.expandedKeys.set([...this.expandedKeys(), targetKey]);\n }\n this.dragAnnouncement.set(`${source.label} moved ${position} ${target.label}.`);\n this.nodeDropped.emit({\n originalEvent,\n node: source,\n key: sourceKey,\n target,\n targetKey,\n position,\n value: movedValue,\n });\n }\n\n private canDrop(sourceKey: string, targetKey: string): boolean {\n return sourceKey !== targetKey && !this.isDescendant(sourceKey, targetKey);\n }\n\n private canReceiveChildren(node: AerisTreeNode<TData>): boolean {\n return node.leaf !== true && node.droppable !== false && node.disabled !== true;\n }\n\n private pointerDropPosition(\n originalEvent: DragEvent,\n entry: TreeRenderedEntry<TData>,\n ): AerisTreeDropPosition {\n const rect = (originalEvent.currentTarget as HTMLElement).getBoundingClientRect();\n const ratio = rect.height > 0 ? (originalEvent.clientY - rect.top) / rect.height : 0.5;\n if (!this.canReceiveChildren(entry.node)) return ratio < 0.5 ? 'before' : 'after';\n if (ratio < 0.25) return 'before';\n if (ratio > 0.75) return 'after';\n return 'inside';\n }\n\n private findNode(\n nodes: readonly AerisTreeNode<TData>[],\n key: string,\n ): AerisTreeNode<TData> | null {\n for (const node of nodes) {\n if (node.key === key) return node;\n const child = this.findNode(node.children ?? [], key);\n if (child) return child;\n }\n return null;\n }\n\n private findLocation(\n nodes: readonly AerisTreeNode<TData>[],\n key: string,\n parentKey: string | null = null,\n ): {\n readonly parentKey: string | null;\n readonly siblings: readonly AerisTreeNode<TData>[];\n readonly index: number;\n } | null {\n const index = nodes.findIndex((node) => node.key === key);\n if (index >= 0) return { parentKey, siblings: nodes, index };\n for (const node of nodes) {\n const location = this.findLocation(node.children ?? [], key, node.key);\n if (location) return location;\n }\n return null;\n }\n\n private removeNode(\n nodes: readonly AerisTreeNode<TData>[],\n key: string,\n ): {\n readonly value: readonly AerisTreeNode<TData>[];\n readonly node: AerisTreeNode<TData>;\n } | null {\n const index = nodes.findIndex((node) => node.key === key);\n if (index >= 0) {\n const node = nodes[index];\n if (!node) return null;\n return {\n value: [...nodes.slice(0, index), ...nodes.slice(index + 1)],\n node,\n };\n }\n for (let nodeIndex = 0; nodeIndex < nodes.length; nodeIndex += 1) {\n const node = nodes[nodeIndex];\n if (!node) continue;\n const removed = this.removeNode(node.children ?? [], key);\n if (!removed) continue;\n const value = [...nodes];\n value[nodeIndex] = { ...node, children: removed.value };\n return { value, node: removed.node };\n }\n return null;\n }\n\n private insertNode(\n nodes: readonly AerisTreeNode<TData>[],\n targetKey: string,\n node: AerisTreeNode<TData>,\n position: AerisTreeDropPosition,\n ): readonly AerisTreeNode<TData>[] | null {\n const index = nodes.findIndex((candidate) => candidate.key === targetKey);\n if (index >= 0) {\n if (position === 'before') {\n return [...nodes.slice(0, index), node, ...nodes.slice(index)];\n }\n if (position === 'after') {\n return [...nodes.slice(0, index + 1), node, ...nodes.slice(index + 1)];\n }\n const target = nodes[index];\n if (!target) return null;\n const value = [...nodes];\n value[index] = { ...target, leaf: false, children: [...(target.children ?? []), node] };\n return value;\n }\n for (let nodeIndex = 0; nodeIndex < nodes.length; nodeIndex += 1) {\n const current = nodes[nodeIndex];\n if (!current) continue;\n const children = this.insertNode(current.children ?? [], targetKey, node, position);\n if (!children) continue;\n const value = [...nodes];\n value[nodeIndex] = { ...current, children };\n return value;\n }\n return null;\n }\n\n private isDescendant(sourceKey: string, targetKey: string): boolean {\n const source = this.findNode(this.value(), sourceKey);\n return source ? this.findNode(source.children ?? [], targetKey) !== null : false;\n }\n\n private toggleSelection(entry: TreeRenderedEntry<TData>, originalEvent: Event): void {\n const mode = this.selectionMode();\n if (!mode) return;\n const keys = new Set(this.selectionKeys());\n const selected = entry.partial || !entry.selected;\n\n if (mode === 'single') {\n keys.clear();\n if (selected) keys.add(entry.key);\n } else if (mode === 'checkbox' && this.propagateSelection()) {\n for (const key of this.collectSelectableKeys(entry.node)) {\n if (selected) keys.add(key);\n else keys.delete(key);\n }\n } else if (selected) {\n keys.add(entry.key);\n } else {\n keys.delete(entry.key);\n }\n\n const selectedKeys = [...keys];\n this.selectionKeys.set(selectedKeys);\n const selectionEvent = {\n originalEvent,\n node: entry.node,\n key: entry.key,\n selected,\n selectedKeys,\n };\n this.selectionChanged.emit(selectionEvent);\n if (selected) this.nodeSelected.emit(selectionEvent);\n else this.nodeUnselected.emit(selectionEvent);\n }\n\n private buildStructure(\n nodes: readonly AerisTreeNode<TData>[],\n query: string,\n ): readonly TreeStructureEntry<TData>[] {\n if (query) return this.buildFilteredStructure(nodes, query, 1, null).entries;\n return this.buildExpandedStructure(nodes, 1, null, new Set(this.expandedKeys()));\n }\n\n private buildExpandedStructure(\n nodes: readonly AerisTreeNode<TData>[],\n level: number,\n parentKey: string | null,\n expandedKeys: ReadonlySet<string>,\n ): readonly TreeStructureEntry<TData>[] {\n const entries: TreeStructureEntry<TData>[] = [];\n nodes.forEach((node, index) => {\n const expandable = this.isExpandable(node);\n const expanded = expandable && expandedKeys.has(node.key);\n entries.push({\n node,\n key: node.key,\n level,\n parentKey,\n position: index + 1,\n setSize: nodes.length,\n expanded,\n expandable,\n });\n if (expanded && node.children?.length) {\n entries.push(\n ...this.buildExpandedStructure(node.children, level + 1, node.key, expandedKeys),\n );\n }\n });\n return entries;\n }\n\n private buildFilteredStructure(\n nodes: readonly AerisTreeNode<TData>[],\n query: string,\n level: number,\n parentKey: string | null,\n ): { readonly matched: boolean; readonly entries: readonly TreeStructureEntry<TData>[] } {\n const matches = nodes\n .map((node) => {\n const childResult = this.buildFilteredStructure(\n node.children ?? [],\n query,\n level + 1,\n node.key,\n );\n const matched = node.label.toLocaleLowerCase().includes(query) || childResult.matched;\n return { node, childResult, matched };\n })\n .filter((result) => result.matched);\n\n const entries: TreeStructureEntry<TData>[] = [];\n matches.forEach(({ node, childResult }, index) => {\n const expandable = this.isExpandable(node);\n entries.push({\n node,\n key: node.key,\n level,\n parentKey,\n position: index + 1,\n setSize: matches.length,\n expanded: childResult.entries.length > 0,\n expandable,\n });\n entries.push(...childResult.entries);\n });\n return { matched: matches.length > 0, entries };\n }\n\n private buildSelectionStates(\n nodes: readonly AerisTreeNode<TData>[],\n ): ReadonlyMap<string, TreeSelectionState> {\n const result = new Map<string, TreeSelectionState>();\n const selectedKeys = new Set(this.selectionKeys());\n const checkbox = this.selectionMode() === 'checkbox' && this.propagateSelection();\n\n const visit = (node: AerisTreeNode<TData>): { selected: number; selectable: number } => {\n let selectable = node.disabled || node.selectable === false ? 0 : 1;\n let selected = selectable && selectedKeys.has(node.key) ? 1 : 0;\n for (const child of node.children ?? []) {\n const childState = visit(child);\n selectable += childState.selectable;\n selected += childState.selected;\n }\n result.set(\n node.key,\n checkbox\n ? {\n selected: selectable > 0 && selected === selectable,\n partial: selected > 0 && selected < selectable,\n }\n : { selected: selectedKeys.has(node.key), partial: false },\n );\n return { selected, selectable };\n };\n\n nodes.forEach(visit);\n return result;\n }\n\n private collectSelectableKeys(node: AerisTreeNode<TData>): readonly string[] {\n const keys: string[] = [];\n if (!node.disabled && node.selectable !== false) keys.push(node.key);\n for (const child of node.children ?? []) keys.push(...this.collectSelectableKeys(child));\n return keys;\n }\n\n private collectExpandableKeys(nodes: readonly AerisTreeNode<TData>[]): readonly string[] {\n const keys: string[] = [];\n for (const node of nodes) {\n if (this.isExpandable(node)) keys.push(node.key);\n if (node.children?.length) keys.push(...this.collectExpandableKeys(node.children));\n }\n return keys;\n }\n\n private isExpandable(node: AerisTreeNode<TData>): boolean {\n return Boolean(node.children?.length) || node.leaf === false;\n }\n\n private focusKey(key: string | undefined): void {\n if (!key) return;\n this.activeKey.set(key);\n this.treeItems()\n .find((item) => item.nativeElement.dataset['treeKey'] === key)\n ?.nativeElement.focus();\n }\n\n private handleTypeahead(event: KeyboardEvent, currentIndex: number): void {\n if (event.ctrlKey || event.metaKey || event.altKey || event.key.length !== 1) return;\n this.typeahead += event.key.toLocaleLowerCase();\n if (this.typeaheadTimer) clearTimeout(this.typeaheadTimer);\n this.typeaheadTimer = setTimeout(() => {\n this.typeahead = '';\n }, 500);\n\n const nodes = this.renderedNodes();\n const ordered = [...nodes.slice(currentIndex + 1), ...nodes.slice(0, currentIndex + 1)];\n const match = ordered.find((entry) =>\n entry.node.label.toLocaleLowerCase().startsWith(this.typeahead),\n );\n if (match) {\n event.preventDefault();\n this.focusKey(match.key);\n }\n }\n}\n\nexport const AerisTreeModule = [\n AerisTree,\n AerisTreeNodeTemplate,\n AerisTreeEmptyTemplate,\n AerisTreeLoadingTemplate,\n] as const;\n"],"mappings":";;;;AA2GA,IAAa,wBAAb,MAAa,sBAAqB;CACvB,WAAW,OAAiD,WAAW;CAEhF,OAAO,uBACL,YACA,SAAgB;EAEhB,OAAO;CACT;CARW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAqB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAArB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAqB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAArB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EADjC,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,6BAA4B,CAAE;;;AAarD,IAAa,yBAAb,MAAa,uBAAsB;CACxB,WAAW,OAA0B,WAAW;CAD9C,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAsB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAtB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAsB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EADlC,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,8BAA6B,CAAE;;;AAMtD,IAAa,2BAAb,MAAa,yBAAwB;CAC1B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