@nanahoshi/mona-ui 0.24.6 → 0.24.8

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 (78) hide show
  1. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
  2. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +14 -4
  3. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
  4. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1 -1
  5. package/fesm2022/nanahoshi-mona-ui-filter.mjs +233 -231
  6. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-CD_ODHpU.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DdyHnUIr.mjs} +24 -12
  7. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-B6gq7Hu3.mjs +208 -0
  8. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DdUY3I7P.mjs +1100 -0
  9. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-Sa1aAtJ-.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-DG8Bu4Dy.mjs} +34 -21
  10. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BvUM9nPt.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CVqpbMcb.mjs} +2565 -928
  11. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  12. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +79 -11
  13. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +20 -4
  14. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +335 -45
  15. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +565 -197
  16. package/fesm2022/nanahoshi-mona-ui-internal.mjs +28 -2
  17. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +598 -208
  18. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +193 -74
  19. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +58 -11
  20. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +62 -11
  21. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +62 -11
  22. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +69 -11
  23. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +58 -11
  24. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +62 -11
  25. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +58 -11
  26. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +58 -11
  27. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +62 -11
  28. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +78 -11
  29. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +58 -11
  30. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +58 -11
  31. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +58 -11
  32. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1 -1
  33. package/fesm2022/nanahoshi-mona-ui-pager.mjs +367 -463
  34. package/fesm2022/nanahoshi-mona-ui-query.mjs +317 -122
  35. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +205 -140
  36. package/i18n/catalogs/en-US.messages.json +64 -17
  37. package/locales/ar-sa/ar-sa.messages.json +58 -11
  38. package/locales/de-de/de-de.messages.json +58 -11
  39. package/locales/es-es/es-es.messages.json +58 -11
  40. package/locales/fr-fr/fr-fr.messages.json +58 -11
  41. package/locales/id-id/id-id.messages.json +58 -11
  42. package/locales/it-it/it-it.messages.json +58 -11
  43. package/locales/ja-jp/ja-jp.messages.json +58 -11
  44. package/locales/ko-kr/ko-kr.messages.json +58 -11
  45. package/locales/pt-br/pt-br.messages.json +58 -11
  46. package/locales/ru-ru/ru-ru.messages.json +58 -11
  47. package/locales/tr-tr/tr-tr.messages.json +58 -11
  48. package/locales/zh-cn/zh-cn.messages.json +58 -11
  49. package/locales/zh-tw/zh-tw.messages.json +58 -11
  50. package/package.json +1 -1
  51. package/types/nanahoshi-mona-ui-check-box.d.ts +11 -1
  52. package/types/nanahoshi-mona-ui-filter.d.ts +54 -32
  53. package/types/nanahoshi-mona-ui-grid.d.ts +359 -110
  54. package/types/nanahoshi-mona-ui-i18n.d.ts +97 -6
  55. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +14 -2
  56. package/types/nanahoshi-mona-ui-internal-list.d.ts +89 -10
  57. package/types/nanahoshi-mona-ui-internal-tree.d.ts +155 -40
  58. package/types/nanahoshi-mona-ui-internal.d.ts +10 -2
  59. package/types/nanahoshi-mona-ui-list-box.d.ts +148 -47
  60. package/types/nanahoshi-mona-ui-list-view.d.ts +111 -21
  61. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +53 -6
  62. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +53 -6
  63. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +53 -6
  64. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +53 -6
  65. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +53 -6
  66. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +53 -6
  67. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +53 -6
  68. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +53 -6
  69. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +53 -6
  70. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +53 -6
  71. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +53 -6
  72. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +53 -6
  73. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +53 -6
  74. package/types/nanahoshi-mona-ui-pager.d.ts +159 -76
  75. package/types/nanahoshi-mona-ui-query.d.ts +45 -14
  76. package/types/nanahoshi-mona-ui-tree-view.d.ts +84 -40
  77. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-0jN7I1jo.mjs +0 -176
  78. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BI_iE7pl.mjs +0 -946
