@nanahoshi/mona-ui 0.24.7 → 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.
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-vXXNWmEN.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DdyHnUIr.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-DDgNmgE0.mjs → nanahoshi-mona-ui-grid-grid-list.component-B6gq7Hu3.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-Dzf6Vbs_.mjs → nanahoshi-mona-ui-grid-grid-row.component-DdUY3I7P.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DAPNqnWV.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-DG8Bu4Dy.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-B9rmDLq8.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CVqpbMcb.mjs} +8 -8
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +40 -3
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +20 -4
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +335 -45
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +565 -197
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +28 -2
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +598 -208
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +193 -71
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +25 -3
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +36 -3
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +25 -3
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +25 -3
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +25 -3
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +45 -3
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +25 -3
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +25 -3
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +25 -3
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +205 -140
- package/i18n/catalogs/en-US.messages.json +28 -6
- package/locales/ar-sa/ar-sa.messages.json +25 -3
- package/locales/de-de/de-de.messages.json +25 -3
- package/locales/es-es/es-es.messages.json +25 -3
- package/locales/fr-fr/fr-fr.messages.json +25 -3
- package/locales/id-id/id-id.messages.json +25 -3
- package/locales/it-it/it-it.messages.json +25 -3
- package/locales/ja-jp/ja-jp.messages.json +25 -3
- package/locales/ko-kr/ko-kr.messages.json +25 -3
- package/locales/pt-br/pt-br.messages.json +25 -3
- package/locales/ru-ru/ru-ru.messages.json +25 -3
- package/locales/tr-tr/tr-tr.messages.json +25 -3
- package/locales/zh-cn/zh-cn.messages.json +25 -3
- package/locales/zh-tw/zh-tw.messages.json +25 -3
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-i18n.d.ts +50 -0
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +14 -2
- package/types/nanahoshi-mona-ui-internal-list.d.ts +89 -10
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +155 -40
- package/types/nanahoshi-mona-ui-internal.d.ts +10 -2
- package/types/nanahoshi-mona-ui-list-box.d.ts +148 -47
- package/types/nanahoshi-mona-ui-list-view.d.ts +112 -21
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +22 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +22 -0
- package/types/nanahoshi-mona-ui-tree-view.d.ts +84 -40
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import * as _mirei_ts_collections from '@mirei/ts-collections';
|
|
3
|
+
import { Predicate, ImmutableList } from '@mirei/ts-collections';
|
|
1
4
|
import * as _angular_core from '@angular/core';
|
|
2
5
|
import { Signal, TemplateRef } from '@angular/core';
|
|
3
6
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
4
7
|
import { MonaListBoxMessages } from '@nanahoshi/mona-ui/i18n';
|
|
5
8
|
import { Position, PreventableEvent, SelectionMode } from '@nanahoshi/mona-ui/common';
|
|
6
9
|
import { SelectableOptions, ListKeySelector } from '@nanahoshi/mona-ui/internal/list';
|
|
7
|
-
import { ImmutableList, ImmutableSet } from '@mirei/ts-collections';
|
|
8
|
-
import { Observable } from 'rxjs';
|
|
9
10
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
11
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
11
12
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -51,8 +52,8 @@ declare class ListBoxClearEvent<T = any> extends PreventableEvent {
|
|
|
51
52
|
type ListBoxActionEvent<T = any> = ListBoxClearEvent<T> | ListBoxMoveEvent<T> | ListBoxRemoveEvent<T> | ListBoxTransferEvent<T>;
|
|
52
53
|
|
|
53
54
|
interface ListBoxSelectionEvent<T = any> {
|
|
54
|
-
deselectedItems: T[];
|
|
55
|
-
selectedItems: T[];
|
|
55
|
+
readonly deselectedItems: T[];
|
|
56
|
+
readonly selectedItems: T[];
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
declare const listBoxBaseThemeVariants: (props?: ({
|
|
@@ -70,15 +71,21 @@ type ListBoxToolbarVariantProps = VariantProps<typeof listBoxToolbarThemeVariant
|
|
|
70
71
|
type ListBoxToolbarVariantInputs = Omit<VariantInputs<ListBoxToolbarVariantProps>, "direction">;
|
|
71
72
|
type ListBoxVariantInputs = ListBoxBaseVariantInputs & ListBoxToolbarVariantInputs;
|
|
72
73
|
|
|
74
|
+
/** A toolbar button as rendered: its action, whether it can run now, and its accessible name. */
|
|
75
|
+
interface ToolbarButton {
|
|
76
|
+
readonly action: ToolbarAction;
|
|
77
|
+
readonly enabled: boolean;
|
|
78
|
+
readonly label: string;
|
|
79
|
+
}
|
|
73
80
|
declare class ListBoxComponent<T = unknown, K = unknown> implements ListBoxVariantInputs {
|
|
74
81
|
#private;
|
|
75
|
-
/**
|
|
76
|
-
* The list box (`this` or the connected list box) that currently holds the selection; falling back to `this`
|
|
77
|
-
* when neither side has a selection. Used by actions that make sense to run on `this` even with no selection
|
|
78
|
-
* (e.g., "transfer all"). For actions that require a real selection to proceed, use {@link getSelectedListBox} instead.
|
|
79
|
-
*/
|
|
80
|
-
protected readonly activeListBox: Signal<ListBoxComponent<T, K>>;
|
|
81
82
|
protected readonly baseClasses: Signal<string>;
|
|
83
|
+
/** Whether the selection (in this list box or the connected one) can move down: it doesn't touch the end. */
|
|
84
|
+
protected readonly canMoveDown: Signal<boolean>;
|
|
85
|
+
/** Whether the selection (in this list box or the connected one) can move up: it doesn't touch the start. */
|
|
86
|
+
protected readonly canMoveUp: Signal<boolean>;
|
|
87
|
+
/** The items that aren't disabled by `disabledBy`, which are the ones the "All" transfers carry. */
|
|
88
|
+
protected readonly enabledItems: Signal<T[]>;
|
|
82
89
|
protected readonly footerTemplate: Signal<TemplateRef<any> | undefined>;
|
|
83
90
|
protected readonly headerTemplate: Signal<TemplateRef<any> | undefined>;
|
|
84
91
|
protected readonly itemTemplate: Signal<TemplateRef<any> | undefined>;
|
|
@@ -86,24 +93,60 @@ declare class ListBoxComponent<T = unknown, K = unknown> implements ListBoxVaria
|
|
|
86
93
|
protected readonly listWidth: Signal<string>;
|
|
87
94
|
protected readonly messages: Signal<_nanahoshi_mona_ui_i18n.MonaListBoxMessages>;
|
|
88
95
|
protected readonly noDataTemplate: Signal<TemplateRef<any> | undefined>;
|
|
96
|
+
/**
|
|
97
|
+
* The selected items in list order (not the order they were selected in), with their indices. Disabled items
|
|
98
|
+
* are left out, so no action carries them.
|
|
99
|
+
*/
|
|
100
|
+
protected readonly orderedSelection: Signal<{
|
|
101
|
+
index: number;
|
|
102
|
+
item: T;
|
|
103
|
+
}[]>;
|
|
89
104
|
protected readonly selectableOptions: Signal<SelectableOptions>;
|
|
105
|
+
/** Indices of the selected items, in list order. */
|
|
106
|
+
protected readonly selectedIndices: Signal<number[]>;
|
|
107
|
+
/** The list box that holds the selection: this one, else the connected one, else none. */
|
|
108
|
+
protected readonly selectionHolder: Signal<ListBoxComponent<T, K> | null>;
|
|
109
|
+
/**
|
|
110
|
+
* The toolbar's buttons, in toolbar order. The transfer actions need a connected list box; the others work on a
|
|
111
|
+
* list box of its own.
|
|
112
|
+
*/
|
|
113
|
+
protected readonly toolbarButtons: Signal<readonly ToolbarButton[]>;
|
|
90
114
|
protected readonly toolbarClasses: Signal<string>;
|
|
115
|
+
/** The toolbar's name: `toolbarAriaLabel`, else one built from the list box's name. */
|
|
116
|
+
protected readonly toolbarLabel: Signal<string | null>;
|
|
91
117
|
protected readonly toolbarOptions: Signal<ToolbarOptions | null>;
|
|
118
|
+
/** A toolbar beside the list stacks its buttons; one above or below lines them up. */
|
|
119
|
+
protected readonly toolbarOrientation: Signal<"horizontal" | "vertical">;
|
|
120
|
+
/** The one enabled toolbar button in the Tab order; the arrow keys move between the others. */
|
|
121
|
+
protected readonly toolbarTabStop: Signal<ToolbarAction>;
|
|
92
122
|
/**
|
|
93
123
|
* @description Emitted when a toolbar action button is clicked, carrying the action's details.
|
|
94
124
|
*/
|
|
95
|
-
readonly actionClick: _angular_core.OutputEmitterRef<ListBoxActionEvent
|
|
125
|
+
readonly actionClick: _angular_core.OutputEmitterRef<ListBoxActionEvent<T>>;
|
|
96
126
|
/**
|
|
97
127
|
* @description Accessible name for the list box's `listbox` element. Describe what the list represents,
|
|
98
|
-
* which matters in particular when connecting two list boxes
|
|
128
|
+
* which matters in particular when connecting two list boxes: the toolbar's name and the transfer buttons'
|
|
129
|
+
* labels are built from it.
|
|
99
130
|
* @default ""
|
|
100
131
|
*/
|
|
101
132
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
133
|
+
/**
|
|
134
|
+
* @description Id of the element that names the list box, as an alternative to `aria-label`. Without an
|
|
135
|
+
* `aria-label`, the toolbar's name and the transfer buttons' labels are built from that element's text.
|
|
136
|
+
* @default ""
|
|
137
|
+
*/
|
|
138
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
102
139
|
/**
|
|
103
140
|
* @description The other list box to transfer items to and from using the toolbar actions.
|
|
104
141
|
* @default null
|
|
105
142
|
*/
|
|
106
143
|
readonly connectedList: _angular_core.InputSignal<ListBoxComponent<T, K> | null>;
|
|
144
|
+
/**
|
|
145
|
+
* @description Property name or predicate that marks items as disabled. Disabled items can't be selected, and no
|
|
146
|
+
* action (including the "All" transfers) carries them.
|
|
147
|
+
* @default ""
|
|
148
|
+
*/
|
|
149
|
+
readonly disabledBy: _angular_core.InputSignal<string | Predicate<T> | null | undefined>;
|
|
107
150
|
/**
|
|
108
151
|
* @description Sets the height of the component.
|
|
109
152
|
* @default 100%
|
|
@@ -114,7 +157,8 @@ declare class ListBoxComponent<T = unknown, K = unknown> implements ListBoxVaria
|
|
|
114
157
|
* @default []
|
|
115
158
|
*/
|
|
116
159
|
readonly items: _angular_core.InputSignal<Iterable<T>>;
|
|
117
|
-
|
|
160
|
+
/** The items, as rendered. Read-only: change `items` to change them. */
|
|
161
|
+
readonly listBoxItems: Signal<ImmutableList<T>>;
|
|
118
162
|
/**
|
|
119
163
|
* @description Border-radius preset applied to the component.
|
|
120
164
|
* @default medium
|
|
@@ -125,21 +169,25 @@ declare class ListBoxComponent<T = unknown, K = unknown> implements ListBoxVaria
|
|
|
125
169
|
* @default ""
|
|
126
170
|
*/
|
|
127
171
|
readonly selectBy: _angular_core.InputSignal<ListKeySelector<T, K>>;
|
|
128
|
-
|
|
129
|
-
readonly selectedItems
|
|
172
|
+
/** The selected items, read-only. */
|
|
173
|
+
readonly selectedItems: Signal<_mirei_ts_collections.ImmutableSet<T>>;
|
|
174
|
+
/** @deprecated Use the `selectedItems` signal or the `selectionChange` output. */
|
|
175
|
+
readonly selectedItems$: rxjs.Observable<_mirei_ts_collections.ImmutableSet<T>>;
|
|
130
176
|
/**
|
|
131
177
|
* @description Keys of the currently selected items.
|
|
132
178
|
* @default []
|
|
133
179
|
*/
|
|
134
180
|
readonly selectedKeys: _angular_core.InputSignal<Iterable<K>>;
|
|
135
181
|
/**
|
|
136
|
-
* @description Emitted with the updated keys whenever the selection
|
|
182
|
+
* @description Emitted with the updated keys whenever the user changes the selection, including when an
|
|
183
|
+
* action (transfer, clear, remove) or a selection in the connected list box changes it.
|
|
137
184
|
*/
|
|
138
185
|
readonly selectedKeysChange: _angular_core.OutputEmitterRef<K[]>;
|
|
139
186
|
/**
|
|
140
|
-
* @description Emitted with the selected and deselected items whenever the selection
|
|
187
|
+
* @description Emitted with the selected and deselected items whenever the user changes the selection, including
|
|
188
|
+
* when an action (transfer, clear, remove) or a selection in the connected list box changes it.
|
|
141
189
|
*/
|
|
142
|
-
readonly selectionChange: _angular_core.OutputEmitterRef<ListBoxSelectionEvent<
|
|
190
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<ListBoxSelectionEvent<T>>;
|
|
143
191
|
/**
|
|
144
192
|
* @description Allows multiple items to be selected simultaneously when set to `"multiple"`.
|
|
145
193
|
* @default single
|
|
@@ -147,10 +195,10 @@ declare class ListBoxComponent<T = unknown, K = unknown> implements ListBoxVaria
|
|
|
147
195
|
readonly selectionMode: _angular_core.InputSignal<SelectionMode>;
|
|
148
196
|
/**
|
|
149
197
|
* @description Allows an already-selected item to be deselected by clicking it again while `selectionMode`
|
|
150
|
-
* is `"single"`. Has no effect when `selectionMode` is `"multiple"`.
|
|
198
|
+
* is `"single"`. Has no effect when `selectionMode` is `"multiple"`. Accepts the bare attribute form.
|
|
151
199
|
* @default true
|
|
152
200
|
*/
|
|
153
|
-
readonly singleSelectionToggleable: _angular_core.
|
|
201
|
+
readonly singleSelectionToggleable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
154
202
|
/**
|
|
155
203
|
* @description Size preset controlling the component's dimensions.
|
|
156
204
|
* @default medium
|
|
@@ -163,10 +211,18 @@ declare class ListBoxComponent<T = unknown, K = unknown> implements ListBoxVaria
|
|
|
163
211
|
readonly textField: _angular_core.InputSignal<ListKeySelector<T, string>>;
|
|
164
212
|
/**
|
|
165
213
|
* @description Shows the action toolbar. Pass `false` to hide it entirely, or an options object to customize
|
|
166
|
-
* which actions are shown and where the toolbar is positioned.
|
|
214
|
+
* which actions are shown and where the toolbar is positioned. The transfer actions appear only with a
|
|
215
|
+
* `connectedList`; the move, clear and remove actions work on a list box of its own. Accepts the bare attribute
|
|
216
|
+
* form.
|
|
167
217
|
* @default true
|
|
168
218
|
*/
|
|
169
|
-
readonly toolbar: _angular_core.
|
|
219
|
+
readonly toolbar: _angular_core.InputSignalWithTransform<boolean | Partial<ToolbarOptions>, string | boolean | Partial<ToolbarOptions> | null | undefined>;
|
|
220
|
+
/**
|
|
221
|
+
* @description Accessible name for the toolbar. By default it is built from the list box's name
|
|
222
|
+
* ("Available foods actions").
|
|
223
|
+
* @default ""
|
|
224
|
+
*/
|
|
225
|
+
readonly toolbarAriaLabel: _angular_core.InputSignal<string>;
|
|
170
226
|
/**
|
|
171
227
|
* @description Sets the width of the component.
|
|
172
228
|
* @default 100%
|
|
@@ -174,33 +230,61 @@ declare class ListBoxComponent<T = unknown, K = unknown> implements ListBoxVaria
|
|
|
174
230
|
readonly width: _angular_core.InputSignal<string | number>;
|
|
175
231
|
constructor();
|
|
176
232
|
/**
|
|
177
|
-
* @description Clears the
|
|
178
|
-
* afterward if the resulting selection change should be emitted.
|
|
233
|
+
* @description Clears the selection and reports the change through `selectionChange` and `selectedKeysChange`.
|
|
179
234
|
*/
|
|
180
235
|
clearSelections(): void;
|
|
181
236
|
/**
|
|
182
|
-
* @
|
|
183
|
-
* (e.g., after programmatically calling {@link clearSelections}).
|
|
237
|
+
* @deprecated `clearSelections()` and the actions report selection changes themselves.
|
|
184
238
|
*/
|
|
185
239
|
notifySelectionChange(): void;
|
|
186
|
-
protected
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
private
|
|
240
|
+
protected onActionClick(action: ToolbarAction, event: MouseEvent): void;
|
|
241
|
+
/**
|
|
242
|
+
* Keyboard shortcuts on an option: Alt+ArrowUp and Alt+ArrowDown move the selection, Delete removes it, and
|
|
243
|
+
* Alt+ArrowRight and Alt+ArrowLeft (mirrored in RTL) transfer it to and from the connected list box. Each runs
|
|
244
|
+
* only when the toolbar offers that action and the selection is in this list box.
|
|
245
|
+
*/
|
|
246
|
+
protected onHostKeydown(event: KeyboardEvent): void;
|
|
247
|
+
protected onSelectedKeysChange(): void;
|
|
248
|
+
protected onToolbarFocusIn(event: FocusEvent): void;
|
|
249
|
+
/** Arrow keys move between the toolbar's enabled buttons (wrapping), Home and End go to the first and last. */
|
|
250
|
+
protected onToolbarKeydown(event: KeyboardEvent): void;
|
|
251
|
+
/**
|
|
252
|
+
* Runs once the consumer's data change has rendered: announces the result and moves focus to what the action
|
|
253
|
+
* acted on when a shortcut ran it, or when its button is now disabled (focus would otherwise drop to the page).
|
|
254
|
+
*/
|
|
255
|
+
private afterActionRender;
|
|
256
|
+
private clear;
|
|
257
|
+
private findItemByKey;
|
|
258
|
+
private focusToolbarButton;
|
|
259
|
+
/** Whether a key event comes from one of this list box's own options (not a control in a template). */
|
|
260
|
+
private isOwnOption;
|
|
261
|
+
private move;
|
|
262
|
+
private remove;
|
|
263
|
+
/**
|
|
264
|
+
* Emits `selectionChange` and `selectedKeysChange` when the selected keys differ from the ones last reported. A
|
|
265
|
+
* new selection clears the connected list box's, as only one side holds a selection.
|
|
266
|
+
*/
|
|
267
|
+
private reportSelection;
|
|
268
|
+
/**
|
|
269
|
+
* The action a shortcut runs and the list box whose toolbar runs it. Transfers go towards the connected list
|
|
270
|
+
* box, which follows this one in reading order: Alt+ArrowRight (Alt+ArrowLeft in RTL) from this list box,
|
|
271
|
+
* Alt+ArrowLeft (Alt+ArrowRight in RTL) back from the connected one.
|
|
272
|
+
*/
|
|
273
|
+
private resolveShortcut;
|
|
274
|
+
/** Scrolls an item into view, and focuses it, or the list when the item isn't there. */
|
|
275
|
+
private revealItem;
|
|
276
|
+
private runAction;
|
|
277
|
+
/** Selects the items a transfer brought into this list box: all of them, or the first in single mode. */
|
|
278
|
+
private selectTransferredItems;
|
|
279
|
+
private toolbarActionOf;
|
|
280
|
+
/**
|
|
281
|
+
* "To" actions move items from this list box to the connected one, "From" actions from the connected one to
|
|
282
|
+
* this one. The event fires on the source list box and carries the items to move: the selection, or every enabled
|
|
283
|
+
* item for the "All" actions. Once the consumer has moved them, they are selected in the target.
|
|
284
|
+
*/
|
|
285
|
+
private transfer;
|
|
202
286
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxComponent<any, any>, never>;
|
|
203
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListBoxComponent<any, any>, "mona-list-box", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "connectedList": { "alias": "connectedList"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selectBy": { "alias": "selectBy"; "required": false; "isSignal": true; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "singleSelectionToggleable": { "alias": "singleSelectionToggleable"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; "selectedKeysChange": "selectedKeysChange"; "selectionChange": "selectionChange"; }, ["footerTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
|
|
287
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListBoxComponent<any, any>, "mona-list-box", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "connectedList": { "alias": "connectedList"; "required": false; "isSignal": true; }; "disabledBy": { "alias": "disabledBy"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selectBy": { "alias": "selectBy"; "required": false; "isSignal": true; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "singleSelectionToggleable": { "alias": "singleSelectionToggleable"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "toolbarAriaLabel": { "alias": "toolbarAriaLabel"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; "selectedKeysChange": "selectedKeysChange"; "selectionChange": "selectionChange"; }, ["footerTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
|
|
204
288
|
}
|
|
205
289
|
|
|
206
290
|
declare class ListBoxFooterTemplateDirective {
|
|
@@ -213,9 +297,26 @@ declare class ListBoxHeaderTemplateDirective {
|
|
|
213
297
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListBoxHeaderTemplateDirective, "ng-template[monaListBoxHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
214
298
|
}
|
|
215
299
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
300
|
+
/**
|
|
301
|
+
* The context of a `monaListBoxItemTemplate`: the data item, as `let-item`.
|
|
302
|
+
*/
|
|
303
|
+
interface ListBoxItemTemplateContext<T = unknown> {
|
|
304
|
+
readonly $implicit: T;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Template for each item of a list box. The data item is the template's implicit value (`let-item`). Bind the list
|
|
309
|
+
* box's items to `monaListBoxItemTemplateOf` to type it; without it, the item is `any` in templates.
|
|
310
|
+
*/
|
|
311
|
+
declare class ListBoxItemTemplateDirective<T = any> {
|
|
312
|
+
/**
|
|
313
|
+
* @description The list box's items, used only to type the template's item. Optional.
|
|
314
|
+
* @default null
|
|
315
|
+
*/
|
|
316
|
+
readonly monaListBoxItemTemplateOf: _angular_core.InputSignal<Iterable<T> | null | undefined>;
|
|
317
|
+
static ngTemplateContextGuard<T>(_directive: ListBoxItemTemplateDirective<T>, _context: unknown): _context is ListBoxItemTemplateContext<T>;
|
|
318
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxItemTemplateDirective<any>, never>;
|
|
319
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListBoxItemTemplateDirective<any>, "ng-template[monaListBoxItemTemplate]", never, { "monaListBoxItemTemplateOf": { "alias": "monaListBoxItemTemplateOf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
219
320
|
}
|
|
220
321
|
|
|
221
322
|
declare class ListBoxNoDataTemplateDirective {
|
|
@@ -226,4 +327,4 @@ declare class ListBoxNoDataTemplateDirective {
|
|
|
226
327
|
declare const LIST_BOX_DEFAULT_MESSAGES: MonaListBoxMessages;
|
|
227
328
|
|
|
228
329
|
export { LIST_BOX_DEFAULT_MESSAGES, ListBoxClearEvent, ListBoxComponent, ListBoxFooterTemplateDirective, ListBoxHeaderTemplateDirective, ListBoxItemTemplateDirective, ListBoxMoveEvent, ListBoxNoDataTemplateDirective, ListBoxRemoveEvent, ListBoxTransferEvent };
|
|
229
|
-
export type { ListBoxActionEvent, ListBoxSelectionEvent, ToolbarAction, ToolbarOptions };
|
|
330
|
+
export type { ListBoxActionEvent, ListBoxItemTemplateContext, ListBoxSelectionEvent, ToolbarAction, ToolbarOptions };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { TemplateRef } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
4
|
+
import { ImmutableList, Predicate } from '@mirei/ts-collections';
|
|
5
|
+
import { ListService, ListKeySelector, ListItem, GroupableOptions, NavigableOptions, PagerSettings, SelectableOptions } from '@nanahoshi/mona-ui/internal/list';
|
|
6
|
+
export { GroupableOptions, NavigableOptions, PagerSettings, SelectableOptions } from '@nanahoshi/mona-ui/internal/list';
|
|
7
|
+
import { PageChangeEvent, PageSizeChangeEvent } from '@nanahoshi/mona-ui/pager';
|
|
7
8
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
|
-
import { VariantProps } from 'class-variance-authority';
|
|
9
9
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
10
|
+
import { VariantProps } from 'class-variance-authority';
|
|
10
11
|
import { VirtualScrollOptions } from '@nanahoshi/mona-ui/common';
|
|
12
|
+
export { VirtualScrollOptions } from '@nanahoshi/mona-ui/common';
|
|
11
13
|
|
|
12
14
|
declare const listViewBaseThemeVariants: (props?: ({
|
|
13
15
|
rounded?: "small" | "medium" | "large" | "none" | null | undefined;
|
|
@@ -26,23 +28,49 @@ declare class ListViewComponent<T = unknown> implements ListViewVariantInputs {
|
|
|
26
28
|
protected readonly itemCount: _angular_core.Signal<number>;
|
|
27
29
|
protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
28
30
|
protected readonly listHeight: _angular_core.Signal<string>;
|
|
29
|
-
|
|
31
|
+
/** The items as given: a list, so equal items (two `"a"` strings) are both shown. */
|
|
32
|
+
protected readonly listItems: _angular_core.Signal<ImmutableList<T>>;
|
|
30
33
|
protected readonly listMaxHeight: _angular_core.Signal<string>;
|
|
31
34
|
protected readonly listMaxWidth: _angular_core.Signal<string>;
|
|
35
|
+
/**
|
|
36
|
+
* A list you can select from is a `listbox`; one that only shows items is a `list`.
|
|
37
|
+
*/
|
|
38
|
+
protected readonly listRole: _angular_core.Signal<"listbox" | "list">;
|
|
32
39
|
protected readonly listService: ListService<T>;
|
|
33
40
|
protected readonly listWidth: _angular_core.Signal<string>;
|
|
41
|
+
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaListMessages>;
|
|
34
42
|
protected readonly noDataTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
35
|
-
|
|
43
|
+
/** The pager's name: the given one, else one built from the list's name, else the pager's own default. */
|
|
44
|
+
protected readonly pagerLabel: _angular_core.Signal<string | null>;
|
|
45
|
+
/** Polite status text: loading, or the empty state. */
|
|
46
|
+
protected readonly statusText: _angular_core.Signal<string>;
|
|
36
47
|
/**
|
|
37
48
|
* @description Accessible name for the list view's `listbox` element. Describe what the list represents.
|
|
38
49
|
* @default ""
|
|
39
50
|
*/
|
|
40
51
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
41
52
|
/**
|
|
42
|
-
* @description
|
|
53
|
+
* @description Id of the element that names the list view's list, as an alternative to `aria-label`.
|
|
54
|
+
* @default ""
|
|
55
|
+
*/
|
|
56
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
57
|
+
/**
|
|
58
|
+
* @description Property name or predicate that marks an item as disabled. Disabled items can't be selected,
|
|
59
|
+
* activated or reached by typeahead.
|
|
60
|
+
* @default ""
|
|
61
|
+
*/
|
|
62
|
+
readonly disabledBy: _angular_core.InputSignal<string | Predicate<T> | null | undefined>;
|
|
63
|
+
/**
|
|
64
|
+
* @description Sets the height of the list view. With virtual scrolling, the viewport takes this height, so a
|
|
65
|
+
* percentage needs a parent with a height; `""` sizes the viewport to its items instead.
|
|
43
66
|
* @default 100%
|
|
44
67
|
*/
|
|
45
68
|
readonly height: _angular_core.InputSignal<string | number>;
|
|
69
|
+
/**
|
|
70
|
+
* @description Emitted with the data item when the user activates an enabled item by clicking it or pressing
|
|
71
|
+
* Enter on it. Fires whether or not the list view is selectable.
|
|
72
|
+
*/
|
|
73
|
+
readonly itemActivate: _angular_core.OutputEmitterRef<T>;
|
|
46
74
|
/**
|
|
47
75
|
* @description Collection of items to render.
|
|
48
76
|
* @default []
|
|
@@ -68,6 +96,11 @@ declare class ListViewComponent<T = unknown> implements ListViewVariantInputs {
|
|
|
68
96
|
* @default {}
|
|
69
97
|
*/
|
|
70
98
|
readonly listStyle: _angular_core.InputSignal<Partial<CSSStyleDeclaration>>;
|
|
99
|
+
/**
|
|
100
|
+
* @description Marks the list as loading: it gets `aria-busy` and a polite "Loading" status.
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
71
104
|
/**
|
|
72
105
|
* @description Sets the maximum height of the list.
|
|
73
106
|
* @default ""
|
|
@@ -78,13 +111,20 @@ declare class ListViewComponent<T = unknown> implements ListViewVariantInputs {
|
|
|
78
111
|
* @default ""
|
|
79
112
|
*/
|
|
80
113
|
readonly maxWidth: _angular_core.InputSignal<string | number>;
|
|
114
|
+
/**
|
|
115
|
+
* @description Accessible name of the pager. Defaults to "{name} pagination" from the list view's `aria-label`,
|
|
116
|
+
* so two paged list views on a page have different landmarks.
|
|
117
|
+
* @default ""
|
|
118
|
+
*/
|
|
119
|
+
readonly pagerAriaLabel: _angular_core.InputSignal<string>;
|
|
81
120
|
/**
|
|
82
121
|
* @description Border-radius preset applied to the component.
|
|
83
122
|
* @default medium
|
|
84
123
|
*/
|
|
85
124
|
readonly rounded: _angular_core.InputSignal<"small" | "medium" | "large" | "none" | null | undefined>;
|
|
86
125
|
/**
|
|
87
|
-
* @description Emitted
|
|
126
|
+
* @description Emitted once each time the list is scrolled to its end, when the list view isn't paged. Scrolling
|
|
127
|
+
* away and back emits again, as does reaching the new end after more items are added.
|
|
88
128
|
*/
|
|
89
129
|
readonly scrollBottom: _angular_core.OutputEmitterRef<Event>;
|
|
90
130
|
/**
|
|
@@ -108,10 +148,18 @@ declare class ListViewComponent<T = unknown> implements ListViewVariantInputs {
|
|
|
108
148
|
*/
|
|
109
149
|
readonly width: _angular_core.InputSignal<string | number>;
|
|
110
150
|
constructor();
|
|
151
|
+
protected onItemActivate(item: ListItem<T>): void;
|
|
111
152
|
protected onPageChange(event: PageChangeEvent): void;
|
|
153
|
+
protected onPageSizeSelect(event: PageSizeChangeEvent): void;
|
|
154
|
+
/** Whether the scrolled element is this list view's own list or viewport, not a nested list view or template. */
|
|
155
|
+
private isListScroll;
|
|
156
|
+
/**
|
|
157
|
+
* Scroll events don't bubble, so the host listens in the capture phase. That covers the list and the virtual
|
|
158
|
+
* viewport whenever they are rendered, including ones created after the first render.
|
|
159
|
+
*/
|
|
112
160
|
private setScrollBottomEvent;
|
|
113
161
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewComponent<any>, never>;
|
|
114
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListViewComponent<any>, "mona-list-view", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "listClass": { "alias": "listClass"; "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; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "scrollBottom": "scrollBottom"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
|
|
162
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListViewComponent<any>, "mona-list-view", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "disabledBy": { "alias": "disabledBy"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "listClass": { "alias": "listClass"; "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; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "pagerAriaLabel": { "alias": "pagerAriaLabel"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "itemActivate": "itemActivate"; "scrollBottom": "scrollBottom"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
|
|
115
163
|
}
|
|
116
164
|
|
|
117
165
|
declare class ListViewFooterTemplateDirective {
|
|
@@ -119,6 +167,11 @@ declare class ListViewFooterTemplateDirective {
|
|
|
119
167
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewFooterTemplateDirective, "ng-template[monaListViewFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
120
168
|
}
|
|
121
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Template for the header of each group. The group's value is the template's implicit value (`let-group`); see
|
|
172
|
+
* `ListViewGroupHeaderTemplateContext`. The context isn't type-checked, so templates written against the value's own
|
|
173
|
+
* type keep compiling.
|
|
174
|
+
*/
|
|
122
175
|
declare class ListViewGroupHeaderTemplateDirective {
|
|
123
176
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewGroupHeaderTemplateDirective, never>;
|
|
124
177
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewGroupHeaderTemplateDirective, "ng-template[monaListViewGroupHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
@@ -126,8 +179,8 @@ declare class ListViewGroupHeaderTemplateDirective {
|
|
|
126
179
|
|
|
127
180
|
declare class ListViewGroupableDirective<T, K = T> {
|
|
128
181
|
#private;
|
|
129
|
-
groupBy: _angular_core.InputSignal<ListKeySelector<T, K> | undefined>;
|
|
130
|
-
options: _angular_core.InputSignal<"" | GroupableOptions<T, K>>;
|
|
182
|
+
readonly groupBy: _angular_core.InputSignal<ListKeySelector<T, K> | undefined>;
|
|
183
|
+
readonly options: _angular_core.InputSignal<"" | GroupableOptions<T, K>>;
|
|
131
184
|
constructor();
|
|
132
185
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewGroupableDirective<any, any>, never>;
|
|
133
186
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewGroupableDirective<any, any>, "mona-list-view[monaListViewGroupable]", never, { "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "options": { "alias": "monaListViewGroupable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -138,14 +191,29 @@ declare class ListViewHeaderTemplateDirective {
|
|
|
138
191
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewHeaderTemplateDirective, "ng-template[monaListViewHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
139
192
|
}
|
|
140
193
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
194
|
+
/** The context of a `monaListViewItemTemplate`: the data item, as `let-item`. */
|
|
195
|
+
interface ListViewItemTemplateContext<T = unknown> {
|
|
196
|
+
readonly $implicit: T;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Template for each item of a list view. The data item is the template's implicit value (`let-item`). Bind the list
|
|
201
|
+
* view's items to `monaListViewItemTemplateOf` to type it; without it, the item is `any` in templates.
|
|
202
|
+
*/
|
|
203
|
+
declare class ListViewItemTemplateDirective<T = any> {
|
|
204
|
+
/**
|
|
205
|
+
* @description The list view's items, used only to type the template's item. Optional.
|
|
206
|
+
* @default null
|
|
207
|
+
*/
|
|
208
|
+
readonly monaListViewItemTemplateOf: _angular_core.InputSignal<Iterable<T> | null | undefined>;
|
|
209
|
+
static ngTemplateContextGuard<T>(_directive: ListViewItemTemplateDirective<T>, _context: unknown): _context is ListViewItemTemplateContext<T>;
|
|
210
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewItemTemplateDirective<any>, never>;
|
|
211
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewItemTemplateDirective<any>, "ng-template[monaListViewItemTemplate]", never, { "monaListViewItemTemplateOf": { "alias": "monaListViewItemTemplateOf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
144
212
|
}
|
|
145
213
|
|
|
146
214
|
declare class ListViewNavigableDirective<T> {
|
|
147
215
|
#private;
|
|
148
|
-
options: _angular_core.InputSignal<"" | Partial<NavigableOptions>>;
|
|
216
|
+
readonly options: _angular_core.InputSignal<"" | Partial<NavigableOptions>>;
|
|
149
217
|
constructor();
|
|
150
218
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewNavigableDirective<any>, never>;
|
|
151
219
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewNavigableDirective<any>, "mona-list-view[monaListViewNavigable]", never, { "options": { "alias": "monaListViewNavigable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -164,17 +232,31 @@ declare class ListViewPageableDirective {
|
|
|
164
232
|
* @default 1
|
|
165
233
|
*/
|
|
166
234
|
readonly page: _angular_core.ModelSignal<number>;
|
|
235
|
+
/**
|
|
236
|
+
* @description Items per page. Supports two-way binding via `[(pageSize)]`: it updates when the user picks a size
|
|
237
|
+
* in the pager. While unset, the options' `pageSize` applies. A new size keeps the first item of the current
|
|
238
|
+
* page in view.
|
|
239
|
+
* @default undefined
|
|
240
|
+
*/
|
|
241
|
+
readonly pageSize: _angular_core.ModelSignal<number | undefined>;
|
|
242
|
+
/**
|
|
243
|
+
* @description Emitted when the user picks a page size, before it is applied. Call `preventDefault()` on the
|
|
244
|
+
* event to keep the current size.
|
|
245
|
+
*/
|
|
246
|
+
readonly pageSizeSelect: _angular_core.OutputEmitterRef<PageSizeChangeEvent>;
|
|
167
247
|
constructor();
|
|
248
|
+
/** Applies a page size, keeping the first item of the current page in view. */
|
|
249
|
+
private setTake;
|
|
168
250
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewPageableDirective, never>;
|
|
169
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewPageableDirective, "mona-list-view[monaListViewPageable]", never, { "options": { "alias": "monaListViewPageable"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; }, never, never, true, never>;
|
|
251
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewPageableDirective, "mona-list-view[monaListViewPageable]", never, { "options": { "alias": "monaListViewPageable"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; "pageSize": "pageSizeChange"; "pageSizeSelect": "pageSizeSelect"; }, never, never, true, never>;
|
|
170
252
|
}
|
|
171
253
|
|
|
172
254
|
declare class ListViewSelectableDirective<T, K = unknown> {
|
|
173
255
|
#private;
|
|
256
|
+
readonly options: _angular_core.InputSignal<"" | Partial<SelectableOptions>>;
|
|
257
|
+
readonly selectBy: _angular_core.InputSignal<ListKeySelector<T, K> | undefined>;
|
|
258
|
+
readonly selectedKeys: _angular_core.InputSignal<Iterable<K>>;
|
|
174
259
|
readonly selectedKeysChange: _angular_core.OutputEmitterRef<K[]>;
|
|
175
|
-
options: _angular_core.InputSignal<"" | Partial<SelectableOptions>>;
|
|
176
|
-
selectBy: _angular_core.InputSignal<ListKeySelector<T, K> | undefined>;
|
|
177
|
-
selectedKeys: _angular_core.InputSignal<Iterable<K>>;
|
|
178
260
|
constructor();
|
|
179
261
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewSelectableDirective<any, any>, never>;
|
|
180
262
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewSelectableDirective<any, any>, "mona-list-view[monaListViewSelectable]", never, { "options": { "alias": "monaListViewSelectable"; "required": false; "isSignal": true; }; "selectBy": { "alias": "selectBy"; "required": false; "isSignal": true; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; "isSignal": true; }; }, { "selectedKeysChange": "selectedKeysChange"; }, never, never, true, never>;
|
|
@@ -182,10 +264,19 @@ declare class ListViewSelectableDirective<T, K = unknown> {
|
|
|
182
264
|
|
|
183
265
|
declare class ListViewVirtualScrollDirective<T> {
|
|
184
266
|
#private;
|
|
185
|
-
options: _angular_core.InputSignal<VirtualScrollOptions>;
|
|
267
|
+
readonly options: _angular_core.InputSignal<VirtualScrollOptions>;
|
|
186
268
|
constructor();
|
|
187
269
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewVirtualScrollDirective<any>, never>;
|
|
188
270
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewVirtualScrollDirective<any>, "mona-list-view[monaListViewVirtualScroll]", never, { "options": { "alias": "monaListViewVirtualScroll"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
189
271
|
}
|
|
190
272
|
|
|
273
|
+
/**
|
|
274
|
+
* The context of a `monaListViewGroupHeaderTemplate`: the group's value (what `groupBy` returned for its items), as
|
|
275
|
+
* `let-group`.
|
|
276
|
+
*/
|
|
277
|
+
interface ListViewGroupHeaderTemplateContext<G = unknown> {
|
|
278
|
+
readonly $implicit: G;
|
|
279
|
+
}
|
|
280
|
+
|
|
191
281
|
export { ListViewComponent, ListViewFooterTemplateDirective, ListViewGroupHeaderTemplateDirective, ListViewGroupableDirective, ListViewHeaderTemplateDirective, ListViewItemTemplateDirective, ListViewNavigableDirective, ListViewNoDataTemplateDirective, ListViewPageableDirective, ListViewSelectableDirective, ListViewVirtualScrollDirective };
|
|
282
|
+
export type { ListViewGroupHeaderTemplateContext, ListViewItemTemplateContext };
|
|
@@ -260,17 +260,29 @@ declare const MONA_AR_SA_LOCALE: {
|
|
|
260
260
|
};
|
|
261
261
|
list: {
|
|
262
262
|
filterList: string;
|
|
263
|
+
loading: string;
|
|
263
264
|
noData: string;
|
|
265
|
+
pagerLabel: (list: string) => string;
|
|
264
266
|
};
|
|
265
267
|
listBox: {
|
|
266
268
|
clearSelection: string;
|
|
269
|
+
itemsMoved: (position: number, total: number) => string;
|
|
270
|
+
itemsRemoved: (count: number) => string;
|
|
271
|
+
itemsTransferred: (count: number, list: string) => string;
|
|
272
|
+
itemsTransferredToOtherList: (count: number) => string;
|
|
267
273
|
moveDown: string;
|
|
268
274
|
moveUp: string;
|
|
269
275
|
remove: string;
|
|
276
|
+
selectionCleared: string;
|
|
277
|
+
toolbarLabel: (list: string) => string;
|
|
270
278
|
transferAllFrom: string;
|
|
279
|
+
transferAllFromList: (list: string) => string;
|
|
271
280
|
transferAllTo: string;
|
|
281
|
+
transferAllToList: (list: string) => string;
|
|
272
282
|
transferFrom: string;
|
|
283
|
+
transferFromList: (list: string) => string;
|
|
273
284
|
transferTo: string;
|
|
285
|
+
transferToList: (list: string) => string;
|
|
274
286
|
};
|
|
275
287
|
multiSelect: {
|
|
276
288
|
clear: string;
|
|
@@ -381,7 +393,17 @@ declare const MONA_AR_SA_LOCALE: {
|
|
|
381
393
|
collapse: string;
|
|
382
394
|
expand: string;
|
|
383
395
|
filter: string;
|
|
396
|
+
filterLabel: (tree: string) => string;
|
|
384
397
|
filterTree: string;
|
|
398
|
+
loadError: (node: string) => string;
|
|
399
|
+
loadingNode: (node: string) => string;
|
|
400
|
+
movedAfter: (node: string, target: string) => string;
|
|
401
|
+
movedBefore: (node: string, target: string) => string;
|
|
402
|
+
movedInto: (node: string, target: string) => string;
|
|
403
|
+
noData: string;
|
|
404
|
+
noMatches: string;
|
|
405
|
+
results: (count: number) => string;
|
|
406
|
+
retryLoading: (node: string) => string;
|
|
385
407
|
};
|
|
386
408
|
window: {
|
|
387
409
|
close: string;
|