@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.
Files changed (177) hide show
  1. package/cjs/TreeView.js +49 -31
  2. package/cjs/TreeView.js.map +7 -0
  3. package/cjs/TreeViewContext.js +53 -35
  4. package/cjs/TreeViewContext.js.map +7 -0
  5. package/cjs/config/cssClassesConstants.js +41 -13
  6. package/cjs/config/cssClassesConstants.js.map +7 -0
  7. package/cjs/config/useTreeview.js +108 -80
  8. package/cjs/config/useTreeview.js.map +7 -0
  9. package/cjs/index.js +37 -27
  10. package/cjs/index.js.map +7 -0
  11. package/cjs/parts/CheckboxSelectable.js +70 -59
  12. package/cjs/parts/CheckboxSelectable.js.map +7 -0
  13. package/cjs/parts/ChildrenCountDisplayer.js +45 -28
  14. package/cjs/parts/ChildrenCountDisplayer.js.map +7 -0
  15. package/cjs/parts/ExpandCaret.js +85 -83
  16. package/cjs/parts/ExpandCaret.js.map +7 -0
  17. package/cjs/parts/Icon.js +46 -31
  18. package/cjs/parts/Icon.js.map +7 -0
  19. package/cjs/parts/NestingSpace.js +43 -35
  20. package/cjs/parts/NestingSpace.js.map +7 -0
  21. package/cjs/parts/RadioSelectable.js +52 -37
  22. package/cjs/parts/RadioSelectable.js.map +7 -0
  23. package/cjs/parts/TreeItem.js +128 -147
  24. package/cjs/parts/TreeItem.js.map +7 -0
  25. package/cjs/parts/TreeItemText.js +88 -95
  26. package/cjs/parts/TreeItemText.js.map +7 -0
  27. package/cjs/parts/TreeList.js +117 -130
  28. package/cjs/parts/TreeList.js.map +7 -0
  29. package/cjs/plugins/dnd/TreeDndPlugin.js +51 -36
  30. package/cjs/plugins/dnd/TreeDndPlugin.js.map +7 -0
  31. package/cjs/plugins/dnd/index.js +28 -10
  32. package/cjs/plugins/dnd/index.js.map +7 -0
  33. package/cjs/plugins/index.js +34 -22
  34. package/cjs/plugins/index.js.map +7 -0
  35. package/cjs/plugins/roving/TreeRovingPlugin.js +35 -7
  36. package/cjs/plugins/roving/TreeRovingPlugin.js.map +7 -0
  37. package/cjs/plugins/roving/index.js +28 -9
  38. package/cjs/plugins/roving/index.js.map +7 -0
  39. package/cjs/plugins/searchable/SearchableTreePlugin.js +35 -7
  40. package/cjs/plugins/searchable/SearchableTreePlugin.js.map +7 -0
  41. package/cjs/plugins/searchable/index.js +28 -9
  42. package/cjs/plugins/searchable/index.js.map +7 -0
  43. package/cjs/plugins/selectable/SelectablePluginTree.js +35 -7
  44. package/cjs/plugins/selectable/SelectablePluginTree.js.map +7 -0
  45. package/cjs/plugins/selectable/index.js +28 -9
  46. package/cjs/plugins/selectable/index.js.map +7 -0
  47. package/cjs/plugins/toolbar/TreeToolbarPlugin.js +35 -7
  48. package/cjs/plugins/toolbar/TreeToolbarPlugin.js.map +7 -0
  49. package/cjs/plugins/toolbar/index.js +28 -9
  50. package/cjs/plugins/toolbar/index.js.map +7 -0
  51. package/cjs/plugins/tree/TreeDataPlugin.js +35 -7
  52. package/cjs/plugins/tree/TreeDataPlugin.js.map +7 -0
  53. package/cjs/plugins/tree/index.js +28 -9
  54. package/cjs/plugins/tree/index.js.map +7 -0
  55. package/cjs/plugins/virtualization/TreeVirtualizationPlugin.js +35 -7
  56. package/cjs/plugins/virtualization/TreeVirtualizationPlugin.js.map +7 -0
  57. package/cjs/plugins/virtualization/index.js +28 -9
  58. package/cjs/plugins/virtualization/index.js.map +7 -0
  59. package/cjs/react-desc-prop-types.js +82 -53
  60. package/cjs/react-desc-prop-types.js.map +7 -0
  61. package/cjs/related-components/TreeViewSearchBar.js +42 -40
  62. package/cjs/related-components/TreeViewSearchBar.js.map +7 -0
  63. package/cjs/sharedTypes.js +27 -2
  64. package/cjs/sharedTypes.js.map +7 -0
  65. package/cjs/utils/array-helpers.js +35 -11
  66. package/cjs/utils/array-helpers.js.map +7 -0
  67. package/cjs/utils/dnd-helpers.js +90 -84
  68. package/cjs/utils/dnd-helpers.js.map +7 -0
  69. package/cjs/utils/group-expands-helpers.js +86 -59
  70. package/cjs/utils/group-expands-helpers.js.map +7 -0
  71. package/cjs/utils/keyboard-helpers.js +84 -88
  72. package/cjs/utils/keyboard-helpers.js.map +7 -0
  73. package/cjs/utils/object-helpers.js +43 -36
  74. package/cjs/utils/object-helpers.js.map +7 -0
  75. package/cjs/utils/refs-helpers.js +43 -22
  76. package/cjs/utils/refs-helpers.js.map +7 -0
  77. package/cjs/utils/selectable-helper.js +61 -53
  78. package/cjs/utils/selectable-helper.js.map +7 -0
  79. package/cjs/utils/string-helpers.js +35 -7
  80. package/cjs/utils/string-helpers.js.map +7 -0
  81. package/cjs/utils/tree-helpers.js +105 -135
  82. package/cjs/utils/tree-helpers.js.map +7 -0
  83. package/cjs/utils/useDnDHelpers.js +97 -118
  84. package/cjs/utils/useDnDHelpers.js.map +7 -0
  85. package/cjs/utils/useInstanceRefActions.js +54 -43
  86. package/cjs/utils/useInstanceRefActions.js.map +7 -0
  87. package/cjs/utils/useTree.js +76 -78
  88. package/cjs/utils/useTree.js.map +7 -0
  89. package/esm/TreeView.js +18 -20
  90. package/esm/TreeView.js.map +7 -0
  91. package/esm/TreeViewContext.js +24 -29
  92. package/esm/TreeViewContext.js.map +7 -0
  93. package/esm/config/cssClassesConstants.js +12 -6
  94. package/esm/config/cssClassesConstants.js.map +7 -0
  95. package/esm/config/useTreeview.js +61 -54
  96. package/esm/config/useTreeview.js.map +7 -0
  97. package/esm/index.js +8 -9
  98. package/esm/index.js.map +7 -0
  99. package/esm/parts/CheckboxSelectable.js +36 -46
  100. package/esm/parts/CheckboxSelectable.js.map +7 -0
  101. package/esm/parts/ChildrenCountDisplayer.js +16 -20
  102. package/esm/parts/ChildrenCountDisplayer.js.map +7 -0
  103. package/esm/parts/ExpandCaret.js +54 -72
  104. package/esm/parts/ExpandCaret.js.map +7 -0
  105. package/esm/parts/Icon.js +16 -22
  106. package/esm/parts/Icon.js.map +7 -0
  107. package/esm/parts/NestingSpace.js +14 -27
  108. package/esm/parts/NestingSpace.js.map +7 -0
  109. package/esm/parts/RadioSelectable.js +20 -28
  110. package/esm/parts/RadioSelectable.js.map +7 -0
  111. package/esm/parts/TreeItem.js +91 -127
  112. package/esm/parts/TreeItem.js.map +7 -0
  113. package/esm/parts/TreeItemText.js +58 -85
  114. package/esm/parts/TreeItemText.js.map +7 -0
  115. package/esm/parts/TreeList.js +88 -117
  116. package/esm/parts/TreeList.js.map +7 -0
  117. package/esm/plugins/dnd/TreeDndPlugin.js +21 -26
  118. package/esm/plugins/dnd/TreeDndPlugin.js.map +7 -0
  119. package/esm/plugins/dnd/index.js +3 -1
  120. package/esm/plugins/dnd/index.js.map +7 -0
  121. package/esm/plugins/index.js +9 -7
  122. package/esm/plugins/index.js.map +7 -0
  123. package/esm/plugins/roving/TreeRovingPlugin.js +6 -3
  124. package/esm/plugins/roving/TreeRovingPlugin.js.map +7 -0
  125. package/esm/plugins/roving/index.js +3 -1
  126. package/esm/plugins/roving/index.js.map +7 -0
  127. package/esm/plugins/searchable/SearchableTreePlugin.js +6 -3
  128. package/esm/plugins/searchable/SearchableTreePlugin.js.map +7 -0
  129. package/esm/plugins/searchable/index.js +3 -1
  130. package/esm/plugins/searchable/index.js.map +7 -0
  131. package/esm/plugins/selectable/SelectablePluginTree.js +6 -3
  132. package/esm/plugins/selectable/SelectablePluginTree.js.map +7 -0
  133. package/esm/plugins/selectable/index.js +3 -1
  134. package/esm/plugins/selectable/index.js.map +7 -0
  135. package/esm/plugins/toolbar/TreeToolbarPlugin.js +6 -3
  136. package/esm/plugins/toolbar/TreeToolbarPlugin.js.map +7 -0
  137. package/esm/plugins/toolbar/index.js +3 -1
  138. package/esm/plugins/toolbar/index.js.map +7 -0
  139. package/esm/plugins/tree/TreeDataPlugin.js +6 -3
  140. package/esm/plugins/tree/TreeDataPlugin.js.map +7 -0
  141. package/esm/plugins/tree/index.js +3 -1
  142. package/esm/plugins/tree/index.js.map +7 -0
  143. package/esm/plugins/virtualization/TreeVirtualizationPlugin.js +6 -3
  144. package/esm/plugins/virtualization/TreeVirtualizationPlugin.js.map +7 -0
  145. package/esm/plugins/virtualization/index.js +3 -1
  146. package/esm/plugins/virtualization/index.js.map +7 -0
  147. package/esm/react-desc-prop-types.js +47 -43
  148. package/esm/react-desc-prop-types.js.map +7 -0
  149. package/esm/related-components/TreeViewSearchBar.js +13 -32
  150. package/esm/related-components/TreeViewSearchBar.js.map +7 -0
  151. package/esm/sharedTypes.js +2 -1
  152. package/esm/sharedTypes.js.map +7 -0
  153. package/esm/utils/array-helpers.js +6 -6
  154. package/esm/utils/array-helpers.js.map +7 -0
  155. package/esm/utils/dnd-helpers.js +58 -73
  156. package/esm/utils/dnd-helpers.js.map +7 -0
  157. package/esm/utils/group-expands-helpers.js +56 -46
  158. package/esm/utils/group-expands-helpers.js.map +7 -0
  159. package/esm/utils/keyboard-helpers.js +45 -72
  160. package/esm/utils/keyboard-helpers.js.map +7 -0
  161. package/esm/utils/object-helpers.js +14 -31
  162. package/esm/utils/object-helpers.js.map +7 -0
  163. package/esm/utils/refs-helpers.js +15 -19
  164. package/esm/utils/refs-helpers.js.map +7 -0
  165. package/esm/utils/selectable-helper.js +32 -43
  166. package/esm/utils/selectable-helper.js.map +7 -0
  167. package/esm/utils/string-helpers.js +6 -3
  168. package/esm/utils/string-helpers.js.map +7 -0
  169. package/esm/utils/tree-helpers.js +74 -119
  170. package/esm/utils/tree-helpers.js.map +7 -0
  171. package/esm/utils/useDnDHelpers.js +60 -106
  172. package/esm/utils/useDnDHelpers.js.map +7 -0
  173. package/esm/utils/useInstanceRefActions.js +21 -35
  174. package/esm/utils/useInstanceRefActions.js.map +7 -0
  175. package/esm/utils/useTree.js +35 -57
  176. package/esm/utils/useTree.js.map +7 -0
  177. package/package.json +10 -10
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/selectable-helper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable max-params */\nimport { walkParents, walkAllNodeChildren } from './tree-helpers';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nexport const getGroupCheckState = (node: DSTreeviewT.Item['node']) => {\n let childAllChecked = true;\n let anyChildChecked = false;\n walkAllNodeChildren(node, (childNode) => {\n const {\n model: { isChecked },\n } = childNode;\n if (isChecked === 'mixed' || isChecked === true) anyChildChecked = true;\n else childAllChecked = false;\n });\n\n if (childAllChecked) return true;\n if (anyChildChecked) return 'mixed';\n return false;\n};\n\nexport const selectCheckboxItemModelParentsTillRoot = (\n modelToCheck: DSTreeviewT.Item,\n triggerTreeRerender: (() => void) | null = null,\n) => {\n const newSelections: DSTreeviewT.SelectionItems = {};\n const { nodePath } = modelToCheck;\n walkParents(nodePath, (parentNode) => {\n const nextState = getGroupCheckState(parentNode);\n parentNode.model.isChecked = nextState;\n newSelections[parentNode.model.id] = nextState;\n });\n if (triggerTreeRerender) triggerTreeRerender();\n return newSelections;\n};\n\nexport const toggleCheckboxItem = (itemToSelect: DSTreeviewT.Item, triggerTreeRerender: (() => void) | null = null) => {\n const {\n node: {\n model: { id, isChecked, children = [] },\n },\n } = itemToSelect;\n\n const newSelections: DSTreeviewT.SelectionItems = {};\n // 'mixed' -> true -> false -> true [...->false -> true]\n const nextState = isChecked === 'mixed' ? true : !isChecked;\n itemToSelect.node.model.isChecked = nextState;\n newSelections[id] = nextState;\n\n if (children.length > 0 && (nextState === true || nextState === false)) {\n walkAllNodeChildren(itemToSelect.node, (childNode) => {\n childNode.model.isChecked = nextState;\n newSelections[childNode.model.id] = nextState;\n });\n }\n\n const parentsNewSelections = selectCheckboxItemModelParentsTillRoot(itemToSelect);\n\n if (triggerTreeRerender) triggerTreeRerender();\n return { ...parentsNewSelections, ...newSelections };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAiD;AAG1C,MAAM,qBAAqB,CAAC,SAAmC;AACpE,MAAI,kBAAkB;AACtB,MAAI,kBAAkB;AACtB,+CAAoB,MAAM,CAAC,cAAc;AACvC,UAAM;AAAA,MACJ,OAAO,EAAE;AAAA,QACP;AACJ,QAAI,cAAc,WAAW,cAAc;AAAM,wBAAkB;AAAA;AAC9D,wBAAkB;AAAA;AAGzB,MAAI;AAAiB,WAAO;AAC5B,MAAI;AAAiB,WAAO;AAC5B,SAAO;AAAA;AAGF,MAAM,yCAAyC,CACpD,cACA,sBAA2C,SACxC;AACH,QAAM,gBAA4C;AAClD,QAAM,EAAE,aAAa;AACrB,uCAAY,UAAU,CAAC,eAAe;AACpC,UAAM,YAAY,mBAAmB;AACrC,eAAW,MAAM,YAAY;AAC7B,kBAAc,WAAW,MAAM,MAAM;AAAA;AAEvC,MAAI;AAAqB;AACzB,SAAO;AAAA;AAGF,MAAM,qBAAqB,CAAC,cAAgC,sBAA2C,SAAS;AACrH,QAAM;AAAA,IACJ,MAAM;AAAA,MACJ,OAAO,EAAE,IAAI,WAAW,WAAW;AAAA;AAAA,MAEnC;AAEJ,QAAM,gBAA4C;AAElD,QAAM,YAAY,cAAc,UAAU,OAAO,CAAC;AAClD,eAAa,KAAK,MAAM,YAAY;AACpC,gBAAc,MAAM;AAEpB,MAAI,SAAS,SAAS,KAAM,eAAc,QAAQ,cAAc,QAAQ;AACtE,iDAAoB,aAAa,MAAM,CAAC,cAAc;AACpD,gBAAU,MAAM,YAAY;AAC5B,oBAAc,UAAU,MAAM,MAAM;AAAA;AAAA;AAIxC,QAAM,uBAAuB,uCAAuC;AAEpE,MAAI;AAAqB;AACzB,SAAO,KAAK,yBAAyB;AAAA;",
6
+ "names": []
7
+ }
@@ -1,7 +1,35 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const standardizeSearchQueryString = input => input.trim().toLowerCase();
6
-
7
- exports.standardizeSearchQueryString = standardizeSearchQueryString;
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 string_helpers_exports = {};
29
+ __export(string_helpers_exports, {
30
+ standardizeSearchQueryString: () => standardizeSearchQueryString
31
+ });
32
+ var React = __toESM(require("react"));
33
+ const standardizeSearchQueryString = (input) => input.trim().toLowerCase();
34
+ module.exports = __toCommonJS(string_helpers_exports);
35
+ //# sourceMappingURL=string-helpers.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/string-helpers.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const standardizeSearchQueryString = (input: string) => input.trim().toLowerCase();\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,+BAA+B,CAAC,UAAkB,MAAM,OAAO;",
6
+ "names": []
7
+ }
@@ -1,194 +1,164 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.for-each.js');
6
- require('core-js/modules/esnext.iterator.constructor.js');
7
- require('core-js/modules/esnext.iterator.for-each.js');
8
- require('core-js/modules/web.dom-collections.iterator.js');
9
- require('core-js/modules/esnext.async-iterator.find.js');
10
- require('core-js/modules/esnext.iterator.find.js');
11
- require('core-js/modules/esnext.async-iterator.every.js');
12
- require('core-js/modules/esnext.iterator.every.js');
13
- var React = require('react');
14
- var stringHelpers = require('./string-helpers.js');
15
-
16
- const walkVisibles = function (node, callback) {
17
- let skipRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
18
- let highlightOnlyQuery = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
19
- const {
20
- children,
21
- model
22
- } = node;
23
- const {
24
- name,
25
- isExpanded,
26
- childrenMatchesSearchQuery,
27
- matchesSearchQuery
28
- } = model;
29
- const shouldSkipBecauseIsRoot = skipRoot && name === '__root';
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 tree_helpers_exports = {};
29
+ __export(tree_helpers_exports, {
30
+ cloneNode: () => cloneNode,
31
+ enrichNodeModelInPlace: () => enrichNodeModelInPlace,
32
+ focusItem: () => focusItem,
33
+ getChildrenMatchesSearchQuery: () => getChildrenMatchesSearchQuery,
34
+ getItemsParentNode: () => getItemsParentNode,
35
+ getNodeById: () => getNodeById,
36
+ getNodeMatchesSearchQuery: () => getNodeMatchesSearchQuery,
37
+ itemsShareSameParent: () => itemsShareSameParent,
38
+ walkAllNodeChildren: () => walkAllNodeChildren,
39
+ walkParents: () => walkParents,
40
+ walkVisibles: () => walkVisibles
41
+ });
42
+ var React = __toESM(require("react"));
43
+ var import_react = __toESM(require("react"));
44
+ var import_string_helpers = __toESM(require("./string-helpers"));
45
+ const walkVisibles = (node, callback, skipRoot = true, highlightOnlyQuery = false) => {
46
+ const { children, model } = node;
47
+ const { name, isExpanded, childrenMatchesSearchQuery, matchesSearchQuery } = model;
48
+ const shouldSkipBecauseIsRoot = skipRoot && name === "__root";
30
49
  const queryRestrictionsPassed = !!(highlightOnlyQuery || childrenMatchesSearchQuery || matchesSearchQuery);
31
- if (!shouldSkipBecauseIsRoot && queryRestrictionsPassed) callback(node);
50
+ if (!shouldSkipBecauseIsRoot && queryRestrictionsPassed)
51
+ callback(node);
32
52
  const shouldWalkChildren = !!(children.length > 0 && isExpanded && queryRestrictionsPassed);
33
-
34
53
  if (shouldWalkChildren) {
35
- children.forEach(childNode => {
54
+ children.forEach((childNode) => {
36
55
  walkVisibles(childNode, callback, skipRoot, highlightOnlyQuery);
37
56
  });
38
57
  }
39
58
  };
40
- const walkParents = function (nodePath, callback) {
41
- let skipRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
59
+ const walkParents = (nodePath, callback, skipRoot = true) => {
42
60
  const parents = [...nodePath].reverse();
43
- parents.shift(); // remove current node from the parents array
44
-
45
- if (skipRoot) parents.pop(); // remove the root from the parents if skipping root
46
-
61
+ parents.shift();
62
+ if (skipRoot)
63
+ parents.pop();
47
64
  parents.forEach(callback);
48
65
  };
49
- const walkAllNodeChildren = function (node, callback) {
50
- let isFirst = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
51
- const {
52
- children = []
53
- } = node;
66
+ const walkAllNodeChildren = (node, callback, isFirst = true) => {
67
+ const { children = [] } = node;
54
68
  const shouldWalkChildren = children.length;
55
- if (!isFirst) callback(node);
56
-
69
+ if (!isFirst)
70
+ callback(node);
57
71
  if (shouldWalkChildren) {
58
- children.forEach(childNode => {
72
+ children.forEach((childNode) => {
59
73
  walkAllNodeChildren(childNode, callback, false);
60
74
  });
61
75
  }
62
76
  };
63
77
  const getNodeById = (treeRoot, id) => {
64
- const nodes = treeRoot.all(node => node.model.id === id);
78
+ const nodes = treeRoot.all((node) => node.model.id === id);
65
79
  return nodes[0];
66
80
  };
67
81
  const cloneNode = (tree, node) => tree.parse(node.model);
68
- const itemsShareSameParent = function () {
69
- let items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
70
- if (items.length === 0) throw new Error('Received empty items for comparison');
71
- if (items.length === 1) return true; // when moving in first position we receive [undefined,...{items}]
72
- // when moving in last position we receive [...{items}, undefined]
73
-
74
- const firstExistingItem = items.find(item => !!item);
75
- if (!firstExistingItem) throw new Error("Received no items, can't retrieve parent");
76
- const firstExistingItemPath = firstExistingItem.node.getPath(); // path is like [rootParent, ...[parentsNodes], currentNode]
77
- // length -1 is the current-node
78
- // length -2 is the parent-node
79
- // root node is not printed and is always present so minimum path length is 2 (root + currentNode)
80
-
82
+ const itemsShareSameParent = (items = []) => {
83
+ if (items.length === 0)
84
+ throw new Error("Received empty items for comparison");
85
+ if (items.length === 1)
86
+ return true;
87
+ const firstExistingItem = items.find((item) => !!item);
88
+ if (!firstExistingItem)
89
+ throw new Error("Received no items, can't retrieve parent");
90
+ const firstExistingItemPath = firstExistingItem.node.getPath();
81
91
  const directParentNode = firstExistingItemPath[firstExistingItemPath.length - 2];
82
- return items.every(item => {
83
- // undefined nodes count as having the same parent
84
- if (!item) return true;
92
+ return items.every((item) => {
93
+ if (!item)
94
+ return true;
85
95
  const itemPath = item.node.getPath();
86
96
  const itemDirectParent = itemPath[itemPath.length - 2];
87
97
  return directParentNode === itemDirectParent;
88
98
  });
89
99
  };
90
- const getItemsParentNode = function () {
91
- let items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
92
- let skipSameParentCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
93
- if (items.length === 0) throw new Error("Received empty items, can't retrieve parent"); // in case we already know the items compared shares the same parent
94
-
95
- if (!skipSameParentCheck) if (!itemsShareSameParent(items)) // if we don't know (default, we don't) check if they share the parent
96
- throw new Error("Received items don't share the same parent, can't retrieve parent"); // when moving in first position we receive [undefined,...{items}]
97
- // when moving in last position we receive [...{items}, undefined]
98
-
99
- const firstExistingItem = items.find(item => !!item);
100
- if (!firstExistingItem) throw new Error("Received no items, can't retrieve parent");
101
- const firstExistingItemPath = firstExistingItem.node.getPath(); // path is like [rootParent, ...[parentsNodes], currentNode]
102
- // length -1 is the current-node
103
- // length -2 is the parent-node
104
- // root node is not printed and is always present so minimum path length is 2 (root + currentNode)
105
-
100
+ const getItemsParentNode = (items = [], skipSameParentCheck = false) => {
101
+ if (items.length === 0)
102
+ throw new Error("Received empty items, can't retrieve parent");
103
+ if (!skipSameParentCheck) {
104
+ if (!itemsShareSameParent(items))
105
+ throw new Error("Received items don't share the same parent, can't retrieve parent");
106
+ }
107
+ const firstExistingItem = items.find((item) => !!item);
108
+ if (!firstExistingItem)
109
+ throw new Error("Received no items, can't retrieve parent");
110
+ const firstExistingItemPath = firstExistingItem.node.getPath();
106
111
  const directParentNode = firstExistingItemPath[firstExistingItemPath.length - 2];
107
112
  return directParentNode;
108
113
  };
109
- const getNodeMatchesSearchQuery = function (node) {
110
- let searchQuery = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
111
- const standardizedName = stringHelpers.standardizeSearchQueryString(node.model.name);
112
- const standardizedSearchQuery = stringHelpers.standardizeSearchQueryString(searchQuery);
114
+ const getNodeMatchesSearchQuery = (node, searchQuery = "") => {
115
+ const standardizedName = (0, import_string_helpers.standardizeSearchQueryString)(node.model.name);
116
+ const standardizedSearchQuery = (0, import_string_helpers.standardizeSearchQueryString)(searchQuery);
113
117
  return standardizedName.includes(standardizedSearchQuery);
114
118
  };
115
- const getChildrenMatchesSearchQuery = function (parentNode) {
116
- let searchQuery = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
119
+ const getChildrenMatchesSearchQuery = (parentNode, searchQuery = "") => {
117
120
  let anyChildMatch = false;
118
- walkAllNodeChildren(parentNode, node => {
119
- if (getNodeMatchesSearchQuery(node, searchQuery)) anyChildMatch = true;
121
+ walkAllNodeChildren(parentNode, (node) => {
122
+ if (getNodeMatchesSearchQuery(node, searchQuery))
123
+ anyChildMatch = true;
120
124
  });
121
125
  return anyChildMatch;
122
126
  };
123
- /**
124
- * Mutate in place a node from tree-model normalizing object properties like "isGroup" even if user didn't specify it explicitly,
125
- * after execution the node will have "nodePath" "treeDepth" "nodeItemRef" "isGroup" "isExpanded"
126
- * (optionally, based on the provided arguments) "matchesSearchQuery" "childrenMatchesSearchQuery" "isChecked"
127
- *
128
- * @param {Object} node - node (based on 'tree-model' lib) that you wish to mutate with extra props
129
- * @param {string} [searchQuery=''] - optional string used to parse "matchesSearchQuery"/"childrenMatchesSearchQuery" properties
130
- * @param {Object} [selection=null] - optional selection hashmap used to parse "isChecked" properties
131
- * @param {Object} [expanded=null] - optional expanded hashmap used to parse "isExpanded" properties
132
- */
133
-
134
- const enrichNodeModelInPlace = function (node) {
135
- var _node$model, _node$model$children;
136
-
137
- let searchQuery = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
138
- let selection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
139
- let expanded = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
127
+ const enrichNodeModelInPlace = (node, searchQuery = "", selection = null, expanded = null) => {
140
128
  const path = node.getPath();
141
129
  const depth = path.length - 1;
142
130
  node.model.nodePath = path;
143
131
  node.model.treeDepth = depth;
144
-
145
132
  if (!node.model.nodeItemRef) {
146
- node.model.nodeItemRef = /*#__PURE__*/React.createRef();
147
- } // if a node has children but was not marked as isGroup, force-mark as group
148
- // this is useful to avoid having to always check both the flag and the children.length...
149
-
150
-
151
- if (typeof node.model.isGroup !== 'boolean' && ((_node$model = node.model) === null || _node$model === void 0 ? void 0 : (_node$model$children = _node$model.children) === null || _node$model$children === void 0 ? void 0 : _node$model$children.length) > 0) {
133
+ node.model.nodeItemRef = (0, import_react.createRef)();
134
+ }
135
+ if (typeof node.model.isGroup !== "boolean" && node.model?.children?.length > 0) {
152
136
  node.model.isGroup = true;
153
137
  }
154
-
155
- if (node.model.isGroup && node.model.id !== '__ds_tree_root') {
156
- if (expanded) node.model.isExpanded = !!expanded[node.model.id];else if (typeof node.model.isExpanded !== 'boolean') {
138
+ if (node.model.isGroup && node.model.id !== "__ds_tree_root") {
139
+ if (expanded)
140
+ node.model.isExpanded = !!expanded[node.model.id];
141
+ else if (typeof node.model.isExpanded !== "boolean") {
157
142
  node.model.isExpanded = false;
158
143
  }
159
144
  }
160
-
161
145
  node.model.matchesSearchQuery = true;
162
146
  node.model.childrenMatchesSearchQuery = false;
163
147
  const partiallyEnrichedNode = node;
164
-
165
148
  if (searchQuery) {
166
149
  partiallyEnrichedNode.model.matchesSearchQuery = getNodeMatchesSearchQuery(partiallyEnrichedNode, searchQuery);
167
-
168
150
  if (partiallyEnrichedNode.model.isGroup === true) {
169
151
  partiallyEnrichedNode.model.childrenMatchesSearchQuery = getChildrenMatchesSearchQuery(partiallyEnrichedNode, searchQuery);
170
- if (partiallyEnrichedNode.model.childrenMatchesSearchQuery) partiallyEnrichedNode.model.isExpanded = true;
152
+ if (partiallyEnrichedNode.model.childrenMatchesSearchQuery)
153
+ partiallyEnrichedNode.model.isExpanded = true;
171
154
  }
172
155
  }
173
-
174
156
  if (selection && selection[partiallyEnrichedNode.model.id]) {
175
157
  partiallyEnrichedNode.model.isChecked = selection[partiallyEnrichedNode.model.id];
176
158
  }
177
159
  };
178
- const focusItem = item => {
179
- var _item$nodeItemRef, _item$nodeItemRef$cur;
180
-
181
- item === null || item === void 0 ? void 0 : (_item$nodeItemRef = item.nodeItemRef) === null || _item$nodeItemRef === void 0 ? void 0 : (_item$nodeItemRef$cur = _item$nodeItemRef.current) === null || _item$nodeItemRef$cur === void 0 ? void 0 : _item$nodeItemRef$cur.focus();
160
+ const focusItem = (item) => {
161
+ item?.nodeItemRef?.current?.focus();
182
162
  };
183
-
184
- exports.cloneNode = cloneNode;
185
- exports.enrichNodeModelInPlace = enrichNodeModelInPlace;
186
- exports.focusItem = focusItem;
187
- exports.getChildrenMatchesSearchQuery = getChildrenMatchesSearchQuery;
188
- exports.getItemsParentNode = getItemsParentNode;
189
- exports.getNodeById = getNodeById;
190
- exports.getNodeMatchesSearchQuery = getNodeMatchesSearchQuery;
191
- exports.itemsShareSameParent = itemsShareSameParent;
192
- exports.walkAllNodeChildren = walkAllNodeChildren;
193
- exports.walkParents = walkParents;
194
- exports.walkVisibles = walkVisibles;
163
+ module.exports = __toCommonJS(tree_helpers_exports);
164
+ //# sourceMappingURL=tree-helpers.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/tree-helpers.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable max-params */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport { createRef } from 'react';\nimport type TreeModel from 'tree-model';\nimport { standardizeSearchQueryString } from './string-helpers';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nexport const walkVisibles = (\n node: DSTreeviewT.Item['node'],\n callback: (node: DSTreeviewT.Item['node']) => void,\n skipRoot = true,\n highlightOnlyQuery = false,\n) => {\n const { children, model } = node;\n const { name, isExpanded, childrenMatchesSearchQuery, matchesSearchQuery } = model;\n\n const shouldSkipBecauseIsRoot = skipRoot && name === '__root';\n const queryRestrictionsPassed = !!(highlightOnlyQuery || childrenMatchesSearchQuery || matchesSearchQuery);\n\n if (!shouldSkipBecauseIsRoot && queryRestrictionsPassed) callback(node);\n\n const shouldWalkChildren = !!(children.length > 0 && isExpanded && queryRestrictionsPassed);\n if (shouldWalkChildren) {\n children.forEach((childNode) => {\n walkVisibles(childNode, callback, skipRoot, highlightOnlyQuery);\n });\n }\n};\n\nexport const walkParents = (\n nodePath: DSTreeviewT.Item['nodePath'],\n callback: (currParent: DSTreeviewT.Item['node']) => void,\n skipRoot = true,\n) => {\n const parents = [...nodePath].reverse();\n parents.shift(); // remove current node from the parents array\n if (skipRoot) parents.pop(); // remove the root from the parents if skipping root\n parents.forEach(callback);\n};\n\ntype RecursiveCallbackT = (childNode: DSTreeviewT.Item['node'], cb?: RecursiveCallbackT, isFirst?: boolean) => void;\nexport const walkAllNodeChildren = (node: DSTreeviewT.Item['node'], callback: RecursiveCallbackT, isFirst = true) => {\n const { children = [] } = node;\n const shouldWalkChildren = children.length;\n\n if (!isFirst) callback(node);\n\n if (shouldWalkChildren) {\n children.forEach((childNode) => {\n walkAllNodeChildren(childNode, callback, false);\n });\n }\n};\n\nexport const getNodeById = (treeRoot: DSTreeviewT.Item['node'], id: DSTreeviewT.StringOrNum) => {\n const nodes = treeRoot.all((node) => (node as unknown as DSTreeviewT.Item).model.id === id);\n return nodes[0];\n};\n\nexport const cloneNode = (tree: TreeModel, node: DSTreeviewT.Item) => tree.parse(node.model);\n\nexport const itemsShareSameParent = (items: DSTreeviewT.Item[] = []) => {\n if (items.length === 0) throw new Error('Received empty items for comparison');\n if (items.length === 1) return true;\n\n // when moving in first position we receive [undefined,...{items}]\n // when moving in last position we receive [...{items}, undefined]\n const firstExistingItem = items.find((item) => !!item);\n if (!firstExistingItem) throw new Error(\"Received no items, can't retrieve parent\");\n\n const firstExistingItemPath = firstExistingItem.node.getPath();\n // path is like [rootParent, ...[parentsNodes], currentNode]\n // length -1 is the current-node\n // length -2 is the parent-node\n // root node is not printed and is always present so minimum path length is 2 (root + currentNode)\n const directParentNode = firstExistingItemPath[firstExistingItemPath.length - 2];\n\n return items.every((item) => {\n // undefined nodes count as having the same parent\n if (!item) return true;\n const itemPath = item.node.getPath();\n const itemDirectParent = itemPath[itemPath.length - 2];\n return directParentNode === itemDirectParent;\n });\n};\n\nexport const getItemsParentNode = (items: DSTreeviewT.Item[] = [], skipSameParentCheck = false) => {\n if (items.length === 0) throw new Error(\"Received empty items, can't retrieve parent\");\n\n // in case we already know the items compared shares the same parent\n if (!skipSameParentCheck)\n if (!itemsShareSameParent(items))\n // if we don't know (default, we don't) check if they share the parent\n throw new Error(\"Received items don't share the same parent, can't retrieve parent\");\n\n // when moving in first position we receive [undefined,...{items}]\n // when moving in last position we receive [...{items}, undefined]\n const firstExistingItem = items.find((item) => !!item);\n if (!firstExistingItem) throw new Error(\"Received no items, can't retrieve parent\");\n\n const firstExistingItemPath = firstExistingItem.node.getPath();\n // path is like [rootParent, ...[parentsNodes], currentNode]\n // length -1 is the current-node\n // length -2 is the parent-node\n // root node is not printed and is always present so minimum path length is 2 (root + currentNode)\n const directParentNode = firstExistingItemPath[firstExistingItemPath.length - 2];\n return directParentNode as unknown as DSTreeviewT.Item['node'];\n};\n\nexport const getNodeMatchesSearchQuery = (node: DSTreeviewT.Item['node'], searchQuery = '') => {\n const standardizedName = standardizeSearchQueryString(node.model.name);\n const standardizedSearchQuery = standardizeSearchQueryString(searchQuery);\n return standardizedName.includes(standardizedSearchQuery);\n};\n\nexport const getChildrenMatchesSearchQuery = (parentNode: DSTreeviewT.Item['node'], searchQuery = '') => {\n let anyChildMatch = false;\n walkAllNodeChildren(parentNode, (node) => {\n if (getNodeMatchesSearchQuery(node, searchQuery)) anyChildMatch = true;\n });\n return anyChildMatch;\n};\n\n/**\n * Mutate in place a node from tree-model normalizing object properties like \"isGroup\" even if user didn't specify it explicitly,\n * after execution the node will have \"nodePath\" \"treeDepth\" \"nodeItemRef\" \"isGroup\" \"isExpanded\"\n * (optionally, based on the provided arguments) \"matchesSearchQuery\" \"childrenMatchesSearchQuery\" \"isChecked\"\n *\n * @param {Object} node - node (based on 'tree-model' lib) that you wish to mutate with extra props\n * @param {string} [searchQuery=''] - optional string used to parse \"matchesSearchQuery\"/\"childrenMatchesSearchQuery\" properties\n * @param {Object} [selection=null] - optional selection hashmap used to parse \"isChecked\" properties\n * @param {Object} [expanded=null] - optional expanded hashmap used to parse \"isExpanded\" properties\n */\nexport const enrichNodeModelInPlace = (\n node: TreeModel.Node<DSTreeviewT.SimpleItem>,\n searchQuery = '',\n selection: DSTreeviewT.SelectionItems | null = null,\n expanded: DSTreeviewT.ExpandedItems | null = null,\n) => {\n const path = node.getPath();\n const depth = path.length - 1;\n node.model.nodePath = path;\n node.model.treeDepth = depth;\n\n if (!node.model.nodeItemRef) {\n node.model.nodeItemRef = createRef();\n }\n\n // if a node has children but was not marked as isGroup, force-mark as group\n // this is useful to avoid having to always check both the flag and the children.length...\n if (typeof node.model.isGroup !== 'boolean' && node.model?.children?.length > 0) {\n node.model.isGroup = true;\n }\n\n if (node.model.isGroup && node.model.id !== '__ds_tree_root') {\n if (expanded) node.model.isExpanded = !!expanded[node.model.id];\n else if (typeof node.model.isExpanded !== 'boolean') {\n node.model.isExpanded = false;\n }\n }\n\n node.model.matchesSearchQuery = true;\n node.model.childrenMatchesSearchQuery = false;\n const partiallyEnrichedNode = node as unknown as TreeModel.Node<DSTreeviewT.Item>;\n if (searchQuery) {\n partiallyEnrichedNode.model.matchesSearchQuery = getNodeMatchesSearchQuery(partiallyEnrichedNode, searchQuery);\n\n if (partiallyEnrichedNode.model.isGroup === true) {\n partiallyEnrichedNode.model.childrenMatchesSearchQuery = getChildrenMatchesSearchQuery(\n partiallyEnrichedNode,\n searchQuery,\n );\n if (partiallyEnrichedNode.model.childrenMatchesSearchQuery) partiallyEnrichedNode.model.isExpanded = true;\n }\n }\n if (selection && selection[partiallyEnrichedNode.model.id]) {\n partiallyEnrichedNode.model.isChecked = selection[partiallyEnrichedNode.model.id];\n }\n};\n\nexport const focusItem = (item: DSTreeviewT.Item | null) => {\n item?.nodeItemRef?.current?.focus();\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,mBAA0B;AAE1B,4BAA6C;AAGtC,MAAM,eAAe,CAC1B,MACA,UACA,WAAW,MACX,qBAAqB,UAClB;AACH,QAAM,EAAE,UAAU,UAAU;AAC5B,QAAM,EAAE,MAAM,YAAY,4BAA4B,uBAAuB;AAE7E,QAAM,0BAA0B,YAAY,SAAS;AACrD,QAAM,0BAA0B,CAAC,CAAE,uBAAsB,8BAA8B;AAEvF,MAAI,CAAC,2BAA2B;AAAyB,aAAS;AAElE,QAAM,qBAAqB,CAAC,CAAE,UAAS,SAAS,KAAK,cAAc;AACnE,MAAI,oBAAoB;AAC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