@@ -221,8 +221,13 @@ interface MonaFilterMessages {
221
221
  readonly isNull: string;
222
222
  readonly isNullOrEmpty: string;
223
223
  readonly isTrue: string;
224
+ readonly logic: string;
225
+ readonly operator: string;
224
226
  readonly or: string;
227
+ readonly secondOperator: string;
228
+ readonly secondValue: string;
225
229
  readonly startsWith: string;
230
+ readonly value: string;
226
231
  }
227
232
  type FilterMessages = MonaFilterMessages;
228
233
 
@@ -230,27 +235,46 @@ interface MonaGridMessages {
230
235
  readonly all: string;
231
236
  readonly apply: string;
232
237
  readonly cancel: string;
233
- readonly cancelRowEdit: string;
238
+ readonly cancelNewRow: string;
239
+ cancelRowEdit(rowNumber: number): string;
240
+ clearFilter(column: string): string;
241
+ /** The name of the button that closes a row's detail row. */
242
+ collapseDetail(rowNumber: number): string;
243
+ /** Announced when the keyboard groups the grid by a column. */
244
+ columnGrouped(column: string): string;
245
+ /** Announced when the keyboard moves a column; the position counts visible columns from 1. */
246
+ columnMoved(column: string, position: number): string;
234
247
  readonly columns: string;
235
248
  columnsSelected(count: number): string;
249
+ readonly commandColumnTitle: string;
236
250
  readonly delete: string;
237
- readonly deleteRowConfirmation: string;
251
+ deleteRowConfirmation(rowNumber: number): string;
238
252
  readonly deleteRowTitle: string;
253
+ /** The name of the detail-toggle column's header. */
254
+ readonly details: string;
239
255
  readonly dragColumnHeaderToGroup: string;
240
256
  readonly edit: string;
241
- readonly editRow: string;
257
+ editRow(rowNumber: number): string;
258
+ /** The name of the button that opens a row's detail row. */
259
+ expandDetail(rowNumber: number): string;
242
260
  readonly fieldValidationError?: string;
243
261
  filterByColumn(column: string): string;
262
+ filterByColumnFiltered(column: string): string;
263
+ filterOperator(column: string, operator: string): string;
244
264
  readonly filterPlaceholder: string;
265
+ /** The name of a group indent column's header. */
266
+ readonly group: string;
267
+ /** Shown while the grid body loads. */
268
+ readonly loading: string;
245
269
  readonly modified: string;
246
270
  readonly moveAsNext: string;
247
271
  readonly moveAsPrevious: string;
248
272
  readonly moveRow: string;
249
273
  readonly noData: string;
250
274
  readonly remove: string;
251
- readonly removeRow: string;
275
+ removeRow(rowNumber: number): string;
252
276
  reorderRow(rowNumber: number): string;
253
- readonly resizeColumn: string;
277
+ resizeColumn(column: string): string;
254
278
  readonly rowReorder: string;
255
279
  readonly rowReorderDisabled: string;
256
280
  readonly rowReorderDisabledEditing: string;
@@ -265,25 +289,58 @@ interface MonaGridMessages {
265
289
  rowReorderMoved(fromRowNumber: number, toPosition: number): string;
266
290
  readonly rowValidationError: string;
267
291
  readonly save: string;
268
- readonly saveRow: string;
292
+ readonly saveNewRow: string;
293
+ saveRow(rowNumber: number): string;
269
294
  readonly selectAllRows: string;
270
295
  selectRow(rowNumber: number): string;
296
+ /** Describes a header's place in a multi-column sort, from 1. */
297
+ sortOrder(position: number): string;
298
+ /** The accessible name of the toolbar above the grid. */
299
+ readonly toolbar: string;
271
300
  }
272
301
 
273
302
  interface MonaListMessages {
274
303
  readonly filterList: string;
304
+ /** Status text while a list view is loading. */
305
+ readonly loading: string;
275
306
  readonly noData: string;
307
+ /** Accessible name of a list view's pager, from the list's name ("People pagination"). */
308
+ pagerLabel(list: string): string;
276
309
  }
277
310
 
278
311
  interface MonaListBoxMessages {
279
312
  readonly clearSelection: string;
313
+ /** Announced after Move Up or Move Down, with the new position of the first moved item ("Moved to position 2 of 5"). */
314
+ itemsMoved(position: number, total: number): string;
315
+ /** Announced after Remove, with the number of items removed. */
316
+ itemsRemoved(count: number): string;
317
+ /** Announced after a transfer, with the number of items moved and the name of the list they moved to. */
318
+ itemsTransferred(count: number, list: string): string;
319
+ /** Announced after a transfer to a list box that has no accessible name. */
320
+ itemsTransferredToOtherList(count: number): string;
280
321
  readonly moveDown: string;
281
322
  readonly moveUp: string;
282
323
  readonly remove: string;
324
+ /** Announced after Clear Selection. */
325
+ readonly selectionCleared: string;
326
+ /** Accessible name of the toolbar, from the list box's name ("Available foods actions"). */
327
+ toolbarLabel(list: string): string;
328
+ /** Label of Transfer All From when the connected list box has no accessible name. */
283
329
  readonly transferAllFrom: string;
330
+ /** Label of Transfer All From, naming the connected list box. */
331
+ transferAllFromList(list: string): string;
332
+ /** Label of Transfer All To when the connected list box has no accessible name. */
284
333
  readonly transferAllTo: string;
334
+ /** Label of Transfer All To, naming the connected list box. */
335
+ transferAllToList(list: string): string;
336
+ /** Label of Transfer From when the connected list box has no accessible name. */
285
337
  readonly transferFrom: string;
338
+ /** Label of Transfer From, naming the connected list box. */
339
+ transferFromList(list: string): string;
340
+ /** Label of Transfer To when the connected list box has no accessible name. */
286
341
  readonly transferTo: string;
342
+ /** Label of Transfer To, naming the connected list box. */
343
+ transferToList(list: string): string;
287
344
  }
288
345
 
289
346
  interface MonaMultiSelectMessages {
@@ -312,15 +369,27 @@ interface MonaOtpInputMessages {
312
369
 
313
370
  interface MonaPagerMessages {
314
371
  readonly firstPageLabel: string;
372
+ /** Accessible name of the page-size dropdown. */
373
+ readonly itemsPerPageLabel: string;
315
374
  jumpBackwardLabel(pages: number): string;
316
375
  jumpForwardLabel(pages: number): string;
317
376
  readonly lastPageLabel: string;
318
377
  readonly nextPageLabel: string;
378
+ /** @deprecated No longer rendered; input mode uses {@link pageInputPrefix} and {@link pageInputSuffix}. */
319
379
  readonly ofText: string;
380
+ /** Text before the page input in input mode ("Page" in "Page [3] of 10"). */
381
+ pageInputPrefix(totalPages: number): string;
382
+ /** Text after the page input in input mode ("of 10" in "Page [3] of 10"). */
383
+ pageInputSuffix(totalPages: number): string;
320
384
  pageLabel(page: number): string;
385
+ /** Accessible name of the page input and of the page dropdown shown on narrow pagers. */
386
+ readonly pageSelectLabel: string;
321
387
  pageSizeLabel(pageSize: number): string;
322
388
  pageStatus(page: number, totalPages: number): string;
389
+ /** @deprecated No longer rendered; input mode uses {@link pageInputPrefix} and {@link pageInputSuffix}. */
323
390
  readonly pageText: string;
391
+ /** Accessible name of the pager's navigation landmark. */
392
+ readonly pagerLabel: string;
324
393
  readonly previousPageLabel: string;
325
394
  rangeStatus(start: number, end: number, total: number): string;
326
395
  }
@@ -410,8 +479,30 @@ type TimeSelectorMessages = MonaTimeSelectorMessages;
410
479
  interface MonaTreeViewMessages {
411
480
  readonly collapse: string;
412
481
  readonly expand: string;
482
+ /** @deprecated No longer rendered; the filter input's name comes from {@link filterLabel}. */
413
483
  readonly filter: string;
484
+ /** Accessible name of the filter input, from the tree view's name ("Filter Files"). */
485
+ filterLabel(tree: string): string;
486
+ /** Accessible name of the filter input when the tree view has no `aria-label`. */
414
487
  readonly filterTree: string;
488
+ /** Announced, and read with the node, when a node's children couldn't be loaded. */
489
+ loadError(node: string): string;
490
+ /** Announced while a node's children take a while to load, and the expander's name meanwhile. */
491
+ loadingNode(node: string): string;
492
+ /** Announced when a keyboard move (Ctrl+Shift+Arrow) put a node after another node. */
493
+ movedAfter(node: string, target: string): string;
494
+ /** Announced when a keyboard move put a node before another node. */
495
+ movedBefore(node: string, target: string): string;
496
+ /** Announced when a keyboard move put a node inside another node, as its last child. */
497
+ movedInto(node: string, target: string): string;
498
+ /** Shown, and describes the tree, when the tree view has no data. */
499
+ readonly noData: string;
500
+ /** Shown, describes the tree and is announced, when no node matches the filter. */
501
+ readonly noMatches: string;
502
+ /** Announced after the user filters, with the number of nodes that match. */
503
+ results(count: number): string;
504
+ /** Name of the expander of a node whose children couldn't be loaded. */
505
+ retryLoading(node: string): string;
415
506
  }
416
507
 
417
508
  interface MonaWindowMessages {
@@ -13,10 +13,10 @@ declare class FilterInputComponent implements OnInit {
13
13
  */
14
14
  protected readonly inputAttributes: _angular_core.Signal<{
15
15
  "aria-label": string | null;
16
+ "aria-controls": string | null;
16
17
  role?: undefined;
17
18
  "aria-activedescendant"?: undefined;
18
19
  "aria-autocomplete"?: undefined;
19
- "aria-controls"?: undefined;
20
20
  "aria-expanded"?: undefined;
21
21
  } | {
22
22
  role: string;
@@ -31,11 +31,23 @@ declare class FilterInputComponent implements OnInit {
31
31
  * @default ""
32
32
  */
33
33
  readonly activeDescendant: _angular_core.InputSignal<string | null>;
34
+ /**
35
+ * @description Id of the element this input filters, exposed as `aria-controls`. Unlike `controls`, the input
36
+ * stays a text box: focus moves to the filtered element to navigate it.
37
+ * @default ""
38
+ */
39
+ readonly ariaControls: _angular_core.InputSignal<string>;
34
40
  /**
35
41
  * @description Accessible name of the input. The placeholder is not a reliable label, so set this whenever possible.
36
42
  * @default ""
37
43
  */
38
44
  readonly ariaLabel: _angular_core.InputSignal<string>;
45
+ /**
46
+ * @description Focuses the input when it renders, as a popup's filter does. Turn it off for an input that is part
47
+ * of the page, so it doesn't take focus on load.
48
+ * @default true
49
+ */
50
+ readonly autoFocus: _angular_core.InputSignal<boolean>;
39
51
  /**
40
52
  * @description Id of the list this input filters. When set, the input is exposed as a combobox controlling it.
41
53
  * @default ""
@@ -53,7 +65,7 @@ declare class FilterInputComponent implements OnInit {
53
65
  ngOnInit(): void;
54
66
  private setSubscriptions;
55
67
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterInputComponent, never>;
56
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterInputComponent, "mona-filter-input", never, { "activeDescendant": { "alias": "activeDescendant"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; "debounce": { "alias": "debounce"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "filterChange": "filterChange"; "inputBlur": "inputBlur"; "inputFocus": "inputFocus"; }, never, never, true, never>;
68
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterInputComponent, "mona-filter-input", never, { "activeDescendant": { "alias": "activeDescendant"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; "debounce": { "alias": "debounce"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "filterChange": "filterChange"; "inputBlur": "inputBlur"; "inputFocus": "inputFocus"; }, never, never, true, never>;
57
69
  }
58
70
 
59
71
  export { FilterInputComponent };
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, Signal, TemplateRef } from '@angular/core';
2
+ import { OnInit, Signal, TemplateRef, InjectionToken } from '@angular/core';
3
3
  import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
4
4
  import { MonaListMessages } from '@nanahoshi/mona-ui/i18n';
5
5
  import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
@@ -68,6 +68,12 @@ type GroupableOptions<T = unknown, R = unknown> = {
68
68
  * If not specified, the group headers will be ordered in ascending order.
69
69
  */
70
70
  headerOrder?: "asc" | "desc";
71
+ /**
72
+ * Text of a group's header, from the group's value (the first item's value when several values form one group,
73
+ * such as two `Date` objects for the same moment). Defaults to dates in the locale's medium date format,
74
+ * numbers in the locale's digits, and `String(value)` for everything else.
75
+ */
76
+ headerText?: (value: unknown) => string;
71
77
  } & OrderByOptions<T, R>;
72
78
 
73
79
  type NavigationMode = "highlight" | "select";
@@ -117,13 +123,17 @@ declare class ListService<TData> {
117
123
  readonly filterText: _angular_core.WritableSignal<string>;
118
124
  readonly filterableOptions: _angular_core.WritableSignal<FilterableOptions>;
119
125
  readonly focus$: Subject<void>;
126
+ /**
127
+ * The option that holds the list's Tab stop: the highlighted one, else the last selected one, else the first
128
+ * enabled one. Only shown items count, so a selection on another page doesn't take the Tab stop away.
129
+ */
120
130
  readonly focusableItem: _angular_core.Signal<ListItem<TData> | null>;
121
131
  readonly groupBy: _angular_core.WritableSignal<ListKeySelector<TData>>;
122
132
  /**
123
133
  * Maps each option uid to the uid of the group header it is listed under.
124
134
  */
125
135
  readonly groupHeaderUids: _angular_core.Signal<Map<string, string>>;
126
- readonly groupableOptions: _angular_core.WritableSignal<GroupableOptions<TData, any>>;
136
+ readonly groupableOptions: _angular_core.WritableSignal<GroupableOptions<TData, unknown>>;
127
137
  /**
128
138
  * The highlighted (active) item. When the data changes, it is re-resolved to the item with the same `uid`,
129
139
  * or cleared when that item is gone.
@@ -142,13 +152,18 @@ declare class ListService<TData> {
142
152
  readonly navigatedItem$: Subject<ListItem<TData> | null>;
143
153
  readonly pageState: _angular_core.WritableSignal<PageState>;
144
154
  readonly pageableOptions: _angular_core.WritableSignal<PagerSettings>;
155
+ /**
156
+ * `"listbox"` for options to choose from; `"list"` for items that are only shown, as `listitem`s without
157
+ * selection state.
158
+ */
159
+ readonly role: _angular_core.WritableSignal<"list" | "listbox">;
145
160
  readonly scrollToItem$: ReplaySubject<{
146
161
  item: ListItem<TData>;
147
162
  focus: boolean;
148
163
  }>;
149
164
  readonly selectableOptions: _angular_core.WritableSignal<SelectableOptions>;
150
- readonly selectedKeys: _angular_core.WritableSignal<ImmutableSet<any>>;
151
- readonly selectedKeysChange$: Subject<any[]>;
165
+ readonly selectedKeys: _angular_core.WritableSignal<ImmutableSet<unknown>>;
166
+ readonly selectedKeysChange$: Subject<unknown[]>;
152
167
  readonly selectedListItems: _angular_core.Signal<ImmutableSet<ListItem<TData>>>;
153
168
  readonly selectionChange$: Subject<ListItem<TData>>;
154
169
  readonly textField: _angular_core.WritableSignal<string | Selector<TData, string>>;
@@ -162,7 +177,8 @@ declare class ListService<TData> {
162
177
  clearHighlightedItem(): void;
163
178
  clearSelections(): void;
164
179
  /**
165
- * Finds the next item whose text starts with the typeahead buffer, starting after the active item.
180
+ * Finds the next item whose text starts with the typeahead buffer, starting after the active item; once the
181
+ * buffer holds more than one character, an active item that still matches stays.
166
182
  * Group headers and disabled items are never matched.
167
183
  */
168
184
  cycleThroughMatchedItems(buffer: string): ListItem<TData> | null;
@@ -178,7 +194,7 @@ declare class ListService<TData> {
178
194
  */
179
195
  getDataItemValue(dataItem: TData): unknown;
180
196
  getFilterDebounceDuration(): number;
181
- getGroupField(item: ListItem<TData>): any;
197
+ getGroupField(item: ListItem<TData>): unknown;
182
198
  /**
183
199
  * Returns the uid of the group header an item is rendered under, or `null` when the list is not grouped.
184
200
  */
@@ -197,6 +213,10 @@ declare class ListService<TData> {
197
213
  * otherwise the first item accepted by the filter operator. Group headers and disabled items are skipped.
198
214
  */
199
215
  getMatchingFilteredItem(text: string): ListItem<TData> | null;
216
+ /**
217
+ * Whether a data item is disabled by `disabledBy`, whether or not it is in the list.
218
+ */
219
+ isDataItemDisabled(dataItem: TData): boolean;
200
220
  isDisabled(item: ListItem<TData>): boolean;
201
221
  isFilteringEnabled(): boolean;
202
222
  isHighlighted(item: ListItem<TData>): boolean;
@@ -216,7 +236,7 @@ declare class ListService<TData> {
216
236
  setFilterPlaceholder(placeholder: string): void;
217
237
  setFilterableOptions(options: Partial<FilterableOptions>): void;
218
238
  setGroupBy(groupSelector: ListKeySelector<TData>): void;
219
- setGroupableOptions(options: GroupableOptions<TData, any>): void;
239
+ setGroupableOptions(options: GroupableOptions<TData, unknown>): void;
220
240
  setNavigableOptions(options: Partial<NavigableOptions>): void;
221
241
  setPageableOptions(settings: PagerSettings): void;
222
242
  setSelectableOptions(options: Partial<SelectableOptions>): void;
@@ -248,6 +268,7 @@ declare class ListService<TData> {
248
268
  declare class ListComponent<TData> implements OnInit {
249
269
  #private;
250
270
  private readonly filterInput;
271
+ private readonly filterInputElement;
251
272
  /**
252
273
  * Id of the highlighted option, used as `aria-activedescendant` by the filter input.
253
274
  */
@@ -257,10 +278,16 @@ declare class ListComponent<TData> implements OnInit {
257
278
  * The `listId` input, or a generated id so the listbox can always be referenced by `aria-controls`.
258
279
  */
259
280
  protected readonly effectiveListId: Signal<string>;
281
+ /** The empty list element covers the "No data" content and shows the focus ring when it has focus. */
282
+ protected readonly emptyListClasses: Signal<string>;
260
283
  protected readonly footerTemplate: Signal<TemplateRef<any> | undefined>;
261
284
  protected readonly groupHeaderClasses: Signal<string>;
262
285
  protected readonly groupHeaderTemplate: Signal<TemplateRef<any> | undefined>;
263
286
  protected readonly headerTemplate: Signal<TemplateRef<any> | undefined>;
287
+ /**
288
+ * The host takes the Tab stop when no option can: every option is disabled, or a virtual list's focusable option
289
+ * is scrolled out of the drawn rows. Focusing the host then moves focus to that option.
290
+ */
264
291
  protected readonly hostTabIndex: Signal<0 | -1>;
265
292
  protected readonly innerListClasses: Signal<string>;
266
293
  protected readonly itemTemplate: Signal<TemplateRef<any> | undefined>;
@@ -270,7 +297,17 @@ declare class ListComponent<TData> implements OnInit {
270
297
  protected readonly listService: ListService<TData>;
271
298
  protected readonly listWidth: Signal<ListSizeType>;
272
299
  protected readonly messages: Signal<_nanahoshi_mona_ui_i18n.MonaListMessages>;
300
+ /** Id of the "No data" content, which describes an empty list. */
301
+ protected readonly noDataId: string;
273
302
  protected readonly noDataTemplate: Signal<TemplateRef<any> | undefined>;
303
+ /**
304
+ * The shown items split at group headers: a section without a header holds ungrouped items.
305
+ */
306
+ protected readonly viewSections: Signal<{
307
+ header: ListItem<TData> | null;
308
+ items: Array<ListItem<TData>>;
309
+ key: string;
310
+ }[]>;
274
311
  protected readonly viewportHeight: Signal<ListSizeType>;
275
312
  protected readonly virtualScrollViewport: Signal<CdkVirtualScrollViewport | undefined>;
276
313
  /**
@@ -278,18 +315,38 @@ declare class ListComponent<TData> implements OnInit {
278
315
  * @default ""
279
316
  */
280
317
  readonly ariaLabel: _angular_core.InputSignal<string>;
318
+ /**
319
+ * @description Id of the element that names the list, as an alternative to `ariaLabel`.
320
+ * @default ""
321
+ */
322
+ readonly ariaLabelledBy: _angular_core.InputSignal<string>;
323
+ /**
324
+ * @description Marks the list as loading (`aria-busy`).
325
+ * @default false
326
+ */
327
+ readonly busy: _angular_core.InputSignalWithTransform<boolean, unknown>;
281
328
  readonly data: _angular_core.InputSignal<Iterable<TData> | null | undefined>;
282
329
  readonly focusOnMount: _angular_core.InputSignal<boolean>;
283
330
  readonly height: _angular_core.InputSignal<ListSizeInputType>;
331
+ /**
332
+ * @description Emitted when the user activates an enabled item by clicking it or pressing Enter on it, whether or
333
+ * not the list is selectable.
334
+ */
335
+ readonly itemActivate: _angular_core.OutputEmitterRef<ListItem<TData>>;
284
336
  readonly itemSelect: _angular_core.OutputEmitterRef<SelectionChangeEvent<TData>>;
285
337
  readonly listClass: _angular_core.InputSignal<string>;
286
338
  readonly listId: _angular_core.InputSignal<string>;
287
339
  readonly listItemClass: _angular_core.InputSignal<string>;
288
340
  readonly listItemStyle: _angular_core.InputSignal<Partial<CSSStyleDeclaration>>;
341
+ /**
342
+ * @description `"listbox"` for options to choose from, `"list"` for items that are only shown.
343
+ * @default "listbox"
344
+ */
345
+ readonly listRole: _angular_core.InputSignal<"list" | "listbox">;
289
346
  readonly listStyle: _angular_core.InputSignal<Partial<CSSStyleDeclaration>>;
290
347
  readonly maxHeight: _angular_core.InputSignal<ListSizeInputType>;
291
348
  readonly maxWidth: _angular_core.InputSignal<ListSizeInputType>;
292
- readonly size: _angular_core.InputSignal<"large" | "medium" | "small" | null | undefined>;
349
+ readonly size: _angular_core.InputSignal<"medium" | "large" | "small" | null | undefined>;
293
350
  readonly textField: _angular_core.InputSignal<ListKeySelector<TData, string> | undefined>;
294
351
  readonly width: _angular_core.InputSignal<ListSizeInputType>;
295
352
  constructor();
@@ -298,6 +355,8 @@ declare class ListComponent<TData> implements OnInit {
298
355
  protected onListItemClick(item: ListItem<TData>): void;
299
356
  protected trackByUid(_: number, item: ListItem<TData>): string;
300
357
  private cycleThroughMatchedItems;
358
+ /** Focuses the list element of an empty list, which names the list and is described by "No data". */
359
+ private focusEmptyList;
301
360
  private focusToItem;
302
361
  /**
303
362
  * Handles multiple-selection shortcuts from the WAI-ARIA listbox pattern:
@@ -307,6 +366,18 @@ declare class ListComponent<TData> implements OnInit {
307
366
  private handleMultipleSelectionKeys;
308
367
  private handleNavigation;
309
368
  private handlePageScroll;
369
+ /**
370
+ * Whether a key event is meant for the list: from the host, the list element, one of this list's own options or
371
+ * its filter input. Keys typed into controls in header, footer or item templates (or in a nested list) are left
372
+ * to those controls.
373
+ */
374
+ private isListKeyTarget;
375
+ private rememberFocusedOption;
376
+ /**
377
+ * When the option that had focus is removed from the data, focus would fall to the page. Move it to the option
378
+ * now at the same position, or the last one.
379
+ */
380
+ private restoreFocusAfterRemoval;
310
381
  private scrollToItem;
311
382
  private selectItem;
312
383
  private setInitialSelectionOrFocus;
@@ -316,7 +387,7 @@ declare class ListComponent<TData> implements OnInit {
316
387
  private setTypeaheadSubscription;
317
388
  private toggleItem;
318
389
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListComponent<any>, never>;
319
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListComponent<any>, "mona-list", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "focusOnMount": { "alias": "focusOnMount"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "listClass": { "alias": "listClass"; "required": false; "isSignal": true; }; "listId": { "alias": "listId"; "required": false; "isSignal": true; }; "listItemClass": { "alias": "listItemClass"; "required": false; "isSignal": true; }; "listItemStyle": { "alias": "listItemStyle"; "required": false; "isSignal": true; }; "listStyle": { "alias": "listStyle"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
390
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListComponent<any>, "mona-list", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "busy": { "alias": "busy"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "focusOnMount": { "alias": "focusOnMount"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "listClass": { "alias": "listClass"; "required": false; "isSignal": true; }; "listId": { "alias": "listId"; "required": false; "isSignal": true; }; "listItemClass": { "alias": "listItemClass"; "required": false; "isSignal": true; }; "listItemStyle": { "alias": "listItemStyle"; "required": false; "isSignal": true; }; "listRole": { "alias": "listRole"; "required": false; "isSignal": true; }; "listStyle": { "alias": "listStyle"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "itemActivate": "itemActivate"; "itemSelect": "itemSelect"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
320
391
  }
321
392
 
322
393
  declare class ListFooterTemplateDirective {
@@ -344,7 +415,15 @@ declare class ListNoDataTemplateDirective {
344
415
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListNoDataTemplateDirective, "ng-template[monaListNoDataTemplate]", never, {}, {}, never, never, true, never>;
345
416
  }
346
417
 
418
+ /**
419
+ * Lets a component that wraps a `mona-list-view` in its own template share its `ListService` with that list view.
420
+ * Provide it in `viewProviders` (`{ provide: LIST_VIEW_HOST_LIST_SERVICE, useExisting: ListService }`), so only the
421
+ * component's own list view sees it, never a list view placed in content the component projects or renders from a
422
+ * consumer's template. Without it, every list view has its own service.
423
+ */
424
+ declare const LIST_VIEW_HOST_LIST_SERVICE: InjectionToken<ListService<unknown>>;
425
+
347
426
  declare const LIST_DEFAULT_MESSAGES: MonaListMessages;
348
427
 
349
- export { LIST_DEFAULT_MESSAGES, ListComponent, ListFooterTemplateDirective, ListGroupHeaderTemplateDirective, ListHeaderTemplateDirective, ListItem, ListItemTemplateDirective, ListNoDataTemplateDirective, ListService };
428
+ export { LIST_DEFAULT_MESSAGES, LIST_VIEW_HOST_LIST_SERVICE, ListComponent, ListFooterTemplateDirective, ListGroupHeaderTemplateDirective, ListHeaderTemplateDirective, ListItem, ListItemTemplateDirective, ListNoDataTemplateDirective, ListService };
350
429
  export type { GroupableOptions, ListKeySelector, ListSizeInputType, NavigableOptions, NavigationDirection, NavigationMode, PagerSettings, SelectableOptions, SelectionChangeEvent };