@elliemae/ds-shared 3.0.0-next.1 → 3.0.0-next.5
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/dist/cjs/Animations/BaseAnimation.js +56 -0
- package/dist/cjs/Animations/BaseAnimation.js.map +7 -0
- package/dist/cjs/Animations/Grow.js +55 -0
- package/dist/cjs/Animations/Grow.js.map +7 -0
- package/dist/cjs/Animations/GrowRight.js +64 -0
- package/dist/cjs/Animations/GrowRight.js.map +7 -0
- package/dist/cjs/Animations/GrowVertical.js +47 -0
- package/dist/cjs/Animations/GrowVertical.js.map +7 -0
- package/dist/cjs/CheckableGroup.js +92 -0
- package/dist/cjs/CheckableGroup.js.map +7 -0
- package/dist/cjs/DeferRenderAfterComputation.js +52 -0
- package/dist/cjs/DeferRenderAfterComputation.js.map +7 -0
- package/dist/cjs/FocusGroup/FocusGrid.js +193 -0
- package/dist/cjs/FocusGroup/FocusGrid.js.map +7 -0
- package/dist/cjs/FocusGroup/FocusGroup.js +262 -0
- package/dist/cjs/FocusGroup/FocusGroup.js.map +7 -0
- package/dist/cjs/FocusGroup/FocusGroupContext.js +38 -0
- package/dist/cjs/FocusGroup/FocusGroupContext.js.map +7 -0
- package/dist/cjs/FocusGroup/FocusGroupManager.js +126 -0
- package/dist/cjs/FocusGroup/FocusGroupManager.js.map +7 -0
- package/dist/cjs/FocusGroup/focusGroupManagerHoc.js +82 -0
- package/dist/cjs/FocusGroup/focusGroupManagerHoc.js.map +7 -0
- package/dist/cjs/FocusGroup/index.js +47 -0
- package/dist/cjs/FocusGroup/index.js.map +7 -0
- package/dist/cjs/FocusGroup/useFocusGroupItem.js +81 -0
- package/dist/cjs/FocusGroup/useFocusGroupItem.js.map +7 -0
- package/dist/cjs/FocusGroup/utils/getNextCellPosition.js +80 -0
- package/dist/cjs/FocusGroup/utils/getNextCellPosition.js.map +7 -0
- package/dist/cjs/GroupContext/Group.js +115 -0
- package/dist/cjs/GroupContext/Group.js.map +7 -0
- package/dist/cjs/GroupContext/GroupContext.js +36 -0
- package/dist/cjs/GroupContext/GroupContext.js.map +7 -0
- package/dist/cjs/GroupContext/GroupItem.js +40 -0
- package/dist/cjs/GroupContext/GroupItem.js.map +7 -0
- package/dist/cjs/GroupContext/index.js +39 -0
- package/dist/cjs/GroupContext/index.js.map +7 -0
- package/dist/cjs/ScrollSync/ScrollSync.js +138 -0
- package/dist/cjs/ScrollSync/ScrollSync.js.map +7 -0
- package/dist/cjs/ScrollSync/ScrollSyncPane.js +89 -0
- package/dist/cjs/ScrollSync/ScrollSyncPane.js.map +7 -0
- package/dist/cjs/ScrollSync/ScrollSyncProvider.js +120 -0
- package/dist/cjs/ScrollSync/ScrollSyncProvider.js.map +7 -0
- package/dist/cjs/ScrollSync/index.js +37 -0
- package/dist/cjs/ScrollSync/index.js.map +7 -0
- package/dist/cjs/ScrollSync/useScrollSync.js +41 -0
- package/dist/cjs/ScrollSync/useScrollSync.js.map +7 -0
- package/dist/cjs/constants.js +70 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/createDataInstance/createInstancePlugin.js +62 -0
- package/dist/cjs/createDataInstance/createInstancePlugin.js.map +7 -0
- package/dist/cjs/createDataInstance/createInstanceRef.js +124 -0
- package/dist/cjs/createDataInstance/createInstanceRef.js.map +7 -0
- package/dist/cjs/createDataInstance/utils.js +104 -0
- package/dist/cjs/createDataInstance/utils.js.map +7 -0
- package/dist/cjs/defer-render-hoc/index.js +68 -0
- package/dist/cjs/defer-render-hoc/index.js.map +7 -0
- package/dist/cjs/dimsum.config.js +39 -0
- package/dist/cjs/dimsum.config.js.map +7 -0
- package/dist/cjs/index.js +40 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/prop-types.js +116 -0
- package/dist/cjs/prop-types.js.map +7 -0
- package/dist/cjs/react-spring/index.js +28 -0
- package/dist/cjs/react-spring/index.js.map +7 -0
- package/dist/cjs/react-spring/renderprops.js +28 -0
- package/dist/cjs/react-spring/renderprops.js.map +7 -0
- package/dist/cjs/toolbar/ToolbarProvider.js +126 -0
- package/dist/cjs/toolbar/ToolbarProvider.js.map +7 -0
- package/dist/cjs/useDataGrid/VolatileRowsListener.js +49 -0
- package/dist/cjs/useDataGrid/VolatileRowsListener.js.map +7 -0
- package/dist/cjs/useDataGrid/index.js +36 -0
- package/dist/cjs/useDataGrid/index.js.map +7 -0
- package/dist/cjs/useDataGrid/initColumnDefinition.js +147 -0
- package/dist/cjs/useDataGrid/initColumnDefinition.js.map +7 -0
- package/dist/cjs/useDataGrid/useDataGrid.js +216 -0
- package/dist/cjs/useDataGrid/useDataGrid.js.map +7 -0
- package/dist/cjs/useDataList/index.js +36 -0
- package/dist/cjs/useDataList/index.js.map +7 -0
- package/dist/cjs/useDataList/recordIterator.js +55 -0
- package/dist/cjs/useDataList/recordIterator.js.map +7 -0
- package/dist/cjs/useDataList/useDataList.js +126 -0
- package/dist/cjs/useDataList/useDataList.js.map +7 -0
- package/dist/cjs/utils.js +123 -0
- package/dist/cjs/utils.js.map +7 -0
- package/dist/cjs/virtualization/AutoHeightList.js +106 -0
- package/dist/cjs/virtualization/AutoHeightList.js.map +7 -0
- package/dist/cjs/virtualization/FluidHeightList.js +74 -0
- package/dist/cjs/virtualization/FluidHeightList.js.map +7 -0
- package/dist/cjs/virtualization/index.js +50 -0
- package/dist/cjs/virtualization/index.js.map +7 -0
- package/dist/esm/Animations/BaseAnimation.js +27 -0
- package/dist/esm/Animations/BaseAnimation.js.map +7 -0
- package/dist/esm/Animations/Grow.js +26 -0
- package/dist/esm/Animations/Grow.js.map +7 -0
- package/dist/esm/Animations/GrowRight.js +35 -0
- package/dist/esm/Animations/GrowRight.js.map +7 -0
- package/dist/esm/Animations/GrowVertical.js +29 -0
- package/dist/esm/Animations/GrowVertical.js.map +7 -0
- package/dist/esm/CheckableGroup.js +65 -0
- package/dist/esm/CheckableGroup.js.map +7 -0
- package/dist/esm/DeferRenderAfterComputation.js +23 -0
- package/dist/esm/DeferRenderAfterComputation.js.map +7 -0
- package/dist/esm/FocusGroup/FocusGrid.js +166 -0
- package/dist/esm/FocusGroup/FocusGrid.js.map +7 -0
- package/{esm → dist/esm}/FocusGroup/FocusGroup.js +70 -136
- package/dist/esm/FocusGroup/FocusGroup.js.map +7 -0
- package/dist/esm/FocusGroup/FocusGroupContext.js +9 -0
- package/dist/esm/FocusGroup/FocusGroupContext.js.map +7 -0
- package/{esm → dist/esm}/FocusGroup/FocusGroupManager.js +24 -38
- package/dist/esm/FocusGroup/FocusGroupManager.js.map +7 -0
- package/dist/esm/FocusGroup/focusGroupManagerHoc.js +55 -0
- package/dist/esm/FocusGroup/focusGroupManagerHoc.js.map +7 -0
- package/dist/esm/FocusGroup/index.js +18 -0
- package/dist/esm/FocusGroup/index.js.map +7 -0
- package/dist/esm/FocusGroup/useFocusGroupItem.js +53 -0
- package/dist/esm/FocusGroup/useFocusGroupItem.js.map +7 -0
- package/{esm → dist/esm}/FocusGroup/utils/getNextCellPosition.js +18 -25
- package/dist/esm/FocusGroup/utils/getNextCellPosition.js.map +7 -0
- package/dist/esm/GroupContext/Group.js +86 -0
- package/dist/esm/GroupContext/Group.js.map +7 -0
- package/dist/esm/GroupContext/GroupContext.js +7 -0
- package/dist/esm/GroupContext/GroupContext.js.map +7 -0
- package/dist/esm/GroupContext/GroupItem.js +11 -0
- package/dist/esm/GroupContext/GroupItem.js.map +7 -0
- package/dist/esm/GroupContext/index.js +10 -0
- package/dist/esm/GroupContext/index.js.map +7 -0
- package/{esm → dist/esm}/ScrollSync/ScrollSync.js +30 -64
- package/dist/esm/ScrollSync/ScrollSync.js.map +7 -0
- package/dist/esm/ScrollSync/ScrollSyncPane.js +62 -0
- package/dist/esm/ScrollSync/ScrollSyncPane.js.map +7 -0
- package/dist/esm/ScrollSync/ScrollSyncProvider.js +91 -0
- package/dist/esm/ScrollSync/ScrollSyncProvider.js.map +7 -0
- package/dist/esm/ScrollSync/index.js +8 -0
- package/dist/esm/ScrollSync/index.js.map +7 -0
- package/dist/esm/ScrollSync/useScrollSync.js +12 -0
- package/dist/esm/ScrollSync/useScrollSync.js.map +7 -0
- package/dist/esm/constants.js +41 -0
- package/dist/esm/constants.js.map +7 -0
- package/dist/esm/createDataInstance/createInstancePlugin.js +35 -0
- package/dist/esm/createDataInstance/createInstancePlugin.js.map +7 -0
- package/dist/esm/createDataInstance/createInstanceRef.js +101 -0
- package/dist/esm/createDataInstance/createInstanceRef.js.map +7 -0
- package/dist/esm/createDataInstance/utils.js +77 -0
- package/dist/esm/createDataInstance/utils.js.map +7 -0
- package/dist/esm/defer-render-hoc/index.js +41 -0
- package/dist/esm/defer-render-hoc/index.js.map +7 -0
- package/dist/esm/dimsum.config.js +10 -0
- package/dist/esm/dimsum.config.js.map +7 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/prop-types.js +87 -0
- package/dist/esm/prop-types.js.map +7 -0
- package/dist/esm/react-spring/index.js +3 -0
- package/dist/esm/react-spring/index.js.map +7 -0
- package/dist/esm/react-spring/renderprops.js +3 -0
- package/dist/esm/react-spring/renderprops.js.map +7 -0
- package/dist/esm/toolbar/ToolbarProvider.js +99 -0
- package/dist/esm/toolbar/ToolbarProvider.js.map +7 -0
- package/dist/esm/useDataGrid/VolatileRowsListener.js +20 -0
- package/dist/esm/useDataGrid/VolatileRowsListener.js.map +7 -0
- package/dist/esm/useDataGrid/index.js +7 -0
- package/dist/esm/useDataGrid/index.js.map +7 -0
- package/dist/esm/useDataGrid/initColumnDefinition.js +126 -0
- package/dist/esm/useDataGrid/initColumnDefinition.js.map +7 -0
- package/dist/esm/useDataGrid/useDataGrid.js +201 -0
- package/dist/esm/useDataGrid/useDataGrid.js.map +7 -0
- package/dist/esm/useDataList/index.js +7 -0
- package/dist/esm/useDataList/index.js.map +7 -0
- package/dist/esm/useDataList/recordIterator.js +26 -0
- package/dist/esm/useDataList/recordIterator.js.map +7 -0
- package/dist/esm/useDataList/useDataList.js +102 -0
- package/dist/esm/useDataList/useDataList.js.map +7 -0
- package/dist/esm/utils.js +96 -0
- package/dist/esm/utils.js.map +7 -0
- package/dist/esm/virtualization/AutoHeightList.js +79 -0
- package/dist/esm/virtualization/AutoHeightList.js.map +7 -0
- package/dist/esm/virtualization/FluidHeightList.js +47 -0
- package/dist/esm/virtualization/FluidHeightList.js.map +7 -0
- package/dist/esm/virtualization/index.js +21 -0
- package/dist/esm/virtualization/index.js.map +7 -0
- package/package.json +116 -107
- package/cjs/Animations/BaseAnimation.js +0 -36
- package/cjs/Animations/Grow.js +0 -42
- package/cjs/Animations/GrowRight.js +0 -42
- package/cjs/Animations/GrowVertical.js +0 -7
- package/cjs/CheckableGroup.js +0 -74
- package/cjs/DeferRenderAfterComputation.js +0 -28
- package/cjs/FocusGroup/FocusGrid.js +0 -215
- package/cjs/FocusGroup/FocusGroup.js +0 -308
- package/cjs/FocusGroup/FocusGroupContext.js +0 -11
- package/cjs/FocusGroup/FocusGroupManager.js +0 -117
- package/cjs/FocusGroup/focusGroupManagerHoc.js +0 -44
- package/cjs/FocusGroup/index.js +0 -21
- package/cjs/FocusGroup/useFocusGroupItem.js +0 -59
- package/cjs/FocusGroup/utils/getNextCellPosition.js +0 -60
- package/cjs/GroupContext/Group.js +0 -124
- package/cjs/GroupContext/GroupContext.js +0 -13
- package/cjs/GroupContext/GroupItem.js +0 -22
- package/cjs/GroupContext/index.js +0 -13
- package/cjs/ScrollSync/ScrollSync.js +0 -153
- package/cjs/ScrollSync/ScrollSyncPane.js +0 -81
- package/cjs/ScrollSync/ScrollSyncProvider.js +0 -67
- package/cjs/ScrollSync/index.js +0 -11
- package/cjs/ScrollSync/useScrollSync.js +0 -10
- package/cjs/constants.js +0 -51
- package/cjs/createDataInstance/createInstancePlugin.js +0 -36
- package/cjs/createDataInstance/createInstanceRef.js +0 -97
- package/cjs/createDataInstance/utils.js +0 -123
- package/cjs/defer-render-hoc/index.js +0 -49
- package/cjs/dimsum.config.js +0 -7
- package/cjs/index.js +0 -17
- package/cjs/prop-types.js +0 -59
- package/cjs/react-spring/index.js +0 -14
- package/cjs/react-spring/renderprops.js +0 -14
- package/cjs/toolbar/ToolbarProvider.js +0 -123
- package/cjs/useDataGrid/VolatileRowsListener.js +0 -24
- package/cjs/useDataGrid/index.js +0 -7
- package/cjs/useDataGrid/initColumnDefinition.js +0 -146
- package/cjs/useDataGrid/useDataGrid.js +0 -220
- package/cjs/useDataList/index.js +0 -7
- package/cjs/useDataList/recordIterator.js +0 -31
- package/cjs/useDataList/useDataList.js +0 -102
- package/cjs/utils.js +0 -116
- package/cjs/virtualization/AutoHeightList.js +0 -61
- package/cjs/virtualization/FluidHeightList.js +0 -49
- package/cjs/virtualization/index.js +0 -22
- package/esm/Animations/BaseAnimation.js +0 -30
- package/esm/Animations/Grow.js +0 -36
- package/esm/Animations/GrowRight.js +0 -36
- package/esm/Animations/GrowVertical.js +0 -4
- package/esm/CheckableGroup.js +0 -64
- package/esm/DeferRenderAfterComputation.js +0 -22
- package/esm/FocusGroup/FocusGrid.js +0 -204
- package/esm/FocusGroup/FocusGroupContext.js +0 -5
- package/esm/FocusGroup/focusGroupManagerHoc.js +0 -37
- package/esm/FocusGroup/index.js +0 -6
- package/esm/FocusGroup/useFocusGroupItem.js +0 -50
- package/esm/GroupContext/Group.js +0 -118
- package/esm/GroupContext/GroupContext.js +0 -5
- package/esm/GroupContext/GroupItem.js +0 -16
- package/esm/GroupContext/index.js +0 -3
- package/esm/ScrollSync/ScrollSyncPane.js +0 -74
- package/esm/ScrollSync/ScrollSyncProvider.js +0 -59
- package/esm/ScrollSync/index.js +0 -2
- package/esm/ScrollSync/useScrollSync.js +0 -8
- package/esm/constants.js +0 -32
- package/esm/createDataInstance/createInstancePlugin.js +0 -30
- package/esm/createDataInstance/createInstanceRef.js +0 -90
- package/esm/createDataInstance/utils.js +0 -107
- package/esm/defer-render-hoc/index.js +0 -41
- package/esm/dimsum.config.js +0 -5
- package/esm/index.js +0 -5
- package/esm/prop-types.js +0 -43
- package/esm/react-spring/index.js +0 -1
- package/esm/react-spring/renderprops.js +0 -1
- package/esm/toolbar/ToolbarProvider.js +0 -111
- package/esm/useDataGrid/VolatileRowsListener.js +0 -22
- package/esm/useDataGrid/index.js +0 -1
- package/esm/useDataGrid/initColumnDefinition.js +0 -134
- package/esm/useDataGrid/useDataGrid.js +0 -194
- package/esm/useDataList/index.js +0 -1
- package/esm/useDataList/recordIterator.js +0 -27
- package/esm/useDataList/useDataList.js +0 -90
- package/esm/utils.js +0 -95
- package/esm/virtualization/AutoHeightList.js +0 -52
- package/esm/virtualization/FluidHeightList.js +0 -38
- package/esm/virtualization/index.js +0 -18
- package/types/Animations/BaseAnimation.d.ts +0 -12
- package/types/Animations/Grow.d.ts +0 -11
- package/types/Animations/GrowRight.d.ts +0 -11
- package/types/Animations/GrowVertical.d.ts +0 -1
- package/types/CheckableGroup.d.ts +0 -20
- package/types/DeferRenderAfterComputation.d.ts +0 -6
- package/types/FocusGroup/FocusGrid.d.ts +0 -10
- package/types/FocusGroup/FocusGroup.d.ts +0 -36
- package/types/FocusGroup/FocusGroupContext.d.ts +0 -3
- package/types/FocusGroup/FocusGroupManager.d.ts +0 -24
- package/types/FocusGroup/focusGroupManagerHoc.d.ts +0 -7
- package/types/FocusGroup/index.d.ts +0 -6
- package/types/FocusGroup/useFocusGroupItem.d.ts +0 -2
- package/types/FocusGroup/utils/getNextCellPosition.d.ts +0 -12
- package/types/GroupContext/Group.d.ts +0 -14
- package/types/GroupContext/GroupContext.d.ts +0 -2
- package/types/GroupContext/GroupItem.d.ts +0 -5
- package/types/GroupContext/index.d.ts +0 -3
- package/types/ScrollSync/ScrollSync.d.ts +0 -21
- package/types/ScrollSync/ScrollSyncPane.d.ts +0 -3
- package/types/ScrollSync/ScrollSyncProvider.d.ts +0 -12
- package/types/ScrollSync/index.d.ts +0 -2
- package/types/ScrollSync/useScrollSync.d.ts +0 -6
- package/types/constants.d.ts +0 -30
- package/types/createDataInstance/createInstancePlugin.d.ts +0 -1
- package/types/createDataInstance/createInstanceRef.d.ts +0 -12
- package/types/createDataInstance/tests/createInstanceRef.test.d.ts +0 -0
- package/types/createDataInstance/utils.d.ts +0 -9
- package/types/dimsum.config.d.ts +0 -4
- package/types/index.d.ts +0 -2
- package/types/prop-types.d.ts +0 -41
- package/types/react-spring/index.d.ts +0 -1
- package/types/react-spring/renderprops.d.ts +0 -1
- package/types/toolbar/ToolbarProvider.d.ts +0 -10
- package/types/useDataGrid/VolatileRowsListener.d.ts +0 -5
- package/types/useDataGrid/index.d.ts +0 -1
- package/types/useDataGrid/initColumnDefinition.d.ts +0 -5
- package/types/useDataGrid/useDataGrid.d.ts +0 -8
- package/types/useDataList/index.d.ts +0 -1
- package/types/useDataList/recordIterator.d.ts +0 -1
- package/types/useDataList/useDataList.d.ts +0 -13
- package/types/utils.d.ts +0 -22
- package/types/virtualization/AutoHeightList.d.ts +0 -2
- package/types/virtualization/FluidHeightList.d.ts +0 -2
- package/types/virtualization/index.d.ts +0 -9
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
5
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
6
|
-
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
|
-
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
9
|
-
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
|
-
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
14
|
-
|
|
15
|
-
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; }
|
|
16
|
-
|
|
17
|
-
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; }
|
|
18
|
-
|
|
19
|
-
function getDecoratorsFromHooks(hooks, decorators) {
|
|
20
|
-
const nextDecorators = _objectSpread({}, decorators);
|
|
21
|
-
|
|
22
|
-
Object.keys(hooks).forEach(decorator => {
|
|
23
|
-
if (Array.isArray(decorators[decorator])) {
|
|
24
|
-
nextDecorators[decorator] = [...decorators[decorator], hooks[decorator]];
|
|
25
|
-
} else {
|
|
26
|
-
nextDecorators[decorator] = hooks[decorator];
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return nextDecorators;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function createInstancePlugin(name, hooks) {
|
|
33
|
-
return decorators => getDecoratorsFromHooks(hooks, decorators);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
module.exports = createInstancePlugin;
|
|
@@ -1,97 +0,0 @@
|
|
|
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.for-each.js');
|
|
7
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
8
|
-
require('core-js/modules/esnext.iterator.for-each.js');
|
|
9
|
-
require('core-js/modules/esnext.async-iterator.reduce.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
|
-
var uuid = require('uuid');
|
|
14
|
-
var React = require('react');
|
|
15
|
-
var lodash = require('lodash');
|
|
16
|
-
var utils = require('./utils.js');
|
|
17
|
-
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
21
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
22
|
-
|
|
23
|
-
const _excluded = ["uuid", "data", "renderers", "plugins", "customDecorators"];
|
|
24
|
-
|
|
25
|
-
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; }
|
|
26
|
-
|
|
27
|
-
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; }
|
|
28
|
-
const defaultDecorators = {
|
|
29
|
-
instance: [],
|
|
30
|
-
state: [],
|
|
31
|
-
hotKeys: [],
|
|
32
|
-
renderers: [],
|
|
33
|
-
composeData: []
|
|
34
|
-
};
|
|
35
|
-
function createDataInstanceRef(_ref) {
|
|
36
|
-
let {
|
|
37
|
-
uuid: uuidProp,
|
|
38
|
-
data,
|
|
39
|
-
renderers,
|
|
40
|
-
plugins,
|
|
41
|
-
customDecorators
|
|
42
|
-
} = _ref,
|
|
43
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
44
|
-
|
|
45
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
46
|
-
const instance = React.useRef(); // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
47
|
-
|
|
48
|
-
const [uuid$1] = React.useState(uuidProp || (() => uuid.v4()));
|
|
49
|
-
instance.current = {
|
|
50
|
-
uuid: uuid$1,
|
|
51
|
-
state: {},
|
|
52
|
-
actions: {},
|
|
53
|
-
hotKeys: {},
|
|
54
|
-
// keyboard hotkeys to run specific actions
|
|
55
|
-
originalData: data,
|
|
56
|
-
records: [],
|
|
57
|
-
// item abstraction with meta data for originalData
|
|
58
|
-
renderers,
|
|
59
|
-
|
|
60
|
-
ref(key) {
|
|
61
|
-
// eslint-disable-next-line no-return-assign
|
|
62
|
-
return node => instance.current.refs[key] = node;
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
getInstance() {
|
|
66
|
-
return instance.current;
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
props
|
|
70
|
-
}; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
71
|
-
|
|
72
|
-
const decorators = React.useMemo(() => {
|
|
73
|
-
let nextDecorators = _objectSpread(_objectSpread({}, defaultDecorators), customDecorators);
|
|
74
|
-
|
|
75
|
-
plugins.forEach(plugin => {
|
|
76
|
-
if (!plugin) return;
|
|
77
|
-
nextDecorators = plugin(nextDecorators);
|
|
78
|
-
});
|
|
79
|
-
Object.keys(nextDecorators).forEach(key => {
|
|
80
|
-
if (Array.isArray(nextDecorators[key])) nextDecorators[key] = lodash.orderBy(nextDecorators[key], item => item.order);
|
|
81
|
-
});
|
|
82
|
-
return nextDecorators;
|
|
83
|
-
}, []); // the plugins are defined on creation, but not changed at runtime
|
|
84
|
-
// todo: test if getting the hooks without registering them
|
|
85
|
-
// here would be beneficial to memoize instance and squeeze performance
|
|
86
|
-
|
|
87
|
-
instance.current = decorators.instance.reduce(utils.mergeInstance, instance.current);
|
|
88
|
-
instance.current = decorators.state.reduce(utils.registerStateHookToInstance, instance.current);
|
|
89
|
-
instance.current = decorators.hotKeys.reduce(utils.registerHotKeysHookToInstance, instance.current);
|
|
90
|
-
instance.current.renderers = decorators.renderers.reduce((result, decorator) => decorator(result, instance.current), renderers);
|
|
91
|
-
return {
|
|
92
|
-
instance,
|
|
93
|
-
decorators
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
module.exports = createDataInstanceRef;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
-
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
7
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
8
|
-
require('core-js/modules/esnext.iterator.for-each.js');
|
|
9
|
-
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
10
|
-
require('core-js/modules/esnext.iterator.reduce.js');
|
|
11
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
12
|
-
require('core-js/modules/esnext.async-iterator.map.js');
|
|
13
|
-
require('core-js/modules/esnext.iterator.map.js');
|
|
14
|
-
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
15
|
-
require('core-js/modules/esnext.iterator.filter.js');
|
|
16
|
-
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
20
|
-
|
|
21
|
-
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; }
|
|
22
|
-
|
|
23
|
-
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; }
|
|
24
|
-
const reducePropsGetter = function () {
|
|
25
|
-
let decorators = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
26
|
-
let grid = arguments.length > 1 ? arguments[1] : undefined;
|
|
27
|
-
return function () {
|
|
28
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
29
|
-
let extraParams = arguments.length > 1 ? arguments[1] : undefined;
|
|
30
|
-
let nextProps = props;
|
|
31
|
-
decorators.forEach(decorator => {
|
|
32
|
-
nextProps = decorator(nextProps, grid, extraParams);
|
|
33
|
-
});
|
|
34
|
-
return nextProps;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
/* eslint-disable-next-line max-params */
|
|
38
|
-
|
|
39
|
-
function evaluateTransforms(transforms, value) {
|
|
40
|
-
let extraParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
41
|
-
let props = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
42
|
-
let grid = arguments.length > 4 ? arguments[4] : undefined;
|
|
43
|
-
let nextProps = props;
|
|
44
|
-
transforms.forEach(transform => {
|
|
45
|
-
nextProps = transform(value, extraParams, nextProps, grid);
|
|
46
|
-
});
|
|
47
|
-
return nextProps;
|
|
48
|
-
}
|
|
49
|
-
/* eslint-disable-next-line max-params */
|
|
50
|
-
|
|
51
|
-
function evaluateFormatters(formatters, value) {
|
|
52
|
-
let extraParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
53
|
-
let grid = arguments.length > 3 ? arguments[3] : undefined;
|
|
54
|
-
return formatters.reduce((result, formatter) => formatter(result, extraParams, grid), value);
|
|
55
|
-
}
|
|
56
|
-
function composeFormatters(formatters, instance) {
|
|
57
|
-
let getItemValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : record => record.data.name;
|
|
58
|
-
// todo: make the formatters subscribe to the item props instead of getting the whole instance
|
|
59
|
-
// todo: addd should formatter update to memoize specific ones
|
|
60
|
-
return props => formatters.reduce((result, formatter) => formatter(result, props, instance), getItemValue(props.record));
|
|
61
|
-
}
|
|
62
|
-
const applyDecorators = function (subject) {
|
|
63
|
-
let decorators = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
64
|
-
|
|
65
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
66
|
-
args[_key - 2] = arguments[_key];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return decorators.reduce((nextSubject, decorator) => decorator(nextSubject, ...args), subject);
|
|
70
|
-
};
|
|
71
|
-
const decorateColumns = (columns, decorators, grid) => {
|
|
72
|
-
const nextColumns = applyDecorators(columns, decorators.decorateColumns, grid);
|
|
73
|
-
return nextColumns.map((column, index) => applyDecorators(column, decorators.decorateColumn, grid, index));
|
|
74
|
-
};
|
|
75
|
-
const mergeInstance = (instance, instanceHook) => _objectSpread(_objectSpread({}, instance), instanceHook(instance));
|
|
76
|
-
const registerStateHookToInstance = (instance, stateHook) => {
|
|
77
|
-
const {
|
|
78
|
-
state,
|
|
79
|
-
actions
|
|
80
|
-
} = stateHook(instance);
|
|
81
|
-
return _objectSpread(_objectSpread({}, instance), {}, {
|
|
82
|
-
state: _objectSpread(_objectSpread({}, instance.state), state),
|
|
83
|
-
actions: _objectSpread(_objectSpread({}, instance.actions), actions)
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const reduceHotKey = (instance, _ref) => {
|
|
88
|
-
let {
|
|
89
|
-
key,
|
|
90
|
-
handler,
|
|
91
|
-
options,
|
|
92
|
-
allowDocumentHandler
|
|
93
|
-
} = _ref;
|
|
94
|
-
return _objectSpread(_objectSpread({}, instance), {}, {
|
|
95
|
-
hotKeys: _objectSpread(_objectSpread({}, instance.hotKeys), {}, {
|
|
96
|
-
[key]: {
|
|
97
|
-
handler,
|
|
98
|
-
options,
|
|
99
|
-
allowDocumentHandler
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const registerHotKeysHookToInstance = (instance, hotKeysHook) => {
|
|
106
|
-
const hotKeys = hotKeysHook(instance);
|
|
107
|
-
|
|
108
|
-
if (Array.isArray(hotKeys)) {
|
|
109
|
-
return hotKeys.reduce(reduceHotKey, instance);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return reduceHotKey(instance, hotKeys);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
exports.applyDecorators = applyDecorators;
|
|
116
|
-
exports.composeFormatters = composeFormatters;
|
|
117
|
-
exports.decorateColumns = decorateColumns;
|
|
118
|
-
exports.evaluateFormatters = evaluateFormatters;
|
|
119
|
-
exports.evaluateTransforms = evaluateTransforms;
|
|
120
|
-
exports.mergeInstance = mergeInstance;
|
|
121
|
-
exports.reducePropsGetter = reducePropsGetter;
|
|
122
|
-
exports.registerHotKeysHookToInstance = registerHotKeysHookToInstance;
|
|
123
|
-
exports.registerStateHookToInstance = registerStateHookToInstance;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
|
-
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
-
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
-
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
-
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
-
var React = require('react');
|
|
11
|
-
var raf = require('raf');
|
|
12
|
-
var hoistNonReactStatic = require('hoist-non-react-statics');
|
|
13
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
-
|
|
17
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
18
|
-
var raf__default = /*#__PURE__*/_interopDefaultLegacy(raf);
|
|
19
|
-
var hoistNonReactStatic__default = /*#__PURE__*/_interopDefaultLegacy(hoistNonReactStatic);
|
|
20
|
-
|
|
21
|
-
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; }
|
|
22
|
-
|
|
23
|
-
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; }
|
|
24
|
-
function deferComponentRender(WrappedComponent, fallback) {
|
|
25
|
-
class DeferredRenderWrapper extends React.PureComponent {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this.state = {
|
|
29
|
-
shouldRender: false
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
componentDidMount() {
|
|
34
|
-
raf__default["default"](() => raf__default["default"](() => this.setState({
|
|
35
|
-
shouldRender: true
|
|
36
|
-
})));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
render() {
|
|
40
|
-
// eslint-disable-next-line react/destructuring-assignment
|
|
41
|
-
return this.state.shouldRender ? /*#__PURE__*/jsxRuntime.jsx(WrappedComponent, _objectSpread({}, this.props)) : fallback;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return hoistNonReactStatic__default["default"](DeferredRenderWrapper, WrappedComponent);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
module.exports = deferComponentRender;
|
package/cjs/dimsum.config.js
DELETED
package/cjs/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var ScrollSync = require('./ScrollSync/ScrollSync.js');
|
|
6
|
-
var ScrollSyncPane = require('./ScrollSync/ScrollSyncPane.js');
|
|
7
|
-
var Group = require('./GroupContext/Group.js');
|
|
8
|
-
var GroupContext = require('./GroupContext/GroupContext.js');
|
|
9
|
-
var GroupItem = require('./GroupContext/GroupItem.js');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.ScrollSync = ScrollSync["default"];
|
|
14
|
-
exports.ScrollSyncPane = ScrollSyncPane;
|
|
15
|
-
exports.Group = Group;
|
|
16
|
-
exports.GroupContext = GroupContext.GroupContext;
|
|
17
|
-
exports.GroupItem = GroupItem;
|
package/cjs/prop-types.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const dsBasicSizes = ['s', 'm', 'l'];
|
|
6
|
-
const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'];
|
|
7
|
-
const iconSizes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
8
|
-
const iconColors = [['neutral', '900'], ['neutral', '0'], ['danger', '900'], ['warning', '500'], ['success', '900'], ['brand-primary', '600']];
|
|
9
|
-
const CHECKBOX_VARIANT = {
|
|
10
|
-
DEFAULT: 'variant-default',
|
|
11
|
-
FOCUS: 'variant-focus',
|
|
12
|
-
ACTIVE: 'variant-active',
|
|
13
|
-
DISABLED: 'variant-disabled',
|
|
14
|
-
ERROR: 'variant-error'
|
|
15
|
-
};
|
|
16
|
-
const checkboxVariants = [CHECKBOX_VARIANT.DEFAULT, CHECKBOX_VARIANT.FOCUS, CHECKBOX_VARIANT.ACTIVE, CHECKBOX_VARIANT.DISABLED, CHECKBOX_VARIANT.ERROR];
|
|
17
|
-
const COMBOBOX_VARIANT = {
|
|
18
|
-
DEFAULT: 'variant-default',
|
|
19
|
-
FOCUS: 'variant-focus-input',
|
|
20
|
-
FOCUS_ICON: 'variant-focus-icon',
|
|
21
|
-
ACTIVE: 'variant-active-input',
|
|
22
|
-
ACTIVE_ICON: 'variant-active-icon',
|
|
23
|
-
DISABLED: 'variant-disabled',
|
|
24
|
-
ERROR: 'variant-error'
|
|
25
|
-
};
|
|
26
|
-
const comboBoxVariants = [COMBOBOX_VARIANT.DEFAULT, COMBOBOX_VARIANT.FOCUS, COMBOBOX_VARIANT.FOCUS_ICON, COMBOBOX_VARIANT.ACTIVE, COMBOBOX_VARIANT.ACTIVE_ICON, COMBOBOX_VARIANT.DISABLED, COMBOBOX_VARIANT.ERROR];
|
|
27
|
-
const sizeVariants = {
|
|
28
|
-
S: 's',
|
|
29
|
-
M: 'm',
|
|
30
|
-
L: 'l'
|
|
31
|
-
};
|
|
32
|
-
const position = {
|
|
33
|
-
LEFT: 'left',
|
|
34
|
-
RIGHT: 'right',
|
|
35
|
-
CENTER: 'center'
|
|
36
|
-
};
|
|
37
|
-
const fontColor = {
|
|
38
|
-
NEUTRAL500: 'neutral500',
|
|
39
|
-
NEUTRAL700: 'neutral700'
|
|
40
|
-
};
|
|
41
|
-
const orientation = ['horizontal', 'vertical'];
|
|
42
|
-
const orientationVariants = {
|
|
43
|
-
HORIZONTAL: 'horizontal',
|
|
44
|
-
VERTICAL: 'vertical'
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
exports.CHECKBOX_VARIANT = CHECKBOX_VARIANT;
|
|
48
|
-
exports.COMBOBOX_VARIANT = COMBOBOX_VARIANT;
|
|
49
|
-
exports.checkboxVariants = checkboxVariants;
|
|
50
|
-
exports.comboBoxVariants = comboBoxVariants;
|
|
51
|
-
exports.dsBasicSizes = dsBasicSizes;
|
|
52
|
-
exports.fontColor = fontColor;
|
|
53
|
-
exports.iconColors = iconColors;
|
|
54
|
-
exports.iconSizes = iconSizes;
|
|
55
|
-
exports.orientation = orientation;
|
|
56
|
-
exports.orientationVariants = orientationVariants;
|
|
57
|
-
exports.position = position;
|
|
58
|
-
exports.sizeVariants = sizeVariants;
|
|
59
|
-
exports.sizes = sizes;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var web = require('react-spring/web');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.keys(web).forEach(function (k) {
|
|
10
|
-
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () { return web[k]; }
|
|
13
|
-
});
|
|
14
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var renderprops = require('react-spring/renderprops');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.keys(renderprops).forEach(function (k) {
|
|
10
|
-
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () { return renderprops[k]; }
|
|
13
|
-
});
|
|
14
|
-
});
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
|
-
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
9
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
|
-
require('core-js/modules/esnext.iterator.filter.js');
|
|
11
|
-
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
12
|
-
require('core-js/modules/esnext.iterator.for-each.js');
|
|
13
|
-
var React = require('react');
|
|
14
|
-
var DSPopover = require('@elliemae/ds-popper');
|
|
15
|
-
var dsUtilities = require('@elliemae/ds-utilities');
|
|
16
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
17
|
-
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
21
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
-
var DSPopover__default = /*#__PURE__*/_interopDefaultLegacy(DSPopover);
|
|
24
|
-
|
|
25
|
-
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; }
|
|
26
|
-
|
|
27
|
-
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; }
|
|
28
|
-
const ToolbarContext = /*#__PURE__*/React__default["default"].createContext();
|
|
29
|
-
const {
|
|
30
|
-
Provider
|
|
31
|
-
} = ToolbarContext;
|
|
32
|
-
|
|
33
|
-
const useScrollListener = (callback, dependencies) => {
|
|
34
|
-
React.useEffect(() => {
|
|
35
|
-
window.addEventListener('scroll', callback, true);
|
|
36
|
-
return () => {
|
|
37
|
-
window.removeEventListener('scroll', callback, true);
|
|
38
|
-
};
|
|
39
|
-
}, [dependencies]);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const noop = () => null;
|
|
43
|
-
|
|
44
|
-
function ToolbarProvider(_ref) {
|
|
45
|
-
let {
|
|
46
|
-
delay = 200,
|
|
47
|
-
children,
|
|
48
|
-
onHide = noop,
|
|
49
|
-
onShow = noop
|
|
50
|
-
} = _ref;
|
|
51
|
-
const showTimer = React.useRef();
|
|
52
|
-
const hideTimer = React.useRef();
|
|
53
|
-
const toolbarRef = React.useRef();
|
|
54
|
-
const [tooltipState, setTooltipState] = React.useState({});
|
|
55
|
-
|
|
56
|
-
const show = state => {
|
|
57
|
-
if (state.reference === tooltipState.reference) clearTimeout(hideTimer.current);
|
|
58
|
-
showTimer.current = setTimeout(() => setTooltipState(_objectSpread(_objectSpread({}, state), {}, {
|
|
59
|
-
visible: true
|
|
60
|
-
})), delay);
|
|
61
|
-
onShow();
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const hide = (e, force) => {
|
|
65
|
-
if (!force) clearTimeout(showTimer.current);
|
|
66
|
-
hideTimer.current = setTimeout(() => setTooltipState(prevState => _objectSpread(_objectSpread({}, prevState), {}, {
|
|
67
|
-
visible: false
|
|
68
|
-
})), 100);
|
|
69
|
-
onHide(tooltipState, e);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
useScrollListener(e => hide(e, true), tooltipState.visible);
|
|
73
|
-
dsUtilities.useOnClickOutside(toolbarRef, () => hide());
|
|
74
|
-
|
|
75
|
-
const keyDownHandler = e => {
|
|
76
|
-
if (e.key === 'Escape') {
|
|
77
|
-
hide(e);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
React.useEffect(() => {
|
|
82
|
-
window.addEventListener('keydown', keyDownHandler);
|
|
83
|
-
return () => {
|
|
84
|
-
window.removeEventListener('keydown', keyDownHandler);
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
const value = React.useMemo(() => ({
|
|
88
|
-
state: tooltipState,
|
|
89
|
-
show,
|
|
90
|
-
hide
|
|
91
|
-
}), [tooltipState.reference]);
|
|
92
|
-
return /*#__PURE__*/_jsx__default["default"](Provider, {
|
|
93
|
-
value: value
|
|
94
|
-
}, void 0, children, /*#__PURE__*/jsxRuntime.jsx(DSPopover__default["default"], _objectSpread(_objectSpread({
|
|
95
|
-
boundaries: "scrollParent"
|
|
96
|
-
}, tooltipState.options || {}), {}, {
|
|
97
|
-
content: tooltipState.renderer,
|
|
98
|
-
placement: "left",
|
|
99
|
-
referenceEl: tooltipState.reference,
|
|
100
|
-
renderer: _ref2 => {
|
|
101
|
-
let {
|
|
102
|
-
as: Component,
|
|
103
|
-
style,
|
|
104
|
-
children: Content
|
|
105
|
-
} = _ref2;
|
|
106
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
107
|
-
ref: toolbarRef,
|
|
108
|
-
onMouseEnter: e => show(tooltipState),
|
|
109
|
-
onMouseLeave: hide,
|
|
110
|
-
children: /*#__PURE__*/_jsx__default["default"](Component, {
|
|
111
|
-
style: style
|
|
112
|
-
}, void 0, Content)
|
|
113
|
-
});
|
|
114
|
-
},
|
|
115
|
-
style: tooltipState.style,
|
|
116
|
-
visible: tooltipState.visible
|
|
117
|
-
})));
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
var ToolbarProvider$1 = /*#__PURE__*/React__default["default"].memo(ToolbarProvider);
|
|
121
|
-
|
|
122
|
-
exports.ToolbarContext = ToolbarContext;
|
|
123
|
-
exports["default"] = ToolbarProvider$1;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
4
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
5
|
-
require('core-js/modules/esnext.iterator.for-each.js');
|
|
6
|
-
var dsUtilities = require('@elliemae/ds-utilities');
|
|
7
|
-
|
|
8
|
-
class VolatileRowsListener {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.observers = [];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
observe(listener) {
|
|
14
|
-
this.observers.push(listener);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
notify(nextRows) {
|
|
18
|
-
this.observers.forEach(observer => dsUtilities.safeCall(observer, nextRows));
|
|
19
|
-
this.observers = [];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
module.exports = VolatileRowsListener;
|