@frontile/collections 0.18.0-alpha.9 → 0.18.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +13 -13
  2. package/declarations/components/dropdown.d.ts +0 -99
  3. package/declarations/components/listbox/item.d.ts +0 -51
  4. package/declarations/components/listbox/listbox.d.ts +0 -75
  5. package/declarations/components/listbox.d.ts +0 -2
  6. package/declarations/components/simple-table/body.d.ts +0 -428
  7. package/declarations/components/simple-table/cell.d.ts +0 -427
  8. package/declarations/components/simple-table/column.d.ts +0 -419
  9. package/declarations/components/simple-table/footer.d.ts +0 -430
  10. package/declarations/components/simple-table/header.d.ts +0 -430
  11. package/declarations/components/simple-table/index.d.ts +0 -446
  12. package/declarations/components/simple-table/row.d.ts +0 -430
  13. package/declarations/components/table/cell-default.d.ts +0 -43
  14. package/declarations/components/table/cell-for.d.ts +0 -38
  15. package/declarations/components/table/cell-rendering-context.d.ts +0 -24
  16. package/declarations/components/table/checkbox.d.ts +0 -50
  17. package/declarations/components/table/column-visibility.d.ts +0 -416
  18. package/declarations/components/table/icons.d.ts +0 -11
  19. package/declarations/components/table/index.d.ts +0 -4
  20. package/declarations/components/table/sort-button.d.ts +0 -413
  21. package/declarations/components/table/table.d.ts +0 -555
  22. package/declarations/components/table/types.d.ts +0 -46
  23. package/declarations/components/table/utils.d.ts +0 -6
  24. package/declarations/components/table.d.ts +0 -2
  25. package/declarations/utils/listManager.d.ts +0 -74
  26. package/dist/listManager-CKsOd2zS.js +0 -438
  27. package/dist/listManager-CKsOd2zS.js.map +0 -1
  28. package/dist/listbox-CkGwpiDp.js +0 -203
  29. package/dist/listbox-CkGwpiDp.js.map +0 -1
  30. package/dist/listbox-Czwb-jUT.js +0 -203
  31. package/dist/listbox-Czwb-jUT.js.map +0 -1
  32. package/dist/table-3uScDwoD.js +0 -877
  33. package/dist/table-3uScDwoD.js.map +0 -1
  34. package/dist/table-DvivyvLm.js +0 -877
  35. package/dist/table-DvivyvLm.js.map +0 -1
  36. package/dist/table-SVR6fEqh.js +0 -877
  37. package/dist/table-SVR6fEqh.js.map +0 -1
