@elliemae/ds-treeview 2.1.0 → 2.2.0-alpha.3
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/cjs/TreeView.js +49 -31
- package/cjs/TreeView.js.map +7 -0
- package/cjs/TreeViewContext.js +53 -35
- package/cjs/TreeViewContext.js.map +7 -0
- package/cjs/config/cssClassesConstants.js +41 -13
- package/cjs/config/cssClassesConstants.js.map +7 -0
- package/cjs/config/useTreeview.js +108 -80
- package/cjs/config/useTreeview.js.map +7 -0
- package/cjs/index.js +37 -27
- package/cjs/index.js.map +7 -0
- package/cjs/parts/CheckboxSelectable.js +70 -59
- package/cjs/parts/CheckboxSelectable.js.map +7 -0
- package/cjs/parts/ChildrenCountDisplayer.js +45 -28
- package/cjs/parts/ChildrenCountDisplayer.js.map +7 -0
- package/cjs/parts/ExpandCaret.js +85 -83
- package/cjs/parts/ExpandCaret.js.map +7 -0
- package/cjs/parts/Icon.js +46 -31
- package/cjs/parts/Icon.js.map +7 -0
- package/cjs/parts/NestingSpace.js +43 -35
- package/cjs/parts/NestingSpace.js.map +7 -0
- package/cjs/parts/RadioSelectable.js +52 -37
- package/cjs/parts/RadioSelectable.js.map +7 -0
- package/cjs/parts/TreeItem.js +128 -147
- package/cjs/parts/TreeItem.js.map +7 -0
- package/cjs/parts/TreeItemText.js +88 -95
- package/cjs/parts/TreeItemText.js.map +7 -0
- package/cjs/parts/TreeList.js +117 -130
- package/cjs/parts/TreeList.js.map +7 -0
- package/cjs/plugins/dnd/TreeDndPlugin.js +51 -36
- package/cjs/plugins/dnd/TreeDndPlugin.js.map +7 -0
- package/cjs/plugins/dnd/index.js +28 -10
- package/cjs/plugins/dnd/index.js.map +7 -0
- package/cjs/plugins/index.js +34 -22
- package/cjs/plugins/index.js.map +7 -0
- package/cjs/plugins/roving/TreeRovingPlugin.js +35 -7
- package/cjs/plugins/roving/TreeRovingPlugin.js.map +7 -0
- package/cjs/plugins/roving/index.js +28 -9
- package/cjs/plugins/roving/index.js.map +7 -0
- package/cjs/plugins/searchable/SearchableTreePlugin.js +35 -7
- package/cjs/plugins/searchable/SearchableTreePlugin.js.map +7 -0
- package/cjs/plugins/searchable/index.js +28 -9
- package/cjs/plugins/searchable/index.js.map +7 -0
- package/cjs/plugins/selectable/SelectablePluginTree.js +35 -7
- package/cjs/plugins/selectable/SelectablePluginTree.js.map +7 -0
- package/cjs/plugins/selectable/index.js +28 -9
- package/cjs/plugins/selectable/index.js.map +7 -0
- package/cjs/plugins/toolbar/TreeToolbarPlugin.js +35 -7
- package/cjs/plugins/toolbar/TreeToolbarPlugin.js.map +7 -0
- package/cjs/plugins/toolbar/index.js +28 -9
- package/cjs/plugins/toolbar/index.js.map +7 -0
- package/cjs/plugins/tree/TreeDataPlugin.js +35 -7
- package/cjs/plugins/tree/TreeDataPlugin.js.map +7 -0
- package/cjs/plugins/tree/index.js +28 -9
- package/cjs/plugins/tree/index.js.map +7 -0
- package/cjs/plugins/virtualization/TreeVirtualizationPlugin.js +35 -7
- package/cjs/plugins/virtualization/TreeVirtualizationPlugin.js.map +7 -0
- package/cjs/plugins/virtualization/index.js +28 -9
- package/cjs/plugins/virtualization/index.js.map +7 -0
- package/cjs/react-desc-prop-types.js +82 -53
- package/cjs/react-desc-prop-types.js.map +7 -0
- package/cjs/related-components/TreeViewSearchBar.js +42 -40
- package/cjs/related-components/TreeViewSearchBar.js.map +7 -0
- package/cjs/sharedTypes.js +27 -2
- package/cjs/sharedTypes.js.map +7 -0
- package/cjs/utils/array-helpers.js +35 -11
- package/cjs/utils/array-helpers.js.map +7 -0
- package/cjs/utils/dnd-helpers.js +90 -84
- package/cjs/utils/dnd-helpers.js.map +7 -0
- package/cjs/utils/group-expands-helpers.js +86 -59
- package/cjs/utils/group-expands-helpers.js.map +7 -0
- package/cjs/utils/keyboard-helpers.js +84 -88
- package/cjs/utils/keyboard-helpers.js.map +7 -0
- package/cjs/utils/object-helpers.js +43 -36
- package/cjs/utils/object-helpers.js.map +7 -0
- package/cjs/utils/refs-helpers.js +43 -22
- package/cjs/utils/refs-helpers.js.map +7 -0
- package/cjs/utils/selectable-helper.js +61 -53
- package/cjs/utils/selectable-helper.js.map +7 -0
- package/cjs/utils/string-helpers.js +35 -7
- package/cjs/utils/string-helpers.js.map +7 -0
- package/cjs/utils/tree-helpers.js +105 -135
- package/cjs/utils/tree-helpers.js.map +7 -0
- package/cjs/utils/useDnDHelpers.js +97 -118
- package/cjs/utils/useDnDHelpers.js.map +7 -0
- package/cjs/utils/useInstanceRefActions.js +54 -43
- package/cjs/utils/useInstanceRefActions.js.map +7 -0
- package/cjs/utils/useTree.js +76 -78
- package/cjs/utils/useTree.js.map +7 -0
- package/esm/TreeView.js +18 -20
- package/esm/TreeView.js.map +7 -0
- package/esm/TreeViewContext.js +24 -29
- package/esm/TreeViewContext.js.map +7 -0
- package/esm/config/cssClassesConstants.js +12 -6
- package/esm/config/cssClassesConstants.js.map +7 -0
- package/esm/config/useTreeview.js +61 -54
- package/esm/config/useTreeview.js.map +7 -0
- package/esm/index.js +8 -9
- package/esm/index.js.map +7 -0
- package/esm/parts/CheckboxSelectable.js +36 -46
- package/esm/parts/CheckboxSelectable.js.map +7 -0
- package/esm/parts/ChildrenCountDisplayer.js +16 -20
- package/esm/parts/ChildrenCountDisplayer.js.map +7 -0
- package/esm/parts/ExpandCaret.js +54 -72
- package/esm/parts/ExpandCaret.js.map +7 -0
- package/esm/parts/Icon.js +16 -22
- package/esm/parts/Icon.js.map +7 -0
- package/esm/parts/NestingSpace.js +14 -27
- package/esm/parts/NestingSpace.js.map +7 -0
- package/esm/parts/RadioSelectable.js +20 -28
- package/esm/parts/RadioSelectable.js.map +7 -0
- package/esm/parts/TreeItem.js +91 -127
- package/esm/parts/TreeItem.js.map +7 -0
- package/esm/parts/TreeItemText.js +58 -85
- package/esm/parts/TreeItemText.js.map +7 -0
- package/esm/parts/TreeList.js +88 -117
- package/esm/parts/TreeList.js.map +7 -0
- package/esm/plugins/dnd/TreeDndPlugin.js +21 -26
- package/esm/plugins/dnd/TreeDndPlugin.js.map +7 -0
- package/esm/plugins/dnd/index.js +3 -1
- package/esm/plugins/dnd/index.js.map +7 -0
- package/esm/plugins/index.js +9 -7
- package/esm/plugins/index.js.map +7 -0
- package/esm/plugins/roving/TreeRovingPlugin.js +6 -3
- package/esm/plugins/roving/TreeRovingPlugin.js.map +7 -0
- package/esm/plugins/roving/index.js +3 -1
- package/esm/plugins/roving/index.js.map +7 -0
- package/esm/plugins/searchable/SearchableTreePlugin.js +6 -3
- package/esm/plugins/searchable/SearchableTreePlugin.js.map +7 -0
- package/esm/plugins/searchable/index.js +3 -1
- package/esm/plugins/searchable/index.js.map +7 -0
- package/esm/plugins/selectable/SelectablePluginTree.js +6 -3
- package/esm/plugins/selectable/SelectablePluginTree.js.map +7 -0
- package/esm/plugins/selectable/index.js +3 -1
- package/esm/plugins/selectable/index.js.map +7 -0
- package/esm/plugins/toolbar/TreeToolbarPlugin.js +6 -3
- package/esm/plugins/toolbar/TreeToolbarPlugin.js.map +7 -0
- package/esm/plugins/toolbar/index.js +3 -1
- package/esm/plugins/toolbar/index.js.map +7 -0
- package/esm/plugins/tree/TreeDataPlugin.js +6 -3
- package/esm/plugins/tree/TreeDataPlugin.js.map +7 -0
- package/esm/plugins/tree/index.js +3 -1
- package/esm/plugins/tree/index.js.map +7 -0
- package/esm/plugins/virtualization/TreeVirtualizationPlugin.js +6 -3
- package/esm/plugins/virtualization/TreeVirtualizationPlugin.js.map +7 -0
- package/esm/plugins/virtualization/index.js +3 -1
- package/esm/plugins/virtualization/index.js.map +7 -0
- package/esm/react-desc-prop-types.js +47 -43
- package/esm/react-desc-prop-types.js.map +7 -0
- package/esm/related-components/TreeViewSearchBar.js +13 -32
- package/esm/related-components/TreeViewSearchBar.js.map +7 -0
- package/esm/sharedTypes.js +2 -1
- package/esm/sharedTypes.js.map +7 -0
- package/esm/utils/array-helpers.js +6 -6
- package/esm/utils/array-helpers.js.map +7 -0
- package/esm/utils/dnd-helpers.js +58 -73
- package/esm/utils/dnd-helpers.js.map +7 -0
- package/esm/utils/group-expands-helpers.js +56 -46
- package/esm/utils/group-expands-helpers.js.map +7 -0
- package/esm/utils/keyboard-helpers.js +45 -72
- package/esm/utils/keyboard-helpers.js.map +7 -0
- package/esm/utils/object-helpers.js +14 -31
- package/esm/utils/object-helpers.js.map +7 -0
- package/esm/utils/refs-helpers.js +15 -19
- package/esm/utils/refs-helpers.js.map +7 -0
- package/esm/utils/selectable-helper.js +32 -43
- package/esm/utils/selectable-helper.js.map +7 -0
- package/esm/utils/string-helpers.js +6 -3
- package/esm/utils/string-helpers.js.map +7 -0
- package/esm/utils/tree-helpers.js +74 -119
- package/esm/utils/tree-helpers.js.map +7 -0
- package/esm/utils/useDnDHelpers.js +60 -106
- package/esm/utils/useDnDHelpers.js.map +7 -0
- package/esm/utils/useInstanceRefActions.js +21 -35
- package/esm/utils/useInstanceRefActions.js.map +7 -0
- package/esm/utils/useTree.js +35 -57
- package/esm/utils/useTree.js.map +7 -0
- package/package.json +10 -10
package/cjs/utils/dnd-helpers.js
CHANGED
|
@@ -1,10 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var dnd_helpers_exports = {};
|
|
29
|
+
__export(dnd_helpers_exports, {
|
|
30
|
+
inferHoverItemKinshipDrop: () => inferHoverItemKinshipDrop,
|
|
31
|
+
inferKeyboardKinshipDrop: () => inferKeyboardKinshipDrop,
|
|
32
|
+
isDropValid: () => isDropValid,
|
|
33
|
+
keyCodes: () => keyCodes,
|
|
34
|
+
sameParentAsHoverItemDrop: () => sameParentAsHoverItemDrop
|
|
35
|
+
});
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_tree_helpers = __toESM(require("./tree-helpers"));
|
|
8
38
|
const keyCodes = {
|
|
9
39
|
lift: [32, 13],
|
|
10
40
|
drop: [32, 13],
|
|
@@ -12,58 +42,49 @@ const keyCodes = {
|
|
|
12
42
|
up: [38, 37],
|
|
13
43
|
down: [40, 39]
|
|
14
44
|
};
|
|
15
|
-
const sameParentAsHoverItemDrop =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
45
|
+
const sameParentAsHoverItemDrop = ({
|
|
46
|
+
isBefore,
|
|
47
|
+
isAfter,
|
|
48
|
+
draggedItem,
|
|
49
|
+
overItem,
|
|
50
|
+
movementDirection
|
|
51
|
+
}) => {
|
|
23
52
|
const hoveredItemNodeNestedIndex = overItem.node.getIndex();
|
|
24
|
-
let newParentNode =
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const {
|
|
29
|
-
treeDepth: overItemTreeDepth
|
|
30
|
-
} = overItem;
|
|
31
|
-
const directionOffset = // we don't apply the offset for direction
|
|
32
|
-
// if moving from less nested to more nested
|
|
33
|
-
// or moving bottom to top
|
|
34
|
-
// the offset is required when moving elemnts down in their nest level
|
|
35
|
-
draggedItemTreeDepth <= overItemTreeDepth && movementDirection === 'topToBottom' ? -1 : 0;
|
|
53
|
+
let newParentNode = (0, import_tree_helpers.getItemsParentNode)([overItem], true);
|
|
54
|
+
const { treeDepth: draggedItemTreeDepth } = draggedItem;
|
|
55
|
+
const { treeDepth: overItemTreeDepth } = overItem;
|
|
56
|
+
const directionOffset = draggedItemTreeDepth <= overItemTreeDepth && movementDirection === "topToBottom" ? -1 : 0;
|
|
36
57
|
let newNestedIndex;
|
|
37
|
-
if (isBefore)
|
|
38
|
-
newNestedIndex =
|
|
39
|
-
|
|
58
|
+
if (isBefore)
|
|
59
|
+
newNestedIndex = hoveredItemNodeNestedIndex + directionOffset;
|
|
60
|
+
else if (isAfter)
|
|
61
|
+
newNestedIndex = hoveredItemNodeNestedIndex + 1 + directionOffset;
|
|
62
|
+
else {
|
|
63
|
+
newNestedIndex = overItem.children.length;
|
|
40
64
|
newParentNode = overItem.node;
|
|
41
65
|
}
|
|
42
|
-
if (newNestedIndex < 0)
|
|
66
|
+
if (newNestedIndex < 0)
|
|
67
|
+
newNestedIndex = 0;
|
|
43
68
|
return {
|
|
44
69
|
newNestedIndex,
|
|
45
70
|
newParentNode
|
|
46
71
|
};
|
|
47
72
|
};
|
|
48
|
-
const inferHoverItemKinshipDrop =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} = _ref2;
|
|
73
|
+
const inferHoverItemKinshipDrop = ({
|
|
74
|
+
isBefore,
|
|
75
|
+
isAfter,
|
|
76
|
+
draggedItem,
|
|
77
|
+
overItem,
|
|
78
|
+
movementDirection
|
|
79
|
+
}) => {
|
|
56
80
|
const hoverItemModel = overItem.node.model;
|
|
57
81
|
const isGroupAndIsExpanded = hoverItemModel.isExpanded && hoverItemModel.children.length > 0;
|
|
58
|
-
|
|
59
82
|
if (isAfter && isGroupAndIsExpanded) {
|
|
60
83
|
return {
|
|
61
84
|
newNestedIndex: 0,
|
|
62
|
-
// append after the group, so basically as first child
|
|
63
85
|
newParentNode: overItem.node
|
|
64
86
|
};
|
|
65
87
|
}
|
|
66
|
-
|
|
67
88
|
if (isBefore || isAfter && !isGroupAndIsExpanded) {
|
|
68
89
|
return sameParentAsHoverItemDrop({
|
|
69
90
|
isBefore,
|
|
@@ -72,69 +93,54 @@ const inferHoverItemKinshipDrop = _ref2 => {
|
|
|
72
93
|
overItem,
|
|
73
94
|
movementDirection
|
|
74
95
|
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
96
|
+
}
|
|
78
97
|
return {
|
|
79
98
|
newNestedIndex: overItem.children.length,
|
|
80
|
-
// append as last child of the group
|
|
81
99
|
newParentNode: overItem.node
|
|
82
100
|
};
|
|
83
101
|
};
|
|
84
|
-
const isDropValid =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
} =
|
|
92
|
-
const {
|
|
93
|
-
id: movedId
|
|
94
|
-
} = draggedItem;
|
|
95
|
-
const {
|
|
96
|
-
id: hoverId
|
|
97
|
-
} = overItem;
|
|
102
|
+
const isDropValid = ({
|
|
103
|
+
isBefore,
|
|
104
|
+
isAfter,
|
|
105
|
+
draggedItem,
|
|
106
|
+
overItem,
|
|
107
|
+
restrictDragAndDrop
|
|
108
|
+
}) => {
|
|
109
|
+
const { id: movedId } = draggedItem;
|
|
110
|
+
const { id: hoverId } = overItem;
|
|
98
111
|
const isInside = !isBefore && !isAfter;
|
|
99
|
-
if (movedId === hoverId)
|
|
100
|
-
|
|
112
|
+
if (movedId === hoverId)
|
|
113
|
+
return false;
|
|
101
114
|
if (isInside && !overItem.isGroup) {
|
|
102
|
-
return false;
|
|
115
|
+
return false;
|
|
103
116
|
}
|
|
104
|
-
|
|
105
117
|
if (restrictDragAndDrop) {
|
|
106
|
-
if (isInside)
|
|
107
|
-
|
|
108
|
-
const sameParent =
|
|
109
|
-
if (overItem.node.model.isExpanded && isAfter)
|
|
110
|
-
|
|
118
|
+
if (isInside)
|
|
119
|
+
return false;
|
|
120
|
+
const sameParent = (0, import_tree_helpers.itemsShareSameParent)([draggedItem, overItem]);
|
|
121
|
+
if (overItem.node.model.isExpanded && isAfter)
|
|
122
|
+
return false;
|
|
123
|
+
if (!sameParent)
|
|
124
|
+
return false;
|
|
111
125
|
}
|
|
112
|
-
|
|
113
126
|
return true;
|
|
114
127
|
};
|
|
115
|
-
const inferKeyboardKinshipDrop =
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
} = _ref4;
|
|
128
|
+
const inferKeyboardKinshipDrop = ({
|
|
129
|
+
items,
|
|
130
|
+
newIndex
|
|
131
|
+
}) => {
|
|
120
132
|
const kinship = {};
|
|
121
133
|
const itemBefore = items[newIndex];
|
|
122
134
|
const itemBeforeModel = itemBefore.node.model;
|
|
123
135
|
const isGroupAndIsExpanded = itemBeforeModel.isExpanded && itemBeforeModel.children.length > 0;
|
|
124
|
-
|
|
125
136
|
if (isGroupAndIsExpanded) {
|
|
126
137
|
kinship.newParentNode = itemBefore.node;
|
|
127
138
|
kinship.newNestedIndex = 0;
|
|
128
139
|
} else {
|
|
129
|
-
kinship.newParentNode =
|
|
140
|
+
kinship.newParentNode = (0, import_tree_helpers.getItemsParentNode)([itemBefore], true);
|
|
130
141
|
kinship.newNestedIndex = itemBefore.node.getIndex();
|
|
131
142
|
}
|
|
132
|
-
|
|
133
143
|
return kinship;
|
|
134
144
|
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
exports.inferKeyboardKinshipDrop = inferKeyboardKinshipDrop;
|
|
138
|
-
exports.isDropValid = isDropValid;
|
|
139
|
-
exports.keyCodes = keyCodes;
|
|
140
|
-
exports.sameParentAsHoverItemDrop = sameParentAsHoverItemDrop;
|
|
145
|
+
module.exports = __toCommonJS(dnd_helpers_exports);
|
|
146
|
+
//# sourceMappingURL=dnd-helpers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/dnd-helpers.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport { getItemsParentNode, itemsShareSameParent } from './tree-helpers';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nimport type { DSTreeviewInternalsT } from '../sharedTypes';\n\ninterface MetaInfoT {\n isBefore: boolean;\n isAfter: boolean;\n draggedItem: DSTreeviewT.Item;\n overItem: DSTreeviewT.Item;\n}\ninterface KinshipT {\n newParentNode: DSTreeviewT.Item['node'];\n newNestedIndex: number;\n}\n\nexport const keyCodes = {\n lift: [32, 13],\n drop: [32, 13],\n cancel: [27],\n up: [38, 37],\n down: [40, 39],\n};\n\nexport const sameParentAsHoverItemDrop = ({\n isBefore,\n isAfter,\n\n draggedItem,\n overItem,\n movementDirection,\n}: MetaInfoT & { movementDirection: DSTreeviewInternalsT.DnDMovementDirectionT }) => {\n const hoveredItemNodeNestedIndex = overItem.node.getIndex();\n let newParentNode = getItemsParentNode([overItem], true);\n\n const { treeDepth: draggedItemTreeDepth } = draggedItem;\n const { treeDepth: overItemTreeDepth } = overItem;\n const directionOffset =\n // we don't apply the offset for direction\n // if moving from less nested to more nested\n // or moving bottom to top\n // the offset is required when moving elemnts down in their nest level\n (draggedItemTreeDepth as number) <= (overItemTreeDepth as number) && movementDirection === 'topToBottom' ? -1 : 0;\n let newNestedIndex;\n\n if (isBefore) newNestedIndex = hoveredItemNodeNestedIndex + directionOffset;\n else if (isAfter) newNestedIndex = hoveredItemNodeNestedIndex + 1 + directionOffset;\n else {\n newNestedIndex = overItem.children.length; // append as last child of the group\n newParentNode = overItem.node;\n }\n if (newNestedIndex < 0) newNestedIndex = 0;\n return {\n newNestedIndex,\n newParentNode,\n };\n};\n\nexport const inferHoverItemKinshipDrop = ({\n isBefore,\n isAfter,\n\n draggedItem,\n overItem,\n movementDirection,\n}: MetaInfoT & { movementDirection: DSTreeviewInternalsT.DnDMovementDirectionT }) => {\n const hoverItemModel = overItem.node.model;\n const isGroupAndIsExpanded = hoverItemModel.isExpanded && hoverItemModel.children.length > 0;\n\n if (isAfter && isGroupAndIsExpanded) {\n return {\n newNestedIndex: 0, // append after the group, so basically as first child\n newParentNode: overItem.node,\n };\n }\n\n if (isBefore || (isAfter && !isGroupAndIsExpanded)) {\n return sameParentAsHoverItemDrop({\n isBefore,\n isAfter,\n draggedItem,\n overItem,\n movementDirection,\n });\n }\n\n // drop inside\n return {\n newNestedIndex: overItem.children.length, // append as last child of the group\n newParentNode: overItem.node,\n };\n};\n\nexport const isDropValid = ({\n isBefore,\n isAfter,\n\n draggedItem,\n overItem,\n\n restrictDragAndDrop,\n}: MetaInfoT & { restrictDragAndDrop: boolean }) => {\n const { id: movedId } = draggedItem;\n const { id: hoverId } = overItem;\n const isInside = !isBefore && !isAfter;\n\n if (movedId === hoverId) return false;\n\n if (isInside && !overItem.isGroup) {\n return false; // we can't drop inside an item that isn't a group\n }\n\n if (restrictDragAndDrop) {\n if (isInside) return false; // in this mode we can't drop inside another element\n const sameParent = itemsShareSameParent([draggedItem, overItem]);\n if (overItem.node.model.isExpanded && isAfter) return false;\n if (!sameParent) return false;\n }\n\n return true;\n};\n\nexport const inferKeyboardKinshipDrop = ({\n items,\n\n newIndex,\n}: {\n items: DSTreeviewT.Item[];\n newIndex: number;\n}) => {\n const kinship: Partial<KinshipT> = {};\n\n const itemBefore = items[newIndex];\n\n const itemBeforeModel = itemBefore.node.model;\n const isGroupAndIsExpanded = itemBeforeModel.isExpanded && itemBeforeModel.children.length > 0;\n\n if (isGroupAndIsExpanded) {\n kinship.newParentNode = itemBefore.node;\n kinship.newNestedIndex = 0;\n } else {\n kinship.newParentNode = getItemsParentNode([itemBefore], true);\n kinship.newNestedIndex = itemBefore.node.getIndex();\n }\n\n return kinship;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAyD;AAelD,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,IAAI;AAAA,EACX,MAAM,CAAC,IAAI;AAAA,EACX,QAAQ,CAAC;AAAA,EACT,IAAI,CAAC,IAAI;AAAA,EACT,MAAM,CAAC,IAAI;AAAA;AAGN,MAAM,4BAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,MACmF;AACnF,QAAM,6BAA6B,SAAS,KAAK;AACjD,MAAI,gBAAgB,4CAAmB,CAAC,WAAW;AAEnD,QAAM,EAAE,WAAW,yBAAyB;AAC5C,QAAM,EAAE,WAAW,sBAAsB;AACzC,QAAM,kBAKH,wBAAoC,qBAAgC,sBAAsB,gBAAgB,KAAK;AAClH,MAAI;AAEJ,MAAI;AAAU,qBAAiB,6BAA6B;AAAA,WACnD;AAAS,qBAAiB,6BAA6B,IAAI;AAAA,OAC/D;AACH,qBAAiB,SAAS,SAAS;AACnC,oB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AAS,SAAS;AAE7F,MAAI,sBAAsB;AACxB,YAAQ,gBAAgB,WAAW;AACnC,YAAQ,iBAAiB;AAAA,SACpB;AACL,YAAQ,gBAAgB,4CAAmB,CAAC,aAAa;AACzD,YAAQ,iBAAiB,WAAW,KAAK;AAAA;AAG3C,SAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,111 +1,138 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var group_expands_helpers_exports = {};
|
|
29
|
+
__export(group_expands_helpers_exports, {
|
|
30
|
+
collapseAll: () => collapseAll,
|
|
31
|
+
collapseItemModel: () => collapseItemModel,
|
|
32
|
+
expandAll: () => expandAll,
|
|
33
|
+
expandItemModel: () => expandItemModel,
|
|
34
|
+
getToggleExpandShouldExpand: () => getToggleExpandShouldExpand,
|
|
35
|
+
toggleExpandAllHelper: () => toggleExpandAllHelper,
|
|
36
|
+
toggleItemExpand: () => toggleItemExpand,
|
|
37
|
+
updateExpandedState: () => updateExpandedState,
|
|
38
|
+
useNotifyExpandedChange: () => useNotifyExpandedChange
|
|
39
|
+
});
|
|
40
|
+
var React = __toESM(require("react"));
|
|
41
|
+
var import_react = __toESM(require("react"));
|
|
8
42
|
const updateExpandedState = (treeRoot, onExpandChange) => {
|
|
9
43
|
const shouldContinueWalking = true;
|
|
10
|
-
const newExpandedHashMap = {
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
treeRoot.walk(node => {
|
|
44
|
+
const newExpandedHashMap = { __ds_tree_root: true };
|
|
45
|
+
treeRoot.walk((node) => {
|
|
14
46
|
if (!node.isRoot() && node.model.isGroup && node.model.isExpanded) {
|
|
15
47
|
newExpandedHashMap[node.model.id] = true;
|
|
16
48
|
}
|
|
17
|
-
|
|
18
49
|
return shouldContinueWalking;
|
|
19
50
|
});
|
|
20
|
-
if (onExpandChange)
|
|
51
|
+
if (onExpandChange)
|
|
52
|
+
onExpandChange(newExpandedHashMap, null);
|
|
21
53
|
};
|
|
22
|
-
const toggleItemExpand =
|
|
23
|
-
|
|
54
|
+
const toggleItemExpand = (itemToToggle, triggerTreeRerender, updateUserExpandedState, scrollTo = () => {
|
|
55
|
+
}) => {
|
|
24
56
|
const {
|
|
25
57
|
node: {
|
|
26
|
-
model: {
|
|
27
|
-
isExpanded
|
|
28
|
-
}
|
|
58
|
+
model: { isExpanded }
|
|
29
59
|
},
|
|
30
60
|
virtualIndex
|
|
31
61
|
} = itemToToggle;
|
|
32
|
-
|
|
33
62
|
if (itemToToggle.node.model.isGroup) {
|
|
34
63
|
itemToToggle.node.model.isExpanded = !isExpanded;
|
|
35
64
|
triggerTreeRerender();
|
|
36
65
|
updateUserExpandedState();
|
|
37
66
|
setTimeout(() => {
|
|
38
|
-
if (typeof virtualIndex ===
|
|
39
|
-
align:
|
|
40
|
-
});
|
|
67
|
+
if (typeof virtualIndex === "number")
|
|
68
|
+
scrollTo(virtualIndex, { align: "start" });
|
|
41
69
|
});
|
|
42
70
|
}
|
|
43
71
|
};
|
|
44
|
-
const expandItemModel = modelToExpand => {
|
|
45
|
-
if (modelToExpand.isGroup)
|
|
72
|
+
const expandItemModel = (modelToExpand) => {
|
|
73
|
+
if (modelToExpand.isGroup)
|
|
74
|
+
modelToExpand.isExpanded = true;
|
|
46
75
|
};
|
|
47
|
-
const collapseItemModel = modelToCollapse => {
|
|
48
|
-
if (modelToCollapse.isGroup)
|
|
76
|
+
const collapseItemModel = (modelToCollapse) => {
|
|
77
|
+
if (modelToCollapse.isGroup)
|
|
78
|
+
modelToCollapse.isExpanded = false;
|
|
49
79
|
};
|
|
50
80
|
const expandAll = (treeRoot, triggerTreeRerender) => {
|
|
51
81
|
const shouldContinueWalking = true;
|
|
52
|
-
treeRoot.walk(node => {
|
|
53
|
-
if (!node.isRoot())
|
|
82
|
+
treeRoot.walk((node) => {
|
|
83
|
+
if (!node.isRoot())
|
|
84
|
+
expandItemModel(node.model);
|
|
54
85
|
return shouldContinueWalking;
|
|
55
86
|
});
|
|
56
87
|
triggerTreeRerender();
|
|
57
88
|
};
|
|
58
89
|
const collapseAll = (treeRoot, triggerTreeRerender) => {
|
|
59
|
-
const shouldContinueWalking = true;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
90
|
+
const shouldContinueWalking = true;
|
|
91
|
+
treeRoot.walk((node) => {
|
|
92
|
+
if (!node.isRoot())
|
|
93
|
+
collapseItemModel(node.model);
|
|
63
94
|
return shouldContinueWalking;
|
|
64
95
|
});
|
|
65
96
|
triggerTreeRerender();
|
|
66
97
|
};
|
|
67
|
-
const getToggleExpandShouldExpand = treeRoot => {
|
|
98
|
+
const getToggleExpandShouldExpand = (treeRoot) => {
|
|
68
99
|
let shouldExpand = false;
|
|
69
|
-
const shouldContinueWalking = true;
|
|
70
|
-
|
|
71
|
-
treeRoot.walk(node => {
|
|
100
|
+
const shouldContinueWalking = true;
|
|
101
|
+
treeRoot.walk((node) => {
|
|
72
102
|
if (!node.isRoot()) {
|
|
73
103
|
if (!node.model.isExpanded && node.model.isGroup) {
|
|
74
|
-
shouldExpand = true;
|
|
75
|
-
|
|
104
|
+
shouldExpand = true;
|
|
76
105
|
return shouldContinueWalking;
|
|
77
106
|
}
|
|
78
107
|
}
|
|
79
|
-
|
|
80
108
|
return shouldContinueWalking;
|
|
81
109
|
});
|
|
82
110
|
return shouldExpand;
|
|
83
111
|
};
|
|
84
112
|
const toggleExpandAllHelper = (isExpand, treeRoot, triggerTreeRerender, setLatestToggledItem, updateUserExpandedState) => {
|
|
85
|
-
if (isExpand === true)
|
|
113
|
+
if (isExpand === true)
|
|
114
|
+
expandAll(treeRoot, triggerTreeRerender);
|
|
115
|
+
else if (isExpand === false)
|
|
116
|
+
collapseAll(treeRoot, triggerTreeRerender);
|
|
117
|
+
else {
|
|
86
118
|
const shouldExpand = getToggleExpandShouldExpand(treeRoot);
|
|
87
|
-
if (shouldExpand === true)
|
|
119
|
+
if (shouldExpand === true)
|
|
120
|
+
expandAll(treeRoot, triggerTreeRerender);
|
|
121
|
+
else
|
|
122
|
+
collapseAll(treeRoot, triggerTreeRerender);
|
|
88
123
|
}
|
|
89
124
|
setLatestToggledItem(null);
|
|
90
125
|
updateUserExpandedState();
|
|
91
126
|
};
|
|
92
|
-
const useNotifyExpandedChange = (propsWithDefaults,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
127
|
+
const useNotifyExpandedChange = (propsWithDefaults, {
|
|
128
|
+
latestToggledItem,
|
|
129
|
+
expandedGroups
|
|
130
|
+
}) => {
|
|
131
|
+
const notifyExpandedChange = (0, import_react.useCallback)((expandedGroupHashmap) => propsWithDefaults?.onExpandChange(expandedGroupHashmap || {}, latestToggledItem), [propsWithDefaults, latestToggledItem]);
|
|
132
|
+
(0, import_react.useEffect)(() => {
|
|
133
|
+
if (!propsWithDefaults.expanded)
|
|
134
|
+
notifyExpandedChange(expandedGroups);
|
|
100
135
|
}, [expandedGroups, notifyExpandedChange, propsWithDefaults.expanded]);
|
|
101
136
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
exports.collapseItemModel = collapseItemModel;
|
|
105
|
-
exports.expandAll = expandAll;
|
|
106
|
-
exports.expandItemModel = expandItemModel;
|
|
107
|
-
exports.getToggleExpandShouldExpand = getToggleExpandShouldExpand;
|
|
108
|
-
exports.toggleExpandAllHelper = toggleExpandAllHelper;
|
|
109
|
-
exports.toggleItemExpand = toggleItemExpand;
|
|
110
|
-
exports.updateExpandedState = updateExpandedState;
|
|
111
|
-
exports.useNotifyExpandedChange = useNotifyExpandedChange;
|
|
137
|
+
module.exports = __toCommonJS(group_expands_helpers_exports);
|
|
138
|
+
//# sourceMappingURL=group-expands-helpers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/group-expands-helpers.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-params */\nimport { useCallback, useEffect } from 'react';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nimport type { DSTreeviewInternalsT } from '../sharedTypes';\n\nexport const updateExpandedState = (\n treeRoot: DSTreeviewT.Item['node'],\n onExpandChange: DSTreeviewT.Props['onExpandChange'] | null | undefined,\n) => {\n const shouldContinueWalking = true;\n const newExpandedHashMap: DSTreeviewT.ExpandedItems = { __ds_tree_root: true };\n treeRoot.walk((node) => {\n if (!node.isRoot() && node.model.isGroup && node.model.isExpanded) {\n newExpandedHashMap[node.model.id] = true;\n }\n return shouldContinueWalking;\n });\n if (onExpandChange) onExpandChange(newExpandedHashMap, null);\n};\n\nexport const toggleItemExpand = (\n itemToToggle: DSTreeviewT.Item,\n triggerTreeRerender: () => void,\n updateUserExpandedState: DSTreeviewInternalsT.CTX['updateUserExpandedState'],\n scrollTo: DSTreeviewT.ScrollToFunc = () => {},\n) => {\n const {\n node: {\n model: { isExpanded },\n },\n virtualIndex,\n } = itemToToggle;\n if (itemToToggle.node.model.isGroup) {\n itemToToggle.node.model.isExpanded = !isExpanded;\n triggerTreeRerender();\n updateUserExpandedState();\n setTimeout(() => {\n if (typeof virtualIndex === 'number') scrollTo(virtualIndex, { align: 'start' });\n });\n }\n};\n\nexport const expandItemModel = (modelToExpand: DSTreeviewT.Item['model']) => {\n if (modelToExpand.isGroup) modelToExpand.isExpanded = true;\n};\n\nexport const collapseItemModel = (modelToCollapse: DSTreeviewT.Item['model']) => {\n if (modelToCollapse.isGroup) modelToCollapse.isExpanded = false;\n};\n\nexport const expandAll = (treeRoot: DSTreeviewT.Item['node'], triggerTreeRerender: () => void) => {\n const shouldContinueWalking = true;\n treeRoot.walk((node) => {\n if (!node.isRoot()) expandItemModel(node.model);\n return shouldContinueWalking;\n });\n triggerTreeRerender();\n};\n\nexport const collapseAll = (treeRoot: DSTreeviewT.Item['node'], triggerTreeRerender: () => void) => {\n const shouldContinueWalking = true; // tree-model ask we return true if we want to continue walking\n treeRoot.walk((node) => {\n if (!node.isRoot()) collapseItemModel(node.model);\n return shouldContinueWalking;\n });\n triggerTreeRerender();\n};\n\nexport const getToggleExpandShouldExpand = (treeRoot: DSTreeviewT.Item['node']) => {\n let shouldExpand = false;\n const shouldContinueWalking = true; // tree-model ask we return true if we want to continue walking\n treeRoot.walk((node) => {\n if (!node.isRoot()) {\n if (!node.model.isExpanded && node.model.isGroup) {\n shouldExpand = true;\n // eslint-disable-next-line no-useless-return\n return shouldContinueWalking;\n }\n }\n return shouldContinueWalking;\n });\n return shouldExpand;\n};\n\nexport const toggleExpandAllHelper = (\n isExpand: boolean | 'toggle',\n treeRoot: DSTreeviewT.Item['node'],\n triggerTreeRerender: () => void,\n setLatestToggledItem: DSTreeviewInternalsT.CTX['setLatestToggledItem'],\n updateUserExpandedState: DSTreeviewInternalsT.CTX['updateUserExpandedState'],\n) => {\n if (isExpand === true) expandAll(treeRoot, triggerTreeRerender);\n else if (isExpand === false) collapseAll(treeRoot, triggerTreeRerender);\n else {\n const shouldExpand = getToggleExpandShouldExpand(treeRoot);\n if (shouldExpand === true) expandAll(treeRoot, triggerTreeRerender);\n else collapseAll(treeRoot, triggerTreeRerender);\n }\n setLatestToggledItem(null);\n updateUserExpandedState();\n};\n\nexport const useNotifyExpandedChange = (\n propsWithDefaults: DSTreeviewT.Props,\n {\n latestToggledItem,\n expandedGroups,\n }: {\n latestToggledItem?: DSTreeviewInternalsT.CTX['latestToggledItem'];\n expandedGroups?: DSTreeviewInternalsT.CTX['expandedGroups'];\n },\n) => {\n const notifyExpandedChange = useCallback(\n (expandedGroupHashmap?: DSTreeviewInternalsT.CTX['expandedGroups']) =>\n propsWithDefaults?.onExpandChange(expandedGroupHashmap || {}, latestToggledItem),\n [propsWithDefaults, latestToggledItem],\n );\n\n useEffect(() => {\n if (!propsWithDefaults.expanded) notifyExpandedChange(expandedGroups);\n }, [expandedGroups, notifyExpandedChange, propsWithDefaults.expanded]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AA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