@star-ng/ui 0.0.0-stage → 0.2.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 (217) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +162 -2
  3. package/fesm2022/star-ng-ui-accordion.mjs +376 -0
  4. package/fesm2022/star-ng-ui-accordion.mjs.map +1 -0
  5. package/fesm2022/star-ng-ui-autocomplete.mjs +786 -0
  6. package/fesm2022/star-ng-ui-autocomplete.mjs.map +1 -0
  7. package/fesm2022/star-ng-ui-avatar.mjs +154 -0
  8. package/fesm2022/star-ng-ui-avatar.mjs.map +1 -0
  9. package/fesm2022/star-ng-ui-badge.mjs +153 -0
  10. package/fesm2022/star-ng-ui-badge.mjs.map +1 -0
  11. package/fesm2022/star-ng-ui-breadcrumb.mjs +199 -0
  12. package/fesm2022/star-ng-ui-breadcrumb.mjs.map +1 -0
  13. package/fesm2022/star-ng-ui-button.mjs +282 -0
  14. package/fesm2022/star-ng-ui-button.mjs.map +1 -0
  15. package/fesm2022/star-ng-ui-card.mjs +112 -0
  16. package/fesm2022/star-ng-ui-card.mjs.map +1 -0
  17. package/fesm2022/star-ng-ui-chart.mjs +1904 -0
  18. package/fesm2022/star-ng-ui-chart.mjs.map +1 -0
  19. package/fesm2022/star-ng-ui-checkbox.mjs +345 -0
  20. package/fesm2022/star-ng-ui-checkbox.mjs.map +1 -0
  21. package/fesm2022/star-ng-ui-core.mjs +484 -0
  22. package/fesm2022/star-ng-ui-core.mjs.map +1 -0
  23. package/fesm2022/star-ng-ui-data-display.mjs +1870 -0
  24. package/fesm2022/star-ng-ui-data-display.mjs.map +1 -0
  25. package/fesm2022/star-ng-ui-date-picker.mjs +2786 -0
  26. package/fesm2022/star-ng-ui-date-picker.mjs.map +1 -0
  27. package/fesm2022/star-ng-ui-dialog.mjs +948 -0
  28. package/fesm2022/star-ng-ui-dialog.mjs.map +1 -0
  29. package/fesm2022/star-ng-ui-drawer.mjs +158 -0
  30. package/fesm2022/star-ng-ui-drawer.mjs.map +1 -0
  31. package/fesm2022/star-ng-ui-editor.mjs +416 -0
  32. package/fesm2022/star-ng-ui-editor.mjs.map +1 -0
  33. package/fesm2022/star-ng-ui-field.mjs +378 -0
  34. package/fesm2022/star-ng-ui-field.mjs.map +1 -0
  35. package/fesm2022/star-ng-ui-file-upload.mjs +762 -0
  36. package/fesm2022/star-ng-ui-file-upload.mjs.map +1 -0
  37. package/fesm2022/star-ng-ui-i18n-de.mjs +179 -0
  38. package/fesm2022/star-ng-ui-i18n-de.mjs.map +1 -0
  39. package/fesm2022/star-ng-ui-i18n-es.mjs +179 -0
  40. package/fesm2022/star-ng-ui-i18n-es.mjs.map +1 -0
  41. package/fesm2022/star-ng-ui-input-group.mjs +188 -0
  42. package/fesm2022/star-ng-ui-input-group.mjs.map +1 -0
  43. package/fesm2022/star-ng-ui-input-mask.mjs +434 -0
  44. package/fesm2022/star-ng-ui-input-mask.mjs.map +1 -0
  45. package/fesm2022/star-ng-ui-input-number.mjs +691 -0
  46. package/fesm2022/star-ng-ui-input-number.mjs.map +1 -0
  47. package/fesm2022/star-ng-ui-input-otp.mjs +343 -0
  48. package/fesm2022/star-ng-ui-input-otp.mjs.map +1 -0
  49. package/fesm2022/star-ng-ui-input-tags.mjs +616 -0
  50. package/fesm2022/star-ng-ui-input-tags.mjs.map +1 -0
  51. package/fesm2022/star-ng-ui-knob.mjs +514 -0
  52. package/fesm2022/star-ng-ui-knob.mjs.map +1 -0
  53. package/fesm2022/star-ng-ui-layout.mjs +608 -0
  54. package/fesm2022/star-ng-ui-layout.mjs.map +1 -0
  55. package/fesm2022/star-ng-ui-listbox.mjs +886 -0
  56. package/fesm2022/star-ng-ui-listbox.mjs.map +1 -0
  57. package/fesm2022/star-ng-ui-media.mjs +833 -0
  58. package/fesm2022/star-ng-ui-media.mjs.map +1 -0
  59. package/fesm2022/star-ng-ui-menu.mjs +1840 -0
  60. package/fesm2022/star-ng-ui-menu.mjs.map +1 -0
  61. package/fesm2022/star-ng-ui-message.mjs +191 -0
  62. package/fesm2022/star-ng-ui-message.mjs.map +1 -0
  63. package/fesm2022/star-ng-ui-paginator.mjs +387 -0
  64. package/fesm2022/star-ng-ui-paginator.mjs.map +1 -0
  65. package/fesm2022/star-ng-ui-panel.mjs +324 -0
  66. package/fesm2022/star-ng-ui-panel.mjs.map +1 -0
  67. package/fesm2022/star-ng-ui-password.mjs +517 -0
  68. package/fesm2022/star-ng-ui-password.mjs.map +1 -0
  69. package/fesm2022/star-ng-ui-popover.mjs +241 -0
  70. package/fesm2022/star-ng-ui-popover.mjs.map +1 -0
  71. package/fesm2022/star-ng-ui-progress-bar.mjs +183 -0
  72. package/fesm2022/star-ng-ui-progress-bar.mjs.map +1 -0
  73. package/fesm2022/star-ng-ui-radio.mjs +411 -0
  74. package/fesm2022/star-ng-ui-radio.mjs.map +1 -0
  75. package/fesm2022/star-ng-ui-rating.mjs +211 -0
  76. package/fesm2022/star-ng-ui-rating.mjs.map +1 -0
  77. package/fesm2022/star-ng-ui-select-button.mjs +613 -0
  78. package/fesm2022/star-ng-ui-select-button.mjs.map +1 -0
  79. package/fesm2022/star-ng-ui-select.mjs +2547 -0
  80. package/fesm2022/star-ng-ui-select.mjs.map +1 -0
  81. package/fesm2022/star-ng-ui-skeleton.mjs +160 -0
  82. package/fesm2022/star-ng-ui-skeleton.mjs.map +1 -0
  83. package/fesm2022/star-ng-ui-slider.mjs +552 -0
  84. package/fesm2022/star-ng-ui-slider.mjs.map +1 -0
  85. package/fesm2022/star-ng-ui-spinner.mjs +148 -0
  86. package/fesm2022/star-ng-ui-spinner.mjs.map +1 -0
  87. package/fesm2022/star-ng-ui-stepper.mjs +360 -0
  88. package/fesm2022/star-ng-ui-stepper.mjs.map +1 -0
  89. package/fesm2022/star-ng-ui-table.mjs +3531 -0
  90. package/fesm2022/star-ng-ui-table.mjs.map +1 -0
  91. package/fesm2022/star-ng-ui-tabs.mjs +464 -0
  92. package/fesm2022/star-ng-ui-tabs.mjs.map +1 -0
  93. package/fesm2022/star-ng-ui-tag.mjs +129 -0
  94. package/fesm2022/star-ng-ui-tag.mjs.map +1 -0
  95. package/fesm2022/star-ng-ui-theme-switch.mjs +105 -0
  96. package/fesm2022/star-ng-ui-theme-switch.mjs.map +1 -0
  97. package/fesm2022/star-ng-ui-theme.mjs +98 -0
  98. package/fesm2022/star-ng-ui-theme.mjs.map +1 -0
  99. package/fesm2022/star-ng-ui-toast.mjs +298 -0
  100. package/fesm2022/star-ng-ui-toast.mjs.map +1 -0
  101. package/fesm2022/star-ng-ui-toggle-switch.mjs +316 -0
  102. package/fesm2022/star-ng-ui-toggle-switch.mjs.map +1 -0
  103. package/fesm2022/star-ng-ui-tooltip.mjs +297 -0
  104. package/fesm2022/star-ng-ui-tooltip.mjs.map +1 -0
  105. package/fesm2022/star-ng-ui-transloco.mjs +40 -0
  106. package/fesm2022/star-ng-ui-transloco.mjs.map +1 -0
  107. package/fesm2022/star-ng-ui-tree.mjs +1446 -0
  108. package/fesm2022/star-ng-ui-tree.mjs.map +1 -0
  109. package/fesm2022/star-ng-ui-utility.mjs +2134 -0
  110. package/fesm2022/star-ng-ui-utility.mjs.map +1 -0
  111. package/fesm2022/star-ng-ui.mjs +51 -0
  112. package/package.json +285 -3
  113. package/styles/_base.scss +70 -0
  114. package/styles/_shared.scss +2 -0
  115. package/styles/_tokens.scss +190 -0
  116. package/styles/controls/_accordion.scss +75 -0
  117. package/styles/controls/_autocomplete.scss +44 -0
  118. package/styles/controls/_avatar.scss +39 -0
  119. package/styles/controls/_breadcrumb.scss +45 -0
  120. package/styles/controls/_button.scss +137 -0
  121. package/styles/controls/_card.scss +38 -0
  122. package/styles/controls/_chart.scss +214 -0
  123. package/styles/controls/_chip.scss +51 -0
  124. package/styles/controls/_choice.scss +153 -0
  125. package/styles/controls/_data-display.scss +124 -0
  126. package/styles/controls/_date-picker.scss +300 -0
  127. package/styles/controls/_dialog.scss +123 -0
  128. package/styles/controls/_drawer.scss +118 -0
  129. package/styles/controls/_editor.scss +74 -0
  130. package/styles/controls/_field.scss +92 -0
  131. package/styles/controls/_file-upload.scss +136 -0
  132. package/styles/controls/_input-group.scss +104 -0
  133. package/styles/controls/_input-mask.scss +46 -0
  134. package/styles/controls/_input-number.scss +125 -0
  135. package/styles/controls/_knob.scss +76 -0
  136. package/styles/controls/_layout.scss +182 -0
  137. package/styles/controls/_listbox.scss +38 -0
  138. package/styles/controls/_media.scss +222 -0
  139. package/styles/controls/_menu.scss +254 -0
  140. package/styles/controls/_message.scss +48 -0
  141. package/styles/controls/_org-chart.scss +128 -0
  142. package/styles/controls/_paginator.scss +59 -0
  143. package/styles/controls/_panel.scss +83 -0
  144. package/styles/controls/_popover.scss +40 -0
  145. package/styles/controls/_progress-bar.scss +74 -0
  146. package/styles/controls/_select-button.scss +61 -0
  147. package/styles/controls/_select.scss +216 -0
  148. package/styles/controls/_skeleton.scss +43 -0
  149. package/styles/controls/_slider.scss +163 -0
  150. package/styles/controls/_spinner.scss +34 -0
  151. package/styles/controls/_stepper.scss +109 -0
  152. package/styles/controls/_table.scss +523 -0
  153. package/styles/controls/_tabs.scss +93 -0
  154. package/styles/controls/_tag.scss +84 -0
  155. package/styles/controls/_toast.scss +141 -0
  156. package/styles/controls/_tooltip.scss +14 -0
  157. package/styles/controls/_tree.scss +113 -0
  158. package/styles/controls/_utility.scss +654 -0
  159. package/styles/star-ng.css +5807 -0
  160. package/styles/star-ng.min.css +1 -0
  161. package/styles/star-ng.scss +50 -0
  162. package/theme/star-theme-first-paint.js +1 -0
  163. package/types/star-ng-ui-accordion.d.ts +82 -0
  164. package/types/star-ng-ui-autocomplete.d.ts +171 -0
  165. package/types/star-ng-ui-avatar.d.ts +43 -0
  166. package/types/star-ng-ui-badge.d.ts +46 -0
  167. package/types/star-ng-ui-breadcrumb.d.ts +39 -0
  168. package/types/star-ng-ui-button.d.ts +79 -0
  169. package/types/star-ng-ui-card.d.ts +29 -0
  170. package/types/star-ng-ui-chart.d.ts +337 -0
  171. package/types/star-ng-ui-checkbox.d.ts +92 -0
  172. package/types/star-ng-ui-core.d.ts +373 -0
  173. package/types/star-ng-ui-data-display.d.ts +438 -0
  174. package/types/star-ng-ui-date-picker.d.ts +701 -0
  175. package/types/star-ng-ui-dialog.d.ts +254 -0
  176. package/types/star-ng-ui-drawer.d.ts +29 -0
  177. package/types/star-ng-ui-editor.d.ts +96 -0
  178. package/types/star-ng-ui-field.d.ts +146 -0
  179. package/types/star-ng-ui-file-upload.d.ts +192 -0
  180. package/types/star-ng-ui-i18n-de.d.ts +7 -0
  181. package/types/star-ng-ui-i18n-es.d.ts +7 -0
  182. package/types/star-ng-ui-input-group.d.ts +58 -0
  183. package/types/star-ng-ui-input-mask.d.ts +126 -0
  184. package/types/star-ng-ui-input-number.d.ts +193 -0
  185. package/types/star-ng-ui-input-otp.d.ts +86 -0
  186. package/types/star-ng-ui-input-tags.d.ts +159 -0
  187. package/types/star-ng-ui-knob.d.ts +121 -0
  188. package/types/star-ng-ui-layout.d.ts +154 -0
  189. package/types/star-ng-ui-listbox.d.ts +170 -0
  190. package/types/star-ng-ui-media.d.ts +161 -0
  191. package/types/star-ng-ui-menu.d.ts +332 -0
  192. package/types/star-ng-ui-message.d.ts +52 -0
  193. package/types/star-ng-ui-paginator.d.ts +85 -0
  194. package/types/star-ng-ui-panel.d.ts +65 -0
  195. package/types/star-ng-ui-password.d.ts +129 -0
  196. package/types/star-ng-ui-popover.d.ts +57 -0
  197. package/types/star-ng-ui-progress-bar.d.ts +49 -0
  198. package/types/star-ng-ui-radio.d.ts +116 -0
  199. package/types/star-ng-ui-rating.d.ts +52 -0
  200. package/types/star-ng-ui-select-button.d.ts +169 -0
  201. package/types/star-ng-ui-select.d.ts +563 -0
  202. package/types/star-ng-ui-skeleton.d.ts +47 -0
  203. package/types/star-ng-ui-slider.d.ts +145 -0
  204. package/types/star-ng-ui-spinner.d.ts +29 -0
  205. package/types/star-ng-ui-stepper.d.ts +89 -0
  206. package/types/star-ng-ui-table.d.ts +885 -0
  207. package/types/star-ng-ui-tabs.d.ts +109 -0
  208. package/types/star-ng-ui-tag.d.ts +35 -0
  209. package/types/star-ng-ui-theme-switch.d.ts +36 -0
  210. package/types/star-ng-ui-theme.d.ts +95 -0
  211. package/types/star-ng-ui-toast.d.ts +84 -0
  212. package/types/star-ng-ui-toggle-switch.d.ts +81 -0
  213. package/types/star-ng-ui-tooltip.d.ts +66 -0
  214. package/types/star-ng-ui-transloco.d.ts +14 -0
  215. package/types/star-ng-ui-tree.d.ts +343 -0
  216. package/types/star-ng-ui-utility.d.ts +533 -0
  217. package/types/star-ng-ui.d.ts +51 -0