@@ -1,74 +0,0 @@
1
- type SelectionMode = 'none' | 'single' | 'multiple';
2
- type AutoActivateMode = 'none' | 'first' | 'selected';
3
- interface ListItemArgs {
4
- key: string;
5
- textValue?: string;
6
- isSelected?: boolean;
7
- isDisabled?: boolean;
8
- isActive?: boolean;
9
- }
10
- declare class ListItem {
11
- el: HTMLLIElement | HTMLOptionElement;
12
- key: string;
13
- textValue: string;
14
- isSelected: boolean;
15
- isDisabled: boolean;
16
- isActive: boolean;
17
- constructor(el: HTMLLIElement | HTMLOptionElement, args: Required<ListItemArgs>);
18
- }
19
- interface ListManagerArgs {
20
- selectionMode?: SelectionMode;
21
- selectedKeys?: string[];
22
- disabledKeys?: string[];
23
- allowEmpty?: boolean;
24
- autoActivateMode?: AutoActivateMode;
25
- onAction?: (key: string) => void;
26
- onSelectionChange?: (key: string[]) => void;
27
- onListItemsChange?: (items: ListItem[], action: 'add' | 'remove') => void;
28
- onActiveItemChange?: (key?: string) => void;
29
- }
30
- declare class ListManager {
31
- #private;
32
- searchKeys: string;
33
- args: ListManagerArgs;
34
- constructor(args?: ListManagerArgs);
35
- register(el: HTMLLIElement | HTMLOptionElement, args: Required<ListItemArgs>): void;
36
- unregister(el: HTMLLIElement | HTMLOptionElement): void;
37
- at(el?: HTMLLIElement | HTMLOptionElement): ListItem | undefined;
38
- atKey(key: string): ListItem | undefined;
39
- updateArgs(args: ListManagerArgs): void;
40
- selectActiveItem(): void;
41
- selectItem(item?: ListItem): void;
42
- activateItem(item?: ListItem): void;
43
- setNextOptionActive(): void;
44
- setPreviousOptionActive(): void;
45
- setFirstOptionActive(): void;
46
- setSelectedOptionActive(): void;
47
- setLastOptionActive(): void;
48
- search(key: string): void;
49
- isKeyDisabled(key: string): boolean;
50
- isKeySelected(key: string): boolean;
51
- setup: import("ember-modifier").FunctionBasedModifier<{
52
- Args: {
53
- Positional: unknown[];
54
- Named: ListManagerArgs;
55
- };
56
- Element: HTMLUListElement | HTMLSelectElement;
57
- }>;
58
- setupItem: import("ember-modifier").FunctionBasedModifier<{
59
- Args: {
60
- Positional: unknown[];
61
- Named: Pick<ListItemArgs, "key" | "textValue"> & {
62
- onRegister?: (item: ListItem) => void;
63
- disableEvents?: boolean;
64
- };
65
- };
66
- Element: HTMLLIElement | HTMLOptionElement;
67
- }>;
68
- }
69
- declare function keyAndLabelForItem(item: unknown): {
70
- key: string;
71
- label: string;
72
- };
73
- export type { ListItem, ListItemArgs, SelectionMode, AutoActivateMode };
74
- export { ListManager, keyAndLabelForItem };
@@ -1,438 +0,0 @@
1
- import { tracked } from '@glimmer/tracking';
2
- import { later, debounce } from '@ember/runloop';
3
- import { modifier } from 'ember-modifier';
4
-
5
- const deferred = /* @__PURE__ */new WeakMap();
6
- function deferDecorator(proto, prop, desc) {
7
- let map = deferred.get(proto);
8
- if (!map) {
9
- map = /* @__PURE__ */new Map();
10
- deferred.set(proto, map);
11
- }
12
- map.set(prop, desc);
13
- }
14
- function findDeferredDecorator(target, prop) {
15
- var _a;
16
- let cursor = target.prototype;
17
- while (cursor) {
18
- let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);
19
- if (desc) {
20
- return desc;
21
- }
22
- cursor = cursor.prototype;
23
- }
24
- }
25
- function decorateFieldV2(prototype, prop, decorators, initializer) {
26
- let desc = {
27
- configurable: true,
28
- enumerable: true,
29
- writable: true,
30
- initializer: null
31
- };
32
- if (initializer) {
33
- desc.initializer = initializer;
34
- }
35
- for (let decorator of decorators) {
36
- desc = decorator(prototype, prop, desc) || desc;
37
- }
38
- if (desc.initializer === void 0) {
39
- Object.defineProperty(prototype, prop, desc);
40
- } else {
41
- deferDecorator(prototype, prop, desc);
42
- }
43
- }
44
- function decorateMethodV2(prototype, prop, decorators) {
45
- const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);
46
- let desc = {
47
- ...origDesc
48
- };
49
- for (let decorator of decorators) {
50
- desc = decorator(prototype, prop, desc) || desc;
51
- }
52
- if (desc.initializer !== void 0) {
53
- desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;
54
- desc.initializer = void 0;
55
- }
56
- Object.defineProperty(prototype, prop, desc);
57
- }
58
- function initializeDeferredDecorator(target, prop) {
59
- let desc = findDeferredDecorator(target.constructor, prop);
60
- if (desc) {
61
- Object.defineProperty(target, prop, {
62
- enumerable: desc.enumerable,
63
- configurable: desc.configurable,
64
- writable: desc.writable,
65
- value: desc.initializer ? desc.initializer.call(target) : void 0
66
- });
67
- }
68
- }
69
-
70
- /* eslint-disable ember/no-runloop */
71
- class ListItem {
72
- el;
73
- key;
74
- textValue;
75
- static {
76
- decorateFieldV2(this.prototype, "isSelected", [tracked]);
77
- }
78
- #isSelected = (initializeDeferredDecorator(this, "isSelected"), void 0);
79
- static {
80
- decorateFieldV2(this.prototype, "isDisabled", [tracked]);
81
- }
82
- #isDisabled = (initializeDeferredDecorator(this, "isDisabled"), void 0);
83
- static {
84
- decorateFieldV2(this.prototype, "isActive", [tracked]);
85
- }
86
- #isActive = (initializeDeferredDecorator(this, "isActive"), void 0);
87
- constructor(el, args) {
88
- this.el = el;
89
- this.key = args.key;
90
- this.textValue = args.textValue;
91
- this.isSelected = args.isSelected;
92
- this.isDisabled = args.isDisabled;
93
- this.isActive = args.isActive;
94
- }
95
- }
96
- class ListManager {
97
- #items = [];
98
- searchKeys = '';
99
- args = {
100
- selectionMode: 'none',
101
- selectedKeys: [],
102
- disabledKeys: [],
103
- allowEmpty: false,
104
- autoActivateMode: 'none'
105
- };
106
- constructor(args = {}) {
107
- this.updateArgs(args);
108
- }
109
- register(el, args) {
110
- if (this.args.autoActivateMode == 'first' && this.#items.length === 0 && !args.isDisabled) {
111
- args.isActive = true;
112
- this.args.onActiveItemChange?.(args.key);
113
- }
114
- const newItem = new ListItem(el, args);
115
- this.#items.push(newItem);
116
- this.#syncItemsOrderWithDOM();
117
- if (typeof this.args.onListItemsChange === 'function') {
118
- this.args.onListItemsChange(this.#items, 'add');
119
- }
120
- if (this.args.autoActivateMode != 'none' && this.#items.length > 1) {
121
- later(() => {
122
- if (this.args.autoActivateMode == 'first') {
123
- this.setFirstOptionActive();
124
- } else {
125
- this.setSelectedOptionActive();
126
- }
127
- }, 1);
128
- }
129
- }
130
- unregister(el) {
131
- this.#items = this.#items.filter(item => item.el !== el);
132
- if (this.args.autoActivateMode == 'first' && this.#items.length >= 1) {
133
- this.activateItem(this.#items[0]);
134
- }
135
- if (typeof this.args.onListItemsChange === 'function') {
136
- this.args.onListItemsChange(this.#items, 'remove');
137
- }
138
- }
139
- at(el) {
140
- return this.#items.find(item => item.el === el);
141
- }
142
- atKey(key) {
143
- return this.#items.find(item => item.key === key);
144
- }
145
- updateArgs(args) {
146
- this.args.selectedKeys = args.selectedKeys || [];
147
- this.args.disabledKeys = args.disabledKeys || [];
148
- this.args.allowEmpty = args.allowEmpty || false;
149
- this.args.autoActivateMode = args.autoActivateMode || 'none';
150
- for (let i = 0; i < this.#items.length; i++) {
151
- const item = this.#items[i];
152
- item.isSelected = this.isKeySelected(item.key);
153
- item.isDisabled = this.isKeyDisabled(item.key);
154
- }
155
- if (args.selectionMode) {
156
- this.args.selectionMode = args.selectionMode;
157
- }
158
- if (args.onAction) {
159
- this.args.onAction = args.onAction;
160
- }
161
- if (args.onSelectionChange) {
162
- this.args.onSelectionChange = args.onSelectionChange;
163
- }
164
- if (args.onListItemsChange) {
165
- this.args.onListItemsChange = args.onListItemsChange;
166
- }
167
- if (args.onActiveItemChange) {
168
- this.args.onActiveItemChange = args.onActiveItemChange;
169
- }
170
- }
171
- selectActiveItem() {
172
- const item = this.#activeItem;
173
- if (item) {
174
- item.el.click();
175
- }
176
- }
177
- selectItem(item) {
178
- if (item) {
179
- if (this.args.selectionMode !== 'none') {
180
- this.activateItem(item);
181
- }
182
- if (typeof this.args.onAction === 'function') {
183
- this.args.onAction(item.key);
184
- }
185
- if (typeof this.args.onSelectionChange === 'function' && this.args.selectionMode !== 'none') {
186
- this.args.onSelectionChange(this.#toggleSelectedItem(item));
187
- }
188
- }
189
- }
190
- activateItem(item) {
191
- if (item && !item.isActive) {
192
- this.#clearActive();
193
- item.isActive = true;
194
- this.args.onActiveItemChange?.(item.key);
195
-
196
- // Ensure the item is scrolled into view
197
- requestAnimationFrame(() => {
198
- item.el.scrollIntoView({
199
- block: 'nearest',
200
- inline: 'nearest'
201
- });
202
- });
203
- }
204
- }
205
- setNextOptionActive() {
206
- for (let i = this.#indexofActiveItem + 1; i < this.#items.length; i++) {
207
- const item = this.#items[i];
208
- if (item && !item.isDisabled && !item.isActive) {
209
- this.activateItem(item);
210
- break;
211
- }
212
- }
213
- }
214
- setPreviousOptionActive() {
215
- for (let i = this.#indexofActiveItem - 1; i >= 0; i--) {
216
- const item = this.#items[i];
217
- if (item && !item.isDisabled && !item.isActive) {
218
- this.activateItem(item);
219
- break;
220
- }
221
- }
222
- }
223
- setFirstOptionActive() {
224
- for (let i = 0; i < this.#items.length; i++) {
225
- const item = this.#items[i];
226
- if (item && !item.isDisabled) {
227
- this.activateItem(item);
228
- break;
229
- }
230
- }
231
- }
232
- setSelectedOptionActive() {
233
- let activated = false;
234
- for (let i = 0; i < this.#items.length; i++) {
235
- const item = this.#items[i];
236
- if (item && !item.isDisabled && item.isSelected) {
237
- this.activateItem(item);
238
- activated = true;
239
- break;
240
- }
241
- }
242
- if (!activated) {
243
- this.setFirstOptionActive();
244
- }
245
- }
246
- setLastOptionActive() {
247
- for (let i = this.#items.length - 1; i >= 0; i--) {
248
- const item = this.#items[i];
249
- if (item && !item.isDisabled) {
250
- this.activateItem(item);
251
- break;
252
- }
253
- }
254
- }
255
- search(key) {
256
- debounce(this, this.#clearSeaerch, 500);
257
- this.searchKeys += key.toLowerCase();
258
- for (let i = 0; i < this.#items.length; i++) {
259
- const item = this.#items[i];
260
- if (!item.isDisabled && this.searchKeys && item.textValue.trim().toLowerCase().startsWith(this.searchKeys)) {
261
- this.activateItem(item);
262
- break;
263
- }
264
- }
265
- }
266
- isKeyDisabled(key) {
267
- return this.args.disabledKeys?.includes(key) || false;
268
- }
269
- isKeySelected(key) {
270
- return this.args.selectedKeys?.includes(key) || false;
271
- }
272
- get #indexofActiveItem() {
273
- let item = this.#activeItem;
274
- if (!item) {
275
- for (let i = 0; i < this.#items.length; i++) {
276
- const n = this.#items[i];
277
- if (n.isSelected) {
278
- item = n;
279
- break;
280
- }
281
- }
282
- }
283
- if (!item) {
284
- return -1;
285
- }
286
- return this.#items.indexOf(item);
287
- }
288
-
289
- // Ensure #items is always in sync with DOM order
290
- #syncItemsOrderWithDOM() {
291
- if (!this.#items.length) return;
292
-
293
- // Sort items based on their position in the DOM
294
- this.#items.sort((a, b) => {
295
- const position = a.el.compareDocumentPosition(b.el);
296
- if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
297
- if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
298
- return 0;
299
- });
300
- }
301
- #toggleSelectedItem(item) {
302
- let selectedKeys = [];
303
- for (let i = 0; i < this.#items.length; i++) {
304
- const _item = this.#items[i];
305
- if (_item.isSelected) {
306
- selectedKeys.push(_item.key);
307
- }
308
- }
309
- if (selectedKeys.includes(item.key) && (this.args.allowEmpty && selectedKeys.length == 1 || selectedKeys.length > 1)) {
310
- const indexToRemove = selectedKeys.indexOf(item.key);
311
- selectedKeys.splice(indexToRemove, 1);
312
- } else {
313
- if (this.args.selectionMode === 'single') {
314
- selectedKeys = [item.key];
315
- } else if (!selectedKeys.includes(item.key)) {
316
- selectedKeys.push(item.key);
317
- }
318
- }
319
- return selectedKeys;
320
- }
321
- get #activeItem() {
322
- for (let i = 0; i < this.#items.length; i++) {
323
- const item = this.#items[i];
324
- if (item.isActive) {
325
- return item;
326
- }
327
- }
328
- }
329
- #clearSeaerch() {
330
- this.searchKeys = '';
331
- }
332
- #clearActive() {
333
- for (let i = 0; i < this.#items.length; i++) {
334
- const item = this.#items[i];
335
- if (item.isActive) {
336
- item.isActive = false;
337
- }
338
- }
339
- }
340
- setup = modifier((_el, _, args) => {
341
- this.updateArgs({
342
- selectionMode: args.selectionMode,
343
- disabledKeys: args.disabledKeys,
344
- selectedKeys: args.selectedKeys,
345
- allowEmpty: args.allowEmpty,
346
- autoActivateMode: args.autoActivateMode
347
- });
348
- });
349
- setupItem = modifier((el, _, args) => {
350
- let textValue = args.textValue;
351
- if (typeof textValue === 'undefined' || textValue === '' || textValue === null) {
352
- const labelId = el.getAttribute('aria-labelledby');
353
- if (labelId) {
354
- const labelElement = el.querySelector(`#${labelId}`);
355
- if (labelElement) {
356
- textValue = labelElement.textContent?.trim() || '';
357
- }
358
- } else {
359
- textValue = el.textContent?.trim() || '';
360
- }
361
- }
362
- this.register(el, {
363
- key: args.key,
364
- textValue: textValue || '',
365
- isActive: false,
366
- isDisabled: this.isKeyDisabled(args.key),
367
- isSelected: this.isKeySelected(args.key)
368
- });
369
- const item = this.at(el);
370
- if (item && typeof args.onRegister === 'function') {
371
- args.onRegister(item);
372
- }
373
- const mouseEnter = () => {
374
- this.activateItem(item);
375
- };
376
- const mouseLeave = () => {
377
- if (item) {
378
- item.isActive = false;
379
- }
380
- };
381
- if (!args.disableEvents) {
382
- el.addEventListener('mouseenter', mouseEnter);
383
- el.addEventListener('mouseleave', mouseLeave);
384
- el.addEventListener('focusin', mouseEnter);
385
- el.addEventListener('focusout', mouseLeave);
386
- }
387
- return () => {
388
- this.unregister(el);
389
- if (!args.disableEvents) {
390
- el.removeEventListener('mouseenter', mouseEnter);
391
- el.removeEventListener('mouseleave', mouseLeave);
392
- el.removeEventListener('focusin', mouseEnter);
393
- el.removeEventListener('focusout', mouseLeave);
394
- }
395
- };
396
- });
397
- }
398
- function keyAndLabelForItem(item) {
399
- // Handle primitive types directly
400
- if (typeof item === 'string' || typeof item === 'number') {
401
- const value = item.toString();
402
- return {
403
- key: value,
404
- label: value
405
- };
406
- }
407
-
408
- // If the item is an object, try to extract key and label using common property names
409
- if (typeof item === 'object' && item !== null) {
410
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
411
- const typedItem = item;
412
-
413
- // Try to use the 'key' property first; if not available, use 'id'
414
- let keyProp = typedItem.key || typedItem.id;
415
- if (keyProp === undefined) {
416
- keyProp = item.toString();
417
- }
418
-
419
- // Determine the label by checking multiple possible properties
420
- let labelProp = typedItem.label || typedItem.value || typedItem.name || typedItem.title;
421
- if (labelProp === undefined) {
422
- labelProp = item.toString();
423
- }
424
- return {
425
- key: keyProp.toString(),
426
- label: labelProp.toString()
427
- };
428
- }
429
-
430
- // Fallback if item does not match expected types
431
- return {
432
- key: '',
433
- label: ''
434
- };
435
- }
436
-
437
- export { ListManager as L, decorateFieldV2 as a, decorateMethodV2 as d, initializeDeferredDecorator as i, keyAndLabelForItem as k };
438
- //# sourceMappingURL=listManager-CKsOd2zS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"listManager-CKsOd2zS.js","sources":["../../../node_modules/.pnpm/decorator-transforms@2.3.0_@babel+core@7.26.7/node_modules/decorator-transforms/dist/runtime-BPCpkOf1.js","../src/utils/listManager.ts"],"sourcesContent":["const deferred = /* @__PURE__ */ new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n let map = deferred.get(proto);\n if (!map) {\n map = /* @__PURE__ */ new Map();\n deferred.set(proto, map);\n }\n map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n var _a;\n let cursor = target.prototype;\n while (cursor) {\n let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);\n if (desc) {\n return desc;\n }\n cursor = cursor.prototype;\n }\n}\nfunction decorateFieldV1(target, prop, decorators, initializer) {\n return decorateFieldV2(target.prototype, prop, decorators, initializer);\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n };\n if (initializer) {\n desc.initializer = initializer;\n }\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(prototype, prop, desc);\n } else {\n deferDecorator(prototype, prop, desc);\n }\n}\nfunction decorateMethodV1({ prototype }, prop, decorators) {\n return decorateMethodV2(prototype, prop, decorators);\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n let desc = { ...origDesc };\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n desc.initializer = void 0;\n }\n Object.defineProperty(prototype, prop, desc);\n}\nfunction initializeDeferredDecorator(target, prop) {\n let desc = findDeferredDecorator(target.constructor, prop);\n if (desc) {\n Object.defineProperty(target, prop, {\n enumerable: desc.enumerable,\n configurable: desc.configurable,\n writable: desc.writable,\n value: desc.initializer ? desc.initializer.call(target) : void 0\n });\n }\n}\nfunction decorateClass(target, decorators) {\n return decorators.reduce(\n (accum, decorator) => decorator(accum) || accum,\n target\n );\n}\nfunction decoratePOJO(pojo, decorated) {\n for (let [type, prop, decorators] of decorated) {\n if (type === \"field\") {\n decoratePojoField(pojo, prop, decorators);\n } else {\n decorateMethodV2(pojo, prop, decorators);\n }\n }\n return pojo;\n}\nfunction decoratePojoField(pojo, prop, decorators) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: () => {\n var _a;\n return (_a = Object.getOwnPropertyDescriptor(pojo, prop)) == null ? void 0 : _a.value;\n }\n };\n for (let decorator of decorators) {\n desc = decorator(pojo, prop, desc) || desc;\n }\n if (desc.initializer) {\n desc.value = desc.initializer.call(pojo);\n delete desc.initializer;\n }\n Object.defineProperty(pojo, prop, desc);\n}\nconst runtime = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n c: decorateClass,\n f: decorateFieldV1,\n g: decorateFieldV2,\n i: initializeDeferredDecorator,\n m: decorateMethodV1,\n n: decorateMethodV2,\n p: decoratePOJO\n}, Symbol.toStringTag, { value: \"Module\" }));\nexport {\n decorateFieldV2 as a,\n decorateMethodV1 as b,\n decorateMethodV2 as c,\n decorateFieldV1 as d,\n decorateClass as e,\n decoratePOJO as f,\n initializeDeferredDecorator as i,\n runtime as r\n};\n//# sourceMappingURL=runtime-BPCpkOf1.js.map\n","/* eslint-disable ember/no-runloop */\nimport { tracked } from '@glimmer/tracking';\nimport { debounce } from '@ember/runloop';\nimport { modifier } from 'ember-modifier';\nimport { later } from '@ember/runloop';\n\ntype SelectionMode = 'none' | 'single' | 'multiple';\ntype AutoActivateMode = 'none' | 'first' | 'selected';\n\ninterface ListItemArgs {\n key: string;\n textValue?: string;\n isSelected?: boolean;\n isDisabled?: boolean;\n isActive?: boolean;\n}\n\nclass ListItem {\n el: HTMLLIElement | HTMLOptionElement;\n key: string;\n textValue: string;\n\n @tracked isSelected: boolean;\n @tracked isDisabled: boolean;\n @tracked isActive: boolean;\n\n constructor(\n el: HTMLLIElement | HTMLOptionElement,\n args: Required<ListItemArgs>\n ) {\n this.el = el;\n this.key = args.key;\n this.textValue = args.textValue;\n this.isSelected = args.isSelected;\n this.isDisabled = args.isDisabled;\n this.isActive = args.isActive;\n }\n}\n\ninterface ListManagerArgs {\n selectionMode?: SelectionMode;\n selectedKeys?: string[];\n disabledKeys?: string[];\n allowEmpty?: boolean;\n autoActivateMode?: AutoActivateMode;\n onAction?: (key: string) => void;\n onSelectionChange?: (key: string[]) => void;\n onListItemsChange?: (items: ListItem[], action: 'add' | 'remove') => void;\n onActiveItemChange?: (key?: string) => void;\n}\n\nclass ListManager {\n #items: ListItem[] = [];\n\n searchKeys: string = '';\n args: ListManagerArgs = {\n selectionMode: 'none',\n selectedKeys: [],\n disabledKeys: [],\n allowEmpty: false,\n autoActivateMode: 'none'\n };\n\n constructor(args: ListManagerArgs = {}) {\n this.updateArgs(args);\n }\n\n register(\n el: HTMLLIElement | HTMLOptionElement,\n args: Required<ListItemArgs>\n ): void {\n if (\n this.args.autoActivateMode == 'first' &&\n this.#items.length === 0 &&\n !args.isDisabled\n ) {\n args.isActive = true;\n this.args.onActiveItemChange?.(args.key);\n }\n const newItem = new ListItem(el, args);\n this.#items.push(newItem);\n this.#syncItemsOrderWithDOM();\n\n if (typeof this.args.onListItemsChange === 'function') {\n this.args.onListItemsChange(this.#items, 'add');\n }\n\n if (this.args.autoActivateMode != 'none' && this.#items.length > 1) {\n later(() => {\n if (this.args.autoActivateMode == 'first') {\n this.setFirstOptionActive();\n } else {\n this.setSelectedOptionActive();\n }\n }, 1);\n }\n }\n\n unregister(el: HTMLLIElement | HTMLOptionElement): void {\n this.#items = this.#items.filter((item) => item.el !== el);\n\n if (this.args.autoActivateMode == 'first' && this.#items.length >= 1) {\n this.activateItem(this.#items[0]);\n }\n\n if (typeof this.args.onListItemsChange === 'function') {\n this.args.onListItemsChange(this.#items, 'remove');\n }\n }\n\n at(el?: HTMLLIElement | HTMLOptionElement): ListItem | undefined {\n return this.#items.find((item) => item.el === el);\n }\n\n atKey(key: string): ListItem | undefined {\n return this.#items.find((item) => item.key === key);\n }\n\n updateArgs(args: ListManagerArgs): void {\n this.args.selectedKeys = args.selectedKeys || [];\n this.args.disabledKeys = args.disabledKeys || [];\n this.args.allowEmpty = args.allowEmpty || false;\n this.args.autoActivateMode = args.autoActivateMode || 'none';\n\n for (let i = 0; i < this.#items.length; i++) {\n const item = this.#items[i] as ListItem;\n item.isSelected = this.isKeySelected(item.key);\n item.isDisabled = this.isKeyDisabled(item.key);\n }\n\n if (args.selectionMode) {\n this.args.selectionMode = args.selectionMode;\n }\n\n if (args.onAction) {\n this.args.onAction = args.onAction;\n }\n\n if (args.onSelectionChange) {\n this.args.onSelectionChange = args.onSelectionChange;\n }\n\n if (args.onListItemsChange) {\n this.args.onListItemsChange = args.onListItemsChange;\n }\n\n if (args.onActiveItemChange) {\n this.args.onActiveItemChange = args.onActiveItemChange;\n }\n }\n\n selectActiveItem(): void {\n const item = this.#activeItem;\n if (item) {\n item.el.click();\n }\n }\n\n selectItem(item?: ListItem): void {\n if (item) {\n if (this.args.selectionMode !== 'none') {\n this.activateItem(item);\n }\n if (typeof this.args.onAction === 'function') {\n this.args.onAction(item.key);\n }\n\n if (\n typeof this.args.onSelectionChange === 'function' &&\n this.args.selectionMode !== 'none'\n ) {\n this.args.onSelectionChange(this.#toggleSelectedItem(item));\n }\n }\n }\n\n activateItem(item?: ListItem): void {\n if (item && !item.isActive) {\n this.#clearActive();\n item.isActive = true;\n this.args.onActiveItemChange?.(item.key);\n\n // Ensure the item is scrolled into view\n requestAnimationFrame(() => {\n item.el.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n });\n }\n }\n\n setNextOptionActive(): void {\n for (let i = this.#indexofActiveItem + 1; i < this.#items.length; i++) {\n const item = this.#items[i];\n if (item && !item.isDisabled && !item.isActive) {\n this.activateItem(item);\n break;\n }\n }\n }\n\n setPreviousOptionActive(): void {\n for (let i = this.#indexofActiveItem - 1; i >= 0; i--) {\n const item = this.#items[i];\n if (item && !item.isDisabled && !item.isActive) {\n this.activateItem(item);\n break;\n }\n }\n }\n\n setFirstOptionActive(): void {\n for (let i = 0; i < this.#items.length; i++) {\n const item = this.#items[i];\n if (item && !item.isDisabled) {\n this.activateItem(item);\n break;\n }\n }\n }\n\n setSelectedOptionActive(): void {\n let activated = false;\n\n for (let i = 0; i < this.#items.length; i++) {\n const item = this.#items[i];\n if (item && !item.isDisabled && item.isSelected) {\n this.activateItem(item);\n activated = true;\n break;\n }\n }\n\n if (!activated) {\n this.setFirstOptionActive();\n }\n }\n\n setLastOptionActive(): void {\n for (let i = this.#items.length - 1; i >= 0; i--) {\n const item = this.#items[i];\n if (item && !item.isDisabled) {\n this.activateItem(item);\n break;\n }\n }\n }\n\n search(key: string): void {\n debounce(this, this.#clearSeaerch, 500);\n this.searchKeys += key.toLowerCase();\n\n for (let i = 0; i < this.#items.length; i++) {\n const item = this.#items[i] as ListItem;\n\n if (\n !item.isDisabled &&\n this.searchKeys &&\n item.textValue.trim().toLowerCase().startsWith(this.searchKeys)\n ) {\n this.activateItem(item);\n break;\n }\n }\n }\n\n isKeyDisabled(key: string): boolean {\n return this.args.disabledKeys?.includes(key) || false;\n }\n\n isKeySelected(key: string): boolean {\n return this.args.selectedKeys?.includes(key) || false;\n }\n\n get #indexofActiveItem(): number {\n let item = this.#activeItem;\n\n if (!item) {\n for (let i = 0; i < this.#items.length; i++) {\n const n = this.#items[i] as ListItem;\n if (n.isSelected) {\n item = n;\n break;\n }\n }\n }\n if (!item) {\n return -1;\n }\n return this.#items.indexOf(item);\n }\n\n // Ensure #items is always in sync with DOM order\n #syncItemsOrderWithDOM(): void {\n if (!this.#items.length) return;\n\n // Sort items based on their position in the DOM\n this.#items.sort((a, b) => {\n const position = a.el.compareDocumentPosition(b.el);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;\n if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;\n return 0;\n });\n }\n\n #toggleSelectedItem(item: ListItem): string[] {\n let selectedKeys: string[] = [];\n\n for (let i = 0; i < this.#items.length; i++) {\n const _item = this.#items[i] as ListItem;\n if (_item.isSelected) {\n selectedKeys.push(_item.key);\n }\n }\n\n if (\n selectedKeys.includes(item.key) &&\n ((this.args.allowEmpty && selectedKeys.length == 1) ||\n selectedKeys.length > 1)\n ) {\n const indexToRemove = selectedKeys.indexOf(item.key);\n selectedKeys.splice(indexToRemove, 1);\n } else {\n if (this.args.selectionMode === 'single') {\n selectedKeys = [item.key];\n } else if (!selectedKeys.includes(item.key)) {\n selectedKeys.push(item.key);\n }\n }\n\n return selectedKeys;\n }\n\n get #activeItem(): ListItem | undefined {\n for (let i = 0; i < this.#items.length; i++) {\n const item = this.#items[i] as ListItem;\n if (item.isActive) {\n return item;\n }\n }\n }\n\n #clearSeaerch(): void {\n this.searchKeys = '';\n }\n\n #clearActive(): void {\n for (let i = 0; i < this.#items.length; i++) {\n const item = this.#items[i] as ListItem;\n if (item.isActive) {\n item.isActive = false;\n }\n }\n }\n\n setup = modifier(\n (\n _el: HTMLUListElement | HTMLSelectElement,\n _: unknown[],\n args: ListManagerArgs\n ) => {\n this.updateArgs({\n selectionMode: args.selectionMode,\n disabledKeys: args.disabledKeys,\n selectedKeys: args.selectedKeys,\n allowEmpty: args.allowEmpty,\n autoActivateMode: args.autoActivateMode\n });\n }\n );\n\n setupItem = modifier(\n (\n el: HTMLLIElement | HTMLOptionElement,\n _: unknown[],\n args: Pick<ListItemArgs, 'key' | 'textValue'> & {\n onRegister?: (item: ListItem) => void;\n disableEvents?: boolean;\n }\n ) => {\n let textValue = args.textValue;\n if (\n typeof textValue === 'undefined' ||\n textValue === '' ||\n textValue === null\n ) {\n const labelId = el.getAttribute('aria-labelledby');\n if (labelId) {\n const labelElement = el.querySelector(`#${labelId}`);\n if (labelElement) {\n textValue = labelElement.textContent?.trim() || '';\n }\n } else {\n textValue = el.textContent?.trim() || '';\n }\n }\n\n this.register(el as HTMLLIElement, {\n key: args.key,\n textValue: textValue || '',\n isActive: false,\n isDisabled: this.isKeyDisabled(args.key),\n isSelected: this.isKeySelected(args.key)\n });\n const item = this.at(el);\n if (item && typeof args.onRegister === 'function') {\n args.onRegister(item);\n }\n\n const mouseEnter = (): void => {\n this.activateItem(item);\n };\n\n const mouseLeave = (): void => {\n if (item) {\n item.isActive = false;\n }\n };\n\n if (!args.disableEvents) {\n el.addEventListener('mouseenter', mouseEnter);\n el.addEventListener('mouseleave', mouseLeave);\n\n el.addEventListener('focusin', mouseEnter);\n el.addEventListener('focusout', mouseLeave);\n }\n\n return (): void => {\n this.unregister(el);\n\n if (!args.disableEvents) {\n el.removeEventListener('mouseenter', mouseEnter);\n el.removeEventListener('mouseleave', mouseLeave);\n\n el.removeEventListener('focusin', mouseEnter);\n el.removeEventListener('focusout', mouseLeave);\n }\n };\n }\n );\n}\n\nfunction keyAndLabelForItem(item: unknown): { key: string; label: string } {\n // Handle primitive types directly\n if (typeof item === 'string' || typeof item === 'number') {\n const value = item.toString();\n return { key: value, label: value };\n }\n\n // If the item is an object, try to extract key and label using common property names\n if (typeof item === 'object' && item !== null) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const typedItem = item as any;\n\n // Try to use the 'key' property first; if not available, use 'id'\n let keyProp = typedItem.key || typedItem.id;\n if (keyProp === undefined) {\n keyProp = item.toString();\n }\n\n // Determine the label by checking multiple possible properties\n let labelProp =\n typedItem.label || typedItem.value || typedItem.name || typedItem.title;\n if (labelProp === undefined) {\n labelProp = item.toString();\n }\n\n return { key: keyProp.toString(), label: labelProp.toString() };\n }\n\n // Fallback if item does not match expected types\n return { key: '', label: '' };\n}\n\nexport type { ListItem, ListItemArgs, SelectionMode, AutoActivateMode };\nexport { ListManager, keyAndLabelForItem };\n"],"names":["deferred","WeakMap","deferDecorator","proto","prop","desc","map","get","Map","set","findDeferredDecorator","target","_a","cursor","prototype","decorateFieldV2","decorators","initializer","configurable","enumerable","writable","decorator","Object","defineProperty","decorateMethodV2","origDesc","getOwnPropertyDescriptor","value","call","initializeDeferredDecorator","constructor","ListItem","el","key","textValue","g","tracked","i","void 0","args","isSelected","isDisabled","isActive","ListManager","searchKeys","selectionMode","selectedKeys","disabledKeys","allowEmpty","autoActivateMode","updateArgs","register","length","onActiveItemChange","newItem","push","onListItemsChange","later","setFirstOptionActive","setSelectedOptionActive","unregister","filter","item","activateItem","at","find","atKey","isKeySelected","isKeyDisabled","onAction","onSelectionChange","selectActiveItem","click","selectItem","requestAnimationFrame","scrollIntoView","block","inline","setNextOptionActive","setPreviousOptionActive","activated","setLastOptionActive","search","debounce","toLowerCase","trim","startsWith","includes","#indexofActiveItem","n","indexOf","#syncItemsOrderWithDOM","sort","a","b","position","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","#toggleSelectedItem","_item","indexToRemove","splice","#activeItem","#clearSeaerch","#clearActive","setup","modifier","_el","_","setupItem","labelId","getAttribute","labelElement","querySelector","textContent","onRegister","mouseEnter","mouseLeave","disableEvents","addEventListener","removeEventListener","keyAndLabelForItem","toString","label","typedItem","keyProp","id","undefined","labelProp","name","title"],"mappings":";;;;AAuBA,MAAMA,QAAA,sBAGEC,OAAA,EAAA;AAER,SAASC,eACPC,KAAA,EACAC,IAAA,EACAC,IAAA,EACM;AACF,EAAA,IAAAC,GAAA,GAAMN,QAAA,CAASO,GAAA,CAAIJ,KAAK,CAAA;EAC5B,IAAI,CAACG,GAAA,EAAK;AACRA,IAAAA,GAAA,sBAAUE,GAAA,EAAA;AACDR,IAAAA,QAAA,CAAAS,GAAA,CAAIN,KAAA,EAAOG,GAAG,CAAA;AACzB,EAAA;AACIA,EAAAA,GAAA,CAAAG,GAAA,CAAIL,IAAA,EAAMC,IAAI,CAAA;AACpB;AAEA,SAASK,qBAAAA,CACPC,MAAA,EACAP,IAAA,EACwB;AArB1B,EAAA,IAAAQ,EAAA;AAsBE,EAAA,IAAIC,MAAA,GAAkBF,MAAA,CAAeG,SAAA;AACrC,EAAA,OAAOD,MAAA,EAAQ;AACb,IAAA,IAAIR,IAAA,GAAA,CAAOO,EAAA,GAAAZ,QAAA,CAASO,GAAA,CAAIM,MAAM,MAAnB,IAAA,GAAA,MAAA,GAAAD,EAAA,CAAsBL,GAAA,CAAIH,IAAA,CAAA;AACrC,IAAA,IAAIC,IAAA,EAAM;AACD,MAAA,OAAAA,IAAA;AACT,IAAA;IACAQ,MAAA,GAAUA,MAAA,CAAeC,SAAA;AAC3B,EAAA;AACF;AAWA,SAASC,eAAAA,CACPD,SAAA,EACAV,IAAA,EACAY,UAAA,EACAC,WAAA,EACM;AACN,EAAA,IAAIZ,IAAA,GAAmB;AACrBa,IAAAA,YAAA,EAAc,IAAA;AACdC,IAAAA,UAAA,EAAY,IAAA;AACZC,IAAAA,QAAA,EAAU,IAAA;AACVH,IAAAA,WAAA,EAAa;AAAA,GAAA;AAEf,EAAA,IAAIA,WAAA,EAAa;IACfZ,IAAA,CAAKY,WAAA,GAAcA,WAAA;AACrB,EAAA;EACA,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