@openremote/or-tree-menu 1.8.0-snapshot.20250725120002 → 1.8.0-snapshot.20250728102340
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/README.md +1 -1
- package/custom-elements.json +22 -22
- package/dist/umd/index.bundle.js +731 -731
- package/dist/umd/index.bundle.js.map +1 -1
- package/dist/umd/index.js +731 -731
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.orbundle.js +789 -789
- package/dist/umd/index.orbundle.js.map +1 -1
- package/lib/index.js +103 -713
- package/lib/model.js +1 -76
- package/lib/or-tree-group.js +49 -226
- package/lib/or-tree-node.js +40 -111
- package/lib/util.js +1 -39
- package/package.json +5 -5
- package/rspack.config.js +13 -13
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# @openremote/or-tree-menu \<or-tree-menu\>
|
|
1
|
+
# @openremote/or-tree-menu \<or-tree-menu\>
|
package/custom-elements.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"privacy": "public",
|
|
21
21
|
"default": "[]",
|
|
22
|
-
"description": "List of node items in the menu.\
|
|
22
|
+
"description": "List of node items in the menu.\nUses the TreeNode format for rendering the OrTreeNode elements.",
|
|
23
23
|
"attribute": "nodes"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"text": "TreeMenuSelection"
|
|
30
30
|
},
|
|
31
31
|
"privacy": "public",
|
|
32
|
-
"description": "Changes the allowed selection method within the tree.\
|
|
32
|
+
"description": "Changes the allowed selection method within the tree.\nCommon options are `LEAF`, `SINGLE` and `MULTI`.",
|
|
33
33
|
"attribute": "selection"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"description": "The group node to insert nodesToMove in."
|
|
152
152
|
}
|
|
153
153
|
],
|
|
154
|
-
"description": "Function that moves an array of TreeNode into another TreeNode, by adding them to their children.\
|
|
154
|
+
"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."
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
"kind": "method",
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
"description": "Node to be rendered"
|
|
248
248
|
}
|
|
249
249
|
],
|
|
250
|
-
"description": "Returns an HTML template for the slot element inside <or-tree-node>.\
|
|
250
|
+
"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."
|
|
251
251
|
},
|
|
252
252
|
{
|
|
253
253
|
"kind": "method",
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
"description": "Node to be rendered"
|
|
296
296
|
}
|
|
297
297
|
],
|
|
298
|
-
"description": "Returns an HTML template for the parent slot element inside <or-tree-group>.\
|
|
298
|
+
"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."
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"kind": "method",
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
],
|
|
378
|
-
"description": "HTML callback event for clicking on a group node. (aka a node with children)\
|
|
378
|
+
"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."
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
"kind": "method",
|
|
@@ -683,7 +683,7 @@
|
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
685
|
],
|
|
686
|
-
"description": "Function that notifies parent HTMLElements that a tree node got selected.\
|
|
686
|
+
"description": "Function that notifies parent HTMLElements that a tree node got selected.\nIt dispatches the OrTreeSelectEvent, which includes a list of the selected nodes.",
|
|
687
687
|
"return": {
|
|
688
688
|
"type": {
|
|
689
689
|
"text": ""
|
|
@@ -708,7 +708,7 @@
|
|
|
708
708
|
{
|
|
709
709
|
"name": "cache",
|
|
710
710
|
"default": "this._treeNodeCache",
|
|
711
|
-
"description": "Optionally, supply the cache for retrieving a {@link TreeNode}object from a <or-tree-node> element.\
|
|
711
|
+
"description": "Optionally, supply the cache for retrieving a {@link TreeNode}object from a <or-tree-node> element.\n "
|
|
712
712
|
}
|
|
713
713
|
],
|
|
714
714
|
"description": "Utility function to detect the selected tree nodes."
|
|
@@ -846,7 +846,7 @@
|
|
|
846
846
|
"description": "Optionally you can supply an ID to use for caching"
|
|
847
847
|
}
|
|
848
848
|
],
|
|
849
|
-
"description": "Function that caches a random ID into a key-value storage, linking the TreeNode with a generated ID.\
|
|
849
|
+
"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."
|
|
850
850
|
},
|
|
851
851
|
{
|
|
852
852
|
"kind": "method",
|
|
@@ -867,7 +867,7 @@
|
|
|
867
867
|
"description": "Sorting option to use, such as \"a_to_z\""
|
|
868
868
|
}
|
|
869
869
|
],
|
|
870
|
-
"description": "Function for retrieving the sorting for TreeNodes based on a sortBy parameter.\
|
|
870
|
+
"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'."
|
|
871
871
|
},
|
|
872
872
|
{
|
|
873
873
|
"kind": "method",
|
|
@@ -882,7 +882,7 @@
|
|
|
882
882
|
"description": "The ID of the group to expand."
|
|
883
883
|
}
|
|
884
884
|
],
|
|
885
|
-
"description": "Programmatically finds a group by its ID and sets it to be expanded.\
|
|
885
|
+
"description": "Programmatically finds a group by its ID and sets it to be expanded.\nThis is called by the parent component after a new node is added to a tree group."
|
|
886
886
|
}
|
|
887
887
|
],
|
|
888
888
|
"events": [
|
|
@@ -919,7 +919,7 @@
|
|
|
919
919
|
"text": "TreeNode[]"
|
|
920
920
|
},
|
|
921
921
|
"default": "[]",
|
|
922
|
-
"description": "List of node items in the menu.\
|
|
922
|
+
"description": "List of node items in the menu.\nUses the TreeNode format for rendering the OrTreeNode elements.",
|
|
923
923
|
"fieldName": "nodes"
|
|
924
924
|
},
|
|
925
925
|
{
|
|
@@ -927,7 +927,7 @@
|
|
|
927
927
|
"type": {
|
|
928
928
|
"text": "TreeMenuSelection"
|
|
929
929
|
},
|
|
930
|
-
"description": "Changes the allowed selection method within the tree.\
|
|
930
|
+
"description": "Changes the allowed selection method within the tree.\nCommon options are `LEAF`, `SINGLE` and `MULTI`.",
|
|
931
931
|
"fieldName": "selection"
|
|
932
932
|
},
|
|
933
933
|
{
|
|
@@ -1040,7 +1040,7 @@
|
|
|
1040
1040
|
"declarations": [
|
|
1041
1041
|
{
|
|
1042
1042
|
"kind": "class",
|
|
1043
|
-
"description": "Model for the SELECT event that OrTreeMenu can dispatch.\
|
|
1043
|
+
"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.",
|
|
1044
1044
|
"name": "OrTreeSelectEvent",
|
|
1045
1045
|
"members": [
|
|
1046
1046
|
{
|
|
@@ -1062,7 +1062,7 @@
|
|
|
1062
1062
|
},
|
|
1063
1063
|
{
|
|
1064
1064
|
"kind": "class",
|
|
1065
|
-
"description": "Model for the DRAG event that OrTreeMenu can dispatch.\
|
|
1065
|
+
"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.",
|
|
1066
1066
|
"name": "OrTreeDragEvent",
|
|
1067
1067
|
"members": [
|
|
1068
1068
|
{
|
|
@@ -1135,7 +1135,7 @@
|
|
|
1135
1135
|
},
|
|
1136
1136
|
"privacy": "public",
|
|
1137
1137
|
"default": "false",
|
|
1138
|
-
"description": "Determines the visibility of child nodes.\
|
|
1138
|
+
"description": "Determines the visibility of child nodes.\nSetting this to `false` hides them, and acts as a 'collapsed' state.",
|
|
1139
1139
|
"attribute": "expanded",
|
|
1140
1140
|
"reflects": true
|
|
1141
1141
|
},
|
|
@@ -1148,7 +1148,7 @@
|
|
|
1148
1148
|
"privacy": "public",
|
|
1149
1149
|
"readonly": true,
|
|
1150
1150
|
"default": "false",
|
|
1151
|
-
"description": "Only allows child nodes to be selected, making the expander (parent node) readonly.\
|
|
1151
|
+
"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.",
|
|
1152
1152
|
"attribute": "leaf"
|
|
1153
1153
|
},
|
|
1154
1154
|
{
|
|
@@ -1281,7 +1281,7 @@
|
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
],
|
|
1284
|
-
"description": "Event listener for 'slotchange' of the default slot.\
|
|
1284
|
+
"description": "Event listener for 'slotchange' of the default slot.\nNormally triggers when <or-tree-node> elements are added or removed."
|
|
1285
1285
|
},
|
|
1286
1286
|
{
|
|
1287
1287
|
"kind": "method",
|
|
@@ -1294,7 +1294,7 @@
|
|
|
1294
1294
|
"description": "Node elements to apply padding to."
|
|
1295
1295
|
}
|
|
1296
1296
|
],
|
|
1297
|
-
"description": "Function that applies CSS to TreeNode based on the group indentation.\
|
|
1297
|
+
"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."
|
|
1298
1298
|
}
|
|
1299
1299
|
],
|
|
1300
1300
|
"attributes": [
|
|
@@ -1304,7 +1304,7 @@
|
|
|
1304
1304
|
"text": "boolean"
|
|
1305
1305
|
},
|
|
1306
1306
|
"default": "false",
|
|
1307
|
-
"description": "Determines the visibility of child nodes.\
|
|
1307
|
+
"description": "Determines the visibility of child nodes.\nSetting this to `false` hides them, and acts as a 'collapsed' state.",
|
|
1308
1308
|
"fieldName": "expanded"
|
|
1309
1309
|
},
|
|
1310
1310
|
{
|
|
@@ -1314,7 +1314,7 @@
|
|
|
1314
1314
|
},
|
|
1315
1315
|
"readonly": true,
|
|
1316
1316
|
"default": "false",
|
|
1317
|
-
"description": "Only allows child nodes to be selected, making the expander (parent node) readonly.\
|
|
1317
|
+
"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.",
|
|
1318
1318
|
"fieldName": "leaf"
|
|
1319
1319
|
},
|
|
1320
1320
|
{
|
|
@@ -1513,7 +1513,7 @@
|
|
|
1513
1513
|
"description": "Full list of nodes in the tree menu."
|
|
1514
1514
|
}
|
|
1515
1515
|
],
|
|
1516
|
-
"description": "Utility function that moves an array of TreeNode into another TreeNode, by adding them to their children.\
|
|
1516
|
+
"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."
|
|
1517
1517
|
}
|
|
1518
1518
|
],
|
|
1519
1519
|
"exports": [
|