@elliemae/ds-shared 1.57.1-rc.0 → 2.0.0-alpha.11
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 +25 -36
- package/cjs/Animations/Grow.js +31 -39
- package/cjs/Animations/GrowRight.js +31 -40
- package/cjs/Animations/GrowVertical.js +3 -2
- package/cjs/CheckableGroup.js +36 -50
- package/cjs/DeferRenderAfterComputation.js +12 -22
- package/cjs/FocusGroup/FocusGrid.js +94 -102
- package/cjs/FocusGroup/FocusGroup.js +215 -270
- package/cjs/FocusGroup/FocusGroupContext.js +1 -2
- package/cjs/FocusGroup/FocusGroupManager.js +88 -124
- package/cjs/FocusGroup/focusGroupManagerHoc.js +24 -29
- package/cjs/FocusGroup/index.js +14 -28
- package/cjs/FocusGroup/useFocusGroupItem.js +24 -27
- package/cjs/FocusGroup/utils/getNextCellPosition.js +14 -16
- package/cjs/GroupContext/Group.js +76 -104
- package/cjs/GroupContext/GroupContext.js +1 -2
- package/cjs/GroupContext/GroupItem.js +10 -11
- package/cjs/GroupContext/index.js +6 -15
- package/cjs/ScrollSync/ScrollSync.js +86 -112
- package/cjs/ScrollSync/ScrollSyncPane.js +49 -92
- package/cjs/ScrollSync/ScrollSyncProvider.js +32 -28
- package/cjs/ScrollSync/index.js +4 -14
- package/cjs/ScrollSync/useScrollSync.js +0 -1
- package/cjs/constants.js +43 -4
- package/cjs/createDataInstance/createInstancePlugin.js +6 -10
- package/cjs/createDataInstance/createInstanceRef.js +34 -42
- package/cjs/createDataInstance/utils.js +42 -76
- package/cjs/defer-render-hoc/index.js +19 -64
- package/cjs/dimsum.config.js +7 -0
- package/cjs/index.js +10 -21
- package/cjs/prop-types.js +59 -0
- package/cjs/react-spring/index.js +3 -6
- package/cjs/react-spring/renderprops.js +3 -6
- package/cjs/toolbar/ToolbarProvider.js +60 -81
- package/cjs/useDataGrid/VolatileRowsListener.js +13 -27
- package/cjs/useDataGrid/index.js +2 -17
- package/cjs/useDataGrid/initColumnDefinition.js +45 -53
- package/cjs/useDataGrid/useDataGrid.js +105 -152
- package/cjs/useDataList/index.js +2 -15
- package/cjs/useDataList/recordIterator.js +7 -11
- package/cjs/useDataList/useDataList.js +42 -63
- package/cjs/utils.js +39 -59
- package/cjs/virtualization/AutoHeightList.js +34 -27
- package/cjs/virtualization/FluidHeightList.js +23 -17
- package/cjs/virtualization/index.js +12 -18
- package/esm/Animations/BaseAnimation.js +24 -35
- package/esm/Animations/Grow.js +29 -37
- package/esm/Animations/GrowRight.js +29 -38
- package/esm/Animations/GrowVertical.js +3 -2
- package/esm/CheckableGroup.js +33 -46
- package/esm/DeferRenderAfterComputation.js +12 -21
- package/esm/FocusGroup/FocusGrid.js +86 -96
- package/esm/FocusGroup/FocusGroup.js +210 -263
- package/esm/FocusGroup/FocusGroupContext.js +0 -1
- package/esm/FocusGroup/FocusGroupManager.js +85 -115
- package/esm/FocusGroup/focusGroupManagerHoc.js +19 -23
- package/esm/FocusGroup/index.js +0 -14
- package/esm/FocusGroup/useFocusGroupItem.js +22 -25
- package/esm/FocusGroup/utils/getNextCellPosition.js +14 -16
- package/esm/GroupContext/Group.js +75 -96
- package/esm/GroupContext/GroupContext.js +1 -2
- package/esm/GroupContext/GroupItem.js +8 -9
- package/esm/GroupContext/index.js +0 -9
- package/esm/ScrollSync/ScrollSync.js +83 -104
- package/esm/ScrollSync/ScrollSyncPane.js +47 -83
- package/esm/ScrollSync/ScrollSyncProvider.js +31 -28
- package/esm/ScrollSync/index.js +0 -10
- package/esm/ScrollSync/useScrollSync.js +0 -1
- package/esm/constants.js +31 -5
- package/esm/createDataInstance/createInstancePlugin.js +5 -8
- package/esm/createDataInstance/createInstanceRef.js +29 -36
- package/esm/createDataInstance/utils.js +40 -74
- package/esm/defer-render-hoc/index.js +19 -57
- package/esm/dimsum.config.js +5 -0
- package/esm/index.js +0 -11
- package/esm/prop-types.js +43 -0
- package/esm/react-spring/index.js +1 -2
- package/esm/react-spring/renderprops.js +1 -2
- package/esm/toolbar/ToolbarProvider.js +55 -75
- package/esm/useDataGrid/VolatileRowsListener.js +12 -24
- package/esm/useDataGrid/index.js +0 -15
- package/esm/useDataGrid/initColumnDefinition.js +38 -45
- package/esm/useDataGrid/useDataGrid.js +85 -131
- package/esm/useDataList/index.js +0 -13
- package/esm/useDataList/recordIterator.js +7 -11
- package/esm/useDataList/useDataList.js +31 -51
- package/esm/utils.js +37 -57
- package/esm/virtualization/AutoHeightList.js +26 -19
- package/esm/virtualization/FluidHeightList.js +20 -14
- package/esm/virtualization/index.js +6 -12
- package/package.json +202 -13
- package/types/Animations/BaseAnimation.d.ts +12 -0
- package/types/Animations/Grow.d.ts +11 -0
- package/types/Animations/GrowRight.d.ts +11 -0
- package/types/Animations/GrowVertical.d.ts +1 -0
- package/types/CheckableGroup.d.ts +20 -0
- package/types/DeferRenderAfterComputation.d.ts +6 -0
- package/types/FocusGroup/FocusGrid.d.ts +10 -0
- package/types/FocusGroup/FocusGroup.d.ts +36 -0
- package/types/FocusGroup/FocusGroupContext.d.ts +3 -0
- package/types/FocusGroup/FocusGroupManager.d.ts +24 -0
- package/types/FocusGroup/focusGroupManagerHoc.d.ts +7 -0
- package/types/FocusGroup/index.d.ts +6 -0
- package/types/FocusGroup/useFocusGroupItem.d.ts +2 -0
- package/types/FocusGroup/utils/getNextCellPosition.d.ts +12 -0
- package/types/GroupContext/Group.d.ts +14 -0
- package/types/GroupContext/GroupContext.d.ts +2 -0
- package/types/GroupContext/GroupItem.d.ts +5 -0
- package/types/GroupContext/index.d.ts +3 -0
- package/types/ScrollSync/ScrollSync.d.ts +21 -0
- package/types/ScrollSync/ScrollSyncPane.d.ts +3 -0
- package/types/ScrollSync/ScrollSyncProvider.d.ts +12 -0
- package/types/ScrollSync/index.d.ts +2 -0
- package/types/ScrollSync/useScrollSync.d.ts +6 -0
- package/types/constants.d.ts +30 -0
- package/types/createDataInstance/createInstancePlugin.d.ts +1 -0
- package/types/createDataInstance/createInstanceRef.d.ts +12 -0
- package/types/createDataInstance/tests/createInstanceRef.test.d.ts +0 -0
- package/types/createDataInstance/utils.d.ts +9 -0
- package/types/dimsum.config.d.ts +4 -0
- package/types/index.d.ts +2 -0
- package/types/prop-types.d.ts +41 -0
- package/types/react-spring/index.d.ts +1 -0
- package/types/react-spring/renderprops.d.ts +1 -0
- package/types/toolbar/ToolbarProvider.d.ts +10 -0
- package/types/useDataGrid/VolatileRowsListener.d.ts +5 -0
- package/types/useDataGrid/index.d.ts +1 -0
- package/types/useDataGrid/initColumnDefinition.d.ts +4 -0
- package/types/useDataGrid/useDataGrid.d.ts +8 -0
- package/types/useDataList/index.d.ts +1 -0
- package/types/useDataList/recordIterator.d.ts +1 -0
- package/types/useDataList/useDataList.d.ts +13 -0
- package/types/utils.d.ts +22 -0
- package/types/virtualization/AutoHeightList.d.ts +2 -0
- package/types/virtualization/FluidHeightList.d.ts +2 -0
- package/types/virtualization/index.d.ts +9 -0
- package/Animations/BaseAnimation/package.json +0 -10
- package/Animations/Grow/package.json +0 -10
- package/Animations/GrowRight/package.json +0 -10
- package/Animations/GrowVertical/package.json +0 -10
- package/CheckableGroup/package.json +0 -10
- package/DeferRenderAfterComputation/package.json +0 -10
- package/FocusGroup/FocusGrid/package.json +0 -10
- package/FocusGroup/FocusGroup/package.json +0 -10
- package/FocusGroup/FocusGroupContext/package.json +0 -10
- package/FocusGroup/FocusGroupManager/package.json +0 -10
- package/FocusGroup/focusGroupManagerHoc/package.json +0 -10
- package/FocusGroup/package.json +0 -10
- package/FocusGroup/useFocusGroupItem/package.json +0 -10
- package/FocusGroup/utils/getNextCellPosition/package.json +0 -10
- package/GroupContext/Group/package.json +0 -10
- package/GroupContext/GroupContext/package.json +0 -10
- package/GroupContext/GroupItem/package.json +0 -10
- package/GroupContext/package.json +0 -10
- package/ScrollSync/ScrollSync/package.json +0 -10
- package/ScrollSync/ScrollSyncPane/package.json +0 -10
- package/ScrollSync/ScrollSyncProvider/package.json +0 -10
- package/ScrollSync/package.json +0 -10
- package/ScrollSync/useScrollSync/package.json +0 -10
- package/cjs/Animations/BaseAnimation.js.map +0 -1
- package/cjs/Animations/Grow.js.map +0 -1
- package/cjs/Animations/GrowRight.js.map +0 -1
- package/cjs/Animations/GrowVertical.js.map +0 -1
- package/cjs/CheckableGroup.js.map +0 -1
- package/cjs/DeferRenderAfterComputation.js.map +0 -1
- package/cjs/FocusGroup/FocusGrid.js.map +0 -1
- package/cjs/FocusGroup/FocusGroup.js.map +0 -1
- package/cjs/FocusGroup/FocusGroupContext.js.map +0 -1
- package/cjs/FocusGroup/FocusGroupManager.js.map +0 -1
- package/cjs/FocusGroup/focusGroupManagerHoc.js.map +0 -1
- package/cjs/FocusGroup/index.js.map +0 -1
- package/cjs/FocusGroup/useFocusGroupItem.js.map +0 -1
- package/cjs/FocusGroup/utils/getNextCellPosition.js.map +0 -1
- package/cjs/GroupContext/Group.js.map +0 -1
- package/cjs/GroupContext/GroupContext.js.map +0 -1
- package/cjs/GroupContext/GroupItem.js.map +0 -1
- package/cjs/GroupContext/index.js.map +0 -1
- package/cjs/ScrollSync/ScrollSync.js.map +0 -1
- package/cjs/ScrollSync/ScrollSyncPane.js.map +0 -1
- package/cjs/ScrollSync/ScrollSyncProvider.js.map +0 -1
- package/cjs/ScrollSync/index.js.map +0 -1
- package/cjs/ScrollSync/useScrollSync.js.map +0 -1
- package/cjs/constants.js.map +0 -1
- package/cjs/createDataInstance/createInstancePlugin.js.map +0 -1
- package/cjs/createDataInstance/createInstanceRef.js.map +0 -1
- package/cjs/createDataInstance/utils.js.map +0 -1
- package/cjs/defer-render-hoc/index.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/react-spring/index.js.map +0 -1
- package/cjs/react-spring/renderprops.js.map +0 -1
- package/cjs/toolbar/ToolbarProvider.js.map +0 -1
- package/cjs/useDataGrid/VolatileRowsListener.js.map +0 -1
- package/cjs/useDataGrid/index.js.map +0 -1
- package/cjs/useDataGrid/initColumnDefinition.js.map +0 -1
- package/cjs/useDataGrid/useDataGrid.js.map +0 -1
- package/cjs/useDataList/index.js.map +0 -1
- package/cjs/useDataList/recordIterator.js.map +0 -1
- package/cjs/useDataList/useDataList.js.map +0 -1
- package/cjs/utils.js.map +0 -1
- package/cjs/virtualization/AutoHeightList.js.map +0 -1
- package/cjs/virtualization/FluidHeightList.js.map +0 -1
- package/cjs/virtualization/index.js.map +0 -1
- package/constants/package.json +0 -10
- package/createDataInstance/createInstancePlugin/package.json +0 -10
- package/createDataInstance/createInstanceRef/package.json +0 -10
- package/createDataInstance/utils/package.json +0 -10
- package/defer-render-hoc/package.json +0 -10
- package/esm/Animations/BaseAnimation.js.map +0 -1
- package/esm/Animations/Grow.js.map +0 -1
- package/esm/Animations/GrowRight.js.map +0 -1
- package/esm/Animations/GrowVertical.js.map +0 -1
- package/esm/CheckableGroup.js.map +0 -1
- package/esm/DeferRenderAfterComputation.js.map +0 -1
- package/esm/FocusGroup/FocusGrid.js.map +0 -1
- package/esm/FocusGroup/FocusGroup.js.map +0 -1
- package/esm/FocusGroup/FocusGroupContext.js.map +0 -1
- package/esm/FocusGroup/FocusGroupManager.js.map +0 -1
- package/esm/FocusGroup/focusGroupManagerHoc.js.map +0 -1
- package/esm/FocusGroup/index.js.map +0 -1
- package/esm/FocusGroup/useFocusGroupItem.js.map +0 -1
- package/esm/FocusGroup/utils/getNextCellPosition.js.map +0 -1
- package/esm/GroupContext/Group.js.map +0 -1
- package/esm/GroupContext/GroupContext.js.map +0 -1
- package/esm/GroupContext/GroupItem.js.map +0 -1
- package/esm/GroupContext/index.js.map +0 -1
- package/esm/ScrollSync/ScrollSync.js.map +0 -1
- package/esm/ScrollSync/ScrollSyncPane.js.map +0 -1
- package/esm/ScrollSync/ScrollSyncProvider.js.map +0 -1
- package/esm/ScrollSync/index.js.map +0 -1
- package/esm/ScrollSync/useScrollSync.js.map +0 -1
- package/esm/constants.js.map +0 -1
- package/esm/createDataInstance/createInstancePlugin.js.map +0 -1
- package/esm/createDataInstance/createInstanceRef.js.map +0 -1
- package/esm/createDataInstance/utils.js.map +0 -1
- package/esm/defer-render-hoc/index.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/react-spring/index.js.map +0 -1
- package/esm/react-spring/renderprops.js.map +0 -1
- package/esm/toolbar/ToolbarProvider.js.map +0 -1
- package/esm/useDataGrid/VolatileRowsListener.js.map +0 -1
- package/esm/useDataGrid/index.js.map +0 -1
- package/esm/useDataGrid/initColumnDefinition.js.map +0 -1
- package/esm/useDataGrid/useDataGrid.js.map +0 -1
- package/esm/useDataList/index.js.map +0 -1
- package/esm/useDataList/recordIterator.js.map +0 -1
- package/esm/useDataList/useDataList.js.map +0 -1
- package/esm/utils.js.map +0 -1
- package/esm/virtualization/AutoHeightList.js.map +0 -1
- package/esm/virtualization/FluidHeightList.js.map +0 -1
- package/esm/virtualization/index.js.map +0 -1
- package/react-spring/package.json +0 -10
- package/react-spring/renderprops/package.json +0 -10
- package/toolbar/ToolbarProvider/package.json +0 -10
- package/useDataGrid/VolatileRowsListener/package.json +0 -10
- package/useDataGrid/initColumnDefinition/package.json +0 -10
- package/useDataGrid/package.json +0 -10
- package/useDataGrid/useDataGrid/package.json +0 -10
- package/useDataList/package.json +0 -10
- package/useDataList/recordIterator/package.json +0 -10
- package/useDataList/useDataList/package.json +0 -10
- package/utils/package.json +0 -10
- package/virtualization/AutoHeightList/package.json +0 -10
- package/virtualization/FluidHeightList/package.json +0 -10
- package/virtualization/package.json +0 -10
|
@@ -1,44 +1,33 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
|
+
require('react');
|
|
6
|
+
var renderprops = require('react-spring/renderprops');
|
|
5
7
|
|
|
6
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
9
|
|
|
8
|
-
var
|
|
10
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return /*#__PURE__*/React__default['default'].createElement(renderprops_cjs.Transition, {
|
|
31
|
-
config: {
|
|
32
|
-
duration: duration
|
|
33
|
-
},
|
|
34
|
-
enter: enter,
|
|
35
|
-
from: from,
|
|
36
|
-
items: items,
|
|
37
|
-
keys: keys,
|
|
38
|
-
leave: leave,
|
|
39
|
-
onRest: onRest
|
|
40
|
-
}, children);
|
|
41
|
-
};
|
|
12
|
+
const BaseAnimation = ({
|
|
13
|
+
keys = undefined,
|
|
14
|
+
items = [],
|
|
15
|
+
duration = 100,
|
|
16
|
+
enter = {},
|
|
17
|
+
from = {},
|
|
18
|
+
leave = {},
|
|
19
|
+
onRest = () => null,
|
|
20
|
+
children
|
|
21
|
+
}) => /*#__PURE__*/_jsx__default["default"](renderprops.Transition, {
|
|
22
|
+
config: {
|
|
23
|
+
duration
|
|
24
|
+
},
|
|
25
|
+
enter: enter,
|
|
26
|
+
from: from,
|
|
27
|
+
items: items,
|
|
28
|
+
keys: keys,
|
|
29
|
+
leave: leave,
|
|
30
|
+
onRest: onRest
|
|
31
|
+
}, void 0, children);
|
|
42
32
|
|
|
43
33
|
module.exports = BaseAnimation;
|
|
44
|
-
//# sourceMappingURL=BaseAnimation.js.map
|
package/cjs/Animations/Grow.js
CHANGED
|
@@ -1,47 +1,39 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
require('react
|
|
3
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
|
+
require('react');
|
|
6
|
+
var BaseAnimation = require('./BaseAnimation.js');
|
|
6
7
|
|
|
7
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
keys: keys,
|
|
38
|
-
leave: {
|
|
39
|
-
opacity: 0,
|
|
40
|
-
transform: "scale(".concat(from, ")")
|
|
41
|
-
},
|
|
42
|
-
onRest: onRest
|
|
43
|
-
}, children);
|
|
44
|
-
};
|
|
12
|
+
const Grow = ({
|
|
13
|
+
keys = undefined,
|
|
14
|
+
duration,
|
|
15
|
+
items = undefined,
|
|
16
|
+
from = 0,
|
|
17
|
+
to = 1,
|
|
18
|
+
children,
|
|
19
|
+
onRest = () => null
|
|
20
|
+
}) => /*#__PURE__*/_jsx__default["default"](BaseAnimation, {
|
|
21
|
+
duration: duration,
|
|
22
|
+
enter: {
|
|
23
|
+
opacity: 1,
|
|
24
|
+
transform: "scale(".concat(to, ")")
|
|
25
|
+
},
|
|
26
|
+
from: {
|
|
27
|
+
opacity: 0,
|
|
28
|
+
transform: "scale(".concat(from, ")")
|
|
29
|
+
},
|
|
30
|
+
items: items,
|
|
31
|
+
keys: keys,
|
|
32
|
+
leave: {
|
|
33
|
+
opacity: 0,
|
|
34
|
+
transform: "scale(".concat(from, ")")
|
|
35
|
+
},
|
|
36
|
+
onRest: onRest
|
|
37
|
+
}, void 0, children);
|
|
45
38
|
|
|
46
39
|
module.exports = Grow;
|
|
47
|
-
//# sourceMappingURL=Grow.js.map
|
|
@@ -1,48 +1,39 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
require('react
|
|
3
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
|
+
require('react');
|
|
6
|
+
var BaseAnimation = require('./BaseAnimation.js');
|
|
6
7
|
|
|
7
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
items: items,
|
|
38
|
-
keys: keys,
|
|
39
|
-
leave: {
|
|
40
|
-
opacity: "".concat(from),
|
|
41
|
-
transform: 'translateX(100%)'
|
|
42
|
-
},
|
|
43
|
-
onRest: onRest
|
|
44
|
-
}, children);
|
|
45
|
-
};
|
|
12
|
+
const GrowRight = ({
|
|
13
|
+
keys = undefined,
|
|
14
|
+
items = undefined,
|
|
15
|
+
duration = 200,
|
|
16
|
+
from = 0,
|
|
17
|
+
to = 1,
|
|
18
|
+
children,
|
|
19
|
+
onRest = () => null
|
|
20
|
+
}) => /*#__PURE__*/_jsx__default["default"](BaseAnimation, {
|
|
21
|
+
duration: duration,
|
|
22
|
+
enter: {
|
|
23
|
+
opacity: "".concat(to),
|
|
24
|
+
transform: 'translateX(0px)'
|
|
25
|
+
},
|
|
26
|
+
from: {
|
|
27
|
+
opacity: "".concat(from),
|
|
28
|
+
transform: 'translateX(100%)'
|
|
29
|
+
},
|
|
30
|
+
items: items,
|
|
31
|
+
keys: keys,
|
|
32
|
+
leave: {
|
|
33
|
+
opacity: "".concat(from),
|
|
34
|
+
transform: 'translateX(100%)'
|
|
35
|
+
},
|
|
36
|
+
onRest: onRest
|
|
37
|
+
}, void 0, children);
|
|
46
38
|
|
|
47
39
|
module.exports = GrowRight;
|
|
48
|
-
//# sourceMappingURL=GrowRight.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
3
5
|
require('react');
|
|
4
|
-
require('react-spring/renderprops
|
|
6
|
+
require('react-spring/renderprops');
|
|
5
7
|
|
|
6
|
-
//# sourceMappingURL=GrowVertical.js.map
|
package/cjs/CheckableGroup.js
CHANGED
|
@@ -3,78 +3,64 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
-
|
|
6
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var utils = require('@elliemae/ds-utilities/utils');
|
|
9
|
+
var useDerivedStateFromProps = require('@elliemae/ds-utilities/hooks/useDerivedStateFromProps');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
12
|
|
|
13
13
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
14
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
15
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
-
var
|
|
15
|
+
var useDerivedStateFromProps__default = /*#__PURE__*/_interopDefaultLegacy(useDerivedStateFromProps);
|
|
17
16
|
|
|
18
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
18
|
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
21
|
-
function useCheckableGroup(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} : _ref$onCheck;
|
|
19
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
20
|
+
function useCheckableGroup({
|
|
21
|
+
children,
|
|
22
|
+
active: activeProp,
|
|
23
|
+
multi,
|
|
24
|
+
onCheck = () => null
|
|
25
|
+
}) {
|
|
26
|
+
const [active, setActive] = useDerivedStateFromProps__default["default"](activeProp);
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
setActive(function (prevActive) {
|
|
38
|
-
var nextActive = multi ? dsUtilities.addOrRemove(prevActive, value) : value;
|
|
28
|
+
const handleCheck = ({
|
|
29
|
+
target: {
|
|
30
|
+
value
|
|
31
|
+
}
|
|
32
|
+
}, item) => {
|
|
33
|
+
setActive(prevActive => {
|
|
34
|
+
const nextActive = multi ? utils.addOrRemove(prevActive, value) : value;
|
|
39
35
|
onCheck(nextActive, item);
|
|
40
36
|
return nextActive;
|
|
41
37
|
});
|
|
42
38
|
};
|
|
43
39
|
|
|
44
|
-
return React__default[
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
return React__default["default"].Children.map(children, child => {
|
|
41
|
+
const {
|
|
42
|
+
props
|
|
43
|
+
} = child;
|
|
44
|
+
const checked = Array.isArray(active) ? active.indexOf(props.name) !== -1 : active === props.name;
|
|
47
45
|
return /*#__PURE__*/React.cloneElement(child, _objectSpread(_objectSpread({}, props), {}, {
|
|
48
|
-
checked
|
|
49
|
-
onClick:
|
|
46
|
+
checked,
|
|
47
|
+
onClick: utils.runAll(handleCheck, props.onClick)
|
|
50
48
|
}));
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
51
|
|
|
54
|
-
function CheckableGroup(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
function CheckableGroup({
|
|
53
|
+
active = [],
|
|
54
|
+
multi = false,
|
|
55
|
+
// checkbox or radio
|
|
56
|
+
children
|
|
57
|
+
}) {
|
|
60
58
|
return useCheckableGroup({
|
|
61
|
-
active
|
|
62
|
-
multi
|
|
63
|
-
children
|
|
59
|
+
active,
|
|
60
|
+
multi,
|
|
61
|
+
children
|
|
64
62
|
});
|
|
65
63
|
}
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
/* The item (if multi false) or items (if multi true) selected */
|
|
69
|
-
active: PropTypes__default['default'].arrayOf(PropTypes__default['default'].string),
|
|
70
|
-
|
|
71
|
-
/* Whether is multi select or not */
|
|
72
|
-
multi: PropTypes__default['default'].bool,
|
|
73
|
-
|
|
74
|
-
/* Handler when a user checks an item */
|
|
75
|
-
onCheck: PropTypes__default['default'].func
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
exports['default'] = CheckableGroup;
|
|
65
|
+
exports["default"] = CheckableGroup;
|
|
79
66
|
exports.useCheckableGroup = useCheckableGroup;
|
|
80
|
-
//# sourceMappingURL=CheckableGroup.js.map
|
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var raf = require('raf');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
10
9
|
var raf__default = /*#__PURE__*/_interopDefaultLegacy(raf);
|
|
11
10
|
|
|
12
|
-
function DeferRenderAfterComputation(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
shouldRender = _useState2[0],
|
|
21
|
-
setShouldRender = _useState2[1];
|
|
22
|
-
|
|
23
|
-
React.useEffect(function () {
|
|
11
|
+
function DeferRenderAfterComputation({
|
|
12
|
+
children,
|
|
13
|
+
resolve,
|
|
14
|
+
fallback,
|
|
15
|
+
timeout = 2000
|
|
16
|
+
}) {
|
|
17
|
+
const [shouldRender, setShouldRender] = React.useState(false);
|
|
18
|
+
React.useEffect(() => {
|
|
24
19
|
// eslint-disable-next-line max-nested-callbacks
|
|
25
|
-
raf__default[
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
setShouldRender(true);
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
});
|
|
20
|
+
raf__default["default"](() => raf__default["default"](() => resolve().then(() => {
|
|
21
|
+
setShouldRender(true);
|
|
22
|
+
})));
|
|
32
23
|
}, []);
|
|
33
24
|
return shouldRender ? children : fallback;
|
|
34
25
|
}
|
|
35
26
|
|
|
36
27
|
module.exports = DeferRenderAfterComputation;
|
|
37
|
-
//# sourceMappingURL=DeferRenderAfterComputation.js.map
|