@nanahoshi/mona-ui 0.27.2 → 0.29.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/docs/api/chart.md +2 -2
- package/docs/api/locales.md +8 -0
- package/docs/api/popup.md +1 -1
- package/docs/api/theme.md +2 -2
- package/docs/chart.md +14 -0
- package/docs/editor.md +2 -0
- package/docs/installation.md +147 -15
- package/docs/introduction.md +37 -15
- package/docs/theming-built-in-themes.md +67 -0
- package/docs/theming-custom-colors.md +274 -0
- package/docs/theming-custom-themes.md +168 -0
- package/docs/theming.md +164 -248
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
- package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2071 -1573
- package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
- package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
- package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
- package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
- package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
- package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +599 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +61 -77
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
- package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
- package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
- package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
- package/llms.txt +7 -3
- package/locales/pl-pl/package.json +4 -0
- package/locales/pl-pl/pl-pl.messages.json +536 -0
- package/package.json +66 -23
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
- package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
- package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
- package/types/nanahoshi-mona-ui-button.d.ts +227 -166
- package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
- package/types/nanahoshi-mona-ui-card.d.ts +125 -111
- package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
- package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
- package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
- package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
- package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
- package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
- package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
- package/types/nanahoshi-mona-ui-command.d.ts +279 -191
- package/types/nanahoshi-mona-ui-common.d.ts +354 -385
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
- package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
- package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
- package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
- package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
- package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
- package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
- package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
- package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
- package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
- package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
- package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
- package/types/nanahoshi-mona-ui-label.d.ts +108 -78
- package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
- package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
- package/types/nanahoshi-mona-ui-list.d.ts +2 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +540 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales.d.ts +18 -19
- package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
- package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
- package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
- package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
- package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
- package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
- package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
- package/types/nanahoshi-mona-ui-query.d.ts +82 -88
- package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
- package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
- package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
- package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
- package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
- package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
- package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
- package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
- package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
- package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
- package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
- package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
- package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
- package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
- package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
- package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
- package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
- package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
- package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
- package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
- package/types/nanahoshi-mona-ui-window.d.ts +494 -399
- package/types/nanahoshi-mona-ui.d.ts +1 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
|
@@ -1,444 +1,510 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Subject, ReplaySubject } from 'rxjs';
|
|
9
|
-
|
|
1
|
+
import { CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { InjectionToken, OnInit, Signal, TemplateRef } from "@angular/core";
|
|
4
|
+
import { FilterChangeEvent, FilterableOptions, VirtualScrollOptions } from "@nanahoshi/mona-ui/common";
|
|
5
|
+
import { ImmutableSet, Predicate, Selector } from "@mirei/ts-collections";
|
|
6
|
+
import { ReplaySubject, Subject } from "rxjs";
|
|
7
|
+
import { MonaListMessages } from "@nanahoshi/mona-ui/i18n";
|
|
10
8
|
interface ListItemOptions<T> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
data: T;
|
|
10
|
+
header?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Marks the item as a group header. Defaults to `true` when a non-empty `header` is given.
|
|
13
|
+
* Set it explicitly for groups whose key is empty, which still need a header row.
|
|
14
|
+
*/
|
|
15
|
+
isHeader?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Reuses an existing identifier, so an item rebuilt for refreshed data keeps its DOM id and tracking.
|
|
18
|
+
* A new UUID is generated when omitted.
|
|
19
|
+
*/
|
|
20
|
+
uid?: string;
|
|
23
21
|
}
|
|
24
22
|
/** An item of a list, wrapping its data item. */
|
|
25
|
-
declare class ListItem<TData> {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
export declare class ListItem<TData> {
|
|
24
|
+
readonly data: TData;
|
|
25
|
+
readonly header: string;
|
|
26
|
+
readonly isHeader: boolean;
|
|
27
|
+
readonly uid: string;
|
|
28
|
+
constructor(options: ListItemOptions<TData>);
|
|
31
29
|
}
|
|
32
|
-
|
|
33
|
-
type ListKeySelector<T, K = unknown> = string | Selector<T, K> | null;
|
|
34
|
-
|
|
30
|
+
export type ListKeySelector<T, K = unknown> = string | Selector<T, K> | null;
|
|
35
31
|
/** A CSS length, or nothing to leave it to the stylesheet. */
|
|
36
32
|
type ListSizeType = string | null | undefined;
|
|
37
33
|
type ListSizeInputType = ListSizeType | number;
|
|
38
|
-
|
|
39
34
|
interface SelectionChangeEvent<T> {
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
item: ListItem<T>;
|
|
36
|
+
source: SelectionSource;
|
|
42
37
|
}
|
|
43
38
|
type SelectionSource = {
|
|
44
|
-
|
|
39
|
+
via: "mouse";
|
|
45
40
|
} | {
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
via: "keyboard";
|
|
42
|
+
key: string;
|
|
48
43
|
};
|
|
49
|
-
|
|
50
44
|
/** How the items within each group are ordered. Leave both out to keep their order. */
|
|
51
|
-
type OrderByOptions<T, R> = {
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
export type OrderByOptions<T, R> = {
|
|
46
|
+
orderBy?: never;
|
|
47
|
+
orderByDirection?: never;
|
|
54
48
|
} | {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
/**
|
|
50
|
+
* The field to order the items of per group. If not specified, the items of the group will not be ordered.
|
|
51
|
+
*/
|
|
52
|
+
orderBy: string | Selector<T, R>;
|
|
53
|
+
/**
|
|
54
|
+
* The direction to order the items of per group.
|
|
55
|
+
*/
|
|
56
|
+
orderByDirection?: "asc" | "desc";
|
|
63
57
|
};
|
|
64
|
-
type GroupableOptions<T = unknown, R = unknown> = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
export type GroupableOptions<T = unknown, R = unknown> = {
|
|
59
|
+
/**
|
|
60
|
+
* Whether to group the items. If not specified, the items will not be grouped.
|
|
61
|
+
*/
|
|
62
|
+
enabled?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* The direction to order the group headers.
|
|
65
|
+
* If not specified, the group headers will be ordered in ascending order.
|
|
66
|
+
*/
|
|
67
|
+
headerOrder?: "asc" | "desc";
|
|
68
|
+
/**
|
|
69
|
+
* Text of a group's header, from the group's value (the first item's value when several values form one group,
|
|
70
|
+
* such as two `Date` objects for the same moment). Defaults to dates in the locale's medium date format,
|
|
71
|
+
* numbers in the locale's digits, and `String(value)` for everything else.
|
|
72
|
+
*/
|
|
73
|
+
headerText?: (value: unknown) => string;
|
|
80
74
|
} & OrderByOptions<T, R>;
|
|
81
|
-
|
|
82
75
|
/** Whether arrow keys only highlight an item, or select it as well. */
|
|
83
|
-
type NavigationMode = "highlight" | "select";
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
wrap: boolean;
|
|
76
|
+
export type NavigationMode = "highlight" | "select";
|
|
77
|
+
export interface NavigableOptions {
|
|
78
|
+
/** Whether keyboard navigation is active. */
|
|
79
|
+
enabled: boolean;
|
|
80
|
+
/** Whether navigation only moves a visual highlight (`"highlight"`) or also changes selection (`"select"`). */
|
|
81
|
+
mode: NavigationMode;
|
|
82
|
+
/** Whether navigating past the last (or before the first) item cycles to the other end. */
|
|
83
|
+
wrap: boolean;
|
|
92
84
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
/** Number of numeric page buttons shown at once, when `type` is `"numeric"`. */
|
|
112
|
-
visiblePages: number;
|
|
85
|
+
export type NavigationDirection = "next" | "previous" | "first" | "last" | "pageup" | "pagedown";
|
|
86
|
+
export interface PagerSettings {
|
|
87
|
+
/** Whether the pager is active. */
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
/** Whether first/last page buttons are shown. */
|
|
90
|
+
firstLast: boolean;
|
|
91
|
+
/** Number of items shown per page. */
|
|
92
|
+
pageSize: number;
|
|
93
|
+
/** Page size options shown in the pager, or `false`/`true` to hide/show a default set. */
|
|
94
|
+
pageSizeValues: number[] | boolean;
|
|
95
|
+
/** Whether previous/next page buttons are shown. */
|
|
96
|
+
previousNext: boolean;
|
|
97
|
+
/** Whether a page summary (e.g. "1-10 of 50") is shown. */
|
|
98
|
+
showInfo: boolean;
|
|
99
|
+
/** Whether pages are selected via numbered buttons or a page-number input. */
|
|
100
|
+
type: "numeric" | "input";
|
|
101
|
+
/** Number of numeric page buttons shown at once, when `type` is `"numeric"`. */
|
|
102
|
+
visiblePages: number;
|
|
113
103
|
}
|
|
114
|
-
|
|
115
104
|
interface PageState {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
105
|
+
page: number;
|
|
106
|
+
skip: number;
|
|
107
|
+
take: number;
|
|
119
108
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
toggleable?: boolean;
|
|
109
|
+
export type SelectableOptions = {
|
|
110
|
+
checkboxes?: boolean;
|
|
111
|
+
enabled?: boolean;
|
|
112
|
+
mode: "single";
|
|
113
|
+
toggleable?: boolean;
|
|
126
114
|
} | {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
115
|
+
checkboxes?: boolean;
|
|
116
|
+
enabled?: boolean;
|
|
117
|
+
mode: "multiple";
|
|
130
118
|
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ListService<any>>;
|
|
119
|
+
export declare class ListService<TData> {
|
|
120
|
+
#private;
|
|
121
|
+
readonly disabledBy: import("@angular/core").WritableSignal<string | Predicate<TData>>;
|
|
122
|
+
readonly filterChange$: Subject<FilterChangeEvent>;
|
|
123
|
+
readonly filterInputVisible: import("@angular/core").WritableSignal<boolean>;
|
|
124
|
+
readonly filterPlaceholder: import("@angular/core").WritableSignal<string>;
|
|
125
|
+
readonly filterText: import("@angular/core").WritableSignal<string>;
|
|
126
|
+
readonly filterableOptions: import("@angular/core").WritableSignal<FilterableOptions>;
|
|
127
|
+
readonly focus$: Subject<void>;
|
|
128
|
+
/**
|
|
129
|
+
* The option that holds the list's Tab stop: the highlighted one, else the last selected one, else the first
|
|
130
|
+
* enabled one. Only shown items count, so a selection on another page doesn't take the Tab stop away.
|
|
131
|
+
*/
|
|
132
|
+
readonly focusableItem: import("@angular/core").Signal<ListItem<TData> | null>;
|
|
133
|
+
readonly groupBy: import("@angular/core").WritableSignal<ListKeySelector<TData>>;
|
|
134
|
+
/**
|
|
135
|
+
* Maps each option uid to the uid of the group header it is listed under.
|
|
136
|
+
*/
|
|
137
|
+
readonly groupHeaderUids: import("@angular/core").Signal<Map<string, string>>;
|
|
138
|
+
readonly groupableOptions: import("@angular/core").WritableSignal<GroupableOptions<TData, unknown>>;
|
|
139
|
+
/**
|
|
140
|
+
* The highlighted (active) item. When the data changes, it is re-resolved to the item with the same `uid`,
|
|
141
|
+
* or cleared when that item is gone.
|
|
142
|
+
*/
|
|
143
|
+
readonly highlightedItem: import("@angular/core").WritableSignal<ListItem<TData> | null>;
|
|
144
|
+
readonly itemFocusOut$: Subject<ListItem<TData>>;
|
|
145
|
+
/**
|
|
146
|
+
* Position of each option among all filtered options (not only the current page), for `aria-posinset`
|
|
147
|
+
* and `aria-setsize`.
|
|
148
|
+
*/
|
|
149
|
+
readonly itemPositions: import("@angular/core").Signal<Map<string, {
|
|
150
|
+
position: number;
|
|
151
|
+
total: number;
|
|
152
|
+
}>>;
|
|
153
|
+
readonly navigableOptions: import("@angular/core").WritableSignal<NavigableOptions>;
|
|
154
|
+
readonly navigatedItem$: Subject<ListItem<TData> | null>;
|
|
155
|
+
readonly pageState: import("@angular/core").WritableSignal<PageState>;
|
|
156
|
+
readonly pageableOptions: import("@angular/core").WritableSignal<PagerSettings>;
|
|
157
|
+
/**
|
|
158
|
+
* `"listbox"` for options to choose from; `"list"` for items that are only shown, as `listitem`s without
|
|
159
|
+
* selection state.
|
|
160
|
+
*/
|
|
161
|
+
readonly role: import("@angular/core").WritableSignal<"list" | "listbox">;
|
|
162
|
+
readonly scrollToItem$: ReplaySubject<{
|
|
163
|
+
item: ListItem<TData>;
|
|
164
|
+
focus: boolean;
|
|
165
|
+
}>;
|
|
166
|
+
readonly selectableOptions: import("@angular/core").WritableSignal<SelectableOptions>;
|
|
167
|
+
readonly selectedKeys: import("@angular/core").WritableSignal<ImmutableSet<unknown>>;
|
|
168
|
+
readonly selectedKeysChange$: Subject<unknown[]>;
|
|
169
|
+
readonly selectedListItems: import("@angular/core").Signal<ImmutableSet<ListItem<TData>>>;
|
|
170
|
+
readonly selectionChange$: Subject<ListItem<TData>>;
|
|
171
|
+
readonly textField: import("@angular/core").WritableSignal<string | Selector<TData, string>>;
|
|
172
|
+
readonly valueField: import("@angular/core").WritableSignal<string | Selector<TData, unknown>>;
|
|
173
|
+
/**
|
|
174
|
+
* Visible items in display order: filtered, ordered and grouped (with header rows), but not paged.
|
|
175
|
+
*/
|
|
176
|
+
readonly viewItems: import("@angular/core").Signal<ImmutableSet<ListItem<TData>>>;
|
|
177
|
+
readonly virtualScrollOptions: import("@angular/core").WritableSignal<VirtualScrollOptions>;
|
|
178
|
+
clearFilter(): void;
|
|
179
|
+
clearHighlightedItem(): void;
|
|
180
|
+
clearSelections(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Finds the next item whose text starts with the typeahead buffer, starting after the active item; once the
|
|
183
|
+
* buffer holds more than one character, an active item that still matches stays.
|
|
184
|
+
* Group headers and disabled items are never matched.
|
|
185
|
+
*/
|
|
186
|
+
cycleThroughMatchedItems(buffer: string): ListItem<TData> | null;
|
|
187
|
+
deselectItems(item: Iterable<ListItem<TData>>): void;
|
|
188
|
+
/**
|
|
189
|
+
* Resolves the selection value of a data item through `valueField`.
|
|
190
|
+
*
|
|
191
|
+
* When no `valueField` is configured, the data item itself is the value.
|
|
192
|
+
* When `valueField` is a string, the item property is read with a nullish fallback to the item.
|
|
193
|
+
* When `valueField` is a function, its result is used as-is.
|
|
194
|
+
*
|
|
195
|
+
* Falsy results such as `0`, `false`, and `""` are valid values and do not fall back to the item.
|
|
196
|
+
*/
|
|
197
|
+
getDataItemValue(dataItem: TData): unknown;
|
|
198
|
+
getFilterDebounceDuration(): number;
|
|
199
|
+
getGroupField(item: ListItem<TData>): unknown;
|
|
200
|
+
/**
|
|
201
|
+
* Returns the uid of the group header an item is rendered under, or `null` when the list is not grouped.
|
|
202
|
+
*/
|
|
203
|
+
getGroupHeaderUid(item: ListItem<TData>): string | null;
|
|
204
|
+
getItemPosition(item: ListItem<TData>): {
|
|
205
|
+
position: number;
|
|
206
|
+
total: number;
|
|
207
|
+
} | null;
|
|
208
|
+
/**
|
|
209
|
+
* Resolves the display text of an item through `textField`.
|
|
210
|
+
* Non-string field values (numbers, dates, …) are converted with `String()`, and nullish values become `""`.
|
|
211
|
+
*/
|
|
212
|
+
getItemText(item: ListItem<TData>): string;
|
|
213
|
+
/**
|
|
214
|
+
* Finds the item that typed text should resolve to: an exact text match first (respecting `caseSensitive`),
|
|
215
|
+
* otherwise the first item accepted by the filter operator. Group headers and disabled items are skipped.
|
|
216
|
+
*/
|
|
217
|
+
getMatchingFilteredItem(text: string): ListItem<TData> | null;
|
|
218
|
+
/**
|
|
219
|
+
* Whether a data item is disabled by `disabledBy`, whether or not it is in the list.
|
|
220
|
+
*/
|
|
221
|
+
isDataItemDisabled(dataItem: TData): boolean;
|
|
222
|
+
isDisabled(item: ListItem<TData>): boolean;
|
|
223
|
+
isFilteringEnabled(): boolean;
|
|
224
|
+
isHighlighted(item: ListItem<TData>): boolean;
|
|
225
|
+
isSelected(item: ListItem<TData>): boolean;
|
|
226
|
+
navigate(direction: NavigationDirection, mode: NavigationMode, focus: boolean): ListItem<TData> | null;
|
|
227
|
+
notifySelectionChange(item: ListItem<TData>): void;
|
|
228
|
+
scrollToItem(item: ListItem<TData>, focus: boolean): void;
|
|
229
|
+
/**
|
|
230
|
+
* Selects every enabled item currently in view, keeping existing selections. Only applies in multiple mode.
|
|
231
|
+
* @returns whether the selection changed.
|
|
232
|
+
*/
|
|
233
|
+
selectAllItems(): boolean;
|
|
234
|
+
selectItem(item: ListItem<TData>, scroll?: boolean, focus?: boolean): void;
|
|
235
|
+
setData(data: Iterable<TData>): void;
|
|
236
|
+
setDisabledBy(disabledBy: string | Predicate<TData>): void;
|
|
237
|
+
setFilter(filter: string): void;
|
|
238
|
+
setFilterPlaceholder(placeholder: string): void;
|
|
239
|
+
setFilterableOptions(options: Partial<FilterableOptions>): void;
|
|
240
|
+
setGroupBy(groupSelector: ListKeySelector<TData>): void;
|
|
241
|
+
setGroupableOptions(options: GroupableOptions<TData, unknown>): void;
|
|
242
|
+
setNavigableOptions(options: Partial<NavigableOptions>): void;
|
|
243
|
+
setPageableOptions(settings: PagerSettings): void;
|
|
244
|
+
setSelectableOptions(options: Partial<SelectableOptions>): void;
|
|
245
|
+
setSelectedDataItems(dataItems: Iterable<TData>): void;
|
|
246
|
+
setSelectedKeys(selectedKeys: Iterable<unknown>): void;
|
|
247
|
+
setTextField(textField: string | Selector<TData, string>): void;
|
|
248
|
+
setValueField(valueField: string | Selector<TData, unknown>): void;
|
|
249
|
+
setVirtualScrollOptions(options: VirtualScrollOptions): void;
|
|
250
|
+
private filterItem;
|
|
251
|
+
/**
|
|
252
|
+
* Returns the item when it is one of the navigable items, otherwise `null`.
|
|
253
|
+
* An anchor that was filtered out or removed must not be navigated from.
|
|
254
|
+
*/
|
|
255
|
+
private getItemInView;
|
|
256
|
+
private getOrderKey;
|
|
257
|
+
private getPreviousItemForNavigation;
|
|
258
|
+
private getSelectionKey;
|
|
259
|
+
private navigateFirstForSingleSelection;
|
|
260
|
+
private navigateForMultipleSelection;
|
|
261
|
+
private navigateForSingleSelection;
|
|
262
|
+
private navigateLastForSingleSelection;
|
|
263
|
+
private navigateNextForSingleSelection;
|
|
264
|
+
private navigatePreviousForSingleSelection;
|
|
265
|
+
private skipTakeWithGroups;
|
|
266
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListService<any>, never>;
|
|
267
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
281
268
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
269
|
+
export declare class ListComponent<TData> implements OnInit {
|
|
270
|
+
#private;
|
|
271
|
+
private readonly filterInput;
|
|
272
|
+
private readonly filterInputElement;
|
|
273
|
+
/**
|
|
274
|
+
* Id of the highlighted option, used as `aria-activedescendant` by the filter input.
|
|
275
|
+
*/
|
|
276
|
+
protected readonly activeDescendant: Signal<string | null>;
|
|
277
|
+
protected readonly classes: Signal<string>;
|
|
278
|
+
/**
|
|
279
|
+
* The `listId` input, or a generated id so the listbox can always be referenced by `aria-controls`.
|
|
280
|
+
*/
|
|
281
|
+
protected readonly effectiveListId: Signal<string>;
|
|
282
|
+
/** The empty list element covers the "No data" content and shows the focus ring when it has focus. */
|
|
283
|
+
protected readonly emptyListClasses: Signal<string>;
|
|
284
|
+
protected readonly footerTemplate: Signal<TemplateRef<any> | undefined>;
|
|
285
|
+
protected readonly groupHeaderClasses: Signal<string>;
|
|
286
|
+
protected readonly groupHeaderTemplate: Signal<TemplateRef<any> | undefined>;
|
|
287
|
+
protected readonly headerTemplate: Signal<TemplateRef<any> | undefined>;
|
|
288
|
+
/**
|
|
289
|
+
* The host takes the Tab stop when no option can: every option is disabled, or a virtual list's focusable option
|
|
290
|
+
* is scrolled out of the drawn rows. Focusing the host then moves focus to that option.
|
|
291
|
+
*/
|
|
292
|
+
protected readonly hostTabIndex: Signal<0 | -1>;
|
|
293
|
+
protected readonly innerListClasses: Signal<string>;
|
|
294
|
+
protected readonly itemTemplate: Signal<TemplateRef<any> | undefined>;
|
|
295
|
+
protected readonly listHeight: Signal<string | undefined>;
|
|
296
|
+
protected readonly listMaxHeight: Signal<string | undefined>;
|
|
297
|
+
protected readonly listMaxWidth: Signal<string | undefined>;
|
|
298
|
+
protected readonly listService: ListService<TData>;
|
|
299
|
+
protected readonly listWidth: Signal<ListSizeType>;
|
|
300
|
+
protected readonly messages: Signal<import("@nanahoshi/mona-ui/i18n").MonaListMessages>;
|
|
301
|
+
/** Id of the "No data" content, which describes an empty list. */
|
|
302
|
+
protected readonly noDataId: string;
|
|
303
|
+
protected readonly noDataTemplate: Signal<TemplateRef<any> | undefined>;
|
|
304
|
+
/**
|
|
305
|
+
* The shown items split at group headers: a section without a header holds ungrouped items.
|
|
306
|
+
*/
|
|
307
|
+
protected readonly viewSections: Signal<{
|
|
308
|
+
header: ListItem<TData> | null;
|
|
309
|
+
items: Array<ListItem<TData>>;
|
|
310
|
+
key: string;
|
|
311
|
+
}[]>;
|
|
312
|
+
protected readonly viewportHeight: Signal<ListSizeType>;
|
|
313
|
+
protected readonly virtualScrollViewport: Signal<CdkVirtualScrollViewport | undefined>;
|
|
314
|
+
/**
|
|
315
|
+
* @description Accessible name for the list's `listbox` element. Describe what the list represents.
|
|
316
|
+
* @default ""
|
|
317
|
+
*/
|
|
318
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
319
|
+
/**
|
|
320
|
+
* @description Id of the element that names the list, as an alternative to `ariaLabel`.
|
|
321
|
+
* @default ""
|
|
322
|
+
*/
|
|
323
|
+
readonly ariaLabelledBy: import("@angular/core").InputSignal<string>;
|
|
324
|
+
/**
|
|
325
|
+
* @description Marks the list as loading (`aria-busy`).
|
|
326
|
+
* @default false
|
|
327
|
+
*/
|
|
328
|
+
readonly busy: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
329
|
+
readonly data: import("@angular/core").InputSignal<Iterable<TData> | null | undefined>;
|
|
330
|
+
readonly focusOnMount: import("@angular/core").InputSignal<boolean>;
|
|
331
|
+
readonly height: import("@angular/core").InputSignal<ListSizeInputType>;
|
|
332
|
+
/**
|
|
333
|
+
* @description Emitted when the user activates an enabled item by clicking it or pressing Enter on it, whether or
|
|
334
|
+
* not the list is selectable.
|
|
335
|
+
*/
|
|
336
|
+
readonly itemActivate: import("@angular/core").OutputEmitterRef<ListItem<TData>>;
|
|
337
|
+
readonly itemSelect: import("@angular/core").OutputEmitterRef<SelectionChangeEvent<TData>>;
|
|
338
|
+
readonly listClass: import("@angular/core").InputSignal<string>;
|
|
339
|
+
readonly listId: import("@angular/core").InputSignal<string>;
|
|
340
|
+
readonly listItemClass: import("@angular/core").InputSignal<string>;
|
|
341
|
+
readonly listItemStyle: import("@angular/core").InputSignal<Partial<CSSStyleDeclaration>>;
|
|
342
|
+
/**
|
|
343
|
+
* @description `"listbox"` for options to choose from, `"list"` for items that are only shown.
|
|
344
|
+
* @default "listbox"
|
|
345
|
+
*/
|
|
346
|
+
readonly listRole: import("@angular/core").InputSignal<"list" | "listbox">;
|
|
347
|
+
readonly listStyle: import("@angular/core").InputSignal<Partial<CSSStyleDeclaration>>;
|
|
348
|
+
readonly maxHeight: import("@angular/core").InputSignal<ListSizeInputType>;
|
|
349
|
+
readonly maxWidth: import("@angular/core").InputSignal<ListSizeInputType>;
|
|
350
|
+
readonly size: import("@angular/core").InputSignal<"medium" | "large" | "small" | null | undefined>;
|
|
351
|
+
readonly textField: import("@angular/core").InputSignal<ListKeySelector<TData, string> | undefined>;
|
|
352
|
+
readonly width: import("@angular/core").InputSignal<ListSizeInputType>;
|
|
353
|
+
constructor();
|
|
354
|
+
ngOnInit(): void;
|
|
355
|
+
protected onFilterChange(event: FilterChangeEvent): void;
|
|
356
|
+
protected onListItemClick(item: ListItem<TData>): void;
|
|
357
|
+
protected trackByUid(_: number, item: ListItem<TData>): string;
|
|
358
|
+
private cycleThroughMatchedItems;
|
|
359
|
+
/** Focuses the list element of an empty list, which names the list and is described by "No data". */
|
|
360
|
+
private focusEmptyList;
|
|
361
|
+
private focusToItem;
|
|
362
|
+
/**
|
|
363
|
+
* Handles multiple-selection shortcuts from the WAI-ARIA listbox pattern:
|
|
364
|
+
* Space toggles the highlighted option and Ctrl/Cmd+A selects every enabled option.
|
|
365
|
+
* @returns whether the event was handled.
|
|
366
|
+
*/
|
|
367
|
+
private handleMultipleSelectionKeys;
|
|
368
|
+
private handleNavigation;
|
|
369
|
+
private handlePageScroll;
|
|
370
|
+
/**
|
|
371
|
+
* Whether a key event is meant for the list: from the host, the list element, one of this list's own options or
|
|
372
|
+
* its filter input. Keys typed into controls in header, footer or item templates (or in a nested list) are left
|
|
373
|
+
* to those controls.
|
|
374
|
+
*/
|
|
375
|
+
private isListKeyTarget;
|
|
376
|
+
private rememberFocusedOption;
|
|
377
|
+
/**
|
|
378
|
+
* When the option that had focus is removed from the data, focus would fall to the page. Move it to the option
|
|
379
|
+
* now at the same position, or the last one.
|
|
380
|
+
*/
|
|
381
|
+
private restoreFocusAfterRemoval;
|
|
382
|
+
private scrollToItem;
|
|
383
|
+
private selectItem;
|
|
384
|
+
private setInitialSelectionOrFocus;
|
|
385
|
+
private setKeyboardEvents;
|
|
386
|
+
private setNavigationEvents;
|
|
387
|
+
private setSubscriptions;
|
|
388
|
+
private setTypeaheadSubscription;
|
|
389
|
+
private toggleItem;
|
|
390
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent<any>, never>;
|
|
391
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent<any>, "mona-list", never, {
|
|
392
|
+
"ariaLabel": {
|
|
393
|
+
"alias": "ariaLabel";
|
|
394
|
+
"required": false;
|
|
395
|
+
"isSignal": true;
|
|
396
|
+
};
|
|
397
|
+
"ariaLabelledBy": {
|
|
398
|
+
"alias": "ariaLabelledBy";
|
|
399
|
+
"required": false;
|
|
400
|
+
"isSignal": true;
|
|
401
|
+
};
|
|
402
|
+
"busy": {
|
|
403
|
+
"alias": "busy";
|
|
404
|
+
"required": false;
|
|
405
|
+
"isSignal": true;
|
|
406
|
+
};
|
|
407
|
+
"data": {
|
|
408
|
+
"alias": "data";
|
|
409
|
+
"required": false;
|
|
410
|
+
"isSignal": true;
|
|
411
|
+
};
|
|
412
|
+
"focusOnMount": {
|
|
413
|
+
"alias": "focusOnMount";
|
|
414
|
+
"required": false;
|
|
415
|
+
"isSignal": true;
|
|
416
|
+
};
|
|
417
|
+
"height": {
|
|
418
|
+
"alias": "height";
|
|
419
|
+
"required": false;
|
|
420
|
+
"isSignal": true;
|
|
421
|
+
};
|
|
422
|
+
"listClass": {
|
|
423
|
+
"alias": "listClass";
|
|
424
|
+
"required": false;
|
|
425
|
+
"isSignal": true;
|
|
426
|
+
};
|
|
427
|
+
"listId": {
|
|
428
|
+
"alias": "listId";
|
|
429
|
+
"required": false;
|
|
430
|
+
"isSignal": true;
|
|
431
|
+
};
|
|
432
|
+
"listItemClass": {
|
|
433
|
+
"alias": "listItemClass";
|
|
434
|
+
"required": false;
|
|
435
|
+
"isSignal": true;
|
|
436
|
+
};
|
|
437
|
+
"listItemStyle": {
|
|
438
|
+
"alias": "listItemStyle";
|
|
439
|
+
"required": false;
|
|
440
|
+
"isSignal": true;
|
|
441
|
+
};
|
|
442
|
+
"listRole": {
|
|
443
|
+
"alias": "listRole";
|
|
444
|
+
"required": false;
|
|
445
|
+
"isSignal": true;
|
|
446
|
+
};
|
|
447
|
+
"listStyle": {
|
|
448
|
+
"alias": "listStyle";
|
|
449
|
+
"required": false;
|
|
450
|
+
"isSignal": true;
|
|
451
|
+
};
|
|
452
|
+
"maxHeight": {
|
|
453
|
+
"alias": "maxHeight";
|
|
454
|
+
"required": false;
|
|
455
|
+
"isSignal": true;
|
|
456
|
+
};
|
|
457
|
+
"maxWidth": {
|
|
458
|
+
"alias": "maxWidth";
|
|
459
|
+
"required": false;
|
|
460
|
+
"isSignal": true;
|
|
461
|
+
};
|
|
462
|
+
"size": {
|
|
463
|
+
"alias": "size";
|
|
464
|
+
"required": false;
|
|
465
|
+
"isSignal": true;
|
|
466
|
+
};
|
|
467
|
+
"textField": {
|
|
468
|
+
"alias": "textField";
|
|
469
|
+
"required": false;
|
|
470
|
+
"isSignal": true;
|
|
471
|
+
};
|
|
472
|
+
"width": {
|
|
473
|
+
"alias": "width";
|
|
474
|
+
"required": false;
|
|
475
|
+
"isSignal": true;
|
|
476
|
+
};
|
|
477
|
+
}, {
|
|
478
|
+
"itemActivate": "itemActivate";
|
|
479
|
+
"itemSelect": "itemSelect";
|
|
480
|
+
}, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
|
|
406
481
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListFooterTemplateDirective, "ng-template[monaListFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
482
|
+
export declare class ListFooterTemplateDirective {
|
|
483
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListFooterTemplateDirective, never>;
|
|
484
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ListFooterTemplateDirective, "ng-template[monaListFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
411
485
|
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListGroupHeaderTemplateDirective, "ng-template[monaListGroupHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
486
|
+
export declare class ListGroupHeaderTemplateDirective {
|
|
487
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListGroupHeaderTemplateDirective, never>;
|
|
488
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ListGroupHeaderTemplateDirective, "ng-template[monaListGroupHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
416
489
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListHeaderTemplateDirective, "ng-template[monaListHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
490
|
+
export declare class ListHeaderTemplateDirective {
|
|
491
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListHeaderTemplateDirective, never>;
|
|
492
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ListHeaderTemplateDirective, "ng-template[monaListHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
421
493
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListItemTemplateDirective, "ng-template[monaListItemTemplate]", never, {}, {}, never, never, true, never>;
|
|
494
|
+
export declare class ListItemTemplateDirective {
|
|
495
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListItemTemplateDirective, never>;
|
|
496
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ListItemTemplateDirective, "ng-template[monaListItemTemplate]", never, {}, {}, never, never, true, never>;
|
|
426
497
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListNoDataTemplateDirective, "ng-template[monaListNoDataTemplate]", never, {}, {}, never, never, true, never>;
|
|
498
|
+
export declare class ListNoDataTemplateDirective {
|
|
499
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListNoDataTemplateDirective, never>;
|
|
500
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ListNoDataTemplateDirective, "ng-template[monaListNoDataTemplate]", never, {}, {}, never, never, true, never>;
|
|
431
501
|
}
|
|
432
|
-
|
|
433
502
|
/**
|
|
434
503
|
* Lets a component that wraps a `mona-list-view` in its own template share its `ListService` with that list view.
|
|
435
504
|
* Provide it in `viewProviders` (`{ provide: LIST_VIEW_HOST_LIST_SERVICE, useExisting: ListService }`), so only the
|
|
436
505
|
* component's own list view sees it, never a list view placed in content the component projects or renders from a
|
|
437
506
|
* consumer's template. Without it, every list view has its own service.
|
|
438
507
|
*/
|
|
439
|
-
declare const LIST_VIEW_HOST_LIST_SERVICE: InjectionToken<ListService<unknown>>;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
export { LIST_DEFAULT_MESSAGES, LIST_VIEW_HOST_LIST_SERVICE, ListComponent, ListFooterTemplateDirective, ListGroupHeaderTemplateDirective, ListHeaderTemplateDirective, ListItem, ListItemTemplateDirective, ListNoDataTemplateDirective, ListService };
|
|
444
|
-
export type { GroupableOptions, ListKeySelector, ListSizeInputType, ListSizeType, NavigableOptions, NavigationDirection, NavigationMode, OrderByOptions, PagerSettings, SelectableOptions, SelectionChangeEvent };
|
|
508
|
+
export declare const LIST_VIEW_HOST_LIST_SERVICE: InjectionToken<ListService<unknown>>;
|
|
509
|
+
export declare const LIST_DEFAULT_MESSAGES: MonaListMessages;
|
|
510
|
+
export type { ListSizeInputType, ListSizeType, SelectionChangeEvent };
|