@syncfusion/ej2-navigations 31.1.17 → 31.1.18
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/dist/ej2-navigations.min.js +1 -1
- package/dist/ej2-navigations.umd.min.js +1 -1
- package/dist/global/ej2-navigations.min.js +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -64
- package/styles/bds-lite.css +2 -1
- package/styles/bds.css +2 -1
- package/styles/bootstrap-dark-lite.css +2 -1
- package/styles/bootstrap-dark.css +2 -1
- package/styles/bootstrap-lite.css +2 -1
- package/styles/bootstrap.css +2 -1
- package/styles/bootstrap4-lite.css +2 -1
- package/styles/bootstrap4.css +2 -1
- package/styles/bootstrap5-dark-lite.css +2 -1
- package/styles/bootstrap5-dark.css +2 -1
- package/styles/bootstrap5-lite.css +2 -1
- package/styles/bootstrap5.3-lite.css +2 -1
- package/styles/bootstrap5.3.css +2 -1
- package/styles/bootstrap5.css +2 -1
- package/styles/fabric-dark-lite.css +2 -1
- package/styles/fabric-dark.css +2 -1
- package/styles/fabric-lite.css +2 -1
- package/styles/fabric.css +2 -1
- package/styles/fluent-dark-lite.css +3 -2
- package/styles/fluent-dark.css +3 -2
- package/styles/fluent-lite.css +3 -2
- package/styles/fluent.css +3 -2
- package/styles/fluent2-lite.css +3 -2
- package/styles/fluent2.css +3 -2
- package/styles/highcontrast-light-lite.css +2 -1
- package/styles/highcontrast-light.css +2 -1
- package/styles/highcontrast-lite.css +2 -1
- package/styles/highcontrast.css +2 -1
- package/styles/material-dark-lite.css +2 -1
- package/styles/material-dark.css +2 -1
- package/styles/material-lite.css +2 -1
- package/styles/material.css +2 -1
- package/styles/material3-dark-lite.css +3 -2
- package/styles/material3-dark.css +3 -2
- package/styles/material3-lite.css +3 -2
- package/styles/material3.css +3 -2
- package/styles/menu/_bootstrap-dark-definition.scss +1 -0
- package/styles/menu/_bootstrap-definition.scss +1 -0
- package/styles/menu/_fluent-definition.scss +1 -1
- package/styles/menu/_fluent2-definition.scss +1 -1
- package/styles/menu/_layout.scss +7 -1
- package/styles/menu/_material3-definition.scss +1 -1
- package/styles/menu/bds.css +1 -0
- package/styles/menu/bootstrap-dark.css +1 -0
- package/styles/menu/bootstrap.css +1 -0
- package/styles/menu/bootstrap4.css +1 -0
- package/styles/menu/bootstrap5-dark.css +1 -0
- package/styles/menu/bootstrap5.3.css +1 -0
- package/styles/menu/bootstrap5.css +1 -0
- package/styles/menu/fabric-dark.css +1 -0
- package/styles/menu/fabric.css +1 -0
- package/styles/menu/fluent-dark.css +2 -1
- package/styles/menu/fluent.css +2 -1
- package/styles/menu/fluent2.css +2 -1
- package/styles/menu/highcontrast-light.css +1 -0
- package/styles/menu/highcontrast.css +1 -0
- package/styles/menu/material-dark.css +1 -0
- package/styles/menu/material.css +1 -0
- package/styles/menu/material3-dark.css +2 -1
- package/styles/menu/material3.css +2 -1
- package/styles/menu/tailwind-dark.css +1 -0
- package/styles/menu/tailwind.css +1 -0
- package/styles/menu/tailwind3.css +1 -0
- package/styles/tailwind-dark-lite.css +2 -1
- package/styles/tailwind-dark.css +2 -1
- package/styles/tailwind-lite.css +2 -1
- package/styles/tailwind.css +2 -1
- package/styles/tailwind3-lite.css +2 -1
- package/styles/tailwind3.css +2 -1
- package/styles/treeview/_layout.scss +1 -1
- package/styles/treeview/bds.css +1 -1
- package/styles/treeview/bootstrap-dark.css +1 -1
- package/styles/treeview/bootstrap.css +1 -1
- package/styles/treeview/bootstrap4.css +1 -1
- package/styles/treeview/bootstrap5-dark.css +1 -1
- package/styles/treeview/bootstrap5.3.css +1 -1
- package/styles/treeview/bootstrap5.css +1 -1
- package/styles/treeview/fabric-dark.css +1 -1
- package/styles/treeview/fabric.css +1 -1
- package/styles/treeview/fluent-dark.css +1 -1
- package/styles/treeview/fluent.css +1 -1
- package/styles/treeview/fluent2.css +1 -1
- package/styles/treeview/highcontrast-light.css +1 -1
- package/styles/treeview/highcontrast.css +1 -1
- package/styles/treeview/material-dark.css +1 -1
- package/styles/treeview/material.css +1 -1
- package/styles/treeview/material3-dark.css +1 -1
- package/styles/treeview/material3.css +1 -1
- package/styles/treeview/tailwind-dark.css +1 -1
- package/styles/treeview/tailwind.css +1 -1
- package/styles/treeview/tailwind3.css +1 -1
- package/dist/ts/accordion/accordion-model.d.ts +0 -285
- package/dist/ts/accordion/accordion.d.ts +0 -458
- package/dist/ts/accordion/accordion.ts +0 -1580
- package/dist/ts/accordion/index.d.ts +0 -5
- package/dist/ts/accordion/index.ts +0 -5
- package/dist/ts/appbar/appbar-model.d.ts +0 -76
- package/dist/ts/appbar/appbar.d.ts +0 -115
- package/dist/ts/appbar/appbar.ts +0 -281
- package/dist/ts/appbar/index.d.ts +0 -3
- package/dist/ts/appbar/index.ts +0 -3
- package/dist/ts/breadcrumb/breadcrumb-model.d.ts +0 -170
- package/dist/ts/breadcrumb/breadcrumb.d.ts +0 -297
- package/dist/ts/breadcrumb/breadcrumb.ts +0 -959
- package/dist/ts/breadcrumb/index.d.ts +0 -5
- package/dist/ts/breadcrumb/index.ts +0 -5
- package/dist/ts/carousel/carousel-model.d.ts +0 -282
- package/dist/ts/carousel/carousel.d.ts +0 -439
- package/dist/ts/carousel/carousel.ts +0 -1633
- package/dist/ts/carousel/index.d.ts +0 -3
- package/dist/ts/carousel/index.ts +0 -3
- package/dist/ts/common/h-scroll-model.d.ts +0 -16
- package/dist/ts/common/h-scroll.d.ts +0 -105
- package/dist/ts/common/h-scroll.ts +0 -481
- package/dist/ts/common/index.d.ts +0 -9
- package/dist/ts/common/index.ts +0 -10
- package/dist/ts/common/menu-base-model.d.ts +0 -308
- package/dist/ts/common/menu-base.d.ts +0 -558
- package/dist/ts/common/menu-base.ts +0 -2736
- package/dist/ts/common/menu-scroll.d.ts +0 -29
- package/dist/ts/common/menu-scroll.ts +0 -105
- package/dist/ts/common/v-scroll-model.d.ts +0 -16
- package/dist/ts/common/v-scroll.d.ts +0 -106
- package/dist/ts/common/v-scroll.ts +0 -454
- package/dist/ts/context-menu/context-menu-model.d.ts +0 -47
- package/dist/ts/context-menu/context-menu.d.ts +0 -102
- package/dist/ts/context-menu/context-menu.ts +0 -165
- package/dist/ts/context-menu/index.d.ts +0 -5
- package/dist/ts/context-menu/index.ts +0 -5
- package/dist/ts/index.d.ts +0 -16
- package/dist/ts/index.ts +0 -16
- package/dist/ts/menu/index.d.ts +0 -5
- package/dist/ts/menu/index.ts +0 -5
- package/dist/ts/menu/menu-model.d.ts +0 -70
- package/dist/ts/menu/menu.d.ts +0 -127
- package/dist/ts/menu/menu.ts +0 -313
- package/dist/ts/sidebar/index.d.ts +0 -5
- package/dist/ts/sidebar/index.ts +0 -5
- package/dist/ts/sidebar/sidebar-model.d.ts +0 -200
- package/dist/ts/sidebar/sidebar.d.ts +0 -336
- package/dist/ts/sidebar/sidebar.ts +0 -907
- package/dist/ts/stepper/index.d.ts +0 -3
- package/dist/ts/stepper/index.ts +0 -3
- package/dist/ts/stepper/stepper-model.d.ts +0 -159
- package/dist/ts/stepper/stepper.d.ts +0 -381
- package/dist/ts/stepper/stepper.ts +0 -1350
- package/dist/ts/stepper-base/index.d.ts +0 -5
- package/dist/ts/stepper-base/index.ts +0 -6
- package/dist/ts/stepper-base/stepper-base-model.d.ts +0 -124
- package/dist/ts/stepper-base/stepper-base.d.ts +0 -187
- package/dist/ts/stepper-base/stepper-base.ts +0 -290
- package/dist/ts/tab/index.d.ts +0 -5
- package/dist/ts/tab/index.ts +0 -5
- package/dist/ts/tab/tab-model.d.ts +0 -408
- package/dist/ts/tab/tab.d.ts +0 -715
- package/dist/ts/tab/tab.ts +0 -2842
- package/dist/ts/toolbar/index.d.ts +0 -5
- package/dist/ts/toolbar/index.ts +0 -5
- package/dist/ts/toolbar/toolbar-model.d.ts +0 -294
- package/dist/ts/toolbar/toolbar.d.ts +0 -541
- package/dist/ts/toolbar/toolbar.ts +0 -2646
- package/dist/ts/treeview/index.d.ts +0 -5
- package/dist/ts/treeview/index.ts +0 -5
- package/dist/ts/treeview/treeview-model.d.ts +0 -637
- package/dist/ts/treeview/treeview.d.ts +0 -1518
- package/dist/ts/treeview/treeview.ts +0 -6780
|
@@ -1,1518 +0,0 @@
|
|
|
1
|
-
import { Component, EmitType } from '@syncfusion/ej2-base';
|
|
2
|
-
import { INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';
|
|
3
|
-
import { KeyboardEventArgs } from '@syncfusion/ej2-base';
|
|
4
|
-
import { Effect } from '@syncfusion/ej2-base';
|
|
5
|
-
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
6
|
-
import { TapEventArgs } from '@syncfusion/ej2-base';
|
|
7
|
-
import { TreeViewModel, FieldsSettingsModel, NodeAnimationSettingsModel, ActionSettingsModel } from './treeview-model';
|
|
8
|
-
/**
|
|
9
|
-
* Interface for NodeExpand event arguments.
|
|
10
|
-
*/
|
|
11
|
-
export interface NodeExpandEventArgs {
|
|
12
|
-
/**
|
|
13
|
-
* If you want to cancel this event then, set cancel as true. Otherwise, false.
|
|
14
|
-
*/
|
|
15
|
-
cancel: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* If the event is triggered by interaction, it returns true. Otherwise, it returns false.
|
|
18
|
-
*/
|
|
19
|
-
isInteracted: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Return the expanded/collapsed TreeView node.
|
|
22
|
-
*/
|
|
23
|
-
node: HTMLLIElement;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* Return the expanded/collapsed node as JSON object from data source.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
nodeData: {
|
|
31
|
-
[key: string]: Object;
|
|
32
|
-
};
|
|
33
|
-
event: MouseEvent | KeyboardEventArgs | TapEventArgs;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Interface for NodeSelect event arguments.
|
|
37
|
-
*/
|
|
38
|
-
export interface NodeSelectEventArgs {
|
|
39
|
-
/**
|
|
40
|
-
* Return the name of action like select or un-select.
|
|
41
|
-
*/
|
|
42
|
-
action: string;
|
|
43
|
-
/**
|
|
44
|
-
* If you want to cancel this event then, set cancel as true. Otherwise, false.
|
|
45
|
-
*/
|
|
46
|
-
cancel: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* If the event is triggered by interaction, it returns true. Otherwise, it returns false.
|
|
49
|
-
*/
|
|
50
|
-
isInteracted: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Return the currently selected TreeView node.
|
|
53
|
-
*/
|
|
54
|
-
node: HTMLLIElement;
|
|
55
|
-
/**
|
|
56
|
-
* Return the currently selected node as JSON object from data source.
|
|
57
|
-
*
|
|
58
|
-
*/
|
|
59
|
-
nodeData: {
|
|
60
|
-
[key: string]: Object;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Interface for NodeCheck event arguments.
|
|
65
|
-
*/
|
|
66
|
-
export interface NodeCheckEventArgs {
|
|
67
|
-
/**
|
|
68
|
-
* Return the name of action like check or un-check.
|
|
69
|
-
*/
|
|
70
|
-
action: string;
|
|
71
|
-
/**
|
|
72
|
-
* If you want to cancel this event then, set cancel as true. Otherwise, false.
|
|
73
|
-
*/
|
|
74
|
-
cancel: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* If the event is triggered by interaction, it returns true. Otherwise, it returns false.
|
|
77
|
-
*/
|
|
78
|
-
isInteracted: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Return the currently checked TreeView node.
|
|
81
|
-
*/
|
|
82
|
-
node: HTMLLIElement;
|
|
83
|
-
/**
|
|
84
|
-
* Return the currently checked node as JSON object from data source.
|
|
85
|
-
*
|
|
86
|
-
*/
|
|
87
|
-
data: {
|
|
88
|
-
[key: string]: Object;
|
|
89
|
-
}[];
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Interface for NodeEdit event arguments.
|
|
93
|
-
*/
|
|
94
|
-
export interface NodeEditEventArgs {
|
|
95
|
-
/**
|
|
96
|
-
* If you want to cancel this event then, set cancel as true. Otherwise, false.
|
|
97
|
-
*/
|
|
98
|
-
cancel: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Return the current TreeView node new text.
|
|
101
|
-
*/
|
|
102
|
-
newText: string;
|
|
103
|
-
/**
|
|
104
|
-
* Return the current TreeView node.
|
|
105
|
-
*/
|
|
106
|
-
node: HTMLLIElement;
|
|
107
|
-
/**
|
|
108
|
-
* Return the current node as JSON object from data source.
|
|
109
|
-
*
|
|
110
|
-
*/
|
|
111
|
-
nodeData: {
|
|
112
|
-
[key: string]: Object;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Return the current TreeView node old text.
|
|
116
|
-
*/
|
|
117
|
-
oldText: string;
|
|
118
|
-
/**
|
|
119
|
-
* Gets or sets the inner HTML of TreeView node while editing.
|
|
120
|
-
*/
|
|
121
|
-
innerHtml: string;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Interface for DragAndDrop event arguments.
|
|
125
|
-
*/
|
|
126
|
-
export interface DragAndDropEventArgs {
|
|
127
|
-
/**
|
|
128
|
-
* If you want to cancel this event then, set cancel as true. Otherwise, false.
|
|
129
|
-
*/
|
|
130
|
-
cancel: boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Return the cloned element
|
|
133
|
-
*/
|
|
134
|
-
clonedNode: HTMLElement;
|
|
135
|
-
/**
|
|
136
|
-
* Return the actual event.
|
|
137
|
-
*/
|
|
138
|
-
event: MouseEvent & TouchEvent;
|
|
139
|
-
/**
|
|
140
|
-
* Return the currently dragged TreeView node.
|
|
141
|
-
*/
|
|
142
|
-
draggedNode: HTMLLIElement;
|
|
143
|
-
/**
|
|
144
|
-
* Return the currently dragged node as array of JSON object from data source.
|
|
145
|
-
*
|
|
146
|
-
*/
|
|
147
|
-
draggedNodeData: {
|
|
148
|
-
[key: string]: Object;
|
|
149
|
-
};
|
|
150
|
-
/**
|
|
151
|
-
* Returns the dragged/dropped element's target index position
|
|
152
|
-
*
|
|
153
|
-
*/
|
|
154
|
-
dropIndex: number;
|
|
155
|
-
/**
|
|
156
|
-
* Returns the dragged/dropped element's target level
|
|
157
|
-
*
|
|
158
|
-
*/
|
|
159
|
-
dropLevel: number;
|
|
160
|
-
/**
|
|
161
|
-
* Return the dragged element's source parent
|
|
162
|
-
*/
|
|
163
|
-
draggedParentNode: Element;
|
|
164
|
-
/**
|
|
165
|
-
* Return the dragged element's destination parent
|
|
166
|
-
*/
|
|
167
|
-
dropTarget: Element;
|
|
168
|
-
/**
|
|
169
|
-
* Return the cloned element's drop status icon while dragging
|
|
170
|
-
*/
|
|
171
|
-
dropIndicator: string;
|
|
172
|
-
/**
|
|
173
|
-
* Return the dropped TreeView node.
|
|
174
|
-
*/
|
|
175
|
-
droppedNode: HTMLLIElement;
|
|
176
|
-
/**
|
|
177
|
-
* Return the dropped node as array of JSON object from data source.
|
|
178
|
-
*
|
|
179
|
-
*/
|
|
180
|
-
droppedNodeData: {
|
|
181
|
-
[key: string]: Object;
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Return the target element from which drag starts/end.
|
|
185
|
-
*/
|
|
186
|
-
target: HTMLElement;
|
|
187
|
-
/**
|
|
188
|
-
* Return boolean value for preventing auto-expanding of parent node.
|
|
189
|
-
*/
|
|
190
|
-
preventTargetExpand?: boolean;
|
|
191
|
-
/**
|
|
192
|
-
* Denotes the cloned element's drop position relative to the dropped node while dragging. The available values are,
|
|
193
|
-
* 1. Inside – Denotes that the cloned element will be appended as the child node of the dropped node.
|
|
194
|
-
* 2. Before - Denotes that the cloned element will be appended before the dropped node.
|
|
195
|
-
* 3. After - Denotes that the cloned element will be appended after the dropped node.
|
|
196
|
-
*/
|
|
197
|
-
position: string;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Interface for DrawNode event arguments.
|
|
201
|
-
*/
|
|
202
|
-
export interface DrawNodeEventArgs {
|
|
203
|
-
/**
|
|
204
|
-
* Return the current rendering node.
|
|
205
|
-
*/
|
|
206
|
-
node: HTMLLIElement;
|
|
207
|
-
/**
|
|
208
|
-
* Return the current rendering node as JSON object.
|
|
209
|
-
*
|
|
210
|
-
* @isGenericType true
|
|
211
|
-
*/
|
|
212
|
-
nodeData: {
|
|
213
|
-
[key: string]: Object;
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* Return the current rendering node text.
|
|
217
|
-
*/
|
|
218
|
-
text: string;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Interface for NodeClick event arguments.
|
|
222
|
-
*/
|
|
223
|
-
export interface NodeClickEventArgs {
|
|
224
|
-
/**
|
|
225
|
-
* Return the actual event.
|
|
226
|
-
*/
|
|
227
|
-
event: MouseEvent;
|
|
228
|
-
/**
|
|
229
|
-
* Return the current clicked TreeView node.
|
|
230
|
-
*/
|
|
231
|
-
node: HTMLLIElement;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Interface for NodeKeyPress event arguments.
|
|
235
|
-
*/
|
|
236
|
-
export interface NodeKeyPressEventArgs {
|
|
237
|
-
/**
|
|
238
|
-
* If you want to cancel this event then, set cancel as true. Otherwise, false.
|
|
239
|
-
*/
|
|
240
|
-
cancel: boolean;
|
|
241
|
-
/**
|
|
242
|
-
* Return the actual event.
|
|
243
|
-
*
|
|
244
|
-
*/
|
|
245
|
-
event: KeyboardEventArgs;
|
|
246
|
-
/**
|
|
247
|
-
* Return the current active TreeView node.
|
|
248
|
-
*/
|
|
249
|
-
node: HTMLLIElement;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Interface for DataBound event arguments.
|
|
253
|
-
*/
|
|
254
|
-
export interface DataBoundEventArgs {
|
|
255
|
-
/**
|
|
256
|
-
* Return the TreeView data.
|
|
257
|
-
*
|
|
258
|
-
* @isGenericType true
|
|
259
|
-
*/
|
|
260
|
-
data: {
|
|
261
|
-
[key: string]: Object;
|
|
262
|
-
}[];
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Interface for DataSourceChanged event arguments.
|
|
266
|
-
*/
|
|
267
|
-
export interface DataSourceChangedEventArgs {
|
|
268
|
-
/**
|
|
269
|
-
* Return the updated TreeView data. The data source will be updated after performing some operation like
|
|
270
|
-
* drag and drop, node editing, adding and removing node. If you want to get updated data source after performing operation like
|
|
271
|
-
* selecting/unSelecting, checking/unChecking, expanding/collapsing the node, then you can use getTreeData method.
|
|
272
|
-
*
|
|
273
|
-
* @isGenericType true
|
|
274
|
-
*/
|
|
275
|
-
data: {
|
|
276
|
-
[key: string]: Object;
|
|
277
|
-
}[];
|
|
278
|
-
/**
|
|
279
|
-
* Return the action which triggers the event
|
|
280
|
-
*
|
|
281
|
-
*/
|
|
282
|
-
action: string;
|
|
283
|
-
/**
|
|
284
|
-
* Return the new node data of updated data source
|
|
285
|
-
*
|
|
286
|
-
*/
|
|
287
|
-
nodeData: {
|
|
288
|
-
[key: string]: Object;
|
|
289
|
-
}[];
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Interface that holds the node details.
|
|
293
|
-
*/
|
|
294
|
-
export interface NodeData {
|
|
295
|
-
/**
|
|
296
|
-
* Specifies the ID field mapped in dataSource.
|
|
297
|
-
*/
|
|
298
|
-
id: string;
|
|
299
|
-
/**
|
|
300
|
-
* Specifies the mapping field for text displayed as TreeView node's display text.
|
|
301
|
-
*/
|
|
302
|
-
text: string;
|
|
303
|
-
/**
|
|
304
|
-
* Specifies the parent ID field mapped in dataSource.
|
|
305
|
-
*/
|
|
306
|
-
parentID: string;
|
|
307
|
-
/**
|
|
308
|
-
* Specifies the mapping field for selected state of the TreeView node.
|
|
309
|
-
*/
|
|
310
|
-
selected: boolean;
|
|
311
|
-
/**
|
|
312
|
-
* Specifies the mapping field for expand state of the TreeView node.
|
|
313
|
-
*/
|
|
314
|
-
expanded: boolean;
|
|
315
|
-
/**
|
|
316
|
-
* Specifies the field for checked state of the TreeView node.
|
|
317
|
-
*/
|
|
318
|
-
isChecked: string;
|
|
319
|
-
/**
|
|
320
|
-
* Specifies the mapping field for hasChildren to check whether a node has child nodes or not.
|
|
321
|
-
*/
|
|
322
|
-
hasChildren: boolean;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Interface for Failure event arguments
|
|
326
|
-
*/
|
|
327
|
-
export interface FailureEventArgs {
|
|
328
|
-
/** Defines the error information. */
|
|
329
|
-
error?: Error;
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Configures the fields to bind to the properties of node in the TreeView component.
|
|
333
|
-
*/
|
|
334
|
-
export declare class FieldsSettings extends ChildProperty<FieldsSettings> {
|
|
335
|
-
/**
|
|
336
|
-
* Binds the field settings for child nodes or mapping field for nested nodes objects that contain array of JSON objects.
|
|
337
|
-
*/
|
|
338
|
-
child: string | FieldsSettingsModel;
|
|
339
|
-
/**
|
|
340
|
-
* Specifies the array of JavaScript objects or instance of DataManager to populate the nodes.
|
|
341
|
-
*
|
|
342
|
-
* @default []
|
|
343
|
-
* @aspDatasourceNullIgnore
|
|
344
|
-
* @isGenericType true
|
|
345
|
-
*/
|
|
346
|
-
dataSource: DataManager | {
|
|
347
|
-
[key: string]: Object;
|
|
348
|
-
}[];
|
|
349
|
-
/**
|
|
350
|
-
* Specifies the mapping field for expand state of the TreeView node.
|
|
351
|
-
*/
|
|
352
|
-
expanded: string;
|
|
353
|
-
/**
|
|
354
|
-
* Specifies the mapping field for hasChildren to check whether a node has child nodes or not.
|
|
355
|
-
*/
|
|
356
|
-
hasChildren: string;
|
|
357
|
-
/**
|
|
358
|
-
* Specifies the mapping field for htmlAttributes to be added to the TreeView node.
|
|
359
|
-
*/
|
|
360
|
-
htmlAttributes: string;
|
|
361
|
-
/**
|
|
362
|
-
* Specifies the mapping field for icon class of each TreeView node that will be added before the text.
|
|
363
|
-
*/
|
|
364
|
-
iconCss: string;
|
|
365
|
-
/**
|
|
366
|
-
* Specifies the ID field mapped in dataSource.
|
|
367
|
-
*/
|
|
368
|
-
id: string;
|
|
369
|
-
/**
|
|
370
|
-
* Specifies the mapping field for image URL of each TreeView node where image will be added before the text.
|
|
371
|
-
*/
|
|
372
|
-
imageUrl: string;
|
|
373
|
-
/**
|
|
374
|
-
* Specifies the field for checked state of the TreeView node.
|
|
375
|
-
*/
|
|
376
|
-
isChecked: string;
|
|
377
|
-
/**
|
|
378
|
-
* Specifies the parent ID field mapped in dataSource.
|
|
379
|
-
*/
|
|
380
|
-
parentID: string;
|
|
381
|
-
/**
|
|
382
|
-
* Defines the external [`Query`](https://ej2.syncfusion.com/documentation/api/data/query/)
|
|
383
|
-
* that will execute along with data processing.
|
|
384
|
-
*
|
|
385
|
-
* @default null
|
|
386
|
-
*/
|
|
387
|
-
query: Query;
|
|
388
|
-
/**
|
|
389
|
-
* Specifies whether the node can be selected by users or not
|
|
390
|
-
* When set to false, the user interaction is prevented for the corresponding node.
|
|
391
|
-
*/
|
|
392
|
-
selectable: string;
|
|
393
|
-
/**
|
|
394
|
-
* Specifies the mapping field for selected state of the TreeView node.
|
|
395
|
-
*/
|
|
396
|
-
selected: string;
|
|
397
|
-
/**
|
|
398
|
-
* Specifies the table name used to fetch data from a specific table in the server.
|
|
399
|
-
*/
|
|
400
|
-
tableName: string;
|
|
401
|
-
/**
|
|
402
|
-
* Specifies the mapping field for text displayed as TreeView node's display text.
|
|
403
|
-
*/
|
|
404
|
-
text: string;
|
|
405
|
-
/**
|
|
406
|
-
* Specifies the mapping field for tooltip that will be displayed as hovering text of the TreeView node.
|
|
407
|
-
*/
|
|
408
|
-
tooltip: string;
|
|
409
|
-
/**
|
|
410
|
-
* Specifies the mapping field for navigateUrl to be added as hyper-link of the TreeView node.
|
|
411
|
-
*/
|
|
412
|
-
navigateUrl: string;
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* Defines the expand type of the TreeView node.
|
|
416
|
-
* ```props
|
|
417
|
-
* Auto :- The expand/collapse operation happens when you double-click on the node in desktop.
|
|
418
|
-
* Click :- The expand/collapse operation happens when you single-click on the node in desktop.
|
|
419
|
-
* DblClick :- The expand/collapse operation happens when you double-click on the node in desktop.
|
|
420
|
-
* None :- The expand/collapse operation will not happen.
|
|
421
|
-
* ```
|
|
422
|
-
*/
|
|
423
|
-
export declare type ExpandOnSettings = 'Auto' | 'Click' | 'DblClick' | 'None';
|
|
424
|
-
/**
|
|
425
|
-
* Defines the sorting order type for TreeView.
|
|
426
|
-
* ```props
|
|
427
|
-
* None :- Indicates that the nodes are not sorted.
|
|
428
|
-
* Ascending :- Indicates that the nodes are sorted in the ascending order.
|
|
429
|
-
* Descending :- Indicates that the nodes are sorted in the descending order
|
|
430
|
-
* ```
|
|
431
|
-
*/
|
|
432
|
-
export declare type SortOrder = 'None' | 'Ascending' | 'Descending';
|
|
433
|
-
/**
|
|
434
|
-
* Configures animation settings for the TreeView component.
|
|
435
|
-
*/
|
|
436
|
-
export declare class ActionSettings extends ChildProperty<ActionSettings> {
|
|
437
|
-
/**
|
|
438
|
-
* Specifies the type of animation.
|
|
439
|
-
*
|
|
440
|
-
* @default 'SlideDown'
|
|
441
|
-
*/
|
|
442
|
-
effect: Effect;
|
|
443
|
-
/**
|
|
444
|
-
* Specifies the duration to animate.
|
|
445
|
-
*
|
|
446
|
-
* @default 400
|
|
447
|
-
*/
|
|
448
|
-
duration: number;
|
|
449
|
-
/**
|
|
450
|
-
* Specifies the animation timing function.
|
|
451
|
-
*
|
|
452
|
-
* @default 'linear'
|
|
453
|
-
*/
|
|
454
|
-
easing: string;
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* Configures the animation settings for expanding and collapsing nodes in TreeView.
|
|
458
|
-
*/
|
|
459
|
-
export declare class NodeAnimationSettings extends ChildProperty<NodeAnimationSettings> {
|
|
460
|
-
/**
|
|
461
|
-
* Specifies the animation that applies on collapsing the nodes.
|
|
462
|
-
*
|
|
463
|
-
* @default { effect: 'SlideUp', duration: 400, easing: 'linear' }
|
|
464
|
-
*/
|
|
465
|
-
collapse: ActionSettingsModel;
|
|
466
|
-
/**
|
|
467
|
-
* Specifies the animation that applies on expanding the nodes.
|
|
468
|
-
*
|
|
469
|
-
* @default { effect: 'SlideDown', duration: 400, easing: 'linear' }
|
|
470
|
-
*/
|
|
471
|
-
expand: ActionSettingsModel;
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* The TreeView component is used to represent hierarchical data in a tree like structure with advanced
|
|
475
|
-
* functions to perform edit, drag and drop, selection with check-box, and more.
|
|
476
|
-
* ```html
|
|
477
|
-
* <div id="tree"></div>
|
|
478
|
-
* ```
|
|
479
|
-
* ```typescript
|
|
480
|
-
* let treeObj: TreeView = new TreeView();
|
|
481
|
-
* treeObj.appendTo('#tree');
|
|
482
|
-
* ```
|
|
483
|
-
*/
|
|
484
|
-
export declare class TreeView extends Component<HTMLElement> implements INotifyPropertyChanged {
|
|
485
|
-
private initialRender;
|
|
486
|
-
private treeData;
|
|
487
|
-
private rootData;
|
|
488
|
-
private groupedData;
|
|
489
|
-
private ulElement;
|
|
490
|
-
private listBaseOption;
|
|
491
|
-
private dataType;
|
|
492
|
-
private rippleFn;
|
|
493
|
-
private rippleIconFn;
|
|
494
|
-
private isNumberTypeId;
|
|
495
|
-
private expandOnType;
|
|
496
|
-
private keyboardModule;
|
|
497
|
-
private liList;
|
|
498
|
-
private aniObj;
|
|
499
|
-
private treeList;
|
|
500
|
-
private isLoaded;
|
|
501
|
-
private expandArgs;
|
|
502
|
-
private oldText;
|
|
503
|
-
private dragObj;
|
|
504
|
-
private dropObj;
|
|
505
|
-
private dragTarget;
|
|
506
|
-
private dragLi;
|
|
507
|
-
private dragData;
|
|
508
|
-
private startNode;
|
|
509
|
-
private nodeTemplateFn;
|
|
510
|
-
private currentLoadData;
|
|
511
|
-
private checkActionNodes;
|
|
512
|
-
private touchEditObj;
|
|
513
|
-
private touchClickObj;
|
|
514
|
-
private dragStartAction;
|
|
515
|
-
private touchExpandObj;
|
|
516
|
-
private inputObj;
|
|
517
|
-
private isAnimate;
|
|
518
|
-
private touchClass;
|
|
519
|
-
private editData;
|
|
520
|
-
private editFields;
|
|
521
|
-
private refreshData;
|
|
522
|
-
private isRefreshed;
|
|
523
|
-
private keyConfigs;
|
|
524
|
-
private isInitalExpand;
|
|
525
|
-
private index;
|
|
526
|
-
private preventExpand;
|
|
527
|
-
private hasPid;
|
|
528
|
-
private dragParent;
|
|
529
|
-
private checkedElement;
|
|
530
|
-
private ele;
|
|
531
|
-
private disableNode;
|
|
532
|
-
private onLoaded;
|
|
533
|
-
private parentNodeCheck;
|
|
534
|
-
private parentCheckData;
|
|
535
|
-
private validArr;
|
|
536
|
-
private validNodes;
|
|
537
|
-
private expandChildren;
|
|
538
|
-
private isFieldChange;
|
|
539
|
-
private changeDataSource;
|
|
540
|
-
private isOffline;
|
|
541
|
-
private firstTap;
|
|
542
|
-
private hasTemplate;
|
|
543
|
-
private isFirstRender;
|
|
544
|
-
private isBatchMode;
|
|
545
|
-
private batchParentNode;
|
|
546
|
-
private isNodeDropped;
|
|
547
|
-
private isInteracted;
|
|
548
|
-
private isRightClick;
|
|
549
|
-
private mouseDownStatus;
|
|
550
|
-
private isDropIn;
|
|
551
|
-
private DDTTreeData;
|
|
552
|
-
private OldCheckedData;
|
|
553
|
-
private isHiddenItem;
|
|
554
|
-
/**
|
|
555
|
-
* Indicates whether the TreeView allows drag and drop of nodes. To drag and drop a node in
|
|
556
|
-
* desktop, hold the mouse on the node, drag it to the target node and drop the node by releasing
|
|
557
|
-
* the mouse. For touch devices, drag and drop operation is performed by touch, touch move
|
|
558
|
-
* and touch end. For more information on drag and drop nodes concept, refer to
|
|
559
|
-
* [Drag and Drop](../../treeview/drag-and-drop/).
|
|
560
|
-
*
|
|
561
|
-
* @default false
|
|
562
|
-
*/
|
|
563
|
-
allowDragAndDrop: boolean;
|
|
564
|
-
/**
|
|
565
|
-
* Enables or disables editing of the text in the TreeView node. When `allowEditing` property is set
|
|
566
|
-
* to true, the TreeView allows you to edit the node by double clicking the node or by navigating to
|
|
567
|
-
* the node and pressing **F2** key. For more information on node editing, refer
|
|
568
|
-
* to [Node Editing](../../treeview/node-editing/).
|
|
569
|
-
*
|
|
570
|
-
* @default false
|
|
571
|
-
*/
|
|
572
|
-
allowEditing: boolean;
|
|
573
|
-
/**
|
|
574
|
-
* Enables or disables multi-selection of nodes. To select multiple nodes:
|
|
575
|
-
* * Select the nodes by holding down the **Ctrl** key while clicking on the nodes.
|
|
576
|
-
* * Select consecutive nodes by clicking the first node to select and hold down the **Shift** key
|
|
577
|
-
* and click the last node to select.
|
|
578
|
-
*
|
|
579
|
-
* For more information on multi-selection, refer to
|
|
580
|
-
* [Multi-Selection](../../treeview/multiple-selection/).
|
|
581
|
-
*
|
|
582
|
-
* @default false
|
|
583
|
-
*/
|
|
584
|
-
allowMultiSelection: boolean;
|
|
585
|
-
/**
|
|
586
|
-
* Enables or disables text wrapping when text exceeds the bounds in the TreeView node.
|
|
587
|
-
* When the allowTextWrap property is set to true, the TreeView node text content will wrap to the next line
|
|
588
|
-
* when it exceeds the width of the TreeView node.
|
|
589
|
-
* The TreeView node height will be adjusted automatically based on the TreeView node content.
|
|
590
|
-
*
|
|
591
|
-
* @default false
|
|
592
|
-
*/
|
|
593
|
-
allowTextWrap: boolean;
|
|
594
|
-
/**
|
|
595
|
-
* Specifies the type of animation applied on expanding and collapsing the nodes along with duration.
|
|
596
|
-
*
|
|
597
|
-
* @default {expand: { effect: 'SlideDown', duration: 400, easing: 'linear' },
|
|
598
|
-
* collapse: { effect: 'SlideUp', duration: 400, easing: 'linear' }}
|
|
599
|
-
*/
|
|
600
|
-
animation: NodeAnimationSettingsModel;
|
|
601
|
-
/**
|
|
602
|
-
* The `checkedNodes` property is used to set the nodes that need to be checked.
|
|
603
|
-
* This property returns the checked nodes ID in the TreeView component.
|
|
604
|
-
* The `checkedNodes` property depends upon the value of `showCheckBox` property.
|
|
605
|
-
* For more information on checkedNodes, refer to
|
|
606
|
-
* [checkedNodes](../../treeview/check-box#checked-nodes).
|
|
607
|
-
* ```html
|
|
608
|
-
* <div id="tree"></div>
|
|
609
|
-
* ```
|
|
610
|
-
* ```typescript
|
|
611
|
-
* let treeObj: TreeView = new TreeView({
|
|
612
|
-
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
613
|
-
* showCheckBox: true,
|
|
614
|
-
* checkedNodes: ['01-01','02']
|
|
615
|
-
* });
|
|
616
|
-
* treeObj.appendTo('#tree');
|
|
617
|
-
* ```
|
|
618
|
-
*
|
|
619
|
-
* @default []
|
|
620
|
-
*/
|
|
621
|
-
checkedNodes: string[];
|
|
622
|
-
/**
|
|
623
|
-
* Determines whether the disabled children will be checked or not if their parent is checked.
|
|
624
|
-
*
|
|
625
|
-
* @default true
|
|
626
|
-
*/
|
|
627
|
-
checkDisabledChildren: boolean;
|
|
628
|
-
/**
|
|
629
|
-
* Specifies one or more than one CSS classes to be added with root element of the TreeView to help customize the appearance of the component.
|
|
630
|
-
* ```html
|
|
631
|
-
* <div id="tree"></div>
|
|
632
|
-
* ```
|
|
633
|
-
* ```typescript
|
|
634
|
-
* let treeObj: TreeView = new TreeView({
|
|
635
|
-
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
636
|
-
* cssClass: 'e-custom e-tree'
|
|
637
|
-
* });
|
|
638
|
-
* treeObj.appendTo('#tree');
|
|
639
|
-
* ```
|
|
640
|
-
* ```css
|
|
641
|
-
* .e-custom .e-tree {
|
|
642
|
-
* max-width: 600px;
|
|
643
|
-
* }
|
|
644
|
-
* .e-custom .e-list-item {
|
|
645
|
-
* padding: 10px 0;
|
|
646
|
-
* }
|
|
647
|
-
* ```
|
|
648
|
-
*
|
|
649
|
-
* @default ''
|
|
650
|
-
*/
|
|
651
|
-
cssClass: string;
|
|
652
|
-
/**
|
|
653
|
-
* Specifies a value that indicates whether the TreeView component is disabled or not.
|
|
654
|
-
* When set to true, user interaction will not be occurred in TreeView.
|
|
655
|
-
*
|
|
656
|
-
* @default false
|
|
657
|
-
*/
|
|
658
|
-
disabled: boolean;
|
|
659
|
-
/**
|
|
660
|
-
* Specifies the target in which the draggable element can be moved and dropped.
|
|
661
|
-
* By default, the draggable element movement occurs in the page.
|
|
662
|
-
* ```html
|
|
663
|
-
* <div id="tree"></div>
|
|
664
|
-
* ```
|
|
665
|
-
* ```typescript
|
|
666
|
-
* let treeObj: TreeView = new TreeView({
|
|
667
|
-
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
668
|
-
* dragArea: '.control_wrapper'
|
|
669
|
-
* });
|
|
670
|
-
* treeObj.appendTo('#tree');
|
|
671
|
-
* ```
|
|
672
|
-
* ```css
|
|
673
|
-
* .control_wrapper {
|
|
674
|
-
* width: 500px;
|
|
675
|
-
* margin-left: 100px;
|
|
676
|
-
* }
|
|
677
|
-
* ```
|
|
678
|
-
*
|
|
679
|
-
* @default null
|
|
680
|
-
*/
|
|
681
|
-
dragArea: HTMLElement | string;
|
|
682
|
-
/**
|
|
683
|
-
* Specifies whether to display or remove the untrusted HTML values in the TreeView component.
|
|
684
|
-
* If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
|
|
685
|
-
* ```html
|
|
686
|
-
* <div id="tree"></div>
|
|
687
|
-
* ```
|
|
688
|
-
* ```typescript
|
|
689
|
-
* let treeObj: TreeView = new TreeView({
|
|
690
|
-
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
691
|
-
* enableHtmlSanitizer: true
|
|
692
|
-
* });
|
|
693
|
-
* treeObj.appendTo('#tree');
|
|
694
|
-
* ```
|
|
695
|
-
*
|
|
696
|
-
* @default true
|
|
697
|
-
*/
|
|
698
|
-
enableHtmlSanitizer: boolean;
|
|
699
|
-
/**
|
|
700
|
-
* Enables or disables persisting TreeView state between page reloads. If enabled, following APIs will persist.
|
|
701
|
-
* 1. `selectedNodes` - Represents the nodes that are selected in the TreeView component.
|
|
702
|
-
* 2. `checkedNodes` - Represents the nodes that are checked in the TreeView component.
|
|
703
|
-
* 3. `expandedNodes` - Represents the nodes that are expanded in the TreeView component.
|
|
704
|
-
*
|
|
705
|
-
* @default false
|
|
706
|
-
*/
|
|
707
|
-
enablePersistence: boolean;
|
|
708
|
-
/**
|
|
709
|
-
* Represents the expanded nodes in the TreeView component. We can set the nodes that need to be
|
|
710
|
-
* expanded or get the ID of the nodes that are currently expanded by using this property.
|
|
711
|
-
* ```html
|
|
712
|
-
* <div id='tree'></div>
|
|
713
|
-
* ```
|
|
714
|
-
* ```typescript
|
|
715
|
-
* <script>
|
|
716
|
-
* var treeObj = new TreeView({
|
|
717
|
-
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
718
|
-
* expandedNodes: ['01','01-01','02']
|
|
719
|
-
* });
|
|
720
|
-
* treeObj.appendTo('#tree');
|
|
721
|
-
* </script>
|
|
722
|
-
* ```
|
|
723
|
-
*
|
|
724
|
-
* @default []
|
|
725
|
-
*/
|
|
726
|
-
expandedNodes: string[];
|
|
727
|
-
/**
|
|
728
|
-
* Specifies the action on which the node expands or collapses.
|
|
729
|
-
* The available actions :
|
|
730
|
-
* `Click` - The expand/collapse operation happens when you single-click on the node in desktop.
|
|
731
|
-
* `DblClick` - The expand/collapse operation happens when you double-click on the node in desktop.
|
|
732
|
-
* `None` - The expand/collapse operation will not happen.
|
|
733
|
-
* In mobile devices, the node expand/collapse action happens on single tap.
|
|
734
|
-
* Here ExpandOn attribute is set to single click property also can use double click and none property.
|
|
735
|
-
* ```html
|
|
736
|
-
* <div id="tree"></div>
|
|
737
|
-
* ```
|
|
738
|
-
* ```typescript
|
|
739
|
-
* let treeObj: TreeView = new TreeView({
|
|
740
|
-
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
741
|
-
* expandOn: 'Click'
|
|
742
|
-
* });
|
|
743
|
-
* treeObj.appendTo('#tree');
|
|
744
|
-
* ```
|
|
745
|
-
*
|
|
746
|
-
* @default 'Auto'
|
|
747
|
-
*/
|
|
748
|
-
expandOn: ExpandOnSettings;
|
|
749
|
-
/**
|
|
750
|
-
* Specifies the data source and mapping fields to render TreeView nodes.
|
|
751
|
-
*
|
|
752
|
-
* @default {id: 'id', text: 'text', dataSource: [], child: 'child', parentID: 'parentID', hasChildren: 'hasChildren',
|
|
753
|
-
* expanded: 'expanded', htmlAttributes: 'htmlAttributes', iconCss: 'iconCss', imageUrl: 'imageUrl', isChecked: 'isChecked',
|
|
754
|
-
* query: null, selected: 'selected', tableName: null, tooltip: 'tooltip', navigateUrl: 'navigateUrl'}
|
|
755
|
-
*/
|
|
756
|
-
fields: FieldsSettingsModel;
|
|
757
|
-
/**
|
|
758
|
-
* On enabling this property, the entire row of the TreeView node gets selected by clicking a node.
|
|
759
|
-
* When disabled only the corresponding node's text gets selected.
|
|
760
|
-
* For more information on Fields concept, refer to
|
|
761
|
-
* [Fields](../../treeview/data-binding#local-data).
|
|
762
|
-
*
|
|
763
|
-
* @default true
|
|
764
|
-
*/
|
|
765
|
-
fullRowSelect: boolean;
|
|
766
|
-
/**
|
|
767
|
-
* By default, the load on demand (Lazy load) is set to true. By disabling this property, all the tree nodes are rendered at the
|
|
768
|
-
* beginning itself.
|
|
769
|
-
*
|
|
770
|
-
* @default true
|
|
771
|
-
*/
|
|
772
|
-
loadOnDemand: boolean;
|
|
773
|
-
/**
|
|
774
|
-
* Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
|
|
775
|
-
*
|
|
776
|
-
* @private
|
|
777
|
-
*/
|
|
778
|
-
locale: string;
|
|
779
|
-
/**
|
|
780
|
-
* Specifies a template to render customized content for all the nodes. If the `nodeTemplate` property
|
|
781
|
-
* is set, the template content overrides the displayed node text. The property accepts template string
|
|
782
|
-
* [template string](https://ej2.syncfusion.com/documentation/common/template-engine/)
|
|
783
|
-
* or HTML element ID holding the content. For more information on template concept, refer to
|
|
784
|
-
* [Template](../../treeview/template/).
|
|
785
|
-
*
|
|
786
|
-
* @default null
|
|
787
|
-
* @angularType string | object
|
|
788
|
-
* @reactType string | function | JSX.Element
|
|
789
|
-
* @vueType string | function
|
|
790
|
-
* @aspType string
|
|
791
|
-
*/
|
|
792
|
-
nodeTemplate: string | Function;
|
|
793
|
-
/**
|
|
794
|
-
* Represents the selected nodes in the TreeView component. We can set the nodes that need to be
|
|
795
|
-
* selected or get the ID of the nodes that are currently selected by using this property.
|
|
796
|
-
* On enabling `allowMultiSelection` property we can select multiple nodes and on disabling
|
|
797
|
-
* it we can select only a single node.
|
|
798
|
-
* For more information on selectedNodes, refer to
|
|
799
|
-
* [selectedNodes](../../treeview/multiple-selection#selected-nodes).
|
|
800
|
-
* ```html
|
|
801
|
-
* <div id="tree"></div>
|
|
802
|
-
* ```
|
|
803
|
-
* ```typescript
|
|
804
|
-
* let treeObj: TreeView = new TreeView({
|
|
805
|
-
* fields: { dataSource: hierarchicalData, id: 'id', text: 'name', child: 'subChild' },
|
|
806
|
-
* allowMultiSelection: true,
|
|
807
|
-
* selectedNodes: ['01','02']
|
|
808
|
-
* });
|
|
809
|
-
* treeObj.appendTo('#tree');
|
|
810
|
-
* ```
|
|
811
|
-
*
|
|
812
|
-
* @default []
|
|
813
|
-
*/
|
|
814
|
-
selectedNodes: string[];
|
|
815
|
-
/**
|
|
816
|
-
* Specifies a value that indicates whether the nodes are sorted in the ascending or descending order,
|
|
817
|
-
* or are not sorted at all. The available types of sort order are,
|
|
818
|
-
* * `None` - The nodes are not sorted.
|
|
819
|
-
* * `Ascending` - The nodes are sorted in the ascending order.
|
|
820
|
-
* * `Descending` - The nodes are sorted in the ascending order.
|
|
821
|
-
*
|
|
822
|
-
* @default 'None'
|
|
823
|
-
*/
|
|
824
|
-
sortOrder: SortOrder;
|
|
825
|
-
/**
|
|
826
|
-
* Indicates that the nodes will display CheckBoxes in the TreeView.
|
|
827
|
-
* The CheckBox will be displayed next to the expand/collapse icon of the node. For more information on CheckBoxes, refer to
|
|
828
|
-
* [CheckBox](../../treeview/check-box/).
|
|
829
|
-
*
|
|
830
|
-
* @default false
|
|
831
|
-
*/
|
|
832
|
-
showCheckBox: boolean;
|
|
833
|
-
/**
|
|
834
|
-
* Specifies whether the item should be checked or unchecked when the node is clicked.
|
|
835
|
-
*
|
|
836
|
-
* @default false
|
|
837
|
-
*/
|
|
838
|
-
checkOnClick: boolean;
|
|
839
|
-
/**
|
|
840
|
-
* Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node.
|
|
841
|
-
*
|
|
842
|
-
* @default true
|
|
843
|
-
*/
|
|
844
|
-
autoCheck: boolean;
|
|
845
|
-
/**
|
|
846
|
-
* If this property is set to true, then the entire TreeView node will be navigate-able instead of text element.
|
|
847
|
-
*
|
|
848
|
-
* @default false
|
|
849
|
-
*/
|
|
850
|
-
fullRowNavigable: boolean;
|
|
851
|
-
/**
|
|
852
|
-
* Event callback that is raised while any TreeView action failed to fetch the desired results.
|
|
853
|
-
*
|
|
854
|
-
* @event actionFailure
|
|
855
|
-
*/
|
|
856
|
-
actionFailure: EmitType<FailureEventArgs>;
|
|
857
|
-
/**
|
|
858
|
-
* Event callback that is raised when the TreeView component is created successfully.
|
|
859
|
-
*
|
|
860
|
-
* @event created
|
|
861
|
-
*/
|
|
862
|
-
created: EmitType<Object>;
|
|
863
|
-
/**
|
|
864
|
-
* Event callback that is raised when data source is populated in the TreeView.
|
|
865
|
-
*
|
|
866
|
-
* @event dataBound
|
|
867
|
-
*/
|
|
868
|
-
dataBound: EmitType<DataBoundEventArgs>;
|
|
869
|
-
/**
|
|
870
|
-
* Event callback that is raised when data source is changed in the TreeView. The data source will be changed after performing some operation like
|
|
871
|
-
* drag and drop, node editing, adding and removing node.
|
|
872
|
-
*
|
|
873
|
-
* @event dataSourceChanged
|
|
874
|
-
*/
|
|
875
|
-
dataSourceChanged: EmitType<DataSourceChangedEventArgs>;
|
|
876
|
-
/**
|
|
877
|
-
* Event callback that is raised before the TreeView node is appended to the TreeView element. It helps to customize specific nodes.
|
|
878
|
-
*
|
|
879
|
-
* @event drawNode
|
|
880
|
-
*/
|
|
881
|
-
drawNode: EmitType<DrawNodeEventArgs>;
|
|
882
|
-
/**
|
|
883
|
-
* Event callback that is raised when the TreeView control is destroyed successfully.
|
|
884
|
-
*
|
|
885
|
-
* @event destroyed
|
|
886
|
-
*/
|
|
887
|
-
destroyed: EmitType<Object>;
|
|
888
|
-
/**
|
|
889
|
-
* Event callback that is raised when key press is successful. It helps to customize the operations at key press.
|
|
890
|
-
*
|
|
891
|
-
* @event keyPress
|
|
892
|
-
*/
|
|
893
|
-
keyPress: EmitType<NodeKeyPressEventArgs>;
|
|
894
|
-
/**
|
|
895
|
-
* Event callback that is raised when the TreeView node is checked/unchecked successfully.
|
|
896
|
-
*
|
|
897
|
-
* @event nodeChecked
|
|
898
|
-
*/
|
|
899
|
-
nodeChecked: EmitType<NodeCheckEventArgs>;
|
|
900
|
-
/**
|
|
901
|
-
* Event callback that is raised before the TreeView node is to be checked/unchecked.
|
|
902
|
-
*
|
|
903
|
-
* @event nodeChecking
|
|
904
|
-
*/
|
|
905
|
-
nodeChecking: EmitType<NodeCheckEventArgs>;
|
|
906
|
-
/**
|
|
907
|
-
* Event callback that is raised when the TreeView node is clicked successfully.
|
|
908
|
-
*
|
|
909
|
-
* @event nodeClicked
|
|
910
|
-
*/
|
|
911
|
-
nodeClicked: EmitType<NodeClickEventArgs>;
|
|
912
|
-
/**
|
|
913
|
-
* Event callback that is raised when the TreeView node collapses successfully.
|
|
914
|
-
*
|
|
915
|
-
* @event nodeCollapsed
|
|
916
|
-
*/
|
|
917
|
-
nodeCollapsed: EmitType<NodeExpandEventArgs>;
|
|
918
|
-
/**
|
|
919
|
-
* Event callback that is raised before the TreeView node collapses.
|
|
920
|
-
*
|
|
921
|
-
* @event nodeCollapsing
|
|
922
|
-
*/
|
|
923
|
-
nodeCollapsing: EmitType<NodeExpandEventArgs>;
|
|
924
|
-
/**
|
|
925
|
-
* Event callback that is raised when the TreeView node is dragged (moved) continuously.
|
|
926
|
-
*
|
|
927
|
-
* @deprecated
|
|
928
|
-
* @event nodeDragging
|
|
929
|
-
*/
|
|
930
|
-
nodeDragging: EmitType<DragAndDropEventArgs>;
|
|
931
|
-
/**
|
|
932
|
-
* Event callback that is raised when the TreeView node drag (move) starts.
|
|
933
|
-
*
|
|
934
|
-
* @event nodeDragStart
|
|
935
|
-
*/
|
|
936
|
-
nodeDragStart: EmitType<DragAndDropEventArgs>;
|
|
937
|
-
/**
|
|
938
|
-
* Event callback that is raised when the TreeView node drag (move) is stopped.
|
|
939
|
-
*
|
|
940
|
-
* @event nodeDragStop
|
|
941
|
-
*/
|
|
942
|
-
nodeDragStop: EmitType<DragAndDropEventArgs>;
|
|
943
|
-
/**
|
|
944
|
-
* Event callback that is raised when the TreeView node is dropped on target element successfully.
|
|
945
|
-
*
|
|
946
|
-
* @event nodeDropped
|
|
947
|
-
*/
|
|
948
|
-
nodeDropped: EmitType<DragAndDropEventArgs>;
|
|
949
|
-
/**
|
|
950
|
-
* Event callback that is raised when the TreeView node is renamed successfully.
|
|
951
|
-
*
|
|
952
|
-
* @event nodeEdited
|
|
953
|
-
*/
|
|
954
|
-
nodeEdited: EmitType<NodeEditEventArgs>;
|
|
955
|
-
/**
|
|
956
|
-
* Event callback that is raised before the TreeView node is renamed.
|
|
957
|
-
*
|
|
958
|
-
* @event nodeEditing
|
|
959
|
-
*/
|
|
960
|
-
nodeEditing: EmitType<NodeEditEventArgs>;
|
|
961
|
-
/**
|
|
962
|
-
* Event callback that is raised when the TreeView node expands successfully.
|
|
963
|
-
*
|
|
964
|
-
* @event nodeExpanded
|
|
965
|
-
*/
|
|
966
|
-
nodeExpanded: EmitType<NodeExpandEventArgs>;
|
|
967
|
-
/**
|
|
968
|
-
* Event callback that is raised before the TreeView node is to be expanded.
|
|
969
|
-
*
|
|
970
|
-
* @event nodeExpanding
|
|
971
|
-
*/
|
|
972
|
-
nodeExpanding: EmitType<NodeExpandEventArgs>;
|
|
973
|
-
/**
|
|
974
|
-
* Event callback that is raised when the TreeView node is selected/unselected successfully.
|
|
975
|
-
*
|
|
976
|
-
* @event nodeSelected
|
|
977
|
-
*/
|
|
978
|
-
nodeSelected: EmitType<NodeSelectEventArgs>;
|
|
979
|
-
/**
|
|
980
|
-
* Event callback that is raised before the TreeView node is selected/unselected.
|
|
981
|
-
*
|
|
982
|
-
* @event nodeSelecting
|
|
983
|
-
*/
|
|
984
|
-
nodeSelecting: EmitType<NodeSelectEventArgs>;
|
|
985
|
-
isFilter: boolean;
|
|
986
|
-
constructor(options?: TreeViewModel, element?: string | HTMLElement);
|
|
987
|
-
/**
|
|
988
|
-
* Get component name.
|
|
989
|
-
*
|
|
990
|
-
* @returns {string} - returns module name.
|
|
991
|
-
* @private
|
|
992
|
-
*/
|
|
993
|
-
getModuleName(): string;
|
|
994
|
-
/**
|
|
995
|
-
* Initialize the event handler
|
|
996
|
-
*
|
|
997
|
-
* @returns {void}
|
|
998
|
-
*/
|
|
999
|
-
protected preRender(): void;
|
|
1000
|
-
/**
|
|
1001
|
-
* Get the properties to be maintained in the persisted state.
|
|
1002
|
-
*
|
|
1003
|
-
* @returns {string} - returns the persisted data
|
|
1004
|
-
* @hidden
|
|
1005
|
-
*/
|
|
1006
|
-
getPersistData(): string;
|
|
1007
|
-
/**
|
|
1008
|
-
* To Initialize the control rendering
|
|
1009
|
-
*
|
|
1010
|
-
* @private
|
|
1011
|
-
* @returns {void}
|
|
1012
|
-
*/
|
|
1013
|
-
protected render(): void;
|
|
1014
|
-
private initialize;
|
|
1015
|
-
private setDisabledMode;
|
|
1016
|
-
private setEnableRtl;
|
|
1017
|
-
private setRipple;
|
|
1018
|
-
private setFullRow;
|
|
1019
|
-
private setMultiSelect;
|
|
1020
|
-
private templateComplier;
|
|
1021
|
-
private setDataBinding;
|
|
1022
|
-
private getQuery;
|
|
1023
|
-
private getType;
|
|
1024
|
-
private setRootData;
|
|
1025
|
-
private isChildObject;
|
|
1026
|
-
private renderItems;
|
|
1027
|
-
/**
|
|
1028
|
-
* Update the checkedNodes from datasource at initial rendering
|
|
1029
|
-
*
|
|
1030
|
-
* @returns {void}
|
|
1031
|
-
*/
|
|
1032
|
-
private updateCheckedStateFromDS;
|
|
1033
|
-
/**
|
|
1034
|
-
* To check whether the list data has sub child and to change the parent check state accordingly
|
|
1035
|
-
*
|
|
1036
|
-
* @param {FieldsSettingsModel} mapper - The mapper object containing field settings.
|
|
1037
|
-
* @param {Object[]} checkNodes - The array of checked nodes.
|
|
1038
|
-
* @returns {void}
|
|
1039
|
-
* @private
|
|
1040
|
-
*/
|
|
1041
|
-
private getCheckedNodeDetails;
|
|
1042
|
-
/**
|
|
1043
|
-
* Update the checkedNodes and parent state when all the child Nodes are in checkedstate at initial rendering
|
|
1044
|
-
*
|
|
1045
|
-
* @returns {void}
|
|
1046
|
-
* @private
|
|
1047
|
-
*/
|
|
1048
|
-
private updateParentCheckState;
|
|
1049
|
-
/**
|
|
1050
|
-
* Change the parent to indeterminate state whenever the child is in checked state which is not rendered in DOM
|
|
1051
|
-
*
|
|
1052
|
-
* @param {Object} data - The data object to check for indeterminate state.
|
|
1053
|
-
* @returns {void}
|
|
1054
|
-
* @private
|
|
1055
|
-
*/
|
|
1056
|
-
private checkIndeterminateState;
|
|
1057
|
-
/**
|
|
1058
|
-
* Update the checkedNodes for child and subchild from datasource (hierarchical datasource) at initial rendering
|
|
1059
|
-
*
|
|
1060
|
-
* @param {Object[]} childItems - The array of child items to update the checked state.
|
|
1061
|
-
* @param {Object} treeData - The tree data object containing field values.
|
|
1062
|
-
* @returns {void}
|
|
1063
|
-
* @private
|
|
1064
|
-
*/
|
|
1065
|
-
private updateChildCheckState;
|
|
1066
|
-
private beforeNodeCreate;
|
|
1067
|
-
private frameMouseHandler;
|
|
1068
|
-
private addActionClass;
|
|
1069
|
-
private getDataType;
|
|
1070
|
-
private getGroupedData;
|
|
1071
|
-
private getSortedData;
|
|
1072
|
-
private finalizeNode;
|
|
1073
|
-
private updateAttributes;
|
|
1074
|
-
private updateCheckedProp;
|
|
1075
|
-
private ensureIndeterminate;
|
|
1076
|
-
private ensureParentCheckState;
|
|
1077
|
-
private getSelectedChildNodeDetails;
|
|
1078
|
-
private ensureChildCheckState;
|
|
1079
|
-
private doCheckBoxAction;
|
|
1080
|
-
private updateFieldChecked;
|
|
1081
|
-
/**
|
|
1082
|
-
* Changes the parent and child check state while changing the checkedNodes via setmodel
|
|
1083
|
-
*
|
|
1084
|
-
* @param {string} node - The unique identifier of the node.
|
|
1085
|
-
* @param {boolean} doCheck - A boolean value indicating whether to check or uncheck the node.
|
|
1086
|
-
* @returns {void}
|
|
1087
|
-
* @private
|
|
1088
|
-
*/
|
|
1089
|
-
private dynamicCheckState;
|
|
1090
|
-
/**
|
|
1091
|
-
* updates the parent and child check state while changing the checkedNodes via setmodel for listData
|
|
1092
|
-
*
|
|
1093
|
-
* @param {string} node - The unique identifier of the node.
|
|
1094
|
-
* @param {boolean} doCheck - A boolean value indicating whether to check or uncheck the node.
|
|
1095
|
-
* @returns {void}
|
|
1096
|
-
* @private
|
|
1097
|
-
*/
|
|
1098
|
-
private updateIndeterminate;
|
|
1099
|
-
/**
|
|
1100
|
-
* updates the parent and child check state while changing the checkedNodes via setmodel for hierarchical data
|
|
1101
|
-
*
|
|
1102
|
-
* @param {Object[]} subChild - Array of child nodes
|
|
1103
|
-
* @param {string} parent - Parent identifier
|
|
1104
|
-
* @param {string} node - Current node identifier
|
|
1105
|
-
* @param {boolean} doCheck - Boolean indicating whether to perform a check
|
|
1106
|
-
* @param {string} [child] - Optional child identifier
|
|
1107
|
-
* @returns {void}
|
|
1108
|
-
* @private
|
|
1109
|
-
*/
|
|
1110
|
-
private updateChildIndeterminate;
|
|
1111
|
-
private changeState;
|
|
1112
|
-
private nodeCheckAction;
|
|
1113
|
-
private addCheck;
|
|
1114
|
-
private removeCheck;
|
|
1115
|
-
private getCheckEvent;
|
|
1116
|
-
private finalize;
|
|
1117
|
-
private setTextWrap;
|
|
1118
|
-
private updateWrap;
|
|
1119
|
-
private calculateWrap;
|
|
1120
|
-
private doExpandAction;
|
|
1121
|
-
private expandGivenNodes;
|
|
1122
|
-
private expandCallback;
|
|
1123
|
-
private afterFinalized;
|
|
1124
|
-
private doSelectionAction;
|
|
1125
|
-
private selectGivenNodes;
|
|
1126
|
-
private clickHandler;
|
|
1127
|
-
private nodeCheckedEvent;
|
|
1128
|
-
private updateOldCheckedData;
|
|
1129
|
-
private triggerClickEvent;
|
|
1130
|
-
private expandNode;
|
|
1131
|
-
private expandedNode;
|
|
1132
|
-
private addExpand;
|
|
1133
|
-
private collapseNode;
|
|
1134
|
-
private nodeCollapseAction;
|
|
1135
|
-
private collapsedNode;
|
|
1136
|
-
private removeExpand;
|
|
1137
|
-
private disableExpandAttr;
|
|
1138
|
-
private setHeight;
|
|
1139
|
-
private animateHeight;
|
|
1140
|
-
private renderChildNodes;
|
|
1141
|
-
private loadChild;
|
|
1142
|
-
private disableTreeNodes;
|
|
1143
|
-
/**
|
|
1144
|
-
* Sets the child Item in selectedState while rendering the child node
|
|
1145
|
-
*
|
|
1146
|
-
* @param {Object[]} nodes - Array of nodes
|
|
1147
|
-
* @returns {void}
|
|
1148
|
-
*/
|
|
1149
|
-
private setSelectionForChildNodes;
|
|
1150
|
-
private ensureCheckNode;
|
|
1151
|
-
private getFields;
|
|
1152
|
-
private getChildFields;
|
|
1153
|
-
private getChildMapper;
|
|
1154
|
-
private getChildNodes;
|
|
1155
|
-
private findChildNodes;
|
|
1156
|
-
private findNestedChildNodes;
|
|
1157
|
-
private getChildGroup;
|
|
1158
|
-
private renderSubChild;
|
|
1159
|
-
private toggleSelect;
|
|
1160
|
-
private isActive;
|
|
1161
|
-
private selectNode;
|
|
1162
|
-
private nodeSelectAction;
|
|
1163
|
-
private unselectNode;
|
|
1164
|
-
private nodeUnselectAction;
|
|
1165
|
-
private setFocusElement;
|
|
1166
|
-
private addSelect;
|
|
1167
|
-
private removeSelect;
|
|
1168
|
-
private removeSelectAll;
|
|
1169
|
-
private getSelectEvent;
|
|
1170
|
-
private setExpandOnType;
|
|
1171
|
-
private expandHandler;
|
|
1172
|
-
private expandCollapseAction;
|
|
1173
|
-
private expandAction;
|
|
1174
|
-
private nodeExpandAction;
|
|
1175
|
-
private keyActionHandler;
|
|
1176
|
-
private navigateToFocus;
|
|
1177
|
-
private isVisibleInViewport;
|
|
1178
|
-
private getScrollParent;
|
|
1179
|
-
private shiftKeySelect;
|
|
1180
|
-
private checkNode;
|
|
1181
|
-
private validateCheckNode;
|
|
1182
|
-
private nodeCheckingAction;
|
|
1183
|
-
private updateActiveClass;
|
|
1184
|
-
/**
|
|
1185
|
-
* Update checkedNodes when UI interaction happens before the child node renders in DOM
|
|
1186
|
-
*
|
|
1187
|
-
* @param {Element} li - The list item element
|
|
1188
|
-
* @param {boolean} [doCheck] - Optional parameter to specify whether to perform a check
|
|
1189
|
-
* @returns {void}
|
|
1190
|
-
*/
|
|
1191
|
-
private ensureStateChange;
|
|
1192
|
-
private checkDisabledState;
|
|
1193
|
-
private getChildItems;
|
|
1194
|
-
/**
|
|
1195
|
-
* Update checkedNodes when UI interaction happens before the child node renders in DOM for hierarchical DS
|
|
1196
|
-
*
|
|
1197
|
-
* @param {Object[]} childItems - Array of child items
|
|
1198
|
-
* @param {string} parent - Parent identifier
|
|
1199
|
-
* @param {Element} childElement - Child DOM element
|
|
1200
|
-
* @param {boolean} [doCheck] - Optional parameter to specify whether to perform a check
|
|
1201
|
-
* @returns {void}
|
|
1202
|
-
*/
|
|
1203
|
-
private childStateChange;
|
|
1204
|
-
private allCheckNode;
|
|
1205
|
-
private openNode;
|
|
1206
|
-
private navigateNode;
|
|
1207
|
-
private navigateRootNode;
|
|
1208
|
-
private getFocusedNode;
|
|
1209
|
-
private focusNextNode;
|
|
1210
|
-
private getNextNode;
|
|
1211
|
-
private getPrevNode;
|
|
1212
|
-
private getRootNode;
|
|
1213
|
-
private getEndNode;
|
|
1214
|
-
private setFocus;
|
|
1215
|
-
private updateIdAttr;
|
|
1216
|
-
private focusIn;
|
|
1217
|
-
private focusOut;
|
|
1218
|
-
private onMouseOver;
|
|
1219
|
-
private setHover;
|
|
1220
|
-
private onMouseLeave;
|
|
1221
|
-
private removeHover;
|
|
1222
|
-
private getNodeData;
|
|
1223
|
-
private getText;
|
|
1224
|
-
private getExpandEvent;
|
|
1225
|
-
private renderNodeTemplate;
|
|
1226
|
-
private destroyTemplate;
|
|
1227
|
-
private reRenderNodes;
|
|
1228
|
-
private setCssClass;
|
|
1229
|
-
private editingHandler;
|
|
1230
|
-
private createTextbox;
|
|
1231
|
-
private renderTextBox;
|
|
1232
|
-
private updateOldText;
|
|
1233
|
-
private inputFocusOut;
|
|
1234
|
-
private appendNewText;
|
|
1235
|
-
private updateText;
|
|
1236
|
-
private getElement;
|
|
1237
|
-
private getId;
|
|
1238
|
-
private getEditEvent;
|
|
1239
|
-
private getNodeObject;
|
|
1240
|
-
private getChildNodeObject;
|
|
1241
|
-
private setDragAndDrop;
|
|
1242
|
-
private initializeDrag;
|
|
1243
|
-
private dragCancelAction;
|
|
1244
|
-
private getOffsetX;
|
|
1245
|
-
private getOffsetY;
|
|
1246
|
-
private dragAction;
|
|
1247
|
-
private appendIndicator;
|
|
1248
|
-
private dropAction;
|
|
1249
|
-
private appendNode;
|
|
1250
|
-
private dropAsSiblingNode;
|
|
1251
|
-
private dropAsChildNode;
|
|
1252
|
-
private moveData;
|
|
1253
|
-
private expandParent;
|
|
1254
|
-
private updateElement;
|
|
1255
|
-
private updateAriaLevel;
|
|
1256
|
-
private updateChildAriaLevel;
|
|
1257
|
-
private renderVirtualEle;
|
|
1258
|
-
private removeVirtualEle;
|
|
1259
|
-
private destroyDrag;
|
|
1260
|
-
private getDragEvent;
|
|
1261
|
-
private addFullRow;
|
|
1262
|
-
private createFullRow;
|
|
1263
|
-
private addMultiSelect;
|
|
1264
|
-
private collapseByLevel;
|
|
1265
|
-
private collapseAllNodes;
|
|
1266
|
-
private expandByLevel;
|
|
1267
|
-
private expandAllNodes;
|
|
1268
|
-
private getVisibleNodes;
|
|
1269
|
-
private removeNode;
|
|
1270
|
-
private updateInstance;
|
|
1271
|
-
private updateList;
|
|
1272
|
-
private updateSelectedNodes;
|
|
1273
|
-
private updateExpandedNodes;
|
|
1274
|
-
private removeData;
|
|
1275
|
-
private removeChildNodes;
|
|
1276
|
-
private doGivenAction;
|
|
1277
|
-
private addGivenNodes;
|
|
1278
|
-
private updateMapper;
|
|
1279
|
-
private updateListProp;
|
|
1280
|
-
private getDataPos;
|
|
1281
|
-
private addChildData;
|
|
1282
|
-
private doDisableAction;
|
|
1283
|
-
private doEnableAction;
|
|
1284
|
-
private nodeType;
|
|
1285
|
-
private checkValidId;
|
|
1286
|
-
private filterNestedChild;
|
|
1287
|
-
private setTouchClass;
|
|
1288
|
-
private updatePersistProp;
|
|
1289
|
-
private removeField;
|
|
1290
|
-
private getMapperProp;
|
|
1291
|
-
private updateField;
|
|
1292
|
-
private updateChildField;
|
|
1293
|
-
private triggerEvent;
|
|
1294
|
-
private wireInputEvents;
|
|
1295
|
-
private wireEditingEvents;
|
|
1296
|
-
private wireClickEvent;
|
|
1297
|
-
private wireExpandOnEvent;
|
|
1298
|
-
private mouseDownHandler;
|
|
1299
|
-
private preventContextMenu;
|
|
1300
|
-
private wireEvents;
|
|
1301
|
-
private unWireEvents;
|
|
1302
|
-
private parents;
|
|
1303
|
-
private isDoubleTapped;
|
|
1304
|
-
private isDescendant;
|
|
1305
|
-
protected showSpinner(element: HTMLElement): void;
|
|
1306
|
-
protected hideSpinner(element: HTMLElement): void;
|
|
1307
|
-
private setCheckedNodes;
|
|
1308
|
-
/**
|
|
1309
|
-
* Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel
|
|
1310
|
-
*
|
|
1311
|
-
* @param {string} node - The unique identifier of the node.
|
|
1312
|
-
* @param {string[]} [nodes=[]] - The list of node IDs to check.
|
|
1313
|
-
* @returns {void}
|
|
1314
|
-
* @private
|
|
1315
|
-
*/
|
|
1316
|
-
private setValidCheckedNode;
|
|
1317
|
-
/**
|
|
1318
|
-
* Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel(for hierarchical DS)
|
|
1319
|
-
*
|
|
1320
|
-
* @param {Object[]} childItems - The child items to check.
|
|
1321
|
-
* @param {string} node - The node to set the check state for.
|
|
1322
|
-
* @param {Object} [treeData] - The optional tree data.
|
|
1323
|
-
* @param {string[]} [nodes=[]] - The list of node IDs to check.
|
|
1324
|
-
* @returns {void}
|
|
1325
|
-
* @private
|
|
1326
|
-
*/
|
|
1327
|
-
private setChildCheckState;
|
|
1328
|
-
private setIndeterminate;
|
|
1329
|
-
private updatePosition;
|
|
1330
|
-
private updateChildPosition;
|
|
1331
|
-
private dynamicState;
|
|
1332
|
-
private crudOperation;
|
|
1333
|
-
private deleteSuccess;
|
|
1334
|
-
private editSucess;
|
|
1335
|
-
private addSuccess;
|
|
1336
|
-
private dmFailure;
|
|
1337
|
-
private updatePreviousText;
|
|
1338
|
-
private getHierarchicalParentId;
|
|
1339
|
-
/**
|
|
1340
|
-
* Called internally if any of the property value changed.
|
|
1341
|
-
*
|
|
1342
|
-
* @param {TreeViewModel} newProp - The new property value.
|
|
1343
|
-
* @param {TreeViewModel} oldProp - The old property value.
|
|
1344
|
-
* @returns {void}
|
|
1345
|
-
* @private
|
|
1346
|
-
*/
|
|
1347
|
-
onPropertyChanged(newProp: TreeViewModel, oldProp: TreeViewModel): void;
|
|
1348
|
-
/**
|
|
1349
|
-
* Removes the component from the DOM and detaches all its related event handlers. It also removes the attributes and classes.
|
|
1350
|
-
*
|
|
1351
|
-
* @returns {void}
|
|
1352
|
-
*/
|
|
1353
|
-
destroy(): void;
|
|
1354
|
-
/**
|
|
1355
|
-
* Adds the collection of TreeView nodes based on target and index position. If target node is not specified,
|
|
1356
|
-
* then the nodes are added as children of the given parentID or in the root level of TreeView.
|
|
1357
|
-
*
|
|
1358
|
-
* @param { object } nodes - Specifies the array of JSON data that has to be added.
|
|
1359
|
-
* @param { string | Element } target - Specifies ID of TreeView node/TreeView node as target element.
|
|
1360
|
-
* @param { number } index - Specifies the index to place the newly added nodes in the target element.
|
|
1361
|
-
* @param { boolean } preventTargetExpand - If set to true, the target parent node will be prevented from auto expanding.
|
|
1362
|
-
* @returns {void}
|
|
1363
|
-
*/
|
|
1364
|
-
addNodes(nodes: {
|
|
1365
|
-
[key: string]: Object;
|
|
1366
|
-
}[], target?: string | Element, index?: number, preventTargetExpand?: boolean): void;
|
|
1367
|
-
/**
|
|
1368
|
-
* Editing can also be enabled by using the `beginEdit` property, instead of clicking on the
|
|
1369
|
-
* TreeView node. On passing the node ID or element through this property, the edit textBox
|
|
1370
|
-
* will be created for the particular node thus allowing us to edit it.
|
|
1371
|
-
*
|
|
1372
|
-
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
1373
|
-
* @returns {void}
|
|
1374
|
-
*/
|
|
1375
|
-
beginEdit(node: string | Element): void;
|
|
1376
|
-
/**
|
|
1377
|
-
* Checks all the unchecked nodes. You can also check specific nodes by passing array of unchecked nodes
|
|
1378
|
-
* as argument to this method.
|
|
1379
|
-
*
|
|
1380
|
-
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
|
|
1381
|
-
* @returns {void}
|
|
1382
|
-
*/
|
|
1383
|
-
checkAll(nodes?: string[] | Element[]): void;
|
|
1384
|
-
/**
|
|
1385
|
-
* Collapses all the expanded TreeView nodes. You can collapse specific nodes by passing array of nodes as argument to this method.
|
|
1386
|
-
* You can also collapse all the nodes excluding the hidden nodes by setting **excludeHiddenNodes** to true. If you want to collapse
|
|
1387
|
-
* a specific level of nodes, set **level** as argument to collapseAll method.
|
|
1388
|
-
*
|
|
1389
|
-
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/ array of TreeView node.
|
|
1390
|
-
* @param {number} level - TreeView nodes will collapse up to the given level.
|
|
1391
|
-
* @param {boolean} excludeHiddenNodes - Whether or not to exclude hidden nodes of TreeView when collapsing all nodes.
|
|
1392
|
-
* @returns {void}
|
|
1393
|
-
*/
|
|
1394
|
-
collapseAll(nodes?: string[] | Element[], level?: number, excludeHiddenNodes?: boolean): void;
|
|
1395
|
-
/**
|
|
1396
|
-
* Disables the collection of nodes by passing the ID of nodes or node elements in the array.
|
|
1397
|
-
*
|
|
1398
|
-
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
|
|
1399
|
-
* @returns {void}
|
|
1400
|
-
*/
|
|
1401
|
-
disableNodes(nodes: string[] | Element[]): void;
|
|
1402
|
-
/**
|
|
1403
|
-
* Enables the collection of disabled nodes by passing the ID of nodes or node elements in the array.
|
|
1404
|
-
*
|
|
1405
|
-
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
|
|
1406
|
-
* @returns {void}
|
|
1407
|
-
*/
|
|
1408
|
-
enableNodes(nodes: string[] | Element[]): void;
|
|
1409
|
-
/**
|
|
1410
|
-
* Ensures visibility of the TreeView node by using node ID or node element.
|
|
1411
|
-
* When many TreeView nodes are present and we need to find a particular node, `ensureVisible` property
|
|
1412
|
-
* helps bring the node to visibility by expanding the TreeView and scrolling to the specific node.
|
|
1413
|
-
*
|
|
1414
|
-
* @param {string | Element} node - Specifies ID of TreeView node/TreeView nodes.
|
|
1415
|
-
* @returns {void}
|
|
1416
|
-
*/
|
|
1417
|
-
ensureVisible(node: string | Element): void;
|
|
1418
|
-
/**
|
|
1419
|
-
* Expands all the collapsed TreeView nodes. You can expand the specific nodes by passing the array of collapsed nodes
|
|
1420
|
-
* as argument to this method. You can also expand all the collapsed nodes by excluding the hidden nodes by setting
|
|
1421
|
-
* **excludeHiddenNodes** to true to this method. To expand a specific level of nodes, set **level** as argument to expandAll method.
|
|
1422
|
-
*
|
|
1423
|
-
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
|
|
1424
|
-
* @param {number} level - TreeView nodes will expand up to the given level.
|
|
1425
|
-
* @param {boolean} excludeHiddenNodes - Whether or not to exclude hidden nodes when expanding all nodes.
|
|
1426
|
-
* @param {boolean} preventAnimation - Prevent the expand animation when expanding all nodes.
|
|
1427
|
-
* @returns {void}
|
|
1428
|
-
*/
|
|
1429
|
-
expandAll(nodes?: string[] | Element[], level?: number, excludeHiddenNodes?: boolean, preventAnimation?: boolean): void;
|
|
1430
|
-
/**
|
|
1431
|
-
* Gets all the checked nodes including child, whether it is loaded or not.
|
|
1432
|
-
*
|
|
1433
|
-
* @returns {string[]} - An array of strings representing the unique identifiers of checked nodes.
|
|
1434
|
-
*/
|
|
1435
|
-
getAllCheckedNodes(): string[];
|
|
1436
|
-
/**
|
|
1437
|
-
* Gets all the disabled nodes including child, whether it is loaded or not.
|
|
1438
|
-
*
|
|
1439
|
-
* @returns {string[]} An array of strings representing the unique identifiers of disabled nodes.
|
|
1440
|
-
*/
|
|
1441
|
-
getDisabledNodes(): string[];
|
|
1442
|
-
/**
|
|
1443
|
-
* Gets the node's data such as id, text, parentID, selected, isChecked, and expanded by passing the node element or it's ID.
|
|
1444
|
-
*
|
|
1445
|
-
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
1446
|
-
* @returns {Object} - The data associated with the specified node.
|
|
1447
|
-
*/
|
|
1448
|
-
getNode(node: string | Element): {
|
|
1449
|
-
[key: string]: Object;
|
|
1450
|
-
};
|
|
1451
|
-
/**
|
|
1452
|
-
* To get the updated data source of TreeView after performing some operation like drag and drop, node editing,
|
|
1453
|
-
* node selecting/unSelecting, node expanding/collapsing, node checking/unChecking, adding and removing node.
|
|
1454
|
-
* * If you pass the ID of TreeView node as arguments for this method then it will return the updated data source
|
|
1455
|
-
* of the corresponding node otherwise it will return the entire updated data source of TreeView.
|
|
1456
|
-
* * The updated data source also contains custom attributes if you specified in data source.
|
|
1457
|
-
*
|
|
1458
|
-
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
1459
|
-
* @isGenericType true
|
|
1460
|
-
* @returns {Object} - The tree data associated with the specified node or element.
|
|
1461
|
-
*/
|
|
1462
|
-
getTreeData(node?: string | Element): {
|
|
1463
|
-
[key: string]: Object;
|
|
1464
|
-
}[];
|
|
1465
|
-
/**
|
|
1466
|
-
* Moves the collection of nodes within the same TreeView based on target or its index position.
|
|
1467
|
-
*
|
|
1468
|
-
* @param {string[] | Element[]} sourceNodes - Specifies the array of TreeView nodes ID/array of TreeView node.
|
|
1469
|
-
* @param {string | Element} target - Specifies ID of TreeView node/TreeView node as target element.
|
|
1470
|
-
* @param {number} index - Specifies the index to place the moved nodes in the target element.
|
|
1471
|
-
* @param { boolean } preventTargetExpand - If set to true, the target parent node will be prevented from auto expanding.
|
|
1472
|
-
* @returns {void}
|
|
1473
|
-
*/
|
|
1474
|
-
moveNodes(sourceNodes: string[] | Element[], target: string | Element, index: number, preventTargetExpand?: boolean): void;
|
|
1475
|
-
/**
|
|
1476
|
-
* Refreshes a particular node of the TreeView.
|
|
1477
|
-
*
|
|
1478
|
-
* @param {string | Element} target - Specifies the ID of TreeView node or TreeView node as target element.
|
|
1479
|
-
* @param {Object[]} newData - Specifies the new data of TreeView node.
|
|
1480
|
-
* @returns {void}
|
|
1481
|
-
* ```typescript
|
|
1482
|
-
* var treeObj = document.getElementById("treeview").ej2_instances[0];
|
|
1483
|
-
* var data = treeObj.getTreeData("01");
|
|
1484
|
-
* var newData = {
|
|
1485
|
-
* id: data[0].id,
|
|
1486
|
-
* name: "new Text",
|
|
1487
|
-
* };
|
|
1488
|
-
* treeObj.refreshNode("01", [newData]);
|
|
1489
|
-
* ```
|
|
1490
|
-
*/
|
|
1491
|
-
refreshNode(target: string | Element, newData: {
|
|
1492
|
-
[key: string]: Object;
|
|
1493
|
-
}[]): void;
|
|
1494
|
-
/**
|
|
1495
|
-
* Removes the collection of TreeView nodes by passing the array of node details as argument to this method.
|
|
1496
|
-
*
|
|
1497
|
-
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
|
|
1498
|
-
* @returns {void}
|
|
1499
|
-
*/
|
|
1500
|
-
removeNodes(nodes: string[] | Element[]): void;
|
|
1501
|
-
/**
|
|
1502
|
-
* Replaces the text of the TreeView node with the given text only when the `allowEditing` property is enabled.
|
|
1503
|
-
*
|
|
1504
|
-
* @param {string | Element} target - Specifies ID of TreeView node/TreeView node as target element.
|
|
1505
|
-
* @param {string} newText - Specifies the new text of TreeView node.
|
|
1506
|
-
* @returns {void}
|
|
1507
|
-
*/
|
|
1508
|
-
updateNode(target: string | Element, newText: string): void;
|
|
1509
|
-
/**
|
|
1510
|
-
* Unchecks all the checked nodes. You can also uncheck the specific nodes by passing array of checked nodes
|
|
1511
|
-
* as argument to this method.
|
|
1512
|
-
*
|
|
1513
|
-
* @param {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
|
|
1514
|
-
* @returns {void}
|
|
1515
|
-
*/
|
|
1516
|
-
uncheckAll(nodes?: string[] | Element[]): void;
|
|
1517
|
-
private setNodeFocusable;
|
|
1518
|
-
}
|