@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,33 +1,49 @@
|
|
|
1
1
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
2
2
|
import { MonaTreeViewMessages } from '@nanahoshi/mona-ui/i18n';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { TemplateRef
|
|
4
|
+
import { TemplateRef } from '@angular/core';
|
|
5
5
|
import { FilterChangeEvent, FilterableOptions } from '@nanahoshi/mona-ui/common';
|
|
6
|
-
import { ITreeView, TreeService, ChildrenSelector, DataStructure, NodeClickEvent, NodeItem, DropPosition, NodeMoveSnapshot, NodeKeySelector, NodeCheckEvent, CheckableOptions, DisableOptions, NodeDragEvent, NodeDragEndEvent, NodeDragStartEvent, NodeDropEvent, DraggableOptions, ExpandableOptions, NodeSelectEvent, SelectableOptions } from '@nanahoshi/mona-ui/internal/tree';
|
|
7
|
-
export { CheckableOptions, ChildrenSelector, DataStructure, DisableOptions, DraggableOptions, DropPositionChangeEvent, ExpandableOptions, NodeCheckEvent, NodeClickEvent, NodeDragEndEvent, NodeDragEvent, NodeDragStartEvent, NodeDropEvent, NodeItem, NodeKeySelector, NodeMoveSnapshot, SelectableOptions, moveFlatTreeNode, moveTreeNode } from '@nanahoshi/mona-ui/internal/tree';
|
|
6
|
+
import { ITreeView, TreeService, ChildrenSelector, ChildrenLoadErrorEvent, DataStructure, NodeClickEvent, NodeItem, DropPosition, NodeMoveSnapshot, NodeKeySelector, NodeCheckEvent, CheckableOptions, DisableOptions, NodeDragEvent, NodeDragEndEvent, NodeDragStartEvent, NodeDropEvent, DraggableOptions, ExpandableOptions, NodeSelectEvent, SelectableOptions } from '@nanahoshi/mona-ui/internal/tree';
|
|
7
|
+
export { CheckableOptions, ChildrenLoadErrorEvent, ChildrenSelector, DataStructure, DisableOptions, DraggableOptions, DropPosition, DropPositionChangeEvent, ExpandableOptions, ITreeView, NodeCheckEvent, NodeClickEvent, NodeDragEndEvent, NodeDragEvent, NodeDragStartEvent, NodeDropEvent, NodeDropOriginalEvent, NodeItem, NodeKeySelector, NodeMoveSnapshot, NodeSelectEvent, SelectableOptions, moveFlatTreeNode, moveTreeNode } from '@nanahoshi/mona-ui/internal/tree';
|
|
8
8
|
import { Predicate, Selector } from '@mirei/ts-collections';
|
|
9
9
|
|
|
10
|
+
/** The context of a `monaTreeViewNodeTemplate`. */
|
|
10
11
|
interface TreeViewNodeTemplateContext<T> {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
/** The node's data item (`let-dataItem`). */
|
|
13
|
+
readonly $implicit: T;
|
|
14
|
+
/** The node's element (`let-element="element"`). */
|
|
15
|
+
readonly element: HTMLElement;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
declare class TreeViewComponent<T> implements ITreeView<T> {
|
|
16
19
|
#private;
|
|
20
|
+
protected readonly empty: _angular_core.Signal<boolean>;
|
|
21
|
+
protected readonly emptyText: _angular_core.Signal<string>;
|
|
22
|
+
/** "Filter {name}", from the tree's `ariaLabel` or else the text of its `ariaLabelledBy` elements. */
|
|
17
23
|
protected readonly filterAriaLabel: _angular_core.Signal<string>;
|
|
18
24
|
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaTreeViewMessages>;
|
|
19
25
|
protected readonly nodeTemplate: _angular_core.Signal<TemplateRef<TreeViewNodeTemplateContext<T>> | undefined>;
|
|
26
|
+
protected readonly statusId: string;
|
|
27
|
+
protected readonly treeId: string;
|
|
20
28
|
protected readonly treeService: TreeService<T>;
|
|
21
29
|
/**
|
|
22
|
-
* @description Enables CSS transitions when nodes expand or collapse.
|
|
30
|
+
* @description Enables CSS transitions when nodes expand or collapse. Accepts the attribute form
|
|
31
|
+
* (`animate="false"`).
|
|
23
32
|
* @default true
|
|
24
33
|
*/
|
|
25
|
-
readonly animate: _angular_core.
|
|
34
|
+
readonly animate: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
26
35
|
/**
|
|
27
|
-
* @description Accessible name
|
|
36
|
+
* @description Accessible name of the tree. Describe what the tree represents; it also names the filter input
|
|
37
|
+
* ("Filter {name}"). Set this or `ariaLabelledBy`: an unnamed tree logs a warning in development. A plain
|
|
38
|
+
* `aria-label` attribute on `mona-tree-view` doesn't name the tree.
|
|
28
39
|
* @default ""
|
|
29
40
|
*/
|
|
30
41
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
42
|
+
/**
|
|
43
|
+
* @description Id of the element that names the tree, as an alternative to `ariaLabel`.
|
|
44
|
+
* @default ""
|
|
45
|
+
*/
|
|
46
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
31
47
|
/**
|
|
32
48
|
* @description Emitted when the tree-view loses focus.
|
|
33
49
|
*/
|
|
@@ -37,6 +53,12 @@ declare class TreeViewComponent<T> implements ITreeView<T> {
|
|
|
37
53
|
* @default ""
|
|
38
54
|
*/
|
|
39
55
|
readonly children: _angular_core.InputSignal<ChildrenSelector<T>>;
|
|
56
|
+
/**
|
|
57
|
+
* @description Emitted when the children observable of a node errors. The node is collapsed again and marked
|
|
58
|
+
* as failed (its expander reads "Retry loading {node}"), the failure is announced, and expanding the node
|
|
59
|
+
* retries the load.
|
|
60
|
+
*/
|
|
61
|
+
readonly childrenLoadError: _angular_core.OutputEmitterRef<ChildrenLoadErrorEvent<T>>;
|
|
40
62
|
/**
|
|
41
63
|
* @description Collection of items to render.
|
|
42
64
|
* @default []
|
|
@@ -76,14 +98,20 @@ declare class TreeViewComponent<T> implements ITreeView<T> {
|
|
|
76
98
|
*/
|
|
77
99
|
readonly textField: _angular_core.InputSignal<string | Selector<T, string>>;
|
|
78
100
|
constructor();
|
|
101
|
+
/**
|
|
102
|
+
* Moves a node in the tree's internal structure, without going through `data`.
|
|
103
|
+
* @returns a snapshot for `undoMoveNode`, or `null` when nothing moved: `position` is `"outside"`, a node isn't
|
|
104
|
+
* in the tree, or the move isn't possible (onto the node itself or into its own subtree, inside its own parent or
|
|
105
|
+
* a disabled node).
|
|
106
|
+
*/
|
|
79
107
|
moveNode(source: NodeItem<T>, target: NodeItem<T>, position: DropPosition): NodeMoveSnapshot | null;
|
|
80
108
|
undoMoveNode(snapshot: NodeMoveSnapshot): void;
|
|
81
109
|
protected onFilterChange(event: FilterChangeEvent): void;
|
|
82
110
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeViewComponent<any>, never>;
|
|
83
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TreeViewComponent<any>, "mona-tree-view", never, { "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "children": { "alias": "children"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "hasChildren": { "alias": "hasChildren"; "required": false; "isSignal": true; }; "idField": { "alias": "idField"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "parentIdField": { "alias": "parentIdField"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; }, { "blur": "blur"; "focus": "focus"; "nodeClick": "nodeClick"; }, ["nodeTemplate"], never, true, never>;
|
|
111
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TreeViewComponent<any>, "mona-tree-view", never, { "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "children": { "alias": "children"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "hasChildren": { "alias": "hasChildren"; "required": false; "isSignal": true; }; "idField": { "alias": "idField"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "parentIdField": { "alias": "parentIdField"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; }, { "blur": "blur"; "childrenLoadError": "childrenLoadError"; "focus": "focus"; "nodeClick": "nodeClick"; }, ["nodeTemplate"], never, true, never>;
|
|
84
112
|
}
|
|
85
113
|
|
|
86
|
-
declare class TreeViewCheckableDirective<T, K = T>
|
|
114
|
+
declare class TreeViewCheckableDirective<T, K = T> {
|
|
87
115
|
#private;
|
|
88
116
|
/**
|
|
89
117
|
* @description Property name or accessor used to derive a node's check key from its data. Falls back to the node's data when unset.
|
|
@@ -96,7 +124,10 @@ declare class TreeViewCheckableDirective<T, K = T> implements OnInit {
|
|
|
96
124
|
*/
|
|
97
125
|
readonly checkedKeys: _angular_core.InputSignal<Iterable<K>>;
|
|
98
126
|
/**
|
|
99
|
-
* @description Emitted
|
|
127
|
+
* @description Emitted with the checked keys when the user checks or unchecks a node, including the children and
|
|
128
|
+
* parents that check follows (`checkChildren`, `checkParents`). Not emitted for keys set through `checkedKeys`,
|
|
129
|
+
* nor for keys the tree derives on its own: checked parents of checked children set from code, lazily loaded
|
|
130
|
+
* children of a checked node, and ancestors after a drop. Those are reported with the next user change.
|
|
100
131
|
*/
|
|
101
132
|
readonly checkedKeysChange: _angular_core.OutputEmitterRef<K[]>;
|
|
102
133
|
/**
|
|
@@ -109,13 +140,11 @@ declare class TreeViewCheckableDirective<T, K = T> implements OnInit {
|
|
|
109
140
|
*/
|
|
110
141
|
readonly nodeCheck: _angular_core.OutputEmitterRef<NodeCheckEvent<T>>;
|
|
111
142
|
/**
|
|
112
|
-
* @description Configures check mode and whether checking a node also checks its children or parents. Merged over `{ checkChildren: true, checkParents: true, enabled: true, mode: "multiple" }` when applied bare.
|
|
143
|
+
* @description Configures check mode and whether checking a node also checks its children or parents. Merged over `{ checkChildren: true, checkDisabledChildren: false, checkParents: true, childrenOnly: false, enabled: true, mode: "multiple" }` when applied bare.
|
|
113
144
|
* @default ""
|
|
114
145
|
*/
|
|
115
146
|
readonly options: _angular_core.InputSignal<"" | Partial<CheckableOptions>>;
|
|
116
147
|
constructor();
|
|
117
|
-
ngOnInit(): void;
|
|
118
|
-
private setNodeCheckSubscription;
|
|
119
148
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeViewCheckableDirective<any, any>, never>;
|
|
120
149
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeViewCheckableDirective<any, any>, "mona-tree-view[monaTreeViewCheckable]", ["monaTreeViewCheckable"], { "checkBy": { "alias": "checkBy"; "required": false; "isSignal": true; }; "checkedKeys": { "alias": "checkedKeys"; "required": false; "isSignal": true; }; "hasCheckbox": { "alias": "hasCheckbox"; "required": false; "isSignal": true; }; "options": { "alias": "monaTreeViewCheckable"; "required": false; "isSignal": true; }; }, { "checkedKeysChange": "checkedKeysChange"; "nodeCheck": "nodeCheck"; }, never, never, true, never>;
|
|
121
150
|
}
|
|
@@ -149,7 +178,7 @@ declare class TreeViewDragAndDropDirective<T> {
|
|
|
149
178
|
*/
|
|
150
179
|
readonly nodeDrag: _angular_core.OutputEmitterRef<NodeDragEvent<T>>;
|
|
151
180
|
/**
|
|
152
|
-
* @description Emitted when a node drag ends.
|
|
181
|
+
* @description Emitted when a node drag ends, dropped or not. Not cancelable: the drag is over either way.
|
|
153
182
|
*/
|
|
154
183
|
readonly nodeDragEnd: _angular_core.OutputEmitterRef<NodeDragEndEvent<T>>;
|
|
155
184
|
/**
|
|
@@ -157,7 +186,9 @@ declare class TreeViewDragAndDropDirective<T> {
|
|
|
157
186
|
*/
|
|
158
187
|
readonly nodeDragStart: _angular_core.OutputEmitterRef<NodeDragStartEvent<T>>;
|
|
159
188
|
/**
|
|
160
|
-
* @description Emitted when a node is dropped
|
|
189
|
+
* @description Emitted when a node is dropped on another node, or moved with Ctrl+Shift+Arrow (Cmd+Shift+Arrow on
|
|
190
|
+
* macOS). The tree doesn't move the node: the handler applies the move (with `moveTreeNode`,
|
|
191
|
+
* `moveFlatTreeNode` or `event.treeView.moveNode`). Call `preventDefault()` when the move isn't applied.
|
|
161
192
|
*/
|
|
162
193
|
readonly nodeDrop: _angular_core.OutputEmitterRef<NodeDropEvent<T>>;
|
|
163
194
|
/**
|
|
@@ -166,7 +197,6 @@ declare class TreeViewDragAndDropDirective<T> {
|
|
|
166
197
|
*/
|
|
167
198
|
readonly options: _angular_core.InputSignal<"" | Partial<DraggableOptions>>;
|
|
168
199
|
constructor();
|
|
169
|
-
setSubscriptions(): void;
|
|
170
200
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeViewDragAndDropDirective<any>, never>;
|
|
171
201
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeViewDragAndDropDirective<any>, "mona-tree-view[monaTreeViewDragAndDrop]", ["monaTreeViewDragAndDrop"], { "options": { "alias": "monaTreeViewDragAndDrop"; "required": false; "isSignal": true; }; }, { "nodeDrag": "nodeDrag"; "nodeDragEnd": "nodeDragEnd"; "nodeDragStart": "nodeDragStart"; "nodeDrop": "nodeDrop"; }, never, never, true, never>;
|
|
172
202
|
}
|
|
@@ -192,7 +222,8 @@ declare class TreeViewExpandableDirective<T, K = T> {
|
|
|
192
222
|
*/
|
|
193
223
|
readonly expandedKeys: _angular_core.InputSignal<Iterable<K>>;
|
|
194
224
|
/**
|
|
195
|
-
* @description Emitted
|
|
225
|
+
* @description Emitted with the expanded keys when the user expands or collapses a node. Not emitted for keys set
|
|
226
|
+
* through `expandedKeys`, nor for the expansion a filter applies (which is undone when the filter is cleared).
|
|
196
227
|
*/
|
|
197
228
|
readonly expandedKeysChange: _angular_core.OutputEmitterRef<K[]>;
|
|
198
229
|
/**
|
|
@@ -201,7 +232,6 @@ declare class TreeViewExpandableDirective<T, K = T> {
|
|
|
201
232
|
*/
|
|
202
233
|
readonly options: _angular_core.InputSignal<"" | Partial<ExpandableOptions>>;
|
|
203
234
|
constructor();
|
|
204
|
-
setSubscriptions(): void;
|
|
205
235
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeViewExpandableDirective<any, any>, never>;
|
|
206
236
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeViewExpandableDirective<any, any>, "mona-tree-view[monaTreeViewExpandable]", ["monaTreeViewExpandable"], { "expandBy": { "alias": "expandBy"; "required": false; "isSignal": true; }; "expandedKeys": { "alias": "expandedKeys"; "required": false; "isSignal": true; }; "options": { "alias": "monaTreeViewExpandable"; "required": false; "isSignal": true; }; }, { "collapse": "collapse"; "expand": "expand"; "expandedKeysChange": "expandedKeysChange"; }, never, never, true, never>;
|
|
207
237
|
}
|
|
@@ -209,14 +239,16 @@ declare class TreeViewExpandableDirective<T, K = T> {
|
|
|
209
239
|
declare class TreeViewFilterableDirective<T> {
|
|
210
240
|
#private;
|
|
211
241
|
/**
|
|
212
|
-
* @description Current filter text used to narrow the visible nodes.
|
|
242
|
+
* @description Current filter text used to narrow the visible nodes. Two-way bindable (`[(filter)]`); the user's
|
|
243
|
+
* typing updates it, so setting it from code (including back to `""`) always applies.
|
|
213
244
|
* @default ""
|
|
214
245
|
*/
|
|
215
|
-
readonly filter: _angular_core.
|
|
246
|
+
readonly filter: _angular_core.ModelSignal<string>;
|
|
216
247
|
/**
|
|
217
|
-
* @description Emitted when the filter
|
|
248
|
+
* @description Emitted when the user types in the filter input, before the filter applies. Call
|
|
249
|
+
* `preventDefault()` to keep the current filter; otherwise `filterChange` reports the new text.
|
|
218
250
|
*/
|
|
219
|
-
readonly
|
|
251
|
+
readonly filterInput: _angular_core.OutputEmitterRef<FilterChangeEvent>;
|
|
220
252
|
/**
|
|
221
253
|
* @description Placeholder text shown in the filter input.
|
|
222
254
|
* @default ""
|
|
@@ -228,22 +260,38 @@ declare class TreeViewFilterableDirective<T> {
|
|
|
228
260
|
*/
|
|
229
261
|
readonly options: _angular_core.InputSignal<"" | Partial<FilterableOptions>>;
|
|
230
262
|
constructor();
|
|
231
|
-
private setSubscription;
|
|
232
263
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeViewFilterableDirective<any>, never>;
|
|
233
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeViewFilterableDirective<any>, "mona-tree-view[monaTreeViewFilterable]", ["monaTreeViewFilterable"], { "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "options": { "alias": "monaTreeViewFilterable"; "required": false; "isSignal": true; }; }, { "
|
|
264
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeViewFilterableDirective<any>, "mona-tree-view[monaTreeViewFilterable]", ["monaTreeViewFilterable"], { "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "options": { "alias": "monaTreeViewFilterable"; "required": false; "isSignal": true; }; }, { "filter": "filterChange"; "filterInput": "filterInput"; }, never, never, true, never>;
|
|
234
265
|
}
|
|
235
266
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
267
|
+
/**
|
|
268
|
+
* Template for each node's content. The data item is the template's implicit value (`let-dataItem`) and the node's
|
|
269
|
+
* element is `element`. Bind the tree view's data to `monaTreeViewNodeTemplateOf` to type the data item; without it,
|
|
270
|
+
* the data item is `any` in templates.
|
|
271
|
+
*/
|
|
272
|
+
declare class TreeViewNodeTemplateDirective<T = any> {
|
|
273
|
+
/**
|
|
274
|
+
* @description The tree view's data, used only to type the template's data item. Optional.
|
|
275
|
+
* @default null
|
|
276
|
+
*/
|
|
277
|
+
readonly monaTreeViewNodeTemplateOf: _angular_core.InputSignal<Iterable<T> | null | undefined>;
|
|
278
|
+
static ngTemplateContextGuard<T>(_directive: TreeViewNodeTemplateDirective<T>, _context: unknown): _context is TreeViewNodeTemplateContext<T>;
|
|
279
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeViewNodeTemplateDirective<any>, never>;
|
|
280
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeViewNodeTemplateDirective<any>, "ng-template[monaTreeViewNodeTemplate]", never, { "monaTreeViewNodeTemplateOf": { "alias": "monaTreeViewNodeTemplateOf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
239
281
|
}
|
|
240
282
|
|
|
241
|
-
declare class TreeViewSelectableDirective<T, K = T>
|
|
283
|
+
declare class TreeViewSelectableDirective<T, K = T> {
|
|
242
284
|
#private;
|
|
243
285
|
/**
|
|
244
|
-
* @description Emitted
|
|
286
|
+
* @description Emitted before the user selects or deselects a node, by click or Enter. Call `preventDefault()`
|
|
287
|
+
* to keep the selection as it is; `selectionChange` follows when it isn't prevented.
|
|
245
288
|
*/
|
|
246
289
|
readonly nodeSelect: _angular_core.OutputEmitterRef<NodeSelectEvent<T>>;
|
|
290
|
+
/**
|
|
291
|
+
* @description Configures selection mode, toggleability, and whether only child nodes are selectable. Merged over `{ childrenOnly: false, enabled: true, mode: "single", toggleable: false }` when applied bare.
|
|
292
|
+
* @default ""
|
|
293
|
+
*/
|
|
294
|
+
readonly options: _angular_core.InputSignal<"" | Partial<SelectableOptions>>;
|
|
247
295
|
/**
|
|
248
296
|
* @description Property name or accessor used to derive a node's selection key from its data. Falls back to the node's data when unset.
|
|
249
297
|
* @default ""
|
|
@@ -255,25 +303,21 @@ declare class TreeViewSelectableDirective<T, K = T> implements OnInit {
|
|
|
255
303
|
*/
|
|
256
304
|
readonly selectedKeys: _angular_core.InputSignal<Iterable<K>>;
|
|
257
305
|
/**
|
|
258
|
-
* @description Emitted
|
|
306
|
+
* @description Emitted with the selected keys when the user selects or deselects a node. Not emitted for keys set
|
|
307
|
+
* through `selectedKeys`.
|
|
259
308
|
*/
|
|
260
309
|
readonly selectedKeysChange: _angular_core.OutputEmitterRef<K[]>;
|
|
261
310
|
/**
|
|
262
|
-
* @description Emitted
|
|
311
|
+
* @description Emitted with the node after the user selects or deselects it (after a `nodeSelect` that wasn't
|
|
312
|
+
* prevented).
|
|
263
313
|
*/
|
|
264
314
|
readonly selectionChange: _angular_core.OutputEmitterRef<NodeItem<T>>;
|
|
265
|
-
/**
|
|
266
|
-
* @description Configures selection mode, toggleability, and whether only child nodes are selectable. Merged over `{ childrenOnly: false, enabled: true, mode: "single", toggleable: false }` when applied bare.
|
|
267
|
-
* @default ""
|
|
268
|
-
*/
|
|
269
|
-
readonly options: _angular_core.InputSignal<"" | Partial<SelectableOptions>>;
|
|
270
315
|
constructor();
|
|
271
|
-
ngOnInit(): void;
|
|
272
|
-
private setNodeSelectSubscription;
|
|
273
316
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeViewSelectableDirective<any, any>, never>;
|
|
274
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeViewSelectableDirective<any, any>, "mona-tree-view[monaTreeViewSelectable]", ["monaTreeViewSelectable"], { "
|
|
317
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeViewSelectableDirective<any, any>, "mona-tree-view[monaTreeViewSelectable]", ["monaTreeViewSelectable"], { "options": { "alias": "monaTreeViewSelectable"; "required": false; "isSignal": true; }; "selectBy": { "alias": "selectBy"; "required": false; "isSignal": true; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; "isSignal": true; }; }, { "nodeSelect": "nodeSelect"; "selectedKeysChange": "selectedKeysChange"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
275
318
|
}
|
|
276
319
|
|
|
277
320
|
declare const TREE_VIEW_DEFAULT_MESSAGES: MonaTreeViewMessages;
|
|
278
321
|
|
|
279
322
|
export { TREE_VIEW_DEFAULT_MESSAGES, TreeViewCheckableDirective, TreeViewComponent, TreeViewDisableDirective, TreeViewDragAndDropDirective, TreeViewExpandableDirective, TreeViewFilterableDirective, TreeViewNodeTemplateDirective, TreeViewSelectableDirective };
|
|
323
|
+
export type { TreeViewNodeTemplateContext };
|