@angular/cdk-experimental 20.2.0-next.2 → 20.2.0-rc.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.
- package/accordion/index.d.ts +3 -3
- package/{accordion.d-CC6dGMlv.d.ts → accordion.d.d.ts} +7 -5
- package/{expansion.d-Zkcf-XJU.d.ts → expansion.d.d.ts} +3 -3
- package/fesm2022/accordion.mjs +17 -17
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/{accordion-D9JoxtzT.mjs → accordion2.mjs} +8 -6
- package/fesm2022/accordion2.mjs.map +1 -0
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +54 -54
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +10 -10
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +6 -6
- package/fesm2022/deferred-content.mjs.map +1 -1
- package/fesm2022/{expansion-C9iQLHOG.mjs → expansion.mjs} +2 -2
- package/fesm2022/expansion.mjs.map +1 -0
- package/fesm2022/{list-focus-Czul8jzR.mjs → list-navigation.mjs} +67 -62
- package/fesm2022/list-navigation.mjs.map +1 -0
- package/fesm2022/list.mjs +355 -0
- package/fesm2022/list.mjs.map +1 -0
- package/fesm2022/listbox.mjs +10 -11
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/option.mjs +231 -0
- package/fesm2022/option.mjs.map +1 -0
- package/fesm2022/{polyfill-CXksG4af.mjs → polyfill.mjs} +2 -2
- package/fesm2022/polyfill.mjs.map +1 -0
- package/fesm2022/popover-edit.mjs +44 -44
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/radio-group.mjs +44 -11
- package/fesm2022/radio-group.mjs.map +1 -1
- package/fesm2022/radio-group2.mjs +143 -0
- package/fesm2022/radio-group2.mjs.map +1 -0
- package/fesm2022/scrolling.mjs +7 -7
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +19 -19
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +7 -7
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/tabs.mjs +20 -20
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/{tabs-hMdwtXv2.mjs → tabs2.mjs} +34 -70
- package/fesm2022/tabs2.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +168 -0
- package/fesm2022/toolbar.mjs.map +1 -0
- package/fesm2022/toolbar2.mjs +224 -0
- package/fesm2022/toolbar2.mjs.map +1 -0
- package/fesm2022/tree.mjs +140 -219
- package/fesm2022/tree.mjs.map +1 -1
- package/fesm2022/ui-patterns.mjs +8 -8
- package/fesm2022/ui-patterns.mjs.map +1 -1
- package/list.d.d.ts +207 -0
- package/listbox/index.d.ts +3 -4
- package/{listbox.d-Ckp1is82.d.ts → listbox.d.d.ts} +9 -62
- package/package.json +6 -2
- package/{pointer-event-manager.d-BqSm9Jh5.d.ts → pointer-event-manager.d.d.ts} +12 -8
- package/radio-group/index.d.ts +15 -7
- package/radio-group.d.d.ts +80 -0
- package/tabs/index.d.ts +4 -4
- package/{tabs.d-Db8oTrMB.d.ts → tabs.d.d.ts} +15 -30
- package/toolbar/index.d.ts +89 -0
- package/toolbar.d.d.ts +136 -0
- package/tree/index.d.ts +28 -63
- package/ui-patterns/index.d.ts +8 -8
- package/fesm2022/accordion-D9JoxtzT.mjs.map +0 -1
- package/fesm2022/expansion-C9iQLHOG.mjs.map +0 -1
- package/fesm2022/list-focus-Czul8jzR.mjs.map +0 -1
- package/fesm2022/list-selection-C41ApAbt.mjs +0 -136
- package/fesm2022/list-selection-C41ApAbt.mjs.map +0 -1
- package/fesm2022/list-typeahead-DIIbNJrP.mjs +0 -64
- package/fesm2022/list-typeahead-DIIbNJrP.mjs.map +0 -1
- package/fesm2022/option-CgeKz9_Q.mjs +0 -321
- package/fesm2022/option-CgeKz9_Q.mjs.map +0 -1
- package/fesm2022/polyfill-CXksG4af.mjs.map +0 -1
- package/fesm2022/radio-button-92xc4w-A.mjs +0 -203
- package/fesm2022/radio-button-92xc4w-A.mjs.map +0 -1
- package/fesm2022/tabs-hMdwtXv2.mjs.map +0 -1
- package/list-selection.d-fbAPr_N_.d.ts +0 -69
- package/list-typeahead.d-ljh3nJ9y.d.ts +0 -48
- package/radio-group.d-CFC0aKQM.d.ts +0 -114
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { signal, computed } from '@angular/core';
|
|
2
|
+
import { ListFocus, ListNavigation } from './list-navigation.mjs';
|
|
3
|
+
|
|
4
|
+
/** Controls selection for a list of items. */
|
|
5
|
+
class ListSelection {
|
|
6
|
+
inputs;
|
|
7
|
+
/** The start index to use for range selection. */
|
|
8
|
+
rangeStartIndex = signal(0);
|
|
9
|
+
/** The end index to use for range selection. */
|
|
10
|
+
rangeEndIndex = signal(0);
|
|
11
|
+
/** The currently selected items. */
|
|
12
|
+
selectedItems = computed(() => this.inputs.items().filter(item => this.inputs.value().includes(item.value())));
|
|
13
|
+
constructor(inputs) {
|
|
14
|
+
this.inputs = inputs;
|
|
15
|
+
}
|
|
16
|
+
/** Selects the item at the current active index. */
|
|
17
|
+
select(item, opts = { anchor: true }) {
|
|
18
|
+
item = item ?? this.inputs.focusManager.inputs.activeItem();
|
|
19
|
+
if (item.disabled() || this.inputs.value().includes(item.value())) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (!this.inputs.multi()) {
|
|
23
|
+
this.deselectAll();
|
|
24
|
+
}
|
|
25
|
+
const index = this.inputs.items().findIndex(i => i === item);
|
|
26
|
+
if (opts.anchor) {
|
|
27
|
+
this.beginRangeSelection(index);
|
|
28
|
+
}
|
|
29
|
+
this.inputs.value.update(values => values.concat(item.value()));
|
|
30
|
+
}
|
|
31
|
+
/** Deselects the item at the current active index. */
|
|
32
|
+
deselect(item) {
|
|
33
|
+
item = item ?? this.inputs.focusManager.inputs.activeItem();
|
|
34
|
+
if (item && !item.disabled()) {
|
|
35
|
+
this.inputs.value.update(values => values.filter(value => value !== item.value()));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Toggles the item at the current active index. */
|
|
39
|
+
toggle() {
|
|
40
|
+
const item = this.inputs.focusManager.inputs.activeItem();
|
|
41
|
+
if (item) {
|
|
42
|
+
this.inputs.value().includes(item.value()) ? this.deselect() : this.select();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** Toggles only the item at the current active index. */
|
|
46
|
+
toggleOne() {
|
|
47
|
+
const item = this.inputs.focusManager.inputs.activeItem();
|
|
48
|
+
if (item) {
|
|
49
|
+
this.inputs.value().includes(item.value()) ? this.deselect() : this.selectOne();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/** Selects all items in the list. */
|
|
53
|
+
selectAll() {
|
|
54
|
+
if (!this.inputs.multi()) {
|
|
55
|
+
return; // Should we log a warning?
|
|
56
|
+
}
|
|
57
|
+
for (const item of this.inputs.items()) {
|
|
58
|
+
this.select(item, { anchor: false });
|
|
59
|
+
}
|
|
60
|
+
this.beginRangeSelection();
|
|
61
|
+
}
|
|
62
|
+
/** Deselects all items in the list. */
|
|
63
|
+
deselectAll() {
|
|
64
|
+
for (const item of this.inputs.items()) {
|
|
65
|
+
this.deselect(item);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Selects all items in the list or deselects all
|
|
70
|
+
* items in the list if all items are already selected.
|
|
71
|
+
*/
|
|
72
|
+
toggleAll() {
|
|
73
|
+
const selectableValues = this.inputs
|
|
74
|
+
.items()
|
|
75
|
+
.filter(i => !i.disabled())
|
|
76
|
+
.map(i => i.value());
|
|
77
|
+
selectableValues.every(i => this.inputs.value().includes(i))
|
|
78
|
+
? this.deselectAll()
|
|
79
|
+
: this.selectAll();
|
|
80
|
+
}
|
|
81
|
+
/** Sets the selection to only the current active item. */
|
|
82
|
+
selectOne() {
|
|
83
|
+
const item = this.inputs.focusManager.inputs.activeItem();
|
|
84
|
+
if (item && item.disabled()) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.deselectAll();
|
|
88
|
+
if (this.inputs.value().length > 0 && !this.inputs.multi()) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
this.select();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Selects all items in the list up to the anchor item.
|
|
95
|
+
*
|
|
96
|
+
* Deselects all items that were previously within the
|
|
97
|
+
* selected range that are now outside of the selected range
|
|
98
|
+
*/
|
|
99
|
+
selectRange(opts = { anchor: true }) {
|
|
100
|
+
const isStartOfRange = this.inputs.focusManager.prevActiveIndex() === this.rangeStartIndex();
|
|
101
|
+
if (isStartOfRange && opts.anchor) {
|
|
102
|
+
this.beginRangeSelection(this.inputs.focusManager.prevActiveIndex());
|
|
103
|
+
}
|
|
104
|
+
const itemsInRange = this._getItemsFromIndex(this.rangeStartIndex());
|
|
105
|
+
const itemsOutOfRange = this._getItemsFromIndex(this.rangeEndIndex()).filter(i => !itemsInRange.includes(i));
|
|
106
|
+
for (const item of itemsOutOfRange) {
|
|
107
|
+
this.deselect(item);
|
|
108
|
+
}
|
|
109
|
+
for (const item of itemsInRange) {
|
|
110
|
+
this.select(item, { anchor: false });
|
|
111
|
+
}
|
|
112
|
+
if (itemsInRange.length) {
|
|
113
|
+
const item = itemsInRange.pop();
|
|
114
|
+
const index = this.inputs.items().findIndex(i => i === item);
|
|
115
|
+
this.rangeEndIndex.set(index);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/** Marks the given index as the start of a range selection. */
|
|
119
|
+
beginRangeSelection(index = this.inputs.focusManager.activeIndex()) {
|
|
120
|
+
this.rangeStartIndex.set(index);
|
|
121
|
+
this.rangeEndIndex.set(index);
|
|
122
|
+
}
|
|
123
|
+
/** Returns the items in the list starting from the given index. */
|
|
124
|
+
_getItemsFromIndex(index) {
|
|
125
|
+
if (index === -1) {
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
const upper = Math.max(this.inputs.focusManager.activeIndex(), index);
|
|
129
|
+
const lower = Math.min(this.inputs.focusManager.activeIndex(), index);
|
|
130
|
+
const items = [];
|
|
131
|
+
for (let i = lower; i <= upper; i++) {
|
|
132
|
+
items.push(this.inputs.items()[i]);
|
|
133
|
+
}
|
|
134
|
+
if (this.inputs.focusManager.activeIndex() < index) {
|
|
135
|
+
return items.reverse();
|
|
136
|
+
}
|
|
137
|
+
return items;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** Controls typeahead for a list of items. */
|
|
142
|
+
class ListTypeahead {
|
|
143
|
+
inputs;
|
|
144
|
+
/** A reference to the timeout for resetting the typeahead search. */
|
|
145
|
+
timeout;
|
|
146
|
+
/** The focus controller of the parent list. */
|
|
147
|
+
focusManager;
|
|
148
|
+
/** Whether the user is actively typing a typeahead search query. */
|
|
149
|
+
isTyping = computed(() => this._query().length > 0);
|
|
150
|
+
/** Keeps track of the characters that typeahead search is being called with. */
|
|
151
|
+
_query = signal('');
|
|
152
|
+
/** The index where that the typeahead search was initiated from. */
|
|
153
|
+
_startIndex = signal(undefined);
|
|
154
|
+
constructor(inputs) {
|
|
155
|
+
this.inputs = inputs;
|
|
156
|
+
this.focusManager = inputs.focusManager;
|
|
157
|
+
}
|
|
158
|
+
/** Performs a typeahead search, appending the given character to the search string. */
|
|
159
|
+
search(char) {
|
|
160
|
+
if (char.length !== 1) {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
if (!this.isTyping() && char === ' ') {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
if (this._startIndex() === undefined) {
|
|
167
|
+
this._startIndex.set(this.focusManager.activeIndex());
|
|
168
|
+
}
|
|
169
|
+
clearTimeout(this.timeout);
|
|
170
|
+
this._query.update(q => q + char.toLowerCase());
|
|
171
|
+
const item = this._getItem();
|
|
172
|
+
if (item) {
|
|
173
|
+
this.focusManager.focus(item);
|
|
174
|
+
}
|
|
175
|
+
this.timeout = setTimeout(() => {
|
|
176
|
+
this._query.set('');
|
|
177
|
+
this._startIndex.set(undefined);
|
|
178
|
+
}, this.inputs.typeaheadDelay() * 1000);
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Returns the first item whose search term matches the
|
|
183
|
+
* current query starting from the the current anchor index.
|
|
184
|
+
*/
|
|
185
|
+
_getItem() {
|
|
186
|
+
let items = this.focusManager.inputs.items();
|
|
187
|
+
const after = items.slice(this._startIndex() + 1);
|
|
188
|
+
const before = items.slice(0, this._startIndex());
|
|
189
|
+
items = after.concat(before);
|
|
190
|
+
items.push(this.inputs.items()[this._startIndex()]);
|
|
191
|
+
const focusableItems = [];
|
|
192
|
+
for (const item of items) {
|
|
193
|
+
if (this.focusManager.isFocusable(item)) {
|
|
194
|
+
focusableItems.push(item);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return focusableItems.find(i => i.searchTerm().toLowerCase().startsWith(this._query()));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** Controls the state of a list. */
|
|
202
|
+
class List {
|
|
203
|
+
inputs;
|
|
204
|
+
/** Controls navigation for the list. */
|
|
205
|
+
navigationBehavior;
|
|
206
|
+
/** Controls selection for the list. */
|
|
207
|
+
selectionBehavior;
|
|
208
|
+
/** Controls typeahead for the list. */
|
|
209
|
+
typeaheadBehavior;
|
|
210
|
+
/** Controls focus for the list. */
|
|
211
|
+
focusBehavior;
|
|
212
|
+
/** Whether the list is disabled. */
|
|
213
|
+
disabled = computed(() => this.focusBehavior.isListDisabled());
|
|
214
|
+
/** The id of the current active item. */
|
|
215
|
+
activedescendant = computed(() => this.focusBehavior.getActiveDescendant());
|
|
216
|
+
/** The tabindex of the list. */
|
|
217
|
+
tabindex = computed(() => this.focusBehavior.getListTabindex());
|
|
218
|
+
/** The index of the currently active item in the list. */
|
|
219
|
+
activeIndex = computed(() => this.focusBehavior.activeIndex());
|
|
220
|
+
/**
|
|
221
|
+
* The uncommitted index for selecting a range of options.
|
|
222
|
+
*
|
|
223
|
+
* NOTE: This is subtly distinct from the "rangeStartIndex" in the ListSelection behavior.
|
|
224
|
+
* The anchorIndex does not necessarily represent the start of a range, but represents the most
|
|
225
|
+
* recent index where the user showed intent to begin a range selection. Usually, this is wherever
|
|
226
|
+
* the user most recently pressed the "Shift" key, but if the user presses shift + space to select
|
|
227
|
+
* from the anchor, the user is not intending to start a new range from this index.
|
|
228
|
+
*
|
|
229
|
+
* In other words, "rangeStartIndex" is only set when a user commits to starting a range selection
|
|
230
|
+
* while "anchorIndex" is set whenever a user indicates they may be starting a range selection.
|
|
231
|
+
*/
|
|
232
|
+
_anchorIndex = signal(0);
|
|
233
|
+
/** Whether the list should wrap. Used to disable wrapping while range selecting. */
|
|
234
|
+
_wrap = signal(true);
|
|
235
|
+
constructor(inputs) {
|
|
236
|
+
this.inputs = inputs;
|
|
237
|
+
this.focusBehavior = new ListFocus(inputs);
|
|
238
|
+
this.selectionBehavior = new ListSelection({ ...inputs, focusManager: this.focusBehavior });
|
|
239
|
+
this.typeaheadBehavior = new ListTypeahead({ ...inputs, focusManager: this.focusBehavior });
|
|
240
|
+
this.navigationBehavior = new ListNavigation({
|
|
241
|
+
...inputs,
|
|
242
|
+
focusManager: this.focusBehavior,
|
|
243
|
+
wrap: computed(() => this._wrap() && this.inputs.wrap()),
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/** Returns the tabindex for the given item. */
|
|
247
|
+
getItemTabindex(item) {
|
|
248
|
+
return this.focusBehavior.getItemTabindex(item);
|
|
249
|
+
}
|
|
250
|
+
/** Navigates to the first option in the list. */
|
|
251
|
+
first(opts) {
|
|
252
|
+
this._navigate(opts, () => this.navigationBehavior.first());
|
|
253
|
+
}
|
|
254
|
+
/** Navigates to the last option in the list. */
|
|
255
|
+
last(opts) {
|
|
256
|
+
this._navigate(opts, () => this.navigationBehavior.last());
|
|
257
|
+
}
|
|
258
|
+
/** Navigates to the next option in the list. */
|
|
259
|
+
next(opts) {
|
|
260
|
+
this._navigate(opts, () => this.navigationBehavior.next());
|
|
261
|
+
}
|
|
262
|
+
/** Navigates to the previous option in the list. */
|
|
263
|
+
prev(opts) {
|
|
264
|
+
this._navigate(opts, () => this.navigationBehavior.prev());
|
|
265
|
+
}
|
|
266
|
+
/** Navigates to the given item in the list. */
|
|
267
|
+
goto(item, opts) {
|
|
268
|
+
this._navigate(opts, () => this.navigationBehavior.goto(item));
|
|
269
|
+
}
|
|
270
|
+
/** Marks the given index as the potential start of a range selection. */
|
|
271
|
+
anchor(index) {
|
|
272
|
+
this._anchorIndex.set(index);
|
|
273
|
+
}
|
|
274
|
+
/** Handles typeahead search navigation for the list. */
|
|
275
|
+
search(char, opts) {
|
|
276
|
+
this._navigate(opts, () => this.typeaheadBehavior.search(char));
|
|
277
|
+
}
|
|
278
|
+
/** Checks if the list is currently typing for typeahead search. */
|
|
279
|
+
isTyping() {
|
|
280
|
+
return this.typeaheadBehavior.isTyping();
|
|
281
|
+
}
|
|
282
|
+
/** Selects the currently active item in the list. */
|
|
283
|
+
select() {
|
|
284
|
+
this.selectionBehavior.select();
|
|
285
|
+
}
|
|
286
|
+
/** Sets the selection to only the current active item. */
|
|
287
|
+
selectOne() {
|
|
288
|
+
this.selectionBehavior.selectOne();
|
|
289
|
+
}
|
|
290
|
+
/** Deselects the currently active item in the list. */
|
|
291
|
+
deselect() {
|
|
292
|
+
this.selectionBehavior.deselect();
|
|
293
|
+
}
|
|
294
|
+
/** Deselects all items in the list. */
|
|
295
|
+
deselectAll() {
|
|
296
|
+
this.selectionBehavior.deselectAll();
|
|
297
|
+
}
|
|
298
|
+
/** Toggles the currently active item in the list. */
|
|
299
|
+
toggle() {
|
|
300
|
+
this.selectionBehavior.toggle();
|
|
301
|
+
}
|
|
302
|
+
/** Toggles the currently active item in the list, deselecting all other items. */
|
|
303
|
+
toggleOne() {
|
|
304
|
+
this.selectionBehavior.toggleOne();
|
|
305
|
+
}
|
|
306
|
+
/** Toggles the selection of all items in the list. */
|
|
307
|
+
toggleAll() {
|
|
308
|
+
this.selectionBehavior.toggleAll();
|
|
309
|
+
}
|
|
310
|
+
/** Checks if the given item is able to receive focus. */
|
|
311
|
+
isFocusable(item) {
|
|
312
|
+
return this.focusBehavior.isFocusable(item);
|
|
313
|
+
}
|
|
314
|
+
/** Handles updating selection for the list. */
|
|
315
|
+
updateSelection(opts = { anchor: true }) {
|
|
316
|
+
if (opts.toggle) {
|
|
317
|
+
this.selectionBehavior.toggle();
|
|
318
|
+
}
|
|
319
|
+
if (opts.select) {
|
|
320
|
+
this.selectionBehavior.select();
|
|
321
|
+
}
|
|
322
|
+
if (opts.selectOne) {
|
|
323
|
+
this.selectionBehavior.selectOne();
|
|
324
|
+
}
|
|
325
|
+
if (opts.selectRange) {
|
|
326
|
+
this.selectionBehavior.selectRange();
|
|
327
|
+
}
|
|
328
|
+
if (!opts.anchor) {
|
|
329
|
+
this.anchor(this.selectionBehavior.rangeStartIndex());
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Safely performs a navigation operation.
|
|
334
|
+
*
|
|
335
|
+
* Handles conditionally disabling wrapping for when a navigation
|
|
336
|
+
* operation is occurring while the user is selecting a range of options.
|
|
337
|
+
*
|
|
338
|
+
* Handles boilerplate calling of focus & selection operations. Also ensures these
|
|
339
|
+
* additional operations are only called if the navigation operation moved focus to a new option.
|
|
340
|
+
*/
|
|
341
|
+
_navigate(opts = {}, operation) {
|
|
342
|
+
if (opts?.selectRange) {
|
|
343
|
+
this._wrap.set(false);
|
|
344
|
+
this.selectionBehavior.rangeStartIndex.set(this._anchorIndex());
|
|
345
|
+
}
|
|
346
|
+
const moved = operation();
|
|
347
|
+
if (moved) {
|
|
348
|
+
this.updateSelection(opts);
|
|
349
|
+
}
|
|
350
|
+
this._wrap.set(true);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export { List };
|
|
355
|
+
//# sourceMappingURL=list.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk-experimental/ui-patterns/behaviors/list-selection/list-selection.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk-experimental/ui-patterns/behaviors/list-typeahead/list-typeahead.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/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.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 for (const item of this.inputs.items()) {\n this.deselect(item);\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 /** 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() {\n this.selectionBehavior.select();\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,M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,CAAC,iBAAiB,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;;AAGjE,QAAA,MAAM,KAAK,GAAG,SAAS,EAAE;QAEzB,IAAI,KAAK,EAAE;AACT,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;;AAG5B,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;;AAEvB;;;;"}
|
package/fesm2022/listbox.mjs
CHANGED
|
@@ -3,10 +3,9 @@ import { inject, contentChildren, computed, input, booleanAttribute, model, sign
|
|
|
3
3
|
import { Directionality } from '@angular/cdk/bidi';
|
|
4
4
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
6
|
-
import {
|
|
7
|
-
import './list
|
|
8
|
-
import './list-
|
|
9
|
-
import './list-focus-Czul8jzR.mjs';
|
|
6
|
+
import { ListboxPattern, OptionPattern } from './option.mjs';
|
|
7
|
+
import './list.mjs';
|
|
8
|
+
import './list-navigation.mjs';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* A listbox container.
|
|
@@ -57,7 +56,7 @@ class CdkListbox {
|
|
|
57
56
|
pattern = new ListboxPattern({
|
|
58
57
|
...this,
|
|
59
58
|
items: this.items,
|
|
60
|
-
|
|
59
|
+
activeItem: signal(undefined),
|
|
61
60
|
textDirection: this.textDirection,
|
|
62
61
|
});
|
|
63
62
|
/** Whether the listbox has received focus yet. */
|
|
@@ -80,10 +79,10 @@ class CdkListbox {
|
|
|
80
79
|
onFocus() {
|
|
81
80
|
this._hasFocused.set(true);
|
|
82
81
|
}
|
|
83
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
84
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.2.0-
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkListbox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
83
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.2.0-rc.1", type: CdkListbox, isStandalone: true, selector: "[cdkListbox]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, skipDisabled: { classPropertyName: "skipDisabled", publicName: "skipDisabled", isSignal: true, isRequired: false, transformFunction: null }, focusMode: { classPropertyName: "focusMode", publicName: "focusMode", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, typeaheadDelay: { classPropertyName: "typeaheadDelay", publicName: "typeaheadDelay", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "listbox" }, listeners: { "keydown": "pattern.onKeydown($event)", "pointerdown": "pattern.onPointerdown($event)", "focusin": "onFocus()" }, properties: { "attr.tabindex": "pattern.tabindex()", "attr.aria-readonly": "pattern.readonly()", "attr.aria-disabled": "pattern.disabled()", "attr.aria-orientation": "pattern.orientation()", "attr.aria-multiselectable": "pattern.multi()", "attr.aria-activedescendant": "pattern.activedescendant()" }, classAttribute: "cdk-listbox" }, queries: [{ propertyName: "_cdkOptions", predicate: CdkOption, descendants: true, isSignal: true }], exportAs: ["cdkListbox"], ngImport: i0 });
|
|
85
84
|
}
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkListbox, decorators: [{
|
|
87
86
|
type: Directive,
|
|
88
87
|
args: [{
|
|
89
88
|
selector: '[cdkListbox]',
|
|
@@ -137,10 +136,10 @@ class CdkOption {
|
|
|
137
136
|
element: this.element,
|
|
138
137
|
searchTerm: this.searchTerm,
|
|
139
138
|
});
|
|
140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
141
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.0-
|
|
139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkOption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
140
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.0-rc.1", type: CdkOption, isStandalone: true, selector: "[cdkOption]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "option" }, properties: { "class.cdk-active": "pattern.active()", "attr.id": "pattern.id()", "attr.tabindex": "pattern.tabindex()", "attr.aria-selected": "pattern.selected()", "attr.aria-disabled": "pattern.disabled()" }, classAttribute: "cdk-option" }, exportAs: ["cdkOption"], ngImport: i0 });
|
|
142
141
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkOption, decorators: [{
|
|
144
143
|
type: Directive,
|
|
145
144
|
args: [{
|
|
146
145
|
selector: '[cdkOption]',
|
package/fesm2022/listbox.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/listbox/listbox.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 {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport {ListboxPattern, OptionPattern} from '../ui-patterns';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {_IdGenerator} from '@angular/cdk/a11y';\n\n/**\n * A listbox container.\n *\n * Listboxes are used to display a list of items for a user to select from. The CdkListbox is meant\n * to be used in conjunction with CdkOption as follows:\n *\n * ```html\n * <ul cdkListbox>\n * <li [value]=\"1\" cdkOption>Item 1</li>\n * <li [value]=\"2\" cdkOption>Item 2</li>\n * <li [value]=\"3\" cdkOption>Item 3</li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[cdkListbox]',\n exportAs: 'cdkListbox',\n host: {\n 'role': 'listbox',\n 'class': 'cdk-listbox',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-readonly]': 'pattern.readonly()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n '[attr.aria-orientation]': 'pattern.orientation()',\n '[attr.aria-multiselectable]': 'pattern.multi()',\n '[attr.aria-activedescendant]': 'pattern.activedescendant()',\n '(keydown)': 'pattern.onKeydown($event)',\n '(pointerdown)': 'pattern.onPointerdown($event)',\n '(focusin)': 'onFocus()',\n },\n})\nexport class CdkListbox<V> {\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n private readonly _directionality = inject(Directionality);\n\n /** The CdkOptions nested inside of the CdkListbox. */\n private readonly _cdkOptions = contentChildren(CdkOption, {descendants: true});\n\n /** A signal wrapper for directionality. */\n protected textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The Option UIPatterns of the child CdkOptions. */\n protected items = computed(() => this._cdkOptions().map(option => option.pattern));\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multiple items in the list can be selected at once. */\n multi = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n wrap = input(true, {transform: booleanAttribute});\n\n /** Whether disabled items in the list should be skipped when navigating. */\n skipDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the list. */\n focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The selection strategy used by the list. */\n selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** Whether the listbox is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the listbox is readonly. */\n readonly = input(false, {transform: booleanAttribute});\n\n /** The values of the current selected items. */\n value = model<V[]>([]);\n\n /** The Listbox UIPattern. */\n pattern: ListboxPattern<V> = new ListboxPattern<V>({\n ...this,\n items: this.items,\n activeIndex: signal(0), // TODO: Use linkedSignal to ensure this doesn't get fked up.\n textDirection: this.textDirection,\n });\n\n /** Whether the listbox has received focus yet. */\n private _hasFocused = signal(false);\n\n constructor() {\n afterRenderEffect(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const violations = this.pattern.validate();\n for (const violation of violations) {\n console.error(violation);\n }\n }\n });\n\n afterRenderEffect(() => {\n if (!this._hasFocused()) {\n this.pattern.setDefaultState();\n }\n });\n }\n\n onFocus() {\n this._hasFocused.set(true);\n }\n}\n\n/** A selectable option in a CdkListbox. */\n@Directive({\n selector: '[cdkOption]',\n exportAs: 'cdkOption',\n host: {\n 'role': 'option',\n 'class': 'cdk-option',\n '[class.cdk-active]': 'pattern.active()',\n '[attr.id]': 'pattern.id()',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-selected]': 'pattern.selected()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n },\n})\nexport class CdkOption<V> {\n /** A reference to the option element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent CdkListbox. */\n private readonly _cdkListbox = inject(CdkListbox);\n\n /** A unique identifier for the option. */\n private readonly _generatedId = inject(_IdGenerator).getId('cdk-option-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the option. */\n protected id = computed(() => this._generatedId);\n\n // TODO(wagnermaciel): See if we want to change how we handle this since textContent is not\n // reactive. See https://github.com/angular/components/pull/30495#discussion_r1961260216.\n /** The text used by the typeahead search. */\n protected searchTerm = computed(() => this.label() ?? this.element().textContent);\n\n /** The parent Listbox UIPattern. */\n protected listbox = computed(() => this._cdkListbox.pattern);\n\n /** A reference to the option element to be focused on navigation. */\n protected element = computed(() => this._elementRef.nativeElement);\n\n /** The value of the option. */\n value = input.required<V>();\n\n /** Whether an item is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** The text used by the typeahead search. */\n label = input<string>();\n\n /** The Option UIPattern. */\n pattern = new OptionPattern<V>({\n ...this,\n id: this.id,\n value: this.value,\n listbox: this.listbox,\n element: this.element,\n searchTerm: this.searchTerm,\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;AAyBA;;;;;;;;;;;;;AAaG;MAkBU,UAAU,CAAA;;AAEJ,IAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;;AAGxC,IAAA,WAAW,GAAG,eAAe,CAAC,SAAS,+CAAG,WAAW,EAAE,IAAI,EAAA,CAAA,GAAA,CAAlB,EAAC,WAAW,EAAE,IAAI,EAAC,GAAC;;IAGpE,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;AAC9D,QAAA,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC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A,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,SAAA,EAAA,cAAA,EAAA,eAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,EAAA,cAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;kGAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAbrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,QAAQ;AAChB,wBAAA,OAAO,EAAE,YAAY;AACrB,wBAAA,oBAAoB,EAAE,kBAAkB;AACxC,wBAAA,WAAW,EAAE,cAAc;AAC3B,wBAAA,iBAAiB,EAAE,oBAAoB;AACvC,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC7C,qBAAA;AACF,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"listbox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk-experimental/listbox/listbox.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 {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\nimport {ListboxPattern, OptionPattern} from '../ui-patterns';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {_IdGenerator} from '@angular/cdk/a11y';\n\n/**\n * A listbox container.\n *\n * Listboxes are used to display a list of items for a user to select from. The CdkListbox is meant\n * to be used in conjunction with CdkOption as follows:\n *\n * ```html\n * <ul cdkListbox>\n * <li [value]=\"1\" cdkOption>Item 1</li>\n * <li [value]=\"2\" cdkOption>Item 2</li>\n * <li [value]=\"3\" cdkOption>Item 3</li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[cdkListbox]',\n exportAs: 'cdkListbox',\n host: {\n 'role': 'listbox',\n 'class': 'cdk-listbox',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-readonly]': 'pattern.readonly()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n '[attr.aria-orientation]': 'pattern.orientation()',\n '[attr.aria-multiselectable]': 'pattern.multi()',\n '[attr.aria-activedescendant]': 'pattern.activedescendant()',\n '(keydown)': 'pattern.onKeydown($event)',\n '(pointerdown)': 'pattern.onPointerdown($event)',\n '(focusin)': 'onFocus()',\n },\n})\nexport class CdkListbox<V> {\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n private readonly _directionality = inject(Directionality);\n\n /** The CdkOptions nested inside of the CdkListbox. */\n private readonly _cdkOptions = contentChildren(CdkOption, {descendants: true});\n\n /** A signal wrapper for directionality. */\n protected textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The Option UIPatterns of the child CdkOptions. */\n protected items = computed(() => this._cdkOptions().map(option => option.pattern));\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multiple items in the list can be selected at once. */\n multi = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n wrap = input(true, {transform: booleanAttribute});\n\n /** Whether disabled items in the list should be skipped when navigating. */\n skipDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the list. */\n focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The selection strategy used by the list. */\n selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** Whether the listbox is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the listbox is readonly. */\n readonly = input(false, {transform: booleanAttribute});\n\n /** The values of the current selected items. */\n value = model<V[]>([]);\n\n /** The Listbox UIPattern. */\n pattern: ListboxPattern<V> = new ListboxPattern<V>({\n ...this,\n items: this.items,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n });\n\n /** Whether the listbox has received focus yet. */\n private _hasFocused = signal(false);\n\n constructor() {\n afterRenderEffect(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const violations = this.pattern.validate();\n for (const violation of violations) {\n console.error(violation);\n }\n }\n });\n\n afterRenderEffect(() => {\n if (!this._hasFocused()) {\n this.pattern.setDefaultState();\n }\n });\n }\n\n onFocus() {\n this._hasFocused.set(true);\n }\n}\n\n/** A selectable option in a CdkListbox. */\n@Directive({\n selector: '[cdkOption]',\n exportAs: 'cdkOption',\n host: {\n 'role': 'option',\n 'class': 'cdk-option',\n '[class.cdk-active]': 'pattern.active()',\n '[attr.id]': 'pattern.id()',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-selected]': 'pattern.selected()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n },\n})\nexport class CdkOption<V> {\n /** A reference to the option element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent CdkListbox. */\n private readonly _cdkListbox = inject(CdkListbox);\n\n /** A unique identifier for the option. */\n private readonly _generatedId = inject(_IdGenerator).getId('cdk-option-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the option. */\n protected id = computed(() => this._generatedId);\n\n // TODO(wagnermaciel): See if we want to change how we handle this since textContent is not\n // reactive. See https://github.com/angular/components/pull/30495#discussion_r1961260216.\n /** The text used by the typeahead search. */\n protected searchTerm = computed(() => this.label() ?? this.element().textContent);\n\n /** The parent Listbox UIPattern. */\n protected listbox = computed(() => this._cdkListbox.pattern);\n\n /** A reference to the option element to be focused on navigation. */\n protected element = computed(() => this._elementRef.nativeElement);\n\n /** The value of the option. */\n value = input.required<V>();\n\n /** Whether an item is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** The text used by the typeahead search. */\n label = input<string>();\n\n /** The Option UIPattern. */\n pattern = new OptionPattern<V>({\n ...this,\n id: this.id,\n value: this.value,\n listbox: this.listbox,\n element: this.element,\n searchTerm: this.searchTerm,\n });\n}\n"],"names":[],"mappings":";;;;;;;;;AAyBA;;;;;;;;;;;;;AAaG;MAkBU,UAAU,CAAA;;AAEJ,IAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;;AAGxC,IAAA,WAAW,GAAG,eAAe,CAAC,SAAS,+CAAG,WAAW,EAAE,IAAI,EAAA,CAAA,GAAA,CAAlB,EAAC,WAAW,EAAE,IAAI,EAAC,GAAC;;IAGpE,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;AAC9D,QAAA,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK;AACzC,KAAA,CAAC;;IAGQ,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;;AAGlF,IAAA,WAAW,GAAG,KAAK,CAA4B,UAAU,uDAAC;;AAG1D,IAAA,KAAK,GAAG,KAAK,CAAC,KAAK,yCAAG,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA5B,EAAC,SAAS,EAAE,gBAAgB,EAAC,GAAC;;AAGnD,IAAA,IAAI,GAAG,KAAK,CAAC,IAAI,wCAAG,SAAS,E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