@angular/cdk-experimental 21.0.0-next.4 → 21.0.0-next.6
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.
- package/fesm2022/{accordion2.mjs → _accordion-chunk.mjs} +4 -3
- package/fesm2022/_accordion-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-chunk.mjs +278 -0
- package/fesm2022/_combobox-chunk.mjs.map +1 -0
- package/fesm2022/{option.mjs → _combobox-listbox-chunk.mjs} +55 -8
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-tree-chunk.mjs +398 -0
- package/fesm2022/_combobox-tree-chunk.mjs.map +1 -0
- package/fesm2022/{expansion.mjs → _expansion-chunk.mjs} +2 -2
- package/fesm2022/_expansion-chunk.mjs.map +1 -0
- package/fesm2022/{list.mjs → _list-chunk.mjs} +9 -5
- package/fesm2022/_list-chunk.mjs.map +1 -0
- package/fesm2022/_list-navigation-chunk.mjs +131 -0
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -0
- package/fesm2022/{list-navigation.mjs → _pointer-event-manager-chunk.mjs} +2 -118
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -0
- package/fesm2022/{polyfill.mjs → _polyfill-chunk.mjs} +1 -1
- package/fesm2022/_polyfill-chunk.mjs.map +1 -0
- package/fesm2022/{tabs2.mjs → _tabs-chunk.mjs} +4 -4
- package/fesm2022/_tabs-chunk.mjs.map +1 -0
- package/fesm2022/_toolbar-chunk.mjs +273 -0
- package/fesm2022/_toolbar-chunk.mjs.map +1 -0
- package/fesm2022/_toolbar-radio-group-chunk.mjs +222 -0
- package/fesm2022/_toolbar-radio-group-chunk.mjs.map +1 -0
- package/fesm2022/accordion.mjs +4 -3
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +1 -1
- package/fesm2022/combobox.mjs +99 -308
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +6 -7
- package/fesm2022/deferred-content.mjs.map +1 -1
- package/fesm2022/listbox.mjs +53 -12
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs +1 -1
- package/fesm2022/radio-group.mjs +42 -47
- package/fesm2022/radio-group.mjs.map +1 -1
- package/fesm2022/tabs.mjs +5 -4
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +69 -19
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +57 -344
- package/fesm2022/tree.mjs.map +1 -1
- package/fesm2022/ui-patterns.mjs +11 -8
- package/fesm2022/ui-patterns.mjs.map +1 -1
- package/package.json +18 -18
- package/{accordion.d.d.ts → types/_accordion-chunk.d.ts} +3 -2
- package/types/_combobox-chunk.d.ts +138 -0
- package/{expansion.d.d.ts → types/_expansion-chunk.d.ts} +2 -2
- package/{list.d.d.ts → types/_list-chunk.d.ts} +4 -2
- package/{pointer-event-manager.d.d.ts → types/_list-navigation-chunk.d.ts} +7 -96
- package/{listbox.d.d.ts → types/_listbox-chunk.d.ts} +8 -4
- package/types/_pointer-event-manager-chunk.d.ts +98 -0
- package/types/_radio-group-chunk.d.ts +92 -0
- package/{tabs.d.d.ts → types/_tabs-chunk.d.ts} +4 -3
- package/types/_toolbar-chunk.d.ts +150 -0
- package/types/_tree-chunk.d.ts +139 -0
- package/{accordion/index.d.ts → types/accordion.d.ts} +4 -3
- package/types/combobox.d.ts +54 -0
- package/{deferred-content/index.d.ts → types/deferred-content.d.ts} +3 -3
- package/{listbox/index.d.ts → types/listbox.d.ts} +15 -5
- package/{radio-group/index.d.ts → types/radio-group.d.ts} +21 -23
- package/{tabs/index.d.ts → types/tabs.d.ts} +5 -4
- package/types/toolbar.d.ts +115 -0
- package/{tree/index.d.ts → types/tree.d.ts} +17 -137
- package/types/ui-patterns.d.ts +157 -0
- package/combobox/index.d.ts +0 -94
- package/fesm2022/accordion2.mjs.map +0 -1
- package/fesm2022/expansion.mjs.map +0 -1
- package/fesm2022/list-navigation.mjs.map +0 -1
- package/fesm2022/list.mjs.map +0 -1
- package/fesm2022/option.mjs.map +0 -1
- package/fesm2022/polyfill.mjs.map +0 -1
- package/fesm2022/radio-group2.mjs +0 -143
- package/fesm2022/radio-group2.mjs.map +0 -1
- package/fesm2022/tabs2.mjs.map +0 -1
- package/fesm2022/toolbar2.mjs +0 -224
- package/fesm2022/toolbar2.mjs.map +0 -1
- package/radio-group.d.d.ts +0 -80
- package/toolbar/index.d.ts +0 -91
- package/toolbar.d.d.ts +0 -136
- package/ui-patterns/index.d.ts +0 -9
- /package/{index.d.ts → types/cdk-experimental.d.ts} +0 -0
- /package/{column-resize/index.d.ts → types/column-resize.d.ts} +0 -0
- /package/{popover-edit/index.d.ts → types/popover-edit.d.ts} +0 -0
- /package/{scrolling/index.d.ts → types/scrolling.d.ts} +0 -0
- /package/{selection/index.d.ts → types/selection.d.ts} +0 -0
- /package/{table-scroll-container/index.d.ts → types/table-scroll-container.d.ts} +0 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import { computed, signal } from '@angular/core';
|
|
2
|
+
import { List } from './_list-chunk.mjs';
|
|
3
|
+
import { ExpansionControl, ListExpansion } from './_expansion-chunk.mjs';
|
|
4
|
+
import { Modifier, KeyboardEventManager, PointerEventManager } from './_pointer-event-manager-chunk.mjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Represents an item in a Tree.
|
|
8
|
+
*/
|
|
9
|
+
class TreeItemPattern {
|
|
10
|
+
inputs;
|
|
11
|
+
/** The position of this item among its siblings. */
|
|
12
|
+
index = computed(() => this.tree().visibleItems().indexOf(this));
|
|
13
|
+
/** The unique identifier used by the expansion behavior. */
|
|
14
|
+
expansionId;
|
|
15
|
+
/** Controls expansion for child items. */
|
|
16
|
+
expansionManager;
|
|
17
|
+
/** Controls expansion for this item. */
|
|
18
|
+
expansion;
|
|
19
|
+
/** Whether the item is expandable. It's expandable if children item exist. */
|
|
20
|
+
expandable;
|
|
21
|
+
/** The level of the current item in a tree. */
|
|
22
|
+
level = computed(() => this.parent().level() + 1);
|
|
23
|
+
/** Whether this item is currently expanded. */
|
|
24
|
+
expanded = computed(() => this.expansion.isExpanded());
|
|
25
|
+
/** Whether this item is visible. */
|
|
26
|
+
visible = computed(() => this.parent().expanded());
|
|
27
|
+
/** The number of items under the same parent at the same level. */
|
|
28
|
+
setsize = computed(() => this.parent().children().length);
|
|
29
|
+
/** The position of this item among its siblings (1-based). */
|
|
30
|
+
posinset = computed(() => this.parent().children().indexOf(this) + 1);
|
|
31
|
+
/** Whether the item is active. */
|
|
32
|
+
active = computed(() => this.tree().activeItem() === this);
|
|
33
|
+
/** The tabindex of the item. */
|
|
34
|
+
tabindex = computed(() => this.tree().listBehavior.getItemTabindex(this));
|
|
35
|
+
/** Whether the item is selected. */
|
|
36
|
+
selected = computed(() => {
|
|
37
|
+
if (this.tree().nav()) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return this.tree().value().includes(this.value());
|
|
41
|
+
});
|
|
42
|
+
/** The current type of this item. */
|
|
43
|
+
current = computed(() => {
|
|
44
|
+
if (!this.tree().nav()) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
return this.tree().value().includes(this.value()) ? this.tree().currentType() : undefined;
|
|
48
|
+
});
|
|
49
|
+
constructor(inputs) {
|
|
50
|
+
this.inputs = inputs;
|
|
51
|
+
this.id = inputs.id;
|
|
52
|
+
this.value = inputs.value;
|
|
53
|
+
this.element = inputs.element;
|
|
54
|
+
this.disabled = inputs.disabled;
|
|
55
|
+
this.searchTerm = inputs.searchTerm;
|
|
56
|
+
this.expansionId = inputs.id;
|
|
57
|
+
this.tree = inputs.tree;
|
|
58
|
+
this.parent = inputs.parent;
|
|
59
|
+
this.children = inputs.children;
|
|
60
|
+
this.expandable = inputs.hasChildren;
|
|
61
|
+
this.expansion = new ExpansionControl({
|
|
62
|
+
...inputs,
|
|
63
|
+
expandable: this.expandable,
|
|
64
|
+
expansionId: this.expansionId,
|
|
65
|
+
expansionManager: this.parent().expansionManager,
|
|
66
|
+
});
|
|
67
|
+
this.expansionManager = new ListExpansion({
|
|
68
|
+
...inputs,
|
|
69
|
+
multiExpandable: () => true,
|
|
70
|
+
// TODO(ok7sai): allow pre-expanded tree items.
|
|
71
|
+
expandedIds: signal([]),
|
|
72
|
+
items: this.children,
|
|
73
|
+
disabled: computed(() => this.tree()?.disabled() ?? false),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** Controls the state and interactions of a tree view. */
|
|
78
|
+
class TreePattern {
|
|
79
|
+
inputs;
|
|
80
|
+
/** The list behavior for the tree. */
|
|
81
|
+
listBehavior;
|
|
82
|
+
/** Controls expansion for direct children of the tree root (top-level items). */
|
|
83
|
+
expansionManager;
|
|
84
|
+
/** The root level is 0. */
|
|
85
|
+
level = () => 0;
|
|
86
|
+
/** The root is always expanded. */
|
|
87
|
+
expanded = () => true;
|
|
88
|
+
/** The tabindex of the tree. */
|
|
89
|
+
tabindex = computed(() => this.listBehavior.tabindex());
|
|
90
|
+
/** The id of the current active item. */
|
|
91
|
+
activedescendant = computed(() => this.listBehavior.activedescendant());
|
|
92
|
+
/** The direct children of the root (top-level tree items). */
|
|
93
|
+
children = computed(() => this.inputs.allItems().filter(item => item.level() === this.level() + 1));
|
|
94
|
+
/** All currently visible tree items. An item is visible if their parent is expanded. */
|
|
95
|
+
visibleItems = computed(() => this.inputs.allItems().filter(item => item.visible()));
|
|
96
|
+
/** Whether the tree selection follows focus. */
|
|
97
|
+
followFocus = computed(() => this.inputs.selectionMode() === 'follow');
|
|
98
|
+
/** The key for navigating to the previous item. */
|
|
99
|
+
prevKey = computed(() => {
|
|
100
|
+
if (this.inputs.orientation() === 'vertical') {
|
|
101
|
+
return 'ArrowUp';
|
|
102
|
+
}
|
|
103
|
+
return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';
|
|
104
|
+
});
|
|
105
|
+
/** The key for navigating to the next item. */
|
|
106
|
+
nextKey = computed(() => {
|
|
107
|
+
if (this.inputs.orientation() === 'vertical') {
|
|
108
|
+
return 'ArrowDown';
|
|
109
|
+
}
|
|
110
|
+
return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';
|
|
111
|
+
});
|
|
112
|
+
/** The key for collapsing an item or moving to its parent. */
|
|
113
|
+
collapseKey = computed(() => {
|
|
114
|
+
if (this.inputs.orientation() === 'horizontal') {
|
|
115
|
+
return 'ArrowUp';
|
|
116
|
+
}
|
|
117
|
+
return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';
|
|
118
|
+
});
|
|
119
|
+
/** The key for expanding an item or moving to its first child. */
|
|
120
|
+
expandKey = computed(() => {
|
|
121
|
+
if (this.inputs.orientation() === 'horizontal') {
|
|
122
|
+
return 'ArrowDown';
|
|
123
|
+
}
|
|
124
|
+
return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';
|
|
125
|
+
});
|
|
126
|
+
/** Represents the space key. Does nothing when the user is actively using typeahead. */
|
|
127
|
+
dynamicSpaceKey = computed(() => (this.listBehavior.isTyping() ? '' : ' '));
|
|
128
|
+
/** Regular expression to match characters for typeahead. */
|
|
129
|
+
typeaheadRegexp = /^.$/;
|
|
130
|
+
/** The keydown event manager for the tree. */
|
|
131
|
+
keydown = computed(() => {
|
|
132
|
+
const manager = new KeyboardEventManager();
|
|
133
|
+
const list = this.listBehavior;
|
|
134
|
+
manager
|
|
135
|
+
.on(this.prevKey, () => list.prev({ selectOne: this.followFocus() }))
|
|
136
|
+
.on(this.nextKey, () => list.next({ selectOne: this.followFocus() }))
|
|
137
|
+
.on('Home', () => list.first({ selectOne: this.followFocus() }))
|
|
138
|
+
.on('End', () => list.last({ selectOne: this.followFocus() }))
|
|
139
|
+
.on(this.typeaheadRegexp, e => list.search(e.key, { selectOne: this.followFocus() }))
|
|
140
|
+
.on(this.expandKey, () => this.expand({ selectOne: this.followFocus() }))
|
|
141
|
+
.on(this.collapseKey, () => this.collapse({ selectOne: this.followFocus() }))
|
|
142
|
+
.on(Modifier.Shift, '*', () => this.expandSiblings());
|
|
143
|
+
if (this.inputs.multi()) {
|
|
144
|
+
manager
|
|
145
|
+
// TODO: Tracking the anchor by index can break if the
|
|
146
|
+
// tree is expanded or collapsed causing the index to change.
|
|
147
|
+
.on(Modifier.Any, 'Shift', () => list.anchor(this.listBehavior.activeIndex()))
|
|
148
|
+
.on(Modifier.Shift, this.prevKey, () => list.prev({ selectRange: true }))
|
|
149
|
+
.on(Modifier.Shift, this.nextKey, () => list.next({ selectRange: true }))
|
|
150
|
+
.on([Modifier.Ctrl | Modifier.Shift, Modifier.Meta | Modifier.Shift], 'Home', () => list.first({ selectRange: true, anchor: false }))
|
|
151
|
+
.on([Modifier.Ctrl | Modifier.Shift, Modifier.Meta | Modifier.Shift], 'End', () => list.last({ selectRange: true, anchor: false }))
|
|
152
|
+
.on(Modifier.Shift, 'Enter', () => list.updateSelection({ selectRange: true, anchor: false }))
|
|
153
|
+
.on(Modifier.Shift, this.dynamicSpaceKey, () => list.updateSelection({ selectRange: true, anchor: false }));
|
|
154
|
+
}
|
|
155
|
+
if (!this.followFocus() && this.inputs.multi()) {
|
|
156
|
+
manager
|
|
157
|
+
.on(this.dynamicSpaceKey, () => list.toggle())
|
|
158
|
+
.on('Enter', () => list.toggle())
|
|
159
|
+
.on([Modifier.Ctrl, Modifier.Meta], 'A', () => list.toggleAll());
|
|
160
|
+
}
|
|
161
|
+
if (!this.followFocus() && !this.inputs.multi()) {
|
|
162
|
+
manager.on(this.dynamicSpaceKey, () => list.selectOne());
|
|
163
|
+
manager.on('Enter', () => list.selectOne());
|
|
164
|
+
}
|
|
165
|
+
if (this.inputs.multi() && this.followFocus()) {
|
|
166
|
+
manager
|
|
167
|
+
.on([Modifier.Ctrl, Modifier.Meta], this.prevKey, () => list.prev())
|
|
168
|
+
.on([Modifier.Ctrl, Modifier.Meta], this.nextKey, () => list.next())
|
|
169
|
+
.on([Modifier.Ctrl, Modifier.Meta], this.expandKey, () => this.expand())
|
|
170
|
+
.on([Modifier.Ctrl, Modifier.Meta], this.collapseKey, () => this.collapse())
|
|
171
|
+
.on([Modifier.Ctrl, Modifier.Meta], ' ', () => list.toggle())
|
|
172
|
+
.on([Modifier.Ctrl, Modifier.Meta], 'Enter', () => list.toggle())
|
|
173
|
+
.on([Modifier.Ctrl, Modifier.Meta], 'Home', () => list.first())
|
|
174
|
+
.on([Modifier.Ctrl, Modifier.Meta], 'End', () => list.last())
|
|
175
|
+
.on([Modifier.Ctrl, Modifier.Meta], 'A', () => {
|
|
176
|
+
list.toggleAll();
|
|
177
|
+
list.select(); // Ensure the currect item remains selected.
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
return manager;
|
|
181
|
+
});
|
|
182
|
+
/** The pointerdown event manager for the tree. */
|
|
183
|
+
pointerdown = computed(() => {
|
|
184
|
+
const manager = new PointerEventManager();
|
|
185
|
+
if (this.multi()) {
|
|
186
|
+
manager.on(Modifier.Shift, e => this.goto(e, { selectRange: true }));
|
|
187
|
+
}
|
|
188
|
+
if (!this.multi()) {
|
|
189
|
+
return manager.on(e => this.goto(e, { selectOne: true }));
|
|
190
|
+
}
|
|
191
|
+
if (this.multi() && this.followFocus()) {
|
|
192
|
+
return manager
|
|
193
|
+
.on(e => this.goto(e, { selectOne: true }))
|
|
194
|
+
.on(Modifier.Ctrl, e => this.goto(e, { toggle: true }));
|
|
195
|
+
}
|
|
196
|
+
if (this.multi() && !this.followFocus()) {
|
|
197
|
+
return manager.on(e => this.goto(e, { toggle: true }));
|
|
198
|
+
}
|
|
199
|
+
return manager;
|
|
200
|
+
});
|
|
201
|
+
constructor(inputs) {
|
|
202
|
+
this.inputs = inputs;
|
|
203
|
+
this.id = inputs.id;
|
|
204
|
+
this.nav = inputs.nav;
|
|
205
|
+
this.currentType = inputs.currentType;
|
|
206
|
+
this.allItems = inputs.allItems;
|
|
207
|
+
this.focusMode = inputs.focusMode;
|
|
208
|
+
this.disabled = inputs.disabled;
|
|
209
|
+
this.activeItem = inputs.activeItem;
|
|
210
|
+
this.skipDisabled = inputs.skipDisabled;
|
|
211
|
+
this.wrap = inputs.wrap;
|
|
212
|
+
this.orientation = inputs.orientation;
|
|
213
|
+
this.textDirection = inputs.textDirection;
|
|
214
|
+
this.multi = computed(() => (this.nav() ? false : this.inputs.multi()));
|
|
215
|
+
this.selectionMode = inputs.selectionMode;
|
|
216
|
+
this.typeaheadDelay = inputs.typeaheadDelay;
|
|
217
|
+
this.value = inputs.value;
|
|
218
|
+
this.listBehavior = new List({
|
|
219
|
+
...inputs,
|
|
220
|
+
items: this.visibleItems,
|
|
221
|
+
multi: this.multi,
|
|
222
|
+
});
|
|
223
|
+
this.expansionManager = new ListExpansion({
|
|
224
|
+
multiExpandable: () => true,
|
|
225
|
+
// TODO(ok7sai): allow pre-expanded tree items.
|
|
226
|
+
expandedIds: signal([]),
|
|
227
|
+
items: this.children,
|
|
228
|
+
disabled: this.disabled,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Sets the tree to it's default initial state.
|
|
233
|
+
*
|
|
234
|
+
* Sets the active index of the tree to the first focusable selected tree item if one exists.
|
|
235
|
+
* Otherwise, sets focus to the first focusable tree item.
|
|
236
|
+
*/
|
|
237
|
+
setDefaultState() {
|
|
238
|
+
let firstItem;
|
|
239
|
+
for (const item of this.allItems()) {
|
|
240
|
+
if (!item.visible())
|
|
241
|
+
continue;
|
|
242
|
+
if (!this.listBehavior.isFocusable(item))
|
|
243
|
+
continue;
|
|
244
|
+
if (firstItem === undefined) {
|
|
245
|
+
firstItem = item;
|
|
246
|
+
}
|
|
247
|
+
if (item.selected()) {
|
|
248
|
+
this.activeItem.set(item);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (firstItem !== undefined) {
|
|
253
|
+
this.activeItem.set(firstItem);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
/** Handles keydown events on the tree. */
|
|
257
|
+
onKeydown(event) {
|
|
258
|
+
if (!this.disabled()) {
|
|
259
|
+
this.keydown().handle(event);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/** Handles pointerdown events on the tree. */
|
|
263
|
+
onPointerdown(event) {
|
|
264
|
+
if (!this.disabled()) {
|
|
265
|
+
this.pointerdown().handle(event);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/** Navigates to the given tree item in the tree. */
|
|
269
|
+
goto(e, opts) {
|
|
270
|
+
const item = this._getItem(e);
|
|
271
|
+
if (!item)
|
|
272
|
+
return;
|
|
273
|
+
this.listBehavior.goto(item, opts);
|
|
274
|
+
this.toggleExpansion(item);
|
|
275
|
+
}
|
|
276
|
+
/** Toggles to expand or collapse a tree item. */
|
|
277
|
+
toggleExpansion(item) {
|
|
278
|
+
item ??= this.activeItem();
|
|
279
|
+
if (!item || !this.listBehavior.isFocusable(item))
|
|
280
|
+
return;
|
|
281
|
+
if (!item.expandable())
|
|
282
|
+
return;
|
|
283
|
+
if (item.expanded()) {
|
|
284
|
+
this.collapse();
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
item.expansion.open();
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/** Expands a tree item. */
|
|
291
|
+
expand(opts) {
|
|
292
|
+
const item = this.activeItem();
|
|
293
|
+
if (!item || !this.listBehavior.isFocusable(item))
|
|
294
|
+
return;
|
|
295
|
+
if (item.expandable() && !item.expanded()) {
|
|
296
|
+
item.expansion.open();
|
|
297
|
+
}
|
|
298
|
+
else if (item.expanded() &&
|
|
299
|
+
item.children().some(item => this.listBehavior.isFocusable(item))) {
|
|
300
|
+
this.listBehavior.next(opts);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
/** Expands all sibling tree items including itself. */
|
|
304
|
+
expandSiblings(item) {
|
|
305
|
+
item ??= this.activeItem();
|
|
306
|
+
const siblings = item?.parent()?.children();
|
|
307
|
+
siblings?.forEach(item => item.expansion.open());
|
|
308
|
+
}
|
|
309
|
+
/** Collapses a tree item. */
|
|
310
|
+
collapse(opts) {
|
|
311
|
+
const item = this.activeItem();
|
|
312
|
+
if (!item || !this.listBehavior.isFocusable(item))
|
|
313
|
+
return;
|
|
314
|
+
if (item.expandable() && item.expanded()) {
|
|
315
|
+
item.expansion.close();
|
|
316
|
+
}
|
|
317
|
+
else if (item.parent() && item.parent() !== this) {
|
|
318
|
+
const parentItem = item.parent();
|
|
319
|
+
if (parentItem instanceof TreeItemPattern && this.listBehavior.isFocusable(parentItem)) {
|
|
320
|
+
this.listBehavior.goto(parentItem, opts);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
/** Retrieves the TreeItemPattern associated with a DOM event, if any. */
|
|
325
|
+
_getItem(event) {
|
|
326
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
const element = event.target.closest('[role="treeitem"]');
|
|
330
|
+
return this.inputs.allItems().find(i => i.element() === element);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
class ComboboxTreePattern extends TreePattern {
|
|
335
|
+
inputs;
|
|
336
|
+
/** Whether the currently focused item is collapsible. */
|
|
337
|
+
isItemCollapsible = () => this.activeItem()?.parent() instanceof TreeItemPattern;
|
|
338
|
+
/** The ARIA role for the tree. */
|
|
339
|
+
role = () => 'tree';
|
|
340
|
+
/* The id of the active (focused) item in the tree. */
|
|
341
|
+
activeId = computed(() => this.listBehavior.activedescendant());
|
|
342
|
+
/** The list of items in the tree. */
|
|
343
|
+
items = computed(() => this.inputs.allItems());
|
|
344
|
+
/** The tabindex for the tree. Always -1 because the combobox handles focus. */
|
|
345
|
+
tabindex = () => -1;
|
|
346
|
+
constructor(inputs) {
|
|
347
|
+
if (inputs.combobox()) {
|
|
348
|
+
inputs.multi = () => false;
|
|
349
|
+
inputs.focusMode = () => 'activedescendant';
|
|
350
|
+
inputs.element = inputs.combobox().inputs.inputEl;
|
|
351
|
+
}
|
|
352
|
+
super(inputs);
|
|
353
|
+
this.inputs = inputs;
|
|
354
|
+
}
|
|
355
|
+
/** Noop. The combobox handles keydown events. */
|
|
356
|
+
onKeydown(_) { }
|
|
357
|
+
/** Noop. The combobox handles pointerdown events. */
|
|
358
|
+
onPointerdown(_) { }
|
|
359
|
+
/** Noop. The combobox controls the open state. */
|
|
360
|
+
setDefaultState() { }
|
|
361
|
+
/** Navigates to the specified item in the tree. */
|
|
362
|
+
focus = (item) => this.listBehavior.goto(item);
|
|
363
|
+
/** Navigates to the next focusable item in the tree. */
|
|
364
|
+
next = () => this.listBehavior.next();
|
|
365
|
+
/** Navigates to the previous focusable item in the tree. */
|
|
366
|
+
prev = () => this.listBehavior.prev();
|
|
367
|
+
/** Navigates to the last focusable item in the tree. */
|
|
368
|
+
last = () => this.listBehavior.last();
|
|
369
|
+
/** Navigates to the first focusable item in the tree. */
|
|
370
|
+
first = () => this.listBehavior.first();
|
|
371
|
+
/** Unfocuses the currently focused item in the tree. */
|
|
372
|
+
unfocus = () => this.listBehavior.unfocus();
|
|
373
|
+
/** Selects the specified item in the tree or the current active item if not provided. */
|
|
374
|
+
select = (item) => this.listBehavior.select(item);
|
|
375
|
+
/** Clears the selection in the tree. */
|
|
376
|
+
clearSelection = () => this.listBehavior.deselectAll();
|
|
377
|
+
/** Retrieves the TreeItemPattern associated with a pointer event. */
|
|
378
|
+
getItem = (e) => this._getItem(e);
|
|
379
|
+
/** Retrieves the currently selected item in the tree */
|
|
380
|
+
getSelectedItem = () => this.inputs.allItems().find(i => i.selected());
|
|
381
|
+
/** Sets the value of the combobox tree. */
|
|
382
|
+
setValue = (value) => this.inputs.value.set(value ? [value] : []);
|
|
383
|
+
/** Expands the currently focused item if it is expandable. */
|
|
384
|
+
expandItem = () => this.expand();
|
|
385
|
+
/** Collapses the currently focused item if it is expandable. */
|
|
386
|
+
collapseItem = () => this.collapse();
|
|
387
|
+
/** Whether the specified item or the currently active item is expandable. */
|
|
388
|
+
isItemExpandable(item = this.activeItem()) {
|
|
389
|
+
return item ? item.expandable() : false;
|
|
390
|
+
}
|
|
391
|
+
/** Expands all of the tree items. */
|
|
392
|
+
expandAll = () => this.items().forEach(item => item.expansion.open());
|
|
393
|
+
/** Collapses all of the tree items. */
|
|
394
|
+
collapseAll = () => this.items().forEach(item => item.expansion.close());
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export { ComboboxTreePattern, TreeItemPattern, TreePattern };
|
|
398
|
+
//# sourceMappingURL=_combobox-tree-chunk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_combobox-tree-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk-experimental/ui-patterns/tree/tree.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk-experimental/ui-patterns/tree/combobox-tree.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {computed, signal} from '@angular/core';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\nimport {List, ListInputs, ListItem} from '../behaviors/list/list';\nimport {ExpansionItem, ExpansionControl, ListExpansion} from '../behaviors/expansion/expansion';\nimport {KeyboardEventManager, PointerEventManager, Modifier} from '../behaviors/event-manager';\n\n/** Represents the required inputs for a tree item. */\nexport interface TreeItemInputs<V> extends Omit<ListItem<V>, 'index'> {\n /** The parent item. */\n parent: SignalLike<TreeItemPattern<V> | TreePattern<V>>;\n\n /** Whether this item has children. Children can be lazily loaded. */\n hasChildren: SignalLike<boolean>;\n\n /** The children items. */\n children: SignalLike<TreeItemPattern<V>[]>;\n\n /** The tree pattern this item belongs to. */\n tree: SignalLike<TreePattern<V>>;\n}\n\nexport interface TreeItemPattern<V> extends TreeItemInputs<V> {}\n/**\n * Represents an item in a Tree.\n */\nexport class TreeItemPattern<V> implements ExpansionItem {\n /** The position of this item among its siblings. */\n readonly index = computed(() => this.tree().visibleItems().indexOf(this));\n\n /** The unique identifier used by the expansion behavior. */\n readonly expansionId: SignalLike<string>;\n\n /** Controls expansion for child items. */\n readonly expansionManager: ListExpansion;\n\n /** Controls expansion for this item. */\n readonly expansion: ExpansionControl;\n\n /** Whether the item is expandable. It's expandable if children item exist. */\n readonly expandable: SignalLike<boolean>;\n\n /** The level of the current item in a tree. */\n readonly level: SignalLike<number> = computed(() => this.parent().level() + 1);\n\n /** Whether this item is currently expanded. */\n readonly expanded = computed(() => this.expansion.isExpanded());\n\n /** Whether this item is visible. */\n readonly visible = computed(() => this.parent().expanded());\n\n /** The number of items under the same parent at the same level. */\n readonly setsize = computed(() => this.parent().children().length);\n\n /** The position of this item among its siblings (1-based). */\n readonly posinset = computed(() => this.parent().children().indexOf(this) + 1);\n\n /** Whether the item is active. */\n readonly active = computed(() => this.tree().activeItem() === this);\n\n /** The tabindex of the item. */\n readonly tabindex = computed(() => this.tree().listBehavior.getItemTabindex(this));\n\n /** Whether the item is selected. */\n readonly selected = computed(() => {\n if (this.tree().nav()) {\n return undefined;\n }\n return this.tree().value().includes(this.value());\n });\n\n /** The current type of this item. */\n readonly current = computed(() => {\n if (!this.tree().nav()) {\n return undefined;\n }\n return this.tree().value().includes(this.value()) ? this.tree().currentType() : undefined;\n });\n\n constructor(readonly inputs: TreeItemInputs<V>) {\n this.id = inputs.id;\n this.value = inputs.value;\n this.element = inputs.element;\n this.disabled = inputs.disabled;\n this.searchTerm = inputs.searchTerm;\n this.expansionId = inputs.id;\n this.tree = inputs.tree;\n this.parent = inputs.parent;\n this.children = inputs.children;\n this.expandable = inputs.hasChildren;\n this.expansion = new ExpansionControl({\n ...inputs,\n expandable: this.expandable,\n expansionId: this.expansionId,\n expansionManager: this.parent().expansionManager,\n });\n this.expansionManager = new ListExpansion({\n ...inputs,\n multiExpandable: () => true,\n // TODO(ok7sai): allow pre-expanded tree items.\n expandedIds: signal([]),\n items: this.children,\n disabled: computed(() => this.tree()?.disabled() ?? false),\n });\n }\n}\n\n/** The selection operations that the tree can perform. */\ninterface SelectOptions {\n toggle?: boolean;\n selectOne?: boolean;\n selectRange?: boolean;\n anchor?: boolean;\n}\n\n/** Represents the required inputs for a tree. */\nexport interface TreeInputs<V> extends Omit<ListInputs<TreeItemPattern<V>, V>, 'items'> {\n /** A unique identifier for the tree. */\n id: SignalLike<string>;\n\n /** All items in the tree, in document order (DFS-like, a flattened list). */\n allItems: SignalLike<TreeItemPattern<V>[]>;\n\n /** Whether the tree is in navigation mode. */\n nav: SignalLike<boolean>;\n\n /** The aria-current type. */\n currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;\n}\n\nexport interface TreePattern<V> extends TreeInputs<V> {}\n/** Controls the state and interactions of a tree view. */\nexport class TreePattern<V> {\n /** The list behavior for the tree. */\n readonly listBehavior: List<TreeItemPattern<V>, V>;\n\n /** Controls expansion for direct children of the tree root (top-level items). */\n readonly expansionManager: ListExpansion;\n\n /** The root level is 0. */\n readonly level = () => 0;\n\n /** The root is always expanded. */\n readonly expanded = () => true;\n\n /** The tabindex of the tree. */\n tabindex: SignalLike<-1 | 0> = computed(() => this.listBehavior.tabindex());\n\n /** The id of the current active item. */\n readonly activedescendant = computed(() => this.listBehavior.activedescendant());\n\n /** The direct children of the root (top-level tree items). */\n readonly children = computed(() =>\n this.inputs.allItems().filter(item => item.level() === this.level() + 1),\n );\n\n /** All currently visible tree items. An item is visible if their parent is expanded. */\n readonly visibleItems = computed(() => this.inputs.allItems().filter(item => item.visible()));\n\n /** Whether the tree selection follows focus. */\n readonly followFocus = computed(() => this.inputs.selectionMode() === 'follow');\n\n /** The key for navigating to the previous item. */\n readonly prevKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowUp';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** The key for navigating to the next item. */\n readonly nextKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowDown';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The key for collapsing an item or moving to its parent. */\n readonly collapseKey = computed(() => {\n if (this.inputs.orientation() === 'horizontal') {\n return 'ArrowUp';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** The key for expanding an item or moving to its first child. */\n readonly expandKey = computed(() => {\n if (this.inputs.orientation() === 'horizontal') {\n return 'ArrowDown';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** Represents the space key. Does nothing when the user is actively using typeahead. */\n readonly dynamicSpaceKey = computed(() => (this.listBehavior.isTyping() ? '' : ' '));\n\n /** Regular expression to match characters for typeahead. */\n readonly typeaheadRegexp = /^.$/;\n\n /** The keydown event manager for the tree. */\n readonly keydown = computed(() => {\n const manager = new KeyboardEventManager();\n const list = this.listBehavior;\n\n manager\n .on(this.prevKey, () => list.prev({selectOne: this.followFocus()}))\n .on(this.nextKey, () => list.next({selectOne: this.followFocus()}))\n .on('Home', () => list.first({selectOne: this.followFocus()}))\n .on('End', () => list.last({selectOne: this.followFocus()}))\n .on(this.typeaheadRegexp, e => list.search(e.key, {selectOne: this.followFocus()}))\n .on(this.expandKey, () => this.expand({selectOne: this.followFocus()}))\n .on(this.collapseKey, () => this.collapse({selectOne: this.followFocus()}))\n .on(Modifier.Shift, '*', () => this.expandSiblings());\n\n if (this.inputs.multi()) {\n manager\n // TODO: Tracking the anchor by index can break if the\n // tree is expanded or collapsed causing the index to change.\n .on(Modifier.Any, 'Shift', () => list.anchor(this.listBehavior.activeIndex()))\n .on(Modifier.Shift, this.prevKey, () => list.prev({selectRange: true}))\n .on(Modifier.Shift, this.nextKey, () => list.next({selectRange: true}))\n .on([Modifier.Ctrl | Modifier.Shift, Modifier.Meta | Modifier.Shift], 'Home', () =>\n list.first({selectRange: true, anchor: false}),\n )\n .on([Modifier.Ctrl | Modifier.Shift, Modifier.Meta | Modifier.Shift], 'End', () =>\n list.last({selectRange: true, anchor: false}),\n )\n .on(Modifier.Shift, 'Enter', () => list.updateSelection({selectRange: true, anchor: false}))\n .on(Modifier.Shift, this.dynamicSpaceKey, () =>\n list.updateSelection({selectRange: true, anchor: false}),\n );\n }\n\n if (!this.followFocus() && this.inputs.multi()) {\n manager\n .on(this.dynamicSpaceKey, () => list.toggle())\n .on('Enter', () => list.toggle())\n .on([Modifier.Ctrl, Modifier.Meta], 'A', () => list.toggleAll());\n }\n\n if (!this.followFocus() && !this.inputs.multi()) {\n manager.on(this.dynamicSpaceKey, () => list.selectOne());\n manager.on('Enter', () => list.selectOne());\n }\n\n if (this.inputs.multi() && this.followFocus()) {\n manager\n .on([Modifier.Ctrl, Modifier.Meta], this.prevKey, () => list.prev())\n .on([Modifier.Ctrl, Modifier.Meta], this.nextKey, () => list.next())\n .on([Modifier.Ctrl, Modifier.Meta], this.expandKey, () => this.expand())\n .on([Modifier.Ctrl, Modifier.Meta], this.collapseKey, () => this.collapse())\n .on([Modifier.Ctrl, Modifier.Meta], ' ', () => list.toggle())\n .on([Modifier.Ctrl, Modifier.Meta], 'Enter', () => list.toggle())\n .on([Modifier.Ctrl, Modifier.Meta], 'Home', () => list.first())\n .on([Modifier.Ctrl, Modifier.Meta], 'End', () => list.last())\n .on([Modifier.Ctrl, Modifier.Meta], 'A', () => {\n list.toggleAll();\n list.select(); // Ensure the currect item remains selected.\n });\n }\n\n return manager;\n });\n\n /** The pointerdown event manager for the tree. */\n pointerdown = computed(() => {\n const manager = new PointerEventManager();\n\n if (this.multi()) {\n manager.on(Modifier.Shift, e => this.goto(e, {selectRange: true}));\n }\n\n if (!this.multi()) {\n return manager.on(e => this.goto(e, {selectOne: true}));\n }\n\n if (this.multi() && this.followFocus()) {\n return manager\n .on(e => this.goto(e, {selectOne: true}))\n .on(Modifier.Ctrl, e => this.goto(e, {toggle: true}));\n }\n\n if (this.multi() && !this.followFocus()) {\n return manager.on(e => this.goto(e, {toggle: true}));\n }\n\n return manager;\n });\n\n constructor(readonly inputs: TreeInputs<V>) {\n this.id = inputs.id;\n this.nav = inputs.nav;\n this.currentType = inputs.currentType;\n this.allItems = inputs.allItems;\n this.focusMode = inputs.focusMode;\n this.disabled = inputs.disabled;\n this.activeItem = inputs.activeItem;\n this.skipDisabled = inputs.skipDisabled;\n this.wrap = inputs.wrap;\n this.orientation = inputs.orientation;\n this.textDirection = inputs.textDirection;\n this.multi = computed(() => (this.nav() ? false : this.inputs.multi()));\n this.selectionMode = inputs.selectionMode;\n this.typeaheadDelay = inputs.typeaheadDelay;\n this.value = inputs.value;\n\n this.listBehavior = new List({\n ...inputs,\n items: this.visibleItems,\n multi: this.multi,\n });\n\n this.expansionManager = new ListExpansion({\n multiExpandable: () => true,\n // TODO(ok7sai): allow pre-expanded tree items.\n expandedIds: signal([]),\n items: this.children,\n disabled: this.disabled,\n });\n }\n\n /**\n * Sets the tree to it's default initial state.\n *\n * Sets the active index of the tree to the first focusable selected tree item if one exists.\n * Otherwise, sets focus to the first focusable tree item.\n */\n setDefaultState() {\n let firstItem: TreeItemPattern<V> | undefined;\n\n for (const item of this.allItems()) {\n if (!item.visible()) continue;\n if (!this.listBehavior.isFocusable(item)) continue;\n\n if (firstItem === undefined) {\n firstItem = item;\n }\n\n if (item.selected()) {\n this.activeItem.set(item);\n return;\n }\n }\n\n if (firstItem !== undefined) {\n this.activeItem.set(firstItem);\n }\n }\n\n /** Handles keydown events on the tree. */\n onKeydown(event: KeyboardEvent) {\n if (!this.disabled()) {\n this.keydown().handle(event);\n }\n }\n\n /** Handles pointerdown events on the tree. */\n onPointerdown(event: PointerEvent) {\n if (!this.disabled()) {\n this.pointerdown().handle(event);\n }\n }\n\n /** Navigates to the given tree item in the tree. */\n goto(e: PointerEvent, opts?: SelectOptions) {\n const item = this._getItem(e);\n if (!item) return;\n\n this.listBehavior.goto(item, opts);\n this.toggleExpansion(item);\n }\n\n /** Toggles to expand or collapse a tree item. */\n toggleExpansion(item?: TreeItemPattern<V>) {\n item ??= this.activeItem();\n if (!item || !this.listBehavior.isFocusable(item)) return;\n\n if (!item.expandable()) return;\n if (item.expanded()) {\n this.collapse();\n } else {\n item.expansion.open();\n }\n }\n\n /** Expands a tree item. */\n expand(opts?: SelectOptions) {\n const item = this.activeItem();\n if (!item || !this.listBehavior.isFocusable(item)) return;\n\n if (item.expandable() && !item.expanded()) {\n item.expansion.open();\n } else if (\n item.expanded() &&\n item.children().some(item => this.listBehavior.isFocusable(item))\n ) {\n this.listBehavior.next(opts);\n }\n }\n\n /** Expands all sibling tree items including itself. */\n expandSiblings(item?: TreeItemPattern<V>) {\n item ??= this.activeItem();\n const siblings = item?.parent()?.children();\n siblings?.forEach(item => item.expansion.open());\n }\n\n /** Collapses a tree item. */\n collapse(opts?: SelectOptions) {\n const item = this.activeItem();\n if (!item || !this.listBehavior.isFocusable(item)) return;\n\n if (item.expandable() && item.expanded()) {\n item.expansion.close();\n } else if (item.parent() && item.parent() !== this) {\n const parentItem = item.parent();\n if (parentItem instanceof TreeItemPattern && this.listBehavior.isFocusable(parentItem)) {\n this.listBehavior.goto(parentItem, opts);\n }\n }\n }\n\n /** Retrieves the TreeItemPattern associated with a DOM event, if any. */\n protected _getItem(event: Event): TreeItemPattern<V> | undefined {\n if (!(event.target instanceof HTMLElement)) {\n return;\n }\n const element = event.target.closest('[role=\"treeitem\"]');\n return this.inputs.allItems().find(i => i.element() === element);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {computed} from '@angular/core';\nimport {TreeInputs, TreePattern, TreeItemPattern} from './tree';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\nimport {ComboboxPattern, ComboboxTreeControls} from '../combobox/combobox';\n\nexport type ComboboxTreeInputs<V> = TreeInputs<V> & {\n /** The combobox controlling the tree. */\n combobox: SignalLike<ComboboxPattern<TreeItemPattern<V>, V> | undefined>;\n};\n\nexport class ComboboxTreePattern<V>\n extends TreePattern<V>\n implements ComboboxTreeControls<TreeItemPattern<V>, V>\n{\n /** Whether the currently focused item is collapsible. */\n isItemCollapsible = () => this.activeItem()?.parent() instanceof TreeItemPattern;\n\n /** The ARIA role for the tree. */\n role = () => 'tree' as const;\n\n /* The id of the active (focused) item in the tree. */\n activeId = computed(() => this.listBehavior.activedescendant());\n\n /** The list of items in the tree. */\n items = computed(() => this.inputs.allItems());\n\n /** The tabindex for the tree. Always -1 because the combobox handles focus. */\n override tabindex: SignalLike<-1 | 0> = () => -1;\n\n constructor(override readonly inputs: ComboboxTreeInputs<V>) {\n if (inputs.combobox()) {\n inputs.multi = () => false;\n inputs.focusMode = () => 'activedescendant';\n inputs.element = inputs.combobox()!.inputs.inputEl;\n }\n\n super(inputs);\n }\n\n /** Noop. The combobox handles keydown events. */\n override onKeydown(_: KeyboardEvent): void {}\n\n /** Noop. The combobox handles pointerdown events. */\n override onPointerdown(_: PointerEvent): void {}\n\n /** Noop. The combobox controls the open state. */\n override setDefaultState(): void {}\n\n /** Navigates to the specified item in the tree. */\n focus = (item: TreeItemPattern<V>) => this.listBehavior.goto(item);\n\n /** Navigates to the next focusable item in the tree. */\n next = () => this.listBehavior.next();\n\n /** Navigates to the previous focusable item in the tree. */\n prev = () => this.listBehavior.prev();\n\n /** Navigates to the last focusable item in the tree. */\n last = () => this.listBehavior.last();\n\n /** Navigates to the first focusable item in the tree. */\n first = () => this.listBehavior.first();\n\n /** Unfocuses the currently focused item in the tree. */\n unfocus = () => this.listBehavior.unfocus();\n\n /** Selects the specified item in the tree or the current active item if not provided. */\n select = (item?: TreeItemPattern<V>) => this.listBehavior.select(item);\n\n /** Clears the selection in the tree. */\n clearSelection = () => this.listBehavior.deselectAll();\n\n /** Retrieves the TreeItemPattern associated with a pointer event. */\n getItem = (e: PointerEvent) => this._getItem(e);\n\n /** Retrieves the currently selected item in the tree */\n getSelectedItem = () => this.inputs.allItems().find(i => i.selected());\n\n /** Sets the value of the combobox tree. */\n setValue = (value: V | undefined) => this.inputs.value.set(value ? [value] : []);\n\n /** Expands the currently focused item if it is expandable. */\n expandItem = () => this.expand();\n\n /** Collapses the currently focused item if it is expandable. */\n collapseItem = () => this.collapse();\n\n /** Whether the specified item or the currently active item is expandable. */\n isItemExpandable(item: TreeItemPattern<V> | undefined = this.activeItem()) {\n return item ? item.expandable() : false;\n }\n\n /** Expands all of the tree items. */\n expandAll = () => this.items().forEach(item => item.expansion.open());\n\n /** Collapses all of the tree items. */\n collapseAll = () => this.items().forEach(item => item.expansion.close());\n}\n"],"names":[],"mappings":";;;;;AA8BA;;AAEG;MACU,eAAe,CAAA;AAqDL,IAAA,MAAA;;AAnDZ,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;;AAGhE,IAAA,WAAW;;AAGX,IAAA,gBAAgB;;AAGhB,IAAA,SAAS;;AAGT,IAAA,UAAU;;AAGV,IAAA,KAAK,GAAuB,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;;AAGrE,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;;AAGtD,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;;AAGlD,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC;;IAGzD,QAAQ,GAAG,QAAQ,CAAC,MAAM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,EAAE;;AAGpC,IAAA,gBAAgB,CAAC,IAAA,GAAuC,IAAI,CAAC,UAAU,EAAE,EAAA;AACvE,QAAA,OAAO,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,KAAK;;;IAIzC,SAAS,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;;IAGrE,WAAW,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;AACzE;;;;"}
|
|
@@ -16,7 +16,7 @@ class ExpansionControl {
|
|
|
16
16
|
this.expandable = inputs.expandable;
|
|
17
17
|
this.disabled = inputs.disabled;
|
|
18
18
|
}
|
|
19
|
-
/** Requests the
|
|
19
|
+
/** Requests the Expansion manager to open this item. */
|
|
20
20
|
open() {
|
|
21
21
|
this.inputs.expansionManager.open(this);
|
|
22
22
|
}
|
|
@@ -84,4 +84,4 @@ class ListExpansion {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export { ExpansionControl, ListExpansion };
|
|
87
|
-
//# sourceMappingURL=
|
|
87
|
+
//# sourceMappingURL=_expansion-chunk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_expansion-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk-experimental/ui-patterns/behaviors/expansion/expansion.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {computed} from '@angular/core';\nimport {SignalLike, WritableSignalLike} from '../signal-like/signal-like';\n\n/** Represents an item that can be expanded or collapsed. */\nexport interface ExpansionItem {\n /** Whether the item is expandable. */\n expandable: SignalLike<boolean>;\n\n /** Used to uniquely identify an expansion item. */\n expansionId: SignalLike<string>;\n\n /** Whether the expansion is disabled. */\n disabled: SignalLike<boolean>;\n}\n\nexport interface ExpansionControl extends ExpansionItem {}\n/**\n * Controls a single item's expansion state and interactions,\n * delegating actual state changes to an Expansion manager.\n */\nexport class ExpansionControl {\n /** Whether this specific item is currently expanded. Derived from the Expansion manager. */\n readonly isExpanded = computed(() => this.inputs.expansionManager.isExpanded(this));\n\n /** Whether this item can be expanded. */\n readonly isExpandable = computed(() => this.inputs.expansionManager.isExpandable(this));\n\n constructor(readonly inputs: ExpansionItem & {expansionManager: ListExpansion}) {\n this.expansionId = inputs.expansionId;\n this.expandable = inputs.expandable;\n this.disabled = inputs.disabled;\n }\n\n /** Requests the Expansion manager to open this item. */\n open() {\n this.inputs.expansionManager.open(this);\n }\n\n /** Requests the Expansion manager to close this item. */\n close() {\n this.inputs.expansionManager.close(this);\n }\n\n /** Requests the Expansion manager to toggle this item. */\n toggle() {\n this.inputs.expansionManager.toggle(this);\n }\n}\n\n/** Represents the required inputs for an expansion behavior. */\nexport interface ListExpansionInputs {\n /** Whether multiple items can be expanded at once. */\n multiExpandable: SignalLike<boolean>;\n\n /** An array of ids of the currently expanded items. */\n expandedIds: WritableSignalLike<string[]>;\n\n /** An array of expansion items. */\n items: SignalLike<ExpansionItem[]>;\n\n /** Whether all expansions are disabled. */\n disabled: SignalLike<boolean>;\n}\n\n/** Manages the expansion state of a list of items. */\nexport class ListExpansion {\n /** A signal holding an array of ids of the currently expanded items. */\n expandedIds: WritableSignalLike<string[]>;\n\n constructor(readonly inputs: ListExpansionInputs) {\n this.expandedIds = inputs.expandedIds;\n }\n\n /** Opens the specified item. */\n open(item: ExpansionItem) {\n if (!this.isExpandable(item)) return;\n if (this.isExpanded(item)) return;\n if (!this.inputs.multiExpandable()) {\n this.closeAll();\n }\n this.expandedIds.update(ids => ids.concat(item.expansionId()));\n }\n\n /** Closes the specified item. */\n close(item: ExpansionItem) {\n if (this.isExpandable(item)) {\n this.expandedIds.update(ids => ids.filter(id => id !== item.expansionId()));\n }\n }\n\n /** Toggles the expansion state of the specified item. */\n toggle(item: ExpansionItem) {\n this.expandedIds().includes(item.expansionId()) ? this.close(item) : this.open(item);\n }\n\n /** Opens all focusable items in the list. */\n openAll() {\n if (this.inputs.multiExpandable()) {\n for (const item of this.inputs.items()) {\n this.open(item);\n }\n }\n }\n\n /** Closes all focusable items in the list. */\n closeAll() {\n for (const item of this.inputs.items()) {\n this.close(item);\n }\n }\n\n /** Checks whether the specified item is expandable / collapsible. */\n isExpandable(item: ExpansionItem) {\n return !this.inputs.disabled() && !item.disabled() && item.expandable();\n }\n\n /** Checks whether the specified item is currently expanded. */\n isExpanded(item: ExpansionItem): boolean {\n return this.expandedIds().includes(item.expansionId());\n }\n}\n"],"names":[],"mappings":";;AAuBA;;;AAGG;MACU,gBAAgB,CAAA;AAON,IAAA,MAAA;;AALZ,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;;AAG1E,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AAEvF,IAAA,WAAA,CAAqB,MAAyD,EAAA;QAAzD,IAAM,CAAA,MAAA,GAAN,MAAM;AACzB,QAAA,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW;AACrC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU;AACnC,QAAA,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ;;;IAIjC,IAAI,GAAA;QACF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;;;IAIzC,KAAK,GAAA;QACH,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC;;;IAI1C,MAAM,GAAA;QACJ,IAAI,CAAC,MAAM,CAAC,gB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BAAA,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;IAMrB,QAAQ,GAAA;QACN,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE;AACtC,YAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;;;;AAKpB,IAAA,YAAY,CAAC,IAAmB,EAAA;AAC9B,QAAA,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;;;AAIzE,IAAA,UAAU,CAAC,IAAmB,EAAA;AAC5B,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;;AAEzD;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { signal, computed } from '@angular/core';
|
|
2
|
-
import { ListFocus, ListNavigation } from './
|
|
2
|
+
import { ListFocus, ListNavigation } from './_list-navigation-chunk.mjs';
|
|
3
3
|
|
|
4
4
|
/** Controls selection for a list of items. */
|
|
5
5
|
class ListSelection {
|
|
@@ -16,7 +16,7 @@ class ListSelection {
|
|
|
16
16
|
/** Selects the item at the current active index. */
|
|
17
17
|
select(item, opts = { anchor: true }) {
|
|
18
18
|
item = item ?? this.inputs.focusManager.inputs.activeItem();
|
|
19
|
-
if (item.disabled() || this.inputs.value().includes(item.value())) {
|
|
19
|
+
if (!item || item.disabled() || this.inputs.value().includes(item.value())) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
if (!this.inputs.multi()) {
|
|
@@ -282,6 +282,10 @@ class List {
|
|
|
282
282
|
goto(item, opts) {
|
|
283
283
|
this._navigate(opts, () => this.navigationBehavior.goto(item));
|
|
284
284
|
}
|
|
285
|
+
/** Removes focus from the list. */
|
|
286
|
+
unfocus() {
|
|
287
|
+
this.inputs.activeItem.set(undefined);
|
|
288
|
+
}
|
|
285
289
|
/** Marks the given index as the potential start of a range selection. */
|
|
286
290
|
anchor(index) {
|
|
287
291
|
this._anchorIndex.set(index);
|
|
@@ -295,8 +299,8 @@ class List {
|
|
|
295
299
|
return this.typeaheadBehavior.isTyping();
|
|
296
300
|
}
|
|
297
301
|
/** Selects the currently active item in the list. */
|
|
298
|
-
select() {
|
|
299
|
-
this.selectionBehavior.select();
|
|
302
|
+
select(item) {
|
|
303
|
+
this.selectionBehavior.select(item);
|
|
300
304
|
}
|
|
301
305
|
/** Sets the selection to only the current active item. */
|
|
302
306
|
selectOne() {
|
|
@@ -367,4 +371,4 @@ class List {
|
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
export { List };
|
|
370
|
-
//# sourceMappingURL=
|
|
374
|
+
//# sourceMappingURL=_list-chunk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_list-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk-experimental/ui-patterns/behaviors/list-selection/list-selection.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk-experimental/ui-patterns/behaviors/list-typeahead/list-typeahead.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk-experimental/ui-patterns/behaviors/list/list.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {computed, signal} from '@angular/core';\nimport {SignalLike, WritableSignalLike} from '../signal-like/signal-like';\nimport {ListFocus, ListFocusInputs, ListFocusItem} from '../list-focus/list-focus';\n\n/** Represents an item in a collection, such as a listbox option, than can be selected. */\nexport interface ListSelectionItem<V> extends ListFocusItem {\n /** The value of the item. */\n value: SignalLike<V>;\n}\n\n/** Represents the required inputs for a collection that contains selectable items. */\nexport interface ListSelectionInputs<T extends ListSelectionItem<V>, V> extends ListFocusInputs<T> {\n /** Whether multiple items in the list can be selected at once. */\n multi: SignalLike<boolean>;\n\n /** The current value of the list selection. */\n value: WritableSignalLike<V[]>;\n\n /** The selection strategy used by the list. */\n selectionMode: SignalLike<'follow' | 'explicit'>;\n}\n\n/** Controls selection for a list of items. */\nexport class ListSelection<T extends ListSelectionItem<V>, V> {\n /** The start index to use for range selection. */\n rangeStartIndex = signal<number>(0);\n\n /** The end index to use for range selection. */\n rangeEndIndex = signal<number>(0);\n\n /** The currently selected items. */\n selectedItems = computed(() =>\n this.inputs.items().filter(item => this.inputs.value().includes(item.value())),\n );\n\n constructor(readonly inputs: ListSelectionInputs<T, V> & {focusManager: ListFocus<T>}) {}\n\n /** Selects the item at the current active index. */\n select(item?: ListSelectionItem<V>, opts = {anchor: true}) {\n item = item ?? (this.inputs.focusManager.inputs.activeItem() as ListSelectionItem<V>);\n\n if (!item || item.disabled() || this.inputs.value().includes(item.value())) {\n return;\n }\n\n if (!this.inputs.multi()) {\n this.deselectAll();\n }\n\n const index = this.inputs.items().findIndex(i => i === item);\n if (opts.anchor) {\n this.beginRangeSelection(index);\n }\n this.inputs.value.update(values => values.concat(item.value()));\n }\n\n /** Deselects the item at the current active index. */\n deselect(item?: T | null) {\n item = item ?? this.inputs.focusManager.inputs.activeItem();\n\n if (item && !item.disabled()) {\n this.inputs.value.update(values => values.filter(value => value !== item.value()));\n }\n }\n\n /** Toggles the item at the current active index. */\n toggle() {\n const item = this.inputs.focusManager.inputs.activeItem();\n if (item) {\n this.inputs.value().includes(item.value()) ? this.deselect() : this.select();\n }\n }\n\n /** Toggles only the item at the current active index. */\n toggleOne() {\n const item = this.inputs.focusManager.inputs.activeItem();\n if (item) {\n this.inputs.value().includes(item.value()) ? this.deselect() : this.selectOne();\n }\n }\n\n /** Selects all items in the list. */\n selectAll() {\n if (!this.inputs.multi()) {\n return; // Should we log a warning?\n }\n\n for (const item of this.inputs.items()) {\n this.select(item, {anchor: false});\n }\n\n this.beginRangeSelection();\n }\n\n /** Deselects all items in the list. */\n deselectAll() {\n // If an item is not in the list, it forcefully gets deselected.\n // This actually creates a bug for the following edge case:\n //\n // Setup: An item is not in the list (maybe it's lazily loaded), and it is disabled & selected.\n // Expected: If deselectAll() is called, it should NOT get deselected (because it is disabled).\n // Actual: Calling deselectAll() will still deselect the item.\n //\n // Why? Because we can't check if the item is disabled if it's not in the list.\n //\n // Alternatively, we could NOT deselect items that are not in the list, but this has the\n // inverse (and more common) effect of keeping enabled items selected when they aren't in the\n // list.\n\n for (const value of this.inputs.value()) {\n const item = this.inputs.items().find(i => i.value() === value);\n\n item\n ? this.deselect(item)\n : this.inputs.value.update(values => values.filter(v => v !== value));\n }\n }\n\n /**\n * Selects all items in the list or deselects all\n * items in the list if all items are already selected.\n */\n toggleAll() {\n const selectableValues = this.inputs\n .items()\n .filter(i => !i.disabled())\n .map(i => i.value());\n\n selectableValues.every(i => this.inputs.value().includes(i))\n ? this.deselectAll()\n : this.selectAll();\n }\n\n /** Sets the selection to only the current active item. */\n selectOne() {\n const item = this.inputs.focusManager.inputs.activeItem();\n if (item && item.disabled()) {\n return;\n }\n\n this.deselectAll();\n\n if (this.inputs.value().length > 0 && !this.inputs.multi()) {\n return;\n }\n\n this.select();\n }\n\n /**\n * Selects all items in the list up to the anchor item.\n *\n * Deselects all items that were previously within the\n * selected range that are now outside of the selected range\n */\n selectRange(opts = {anchor: true}) {\n const isStartOfRange = this.inputs.focusManager.prevActiveIndex() === this.rangeStartIndex();\n\n if (isStartOfRange && opts.anchor) {\n this.beginRangeSelection(this.inputs.focusManager.prevActiveIndex());\n }\n\n const itemsInRange = this._getItemsFromIndex(this.rangeStartIndex());\n const itemsOutOfRange = this._getItemsFromIndex(this.rangeEndIndex()).filter(\n i => !itemsInRange.includes(i),\n );\n\n for (const item of itemsOutOfRange) {\n this.deselect(item);\n }\n\n for (const item of itemsInRange) {\n this.select(item, {anchor: false});\n }\n\n if (itemsInRange.length) {\n const item = itemsInRange.pop();\n const index = this.inputs.items().findIndex(i => i === item);\n this.rangeEndIndex.set(index);\n }\n }\n\n /** Marks the given index as the start of a range selection. */\n beginRangeSelection(index: number = this.inputs.focusManager.activeIndex()) {\n this.rangeStartIndex.set(index);\n this.rangeEndIndex.set(index);\n }\n\n /** Returns the items in the list starting from the given index. */\n private _getItemsFromIndex(index: number) {\n if (index === -1) {\n return [];\n }\n\n const upper = Math.max(this.inputs.focusManager.activeIndex(), index);\n const lower = Math.min(this.inputs.focusManager.activeIndex(), index);\n\n const items = [];\n for (let i = lower; i <= upper; i++) {\n items.push(this.inputs.items()[i]);\n }\n\n if (this.inputs.focusManager.activeIndex() < index) {\n return items.reverse();\n }\n\n return items;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {computed, signal} from '@angular/core';\nimport {SignalLike} from '../signal-like/signal-like';\nimport {ListFocus, ListFocusInputs, ListFocusItem} from '../list-focus/list-focus';\n\n/**\n * Represents an item in a collection, such as a listbox option, than can be navigated to by\n * typeahead.\n */\nexport interface ListTypeaheadItem extends ListFocusItem {\n /** The text used by the typeahead search. */\n searchTerm: SignalLike<string>;\n}\n\n/**\n * Represents the required inputs for a collection that contains items that can be navigated to by\n * typeahead.\n */\nexport interface ListTypeaheadInputs<T extends ListTypeaheadItem> extends ListFocusInputs<T> {\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay: SignalLike<number>;\n}\n\n/** Controls typeahead for a list of items. */\nexport class ListTypeahead<T extends ListTypeaheadItem> {\n /** A reference to the timeout for resetting the typeahead search. */\n timeout?: ReturnType<typeof setTimeout> | undefined;\n\n /** The focus controller of the parent list. */\n focusManager: ListFocus<T>;\n\n /** Whether the user is actively typing a typeahead search query. */\n isTyping = computed(() => this._query().length > 0);\n\n /** Keeps track of the characters that typeahead search is being called with. */\n private _query = signal('');\n\n /** The index where that the typeahead search was initiated from. */\n private _startIndex = signal<number | undefined>(undefined);\n\n constructor(readonly inputs: ListTypeaheadInputs<T> & {focusManager: ListFocus<T>}) {\n this.focusManager = inputs.focusManager;\n }\n\n /** Performs a typeahead search, appending the given character to the search string. */\n search(char: string): boolean {\n if (char.length !== 1) {\n return false;\n }\n\n if (!this.isTyping() && char === ' ') {\n return false;\n }\n\n if (this._startIndex() === undefined) {\n this._startIndex.set(this.focusManager.activeIndex());\n }\n\n clearTimeout(this.timeout);\n this._query.update(q => q + char.toLowerCase());\n const item = this._getItem();\n\n if (item) {\n this.focusManager.focus(item);\n }\n\n this.timeout = setTimeout(() => {\n this._query.set('');\n this._startIndex.set(undefined);\n }, this.inputs.typeaheadDelay() * 1000);\n\n return true;\n }\n\n /**\n * Returns the first item whose search term matches the\n * current query starting from the the current anchor index.\n */\n private _getItem() {\n let items = this.focusManager.inputs.items();\n const after = items.slice(this._startIndex()! + 1);\n const before = items.slice(0, this._startIndex()!);\n items = after.concat(before);\n items.push(this.inputs.items()[this._startIndex()!]);\n\n const focusableItems = [];\n for (const item of items) {\n if (this.focusManager.isFocusable(item)) {\n focusableItems.push(item);\n }\n }\n\n return focusableItems.find(i => i.searchTerm().toLowerCase().startsWith(this._query()));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {computed, signal} from '@angular/core';\nimport {ListFocus, ListFocusInputs, ListFocusItem} from '../list-focus/list-focus';\nimport {\n ListNavigation,\n ListNavigationInputs,\n ListNavigationItem,\n} from '../list-navigation/list-navigation';\nimport {\n ListSelection,\n ListSelectionInputs,\n ListSelectionItem,\n} from '../list-selection/list-selection';\nimport {\n ListTypeahead,\n ListTypeaheadInputs,\n ListTypeaheadItem,\n} from '../list-typeahead/list-typeahead';\n\n/** The selection operations that the list can perform. */\ninterface SelectOptions {\n toggle?: boolean;\n select?: boolean;\n selectOne?: boolean;\n selectRange?: boolean;\n anchor?: boolean;\n}\n\n/** Represents an item in the list. */\nexport type ListItem<V> = ListTypeaheadItem &\n ListNavigationItem &\n ListSelectionItem<V> &\n ListFocusItem;\n\n/** The necessary inputs for the list behavior. */\nexport type ListInputs<T extends ListItem<V>, V> = ListFocusInputs<T> &\n ListNavigationInputs<T> &\n ListSelectionInputs<T, V> &\n ListTypeaheadInputs<T>;\n\n/** Controls the state of a list. */\nexport class List<T extends ListItem<V>, V> {\n /** Controls navigation for the list. */\n navigationBehavior: ListNavigation<T>;\n\n /** Controls selection for the list. */\n selectionBehavior: ListSelection<T, V>;\n\n /** Controls typeahead for the list. */\n typeaheadBehavior: ListTypeahead<T>;\n\n /** Controls focus for the list. */\n focusBehavior: ListFocus<T>;\n\n /** Whether the list is disabled. */\n disabled = computed(() => this.focusBehavior.isListDisabled());\n\n /** The id of the current active item. */\n activedescendant = computed(() => this.focusBehavior.getActiveDescendant());\n\n /** The tabindex of the list. */\n tabindex = computed(() => this.focusBehavior.getListTabindex());\n\n /** The index of the currently active item in the list. */\n activeIndex = computed(() => this.focusBehavior.activeIndex());\n\n /**\n * The uncommitted index for selecting a range of options.\n *\n * NOTE: This is subtly distinct from the \"rangeStartIndex\" in the ListSelection behavior.\n * The anchorIndex does not necessarily represent the start of a range, but represents the most\n * recent index where the user showed intent to begin a range selection. Usually, this is wherever\n * the user most recently pressed the \"Shift\" key, but if the user presses shift + space to select\n * from the anchor, the user is not intending to start a new range from this index.\n *\n * In other words, \"rangeStartIndex\" is only set when a user commits to starting a range selection\n * while \"anchorIndex\" is set whenever a user indicates they may be starting a range selection.\n */\n private _anchorIndex = signal(0);\n\n /** Whether the list should wrap. Used to disable wrapping while range selecting. */\n private _wrap = signal(true);\n\n constructor(readonly inputs: ListInputs<T, V>) {\n this.focusBehavior = new ListFocus(inputs);\n this.selectionBehavior = new ListSelection({...inputs, focusManager: this.focusBehavior});\n this.typeaheadBehavior = new ListTypeahead({...inputs, focusManager: this.focusBehavior});\n this.navigationBehavior = new ListNavigation({\n ...inputs,\n focusManager: this.focusBehavior,\n wrap: computed(() => this._wrap() && this.inputs.wrap()),\n });\n }\n\n /** Returns the tabindex for the given item. */\n getItemTabindex(item: T) {\n return this.focusBehavior.getItemTabindex(item);\n }\n\n /** Navigates to the first option in the list. */\n first(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigationBehavior.first());\n }\n\n /** Navigates to the last option in the list. */\n last(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigationBehavior.last());\n }\n\n /** Navigates to the next option in the list. */\n next(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigationBehavior.next());\n }\n\n /** Navigates to the previous option in the list. */\n prev(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigationBehavior.prev());\n }\n\n /** Navigates to the given item in the list. */\n goto(item: T, opts?: SelectOptions) {\n this._navigate(opts, () => this.navigationBehavior.goto(item));\n }\n\n /** Removes focus from the list. */\n unfocus() {\n this.inputs.activeItem.set(undefined);\n }\n\n /** Marks the given index as the potential start of a range selection. */\n anchor(index: number) {\n this._anchorIndex.set(index);\n }\n\n /** Handles typeahead search navigation for the list. */\n search(char: string, opts?: SelectOptions) {\n this._navigate(opts, () => this.typeaheadBehavior.search(char));\n }\n\n /** Checks if the list is currently typing for typeahead search. */\n isTyping() {\n return this.typeaheadBehavior.isTyping();\n }\n\n /** Selects the currently active item in the list. */\n select(item?: T) {\n this.selectionBehavior.select(item);\n }\n\n /** Sets the selection to only the current active item. */\n selectOne() {\n this.selectionBehavior.selectOne();\n }\n\n /** Deselects the currently active item in the list. */\n deselect() {\n this.selectionBehavior.deselect();\n }\n\n /** Deselects all items in the list. */\n deselectAll() {\n this.selectionBehavior.deselectAll();\n }\n\n /** Toggles the currently active item in the list. */\n toggle() {\n this.selectionBehavior.toggle();\n }\n\n /** Toggles the currently active item in the list, deselecting all other items. */\n toggleOne() {\n this.selectionBehavior.toggleOne();\n }\n\n /** Toggles the selection of all items in the list. */\n toggleAll() {\n this.selectionBehavior.toggleAll();\n }\n\n /** Checks if the given item is able to receive focus. */\n isFocusable(item: T) {\n return this.focusBehavior.isFocusable(item);\n }\n\n /** Handles updating selection for the list. */\n updateSelection(opts: SelectOptions = {anchor: true}) {\n if (opts.toggle) {\n this.selectionBehavior.toggle();\n }\n if (opts.select) {\n this.selectionBehavior.select();\n }\n if (opts.selectOne) {\n this.selectionBehavior.selectOne();\n }\n if (opts.selectRange) {\n this.selectionBehavior.selectRange();\n }\n if (!opts.anchor) {\n this.anchor(this.selectionBehavior.rangeStartIndex());\n }\n }\n\n /**\n * Safely performs a navigation operation.\n *\n * Handles conditionally disabling wrapping for when a navigation\n * operation is occurring while the user is selecting a range of options.\n *\n * Handles boilerplate calling of focus & selection operations. Also ensures these\n * additional operations are only called if the navigation operation moved focus to a new option.\n */\n private _navigate(opts: SelectOptions = {}, operation: () => boolean) {\n if (opts?.selectRange) {\n this._wrap.set(false);\n this.selectionBehavior.rangeStartIndex.set(this._anchorIndex());\n }\n\n const moved = operation();\n\n if (moved) {\n this.updateSelection(opts);\n }\n\n this._wrap.set(true);\n }\n}\n"],"names":[],"mappings":";;;AA8BA;MACa,aAAa,CAAA;AAYH,IAAA,MAAA;;AAVrB,IAAA,eAAe,GAAG,MAAM,CAAS,CAAC,CAAC;;AAGnC,IAAA,aAAa,GAAG,MAAM,CAAS,CAAC,CAAC;;AAGjC,IAAA,aAAa,GAAG,QAAQ,CAAC,MACvB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAC/E;AAED,IAAA,WAAA,CAAqB,MAAgE,EAAA;QAAhE,IAAM,CAAA,MAAA,GAAN,MAAM;;;IAG3B,MAAM,CAAC,IAA2B,EAAE,IAAI,GAAG,EAAC,MAAM,EAAE,IAAI,EAAC,EAAA;AACvD,QAAA,IAAI,GAAG,IAAI,IAAK,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,EAA2B;QAErF,IAA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