@openremote/or-tree-menu 1.6.0-snapshot.20250512145140 → 1.6.0-snapshot.20250513081115
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/custom-elements.json +1421 -0
- package/dist/umd/index.orbundle.js +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1,1421 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/index.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"description": "",
|
|
12
|
+
"name": "OrTreeMenu",
|
|
13
|
+
"members": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "field",
|
|
16
|
+
"name": "nodes",
|
|
17
|
+
"type": {
|
|
18
|
+
"text": "TreeNode[]"
|
|
19
|
+
},
|
|
20
|
+
"privacy": "public",
|
|
21
|
+
"default": "[]",
|
|
22
|
+
"description": "List of node items in the menu.\nUses the TreeNode format for rendering the OrTreeNode elements."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"kind": "field",
|
|
26
|
+
"name": "selection",
|
|
27
|
+
"type": {
|
|
28
|
+
"text": "TreeMenuSelection"
|
|
29
|
+
},
|
|
30
|
+
"privacy": "public",
|
|
31
|
+
"description": "Changes the allowed selection method within the tree.\nCommon options are `LEAF`, `SINGLE` and `MULTI`."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"kind": "field",
|
|
35
|
+
"name": "draggable",
|
|
36
|
+
"type": {
|
|
37
|
+
"text": "boolean"
|
|
38
|
+
},
|
|
39
|
+
"privacy": "public",
|
|
40
|
+
"default": "false",
|
|
41
|
+
"description": "Disables and enables dragging of nodes into groups."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"kind": "field",
|
|
45
|
+
"name": "noHeader",
|
|
46
|
+
"type": {
|
|
47
|
+
"text": "boolean"
|
|
48
|
+
},
|
|
49
|
+
"privacy": "public",
|
|
50
|
+
"default": "false",
|
|
51
|
+
"description": "Removes the header from the tree menu."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"kind": "field",
|
|
55
|
+
"name": "menuTitle",
|
|
56
|
+
"type": {
|
|
57
|
+
"text": "string"
|
|
58
|
+
},
|
|
59
|
+
"privacy": "public",
|
|
60
|
+
"default": "\"Tree Menu\"",
|
|
61
|
+
"description": "Adjusts the title in the menu header."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"kind": "field",
|
|
65
|
+
"name": "sortOptions",
|
|
66
|
+
"type": {
|
|
67
|
+
"text": "TreeMenuSorting[] | undefined"
|
|
68
|
+
},
|
|
69
|
+
"privacy": "public",
|
|
70
|
+
"description": "List of options available to sort the object with"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"kind": "field",
|
|
74
|
+
"name": "sortBy",
|
|
75
|
+
"type": {
|
|
76
|
+
"text": "TreeMenuSorting"
|
|
77
|
+
},
|
|
78
|
+
"privacy": "public",
|
|
79
|
+
"description": "Represents the selected sorting option"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"kind": "field",
|
|
83
|
+
"name": "groupFirst",
|
|
84
|
+
"type": {
|
|
85
|
+
"text": "boolean"
|
|
86
|
+
},
|
|
87
|
+
"privacy": "public",
|
|
88
|
+
"default": "false",
|
|
89
|
+
"description": "Automatically prioritizes the groups, and positions these on top."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"kind": "field",
|
|
93
|
+
"name": "_uiNodes",
|
|
94
|
+
"type": {
|
|
95
|
+
"text": "NodeListOf<OrTreeNode> | undefined"
|
|
96
|
+
},
|
|
97
|
+
"privacy": "protected"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"kind": "field",
|
|
101
|
+
"name": "_uiGroups",
|
|
102
|
+
"type": {
|
|
103
|
+
"text": "NodeListOf<OrTreeGroup> | undefined"
|
|
104
|
+
},
|
|
105
|
+
"privacy": "protected"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"kind": "field",
|
|
109
|
+
"name": "_treeNodeCache",
|
|
110
|
+
"type": {
|
|
111
|
+
"text": "Map<TreeNode, string>"
|
|
112
|
+
},
|
|
113
|
+
"privacy": "protected",
|
|
114
|
+
"default": "new Map<TreeNode, string>()"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"kind": "field",
|
|
118
|
+
"name": "_lastSelectedNode",
|
|
119
|
+
"type": {
|
|
120
|
+
"text": "OrTreeNode | undefined"
|
|
121
|
+
},
|
|
122
|
+
"privacy": "protected"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"kind": "field",
|
|
126
|
+
"name": "styles",
|
|
127
|
+
"static": true,
|
|
128
|
+
"readonly": true
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"kind": "method",
|
|
132
|
+
"name": "willUpdate",
|
|
133
|
+
"privacy": "protected",
|
|
134
|
+
"parameters": [
|
|
135
|
+
{
|
|
136
|
+
"name": "changedProps",
|
|
137
|
+
"type": {
|
|
138
|
+
"text": "PropertyValues"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"kind": "method",
|
|
145
|
+
"name": "render",
|
|
146
|
+
"return": {
|
|
147
|
+
"type": {
|
|
148
|
+
"text": "TemplateResult"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"kind": "method",
|
|
154
|
+
"name": "moveNodesToGroup",
|
|
155
|
+
"privacy": "public",
|
|
156
|
+
"parameters": [
|
|
157
|
+
{
|
|
158
|
+
"name": "nodesToMove",
|
|
159
|
+
"type": {
|
|
160
|
+
"text": "TreeNode[]"
|
|
161
|
+
},
|
|
162
|
+
"description": "The array of nodes that are moved into a group."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "groupNode",
|
|
166
|
+
"optional": true,
|
|
167
|
+
"type": {
|
|
168
|
+
"text": "TreeNode"
|
|
169
|
+
},
|
|
170
|
+
"description": "The group node to insert nodesToMove in."
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"description": "Function that moves an array of TreeNode into another TreeNode, by adding them to their children.\nThe function takes care of removing the nodes from the former group, and makes sure no duplicates end up in the list."
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"kind": "method",
|
|
177
|
+
"name": "_getTreeTemplate",
|
|
178
|
+
"privacy": "protected",
|
|
179
|
+
"return": {
|
|
180
|
+
"type": {
|
|
181
|
+
"text": "TemplateResult"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"parameters": [
|
|
185
|
+
{
|
|
186
|
+
"name": "nodes",
|
|
187
|
+
"type": {
|
|
188
|
+
"text": "TreeNode[]"
|
|
189
|
+
},
|
|
190
|
+
"description": "List of nodes to be rendered"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"description": "Returns a HTML template that displays the tree menu."
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"kind": "method",
|
|
197
|
+
"name": "_getNodeTemplate",
|
|
198
|
+
"privacy": "protected",
|
|
199
|
+
"return": {
|
|
200
|
+
"type": {
|
|
201
|
+
"text": "TemplateResult"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"parameters": [
|
|
205
|
+
{
|
|
206
|
+
"name": "node",
|
|
207
|
+
"type": {
|
|
208
|
+
"text": "TreeNode"
|
|
209
|
+
},
|
|
210
|
+
"description": "Node to be rendered"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "parent",
|
|
214
|
+
"optional": true,
|
|
215
|
+
"type": {
|
|
216
|
+
"text": "TreeNode"
|
|
217
|
+
},
|
|
218
|
+
"description": "Optional parent (group node) if the node is placed inside a group"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"description": "Returns an HTML template for displaying a single node within a tree menu. This can both be a group or a solo node."
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"kind": "method",
|
|
225
|
+
"name": "_getSingleNodeTemplate",
|
|
226
|
+
"privacy": "protected",
|
|
227
|
+
"return": {
|
|
228
|
+
"type": {
|
|
229
|
+
"text": "TemplateResult"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"parameters": [
|
|
233
|
+
{
|
|
234
|
+
"name": "node",
|
|
235
|
+
"type": {
|
|
236
|
+
"text": "TreeNode"
|
|
237
|
+
},
|
|
238
|
+
"description": "Node to be rendered"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "parent",
|
|
242
|
+
"optional": true,
|
|
243
|
+
"type": {
|
|
244
|
+
"text": "TreeNode"
|
|
245
|
+
},
|
|
246
|
+
"description": "Optional parent (group node) if the node is placed inside a group"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"description": "Returns an HTML template for displaying a single node"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"kind": "method",
|
|
253
|
+
"name": "_getSingleNodeSlotTemplate",
|
|
254
|
+
"privacy": "protected",
|
|
255
|
+
"return": {
|
|
256
|
+
"type": {
|
|
257
|
+
"text": "TemplateResult"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"parameters": [
|
|
261
|
+
{
|
|
262
|
+
"name": "node",
|
|
263
|
+
"type": {
|
|
264
|
+
"text": "TreeNode"
|
|
265
|
+
},
|
|
266
|
+
"description": "Node to be rendered"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"description": "Returns an HTML template for the slot element inside <or-tree-node>.\nIt allows customization such as a prefix icon, adjusting the label, etc."
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"kind": "method",
|
|
273
|
+
"name": "_getGroupNodeTemplate",
|
|
274
|
+
"privacy": "protected",
|
|
275
|
+
"return": {
|
|
276
|
+
"type": {
|
|
277
|
+
"text": "TemplateResult"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"parameters": [
|
|
281
|
+
{
|
|
282
|
+
"name": "node",
|
|
283
|
+
"type": {
|
|
284
|
+
"text": "TreeNode"
|
|
285
|
+
},
|
|
286
|
+
"description": "Node to be rendered"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "_parent",
|
|
290
|
+
"optional": true,
|
|
291
|
+
"type": {
|
|
292
|
+
"text": "TreeNode"
|
|
293
|
+
},
|
|
294
|
+
"description": "Optional parent (group node) if the node is placed inside a group"
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
"description": "Returns a HTML template for rendering a group node (aka a node with children)"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"kind": "method",
|
|
301
|
+
"name": "_getGroupNodeSlotTemplate",
|
|
302
|
+
"privacy": "protected",
|
|
303
|
+
"return": {
|
|
304
|
+
"type": {
|
|
305
|
+
"text": "TemplateResult"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"parameters": [
|
|
309
|
+
{
|
|
310
|
+
"name": "node",
|
|
311
|
+
"type": {
|
|
312
|
+
"text": "TreeNode"
|
|
313
|
+
},
|
|
314
|
+
"description": "Node to be rendered"
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"description": "Returns an HTML template for the parent slot element inside <or-tree-group>.\nIt allows customization such as a prefix icon, adjusting the label, etc."
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"kind": "method",
|
|
321
|
+
"name": "_getHeaderTemplate",
|
|
322
|
+
"privacy": "protected",
|
|
323
|
+
"return": {
|
|
324
|
+
"type": {
|
|
325
|
+
"text": "TemplateResult"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"description": "Returns a HTML template for the header"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"kind": "method",
|
|
332
|
+
"name": "_getSortActionTemplate",
|
|
333
|
+
"privacy": "protected",
|
|
334
|
+
"return": {
|
|
335
|
+
"type": {
|
|
336
|
+
"text": "TemplateResult"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"parameters": [
|
|
340
|
+
{
|
|
341
|
+
"name": "value",
|
|
342
|
+
"optional": true,
|
|
343
|
+
"type": {
|
|
344
|
+
"text": "string"
|
|
345
|
+
},
|
|
346
|
+
"description": "The selected sorting option"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"name": "options",
|
|
350
|
+
"optional": true,
|
|
351
|
+
"type": {
|
|
352
|
+
"text": "TreeMenuSorting[]"
|
|
353
|
+
},
|
|
354
|
+
"description": "The available sorting options"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"description": "Returns a HTML template for the sorting options menu."
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"kind": "method",
|
|
361
|
+
"name": "_getErrorTemplate",
|
|
362
|
+
"privacy": "protected",
|
|
363
|
+
"return": {
|
|
364
|
+
"type": {
|
|
365
|
+
"text": "TemplateResult"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"description": "Returns a HTML template for displaying errors"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"kind": "method",
|
|
372
|
+
"name": "_onSortClick",
|
|
373
|
+
"privacy": "protected",
|
|
374
|
+
"parameters": [
|
|
375
|
+
{
|
|
376
|
+
"name": "value",
|
|
377
|
+
"type": {
|
|
378
|
+
"text": "string"
|
|
379
|
+
},
|
|
380
|
+
"description": "The new selected sort option"
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"description": "HTML callback event for selecting a sort option in the dropdown menu,."
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"kind": "method",
|
|
387
|
+
"name": "_onTreeGroupClick",
|
|
388
|
+
"privacy": "protected",
|
|
389
|
+
"parameters": [
|
|
390
|
+
{
|
|
391
|
+
"name": "ev",
|
|
392
|
+
"type": {
|
|
393
|
+
"text": "PointerEvent"
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
"description": "HTML callback event for clicking on a group node. (aka a node with children)\nBased on the configured TreeMenuSelection, it single- or multi selects the nodes."
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"kind": "method",
|
|
401
|
+
"name": "_onTreeNodeClick",
|
|
402
|
+
"privacy": "protected",
|
|
403
|
+
"parameters": [
|
|
404
|
+
{
|
|
405
|
+
"name": "ev",
|
|
406
|
+
"type": {
|
|
407
|
+
"text": "PointerEvent"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"description": "HTML callback event for when a child node of the tree gets clicked on."
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"kind": "method",
|
|
415
|
+
"name": "_onDragStart",
|
|
416
|
+
"privacy": "protected",
|
|
417
|
+
"parameters": [
|
|
418
|
+
{
|
|
419
|
+
"name": "ev",
|
|
420
|
+
"type": {
|
|
421
|
+
"text": "DragEvent"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"name": "node",
|
|
426
|
+
"type": {
|
|
427
|
+
"text": "TreeNode"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"description": "HTML callback event for 'dragstart' (the moment when a drag gesture is started)"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"kind": "method",
|
|
435
|
+
"name": "_onDragOverList",
|
|
436
|
+
"privacy": "protected",
|
|
437
|
+
"parameters": [
|
|
438
|
+
{
|
|
439
|
+
"name": "ev",
|
|
440
|
+
"type": {
|
|
441
|
+
"text": "DragEvent"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"description": "HTML callback event for 'dragover' on the list element"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"kind": "method",
|
|
449
|
+
"name": "_onDragOverSingleNode",
|
|
450
|
+
"privacy": "protected",
|
|
451
|
+
"parameters": [
|
|
452
|
+
{
|
|
453
|
+
"name": "ev",
|
|
454
|
+
"type": {
|
|
455
|
+
"text": "DragEvent"
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"name": "node",
|
|
460
|
+
"type": {
|
|
461
|
+
"text": "TreeNode"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"name": "parent",
|
|
466
|
+
"optional": true,
|
|
467
|
+
"type": {
|
|
468
|
+
"text": "TreeNode"
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"description": "HTML callback event for 'dragover', so while a node is dragged over a single node"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"kind": "method",
|
|
476
|
+
"name": "_onDragOverGroup",
|
|
477
|
+
"privacy": "protected",
|
|
478
|
+
"parameters": [
|
|
479
|
+
{
|
|
480
|
+
"name": "ev",
|
|
481
|
+
"type": {
|
|
482
|
+
"text": "DragEvent"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"name": "groupNode",
|
|
487
|
+
"type": {
|
|
488
|
+
"text": "TreeNode"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
"description": "HTML callback event for 'dragover', so while a node is dragged over a group node"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"kind": "method",
|
|
496
|
+
"name": "_onDragLeaveSingleNode",
|
|
497
|
+
"privacy": "protected",
|
|
498
|
+
"parameters": [
|
|
499
|
+
{
|
|
500
|
+
"name": "ev",
|
|
501
|
+
"type": {
|
|
502
|
+
"text": "DragEvent"
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "node",
|
|
507
|
+
"type": {
|
|
508
|
+
"text": "TreeNode"
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "parent",
|
|
513
|
+
"optional": true,
|
|
514
|
+
"type": {
|
|
515
|
+
"text": "TreeNode"
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
],
|
|
519
|
+
"description": "HTML callback event for 'dragover', so while a node is dragged over a single node"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"kind": "method",
|
|
523
|
+
"name": "_onDragLeaveGroup",
|
|
524
|
+
"privacy": "protected",
|
|
525
|
+
"parameters": [
|
|
526
|
+
{
|
|
527
|
+
"name": "ev",
|
|
528
|
+
"type": {
|
|
529
|
+
"text": "DragEvent"
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "groupNode",
|
|
534
|
+
"type": {
|
|
535
|
+
"text": "TreeNode"
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
"description": "HTML callback event for 'dragleave', so after a node has been dragged over a group node"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"kind": "method",
|
|
543
|
+
"name": "_onDragDropList",
|
|
544
|
+
"privacy": "protected",
|
|
545
|
+
"parameters": [
|
|
546
|
+
{
|
|
547
|
+
"name": "ev",
|
|
548
|
+
"type": {
|
|
549
|
+
"text": "DragEvent"
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
"description": "HTML callback event for when a node is dropped on the list level."
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"kind": "method",
|
|
557
|
+
"name": "_onDragDropSingleNode",
|
|
558
|
+
"privacy": "protected",
|
|
559
|
+
"parameters": [
|
|
560
|
+
{
|
|
561
|
+
"name": "ev",
|
|
562
|
+
"type": {
|
|
563
|
+
"text": "DragEvent"
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "groupNode",
|
|
568
|
+
"optional": true,
|
|
569
|
+
"type": {
|
|
570
|
+
"text": "TreeNode"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "parent",
|
|
575
|
+
"optional": true,
|
|
576
|
+
"type": {
|
|
577
|
+
"text": "TreeNode"
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
],
|
|
581
|
+
"description": "HTML callback event for when a node is dropped onto a single node, after dragging it over."
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"kind": "method",
|
|
585
|
+
"name": "_onDragDropGroup",
|
|
586
|
+
"privacy": "protected",
|
|
587
|
+
"parameters": [
|
|
588
|
+
{
|
|
589
|
+
"name": "ev",
|
|
590
|
+
"type": {
|
|
591
|
+
"text": "DragEvent"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "groupNode",
|
|
596
|
+
"optional": true,
|
|
597
|
+
"type": {
|
|
598
|
+
"text": "TreeNode"
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
],
|
|
602
|
+
"description": "HTML callback event for when a node is dropped onto a group node, after dragging it over."
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"kind": "method",
|
|
606
|
+
"name": "_dispatchCancellableDragEvent",
|
|
607
|
+
"privacy": "protected",
|
|
608
|
+
"return": {
|
|
609
|
+
"type": {
|
|
610
|
+
"text": "Promise<void>"
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
"parameters": [
|
|
614
|
+
{
|
|
615
|
+
"name": "nodes",
|
|
616
|
+
"type": {
|
|
617
|
+
"text": "TreeNode[]"
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"name": "groupNode",
|
|
622
|
+
"optional": true,
|
|
623
|
+
"type": {
|
|
624
|
+
"text": "TreeNode"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "allNodes",
|
|
629
|
+
"default": "[]",
|
|
630
|
+
"type": {
|
|
631
|
+
"text": "TreeNode[]"
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
],
|
|
635
|
+
"description": "Dispatches a cancellable tree drag event."
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"kind": "method",
|
|
639
|
+
"name": "_selectNode",
|
|
640
|
+
"privacy": "protected",
|
|
641
|
+
"parameters": [
|
|
642
|
+
{
|
|
643
|
+
"name": "node",
|
|
644
|
+
"optional": true,
|
|
645
|
+
"type": {
|
|
646
|
+
"text": "OrTreeNode"
|
|
647
|
+
},
|
|
648
|
+
"description": "Node to be selected"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "notify",
|
|
652
|
+
"default": "true",
|
|
653
|
+
"description": "Boolean whether to notify the HTML parents of an or-tree-select."
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"description": "Selects the node using the HTML attribute 'selected' of OrTreeNode"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"kind": "method",
|
|
660
|
+
"name": "_selectNodesBetween",
|
|
661
|
+
"privacy": "protected",
|
|
662
|
+
"parameters": [
|
|
663
|
+
{
|
|
664
|
+
"name": "nodes",
|
|
665
|
+
"type": {
|
|
666
|
+
"text": "OrTreeNode[]"
|
|
667
|
+
},
|
|
668
|
+
"description": "List of nodes in the tree menu"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"name": "index1",
|
|
672
|
+
"type": {
|
|
673
|
+
"text": "number"
|
|
674
|
+
},
|
|
675
|
+
"description": "Start index of the nodes to select"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"name": "index2",
|
|
679
|
+
"type": {
|
|
680
|
+
"text": "number"
|
|
681
|
+
},
|
|
682
|
+
"description": "End index of the nodes to select"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"name": "notify",
|
|
686
|
+
"default": "true",
|
|
687
|
+
"description": "Boolean whether to notify the HTML parents of an or-tree-select."
|
|
688
|
+
}
|
|
689
|
+
],
|
|
690
|
+
"description": "Multi-selects the nodes between two indexes in a list of OrTreeNode."
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"kind": "method",
|
|
694
|
+
"name": "_notifyNodesSelect",
|
|
695
|
+
"privacy": "protected",
|
|
696
|
+
"parameters": [
|
|
697
|
+
{
|
|
698
|
+
"name": "selectedNodes",
|
|
699
|
+
"optional": true,
|
|
700
|
+
"type": {
|
|
701
|
+
"text": "TreeNode[]"
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
],
|
|
705
|
+
"description": "Function that notifies parent HTMLElements that a tree node got selected.\nIt dispatches the OrTreeSelectEvent, which includes a list of the selected nodes.",
|
|
706
|
+
"return": {
|
|
707
|
+
"type": {
|
|
708
|
+
"text": ""
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"kind": "method",
|
|
714
|
+
"name": "_findSelectedTreeNodes",
|
|
715
|
+
"privacy": "protected",
|
|
716
|
+
"return": {
|
|
717
|
+
"type": {
|
|
718
|
+
"text": "TreeNode[]"
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
"parameters": [
|
|
722
|
+
{
|
|
723
|
+
"name": "uiNodes",
|
|
724
|
+
"default": "Array.from(this._uiNodes || [])",
|
|
725
|
+
"description": "List of <or-tree-node> UI elements"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "cache",
|
|
729
|
+
"default": "this._treeNodeCache",
|
|
730
|
+
"description": "Optionally, supply the cache for retrieving a {@link TreeNode}object from a <or-tree-node> element.\n "
|
|
731
|
+
}
|
|
732
|
+
],
|
|
733
|
+
"description": "Utility function to detect the selected tree nodes."
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"kind": "method",
|
|
737
|
+
"name": "_getTreeNodeFromTree",
|
|
738
|
+
"privacy": "protected",
|
|
739
|
+
"return": {
|
|
740
|
+
"type": {
|
|
741
|
+
"text": "TreeNode | undefined"
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
"parameters": [
|
|
745
|
+
{
|
|
746
|
+
"name": "uiNode",
|
|
747
|
+
"type": {
|
|
748
|
+
"text": "OrTreeNode"
|
|
749
|
+
},
|
|
750
|
+
"description": "The tree node HTML element"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"name": "cache",
|
|
754
|
+
"default": "this._treeNodeCache",
|
|
755
|
+
"description": "Optional cache to get the TreeNode from"
|
|
756
|
+
}
|
|
757
|
+
],
|
|
758
|
+
"description": "Utility function that gets a TreeNode based on an OrTreeNode HTML element in the menu."
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"kind": "method",
|
|
762
|
+
"name": "_getUiNodeFromTree",
|
|
763
|
+
"privacy": "protected",
|
|
764
|
+
"return": {
|
|
765
|
+
"type": {
|
|
766
|
+
"text": "OrTreeNode | undefined"
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
"parameters": [
|
|
770
|
+
{
|
|
771
|
+
"name": "treeNode",
|
|
772
|
+
"type": {
|
|
773
|
+
"text": "TreeNode"
|
|
774
|
+
},
|
|
775
|
+
"description": "The tree node object"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"name": "cache",
|
|
779
|
+
"default": "this._treeNodeCache",
|
|
780
|
+
"description": "Optional cache to get the HTML element from"
|
|
781
|
+
}
|
|
782
|
+
],
|
|
783
|
+
"description": "Utility function that gets an OrTreeNode HTML element based on the TreeNode input object."
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"kind": "method",
|
|
787
|
+
"name": "_dispatchSelectEvent",
|
|
788
|
+
"privacy": "protected",
|
|
789
|
+
"return": {
|
|
790
|
+
"type": {
|
|
791
|
+
"text": ""
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
"parameters": [
|
|
795
|
+
{
|
|
796
|
+
"name": "selectedNodes",
|
|
797
|
+
"optional": true,
|
|
798
|
+
"type": {
|
|
799
|
+
"text": "TreeNode[]"
|
|
800
|
+
},
|
|
801
|
+
"description": "List of selected nodes to include in the event payload."
|
|
802
|
+
}
|
|
803
|
+
],
|
|
804
|
+
"description": "Utility function for sending a \"select\" event, so consumers of this component are aware a new node has been selected."
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"kind": "method",
|
|
808
|
+
"name": "deselectAllNodes",
|
|
809
|
+
"privacy": "public",
|
|
810
|
+
"description": "Public function that deselects all tree nodes."
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"kind": "method",
|
|
814
|
+
"name": "_sortNodes",
|
|
815
|
+
"privacy": "protected",
|
|
816
|
+
"return": {
|
|
817
|
+
"type": {
|
|
818
|
+
"text": "TreeNode[]"
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
"parameters": [
|
|
822
|
+
{
|
|
823
|
+
"name": "nodes",
|
|
824
|
+
"type": {
|
|
825
|
+
"text": "TreeNode[]"
|
|
826
|
+
},
|
|
827
|
+
"description": "List of nodes to be sorted"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "sortBy",
|
|
831
|
+
"optional": true,
|
|
832
|
+
"type": {
|
|
833
|
+
"text": "TreeMenuSorting"
|
|
834
|
+
},
|
|
835
|
+
"description": "Sorting option"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "groupFirst",
|
|
839
|
+
"default": "false",
|
|
840
|
+
"description": "Whether to prioritize group nodes, and place them on the top of the list."
|
|
841
|
+
}
|
|
842
|
+
],
|
|
843
|
+
"description": "Utility function that sorts the list of nodes based on the given sortBy method."
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"kind": "method",
|
|
847
|
+
"name": "_setTreeNodeId",
|
|
848
|
+
"privacy": "protected",
|
|
849
|
+
"return": {
|
|
850
|
+
"type": {
|
|
851
|
+
"text": "string"
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
"parameters": [
|
|
855
|
+
{
|
|
856
|
+
"name": "node",
|
|
857
|
+
"type": {
|
|
858
|
+
"text": "TreeNode"
|
|
859
|
+
},
|
|
860
|
+
"description": "The TreeNode object to cache"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"name": "randomId",
|
|
864
|
+
"default": "Math.random().toString(36).substring(2, 11)",
|
|
865
|
+
"description": "Optionally you can supply an ID to use for caching"
|
|
866
|
+
}
|
|
867
|
+
],
|
|
868
|
+
"description": "Function that caches a random ID into a key-value storage, linking the TreeNode with a generated ID.\nThis generated ID can be used somewhere else, for example in an HTMLElement ID as a unique identifier."
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"kind": "method",
|
|
872
|
+
"name": "_getSortFunction",
|
|
873
|
+
"privacy": "protected",
|
|
874
|
+
"return": {
|
|
875
|
+
"type": {
|
|
876
|
+
"text": "(a: TreeNode, b: TreeNode) => number"
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"parameters": [
|
|
880
|
+
{
|
|
881
|
+
"name": "sortBy",
|
|
882
|
+
"optional": true,
|
|
883
|
+
"type": {
|
|
884
|
+
"text": "TreeMenuSorting"
|
|
885
|
+
},
|
|
886
|
+
"description": "Sorting option to use, such as \"a_to_z\""
|
|
887
|
+
}
|
|
888
|
+
],
|
|
889
|
+
"description": "Function for retrieving the sorting for TreeNodes based on a sortBy parameter.\nThe sortBy parameter represents a key in the TreeNode object like 'label'."
|
|
890
|
+
}
|
|
891
|
+
],
|
|
892
|
+
"events": [
|
|
893
|
+
{
|
|
894
|
+
"name": "nodes",
|
|
895
|
+
"type": {
|
|
896
|
+
"text": "OrTreeDragEvent"
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"type": {
|
|
901
|
+
"text": "OrTreeSelectEvent"
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"type": {
|
|
906
|
+
"text": "OrTreeSelectEvent"
|
|
907
|
+
},
|
|
908
|
+
"description": "Triggers upon selecting a node, and dispatches a list of the nodes selected.",
|
|
909
|
+
"name": "or-tree-select"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"type": {
|
|
913
|
+
"text": "OrTreeDragEvent"
|
|
914
|
+
},
|
|
915
|
+
"description": "Triggers upon dragging a node to a new group, and dispatches a list of dragged nodes, the group node, and the updated list of all nodes.",
|
|
916
|
+
"name": "or-tree-drag"
|
|
917
|
+
}
|
|
918
|
+
],
|
|
919
|
+
"superclass": {
|
|
920
|
+
"name": "LitElement",
|
|
921
|
+
"package": "lit"
|
|
922
|
+
},
|
|
923
|
+
"customElement": true
|
|
924
|
+
}
|
|
925
|
+
],
|
|
926
|
+
"exports": [
|
|
927
|
+
{
|
|
928
|
+
"kind": "js",
|
|
929
|
+
"name": "*",
|
|
930
|
+
"declaration": {
|
|
931
|
+
"name": "*",
|
|
932
|
+
"package": "\"./or-tree-group\""
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"kind": "js",
|
|
937
|
+
"name": "*",
|
|
938
|
+
"declaration": {
|
|
939
|
+
"name": "*",
|
|
940
|
+
"package": "\"./or-tree-node\""
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"kind": "js",
|
|
945
|
+
"name": "*",
|
|
946
|
+
"declaration": {
|
|
947
|
+
"name": "*",
|
|
948
|
+
"package": "\"./model\""
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"kind": "js",
|
|
953
|
+
"name": "OrTreeMenu",
|
|
954
|
+
"declaration": {
|
|
955
|
+
"name": "OrTreeMenu",
|
|
956
|
+
"module": "src/index.ts"
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
]
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"kind": "javascript-module",
|
|
963
|
+
"path": "src/model.ts",
|
|
964
|
+
"declarations": [
|
|
965
|
+
{
|
|
966
|
+
"kind": "class",
|
|
967
|
+
"description": "Model for the SELECT event that OrTreeMenu can dispatch.\nOnce a node is selected, a list of all the selected nodes will be shared with the consumer elements.",
|
|
968
|
+
"name": "OrTreeSelectEvent",
|
|
969
|
+
"members": [
|
|
970
|
+
{
|
|
971
|
+
"kind": "field",
|
|
972
|
+
"name": "NAME",
|
|
973
|
+
"type": {
|
|
974
|
+
"text": "string"
|
|
975
|
+
},
|
|
976
|
+
"privacy": "public",
|
|
977
|
+
"static": true,
|
|
978
|
+
"readonly": true,
|
|
979
|
+
"default": "\"or-tree-select\""
|
|
980
|
+
}
|
|
981
|
+
],
|
|
982
|
+
"superclass": {
|
|
983
|
+
"name": "CustomEvent",
|
|
984
|
+
"module": "src/model.ts"
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"kind": "class",
|
|
989
|
+
"description": "Model for the DRAG event that OrTreeMenu can dispatch.\nOnce a node is dragged into (or outside) a group, we send details to consumer elements.",
|
|
990
|
+
"name": "OrTreeDragEvent",
|
|
991
|
+
"members": [
|
|
992
|
+
{
|
|
993
|
+
"kind": "field",
|
|
994
|
+
"name": "NAME",
|
|
995
|
+
"type": {
|
|
996
|
+
"text": "string"
|
|
997
|
+
},
|
|
998
|
+
"privacy": "public",
|
|
999
|
+
"static": true,
|
|
1000
|
+
"readonly": true,
|
|
1001
|
+
"default": "\"or-tree-drag\""
|
|
1002
|
+
}
|
|
1003
|
+
],
|
|
1004
|
+
"superclass": {
|
|
1005
|
+
"name": "CustomEvent",
|
|
1006
|
+
"module": "src/model.ts"
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
],
|
|
1010
|
+
"exports": [
|
|
1011
|
+
{
|
|
1012
|
+
"kind": "js",
|
|
1013
|
+
"name": "OrTreeSelectEvent",
|
|
1014
|
+
"declaration": {
|
|
1015
|
+
"name": "OrTreeSelectEvent",
|
|
1016
|
+
"module": "src/model.ts"
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"kind": "js",
|
|
1021
|
+
"name": "OrTreeDragEvent",
|
|
1022
|
+
"declaration": {
|
|
1023
|
+
"name": "OrTreeDragEvent",
|
|
1024
|
+
"module": "src/model.ts"
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
]
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"kind": "javascript-module",
|
|
1031
|
+
"path": "src/or-tree-group.ts",
|
|
1032
|
+
"declarations": [
|
|
1033
|
+
{
|
|
1034
|
+
"kind": "class",
|
|
1035
|
+
"description": "",
|
|
1036
|
+
"name": "OrTreeGroup",
|
|
1037
|
+
"cssParts": [
|
|
1038
|
+
{
|
|
1039
|
+
"description": "The chevron icon element for expanding/collapsing the group.",
|
|
1040
|
+
"name": "chevron"
|
|
1041
|
+
}
|
|
1042
|
+
],
|
|
1043
|
+
"slots": [
|
|
1044
|
+
{
|
|
1045
|
+
"description": "Default slot for child nodes within the group",
|
|
1046
|
+
"name": ""
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"description": "Slot for inserting a parent node",
|
|
1050
|
+
"name": "parent"
|
|
1051
|
+
}
|
|
1052
|
+
],
|
|
1053
|
+
"members": [
|
|
1054
|
+
{
|
|
1055
|
+
"kind": "field",
|
|
1056
|
+
"name": "expanded",
|
|
1057
|
+
"type": {
|
|
1058
|
+
"text": "boolean"
|
|
1059
|
+
},
|
|
1060
|
+
"privacy": "public",
|
|
1061
|
+
"default": "false",
|
|
1062
|
+
"description": "Determines the visibility of child nodes.\nSetting this to `false` hides them, and acts as a 'collapsed' state."
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"kind": "field",
|
|
1066
|
+
"name": "leaf",
|
|
1067
|
+
"type": {
|
|
1068
|
+
"text": "boolean"
|
|
1069
|
+
},
|
|
1070
|
+
"privacy": "public",
|
|
1071
|
+
"readonly": true,
|
|
1072
|
+
"default": "false",
|
|
1073
|
+
"description": "Only allows child nodes to be selected, making the expander (parent node) readonly.\nIf this is set to false, only the chevron icon can be used to collapse/expand the list."
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"kind": "field",
|
|
1077
|
+
"name": "readonly",
|
|
1078
|
+
"type": {
|
|
1079
|
+
"text": "boolean"
|
|
1080
|
+
},
|
|
1081
|
+
"privacy": "public",
|
|
1082
|
+
"readonly": true,
|
|
1083
|
+
"default": "false",
|
|
1084
|
+
"description": "Makes the group readonly"
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"kind": "field",
|
|
1088
|
+
"name": "_childNodes",
|
|
1089
|
+
"type": {
|
|
1090
|
+
"text": "Array<HTMLLIElement> | undefined"
|
|
1091
|
+
},
|
|
1092
|
+
"privacy": "protected"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"kind": "field",
|
|
1096
|
+
"name": "_parentNodes",
|
|
1097
|
+
"type": {
|
|
1098
|
+
"text": "Array<OrTreeNode> | undefined"
|
|
1099
|
+
},
|
|
1100
|
+
"privacy": "protected"
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
"kind": "field",
|
|
1104
|
+
"name": "_slotClickListener",
|
|
1105
|
+
"privacy": "protected",
|
|
1106
|
+
"description": "A click event listener on the component, used for selecting, expanding, and collapsing the group"
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
"kind": "field",
|
|
1110
|
+
"name": "_chevronClickListener",
|
|
1111
|
+
"privacy": "protected",
|
|
1112
|
+
"description": "A click event listener on the chevron, used for expanding/collapsing the group"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"kind": "field",
|
|
1116
|
+
"name": "styles",
|
|
1117
|
+
"static": true,
|
|
1118
|
+
"readonly": true
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"kind": "method",
|
|
1122
|
+
"name": "select",
|
|
1123
|
+
"privacy": "public",
|
|
1124
|
+
"description": "Selects the group (parent) node."
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"kind": "method",
|
|
1128
|
+
"name": "selectAll",
|
|
1129
|
+
"privacy": "public",
|
|
1130
|
+
"description": "Selects the group node itself, and all children nodes within that group."
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
"kind": "method",
|
|
1134
|
+
"name": "deselect",
|
|
1135
|
+
"privacy": "public",
|
|
1136
|
+
"description": "Deselects the group (parent) node."
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"kind": "method",
|
|
1140
|
+
"name": "deselectAll",
|
|
1141
|
+
"privacy": "public",
|
|
1142
|
+
"description": "Deselects the group node itself, and all children nodes within that group."
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
"kind": "method",
|
|
1146
|
+
"name": "getGroupNode",
|
|
1147
|
+
"privacy": "public",
|
|
1148
|
+
"return": {
|
|
1149
|
+
"type": {
|
|
1150
|
+
"text": "OrTreeNode | undefined"
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
"description": "Returns the group (parent) node (OrTreeNode) using a query selector."
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
"kind": "method",
|
|
1157
|
+
"name": "getChildNodes",
|
|
1158
|
+
"privacy": "public",
|
|
1159
|
+
"return": {
|
|
1160
|
+
"type": {
|
|
1161
|
+
"text": "OrTreeNode[]"
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
"description": "Returns a list of all children nodes (OrTreeNode) within the group, using a query selector."
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"kind": "method",
|
|
1168
|
+
"name": "firstUpdated",
|
|
1169
|
+
"parameters": [
|
|
1170
|
+
{
|
|
1171
|
+
"name": "changedProps",
|
|
1172
|
+
"type": {
|
|
1173
|
+
"text": "PropertyValues"
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
]
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"kind": "method",
|
|
1180
|
+
"name": "render",
|
|
1181
|
+
"return": {
|
|
1182
|
+
"type": {
|
|
1183
|
+
"text": "TemplateResult"
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"kind": "method",
|
|
1189
|
+
"name": "_getIconTemplate",
|
|
1190
|
+
"privacy": "protected",
|
|
1191
|
+
"return": {
|
|
1192
|
+
"type": {
|
|
1193
|
+
"text": "TemplateResult"
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
"parameters": [
|
|
1197
|
+
{
|
|
1198
|
+
"name": "expanded",
|
|
1199
|
+
"default": "false",
|
|
1200
|
+
"description": "State of the group"
|
|
1201
|
+
}
|
|
1202
|
+
],
|
|
1203
|
+
"description": "Returns an HTML template that represents the icon for this group."
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
"kind": "method",
|
|
1207
|
+
"name": "_onExpandToggle",
|
|
1208
|
+
"privacy": "protected",
|
|
1209
|
+
"parameters": [
|
|
1210
|
+
{
|
|
1211
|
+
"name": "_ev",
|
|
1212
|
+
"type": {
|
|
1213
|
+
"text": "MouseEvent"
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
],
|
|
1217
|
+
"description": "Function that expands/collapses the group, changing the visibility of the child nodes."
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"kind": "method",
|
|
1221
|
+
"name": "_onSlotChange",
|
|
1222
|
+
"privacy": "protected",
|
|
1223
|
+
"parameters": [
|
|
1224
|
+
{
|
|
1225
|
+
"name": "_ev",
|
|
1226
|
+
"type": {
|
|
1227
|
+
"text": "Event"
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
],
|
|
1231
|
+
"description": "Event listener for 'slotchange' of the default slot.\nNormally triggers when <or-tree-node> elements are added or removed."
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
"kind": "method",
|
|
1235
|
+
"name": "_applyIndentToChildren",
|
|
1236
|
+
"privacy": "protected",
|
|
1237
|
+
"parameters": [
|
|
1238
|
+
{
|
|
1239
|
+
"name": "children",
|
|
1240
|
+
"default": "this.getChildNodes()",
|
|
1241
|
+
"description": "Node elements to apply padding to."
|
|
1242
|
+
}
|
|
1243
|
+
],
|
|
1244
|
+
"description": "Function that applies CSS to TreeNode based on the group indentation.\nIt loops through all parent elements, and detects the amount of or-tree-group elements it is in.\nThe more nested in the tree, the more left handed padding is applied."
|
|
1245
|
+
}
|
|
1246
|
+
],
|
|
1247
|
+
"superclass": {
|
|
1248
|
+
"name": "LitElement",
|
|
1249
|
+
"package": "lit"
|
|
1250
|
+
},
|
|
1251
|
+
"customElement": true
|
|
1252
|
+
}
|
|
1253
|
+
],
|
|
1254
|
+
"exports": [
|
|
1255
|
+
{
|
|
1256
|
+
"kind": "js",
|
|
1257
|
+
"name": "OrTreeGroup",
|
|
1258
|
+
"declaration": {
|
|
1259
|
+
"name": "OrTreeGroup",
|
|
1260
|
+
"module": "src/or-tree-group.ts"
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
]
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"kind": "javascript-module",
|
|
1267
|
+
"path": "src/or-tree-node.ts",
|
|
1268
|
+
"declarations": [
|
|
1269
|
+
{
|
|
1270
|
+
"kind": "class",
|
|
1271
|
+
"description": "",
|
|
1272
|
+
"name": "OrTreeNode",
|
|
1273
|
+
"cssProperties": [
|
|
1274
|
+
{
|
|
1275
|
+
"description": "Controls the height of the node",
|
|
1276
|
+
"name": "--or-tree-node-height"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"description": "Controls the left padding of the node",
|
|
1280
|
+
"name": "--or-tree-node-indent"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"description": "Sets the default background",
|
|
1284
|
+
"name": "--or-tree-node-background"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"description": "Sets the background while hovering",
|
|
1288
|
+
"name": "--or-tree-node-background--hovered"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"description": "Sets the background when selected",
|
|
1292
|
+
"name": "--or-tree-node-background--selected"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"description": "Sets the primary color of the node when selected",
|
|
1296
|
+
"name": "--or-tree-node-color--selected"
|
|
1297
|
+
}
|
|
1298
|
+
],
|
|
1299
|
+
"slots": [
|
|
1300
|
+
{
|
|
1301
|
+
"description": "Appends elements to the left hand side of the node, commonly used for icons.",
|
|
1302
|
+
"name": "prefix"
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"description": "Default slot for the main content, commonly used for text.",
|
|
1306
|
+
"name": ""
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
"description": "Appends elements to the right hand side of the node.",
|
|
1310
|
+
"name": "suffix"
|
|
1311
|
+
}
|
|
1312
|
+
],
|
|
1313
|
+
"members": [
|
|
1314
|
+
{
|
|
1315
|
+
"kind": "field",
|
|
1316
|
+
"name": "readonly",
|
|
1317
|
+
"type": {
|
|
1318
|
+
"text": "boolean"
|
|
1319
|
+
},
|
|
1320
|
+
"privacy": "public",
|
|
1321
|
+
"default": "false",
|
|
1322
|
+
"description": "HTML attribute that only applies CSS, showing this node cannot be interacted with."
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"kind": "field",
|
|
1326
|
+
"name": "selected",
|
|
1327
|
+
"type": {
|
|
1328
|
+
"text": "boolean"
|
|
1329
|
+
},
|
|
1330
|
+
"privacy": "public",
|
|
1331
|
+
"default": "false",
|
|
1332
|
+
"description": "HTML attribute that only applies CSS, marking the node as 'selected'."
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"kind": "field",
|
|
1336
|
+
"name": "styles",
|
|
1337
|
+
"static": true,
|
|
1338
|
+
"readonly": true
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"kind": "method",
|
|
1342
|
+
"name": "render",
|
|
1343
|
+
"privacy": "protected",
|
|
1344
|
+
"return": {
|
|
1345
|
+
"type": {
|
|
1346
|
+
"text": "TemplateResult"
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
],
|
|
1351
|
+
"superclass": {
|
|
1352
|
+
"name": "LitElement",
|
|
1353
|
+
"package": "lit"
|
|
1354
|
+
},
|
|
1355
|
+
"customElement": true
|
|
1356
|
+
}
|
|
1357
|
+
],
|
|
1358
|
+
"exports": [
|
|
1359
|
+
{
|
|
1360
|
+
"kind": "js",
|
|
1361
|
+
"name": "OrTreeNode",
|
|
1362
|
+
"declaration": {
|
|
1363
|
+
"name": "OrTreeNode",
|
|
1364
|
+
"module": "src/or-tree-node.ts"
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
]
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
"kind": "javascript-module",
|
|
1371
|
+
"path": "src/util.ts",
|
|
1372
|
+
"declarations": [
|
|
1373
|
+
{
|
|
1374
|
+
"kind": "function",
|
|
1375
|
+
"name": "moveNodesToGroupNode",
|
|
1376
|
+
"return": {
|
|
1377
|
+
"type": {
|
|
1378
|
+
"text": "TreeNode[]"
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
"parameters": [
|
|
1382
|
+
{
|
|
1383
|
+
"name": "nodesToMove",
|
|
1384
|
+
"type": {
|
|
1385
|
+
"text": "TreeNode[]"
|
|
1386
|
+
},
|
|
1387
|
+
"description": "The array of nodes that are moved into a group."
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
"name": "groupNode",
|
|
1391
|
+
"optional": true,
|
|
1392
|
+
"type": {
|
|
1393
|
+
"text": "TreeNode"
|
|
1394
|
+
},
|
|
1395
|
+
"description": "The group node to insert nodesToMove in."
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
"name": "treeNodes",
|
|
1399
|
+
"default": "[]",
|
|
1400
|
+
"type": {
|
|
1401
|
+
"text": "TreeNode[]"
|
|
1402
|
+
},
|
|
1403
|
+
"description": "Full list of nodes in the tree menu."
|
|
1404
|
+
}
|
|
1405
|
+
],
|
|
1406
|
+
"description": "Utility function that moves an array of TreeNode into another TreeNode, by adding them to their children.\nThe function takes care of removing the nodes from the former group, and makes sure no duplicates end up in the list."
|
|
1407
|
+
}
|
|
1408
|
+
],
|
|
1409
|
+
"exports": [
|
|
1410
|
+
{
|
|
1411
|
+
"kind": "js",
|
|
1412
|
+
"name": "moveNodesToGroupNode",
|
|
1413
|
+
"declaration": {
|
|
1414
|
+
"name": "moveNodesToGroupNode",
|
|
1415
|
+
"module": "src/util.ts"
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
]
|
|
1419
|
+
}
|
|
1420
|
+
]
|
|
1421
|
+
}
|