@exhaustive-ui/mcp 22.5.0 → 22.6.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/data/cards/accordion.md +5 -2
- package/data/cards/animateonscroll.md +8 -5
- package/data/cards/autocomplete.md +8 -3
- package/data/cards/autofocus.md +4 -2
- package/data/cards/avatar.md +4 -2
- package/data/cards/badge.md +2 -1
- package/data/cards/breadcrumb.md +3 -1
- package/data/cards/button.md +8 -2
- package/data/cards/card.md +2 -1
- package/data/cards/carousel.md +7 -5
- package/data/cards/cascadeselect.md +2 -6
- package/data/cards/chart.md +9 -7
- package/data/cards/checkbox.md +4 -3
- package/data/cards/chip.md +2 -1
- package/data/cards/classnames.md +21 -3
- package/data/cards/colorpicker.md +2 -1
- package/data/cards/confirmdialog.md +35 -5
- package/data/cards/confirmpopup.md +25 -3
- package/data/cards/contextmenu.md +1 -7
- package/data/cards/dataview.md +28 -9
- package/data/cards/datepicker.md +4 -3
- package/data/cards/dialog.md +3 -3
- package/data/cards/divider.md +2 -1
- package/data/cards/dock.md +24 -3
- package/data/cards/dragdrop.md +5 -1
- package/data/cards/drawer.md +3 -3
- package/data/cards/dynamicdialog.md +41 -14
- package/data/cards/editor.md +1 -1
- package/data/cards/fieldset.md +2 -1
- package/data/cards/fileinput.md +1 -1
- package/data/cards/fileupload.md +7 -8
- package/data/cards/floatlabel.md +1 -1
- package/data/cards/fluid.md +7 -5
- package/data/cards/focustrap.md +6 -2
- package/data/cards/galleria.md +18 -25
- package/data/cards/iconfield.md +3 -2
- package/data/cards/iftalabel.md +1 -1
- package/data/cards/image.md +4 -2
- package/data/cards/imagecompare.md +4 -3
- package/data/cards/inplace.md +2 -1
- package/data/cards/inputgroup.md +14 -3
- package/data/cards/inputmask.md +2 -2
- package/data/cards/inputnumber.md +4 -3
- package/data/cards/inputotp.md +2 -2
- package/data/cards/inputtext.md +2 -2
- package/data/cards/keyfilter.md +2 -1
- package/data/cards/knob.md +3 -2
- package/data/cards/listbox.md +5 -3
- package/data/cards/megamenu.md +7 -8
- package/data/cards/menu.md +3 -7
- package/data/cards/menubar.md +3 -7
- package/data/cards/message.md +2 -1
- package/data/cards/metergroup.md +3 -7
- package/data/cards/multiselect.md +5 -9
- package/data/cards/orderlist.md +6 -4
- package/data/cards/organizationchart.md +33 -6
- package/data/cards/overlay.md +2 -1
- package/data/cards/paginator.md +2 -1
- package/data/cards/panel.md +2 -1
- package/data/cards/panelmenu.md +4 -13
- package/data/cards/password.md +6 -3
- package/data/cards/picklist.md +9 -5
- package/data/cards/popover.md +6 -5
- package/data/cards/progressbar.md +4 -3
- package/data/cards/progressspinner.md +2 -1
- package/data/cards/radiobutton.md +4 -3
- package/data/cards/rating.md +1 -1
- package/data/cards/ripple.md +2 -1
- package/data/cards/scrollpanel.md +2 -1
- package/data/cards/scrolltop.md +5 -3
- package/data/cards/select.md +2 -1
- package/data/cards/selectbutton.md +6 -2
- package/data/cards/skeleton.md +2 -1
- package/data/cards/slider.md +4 -3
- package/data/cards/speeddial.md +7 -4
- package/data/cards/splitbutton.md +21 -18
- package/data/cards/splitter.md +2 -1
- package/data/cards/stepper.md +8 -3
- package/data/cards/styleclass.md +4 -2
- package/data/cards/table.md +46 -11
- package/data/cards/tabs.md +2 -1
- package/data/cards/tag.md +2 -1
- package/data/cards/terminal.md +31 -22
- package/data/cards/textarea.md +3 -2
- package/data/cards/tieredmenu.md +1 -6
- package/data/cards/timeline.md +5 -5
- package/data/cards/toast.md +7 -8
- package/data/cards/togglebutton.md +1 -1
- package/data/cards/toggleswitch.md +4 -3
- package/data/cards/toolbar.md +8 -8
- package/data/cards/tooltip.md +2 -1
- package/data/cards/tree.md +3 -6
- package/data/cards/treeselect.md +6 -7
- package/data/cards/treetable.md +52 -31
- package/data/components/accordion.md +31 -23
- package/data/components/animateonscroll.md +18 -15
- package/data/components/autocomplete.md +162 -93
- package/data/components/autofocus.md +9 -7
- package/data/components/avatar.md +56 -43
- package/data/components/badge.md +27 -18
- package/data/components/blockui.md +15 -8
- package/data/components/breadcrumb.md +20 -14
- package/data/components/button.md +121 -94
- package/data/components/card.md +12 -10
- package/data/components/carousel.md +75 -53
- package/data/components/cascadeselect.md +271 -238
- package/data/components/chart.md +88 -74
- package/data/components/checkbox.md +107 -73
- package/data/components/chip.md +20 -16
- package/data/components/classnames.md +22 -4
- package/data/components/colorpicker.md +54 -36
- package/data/components/confirmdialog.md +146 -43
- package/data/components/confirmpopup.md +95 -22
- package/data/components/contextmenu.md +110 -39
- package/data/components/dataview.md +176 -83
- package/data/components/datepicker.md +171 -141
- package/data/components/dialog.md +80 -68
- package/data/components/divider.md +17 -12
- package/data/components/dock.md +63 -27
- package/data/components/dragdrop.md +26 -12
- package/data/components/drawer.md +67 -48
- package/data/components/dynamicdialog.md +22 -13
- package/data/components/editor.md +42 -33
- package/data/components/fieldset.md +20 -17
- package/data/components/fileinput.md +92 -35
- package/data/components/fileupload.md +101 -61
- package/data/components/floatlabel.md +20 -11
- package/data/components/fluid.md +11 -9
- package/data/components/focustrap.md +11 -7
- package/data/components/galleria.md +224 -83
- package/data/components/iconfield.md +23 -15
- package/data/components/iftalabel.md +15 -9
- package/data/components/image.md +31 -26
- package/data/components/imagecompare.md +8 -6
- package/data/components/inplace.md +27 -22
- package/data/components/inputgroup.md +53 -29
- package/data/components/inputmask.md +107 -85
- package/data/components/inputnumber.md +127 -89
- package/data/components/inputotp.md +55 -42
- package/data/components/inputtext.md +72 -50
- package/data/components/keyfilter.md +6 -3
- package/data/components/knob.md +70 -58
- package/data/components/listbox.md +171 -141
- package/data/components/megamenu.md +24 -23
- package/data/components/menu.md +37 -34
- package/data/components/menubar.md +27 -22
- package/data/components/message.md +44 -32
- package/data/components/metergroup.md +48 -17
- package/data/components/multiselect.md +232 -168
- package/data/components/orderlist.md +55 -48
- package/data/components/organizationchart.md +182 -13
- package/data/components/overlay.md +31 -26
- package/data/components/paginator.md +49 -34
- package/data/components/panel.md +23 -19
- package/data/components/panelmenu.md +51 -25
- package/data/components/password.md +104 -91
- package/data/components/picklist.md +92 -70
- package/data/components/popover.md +68 -46
- package/data/components/progressbar.md +28 -22
- package/data/components/progressspinner.md +13 -11
- package/data/components/radiobutton.md +69 -35
- package/data/components/rating.md +48 -40
- package/data/components/ripple.md +8 -6
- package/data/components/scroller.md +29 -29
- package/data/components/scrollpanel.md +9 -7
- package/data/components/scrolltop.md +20 -18
- package/data/components/select.md +248 -169
- package/data/components/selectbutton.md +118 -56
- package/data/components/skeleton.md +22 -18
- package/data/components/slider.md +73 -49
- package/data/components/speeddial.md +77 -59
- package/data/components/splitbutton.md +354 -329
- package/data/components/splitter.md +22 -18
- package/data/components/stepper.md +38 -21
- package/data/components/styleclass.md +12 -6
- package/data/components/table.md +523 -314
- package/data/components/tabs.md +44 -26
- package/data/components/tag.md +18 -14
- package/data/components/terminal.md +38 -27
- package/data/components/textarea.md +82 -47
- package/data/components/tieredmenu.md +34 -29
- package/data/components/timeline.md +29 -28
- package/data/components/toast.md +115 -57
- package/data/components/togglebutton.md +53 -39
- package/data/components/toggleswitch.md +41 -28
- package/data/components/toolbar.md +19 -18
- package/data/components/tooltip.md +43 -32
- package/data/components/tree.md +114 -81
- package/data/components/treeselect.md +176 -174
- package/data/components/treetable.md +1250 -1045
- package/data/components.json +4122 -4080
- package/data/llms-full.txt +8784 -6249
- package/data/manifest.json +154 -15
- package/data/pages/tailwind.md +20 -10
- package/data/snapshot.json +2 -2
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/data/components/tree.md
CHANGED
|
@@ -11,10 +11,10 @@ Screen Reader Value to describe the component can either be provided with aria-l
|
|
|
11
11
|
Tree component requires an array of TreeNode objects as its value .
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Component, OnInit,
|
|
14
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
15
|
+
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
15
16
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
16
17
|
import { NodeService } from '@/service/nodeservice';
|
|
17
|
-
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
18
18
|
|
|
19
19
|
@Component({
|
|
20
20
|
template: `
|
|
@@ -28,6 +28,7 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
28
28
|
})
|
|
29
29
|
export class TreeBasicDemo implements OnInit {
|
|
30
30
|
private nodeService = inject(NodeService);
|
|
31
|
+
|
|
31
32
|
files = signal<TreeNode[]>(undefined);
|
|
32
33
|
|
|
33
34
|
ngOnInit() {
|
|
@@ -43,10 +44,11 @@ export class TreeBasicDemo implements OnInit {
|
|
|
43
44
|
Selection of multiple nodes via checkboxes is enabled by configuring selectionMode as checkbox .
|
|
44
45
|
|
|
45
46
|
```typescript
|
|
46
|
-
import { Component, OnInit,
|
|
47
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
48
|
+
import { FormsModule } from '@angular/forms';
|
|
49
|
+
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
47
50
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
48
51
|
import { NodeService } from '@/service/nodeservice';
|
|
49
|
-
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
50
52
|
|
|
51
53
|
@Component({
|
|
52
54
|
template: `
|
|
@@ -55,12 +57,14 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
55
57
|
</div>
|
|
56
58
|
`,
|
|
57
59
|
standalone: true,
|
|
58
|
-
imports: [TreeModule],
|
|
60
|
+
imports: [TreeModule, FormsModule],
|
|
59
61
|
providers: [NodeService]
|
|
60
62
|
})
|
|
61
63
|
export class TreeCheckboxDemo implements OnInit {
|
|
62
64
|
private nodeService = inject(NodeService);
|
|
65
|
+
|
|
63
66
|
files = signal<TreeNode[]>(undefined);
|
|
67
|
+
|
|
64
68
|
selectedFiles!: TreeNode[];
|
|
65
69
|
|
|
66
70
|
ngOnInit() {
|
|
@@ -76,13 +80,12 @@ export class TreeCheckboxDemo implements OnInit {
|
|
|
76
80
|
Tree has exclusive integration with ContextMenu using the contextMenu property along with the contextMenuSelection to manage the selection.
|
|
77
81
|
|
|
78
82
|
```typescript
|
|
79
|
-
import { Component,
|
|
80
|
-
import {
|
|
83
|
+
import { Component, model, OnInit, signal, inject } from '@angular/core';
|
|
84
|
+
import { MenuItem, MessageService, TreeNode } from '@exhaustive-ui/core/api';
|
|
85
|
+
import { ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
|
|
81
86
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
82
87
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
83
88
|
import { NodeService } from '@/service/nodeservice';
|
|
84
|
-
import { TreeNode, MenuItem, MessageService } from '@exhaustive-ui/core/api';
|
|
85
|
-
import { ContextMenu } from '@exhaustive-ui/core/contextmenu';
|
|
86
89
|
|
|
87
90
|
@Component({
|
|
88
91
|
template: `
|
|
@@ -93,19 +96,24 @@ import { ContextMenu } from '@exhaustive-ui/core/contextmenu';
|
|
|
93
96
|
</div>
|
|
94
97
|
`,
|
|
95
98
|
standalone: true,
|
|
96
|
-
imports: [ContextMenuModule, ToastModule
|
|
97
|
-
providers: [
|
|
99
|
+
imports: [TreeModule, ContextMenuModule, ToastModule],
|
|
100
|
+
providers: [MessageService, NodeService]
|
|
98
101
|
})
|
|
99
102
|
export class TreeContextmenuDemo implements OnInit {
|
|
100
103
|
private nodeService = inject(NodeService);
|
|
101
104
|
private messageService = inject(MessageService);
|
|
105
|
+
|
|
102
106
|
files = signal<TreeNode[]>([]);
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
|
|
108
|
+
selectedNode = model<TreeNode | null>(null);
|
|
109
|
+
|
|
110
|
+
contextMenuNode = model<TreeNode | null>(null);
|
|
111
|
+
|
|
105
112
|
items!: MenuItem[];
|
|
106
113
|
|
|
107
114
|
ngOnInit() {
|
|
108
115
|
this.nodeService.getFiles().then((files) => this.files.set(files));
|
|
116
|
+
|
|
109
117
|
this.items = [
|
|
110
118
|
{ label: 'View', icon: 'pi pi-search', command: () => this.viewFile(this.contextMenuNode()) },
|
|
111
119
|
{ label: 'Toggle', icon: 'pi pi-sort', command: () => this.toggleFile(this.contextMenuNode()) }
|
|
@@ -143,11 +151,11 @@ export class TreeContextmenuDemo implements OnInit {
|
|
|
143
151
|
Tree requires a collection of TreeNode instances as a value .
|
|
144
152
|
|
|
145
153
|
```typescript
|
|
146
|
-
import { Component, OnInit,
|
|
154
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
155
|
+
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
147
156
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
148
157
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
149
158
|
import { NodeService } from '@/service/nodeservice';
|
|
150
|
-
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
151
159
|
|
|
152
160
|
@Component({
|
|
153
161
|
template: `
|
|
@@ -160,11 +168,12 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
160
168
|
</div>
|
|
161
169
|
`,
|
|
162
170
|
standalone: true,
|
|
163
|
-
imports: [
|
|
171
|
+
imports: [TreeModule, ButtonModule],
|
|
164
172
|
providers: [NodeService]
|
|
165
173
|
})
|
|
166
174
|
export class TreeControlledDemo implements OnInit {
|
|
167
175
|
private nodeService = inject(NodeService);
|
|
176
|
+
|
|
168
177
|
files = signal<TreeNode[]>(undefined);
|
|
169
178
|
|
|
170
179
|
ngOnInit() {
|
|
@@ -182,6 +191,14 @@ export class TreeControlledDemo implements OnInit {
|
|
|
182
191
|
const updatedFiles = this.files().map((node) => this.expandRecursive(node, false));
|
|
183
192
|
this.files.set(updatedFiles);
|
|
184
193
|
}
|
|
194
|
+
|
|
195
|
+
private expandRecursive(node: TreeNode, isExpand: boolean): TreeNode {
|
|
196
|
+
return {
|
|
197
|
+
...node,
|
|
198
|
+
expanded: isExpand,
|
|
199
|
+
children: node.children ? node.children.map((child) => this.expandRecursive(child, isExpand)) : node.children
|
|
200
|
+
};
|
|
201
|
+
}
|
|
185
202
|
}
|
|
186
203
|
```
|
|
187
204
|
|
|
@@ -190,11 +207,12 @@ export class TreeControlledDemo implements OnInit {
|
|
|
190
207
|
An event is provided for each type of user interaction such as expand, collapse and selection.
|
|
191
208
|
|
|
192
209
|
```typescript
|
|
193
|
-
import { Component, OnInit,
|
|
210
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
211
|
+
import { FormsModule } from '@angular/forms';
|
|
212
|
+
import { MessageService, TreeNode } from '@exhaustive-ui/core/api';
|
|
194
213
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
195
214
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
196
215
|
import { NodeService } from '@/service/nodeservice';
|
|
197
|
-
import { TreeNode, MessageService } from '@exhaustive-ui/core/api';
|
|
198
216
|
|
|
199
217
|
@Component({
|
|
200
218
|
template: `
|
|
@@ -213,13 +231,15 @@ import { TreeNode, MessageService } from '@exhaustive-ui/core/api';
|
|
|
213
231
|
</div>
|
|
214
232
|
`,
|
|
215
233
|
standalone: true,
|
|
216
|
-
imports: [
|
|
217
|
-
providers: [
|
|
234
|
+
imports: [TreeModule, FormsModule, ToastModule],
|
|
235
|
+
providers: [MessageService, NodeService]
|
|
218
236
|
})
|
|
219
237
|
export class TreeEventDemo implements OnInit {
|
|
220
238
|
private nodeService = inject(NodeService);
|
|
221
239
|
private messageService = inject(MessageService);
|
|
240
|
+
|
|
222
241
|
files = signal<TreeNode[]>(undefined);
|
|
242
|
+
|
|
223
243
|
selectedFile!: TreeNode;
|
|
224
244
|
|
|
225
245
|
ngOnInit() {
|
|
@@ -251,10 +271,10 @@ export class TreeEventDemo implements OnInit {
|
|
|
251
271
|
Filtering is enabled by adding the filter property, by default label property of a node is used to compare against the value in the text field, in order to customize which field(s) should be used during search define filterBy property. In addition filterMode specifies the filtering strategy. In lenient mode when the query matches a node, children of the node are not searched further as all descendants of the node are included. On the other hand, in strict mode when the query matches a node, filtering continues on all descendants.
|
|
252
272
|
|
|
253
273
|
```typescript
|
|
254
|
-
import { Component, OnInit,
|
|
274
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
275
|
+
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
255
276
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
256
277
|
import { NodeService } from '@/service/nodeservice';
|
|
257
|
-
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
258
278
|
|
|
259
279
|
@Component({
|
|
260
280
|
template: `
|
|
@@ -273,7 +293,9 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
273
293
|
})
|
|
274
294
|
export class TreeFilterDemo implements OnInit {
|
|
275
295
|
private nodeService = inject(NodeService);
|
|
296
|
+
|
|
276
297
|
files = signal<TreeNode[]>(undefined);
|
|
298
|
+
|
|
277
299
|
files2 = signal<TreeNode[]>(undefined);
|
|
278
300
|
|
|
279
301
|
ngOnInit() {
|
|
@@ -291,8 +313,8 @@ Lazy loading is useful when dealing with huge datasets, in this example nodes ar
|
|
|
291
313
|
|
|
292
314
|
```typescript
|
|
293
315
|
import { Component, OnInit, signal } from '@angular/core';
|
|
294
|
-
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
295
316
|
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
317
|
+
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
296
318
|
|
|
297
319
|
@Component({
|
|
298
320
|
template: `
|
|
@@ -308,6 +330,7 @@ export class TreeLazyDemo implements OnInit {
|
|
|
308
330
|
|
|
309
331
|
ngOnInit() {
|
|
310
332
|
this.nodes.set(this.initiateNodes());
|
|
333
|
+
|
|
311
334
|
setTimeout(() => {
|
|
312
335
|
this.nodes.set(this.nodes().map((node) => ({ ...node, loading: false })));
|
|
313
336
|
}, 2000);
|
|
@@ -339,19 +362,19 @@ export class TreeLazyDemo implements OnInit {
|
|
|
339
362
|
onNodeExpand(event: any) {
|
|
340
363
|
if (!event.node.children) {
|
|
341
364
|
event.node.loading = true;
|
|
342
|
-
|
|
365
|
+
|
|
343
366
|
setTimeout(() => {
|
|
344
367
|
const _nodes = this.nodes();
|
|
345
368
|
let _node = { ...event.node };
|
|
346
369
|
_node.children = [];
|
|
347
|
-
|
|
370
|
+
|
|
348
371
|
for (let i = 0; i < 3; i++) {
|
|
349
372
|
_node.children.push({
|
|
350
373
|
key: event.node.key + '-' + i,
|
|
351
374
|
label: 'Lazy ' + event.node.label + '-' + i
|
|
352
375
|
});
|
|
353
376
|
}
|
|
354
|
-
|
|
377
|
+
|
|
355
378
|
const key = parseInt(_node.key, 10);
|
|
356
379
|
_nodes[key] = { ..._node, loading: false };
|
|
357
380
|
this.nodes.set([..._nodes]);
|
|
@@ -366,12 +389,12 @@ export class TreeLazyDemo implements OnInit {
|
|
|
366
389
|
More than one node is selectable by setting selectionMode to multiple . By default in multiple selection mode, metaKey press (e.g. ⌘ ) is necessary to add to existing selections however this can be configured with disabling the metaKeySelection property. Note that in touch enabled devices, Tree always ignores metaKey. In multiple selection mode, selection binding should be an array of the selected nodes. Nodes are matched by their key , or by reference when they have no key.
|
|
367
390
|
|
|
368
391
|
```typescript
|
|
369
|
-
import { Component, OnInit,
|
|
392
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
370
393
|
import { FormsModule } from '@angular/forms';
|
|
394
|
+
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
371
395
|
import { ToggleSwitchModule } from '@exhaustive-ui/core/toggleswitch';
|
|
372
|
-
import {
|
|
396
|
+
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
373
397
|
import { NodeService } from '@/service/nodeservice';
|
|
374
|
-
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
375
398
|
|
|
376
399
|
@Component({
|
|
377
400
|
template: `
|
|
@@ -384,13 +407,16 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
384
407
|
</div>
|
|
385
408
|
`,
|
|
386
409
|
standalone: true,
|
|
387
|
-
imports: [
|
|
410
|
+
imports: [TreeModule, FormsModule, ToggleSwitchModule],
|
|
388
411
|
providers: [NodeService]
|
|
389
412
|
})
|
|
390
413
|
export class TreeMultipleDemo implements OnInit {
|
|
391
414
|
private nodeService = inject(NodeService);
|
|
415
|
+
|
|
392
416
|
metaKeySelection: boolean = false;
|
|
417
|
+
|
|
393
418
|
files = signal<TreeNode[]>(undefined);
|
|
419
|
+
|
|
394
420
|
selectedFiles!: TreeNode[];
|
|
395
421
|
|
|
396
422
|
ngOnInit() {
|
|
@@ -406,10 +432,11 @@ export class TreeMultipleDemo implements OnInit {
|
|
|
406
432
|
Single node selection is configured by setting selectionMode as single along with selection properties to manage the selection value binding.
|
|
407
433
|
|
|
408
434
|
```typescript
|
|
409
|
-
import { Component, OnInit,
|
|
435
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
436
|
+
import { FormsModule } from '@angular/forms';
|
|
437
|
+
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
410
438
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
411
439
|
import { NodeService } from '@/service/nodeservice';
|
|
412
|
-
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
413
440
|
|
|
414
441
|
@Component({
|
|
415
442
|
template: `
|
|
@@ -418,12 +445,14 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
418
445
|
</div>
|
|
419
446
|
`,
|
|
420
447
|
standalone: true,
|
|
421
|
-
imports: [TreeModule],
|
|
448
|
+
imports: [TreeModule, FormsModule],
|
|
422
449
|
providers: [NodeService]
|
|
423
450
|
})
|
|
424
451
|
export class TreeSingleDemo implements OnInit {
|
|
425
452
|
private nodeService = inject(NodeService);
|
|
453
|
+
|
|
426
454
|
files = signal<TreeNode[]>(undefined);
|
|
455
|
+
|
|
427
456
|
selectedFile!: TreeNode;
|
|
428
457
|
|
|
429
458
|
ngOnInit() {
|
|
@@ -439,9 +468,10 @@ export class TreeSingleDemo implements OnInit {
|
|
|
439
468
|
Custom node content instead of a node label is defined with the pTemplate property.
|
|
440
469
|
|
|
441
470
|
```typescript
|
|
471
|
+
import { CommonModule } from '@angular/common';
|
|
442
472
|
import { Component, OnInit, signal } from '@angular/core';
|
|
443
|
-
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
444
473
|
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
474
|
+
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
445
475
|
|
|
446
476
|
@Component({
|
|
447
477
|
template: `
|
|
@@ -457,7 +487,7 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
457
487
|
</div>
|
|
458
488
|
`,
|
|
459
489
|
standalone: true,
|
|
460
|
-
imports: [TreeModule]
|
|
490
|
+
imports: [TreeModule, CommonModule]
|
|
461
491
|
})
|
|
462
492
|
export class TreeTemplateDemo implements OnInit {
|
|
463
493
|
nodes = signal<TreeNode[]>(undefined);
|
|
@@ -494,10 +524,10 @@ export class TreeTemplateDemo implements OnInit {
|
|
|
494
524
|
VirtualScroller is a performance-approach to handle huge data efficiently. Setting virtualScroll property as true and providing a virtualScrollItemSize in pixels would be enough to enable this functionality.
|
|
495
525
|
|
|
496
526
|
```typescript
|
|
497
|
-
import { Component, OnInit,
|
|
527
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
528
|
+
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
498
529
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
499
530
|
import { NodeService } from '@/service/nodeservice';
|
|
500
|
-
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
501
531
|
|
|
502
532
|
@Component({
|
|
503
533
|
template: `
|
|
@@ -511,6 +541,7 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
511
541
|
})
|
|
512
542
|
export class TreeVirtualscrollDemo implements OnInit {
|
|
513
543
|
private nodeService = inject(NodeService);
|
|
544
|
+
|
|
514
545
|
nodes = signal<TreeNode[]>(undefined);
|
|
515
546
|
|
|
516
547
|
ngOnInit() {
|
|
@@ -524,10 +555,10 @@ export class TreeVirtualscrollDemo implements OnInit {
|
|
|
524
555
|
VirtualScroller is a performance-approach to handle huge data efficiently. Setting virtualScroll property as true and providing a virtualScrollItemSize in pixels would be enough to enable this functionality.
|
|
525
556
|
|
|
526
557
|
```typescript
|
|
527
|
-
import { Component, OnInit,
|
|
558
|
+
import { Component, OnInit, signal, inject } from '@angular/core';
|
|
559
|
+
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
528
560
|
import { TreeModule } from '@exhaustive-ui/core/tree';
|
|
529
561
|
import { NodeService } from '@/service/nodeservice';
|
|
530
|
-
import { TreeNode } from '@exhaustive-ui/core/api';
|
|
531
562
|
|
|
532
563
|
@Component({
|
|
533
564
|
template: `
|
|
@@ -541,7 +572,9 @@ import { TreeNode } from '@exhaustive-ui/core/api';
|
|
|
541
572
|
})
|
|
542
573
|
export class TreeVirtualscrolllazyDemo implements OnInit {
|
|
543
574
|
private nodeService = inject(NodeService);
|
|
575
|
+
|
|
544
576
|
loading = signal<boolean>(false);
|
|
577
|
+
|
|
545
578
|
nodes = signal<TreeNode[]>(undefined);
|
|
546
579
|
|
|
547
580
|
ngOnInit() {
|
|
@@ -573,48 +606,48 @@ Tree is used to display hierarchical data.
|
|
|
573
606
|
|
|
574
607
|
| Name | Type | Default | Description |
|
|
575
608
|
|------|------|---------|-------------|
|
|
576
|
-
| dt |
|
|
577
|
-
| unstyled |
|
|
578
|
-
| pt |
|
|
579
|
-
| ptOptions |
|
|
580
|
-
| value |
|
|
581
|
-
| selectionMode |
|
|
582
|
-
| loadingMode |
|
|
583
|
-
| selection |
|
|
584
|
-
| contextMenu |
|
|
585
|
-
| contextMenuSelectionMode |
|
|
586
|
-
| contextMenuSelection |
|
|
587
|
-
| draggableScope |
|
|
588
|
-
| droppableScope |
|
|
589
|
-
| draggableNodes |
|
|
590
|
-
| droppableNodes |
|
|
591
|
-
| metaKeySelection |
|
|
592
|
-
| propagateSelectionUp |
|
|
593
|
-
| propagateSelectionDown |
|
|
594
|
-
| loading |
|
|
595
|
-
| loadingIcon |
|
|
596
|
-
| emptyMessage |
|
|
597
|
-
| ariaLabel |
|
|
598
|
-
| togglerAriaLabel |
|
|
599
|
-
| ariaLabelledBy |
|
|
600
|
-
| validateDrop |
|
|
601
|
-
| filter |
|
|
602
|
-
| filterInputAutoFocus |
|
|
603
|
-
| filterBy |
|
|
604
|
-
| filterMode |
|
|
605
|
-
| filterOptions |
|
|
606
|
-
| filterPlaceholder |
|
|
607
|
-
| filteredNodes |
|
|
608
|
-
| filterLocale |
|
|
609
|
-
| scrollHeight |
|
|
610
|
-
| lazy |
|
|
611
|
-
| virtualScroll |
|
|
612
|
-
| virtualScrollItemSize |
|
|
613
|
-
| virtualScrollOptions |
|
|
614
|
-
| indentation |
|
|
615
|
-
| _templateMap |
|
|
616
|
-
| trackBy |
|
|
617
|
-
| highlightOnSelect |
|
|
609
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
610
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
611
|
+
| pt | TreePassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
612
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
613
|
+
| value | any | - | An array of treenodes. |
|
|
614
|
+
| selectionMode | "multiple" \| "single" \| "checkbox" | - | Defines the selection mode. |
|
|
615
|
+
| loadingMode | "mask" \| "icon" | 'mask' | Loading mode display. |
|
|
616
|
+
| selection | TreeNode<any> \| TreeNode<any>[] | - | A single treenode instance or an array to refer to the selections. |
|
|
617
|
+
| contextMenu | any | - | Context menu instance. |
|
|
618
|
+
| contextMenuSelectionMode | "separate" \| "joint" | 'joint' | Defines the behavior of context menu selection, in "separate" mode context menu updates contextMenuSelection property whereas in joint mode selection property is used instead so that when row selection is enabled, both row selection and context menu selection use the same property. |
|
|
619
|
+
| contextMenuSelection | TreeNode<any> | - | Selected node with a context menu. |
|
|
620
|
+
| draggableScope | any | - | Scope of the draggable nodes to match a droppableScope. |
|
|
621
|
+
| droppableScope | any | - | Scope of the droppable nodes to match a draggableScope. |
|
|
622
|
+
| draggableNodes | boolean | - | Whether the nodes are draggable. |
|
|
623
|
+
| droppableNodes | boolean | - | Whether the nodes are droppable. |
|
|
624
|
+
| metaKeySelection | boolean | false | Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically. |
|
|
625
|
+
| propagateSelectionUp | boolean | true | Whether checkbox selections propagate to ancestor nodes. |
|
|
626
|
+
| propagateSelectionDown | boolean | true | Whether checkbox selections propagate to descendant nodes. |
|
|
627
|
+
| loading | boolean | - | Displays a loader to indicate data load is in progress. |
|
|
628
|
+
| loadingIcon | string | - | The icon to show while indicating data load is in progress. |
|
|
629
|
+
| emptyMessage | string | '' | Text to display when there is no data. |
|
|
630
|
+
| ariaLabel | string | - | Used to define a string that labels the tree. |
|
|
631
|
+
| togglerAriaLabel | string | - | Defines a string that labels the toggler icon for accessibility. |
|
|
632
|
+
| ariaLabelledBy | string | - | Establishes relationships between the component and label(s) where its value should be one or more element IDs. |
|
|
633
|
+
| validateDrop | boolean | - | When enabled, drop can be accepted or rejected based on condition defined at onNodeDrop. |
|
|
634
|
+
| filter | boolean | - | When specified, displays an input field to filter the items. |
|
|
635
|
+
| filterInputAutoFocus | boolean | false | Determines whether the filter input should be automatically focused when the component is rendered. |
|
|
636
|
+
| filterBy | string | 'label' | When filtering is enabled, filterBy decides which field or fields (comma separated) to search against. |
|
|
637
|
+
| filterMode | string | 'lenient' | Mode for filtering valid values are "lenient" and "strict". Default is lenient. |
|
|
638
|
+
| filterOptions | any | - | Mode for filtering valid values are "lenient" and "strict". Default is lenient. |
|
|
639
|
+
| filterPlaceholder | string | - | Placeholder text to show when filter input is empty. |
|
|
640
|
+
| filteredNodes | TreeNode<any>[] | - | Values after the tree nodes are filtered. |
|
|
641
|
+
| filterLocale | string | - | Locale to use in filtering. The default locale is the host environment's current locale. |
|
|
642
|
+
| scrollHeight | string | - | Height of the scrollable viewport. |
|
|
643
|
+
| lazy | boolean | false | Defines if data is loaded and interacted with in lazy manner. |
|
|
644
|
+
| virtualScroll | boolean | - | Whether the data should be loaded on demand during scroll. |
|
|
645
|
+
| virtualScrollItemSize | number | - | Height of an item in the list for VirtualScrolling. |
|
|
646
|
+
| virtualScrollOptions | ScrollerOptions | - | Whether to use the scroller feature. The properties of scroller component can be used like an object in it. |
|
|
647
|
+
| indentation | number | 1.5 | Indentation factor for spacing of the nested node when virtual scrolling is enabled. |
|
|
648
|
+
| _templateMap | any | - | Custom templates of the component. |
|
|
649
|
+
| trackBy | Function | (index: number, item: any) => item | Function to optimize the node list rendering, default algorithm checks for object identity. |
|
|
650
|
+
| highlightOnSelect | boolean | false | Highlights the node on select. |
|
|
618
651
|
|
|
619
652
|
### Emits
|
|
620
653
|
|