@elliemae/ds-treeview 2.3.0-alpha.1 → 2.3.0-alpha.6
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 → dist/cjs}/TreeView.js +1 -3
- package/dist/cjs/TreeView.js.map +7 -0
- package/{cjs → dist/cjs}/TreeViewContext.js +2 -8
- package/dist/cjs/TreeViewContext.js.map +7 -0
- package/{cjs → dist/cjs}/config/cssClassesConstants.js +0 -0
- package/{cjs → dist/cjs}/config/cssClassesConstants.js.map +0 -0
- package/{cjs → dist/cjs}/config/useTreeview.js +14 -28
- package/dist/cjs/config/useTreeview.js.map +7 -0
- package/dist/cjs/hoc/DnDTreeContext.js +45 -0
- package/dist/cjs/hoc/DnDTreeContext.js.map +7 -0
- package/dist/cjs/hoc/SortableItemContext.js +46 -0
- package/dist/cjs/hoc/SortableItemContext.js.map +7 -0
- package/dist/cjs/hoc/WithConditionalDnDContext.js +128 -0
- package/dist/cjs/hoc/WithConditionalDnDContext.js.map +7 -0
- package/dist/cjs/hoc/WithDnDSortableItemContext.js +69 -0
- package/dist/cjs/hoc/WithDnDSortableItemContext.js.map +7 -0
- package/{cjs → dist/cjs}/index.js +0 -0
- package/{cjs → dist/cjs}/index.js.map +0 -0
- package/{cjs → dist/cjs}/parts/CheckboxSelectable.js +0 -0
- package/{cjs → dist/cjs}/parts/CheckboxSelectable.js.map +0 -0
- package/{cjs → dist/cjs}/parts/ChildrenCountDisplayer.js +0 -0
- package/{cjs → dist/cjs}/parts/ChildrenCountDisplayer.js.map +0 -0
- package/dist/cjs/parts/DnDHandle.js +57 -0
- package/dist/cjs/parts/DnDHandle.js.map +7 -0
- package/dist/cjs/parts/DropIndicator.js +80 -0
- package/dist/cjs/parts/DropIndicator.js.map +7 -0
- package/{cjs → dist/cjs}/parts/ExpandCaret.js +0 -0
- package/{cjs → dist/cjs}/parts/ExpandCaret.js.map +0 -0
- package/{cjs → dist/cjs}/parts/Icon.js +0 -0
- package/{cjs → dist/cjs}/parts/Icon.js.map +0 -0
- package/{cjs → dist/cjs}/parts/NestingSpace.js +0 -0
- package/{cjs → dist/cjs}/parts/NestingSpace.js.map +0 -0
- package/{cjs → dist/cjs}/parts/RadioSelectable.js +0 -0
- package/{cjs → dist/cjs}/parts/RadioSelectable.js.map +0 -0
- package/{cjs → dist/cjs}/parts/TreeItem.js +37 -62
- package/dist/cjs/parts/TreeItem.js.map +7 -0
- package/{cjs → dist/cjs}/parts/TreeItemText.js +0 -0
- package/{cjs → dist/cjs}/parts/TreeItemText.js.map +0 -0
- package/{cjs → dist/cjs}/parts/TreeList.js +13 -18
- package/dist/cjs/parts/TreeList.js.map +7 -0
- package/dist/cjs/plugins/dnd/TreeDndPlugin.js +35 -0
- package/dist/cjs/plugins/dnd/TreeDndPlugin.js.map +7 -0
- package/{cjs → dist/cjs}/plugins/dnd/index.js +0 -0
- package/{cjs → dist/cjs}/plugins/dnd/index.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/index.js +0 -0
- package/{cjs → dist/cjs}/plugins/index.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/roving/TreeRovingPlugin.js +0 -0
- package/{cjs → dist/cjs}/plugins/roving/TreeRovingPlugin.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/roving/index.js +0 -0
- package/{cjs → dist/cjs}/plugins/roving/index.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/searchable/SearchableTreePlugin.js +0 -0
- package/{cjs → dist/cjs}/plugins/searchable/SearchableTreePlugin.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/searchable/index.js +0 -0
- package/{cjs → dist/cjs}/plugins/searchable/index.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/selectable/SelectablePluginTree.js +0 -0
- package/{cjs → dist/cjs}/plugins/selectable/SelectablePluginTree.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/selectable/index.js +0 -0
- package/{cjs → dist/cjs}/plugins/selectable/index.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/toolbar/TreeToolbarPlugin.js +0 -0
- package/{cjs → dist/cjs}/plugins/toolbar/TreeToolbarPlugin.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/toolbar/index.js +0 -0
- package/{cjs → dist/cjs}/plugins/toolbar/index.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/tree/TreeDataPlugin.js +0 -0
- package/{cjs → dist/cjs}/plugins/tree/TreeDataPlugin.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/tree/index.js +0 -0
- package/{cjs → dist/cjs}/plugins/tree/index.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/virtualization/TreeVirtualizationPlugin.js +0 -0
- package/{cjs → dist/cjs}/plugins/virtualization/TreeVirtualizationPlugin.js.map +0 -0
- package/{cjs → dist/cjs}/plugins/virtualization/index.js +0 -0
- package/{cjs → dist/cjs}/plugins/virtualization/index.js.map +0 -0
- package/{cjs → dist/cjs}/react-desc-prop-types.js +1 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/{cjs → dist/cjs}/related-components/TreeViewSearchBar.js +0 -0
- package/{cjs → dist/cjs}/related-components/TreeViewSearchBar.js.map +0 -0
- package/{cjs → dist/cjs}/sharedTypes.js +0 -0
- package/dist/cjs/sharedTypes.js.map +7 -0
- package/{cjs → dist/cjs}/utils/array-helpers.js +0 -0
- package/{cjs → dist/cjs}/utils/array-helpers.js.map +0 -0
- package/{cjs → dist/cjs}/utils/group-expands-helpers.js +0 -0
- package/{cjs → dist/cjs}/utils/group-expands-helpers.js.map +0 -0
- package/{cjs → dist/cjs}/utils/keyboard-helpers.js +7 -7
- package/dist/cjs/utils/keyboard-helpers.js.map +7 -0
- package/{cjs → dist/cjs}/utils/object-helpers.js +0 -0
- package/{cjs → dist/cjs}/utils/object-helpers.js.map +0 -0
- package/{cjs → dist/cjs}/utils/refs-helpers.js +0 -0
- package/{cjs → dist/cjs}/utils/refs-helpers.js.map +1 -1
- package/{cjs → dist/cjs}/utils/selectable-helper.js +0 -0
- package/{cjs → dist/cjs}/utils/selectable-helper.js.map +0 -0
- package/{cjs → dist/cjs}/utils/string-helpers.js +0 -0
- package/{cjs → dist/cjs}/utils/string-helpers.js.map +0 -0
- package/{cjs → dist/cjs}/utils/tree-helpers.js +21 -1
- package/{cjs → dist/cjs}/utils/tree-helpers.js.map +2 -2
- package/{cjs → dist/cjs}/utils/useInstanceRefActions.js +0 -0
- package/{cjs → dist/cjs}/utils/useInstanceRefActions.js.map +0 -0
- package/{cjs → dist/cjs}/utils/useTree.js +3 -1
- package/dist/cjs/utils/useTree.js.map +7 -0
- package/{esm → dist/esm}/TreeView.js +1 -3
- package/dist/esm/TreeView.js.map +7 -0
- package/{esm → dist/esm}/TreeViewContext.js +2 -8
- package/dist/esm/TreeViewContext.js.map +7 -0
- package/{esm → dist/esm}/config/cssClassesConstants.js +0 -0
- package/{esm → dist/esm}/config/cssClassesConstants.js.map +0 -0
- package/{esm → dist/esm}/config/useTreeview.js +15 -29
- package/dist/esm/config/useTreeview.js.map +7 -0
- package/dist/esm/hoc/DnDTreeContext.js +16 -0
- package/dist/esm/hoc/DnDTreeContext.js.map +7 -0
- package/dist/esm/hoc/SortableItemContext.js +17 -0
- package/dist/esm/hoc/SortableItemContext.js.map +7 -0
- package/dist/esm/hoc/WithConditionalDnDContext.js +99 -0
- package/dist/esm/hoc/WithConditionalDnDContext.js.map +7 -0
- package/dist/esm/hoc/WithDnDSortableItemContext.js +40 -0
- package/dist/esm/hoc/WithDnDSortableItemContext.js.map +7 -0
- package/{esm → dist/esm}/index.js +0 -0
- package/{esm → dist/esm}/index.js.map +0 -0
- package/{esm → dist/esm}/parts/CheckboxSelectable.js +0 -0
- package/{esm → dist/esm}/parts/CheckboxSelectable.js.map +0 -0
- package/{esm → dist/esm}/parts/ChildrenCountDisplayer.js +0 -0
- package/{esm → dist/esm}/parts/ChildrenCountDisplayer.js.map +0 -0
- package/dist/esm/parts/DnDHandle.js +28 -0
- package/dist/esm/parts/DnDHandle.js.map +7 -0
- package/dist/esm/parts/DropIndicator.js +51 -0
- package/dist/esm/parts/DropIndicator.js.map +7 -0
- package/{esm → dist/esm}/parts/ExpandCaret.js +0 -0
- package/{esm → dist/esm}/parts/ExpandCaret.js.map +0 -0
- package/{esm → dist/esm}/parts/Icon.js +0 -0
- package/{esm → dist/esm}/parts/Icon.js.map +0 -0
- package/{esm → dist/esm}/parts/NestingSpace.js +0 -0
- package/{esm → dist/esm}/parts/NestingSpace.js.map +0 -0
- package/{esm → dist/esm}/parts/RadioSelectable.js +0 -0
- package/{esm → dist/esm}/parts/RadioSelectable.js.map +0 -0
- package/{esm → dist/esm}/parts/TreeItem.js +37 -62
- package/dist/esm/parts/TreeItem.js.map +7 -0
- package/{esm → dist/esm}/parts/TreeItemText.js +0 -0
- package/{esm → dist/esm}/parts/TreeItemText.js.map +0 -0
- package/{esm → dist/esm}/parts/TreeList.js +12 -17
- package/dist/esm/parts/TreeList.js.map +7 -0
- package/dist/esm/plugins/dnd/TreeDndPlugin.js +6 -0
- package/dist/esm/plugins/dnd/TreeDndPlugin.js.map +7 -0
- package/{esm → dist/esm}/plugins/dnd/index.js +0 -0
- package/{esm → dist/esm}/plugins/dnd/index.js.map +0 -0
- package/{esm → dist/esm}/plugins/index.js +0 -0
- package/{esm → dist/esm}/plugins/index.js.map +0 -0
- package/{esm → dist/esm}/plugins/roving/TreeRovingPlugin.js +0 -0
- package/{esm → dist/esm}/plugins/roving/TreeRovingPlugin.js.map +0 -0
- package/{esm → dist/esm}/plugins/roving/index.js +0 -0
- package/{esm → dist/esm}/plugins/roving/index.js.map +0 -0
- package/{esm → dist/esm}/plugins/searchable/SearchableTreePlugin.js +0 -0
- package/{esm → dist/esm}/plugins/searchable/SearchableTreePlugin.js.map +0 -0
- package/{esm → dist/esm}/plugins/searchable/index.js +0 -0
- package/{esm → dist/esm}/plugins/searchable/index.js.map +0 -0
- package/{esm → dist/esm}/plugins/selectable/SelectablePluginTree.js +0 -0
- package/{esm → dist/esm}/plugins/selectable/SelectablePluginTree.js.map +0 -0
- package/{esm → dist/esm}/plugins/selectable/index.js +0 -0
- package/{esm → dist/esm}/plugins/selectable/index.js.map +0 -0
- package/{esm → dist/esm}/plugins/toolbar/TreeToolbarPlugin.js +0 -0
- package/{esm → dist/esm}/plugins/toolbar/TreeToolbarPlugin.js.map +0 -0
- package/{esm → dist/esm}/plugins/toolbar/index.js +0 -0
- package/{esm → dist/esm}/plugins/toolbar/index.js.map +0 -0
- package/{esm → dist/esm}/plugins/tree/TreeDataPlugin.js +0 -0
- package/{esm → dist/esm}/plugins/tree/TreeDataPlugin.js.map +0 -0
- package/{esm → dist/esm}/plugins/tree/index.js +0 -0
- package/{esm → dist/esm}/plugins/tree/index.js.map +0 -0
- package/{esm → dist/esm}/plugins/virtualization/TreeVirtualizationPlugin.js +0 -0
- package/{esm → dist/esm}/plugins/virtualization/TreeVirtualizationPlugin.js.map +0 -0
- package/{esm → dist/esm}/plugins/virtualization/index.js +0 -0
- package/{esm → dist/esm}/plugins/virtualization/index.js.map +0 -0
- package/{esm → dist/esm}/react-desc-prop-types.js +1 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/{esm → dist/esm}/related-components/TreeViewSearchBar.js +0 -0
- package/{esm → dist/esm}/related-components/TreeViewSearchBar.js.map +0 -0
- package/{esm → dist/esm}/sharedTypes.js +0 -0
- package/{esm → dist/esm}/sharedTypes.js.map +0 -0
- package/{esm → dist/esm}/utils/array-helpers.js +0 -0
- package/{esm → dist/esm}/utils/array-helpers.js.map +0 -0
- package/{esm → dist/esm}/utils/group-expands-helpers.js +0 -0
- package/{esm → dist/esm}/utils/group-expands-helpers.js.map +0 -0
- package/{esm → dist/esm}/utils/keyboard-helpers.js +7 -7
- package/dist/esm/utils/keyboard-helpers.js.map +7 -0
- package/{esm → dist/esm}/utils/object-helpers.js +0 -0
- package/{esm → dist/esm}/utils/object-helpers.js.map +0 -0
- package/{esm → dist/esm}/utils/refs-helpers.js +0 -0
- package/{esm → dist/esm}/utils/refs-helpers.js.map +1 -1
- package/{esm → dist/esm}/utils/selectable-helper.js +0 -0
- package/{esm → dist/esm}/utils/selectable-helper.js.map +0 -0
- package/{esm → dist/esm}/utils/string-helpers.js +0 -0
- package/{esm → dist/esm}/utils/string-helpers.js.map +0 -0
- package/{esm → dist/esm}/utils/tree-helpers.js +21 -1
- package/{esm → dist/esm}/utils/tree-helpers.js.map +2 -2
- package/{esm → dist/esm}/utils/useInstanceRefActions.js +0 -0
- package/{esm → dist/esm}/utils/useInstanceRefActions.js.map +0 -0
- package/{esm → dist/esm}/utils/useTree.js +4 -2
- package/dist/esm/utils/useTree.js.map +7 -0
- package/package.json +136 -117
- package/cjs/TreeView.js.map +0 -7
- package/cjs/TreeViewContext.js.map +0 -7
- package/cjs/config/useTreeview.js.map +0 -7
- package/cjs/parts/TreeItem.js.map +0 -7
- package/cjs/parts/TreeList.js.map +0 -7
- package/cjs/plugins/dnd/TreeDndPlugin.js +0 -59
- package/cjs/plugins/dnd/TreeDndPlugin.js.map +0 -7
- package/cjs/react-desc-prop-types.js.map +0 -7
- package/cjs/sharedTypes.js.map +0 -7
- package/cjs/utils/dnd-helpers.js +0 -146
- package/cjs/utils/dnd-helpers.js.map +0 -7
- package/cjs/utils/keyboard-helpers.js.map +0 -7
- package/cjs/utils/useDnDHelpers.js +0 -199
- package/cjs/utils/useDnDHelpers.js.map +0 -7
- package/cjs/utils/useTree.js.map +0 -7
- package/esm/TreeView.js.map +0 -7
- package/esm/TreeViewContext.js.map +0 -7
- package/esm/config/useTreeview.js.map +0 -7
- package/esm/parts/TreeItem.js.map +0 -7
- package/esm/parts/TreeList.js.map +0 -7
- package/esm/plugins/dnd/TreeDndPlugin.js +0 -30
- package/esm/plugins/dnd/TreeDndPlugin.js.map +0 -7
- package/esm/react-desc-prop-types.js.map +0 -7
- package/esm/utils/dnd-helpers.js +0 -117
- package/esm/utils/dnd-helpers.js.map +0 -7
- package/esm/utils/keyboard-helpers.js.map +0 -7
- package/esm/utils/useDnDHelpers.js +0 -170
- package/esm/utils/useDnDHelpers.js.map +0 -7
- package/esm/utils/useTree.js.map +0 -7
- package/types/TreeView.d.ts +0 -13
- package/types/TreeViewContext.d.ts +0 -17
- package/types/config/cssClassesConstants.d.ts +0 -4
- package/types/config/useTreeview.d.ts +0 -7
- package/types/index.d.ts +0 -3
- package/types/parts/CheckboxSelectable.d.ts +0 -8
- package/types/parts/ChildrenCountDisplayer.d.ts +0 -7
- package/types/parts/ExpandCaret.d.ts +0 -7
- package/types/parts/Icon.d.ts +0 -7
- package/types/parts/NestingSpace.d.ts +0 -8
- package/types/parts/RadioSelectable.d.ts +0 -8
- package/types/parts/TreeItem.d.ts +0 -24
- package/types/parts/TreeItemText.d.ts +0 -7
- package/types/parts/TreeList.d.ts +0 -24
- package/types/plugins/dnd/TreeDndPlugin.d.ts +0 -3
- package/types/plugins/dnd/index.d.ts +0 -1
- package/types/plugins/index.d.ts +0 -7
- package/types/plugins/roving/TreeRovingPlugin.d.ts +0 -1
- package/types/plugins/roving/index.d.ts +0 -1
- package/types/plugins/searchable/SearchableTreePlugin.d.ts +0 -1
- package/types/plugins/searchable/index.d.ts +0 -1
- package/types/plugins/selectable/SelectablePluginTree.d.ts +0 -1
- package/types/plugins/selectable/index.d.ts +0 -1
- package/types/plugins/toolbar/TreeToolbarPlugin.d.ts +0 -1
- package/types/plugins/toolbar/index.d.ts +0 -1
- package/types/plugins/tree/TreeDataPlugin.d.ts +0 -1
- package/types/plugins/tree/index.d.ts +0 -1
- package/types/plugins/virtualization/TreeVirtualizationPlugin.d.ts +0 -1
- package/types/plugins/virtualization/index.d.ts +0 -1
- package/types/react-desc-prop-types.d.ts +0 -196
- package/types/related-components/TreeViewSearchBar.d.ts +0 -16
- package/types/sharedTypes.d.ts +0 -54
- package/types/utils/array-helpers.d.ts +0 -2
- package/types/utils/dnd-helpers.d.ts +0 -39
- package/types/utils/group-expands-helpers.d.ts +0 -14
- package/types/utils/keyboard-helpers.d.ts +0 -5
- package/types/utils/object-helpers.d.ts +0 -6
- package/types/utils/refs-helpers.d.ts +0 -4
- package/types/utils/selectable-helper.d.ts +0 -7
- package/types/utils/string-helpers.d.ts +0 -1
- package/types/utils/tree-helpers.d.ts +0 -25
- package/types/utils/useDnDHelpers.d.ts +0 -26
- package/types/utils/useInstanceRefActions.d.ts +0 -3
- package/types/utils/useTree.d.ts +0 -13
package/package.json
CHANGED
|
@@ -1,187 +1,206 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-treeview",
|
|
3
|
-
"version": "2.3.0-alpha.
|
|
3
|
+
"version": "2.3.0-alpha.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Tree View",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
9
12
|
"exports": {
|
|
10
13
|
".": {
|
|
11
|
-
"import": "./esm/index.js",
|
|
12
|
-
"require": "./cjs/index.js"
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
13
16
|
},
|
|
14
17
|
"./utils/useTree": {
|
|
15
|
-
"import": "./esm/utils/useTree.js",
|
|
16
|
-
"require": "./cjs/utils/useTree.js"
|
|
18
|
+
"import": "./dist/esm/utils/useTree.js",
|
|
19
|
+
"require": "./dist/cjs/utils/useTree.js"
|
|
17
20
|
},
|
|
18
21
|
"./utils/useInstanceRefActions": {
|
|
19
|
-
"import": "./esm/utils/useInstanceRefActions.js",
|
|
20
|
-
"require": "./cjs/utils/useInstanceRefActions.js"
|
|
21
|
-
},
|
|
22
|
-
"./utils/useDnDHelpers": {
|
|
23
|
-
"import": "./esm/utils/useDnDHelpers.js",
|
|
24
|
-
"require": "./cjs/utils/useDnDHelpers.js"
|
|
22
|
+
"import": "./dist/esm/utils/useInstanceRefActions.js",
|
|
23
|
+
"require": "./dist/cjs/utils/useInstanceRefActions.js"
|
|
25
24
|
},
|
|
26
25
|
"./utils/tree-helpers": {
|
|
27
|
-
"import": "./esm/utils/tree-helpers.js",
|
|
28
|
-
"require": "./cjs/utils/tree-helpers.js"
|
|
26
|
+
"import": "./dist/esm/utils/tree-helpers.js",
|
|
27
|
+
"require": "./dist/cjs/utils/tree-helpers.js"
|
|
29
28
|
},
|
|
30
29
|
"./utils/string-helpers": {
|
|
31
|
-
"import": "./esm/utils/string-helpers.js",
|
|
32
|
-
"require": "./cjs/utils/string-helpers.js"
|
|
30
|
+
"import": "./dist/esm/utils/string-helpers.js",
|
|
31
|
+
"require": "./dist/cjs/utils/string-helpers.js"
|
|
33
32
|
},
|
|
34
33
|
"./utils/selectable-helper": {
|
|
35
|
-
"import": "./esm/utils/selectable-helper.js",
|
|
36
|
-
"require": "./cjs/utils/selectable-helper.js"
|
|
34
|
+
"import": "./dist/esm/utils/selectable-helper.js",
|
|
35
|
+
"require": "./dist/cjs/utils/selectable-helper.js"
|
|
37
36
|
},
|
|
38
37
|
"./utils/refs-helpers": {
|
|
39
|
-
"import": "./esm/utils/refs-helpers.js",
|
|
40
|
-
"require": "./cjs/utils/refs-helpers.js"
|
|
38
|
+
"import": "./dist/esm/utils/refs-helpers.js",
|
|
39
|
+
"require": "./dist/cjs/utils/refs-helpers.js"
|
|
41
40
|
},
|
|
42
41
|
"./utils/object-helpers": {
|
|
43
|
-
"import": "./esm/utils/object-helpers.js",
|
|
44
|
-
"require": "./cjs/utils/object-helpers.js"
|
|
42
|
+
"import": "./dist/esm/utils/object-helpers.js",
|
|
43
|
+
"require": "./dist/cjs/utils/object-helpers.js"
|
|
45
44
|
},
|
|
46
45
|
"./utils/keyboard-helpers": {
|
|
47
|
-
"import": "./esm/utils/keyboard-helpers.js",
|
|
48
|
-
"require": "./cjs/utils/keyboard-helpers.js"
|
|
46
|
+
"import": "./dist/esm/utils/keyboard-helpers.js",
|
|
47
|
+
"require": "./dist/cjs/utils/keyboard-helpers.js"
|
|
49
48
|
},
|
|
50
49
|
"./utils/group-expands-helpers": {
|
|
51
|
-
"import": "./esm/utils/group-expands-helpers.js",
|
|
52
|
-
"require": "./cjs/utils/group-expands-helpers.js"
|
|
53
|
-
},
|
|
54
|
-
"./utils/dnd-helpers": {
|
|
55
|
-
"import": "./esm/utils/dnd-helpers.js",
|
|
56
|
-
"require": "./cjs/utils/dnd-helpers.js"
|
|
50
|
+
"import": "./dist/esm/utils/group-expands-helpers.js",
|
|
51
|
+
"require": "./dist/cjs/utils/group-expands-helpers.js"
|
|
57
52
|
},
|
|
58
53
|
"./utils/array-helpers": {
|
|
59
|
-
"import": "./esm/utils/array-helpers.js",
|
|
60
|
-
"require": "./cjs/utils/array-helpers.js"
|
|
54
|
+
"import": "./dist/esm/utils/array-helpers.js",
|
|
55
|
+
"require": "./dist/cjs/utils/array-helpers.js"
|
|
61
56
|
},
|
|
62
57
|
"./TreeViewContext": {
|
|
63
|
-
"import": "./esm/TreeViewContext.js",
|
|
64
|
-
"require": "./cjs/TreeViewContext.js"
|
|
58
|
+
"import": "./dist/esm/TreeViewContext.js",
|
|
59
|
+
"require": "./dist/cjs/TreeViewContext.js"
|
|
65
60
|
},
|
|
66
61
|
"./TreeView": {
|
|
67
|
-
"import": "./esm/TreeView.js",
|
|
68
|
-
"require": "./cjs/TreeView.js"
|
|
62
|
+
"import": "./dist/esm/TreeView.js",
|
|
63
|
+
"require": "./dist/cjs/TreeView.js"
|
|
69
64
|
},
|
|
70
65
|
"./sharedTypes": {
|
|
71
|
-
"import": "./esm/sharedTypes.js",
|
|
72
|
-
"require": "./cjs/sharedTypes.js"
|
|
66
|
+
"import": "./dist/esm/sharedTypes.js",
|
|
67
|
+
"require": "./dist/cjs/sharedTypes.js"
|
|
73
68
|
},
|
|
74
69
|
"./related-components/TreeViewSearchBar": {
|
|
75
|
-
"import": "./esm/related-components/TreeViewSearchBar.js",
|
|
76
|
-
"require": "./cjs/related-components/TreeViewSearchBar.js"
|
|
70
|
+
"import": "./dist/esm/related-components/TreeViewSearchBar.js",
|
|
71
|
+
"require": "./dist/cjs/related-components/TreeViewSearchBar.js"
|
|
77
72
|
},
|
|
78
73
|
"./react-desc-prop-types": {
|
|
79
|
-
"import": "./esm/react-desc-prop-types.js",
|
|
80
|
-
"require": "./cjs/react-desc-prop-types.js"
|
|
74
|
+
"import": "./dist/esm/react-desc-prop-types.js",
|
|
75
|
+
"require": "./dist/cjs/react-desc-prop-types.js"
|
|
81
76
|
},
|
|
82
77
|
"./plugins/virtualization/TreeVirtualizationPlugin": {
|
|
83
|
-
"import": "./esm/plugins/virtualization/TreeVirtualizationPlugin.js",
|
|
84
|
-
"require": "./cjs/plugins/virtualization/TreeVirtualizationPlugin.js"
|
|
78
|
+
"import": "./dist/esm/plugins/virtualization/TreeVirtualizationPlugin.js",
|
|
79
|
+
"require": "./dist/cjs/plugins/virtualization/TreeVirtualizationPlugin.js"
|
|
85
80
|
},
|
|
86
81
|
"./plugins/virtualization": {
|
|
87
|
-
"import": "./esm/plugins/virtualization/index.js",
|
|
88
|
-
"require": "./cjs/plugins/virtualization/index.js"
|
|
82
|
+
"import": "./dist/esm/plugins/virtualization/index.js",
|
|
83
|
+
"require": "./dist/cjs/plugins/virtualization/index.js"
|
|
89
84
|
},
|
|
90
85
|
"./plugins/tree/TreeDataPlugin": {
|
|
91
|
-
"import": "./esm/plugins/tree/TreeDataPlugin.js",
|
|
92
|
-
"require": "./cjs/plugins/tree/TreeDataPlugin.js"
|
|
86
|
+
"import": "./dist/esm/plugins/tree/TreeDataPlugin.js",
|
|
87
|
+
"require": "./dist/cjs/plugins/tree/TreeDataPlugin.js"
|
|
93
88
|
},
|
|
94
89
|
"./plugins/tree": {
|
|
95
|
-
"import": "./esm/plugins/tree/index.js",
|
|
96
|
-
"require": "./cjs/plugins/tree/index.js"
|
|
90
|
+
"import": "./dist/esm/plugins/tree/index.js",
|
|
91
|
+
"require": "./dist/cjs/plugins/tree/index.js"
|
|
97
92
|
},
|
|
98
93
|
"./plugins/toolbar/TreeToolbarPlugin": {
|
|
99
|
-
"import": "./esm/plugins/toolbar/TreeToolbarPlugin.js",
|
|
100
|
-
"require": "./cjs/plugins/toolbar/TreeToolbarPlugin.js"
|
|
94
|
+
"import": "./dist/esm/plugins/toolbar/TreeToolbarPlugin.js",
|
|
95
|
+
"require": "./dist/cjs/plugins/toolbar/TreeToolbarPlugin.js"
|
|
101
96
|
},
|
|
102
97
|
"./plugins/toolbar": {
|
|
103
|
-
"import": "./esm/plugins/toolbar/index.js",
|
|
104
|
-
"require": "./cjs/plugins/toolbar/index.js"
|
|
98
|
+
"import": "./dist/esm/plugins/toolbar/index.js",
|
|
99
|
+
"require": "./dist/cjs/plugins/toolbar/index.js"
|
|
105
100
|
},
|
|
106
101
|
"./plugins/selectable/SelectablePluginTree": {
|
|
107
|
-
"import": "./esm/plugins/selectable/SelectablePluginTree.js",
|
|
108
|
-
"require": "./cjs/plugins/selectable/SelectablePluginTree.js"
|
|
102
|
+
"import": "./dist/esm/plugins/selectable/SelectablePluginTree.js",
|
|
103
|
+
"require": "./dist/cjs/plugins/selectable/SelectablePluginTree.js"
|
|
109
104
|
},
|
|
110
105
|
"./plugins/selectable": {
|
|
111
|
-
"import": "./esm/plugins/selectable/index.js",
|
|
112
|
-
"require": "./cjs/plugins/selectable/index.js"
|
|
106
|
+
"import": "./dist/esm/plugins/selectable/index.js",
|
|
107
|
+
"require": "./dist/cjs/plugins/selectable/index.js"
|
|
113
108
|
},
|
|
114
109
|
"./plugins/searchable/SearchableTreePlugin": {
|
|
115
|
-
"import": "./esm/plugins/searchable/SearchableTreePlugin.js",
|
|
116
|
-
"require": "./cjs/plugins/searchable/SearchableTreePlugin.js"
|
|
110
|
+
"import": "./dist/esm/plugins/searchable/SearchableTreePlugin.js",
|
|
111
|
+
"require": "./dist/cjs/plugins/searchable/SearchableTreePlugin.js"
|
|
117
112
|
},
|
|
118
113
|
"./plugins/searchable": {
|
|
119
|
-
"import": "./esm/plugins/searchable/index.js",
|
|
120
|
-
"require": "./cjs/plugins/searchable/index.js"
|
|
114
|
+
"import": "./dist/esm/plugins/searchable/index.js",
|
|
115
|
+
"require": "./dist/cjs/plugins/searchable/index.js"
|
|
121
116
|
},
|
|
122
117
|
"./plugins/roving/TreeRovingPlugin": {
|
|
123
|
-
"import": "./esm/plugins/roving/TreeRovingPlugin.js",
|
|
124
|
-
"require": "./cjs/plugins/roving/TreeRovingPlugin.js"
|
|
118
|
+
"import": "./dist/esm/plugins/roving/TreeRovingPlugin.js",
|
|
119
|
+
"require": "./dist/cjs/plugins/roving/TreeRovingPlugin.js"
|
|
125
120
|
},
|
|
126
121
|
"./plugins/roving": {
|
|
127
|
-
"import": "./esm/plugins/roving/index.js",
|
|
128
|
-
"require": "./cjs/plugins/roving/index.js"
|
|
122
|
+
"import": "./dist/esm/plugins/roving/index.js",
|
|
123
|
+
"require": "./dist/cjs/plugins/roving/index.js"
|
|
129
124
|
},
|
|
130
125
|
"./plugins": {
|
|
131
|
-
"import": "./esm/plugins/index.js",
|
|
132
|
-
"require": "./cjs/plugins/index.js"
|
|
126
|
+
"import": "./dist/esm/plugins/index.js",
|
|
127
|
+
"require": "./dist/cjs/plugins/index.js"
|
|
133
128
|
},
|
|
134
129
|
"./plugins/dnd/TreeDndPlugin": {
|
|
135
|
-
"import": "./esm/plugins/dnd/TreeDndPlugin.js",
|
|
136
|
-
"require": "./cjs/plugins/dnd/TreeDndPlugin.js"
|
|
130
|
+
"import": "./dist/esm/plugins/dnd/TreeDndPlugin.js",
|
|
131
|
+
"require": "./dist/cjs/plugins/dnd/TreeDndPlugin.js"
|
|
137
132
|
},
|
|
138
133
|
"./plugins/dnd": {
|
|
139
|
-
"import": "./esm/plugins/dnd/index.js",
|
|
140
|
-
"require": "./cjs/plugins/dnd/index.js"
|
|
134
|
+
"import": "./dist/esm/plugins/dnd/index.js",
|
|
135
|
+
"require": "./dist/cjs/plugins/dnd/index.js"
|
|
141
136
|
},
|
|
142
137
|
"./parts/TreeList": {
|
|
143
|
-
"import": "./esm/parts/TreeList.js",
|
|
144
|
-
"require": "./cjs/parts/TreeList.js"
|
|
138
|
+
"import": "./dist/esm/parts/TreeList.js",
|
|
139
|
+
"require": "./dist/cjs/parts/TreeList.js"
|
|
145
140
|
},
|
|
146
141
|
"./parts/TreeItemText": {
|
|
147
|
-
"import": "./esm/parts/TreeItemText.js",
|
|
148
|
-
"require": "./cjs/parts/TreeItemText.js"
|
|
142
|
+
"import": "./dist/esm/parts/TreeItemText.js",
|
|
143
|
+
"require": "./dist/cjs/parts/TreeItemText.js"
|
|
149
144
|
},
|
|
150
145
|
"./parts/TreeItem": {
|
|
151
|
-
"import": "./esm/parts/TreeItem.js",
|
|
152
|
-
"require": "./cjs/parts/TreeItem.js"
|
|
146
|
+
"import": "./dist/esm/parts/TreeItem.js",
|
|
147
|
+
"require": "./dist/cjs/parts/TreeItem.js"
|
|
153
148
|
},
|
|
154
149
|
"./parts/RadioSelectable": {
|
|
155
|
-
"import": "./esm/parts/RadioSelectable.js",
|
|
156
|
-
"require": "./cjs/parts/RadioSelectable.js"
|
|
150
|
+
"import": "./dist/esm/parts/RadioSelectable.js",
|
|
151
|
+
"require": "./dist/cjs/parts/RadioSelectable.js"
|
|
157
152
|
},
|
|
158
153
|
"./parts/NestingSpace": {
|
|
159
|
-
"import": "./esm/parts/NestingSpace.js",
|
|
160
|
-
"require": "./cjs/parts/NestingSpace.js"
|
|
154
|
+
"import": "./dist/esm/parts/NestingSpace.js",
|
|
155
|
+
"require": "./dist/cjs/parts/NestingSpace.js"
|
|
161
156
|
},
|
|
162
157
|
"./parts/Icon": {
|
|
163
|
-
"import": "./esm/parts/Icon.js",
|
|
164
|
-
"require": "./cjs/parts/Icon.js"
|
|
158
|
+
"import": "./dist/esm/parts/Icon.js",
|
|
159
|
+
"require": "./dist/cjs/parts/Icon.js"
|
|
165
160
|
},
|
|
166
161
|
"./parts/ExpandCaret": {
|
|
167
|
-
"import": "./esm/parts/ExpandCaret.js",
|
|
168
|
-
"require": "./cjs/parts/ExpandCaret.js"
|
|
162
|
+
"import": "./dist/esm/parts/ExpandCaret.js",
|
|
163
|
+
"require": "./dist/cjs/parts/ExpandCaret.js"
|
|
164
|
+
},
|
|
165
|
+
"./parts/DropIndicator": {
|
|
166
|
+
"import": "./dist/esm/parts/DropIndicator.js",
|
|
167
|
+
"require": "./dist/cjs/parts/DropIndicator.js"
|
|
168
|
+
},
|
|
169
|
+
"./parts/DnDHandle": {
|
|
170
|
+
"import": "./dist/esm/parts/DnDHandle.js",
|
|
171
|
+
"require": "./dist/cjs/parts/DnDHandle.js"
|
|
169
172
|
},
|
|
170
173
|
"./parts/ChildrenCountDisplayer": {
|
|
171
|
-
"import": "./esm/parts/ChildrenCountDisplayer.js",
|
|
172
|
-
"require": "./cjs/parts/ChildrenCountDisplayer.js"
|
|
174
|
+
"import": "./dist/esm/parts/ChildrenCountDisplayer.js",
|
|
175
|
+
"require": "./dist/cjs/parts/ChildrenCountDisplayer.js"
|
|
173
176
|
},
|
|
174
177
|
"./parts/CheckboxSelectable": {
|
|
175
|
-
"import": "./esm/parts/CheckboxSelectable.js",
|
|
176
|
-
"require": "./cjs/parts/CheckboxSelectable.js"
|
|
178
|
+
"import": "./dist/esm/parts/CheckboxSelectable.js",
|
|
179
|
+
"require": "./dist/cjs/parts/CheckboxSelectable.js"
|
|
180
|
+
},
|
|
181
|
+
"./hoc/WithDnDSortableItemContext": {
|
|
182
|
+
"import": "./dist/esm/hoc/WithDnDSortableItemContext.js",
|
|
183
|
+
"require": "./dist/cjs/hoc/WithDnDSortableItemContext.js"
|
|
184
|
+
},
|
|
185
|
+
"./hoc/WithConditionalDnDContext": {
|
|
186
|
+
"import": "./dist/esm/hoc/WithConditionalDnDContext.js",
|
|
187
|
+
"require": "./dist/cjs/hoc/WithConditionalDnDContext.js"
|
|
188
|
+
},
|
|
189
|
+
"./hoc/SortableItemContext": {
|
|
190
|
+
"import": "./dist/esm/hoc/SortableItemContext.js",
|
|
191
|
+
"require": "./dist/cjs/hoc/SortableItemContext.js"
|
|
192
|
+
},
|
|
193
|
+
"./hoc/DnDTreeContext": {
|
|
194
|
+
"import": "./dist/esm/hoc/DnDTreeContext.js",
|
|
195
|
+
"require": "./dist/cjs/hoc/DnDTreeContext.js"
|
|
177
196
|
},
|
|
178
197
|
"./config/useTreeview": {
|
|
179
|
-
"import": "./esm/config/useTreeview.js",
|
|
180
|
-
"require": "./cjs/config/useTreeview.js"
|
|
198
|
+
"import": "./dist/esm/config/useTreeview.js",
|
|
199
|
+
"require": "./dist/cjs/config/useTreeview.js"
|
|
181
200
|
},
|
|
182
201
|
"./config/cssClassesConstants": {
|
|
183
|
-
"import": "./esm/config/cssClassesConstants.js",
|
|
184
|
-
"require": "./cjs/config/cssClassesConstants.js"
|
|
202
|
+
"import": "./dist/esm/config/cssClassesConstants.js",
|
|
203
|
+
"require": "./dist/cjs/config/cssClassesConstants.js"
|
|
185
204
|
}
|
|
186
205
|
},
|
|
187
206
|
"sideEffects": [
|
|
@@ -193,33 +212,25 @@
|
|
|
193
212
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
194
213
|
},
|
|
195
214
|
"engines": {
|
|
196
|
-
"
|
|
197
|
-
"node": ">=
|
|
215
|
+
"pnpm": ">=6",
|
|
216
|
+
"node": ">=16"
|
|
198
217
|
},
|
|
199
218
|
"author": "ICE MT",
|
|
200
|
-
"scripts": {
|
|
201
|
-
"test:e2e": "../../../node_modules/pui-e2e-test-sdk/node_modules/.bin/wdio run ../../../wdio.conf.js",
|
|
202
|
-
"test:reports": "../../../node_modules/pui-e2e-test-sdk/node_modules/.bin/allure open",
|
|
203
|
-
"prebuild": "exit 0",
|
|
204
|
-
"predev": "exit 0",
|
|
205
|
-
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
206
|
-
"build": "node ../../scripts/build/build.js"
|
|
207
|
-
},
|
|
208
219
|
"publishConfig": {
|
|
209
220
|
"access": "public",
|
|
210
|
-
"
|
|
211
|
-
"generateSubmodules": true
|
|
221
|
+
"typeSafety": false
|
|
212
222
|
},
|
|
213
223
|
"dependencies": {
|
|
214
|
-
"@elliemae/ds-button": "2.3.0-alpha.
|
|
215
|
-
"@elliemae/ds-circular-progress-indicator": "2.3.0-alpha.
|
|
216
|
-
"@elliemae/ds-classnames": "2.3.0-alpha.
|
|
217
|
-
"@elliemae/ds-
|
|
218
|
-
"@elliemae/ds-
|
|
219
|
-
"@elliemae/ds-
|
|
220
|
-
"@elliemae/ds-
|
|
221
|
-
"@elliemae/ds-
|
|
222
|
-
"@elliemae/ds-
|
|
224
|
+
"@elliemae/ds-button": "2.3.0-alpha.6",
|
|
225
|
+
"@elliemae/ds-circular-progress-indicator": "2.3.0-alpha.6",
|
|
226
|
+
"@elliemae/ds-classnames": "2.3.0-alpha.6",
|
|
227
|
+
"@elliemae/ds-drag-and-drop": "2.3.0-alpha.6",
|
|
228
|
+
"@elliemae/ds-form": "2.3.0-alpha.6",
|
|
229
|
+
"@elliemae/ds-icons": "2.3.0-alpha.6",
|
|
230
|
+
"@elliemae/ds-props-helpers": "2.3.0-alpha.6",
|
|
231
|
+
"@elliemae/ds-shared": "2.3.0-alpha.6",
|
|
232
|
+
"@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.6",
|
|
233
|
+
"@elliemae/ds-utilities": "2.3.0-alpha.6",
|
|
223
234
|
"@elliemae/react-sortable-hoc": "^1.0.0",
|
|
224
235
|
"react-desc": "~4.1.3",
|
|
225
236
|
"react-highlight-words": "~0.17.0",
|
|
@@ -236,5 +247,13 @@
|
|
|
236
247
|
"react": "~17.0.2",
|
|
237
248
|
"react-dom": "^17.0.2",
|
|
238
249
|
"styled-components": "^5.3.3"
|
|
250
|
+
},
|
|
251
|
+
"scripts": {
|
|
252
|
+
"test:e2e": "../../../node_modules/pui-e2e-test-sdk/node_modules/.bin/wdio run ../../../wdio.conf.js",
|
|
253
|
+
"test:reports": "../../../node_modules/pui-e2e-test-sdk/node_modules/.bin/allure open",
|
|
254
|
+
"prebuild": "exit 0",
|
|
255
|
+
"predev": "exit 0",
|
|
256
|
+
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
257
|
+
"build": "node ../../scripts/build/build.js"
|
|
239
258
|
}
|
|
240
259
|
}
|
package/cjs/TreeView.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/TreeView.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport React, { WeakValidationMap } from 'react';\n\nimport { describe } from 'react-desc';\nimport { TreeViewPropTypes } from './react-desc-prop-types';\nimport TreeViewContext from './TreeViewContext';\nimport { TreeDnD, TreeDndPlugin } from './plugins/dnd';\nimport { useTreeview } from './config/useTreeview';\nimport { TreeList } from './parts/TreeList';\nimport type { DSTreeviewT } from './react-desc-prop-types';\nexport function TreeView(props: DSTreeviewT.Props) {\n const { plugins } = props;\n\n const { ctx } = useTreeview(props);\n\n return (\n <TreeViewContext.Provider value={ctx}>\n {plugins?.includes(TreeDndPlugin) ? <TreeDnD /> : <TreeList />}\n </TreeViewContext.Provider>\n );\n}\n\nTreeView.propTypes = TreeViewPropTypes as WeakValidationMap<unknown>;\nconst TreeViewWithSchema = describe(TreeView);\nTreeViewWithSchema.propTypes = TreeViewPropTypes;\n\nexport { TreeViewWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAyC;AAEzC,wBAAyB;AACzB,mCAAkC;AAClC,6BAA4B;AAC5B,iBAAuC;AACvC,yBAA4B;AAC5B,sBAAyB;AAElB,kBAAkB,OAA0B;AACjD,QAAM,EAAE,YAAY;AAEpB,QAAM,EAAE,QAAQ,oCAAY;AAE5B,SACE,mDAAC,+BAAgB,UAAjB;AAAA,IAA0B,OAAO;AAAA,KAC9B,SAAS,SAAS,4BAAiB,mDAAC,oBAAD,QAAc,mDAAC,0BAAD;AAAA;AAKxD,SAAS,YAAY;AACrB,MAAM,qBAAqB,gCAAS;AACpC,mBAAmB,YAAY;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/TreeViewContext.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-unused-vars */\nimport { createContext, createRef } from 'react';\nimport type { DSTreeviewT } from './react-desc-prop-types';\nimport type { DSTreeviewInternalsT } from './sharedTypes';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction noop<T extends unknown[]>(..._args: T): void {}\n\nexport const defaultProps = {\n plugins: [],\n selection: {},\n instanceRef: createRef(),\n isItemDisabled: () => false,\n disableIcons: false,\n fluid: false,\n isMultiSelect: false,\n isSingleSelect: false,\n restrictDragAndDrop: false,\n showChildrenAmount: false,\n sortable: false,\n isLoading: false,\n highlightOnlyQuery: false,\n onItemClick: noop,\n onItemFocus: noop,\n onVisibleItemsChange: noop,\n onOrderChange: noop,\n onSelectionChange: noop,\n onExpandChange: noop,\n onInstanceRefInitialized: noop,\n rowSize: 'normal',\n labelOverflow: 'wrap',\n noItemsPlaceholder: 'No items found',\n nameKey: 'name',\n width: '100%',\n height: '100%',\n groupIcon: null,\n itemIcon: null,\n searchQuery: '',\n // workaround on the typings over the fact that\n // when we instantiate the context we can't have all the props\n // we only have a part of them but the final typings will include missing props\n // this is safe to do because\n // we will \"mergeWithDefaults\" + \"validatePropTypes\" when we do instantiate the context\n} as unknown as DSTreeviewT.Props;\n\nexport const defaultRelativeMouseCoord = {\n isBefore: false,\n isAfter: false,\n isValid: true,\n item: null,\n x: null,\n y: null,\n relativeElementDOMRect: null,\n relativeElementIndex: null,\n};\n\nconst defaultContext: DSTreeviewInternalsT.CTX = {\n props: defaultProps,\n visibleItems: [],\n withRadioChecks: false,\n withCheckboxChecks: false,\n withDragAndDrop: false,\n relativeMouseCord: defaultRelativeMouseCoord,\n setRelativeMouseCord: noop,\n triggerTreeRerender: noop,\n tree: undefined,\n treeRoot: undefined,\n virtualListHelpers: {\n virtualItems: [],\n totalSize: 0,\n scrollToOffset: noop,\n scrollToIndex: noop,\n },\n virtualListRef: undefined,\n isDragging: false,\n setIsDragging: noop,\n isKeyboardDragging: false,\n setIsKeyboardDragging: noop,\n draggedItem: null,\n setDraggedItem: noop,\n uniqueTreeViewUUID: '',\n selectedItem: null,\n setSelectedItem: noop,\n focusedItem: null,\n setFocusedItem: noop,\n selectedCheckboxes: {},\n setSelectedCheckboxes: noop,\n expandedGroups: {},\n setExpandedGroups: noop,\n latestToggledItem: null,\n setLatestToggledItem: noop,\n hoverItem: null,\n setHoverItem: noop,\n handleExpandGroup: noop,\n updateUserExpandedState: noop,\n};\n\n/** Context for cross component communication */\nconst TreeViewContext = createContext(defaultContext);\n\nexport default TreeViewContext;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAyC;AAKzC,iBAAsC,OAAgB;AAAA;AAE/C,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,aAAa;AAAA,EACb,gBAAgB,MAAM;AAAA,EACtB,cAAc;AAAA,EACd,OAAO;AAAA,EACP,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,aAAa;AA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
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/config/useTreeview.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport { useState, useRef, useEffect, useMemo, useCallback } from 'react';\nimport { useVirtual } from 'react-virtual';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TreeViewPropTypes } from '../react-desc-prop-types';\nimport { defaultRelativeMouseCoord, defaultProps } from '../TreeViewContext';\nimport { TreeDndPlugin } from '../plugins/dnd';\nimport { useTree } from '../utils/useTree';\nimport { useNotifyExpandedChange, toggleItemExpand } from '../utils/group-expands-helpers';\nimport { useInstanceRefActions } from '../utils/useInstanceRefActions';\nimport { useGlobalToggleAllExpandShortcut } from '../utils/keyboard-helpers';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nimport type { DSTreeviewInternalsT } from '../sharedTypes';\n\ntype UseTreeviewT = (props: DSTreeviewT.Props) => { ctx: DSTreeviewInternalsT.CTX };\n\nexport const useTreeview: UseTreeviewT = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSTreeviewT.Props>(props, defaultProps);\n useValidateTypescriptPropTypes<DSTreeviewT.Props>(propsWithDefault, TreeViewPropTypes);\n const defaultActions = {\n actions: {\n toggleExpandAll: () => {},\n scrollTo: () => {},\n setSelectedItemByVirtualIndex: () => {},\n setFocusedItemByVirtualIndex: () => {},\n },\n } as unknown as DSTreeviewT.InstanceRef;\n const treeRef = useRef(defaultActions);\n const {\n data,\n plugins,\n onOrderChange,\n isMultiSelect,\n isSingleSelect,\n instanceRef,\n selection,\n onInstanceRefInitialized,\n } = propsWithDefault;\n const [isDragging, setIsDragging] = useState(false);\n const [isKeyboardDragging, setIsKeyboardDragging] = useState(false);\n const [relativeMouseCord, setRelativeMouseCord] =\n useState<DSTreeviewInternalsT.MouseCoord>(defaultRelativeMouseCoord);\n const [uniqueTreeViewUUID] = useState(uuidv4());\n const [draggedItem, setDraggedItem] = useState<DSTreeviewT.Item | null>(null);\n const [hoverItem, setHoverItem] = useState<DSTreeviewT.Item | null>(null);\n const [latestToggledItem, setLatestToggledItem] = useState<DSTreeviewT.Item | null>(null);\n const [selectedItem, setSelectedItem] = useState<DSTreeviewT.Item | null>(null);\n const [focusedItem, setFocusedItem] = useState<DSTreeviewT.Item | null>(null);\n const [selectedCheckboxes, setSelectedCheckboxes] = useState({\n ...selection,\n });\n const [expandedGroups, setExpandedGroups] = useState<DSTreeviewT.ExpandedItems>({});\n const { visibleItems, tree, treeRoot, triggerTreeRerender, updateUserExpandedState } = useTree(\n data,\n propsWithDefault,\n {\n setExpandedGroups,\n },\n );\n\n const virtualListRef = useRef<HTMLUListElement>();\n // estimateSize should not be really required given what was stated on\n // https://github.com/tannerlinsley/react-virtual/issues/23\n\n const virtualListHelpers = useVirtual({\n size: visibleItems.length,\n parentRef: virtualListRef,\n overscan: 15,\n });\n\n const withDragAndDrop = !!(plugins?.includes(TreeDndPlugin) && onOrderChange);\n const withRadioChecks = isSingleSelect && !isMultiSelect;\n const withCheckboxChecks = !isSingleSelect && isMultiSelect;\n\n const handleExpandGroup = useCallback(toggleItemExpand, []);\n\n const ctx: DSTreeviewInternalsT.CTX = useMemo(\n () => ({\n props: propsWithDefault,\n setRelativeMouseCord,\n relativeMouseCord,\n virtualListHelpers,\n virtualListRef,\n tree,\n treeRoot,\n visibleItems,\n triggerTreeRerender,\n isDragging,\n setIsDragging,\n isKeyboardDragging,\n setIsKeyboardDragging,\n draggedItem,\n setDraggedItem,\n withRadioChecks,\n withCheckboxChecks,\n withDragAndDrop,\n uniqueTreeViewUUID,\n selectedCheckboxes,\n setSelectedCheckboxes,\n selectedItem,\n setSelectedItem,\n expandedGroups,\n setExpandedGroups,\n latestToggledItem,\n setLatestToggledItem,\n focusedItem,\n setFocusedItem,\n hoverItem,\n setHoverItem,\n handleExpandGroup,\n updateUserExpandedState,\n }),\n [\n draggedItem,\n expandedGroups,\n focusedItem,\n handleExpandGroup,\n hoverItem,\n isDragging,\n isKeyboardDragging,\n latestToggledItem,\n propsWithDefault,\n relativeMouseCord,\n selectedCheckboxes,\n selectedItem,\n tree,\n treeRoot,\n triggerTreeRerender,\n uniqueTreeViewUUID,\n virtualListHelpers,\n visibleItems,\n withCheckboxChecks,\n withDragAndDrop,\n withRadioChecks,\n updateUserExpandedState,\n ],\n );\n // this hooks can't use the context because the context provider doesn't wrap this\n // as such we manually pass the second parameter as fit\n if (instanceRef) instanceRef.current = treeRef.current;\n useInstanceRefActions(treeRef.current, ctx);\n useGlobalToggleAllExpandShortcut(treeRoot, triggerTreeRerender, setLatestToggledItem, updateUserExpandedState);\n useNotifyExpandedChange(propsWithDefault, ctx);\n\n // this is an horrible hack.\n // this is required because there is no \"on rendered\" react-way to check if every children has finished rendering\n // this should be working for now, in the future we may want to review this for a better solution\n useEffect(() => {\n setTimeout(() => onInstanceRefInitialized(treeRef), 100);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return useMemo(() => ({ ctx }), [ctx]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAkE;AAClE,2BAA2B;AAC3B,8BAA6E;AAC7E,kBAA6B;AAE7B,mCAAkC;AAClC,6BAAwD;AACxD,iBAA8B;AAC9B,qBAAwB;AACxB,mCAA0D;AAC1D,mCAAsC;AACtC,8BAAiD;AAM1C,MAAM,cAA4B,CAAC,UAAU;AAClD,QAAM,mBAAmB,0DAAgD,OAAO;AAChF,8DAAkD,kBAAkB;AACpE,QAAM,iBAAiB;AAAA,IACrB,SAAS;AAAA,MACP,iBAAiB,MAAM;AAAA;AAAA,M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A;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAEF;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAKJ,MAAI;AAAa,gBAAY,UAAU,QAAQ;AAC/C,0DAAsB,QAAQ,SAAS;AACvC,gEAAiC,UAAU,qBAAqB,sBAAsB;AACtF,4DAAwB,kBAAkB;AAK1C,8BAAU,MAAM;AACd,eAAW,MAAM,yBAAyB,UAAU;AAAA,KAEnD;AAEH,SAAO,0BAAQ,MAAO,GAAE,QAAQ,CAAC;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/parts/TreeItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useContext, useState, useMemo, useRef, useCallback } from 'react';\nimport { SortableElement, SortableHandle } from '@elliemae/react-sortable-hoc';\n\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { GripperVertical } from '@elliemae/ds-icons';\n\nimport RadioSelectable from './RadioSelectable';\nimport CheckboxSelectable from './CheckboxSelectable';\nimport TreeViewContext from '../TreeViewContext';\nimport { setMultipleRefs } from '../utils/refs-helpers';\nimport { useOnItemKeyDown } from '../utils/keyboard-helpers';\nimport { NestingSpace } from './NestingSpace';\nimport { Icon } from './Icon';\nimport { ExpandCaret } from './ExpandCaret';\nimport { TreeItemText } from './TreeItemText';\nimport { DSTreeViewPrefix, treeItemBlockName } from '../config/cssClassesConstants';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nexport const TreeListItem = aggregatedClasses('li', {\n 'data-testid': treeItemBlockName,\n role: 'treeitem',\n // temp fix untill we move to styled components\n})(treeItemBlockName) as unknown as React.ComponentType<React.ComponentProps<'li'>>;\n\nexport const TreeListItemAddonsWrapper = aggregatedClasses('div')(\n treeItemBlockName,\n 'addons',\n // temp fix untill we move to styled components\n) as unknown as React.ComponentType;\n\nconst DnDHandle = SortableHandle(({ id }: { id: DSTreeviewT.StringOrNum }) => (\n <GripperVertical\n data-testid=\"drag-handle\"\n key={`${id}-drag-handle`}\n className=\"drag-handle\"\n size=\"s\"\n onMouseDown={(e: React.MouseEvent) => {\n // prevent focusing the drag-handle to avoid borders\n if (e) {\n e.preventDefault();\n }\n }}\n tabIndex=\"0\"\n />\n));\ninterface PropsT {\n item: DSTreeviewT.Item;\n itemIndex: number;\n virtualItemRef: React.RefObject<HTMLLIElement>;\n itemWrapperStyle?: { [key: string]: unknown };\n spaceForNestingLevel?: number;\n onMouseDragOverItem?: (opts: {\n event: React.MouseEvent<HTMLLIElement>;\n item: DSTreeviewT.Item;\n itemIndex: number;\n setIsDraggingOverThis: React.Dispatch<React.SetStateAction<boolean>>;\n openFolderOnHoverTimeout: React.MutableRefObject<NodeJS.Timeout | null>;\n }) => void;\n}\nexport const TreeItem = (props: PropsT): JSX.Element => {\n const {\n item,\n itemIndex,\n itemWrapperStyle = {},\n virtualItemRef,\n spaceForNestingLevel = 1.5,\n onMouseDragOverItem,\n } = props;\n const { id, node } = item;\n const { nodeItemRef } = node.model;\n const openFolderOnHoverTimeout = useRef<NodeJS.Timeout | null>(null);\n\n const [isDraggingOverThis, setIsDraggingOverThis] = useState(false);\n const onItemKeyDown = useOnItemKeyDown(item);\n\n const ctx = useContext(TreeViewContext);\n const {\n props: { disableIcons, rightAddons, onItemClick, onItemFocus, rowSize, labelOverflow },\n relativeMouseCord,\n withRadioChecks,\n withCheckboxChecks,\n withDragAndDrop,\n selectedItem,\n selectedCheckboxes,\n hoverItem,\n isDragging,\n virtualListHelpers: { scrollToIndex },\n setHoverItem,\n setSelectedItem,\n setFocusedItem,\n } = ctx;\n\n // Sortable Items needs to update\n // - the virtual list ref (for react-virtual requirement)\n // - nodeItemRef which is a prop avaiable in the TreeModel nodes\n const setItemRefs: React.LegacyRef<HTMLLIElement> | undefined = (ref: HTMLLIElement) => {\n setMultipleRefs(virtualItemRef, nodeItemRef)(ref);\n };\n\n const dropPreviewClassName = useMemo(() => {\n if (!withDragAndDrop || !relativeMouseCord || !isDraggingOverThis) return '';\n const { isBefore, isAfter, isValid } = relativeMouseCord;\n let className = `${DSTreeViewPrefix}-${treeItemBlockName}${isValid ? '--valid' : '--invalid'}`;\n\n if (isBefore) className += '-drop-before';\n else if (isAfter) className += '-drop-after';\n else className += '-drop-in';\n return className;\n }, [withDragAndDrop, relativeMouseCord, isDraggingOverThis]);\n\n const selectedClassName = useMemo(\n () => (selectedItem?.id === item.id ? 'selected' : ''),\n [item.id, selectedItem?.id],\n );\n const hoverClassName = useMemo(\n () => (hoverItem?.id !== item.id || (withDragAndDrop && isDragging) ? '' : 'hover'),\n [hoverItem?.id, item.id, withDragAndDrop, isDragging],\n );\n const fixedHeightClassname = useMemo(() => {\n if (labelOverflow === 'truncate') {\n if (rowSize === 'compact') return `${DSTreeViewPrefix}-${treeItemBlockName}--fixed-height-compact`;\n return `${DSTreeViewPrefix}-${treeItemBlockName}--fixed-height`;\n }\n return '';\n }, [labelOverflow, rowSize]);\n\n const finalClassName = useMemo(\n () => `${dropPreviewClassName} ${fixedHeightClassname} ${selectedClassName} ${hoverClassName}`,\n [dropPreviewClassName, selectedClassName, hoverClassName, fixedHeightClassname],\n );\n\n const handleItemClick = useCallback(\n (e: React.MouseEvent<HTMLLIElement>) => {\n onItemClick(item, e);\n setFocusedItem(item);\n setSelectedItem(item);\n const itemVirtualIndex = typeof item.virtualIndex === 'number' ? item.virtualIndex : -1;\n onItemFocus({\n itemIndex: itemVirtualIndex,\n scrollToItem: (opts = { align: 'start' }) => scrollToIndex(itemVirtualIndex, opts),\n item,\n });\n },\n [item, scrollToIndex, onItemClick, onItemFocus, setSelectedItem, setFocusedItem],\n );\n\n return (\n <TreeListItem\n tabIndex={0}\n onMouseMove={(event) => {\n if (withDragAndDrop && onMouseDragOverItem) {\n onMouseDragOverItem({\n event,\n item,\n itemIndex,\n setIsDraggingOverThis,\n openFolderOnHoverTimeout,\n });\n }\n }}\n onMouseLeave={() => {\n if (withDragAndDrop) {\n setIsDraggingOverThis(false);\n if (openFolderOnHoverTimeout?.current) clearTimeout(openFolderOnHoverTimeout.current);\n }\n if (hoverItem?.id === item.id) {\n setHoverItem(null);\n }\n }}\n onMouseEnter={() => {\n setHoverItem(item);\n }}\n onClick={handleItemClick}\n ref={setItemRefs}\n style={{ ...itemWrapperStyle }}\n className={finalClassName}\n aria-expanded={!!item.isExpanded}\n aria-selected={!!selectedCheckboxes[item.id]}\n data-id={item.id}\n data-index={item.virtualIndex}\n onKeyDown={onItemKeyDown}\n >\n <TreeListItemAddonsWrapper>\n {withDragAndDrop ? <DnDHandle id={id} /> : null}\n {withRadioChecks ? <RadioSelectable item={item} itemIndex={itemIndex} /> : null}\n {withCheckboxChecks ? <CheckboxSelectable item={item} itemIndex={itemIndex} /> : null}\n <NestingSpace item={item} spaceForNestingLevel={spaceForNestingLevel} />\n <ExpandCaret item={item} />\n {!disableIcons ? <Icon item={item} /> : null}\n </TreeListItemAddonsWrapper>\n <TreeItemText item={item} />\n {rightAddons && (\n <TreeListItemAddonsWrapper>\n {typeof rightAddons === 'function' ? rightAddons(item) : rightAddons}\n </TreeListItemAddonsWrapper>\n )}\n </TreeListItem>\n );\n};\n\nexport const DragAndDropTre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"sources": ["../../../src/parts/TreeList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { SortableContainer } from '@elliemae/react-sortable-hoc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\n\nimport TreeViewContext from '../TreeViewContext';\nimport { DSTreeViewPrefix, treeListBlockName } from '../config/cssClassesConstants';\nimport { TreeItem, DragAndDropTreeItem } from './TreeItem';\n\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nexport const treeListNoItemsBn = `${treeListBlockName}-no-items`;\nexport const TreeListNoItems = aggregatedClasses('div', {\n 'data-testid': treeListNoItemsBn,\n})(treeListNoItemsBn) as unknown as React.ComponentType<React.ComponentProps<'div'>>;\n\n// React.ComponentProps<'ul'> uses LegacyRef typings that existed pre-hook era\n// we omit the LegacyRef typings in favor of hook-era typings\ninterface UlProps extends Omit<React.ComponentProps<'ul'>, 'ref'> {\n ref: React.MutableRefObject<HTMLUListElement | undefined> | undefined;\n}\nexport const TreeListWrapper = aggregatedClasses('ul', {\n 'data-testid': treeListBlockName,\n role: 'tree',\n})(treeListBlockName, null, ({ rowSize }: { rowSize: 'normal' | 'compact' }) => ({\n [`rowsize-${rowSize}`]: rowSize,\n})) as unknown as React.ComponentType<UlProps>;\n\nconst compactRowClass = `${DSTreeViewPrefix}-tv-row-size-compact`;\nconst normaRowClass = `${DSTreeViewPrefix}-tv-row-size-normal`;\n\ninterface PropsT {\n onMouseDragOverItem?: (opts: {\n event: React.MouseEvent<HTMLLIElement>;\n item: DSTreeviewT.Item;\n itemIndex: number;\n setIsDraggingOverThis: React.Dispatch<React.SetStateAction<boolean>>;\n openFolderOnHoverTimeout: React.MutableRefObject<NodeJS.Timeout | null>;\n }) => void;\n}\n\nexport const TreeList = (props: PropsT) => {\n const { onMouseDragOverItem } = props;\n const ctx = useContext(TreeViewContext);\n const {\n virtualListRef,\n virtualListHelpers,\n visibleItems,\n withDragAndDrop,\n props: { width, height, rowSize, noItemsPlaceholder, isLoading },\n } = ctx;\n const { totalSize, virtualItems } = virtualListHelpers;\n const className = `${rowSize === 'compact' ? `${compactRowClass}` : `${normaRowClass}`}`;\n\n return (\n <TreeListWrapper\n ref={virtualListRef}\n className={className}\n style={{\n height: `${typeof height === 'number' ? `${height}px` : height}`,\n width: `${typeof width === 'number' ? `${width}px` : width}`,\n overflow: 'auto',\n }}\n >\n {isLoading ? (\n <div\n style={{\n width: '100%',\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <DSCircularProgressIndicator size=\"xl\" loading={isLoading} showLabel waiting={false} showTooltip={false} />\n </div>\n ) : null}\n {!isLoading && virtualItems.length === 0 ? <TreeListNoItems>{noItemsPlaceholder}</TreeListNoItems> : null}\n {!isLoading && virtualItems.length !== 0 ? (\n <div\n style={{\n height: `${totalSize}px`,\n width: '100%',\n position: 'relative',\n }}\n >\n {virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const item = visibleItems[index];\n item.virtualIndex = index;\n const { id } = item;\n\n const style = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${start}px)`,\n };\n\n const listItemProps = {\n key: `DS-TreeView-List-Item-${id}`,\n virtualItemRef: measureRef,\n index, // this is consumed by the DnD HOC\n itemIndex: index,\n item,\n itemWrapperStyle: style,\n };\n\n if (withDragAndDrop)\n return <DragAndDropTreeItem {...listItemProps} onMouseDragOverItem={onMouseDragOverItem} />;\n return <TreeItem {...listItemProps} />;\n })}\n </div>\n ) : null}\n </TreeListWrapper>\n );\n};\ntype SortablePropsT = PropsT & {\n disableAnimation?: boolean;\n getContainer: (element: React.ReactElement<unknown>) => HTMLElement | Promise<HTMLElement>;\n};\nexport const DragAndDropTreeList = SortableContainer<SortablePropsT>(TreeList);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-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,SAAS;AAAA,IAAO,aAAa;AAAA,QAElG,MACH,CAAC,aAAa,aAAa,WAAW,IAAI,mDAAC,iBAAD,MAAkB,sBAAwC,MACpG,CAAC,aAAa,aAAa,WAAW,IACrC,mDAAC,OAAD;AAAA,IACE,OAAO;AAAA,MACL,QAAQ,GAAG;AAAA,MACX,OAAO;AAAA,MACP,UAAU;AAAA;AAAA,KAGX,aAAa,IAAI,CAAC,gBAAgB;AACjC,UAAM,EAAE,OAAO,YAAY,UAAU;AACrC,UAAM,OAAO,aAAa;AAC1B,SAAK,eAAe;AACpB,UAAM,EAAE,OAAO;AAEf,UAAM,QAAQ;AAAA,MACZ,UAAU;AAAA,MACV,KAAK;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,MACP,WAAW,cAAc;AAAA;AAG3B,UAAM,gBAAgB;AAAA,MACpB,KAAK,yBAAyB;AAAA,MAC9B,gBAAgB;AAAA,MAChB;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA,kBAAkB;AAAA;AAGpB,QAAI;AACF,aAAO,mDAAC,qCAAD;AAAA,WAAyB;AAAA,QAAe;AAAA;AACjD,WAAO,mDAAC,0BAAD;AAAA,SAAc;AAAA;AAAA,QAGvB;AAAA;AAQH,MAAM,sBAAsB,iDAAkC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
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 TreeDndPlugin_exports = {};
|
|
29
|
-
__export(TreeDndPlugin_exports, {
|
|
30
|
-
TreeDnD: () => TreeDnD,
|
|
31
|
-
TreeDndPlugin: () => TreeDndPlugin
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_TreeList = require("../../parts/TreeList");
|
|
36
|
-
var import_useDnDHelpers = require("../../utils/useDnDHelpers");
|
|
37
|
-
var import_dnd_helpers = require("../../utils/dnd-helpers");
|
|
38
|
-
var import_TreeViewContext = __toESM(require("../../TreeViewContext"));
|
|
39
|
-
const TreeDnD = () => {
|
|
40
|
-
const { updateBeforeSortStart, onSortStart, onMouseDragOverItem, onSortEnd } = (0, import_useDnDHelpers.useDnDHelpers)();
|
|
41
|
-
const ctx = (0, import_react.useContext)(import_TreeViewContext.default);
|
|
42
|
-
const { virtualListRef } = ctx;
|
|
43
|
-
return /* @__PURE__ */ import_react.default.createElement(import_TreeList.DragAndDropTreeList, {
|
|
44
|
-
useDragHandle: true,
|
|
45
|
-
transitionDuration: 0,
|
|
46
|
-
keyboardSortingTransitionDuration: 0,
|
|
47
|
-
hideSortableGhost: false,
|
|
48
|
-
disableAnimation: true,
|
|
49
|
-
updateBeforeSortStart,
|
|
50
|
-
onSortStart,
|
|
51
|
-
onMouseDragOverItem,
|
|
52
|
-
onSortEnd,
|
|
53
|
-
getContainer: () => virtualListRef?.current,
|
|
54
|
-
keyCodes: import_dnd_helpers.keyCodes
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
const TreeDndPlugin = "tree-dnd";
|
|
58
|
-
module.exports = __toCommonJS(TreeDndPlugin_exports);
|
|
59
|
-
//# sourceMappingURL=TreeDndPlugin.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/dnd/TreeDndPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useContext } from 'react';\n\nimport { DragAndDropTreeList } from '../../parts/TreeList';\n\nimport { useDnDHelpers } from '../../utils/useDnDHelpers';\nimport { keyCodes } from '../../utils/dnd-helpers';\n\nimport TreeViewContext from '../../TreeViewContext';\nexport const TreeDnD = () => {\n const { updateBeforeSortStart, onSortStart, onMouseDragOverItem, onSortEnd } = useDnDHelpers();\n const ctx = useContext(TreeViewContext);\n const { virtualListRef } = ctx;\n return (\n <DragAndDropTreeList\n useDragHandle\n transitionDuration={0}\n keyboardSortingTransitionDuration={0}\n hideSortableGhost={false}\n disableAnimation\n updateBeforeSortStart={updateBeforeSortStart}\n onSortStart={onSortStart}\n onMouseDragOverItem={onMouseDragOverItem}\n onSortEnd={onSortEnd}\n getContainer={() => virtualListRef?.current as HTMLUListElement}\n keyCodes={keyCodes}\n />\n );\n};\n\nexport const TreeDndPlugin = 'tree-dnd';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAElC,sBAAoC;AAEpC,2BAA8B;AAC9B,yBAAyB;AAEzB,6BAA4B;AACrB,MAAM,UAAU,MAAM;AAC3B,QAAM,EAAE,uBAAuB,aAAa,qBAAqB,cAAc;AAC/E,QAAM,MAAM,6BAAW;AACvB,QAAM,EAAE,mBAAmB;AAC3B,SACE,mDAAC,qCAAD;AAAA,IACE,eAAa;AAAA,IACb,oBAAoB;AAAA,IACpB,mCAAmC;AAAA,IACnC,mBAAmB;AAAA,IACnB,kBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc,MAAM,gBAAgB;AAAA,IACpC,UAAU;AAAA;AAAA;AAKT,MAAM,gBAAgB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport { PropTypes } from 'react-desc';\nimport TreeModel from 'tree-model';\nimport { useVirtual } from 'react-virtual';\nexport declare namespace DSTreeviewT {\n export type StringOrNum = string | number;\n export type SelectionState = boolean | 'mixed';\n export type SelectionItems = Record<StringOrNum, SelectionState>;\n export type ScrollToFunc = ReturnType<typeof useVirtual>['scrollToIndex'];\n export type ScrollToItemOptions = Parameters<ReturnType<typeof useVirtual>['scrollToIndex']>[1];\n export type ScrollToItemFunc = (options: ScrollToItemOptions) => void;\n export type ExpandedItems = Record<StringOrNum, true>; // { [id]:true } -> e.g. {1:true; 2:true} // false are not listed\n export interface SimpleItem {\n [key: string]: unknown;\n name: string;\n children: SimpleItem[];\n id: StringOrNum;\n }\n export interface Item extends SimpleItem {\n children: Item[];\n treeDepth?: number;\n virtualIndex?: number;\n isChecked?: boolean | 'mixed';\n isGroup?: boolean;\n isExpanded?: boolean;\n childrenMatchesSearchQuery?: boolean;\n matchesSearchQuery?: boolean;\n nodeItemRef?: React.RefObject<HTMLLIElement>;\n model: TreeModel.Node<Item>['model'];\n node: TreeModel.Node<Item>;\n nodePath: TreeModel.Node<Item>[];\n }\n\n export interface Actions {\n toggleExpandAll: (isExpand: boolean) => Promise<DSTreeviewT.Item[]>;\n scrollTo: DSTreeviewT.ScrollToFunc;\n setSelectedItemByVirtualIndex: (index: number) => void;\n setFocusedItemByVirtualIndex: (\n index: number,\n scrollOpts: DSTreeviewT.ScrollToItemOptions & { withScroll?: boolean },\n ) => void;\n }\n export interface InstanceRef {\n actions: Actions;\n }\n\n export interface DefaultProps {\n plugins: string[];\n selection: SelectionItems;\n instanceRef: React.MutableRefObject<InstanceRef>;\n isItemDisabled: (item: Item) => boolean;\n disableIcons: boolean;\n fluid: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n restrictDragAndDrop: boolean;\n showChildrenAmount: boolean;\n sortable: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<HTMLLIElement>) => void;\n onItemFocus: (meta: { scrollToItem: ScrollToItemFunc; itemIndex: number; item: Item }) => void;\n onVisibleItemsChange: (newVisibleItems: Item[]) => void;\n onOrderChange: (newData: Item[], oldData: Item[], draggedItem: Item) => void;\n onSelectionChange: (\n selection: SelectionItems,\n item: Item,\n meta: { scrollToItem: ScrollToItemFunc; itemIndex: number },\n ) => void;\n onExpandChange: (expandedHashmap: ExpandedItems, itemToggled: Item | null | undefined) => void;\n onInstanceRefInitialized: (instanceRef: React.MutableRefObject<InstanceRef>) => void;\n rowSize: 'normal' | 'compact';\n labelOverflow: 'wrap' | 'wrap-all' | 'truncate';\n noItemsPlaceholder: string;\n nameKey: string;\n width: StringOrNum;\n height: StringOrNum;\n groupIcon: JSX.Element | null;\n itemIcon: JSX.Element | null;\n searchQuery: string;\n }\n export interface PropsOptional {\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode | React.ReactNode[]) | JSX.Element;\n }\n export interface PropsRequired {\n data: Item[];\n }\n export interface Props extends DefaultProps, PropsOptional, PropsRequired {}\n}\n\nexport const TreeViewPropTypes = {\n data: PropTypes.arrayOf(\n PropTypes.shape({\n children: PropTypes.arrayOf(PropTypes.object),\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n isGroup: PropTypes.oneOfType([PropTypes.oneOf([undefined, null]), PropTypes.bool]),\n name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.arrayOf(PropTypes.string).description('list of enabled plugins').defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\n expanded: PropTypes.object.description('control what items are expanded').defaultValue(undefined),\n instanceRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null, undefined]),\n PropTypes.shape({\n actions: PropTypes.shape({\n toggleExpandAll: PropTypes.func,\n scrollTo: PropTypes.func,\n }).description('').isRequired,\n }),\n ]),\n }).description('instance ref'),\n isItemDisabled: PropTypes.func\n .description('Function that receives an item, and returns whether that item should be disabled')\n .defaultValue('() => false'),\n disableIcons: PropTypes.bool.description('disable icons').defaultValue(false),\n fluid: PropTypes.bool.description('whether is fluid or not').defaultValue(false),\n isMultiSelect: PropTypes.bool.description('whether the tree view is multi select or not').defaultValue(false),\n isSingleSelect: PropTypes.bool.description('wheter the tree view is single select or not').defaultValue(false),\n isLoading: PropTypes.bool.description('wheter the tree should show the loading state or not').defaultValue(false),\n restrictDragAndDrop: PropTypes.bool.description('whether to restrict DnD functionality or not').defaultValue(false),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n sortable: PropTypes.bool.description('whether the sortable functionality is active or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').defaultValue('() => {}'),\n onItemFocus: PropTypes.func.description('function executed when focusing on an item').defaultValue('() => {}'),\n onVisibleItemsChange: PropTypes.func\n .description('function executed when the visible items change')\n .defaultValue('() => {}'),\n onOrderChange: PropTypes.func.description('function executed when the items order changes').defaultValue('() => {}'),\n onSelectionChange: PropTypes.func\n .description('function executed when the selection changes')\n .defaultValue('() => {}'),\n onExpandChange: PropTypes.func.description('function executed when expanding an item').defaultValue('() => {}'),\n onInstanceRefInitialized: PropTypes.func\n .description('function executed when instanceRef has terminated instanciation')\n .defaultValue('() => {}'),\n rowSize: PropTypes.oneOf(['normal', 'compact']).description('size of the row').defaultValue('normal'),\n labelOverflow: PropTypes.oneOf(['wrap', 'wrap-all', 'truncate'])\n .description('label truncation preference')\n .defaultValue('wrap'),\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('components width').defaultValue('100%'),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('components height')\n .defaultValue('100%'),\n groupIcon: PropTypes.node.description('icon for groups'),\n itemIcon: PropTypes.node.description('icon for items'),\n searchQuery: PropTypes.string.description('search query value'),\n noItemsPlaceholder: PropTypes.string\n .description('message to be shown when there are no items in the treeview to be displayed')\n .defaultValue('No items found'),\n name: PropTypes.string.description('property key to identifier for items labels').defaultValue('name'),\n highlightOnlyQuery: PropTypes.bool.description('whether to highlight results or not').defaultValue(false),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAA0B;AA0FnB,MAAM,oBAAoB;AAAA,EAC/B,MAAM,4BAAU,QACd,4BAAU,MAAM;AAAA,IACd,UAAU,4BAAU,QAAQ,4BAAU;AAAA,IACtC,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU;AAA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,EAChB,eAAe,4BAAU,KAAK,YAAY,kDAAkD,aAAa;AAAA,EACzG,mBAAmB,4BAAU,KAC1B,YAAY,gDACZ,aAAa;AAAA,EAChB,gBAAgB,4BAAU,KAAK,YAAY,4CAA4C,aAAa;AAAA,EACpG,0BAA0B,4BAAU,KACjC,YAAY,mEACZ,aAAa;AAAA,EAChB,SAAS,4BAAU,MAAM,CAAC,UAAU,YAAY,YAAY,mBAAmB,aAAa;AAAA,EAC5F,eAAe,4BAAU,MAAM,CAAC,QAAQ,YAAY,aACjD,YAAY,+BACZ,aAAa;AAAA,EAChB,OAAO,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY,oBAAoB,aAAa;AAAA,EAC9G,QAAQ,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SACtD,YAAY,qBACZ,aAAa;AAAA,EAChB,WAAW,4BAAU,KAAK,YAAY;AAAA,EACtC,UAAU,4BAAU,KAAK,YAAY;AAAA,EACrC,aAAa,4BAAU,OAAO,YAAY;AAAA,EAC1C,oBAAoB,4BAAU,OAC3B,YAAY,+EACZ,aAAa;AAAA,EAChB,MAAM,4BAAU,OAAO,YAAY,+CAA+C,aAAa;AAAA,EAC/F,oBAAoB,4BAAU,KAAK,YAAY,uCAAuC,aAAa;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/cjs/sharedTypes.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/sharedTypes.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import TreeModel from 'tree-model';\nimport { useVirtual } from 'react-virtual';\nimport type { SetStateAction } from 'react';\nimport type { DSTreeviewT } from './react-desc-prop-types';\n\nexport declare namespace DSTreeviewInternalsT {\n export type GenericFunc<T extends unknown[]> = (..._args: T) => void;\n export type DnDMovementDirectionT = 'topToBottom' | 'bottomToTop';\n export interface MouseCoord {\n isBefore: boolean;\n isAfter: boolean;\n isValid: boolean;\n item: DSTreeviewT.Item | null;\n x: number | null;\n y: number | null;\n relativeElementDOMRect: DOMRect | null;\n relativeElementIndex: number | null;\n }\n\n export type StateSetter<T = unknown> = React.Dispatch<SetStateAction<T>>;\n\n export interface CTX {\n props: DSTreeviewT.Props;\n visibleItems: DSTreeviewT.Item[];\n withRadioChecks: boolean;\n withCheckboxChecks: boolean;\n withDragAndDrop: boolean;\n relativeMouseCord: MouseCoord;\n setRelativeMouseCord: StateSetter<MouseCoord>;\n triggerTreeRerender: () => void;\n tree?: TreeModel;\n treeRoot?: TreeModel.Node<DSTreeviewT.Item>;\n virtualListHelpers: ReturnType<typeof useVirtual>;\n virtualListRef?: React.MutableRefObject<HTMLUListElement | undefined>;\n isDragging: boolean;\n setIsDragging: StateSetter<boolean>;\n isKeyboardDragging: boolean;\n setIsKeyboardDragging: StateSetter<boolean>;\n draggedItem: DSTreeviewT.Item | null;\n setDraggedItem: StateSetter<DSTreeviewT.Item | null>;\n uniqueTreeViewUUID: string;\n selectedItem: DSTreeviewT.Item | null;\n setSelectedItem: StateSetter<DSTreeviewT.Item | null>;\n focusedItem: DSTreeviewT.Item | null;\n setFocusedItem: StateSetter<DSTreeviewT.Item | null>;\n selectedCheckboxes: DSTreeviewT.SelectionItems;\n setSelectedCheckboxes: StateSetter<DSTreeviewT.SelectionItems>;\n expandedGroups: DSTreeviewT.ExpandedItems;\n setExpandedGroups: StateSetter<DSTreeviewT.ExpandedItems>;\n latestToggledItem?: DSTreeviewT.Item | null | undefined; // item -> if toggle all -> should be undefined\n setLatestToggledItem: StateSetter<DSTreeviewT.Item | null>;\n hoverItem: DSTreeviewT.Item | null;\n setHoverItem: StateSetter<DSTreeviewT.Item | null>;\n handleExpandGroup: (\n itemToToggle: DSTreeviewT.Item,\n triggerTreeRerender: () => void,\n updateUserExpandedState: () => void,\n scrollTo?: DSTreeviewT.ScrollToFunc,\n e?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n updateUserExpandedState: () => void;\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|