@elliemae/ds-shared 2.2.0-alpha.4 → 3.0.0-next.2
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/Animations/BaseAnimation.js +35 -55
- package/cjs/Animations/Grow.js +41 -54
- package/cjs/Animations/GrowRight.js +41 -63
- package/cjs/Animations/GrowVertical.js +7 -47
- package/cjs/CheckableGroup.js +65 -67
- package/cjs/DeferRenderAfterComputation.js +24 -48
- package/cjs/FocusGroup/FocusGrid.js +143 -108
- package/cjs/FocusGroup/FocusGroup.js +147 -88
- package/cjs/FocusGroup/FocusGroupContext.js +11 -38
- package/cjs/FocusGroup/FocusGroupManager.js +47 -56
- package/cjs/FocusGroup/focusGroupManagerHoc.js +42 -52
- package/cjs/FocusGroup/index.js +21 -47
- package/cjs/FocusGroup/useFocusGroupItem.js +51 -59
- package/cjs/FocusGroup/utils/getNextCellPosition.js +27 -47
- package/cjs/GroupContext/Group.js +73 -64
- package/cjs/GroupContext/GroupContext.js +13 -36
- package/cjs/GroupContext/GroupItem.js +21 -39
- package/cjs/GroupContext/index.js +13 -39
- package/cjs/ScrollSync/ScrollSync.js +75 -60
- package/cjs/ScrollSync/ScrollSyncPane.js +60 -52
- package/cjs/ScrollSync/ScrollSyncProvider.js +50 -103
- package/cjs/ScrollSync/index.js +11 -37
- package/cjs/ScrollSync/useScrollSync.js +7 -38
- package/cjs/constants.js +46 -65
- package/cjs/createDataInstance/createInstancePlugin.js +29 -41
- package/cjs/createDataInstance/createInstanceRef.js +71 -66
- package/cjs/createDataInstance/utils.js +100 -76
- package/cjs/defer-render-hoc/index.js +41 -48
- package/cjs/dimsum.config.js +6 -38
- package/cjs/index.js +17 -40
- package/cjs/prop-types.js +49 -106
- package/cjs/react-spring/index.js +14 -28
- package/cjs/react-spring/renderprops.js +14 -28
- package/cjs/toolbar/ToolbarProvider.js +94 -82
- package/cjs/useDataGrid/VolatileRowsListener.js +13 -38
- package/cjs/useDataGrid/index.js +7 -36
- package/cjs/useDataGrid/initColumnDefinition.js +110 -105
- package/cjs/useDataGrid/useDataGrid.js +148 -122
- package/cjs/useDataList/index.js +7 -36
- package/cjs/useDataList/recordIterator.js +18 -42
- package/cjs/useDataList/useDataList.js +83 -74
- package/cjs/utils.js +80 -71
- package/cjs/virtualization/AutoHeightList.js +54 -62
- package/cjs/virtualization/FluidHeightList.js +48 -42
- package/cjs/virtualization/index.js +20 -48
- package/esm/Animations/BaseAnimation.js +29 -26
- package/esm/Animations/Grow.js +35 -25
- package/esm/Animations/GrowRight.js +35 -34
- package/esm/Animations/GrowVertical.js +4 -29
- package/esm/CheckableGroup.js +52 -35
- package/esm/DeferRenderAfterComputation.js +15 -16
- package/esm/FocusGroup/FocusGrid.js +117 -64
- package/esm/FocusGroup/FocusGroup.js +137 -56
- package/esm/FocusGroup/FocusGroupContext.js +5 -9
- package/esm/FocusGroup/FocusGroupManager.js +38 -24
- package/esm/FocusGroup/focusGroupManagerHoc.js +36 -24
- package/esm/FocusGroup/index.js +6 -18
- package/esm/FocusGroup/useFocusGroupItem.js +40 -28
- package/esm/FocusGroup/utils/getNextCellPosition.js +25 -18
- package/esm/GroupContext/Group.js +66 -34
- package/esm/GroupContext/GroupContext.js +5 -7
- package/esm/GroupContext/GroupItem.js +15 -10
- package/esm/GroupContext/index.js +3 -10
- package/esm/ScrollSync/ScrollSync.js +64 -30
- package/esm/ScrollSync/ScrollSyncPane.js +52 -22
- package/esm/ScrollSync/ScrollSyncProvider.js +42 -74
- package/esm/ScrollSync/index.js +2 -8
- package/esm/ScrollSync/useScrollSync.js +5 -9
- package/esm/constants.js +28 -37
- package/esm/createDataInstance/createInstancePlugin.js +23 -12
- package/esm/createDataInstance/createInstanceRef.js +59 -36
- package/esm/createDataInstance/utils.js +85 -48
- package/esm/defer-render-hoc/index.js +31 -17
- package/esm/dimsum.config.js +4 -9
- package/esm/index.js +5 -11
- package/esm/prop-types.js +31 -75
- package/esm/react-spring/index.js +1 -3
- package/esm/react-spring/renderprops.js +1 -3
- package/esm/toolbar/ToolbarProvider.js +74 -45
- package/esm/useDataGrid/VolatileRowsListener.js +11 -9
- package/esm/useDataGrid/index.js +1 -7
- package/esm/useDataGrid/initColumnDefinition.js +94 -78
- package/esm/useDataGrid/useDataGrid.js +99 -82
- package/esm/useDataList/index.js +1 -7
- package/esm/useDataList/recordIterator.js +14 -13
- package/esm/useDataList/useDataList.js +67 -44
- package/esm/utils.js +59 -42
- package/esm/virtualization/AutoHeightList.js +40 -28
- package/esm/virtualization/FluidHeightList.js +38 -14
- package/esm/virtualization/index.js +16 -19
- package/package.json +3 -3
- package/types/Animations/BaseAnimation.d.ts +0 -1
- package/types/Animations/Grow.d.ts +0 -1
- package/types/Animations/GrowRight.d.ts +0 -1
- package/types/CheckableGroup.d.ts +0 -1
- package/types/DeferRenderAfterComputation.d.ts +2 -3
- package/types/FocusGroup/FocusGrid.d.ts +3 -5
- package/types/FocusGroup/FocusGroup.d.ts +1 -3
- package/types/FocusGroup/FocusGroupContext.d.ts +2 -3
- package/types/FocusGroup/FocusGroupManager.d.ts +1 -3
- package/types/FocusGroup/focusGroupManagerHoc.d.ts +1 -3
- package/types/FocusGroup/index.d.ts +6 -6
- package/types/FocusGroup/useFocusGroupItem.d.ts +1 -3
- package/types/FocusGroup/utils/getNextCellPosition.d.ts +1 -3
- package/types/GroupContext/Group.d.ts +0 -1
- package/types/GroupContext/GroupItem.d.ts +0 -1
- package/types/GroupContext/index.d.ts +3 -3
- package/types/ScrollSync/ScrollSync.d.ts +2 -4
- package/types/ScrollSync/ScrollSyncPane.d.ts +2 -2
- package/types/ScrollSync/index.d.ts +2 -2
- package/types/ScrollSync/useScrollSync.d.ts +5 -6
- package/types/createDataInstance/createInstancePlugin.d.ts +1 -2
- package/types/createDataInstance/createInstanceRef.d.ts +1 -3
- package/types/dimsum.config.d.ts +2 -3
- package/types/index.d.ts +2 -2
- package/types/toolbar/ToolbarProvider.d.ts +8 -3
- package/types/useDataGrid/VolatileRowsListener.d.ts +1 -3
- package/types/useDataGrid/index.d.ts +1 -1
- package/types/useDataGrid/initColumnDefinition.d.ts +1 -2
- package/types/useDataGrid/useDataGrid.d.ts +2 -3
- package/types/useDataList/index.d.ts +1 -1
- package/types/useDataList/useDataList.d.ts +2 -3
- package/cjs/Animations/BaseAnimation.js.map +0 -7
- package/cjs/Animations/Grow.js.map +0 -7
- package/cjs/Animations/GrowRight.js.map +0 -7
- package/cjs/Animations/GrowVertical.js.map +0 -7
- package/cjs/CheckableGroup.js.map +0 -7
- package/cjs/DeferRenderAfterComputation.js.map +0 -7
- package/cjs/FocusGroup/FocusGrid.js.map +0 -7
- package/cjs/FocusGroup/FocusGroup.js.map +0 -7
- package/cjs/FocusGroup/FocusGroupContext.js.map +0 -7
- package/cjs/FocusGroup/FocusGroupManager.js.map +0 -7
- package/cjs/FocusGroup/focusGroupManagerHoc.js.map +0 -7
- package/cjs/FocusGroup/index.js.map +0 -7
- package/cjs/FocusGroup/useFocusGroupItem.js.map +0 -7
- package/cjs/FocusGroup/utils/getNextCellPosition.js.map +0 -7
- package/cjs/GroupContext/Group.js.map +0 -7
- package/cjs/GroupContext/GroupContext.js.map +0 -7
- package/cjs/GroupContext/GroupItem.js.map +0 -7
- package/cjs/GroupContext/index.js.map +0 -7
- package/cjs/ScrollSync/ScrollSync.js.map +0 -7
- package/cjs/ScrollSync/ScrollSyncPane.js.map +0 -7
- package/cjs/ScrollSync/ScrollSyncProvider.js.map +0 -7
- package/cjs/ScrollSync/index.js.map +0 -7
- package/cjs/ScrollSync/useScrollSync.js.map +0 -7
- package/cjs/constants.js.map +0 -7
- package/cjs/createDataInstance/createInstancePlugin.js.map +0 -7
- package/cjs/createDataInstance/createInstanceRef.js.map +0 -7
- package/cjs/createDataInstance/utils.js.map +0 -7
- package/cjs/defer-render-hoc/index.js.map +0 -7
- package/cjs/dimsum.config.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/prop-types.js.map +0 -7
- package/cjs/react-spring/index.js.map +0 -7
- package/cjs/react-spring/renderprops.js.map +0 -7
- package/cjs/toolbar/ToolbarProvider.js.map +0 -7
- package/cjs/useDataGrid/VolatileRowsListener.js.map +0 -7
- package/cjs/useDataGrid/index.js.map +0 -7
- package/cjs/useDataGrid/initColumnDefinition.js.map +0 -7
- package/cjs/useDataGrid/useDataGrid.js.map +0 -7
- package/cjs/useDataList/index.js.map +0 -7
- package/cjs/useDataList/recordIterator.js.map +0 -7
- package/cjs/useDataList/useDataList.js.map +0 -7
- package/cjs/utils.js.map +0 -7
- package/cjs/virtualization/AutoHeightList.js.map +0 -7
- package/cjs/virtualization/FluidHeightList.js.map +0 -7
- package/cjs/virtualization/index.js.map +0 -7
- package/esm/Animations/BaseAnimation.js.map +0 -7
- package/esm/Animations/Grow.js.map +0 -7
- package/esm/Animations/GrowRight.js.map +0 -7
- package/esm/Animations/GrowVertical.js.map +0 -7
- package/esm/CheckableGroup.js.map +0 -7
- package/esm/DeferRenderAfterComputation.js.map +0 -7
- package/esm/FocusGroup/FocusGrid.js.map +0 -7
- package/esm/FocusGroup/FocusGroup.js.map +0 -7
- package/esm/FocusGroup/FocusGroupContext.js.map +0 -7
- package/esm/FocusGroup/FocusGroupManager.js.map +0 -7
- package/esm/FocusGroup/focusGroupManagerHoc.js.map +0 -7
- package/esm/FocusGroup/index.js.map +0 -7
- package/esm/FocusGroup/useFocusGroupItem.js.map +0 -7
- package/esm/FocusGroup/utils/getNextCellPosition.js.map +0 -7
- package/esm/GroupContext/Group.js.map +0 -7
- package/esm/GroupContext/GroupContext.js.map +0 -7
- package/esm/GroupContext/GroupItem.js.map +0 -7
- package/esm/GroupContext/index.js.map +0 -7
- package/esm/ScrollSync/ScrollSync.js.map +0 -7
- package/esm/ScrollSync/ScrollSyncPane.js.map +0 -7
- package/esm/ScrollSync/ScrollSyncProvider.js.map +0 -7
- package/esm/ScrollSync/index.js.map +0 -7
- package/esm/ScrollSync/useScrollSync.js.map +0 -7
- package/esm/constants.js.map +0 -7
- package/esm/createDataInstance/createInstancePlugin.js.map +0 -7
- package/esm/createDataInstance/createInstanceRef.js.map +0 -7
- package/esm/createDataInstance/utils.js.map +0 -7
- package/esm/defer-render-hoc/index.js.map +0 -7
- package/esm/dimsum.config.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/prop-types.js.map +0 -7
- package/esm/react-spring/index.js.map +0 -7
- package/esm/react-spring/renderprops.js.map +0 -7
- package/esm/toolbar/ToolbarProvider.js.map +0 -7
- package/esm/useDataGrid/VolatileRowsListener.js.map +0 -7
- package/esm/useDataGrid/index.js.map +0 -7
- package/esm/useDataGrid/initColumnDefinition.js.map +0 -7
- package/esm/useDataGrid/useDataGrid.js.map +0 -7
- package/esm/useDataList/index.js.map +0 -7
- package/esm/useDataList/recordIterator.js.map +0 -7
- package/esm/useDataList/useDataList.js.map +0 -7
- package/esm/utils.js.map +0 -7
- package/esm/virtualization/AutoHeightList.js.map +0 -7
- package/esm/virtualization/FluidHeightList.js.map +0 -7
- package/esm/virtualization/index.js.map +0 -7
|
@@ -1,74 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
11
|
+
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.reduce.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
15
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
16
|
+
var React = require('react');
|
|
17
|
+
var uuid = require('uuid');
|
|
18
|
+
var resolve = require('table-resolver');
|
|
19
|
+
var initColumnDefinition = require('./initColumnDefinition.js');
|
|
20
|
+
var utils$1 = require('../createDataInstance/utils.js');
|
|
21
|
+
var VolatileRowsListener = require('./VolatileRowsListener.js');
|
|
22
|
+
var utils = require('../utils.js');
|
|
23
|
+
|
|
24
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
|
+
|
|
26
|
+
function _interopNamespace(e) {
|
|
27
|
+
if (e && e.__esModule) return e;
|
|
28
|
+
var n = Object.create(null);
|
|
29
|
+
if (e) {
|
|
30
|
+
Object.keys(e).forEach(function (k) {
|
|
31
|
+
if (k !== 'default') {
|
|
32
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
33
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return e[k]; }
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
17
39
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
plugins: pluginsFromProps,
|
|
46
|
-
rows,
|
|
47
|
-
columns,
|
|
48
|
-
renderers = {},
|
|
49
|
-
...props
|
|
50
|
-
}) => {
|
|
40
|
+
n["default"] = e;
|
|
41
|
+
return Object.freeze(n);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
45
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
46
|
+
var resolve__namespace = /*#__PURE__*/_interopNamespace(resolve);
|
|
47
|
+
|
|
48
|
+
const _excluded = ["uuid", "plugins", "rows", "columns", "renderers"];
|
|
49
|
+
|
|
50
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
51
|
+
|
|
52
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
53
|
+
const IS_INTERNET_EXPLORER = utils.isInternetExplorer(); // TODO: Reuse createDataInstance for the grid the same
|
|
54
|
+
// way as the list does ex: packages/ds-shared/src/useDataList/useDataList.js
|
|
55
|
+
// eslint-disable-next-line max-statements
|
|
56
|
+
|
|
57
|
+
function useDataGrid(_ref) {
|
|
58
|
+
let {
|
|
59
|
+
uuid: uuidProp,
|
|
60
|
+
plugins: pluginsFromProps,
|
|
61
|
+
rows,
|
|
62
|
+
columns,
|
|
63
|
+
renderers = {}
|
|
64
|
+
} = _ref,
|
|
65
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
66
|
+
|
|
51
67
|
const plugins = pluginsFromProps;
|
|
52
|
-
const instance =
|
|
53
|
-
const tableRef =
|
|
54
|
-
const headerRef =
|
|
55
|
-
const bodyRef =
|
|
56
|
-
const bodyInnerRef =
|
|
57
|
-
const [uuid] =
|
|
58
|
-
const [hasScroll, setHasScroll] =
|
|
59
|
-
const [isRowDragging, setIsRowDragging] =
|
|
60
|
-
const isScrolling =
|
|
61
|
-
const shouldRefocus =
|
|
62
|
-
|
|
63
|
-
const [
|
|
64
|
-
|
|
68
|
+
const instance = React.useRef();
|
|
69
|
+
const tableRef = React.useRef();
|
|
70
|
+
const headerRef = React.useRef();
|
|
71
|
+
const bodyRef = React.useRef();
|
|
72
|
+
const bodyInnerRef = React.useRef();
|
|
73
|
+
const [uuid$1] = React.useState(uuidProp || (() => uuid.v4()));
|
|
74
|
+
const [hasScroll, setHasScroll] = React.useState(false);
|
|
75
|
+
const [isRowDragging, setIsRowDragging] = React.useState(false);
|
|
76
|
+
const isScrolling = React.useRef();
|
|
77
|
+
const shouldRefocus = React.useRef(); // todo: we probably need a plugin for focus related stuff
|
|
78
|
+
|
|
79
|
+
const [RowsObserver] = React.useState(() => new VolatileRowsListener()); // todo move this with rows composition
|
|
80
|
+
|
|
81
|
+
const [originalRows, updateRows] = dsUtilities.useDerivedStateFromProps(rows, {
|
|
82
|
+
onUpdate: resolve__namespace.resolve({
|
|
65
83
|
columns,
|
|
66
|
-
method:
|
|
84
|
+
method: extra => dsUtilities.compose(resolve__namespace.byFunction('valueTransformation')(extra), resolve__namespace.nested(extra))
|
|
67
85
|
}),
|
|
68
86
|
updateOnStateChange: true
|
|
69
87
|
});
|
|
70
88
|
instance.current = {
|
|
71
|
-
decoratedRenderers:
|
|
89
|
+
decoratedRenderers: dsUtilities.cloneDeep(renderers),
|
|
72
90
|
decoratedColumns: columns,
|
|
73
91
|
columns,
|
|
74
92
|
rows,
|
|
@@ -78,7 +96,7 @@ const useDataGrid = ({
|
|
|
78
96
|
getBodyProps: [],
|
|
79
97
|
getTableProps: [],
|
|
80
98
|
effects: [],
|
|
81
|
-
uuid,
|
|
99
|
+
uuid: uuid$1,
|
|
82
100
|
props,
|
|
83
101
|
refs: {
|
|
84
102
|
table: tableRef,
|
|
@@ -93,9 +111,11 @@ const useDataGrid = ({
|
|
|
93
111
|
updateRows
|
|
94
112
|
},
|
|
95
113
|
updateRows,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
114
|
+
// eslint-disable-next-line no-return-assign
|
|
115
|
+
enableEvents: () => document.body.style.pointerEvents = IS_INTERNET_EXPLORER ? '' : null,
|
|
116
|
+
// eslint-disable-next-line no-return-assign
|
|
117
|
+
disableEvents: () => document.body.style.pointerEvents = 'none',
|
|
118
|
+
observeRows: observer => RowsObserver.observe(observer),
|
|
99
119
|
hotKeys: {},
|
|
100
120
|
shouldRefocus,
|
|
101
121
|
isScrolling,
|
|
@@ -104,20 +124,21 @@ const useDataGrid = ({
|
|
|
104
124
|
isRowDragging,
|
|
105
125
|
plugins
|
|
106
126
|
};
|
|
127
|
+
|
|
107
128
|
instance.current.getState = () => instance.current.state;
|
|
129
|
+
|
|
108
130
|
instance.current.getInstance = () => instance.current;
|
|
131
|
+
|
|
109
132
|
const defaultDecorators = {
|
|
110
133
|
decorateGrid: [],
|
|
111
134
|
registerStateHook: [],
|
|
112
135
|
registerHotKeys: [],
|
|
113
136
|
decorateColumn: [],
|
|
114
|
-
decorateColumns: [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
})(col))
|
|
120
|
-
],
|
|
137
|
+
decorateColumns: [cols => cols.map(col => initColumnDefinition["default"]({
|
|
138
|
+
useTextTruncation: col.useTextTruncation,
|
|
139
|
+
wrapText: props.wrapText,
|
|
140
|
+
normalize: props.normalizeDataKeys
|
|
141
|
+
})(col))],
|
|
121
142
|
decorateRenderers: [],
|
|
122
143
|
getRowProps: [],
|
|
123
144
|
getHeaderRowProps: [],
|
|
@@ -126,69 +147,74 @@ const useDataGrid = ({
|
|
|
126
147
|
getHeaderProps: [],
|
|
127
148
|
composeRows: []
|
|
128
149
|
};
|
|
129
|
-
const decorators =
|
|
130
|
-
let nextDecorators = defaultDecorators;
|
|
131
|
-
|
|
150
|
+
const decorators = React.useMemo(() => {
|
|
151
|
+
let nextDecorators = defaultDecorators; // eslint-disable-next-line no-return-assign
|
|
152
|
+
|
|
153
|
+
plugins.forEach(plugin => nextDecorators = plugin(nextDecorators));
|
|
132
154
|
return nextDecorators;
|
|
133
155
|
}, [plugins]);
|
|
134
|
-
instance.current = decorators.decorateGrid.reduce((nextInstance, decorator) => ({
|
|
135
|
-
...nextInstance,
|
|
136
|
-
...decorator(instance.current)
|
|
137
|
-
}), instance.current);
|
|
156
|
+
instance.current = decorators.decorateGrid.reduce((nextInstance, decorator) => _objectSpread(_objectSpread({}, nextInstance), decorator(instance.current)), instance.current);
|
|
138
157
|
instance.current = decorators.registerStateHook.reduce((nextInstance, decorator) => {
|
|
139
|
-
const {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
...nextInstance.actions,
|
|
148
|
-
...actions
|
|
149
|
-
}
|
|
150
|
-
};
|
|
158
|
+
const {
|
|
159
|
+
state,
|
|
160
|
+
actions
|
|
161
|
+
} = decorator(instance.current);
|
|
162
|
+
return _objectSpread(_objectSpread({}, nextInstance), {}, {
|
|
163
|
+
state: _objectSpread(_objectSpread({}, nextInstance.state), state),
|
|
164
|
+
actions: _objectSpread(_objectSpread({}, nextInstance.actions), actions)
|
|
165
|
+
});
|
|
151
166
|
}, instance.current);
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
167
|
+
|
|
168
|
+
const reduceHotKey = (nextInstance, _ref2) => {
|
|
169
|
+
let {
|
|
170
|
+
key,
|
|
171
|
+
handler,
|
|
172
|
+
options
|
|
173
|
+
} = _ref2;
|
|
174
|
+
return _objectSpread(_objectSpread({}, nextInstance), {}, {
|
|
175
|
+
hotKeys: _objectSpread(_objectSpread({}, nextInstance.hotKeys), {}, {
|
|
176
|
+
[key]: {
|
|
177
|
+
handler,
|
|
178
|
+
options
|
|
179
|
+
}
|
|
180
|
+
})
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
|
|
159
184
|
instance.current = decorators.registerHotKeys.reduce((nextInstance, decorator) => {
|
|
160
185
|
const hotKeys = decorator(nextInstance);
|
|
186
|
+
|
|
161
187
|
if (Array.isArray(hotKeys)) {
|
|
162
188
|
return hotKeys.reduce(reduceHotKey, nextInstance);
|
|
163
189
|
}
|
|
190
|
+
|
|
164
191
|
return reduceHotKey(nextInstance, hotKeys);
|
|
165
192
|
}, instance.current);
|
|
166
|
-
instance.current.decoratedRenderers =
|
|
167
|
-
instance.current.decoratedColumns =
|
|
168
|
-
const visibleColumns =
|
|
169
|
-
return visibleColumns.length ?
|
|
193
|
+
instance.current.decoratedRenderers = utils$1.applyDecorators(instance.current.decoratedRenderers, decorators.decorateRenderers, instance.current);
|
|
194
|
+
instance.current.decoratedColumns = React.useMemo(() => {
|
|
195
|
+
const visibleColumns = dsUtilities.cloneDeep(columns).filter(column => typeof column.visible === 'undefined' || column.visible);
|
|
196
|
+
return visibleColumns.length ? utils$1.decorateColumns(visibleColumns, decorators, instance.current) : [];
|
|
170
197
|
}, [columns]);
|
|
171
|
-
instance.current.getBodyProps =
|
|
172
|
-
instance.current.getHeaderProps =
|
|
173
|
-
instance.current.getRowProps =
|
|
174
|
-
instance.current.getHeaderRowProps =
|
|
175
|
-
instance.current.getTableProps =
|
|
198
|
+
instance.current.getBodyProps = utils$1.reducePropsGetter(decorators.getBodyProps, instance.current);
|
|
199
|
+
instance.current.getHeaderProps = utils$1.reducePropsGetter(decorators.getHeaderProps, instance.current);
|
|
200
|
+
instance.current.getRowProps = utils$1.reducePropsGetter(decorators.getRowProps, instance.current);
|
|
201
|
+
instance.current.getHeaderRowProps = utils$1.reducePropsGetter(decorators.getHeaderRowProps, instance.current);
|
|
202
|
+
instance.current.getTableProps = utils$1.reducePropsGetter(decorators.getTableProps, instance.current);
|
|
176
203
|
instance.current.composedRows = decorators.composeRows.reduce((nextRows, getter) => getter(nextRows, instance.current), instance.current.composedRows);
|
|
177
204
|
RowsObserver.notify(instance.current.composedRows);
|
|
178
205
|
const currentShouldRefocus = instance.current.shouldRefocus.current;
|
|
179
|
-
const prevState =
|
|
180
|
-
|
|
206
|
+
const prevState = dsUtilities.usePrevious(instance.current.state);
|
|
207
|
+
|
|
208
|
+
if (dsUtilities.isObject(currentShouldRefocus) && currentShouldRefocus.forced) {
|
|
181
209
|
instance.current.shouldRefocus.current = currentShouldRefocus.value;
|
|
182
210
|
} else {
|
|
183
|
-
instance.current.shouldRefocus.current = !
|
|
211
|
+
instance.current.shouldRefocus.current = !dsUtilities.isEqual(prevState, instance.current.state);
|
|
184
212
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return {
|
|
188
|
-
...instance.current,
|
|
213
|
+
|
|
214
|
+
if (props.instanceRef) dsUtilities.setRef(props.instanceRef, instance.current);
|
|
215
|
+
return _objectSpread(_objectSpread({}, instance.current), {}, {
|
|
189
216
|
decorators
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
module.exports =
|
|
194
|
-
//# sourceMappingURL=useDataGrid.js.map
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
module.exports = useDataGrid;
|
package/cjs/useDataList/index.js
CHANGED
|
@@ -1,36 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 useDataList_exports = {};
|
|
29
|
-
__export(useDataList_exports, {
|
|
30
|
-
default: () => import_useDataList.default,
|
|
31
|
-
useDataList: () => import_useDataList.default
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_useDataList = require("./useDataList");
|
|
35
|
-
module.exports = __toCommonJS(useDataList_exports);
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var useDataList = require('./useDataList.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module.exports = useDataList["default"];
|
|
@@ -1,55 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 recordIterator_exports = {};
|
|
29
|
-
__export(recordIterator_exports, {
|
|
30
|
-
recordIterator: () => recordIterator
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
33
5
|
const defaultStrategy = () => {
|
|
34
|
-
throw Error(
|
|
6
|
+
throw Error('Implement an iterator strategy for record iterator');
|
|
35
7
|
};
|
|
36
|
-
|
|
8
|
+
|
|
9
|
+
function recordIterator(records) {
|
|
10
|
+
let strategy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultStrategy;
|
|
11
|
+
let decorators = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
12
|
+
let instance = arguments.length > 3 ? arguments[3] : undefined;
|
|
37
13
|
const nextRows = [];
|
|
38
14
|
strategy({
|
|
39
15
|
data: records,
|
|
40
|
-
cb:
|
|
41
|
-
let nextRow = row;
|
|
16
|
+
cb: row => {
|
|
17
|
+
let nextRow = row; // eslint-disable-next-line no-loops/no-loops,no-plusplus
|
|
18
|
+
|
|
42
19
|
for (let i = 0; i < decorators.length; i++) {
|
|
43
20
|
nextRow = decorators[i](nextRow, instance);
|
|
44
|
-
if (!nextRow)
|
|
45
|
-
break;
|
|
21
|
+
if (!nextRow) break;
|
|
46
22
|
}
|
|
47
|
-
|
|
48
|
-
|
|
23
|
+
|
|
24
|
+
if (nextRow) nextRows.push(nextRow);
|
|
49
25
|
},
|
|
50
26
|
instance
|
|
51
27
|
});
|
|
52
28
|
return nextRows;
|
|
53
29
|
}
|
|
54
|
-
|
|
55
|
-
|
|
30
|
+
|
|
31
|
+
exports.recordIterator = recordIterator;
|
|
@@ -1,93 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.reduce.js');
|
|
11
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
15
|
+
var React = require('react');
|
|
16
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
17
|
+
var get = require('lodash/get');
|
|
18
|
+
var utils = require('../createDataInstance/utils.js');
|
|
19
|
+
var recordIterator = require('./recordIterator.js');
|
|
20
|
+
var createInstanceRef = require('../createDataInstance/createInstanceRef.js');
|
|
21
|
+
|
|
22
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
|
+
|
|
24
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
25
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
26
|
+
var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
|
|
27
|
+
|
|
28
|
+
const _excluded = ["data", "plugins", "renderers", "itemRenderer", "customDecorators"];
|
|
29
|
+
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
+
const getItemLabel = function (record) {
|
|
34
|
+
let nameKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'name';
|
|
35
|
+
return get__default["default"](record, ['data', nameKey]);
|
|
11
36
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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;
|
|
37
|
+
const getItemChildren = function (record) {
|
|
38
|
+
let childrenKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children';
|
|
39
|
+
return get__default["default"](record, ['data', childrenKey]);
|
|
19
40
|
};
|
|
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 useDataList_exports = {};
|
|
29
|
-
__export(useDataList_exports, {
|
|
30
|
-
default: () => useDataList_default,
|
|
31
|
-
getItemChildren: () => getItemChildren,
|
|
32
|
-
getItemLabel: () => getItemLabel,
|
|
33
|
-
useDataList: () => useDataList
|
|
34
|
-
});
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_react = require("react");
|
|
37
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
38
|
-
var import_get = __toESM(require("lodash/get"));
|
|
39
|
-
var import_utils = require("../createDataInstance/utils");
|
|
40
|
-
var import_recordIterator = require("./recordIterator");
|
|
41
|
-
var import_createInstanceRef = require("../createDataInstance/createInstanceRef");
|
|
42
|
-
const getItemLabel = (record, nameKey = "name") => (0, import_get.default)(record, ["data", nameKey]);
|
|
43
|
-
const getItemChildren = (record, childrenKey = "children") => (0, import_get.default)(record, ["data", childrenKey]);
|
|
44
41
|
const listRenderers = {
|
|
45
|
-
list:
|
|
46
|
-
item:
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
list: 'ul',
|
|
43
|
+
item: 'li'
|
|
44
|
+
}; // todo: check if a plugin is a LIST plugin rather than GRID
|
|
45
|
+
|
|
46
|
+
function useDataList(_ref) {
|
|
47
|
+
let {
|
|
48
|
+
data = [],
|
|
49
|
+
plugins = [],
|
|
50
|
+
renderers = listRenderers,
|
|
51
|
+
itemRenderer = [],
|
|
52
|
+
customDecorators
|
|
53
|
+
} = _ref,
|
|
54
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
55
|
+
|
|
56
|
+
const listRef = React.useRef();
|
|
57
|
+
const {
|
|
58
|
+
instance,
|
|
59
|
+
decorators
|
|
60
|
+
} = createInstanceRef(_objectSpread({
|
|
58
61
|
data,
|
|
59
62
|
renderers,
|
|
60
63
|
plugins,
|
|
61
|
-
customDecorators: {
|
|
62
|
-
|
|
63
|
-
recordIterator: import_recordIterator.recordIterator,
|
|
64
|
+
customDecorators: _objectSpread(_objectSpread({}, customDecorators), {}, {
|
|
65
|
+
recordIterator: recordIterator.recordIterator,
|
|
64
66
|
getListProps: [],
|
|
65
67
|
getItemProps: [],
|
|
66
68
|
itemRenderer: [...itemRenderer],
|
|
69
|
+
// components reduce to compose item content
|
|
67
70
|
record: [],
|
|
68
71
|
records: []
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
})
|
|
73
|
+
}, props));
|
|
74
|
+
|
|
72
75
|
instance.current.getListRef = () => listRef;
|
|
73
|
-
|
|
76
|
+
|
|
77
|
+
instance.current.setListRef = ref => {
|
|
74
78
|
listRef.current = ref;
|
|
75
79
|
};
|
|
76
|
-
|
|
77
|
-
instance.current.
|
|
80
|
+
|
|
81
|
+
instance.current.getItemLabel = record => getItemLabel(record, props.nameKey);
|
|
82
|
+
|
|
83
|
+
instance.current.getItemChildren = record => getItemChildren(record, props.childrenKey);
|
|
84
|
+
|
|
78
85
|
instance.current.decorators = decorators;
|
|
79
|
-
instance.current.getListProps =
|
|
80
|
-
instance.current.getItemProps =
|
|
81
|
-
instance.current.itemRenderer =
|
|
82
|
-
instance.current.records =
|
|
83
|
-
|
|
86
|
+
instance.current.getListProps = utils.reducePropsGetter(decorators.getListProps, instance.current);
|
|
87
|
+
instance.current.getItemProps = utils.reducePropsGetter(decorators.getItemProps, instance.current);
|
|
88
|
+
instance.current.itemRenderer = utils.composeFormatters(instance.current.decorators.itemRenderer, instance.current);
|
|
89
|
+
instance.current.records = React.useMemo(() => {
|
|
90
|
+
// record iterator TREE / Simple
|
|
91
|
+
let nextRecords = recordIterator.recordIterator(data, instance.current.decorators.recordIterator, decorators.record, instance.current); // compose all records
|
|
92
|
+
|
|
84
93
|
nextRecords = decorators.records.reduce((nextRows, getter) => getter(nextRows, instance.current), nextRecords);
|
|
85
94
|
return nextRecords;
|
|
86
95
|
});
|
|
87
|
-
if (props.instanceRef)
|
|
88
|
-
(0, import_ds_utilities.setRef)(props.instanceRef, instance.current);
|
|
96
|
+
if (props.instanceRef) dsUtilities.setRef(props.instanceRef, instance.current);
|
|
89
97
|
return instance.current;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
exports["default"] = useDataList;
|
|
101
|
+
exports.getItemChildren = getItemChildren;
|
|
102
|
+
exports.getItemLabel = getItemLabel;
|