@@ -0,0 +1,343 @@
1
+ import { ConnectedPosition } from "@angular/cdk/overlay";
2
+ import { FormValueControl } from "@angular/forms/signals";
3
+ import * as i0 from "@angular/core";
4
+ /** The part of a tree node that the helpers read. `StarTreeNode` fits it. */
5
+ interface BranchLike<N> {
6
+ readonly key: string;
7
+ readonly children?: readonly N[];
8
+ }
9
+ /** One visible row of the flattened tree. */
10
+ interface TreeRow<N> {
11
+ readonly node: N;
12
+ /** Depth of the node, starting at 1 (`aria-level`). */
13
+ readonly level: number;
14
+ /** Number of siblings, the node included (`aria-setsize`). */
15
+ readonly setSize: number;
16
+ /** Position among the siblings, starting at 1 (`aria-posinset`). */
17
+ readonly position: number;
18
+ readonly parentKey: string | null;
19
+ }
20
+ /**
21
+ * Flattens the nodes whose parents are open into rows. The sibling numbers come from the data,
22
+ * so they stay right for rows that are not in the DOM. `openAll` shows every branch open (filter).
23
+ */
24
+ export declare function flattenVisible<N extends BranchLike<N>>(nodes: readonly N[], open: ReadonlySet<string>, openAll?: boolean): TreeRow<N>[];
25
+ /** Row index of each key. */
26
+ export declare function rowIndexOf<N extends BranchLike<N>>(rows: readonly TreeRow<N>[]): Map<string, number>;
27
+ /** Parent key of every node (null at the top). */
28
+ export declare function parentsOf<N extends BranchLike<N>>(nodes: readonly N[]): Map<string, string | null>;
29
+ /**
30
+ * The key that keeps the focus after the rows changed: the previous key if it is still a row,
31
+ * else its nearest ancestor that is a row, else the first row.
32
+ */
33
+ export declare function stillFocusable(previous: string | null | undefined, rowIndex: ReadonlyMap<string, number>, parents: ReadonlyMap<string, string | null>, firstKey: string | null): string | null;
34
+ /**
35
+ * The row that a navigation key moves to, or null when the key does not move (or there is no
36
+ * target). Arrow right on a closed branch and arrow left on an open branch toggle it: they have
37
+ * no target.
38
+ */
39
+ export declare function navigationTarget<N extends BranchLike<N>>(rows: readonly TreeRow<N>[], index: number, key: string, state: {
40
+ hasChildren: boolean;
41
+ expanded: boolean;
42
+ }): string | null;
43
+ /**
44
+ * Scroll offset that brings a fixed-size row fully into view with the least movement, or null
45
+ * when the row is already fully visible.
46
+ */
47
+ export declare function scrollOffsetToReveal(index: number, itemSize: number, scrollOffset: number, viewportSize: number): number | null;
48
+ /** Tree data (PrimeNG `TreeNode`). `key` must be unique in the tree. */
49
+ export interface StarTreeNode<T = unknown> {
50
+ readonly key: string;
51
+ readonly label: string;
52
+ readonly icon?: string;
53
+ readonly data?: T;
54
+ readonly children?: readonly StarTreeNode<T>[];
55
+ readonly selectable?: boolean;
56
+ readonly disabled?: boolean;
57
+ }
58
+ type VisibleNode = TreeRow<StarTreeNode>;
59
+ /**
60
+ * Tree (PrimeNG `p-tree`): expand / collapse, single, multiple or checkbox selection (checkbox
61
+ * mode selects whole branches and shows mixed parents), filter, and the WAI-ARIA tree keyboard
62
+ * model (Up / Down, Right opens or enters, Left closes or goes to the parent, Home / End,
63
+ * Enter / Space select, `*` expands siblings).
64
+ *
65
+ * Large trees: `virtualScroll` with `scrollHeight` and `virtualItemSize` renders only the rows in
66
+ * and near the viewport (CDK virtual scrolling). Every row has a fixed height then. Keys, selection
67
+ * and `aria-setsize` / `aria-posinset` work over all open rows, also the ones that are not in the DOM.
68
+ *
69
+ * Value: the selected node keys.
70
+ * `<star-tree [nodes]="departments" selectionMode="checkbox" [(value)]="keys" filter ariaLabel="Departments" />`
71
+ */
72
+ export declare class StarTree implements FormValueControl<readonly string[]> {
73
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
74
+ private readonly host;
75
+ private readonly doc;
76
+ readonly value: import("@angular/core").ModelSignal<readonly string[]>;
77
+ readonly nodes: import("@angular/core").InputSignal<readonly StarTreeNode<unknown>[]>;
78
+ readonly selectionMode: import("@angular/core").InputSignal<"single" | "multiple" | "checkbox" | null>;
79
+ /** Expanded node keys. */
80
+ readonly expanded: import("@angular/core").ModelSignal<readonly string[]>;
81
+ readonly filter: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
82
+ /** Maximum height of the tree (a CSS length, for example `16rem`). The tree scrolls inside it. */
83
+ readonly scrollHeight: import("@angular/core").InputSignal<string | null>;
84
+ /**
85
+ * Windowed rendering for large trees (CDK virtual scrolling): only the rows in and near the
86
+ * viewport are in the DOM. Needs `scrollHeight`, and every row gets the fixed height
87
+ * `virtualItemSize`. Without `scrollHeight` the tree renders all rows as usual.
88
+ */
89
+ readonly virtualScroll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
90
+ /** Row height in pixels in windowed rendering. Keep it equal to the real height of a row. */
91
+ readonly virtualItemSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
92
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
93
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
94
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
95
+ readonly nodeSelect: import("@angular/core").OutputEmitterRef<StarTreeNode<unknown>>;
96
+ protected readonly query: import("@angular/core").WritableSignal<string>;
97
+ private readonly viewport;
98
+ private readonly filtered;
99
+ private readonly index;
100
+ private readonly parents;
101
+ private readonly openKeys;
102
+ private readonly selectedKeys;
103
+ /** Flattened visible rows; a filter shows every matching branch open. */
104
+ protected readonly visible: import("@angular/core").Signal<VisibleNode[]>;
105
+ private readonly rowIndex;
106
+ /** Check state of each node of the (filtered) tree; empty outside checkbox mode. */
107
+ private readonly checkMap;
108
+ /**
109
+ * The active row (the one with `tabindex` 0). It stays a row after the rows change, and it
110
+ * is kept in state, not read from the DOM: in windowed rendering its element may not exist.
111
+ */
112
+ protected readonly focusKey: import("@angular/core").WritableSignal<string | null>;
113
+ protected readonly windowed: import("@angular/core").Signal<boolean>;
114
+ /** The windowed viewport shows when there are rows; the empty message needs the plain list. */
115
+ protected readonly showViewport: import("@angular/core").Signal<boolean>;
116
+ /** Height of the viewport: as high as the rows, at most `scrollHeight`. */
117
+ protected readonly viewportHeight: import("@angular/core").Signal<string>;
118
+ /** Rows that are in the DOM now: indexes `start` up to (not including) `end`. */
119
+ private readonly range;
120
+ /** The active row is in the DOM. If it is not, the viewport takes the Tab stop. */
121
+ protected readonly activeRendered: import("@angular/core").Signal<boolean>;
122
+ protected readonly multiselectable: import("@angular/core").Signal<true | null>;
123
+ /** Row to focus as soon as its element exists (it may need scrolling in first). */
124
+ private pendingFocus;
125
+ /** The focus waits on the viewport because the focused row left the DOM. */
126
+ protected parked: boolean;
127
+ protected readonly trackRow: (_: number, row: VisibleNode) => string;
128
+ constructor();
129
+ isExpanded(node: StarTreeNode): boolean;
130
+ toggle(node: StarTreeNode, open?: boolean): void;
131
+ protected isSelected(node: StarTreeNode): boolean;
132
+ /** Checkbox mode: true, false or 'mixed' from the leaves below. */
133
+ protected checkState(node: StarTreeNode): boolean | 'mixed';
134
+ select(node: StarTreeNode): void;
135
+ protected onClick(node: StarTreeNode, event: MouseEvent): void;
136
+ protected onRowFocus(key: string): void;
137
+ /**
138
+ * Moves the focus to a row. The row becomes the active row at once. In windowed rendering the
139
+ * row is scrolled into the window first, and the focus is applied after its element renders.
140
+ */
141
+ private focusRow;
142
+ /** Scrolls a row into the window with the least movement (`scrollToIndex` puts it on top). */
143
+ private revealRow;
144
+ private rowElement;
145
+ private applyPendingFocus;
146
+ /**
147
+ * The browser drops the focus to the page body when the focused element leaves the DOM. Before
148
+ * the focused row scrolls out of the window, the focus moves to the viewport; the keys still
149
+ * work there, and the focus returns to the row when it renders again.
150
+ */
151
+ private parkFocus;
152
+ private restoreParkedFocus;
153
+ /** Tab into the viewport (no row has the Tab stop): the focus goes to the active row. */
154
+ protected onViewportFocus(): void;
155
+ /** Keys on the viewport itself (the focus is parked there): they act on the active row. */
156
+ protected onViewportKeydown(event: KeyboardEvent): void;
157
+ protected onKeydown(event: KeyboardEvent, row: VisibleNode): void;
158
+ /** Label of a node key (used by `star-tree-select`). */
159
+ labelFor(key: string): string;
160
+ /** Keys of leaves only, for checkbox summaries. */
161
+ isLeaf(key: string): boolean;
162
+ focus(): void;
163
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarTree, never>;
164
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarTree, "star-tree", never, {
165
+ "value": {
166
+ "alias": "value";
167
+ "required": false;
168
+ "isSignal": true;
169
+ };
170
+ "nodes": {
171
+ "alias": "nodes";
172
+ "required": false;
173
+ "isSignal": true;
174
+ };
175
+ "selectionMode": {
176
+ "alias": "selectionMode";
177
+ "required": false;
178
+ "isSignal": true;
179
+ };
180
+ "expanded": {
181
+ "alias": "expanded";
182
+ "required": false;
183
+ "isSignal": true;
184
+ };
185
+ "filter": {
186
+ "alias": "filter";
187
+ "required": false;
188
+ "isSignal": true;
189
+ };
190
+ "scrollHeight": {
191
+ "alias": "scrollHeight";
192
+ "required": false;
193
+ "isSignal": true;
194
+ };
195
+ "virtualScroll": {
196
+ "alias": "virtualScroll";
197
+ "required": false;
198
+ "isSignal": true;
199
+ };
200
+ "virtualItemSize": {
201
+ "alias": "virtualItemSize";
202
+ "required": false;
203
+ "isSignal": true;
204
+ };
205
+ "ariaLabel": {
206
+ "alias": "ariaLabel";
207
+ "required": false;
208
+ "isSignal": true;
209
+ };
210
+ "disabled": {
211
+ "alias": "disabled";
212
+ "required": false;
213
+ "isSignal": true;
214
+ };
215
+ }, {
216
+ "value": "valueChange";
217
+ "expanded": "expandedChange";
218
+ "touch": "touch";
219
+ "nodeSelect": "nodeSelect";
220
+ }, never, never, true, never>;
221
+ }
222
+ /**
223
+ * Tree select (PrimeNG `p-treeselect`): a select field whose panel is an `star-tree`.
224
+ * Value: selected node keys (one key in `single` mode).
225
+ *
226
+ * `<star-tree-select [nodes]="departments" selectionMode="checkbox" [(value)]="keys" placeholder="Department" />`
227
+ */
228
+ export declare class StarTreeSelect implements FormValueControl<readonly string[]> {
229
+ /** Keeps the CDK direction (overlays and menus) in step with `<html dir>`. */
230
+ private readonly directionSync;
231
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
232
+ protected readonly inputId: string;
233
+ protected readonly positions: ConnectedPosition[];
234
+ readonly value: import("@angular/core").ModelSignal<readonly string[]>;
235
+ readonly nodes: import("@angular/core").InputSignal<readonly StarTreeNode<unknown>[]>;
236
+ readonly selectionMode: import("@angular/core").InputSignal<"single" | "multiple" | "checkbox">;
237
+ readonly expanded: import("@angular/core").ModelSignal<readonly string[]>;
238
+ readonly filter: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
239
+ /** Windowed rendering of the panel tree (see `star-tree`). The panel is 18rem high. */
240
+ readonly virtualScroll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
241
+ /** Row height in pixels in windowed rendering. */
242
+ readonly virtualItemSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
243
+ readonly showClear: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
244
+ readonly placeholder: import("@angular/core").InputSignal<string | null>;
245
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
246
+ readonly maxSelectedLabels: import("@angular/core").InputSignal<number>;
247
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
248
+ readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
249
+ readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
250
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
251
+ protected readonly open: import("@angular/core").WritableSignal<boolean>;
252
+ protected readonly panelTree: import("@angular/core").Signal<StarTree | undefined>;
253
+ private readonly trigger;
254
+ private readonly labels;
255
+ protected readonly summary: import("@angular/core").Signal<string>;
256
+ /**
257
+ * Accessible name of the trigger button: the label and the text on the button, so the visible
258
+ * text is part of the name (WCAG 2.5.3). `null` without `ariaLabel`: a `star-field` label then
259
+ * names the button.
260
+ */
261
+ protected readonly triggerName: import("@angular/core").Signal<string | null>;
262
+ protected close(focus?: boolean): void;
263
+ protected onOutside(event: MouseEvent): void;
264
+ focus(): void;
265
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarTreeSelect, never>;
266
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarTreeSelect, "star-tree-select", never, {
267
+ "value": {
268
+ "alias": "value";
269
+ "required": false;
270
+ "isSignal": true;
271
+ };
272
+ "nodes": {
273
+ "alias": "nodes";
274
+ "required": false;
275
+ "isSignal": true;
276
+ };
277
+ "selectionMode": {
278
+ "alias": "selectionMode";
279
+ "required": false;
280
+ "isSignal": true;
281
+ };
282
+ "expanded": {
283
+ "alias": "expanded";
284
+ "required": false;
285
+ "isSignal": true;
286
+ };
287
+ "filter": {
288
+ "alias": "filter";
289
+ "required": false;
290
+ "isSignal": true;
291
+ };
292
+ "virtualScroll": {
293
+ "alias": "virtualScroll";
294
+ "required": false;
295
+ "isSignal": true;
296
+ };
297
+ "virtualItemSize": {
298
+ "alias": "virtualItemSize";
299
+ "required": false;
300
+ "isSignal": true;
301
+ };
302
+ "showClear": {
303
+ "alias": "showClear";
304
+ "required": false;
305
+ "isSignal": true;
306
+ };
307
+ "placeholder": {
308
+ "alias": "placeholder";
309
+ "required": false;
310
+ "isSignal": true;
311
+ };
312
+ "ariaLabel": {
313
+ "alias": "ariaLabel";
314
+ "required": false;
315
+ "isSignal": true;
316
+ };
317
+ "maxSelectedLabels": {
318
+ "alias": "maxSelectedLabels";
319
+ "required": false;
320
+ "isSignal": true;
321
+ };
322
+ "disabled": {
323
+ "alias": "disabled";
324
+ "required": false;
325
+ "isSignal": true;
326
+ };
327
+ "invalid": {
328
+ "alias": "invalid";
329
+ "required": false;
330
+ "isSignal": true;
331
+ };
332
+ "touched": {
333
+ "alias": "touched";
334
+ "required": false;
335
+ "isSignal": true;
336
+ };
337
+ }, {
338
+ "value": "valueChange";
339
+ "expanded": "expandedChange";
340
+ "touch": "touch";
341
+ }, never, never, true, never>;
342
+ }
343
+ export type { BranchLike, TreeRow };