@elliemae/ds-shared 2.0.0-alpha.10 → 2.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/cjs/Animations/BaseAnimation.js +24 -20
  2. package/cjs/Animations/Grow.js +30 -26
  3. package/cjs/Animations/GrowRight.js +30 -26
  4. package/cjs/Animations/GrowVertical.js +1 -0
  5. package/cjs/CheckableGroup.js +32 -23
  6. package/cjs/DeferRenderAfterComputation.js +8 -6
  7. package/cjs/FocusGroup/FocusGrid.js +38 -31
  8. package/cjs/FocusGroup/FocusGroup.js +29 -11
  9. package/cjs/FocusGroup/FocusGroupManager.js +6 -11
  10. package/cjs/FocusGroup/focusGroupManagerHoc.js +7 -1
  11. package/cjs/FocusGroup/useFocusGroupItem.js +8 -2
  12. package/cjs/FocusGroup/utils/getNextCellPosition.js +10 -9
  13. package/cjs/GroupContext/Group.js +11 -4
  14. package/cjs/GroupContext/GroupItem.js +6 -3
  15. package/cjs/ScrollSync/ScrollSync.js +22 -21
  16. package/cjs/ScrollSync/ScrollSyncPane.js +14 -6
  17. package/cjs/ScrollSync/ScrollSyncProvider.js +12 -6
  18. package/cjs/createDataInstance/createInstancePlugin.js +6 -0
  19. package/cjs/createDataInstance/createInstanceRef.js +8 -0
  20. package/cjs/createDataInstance/utils.js +57 -25
  21. package/cjs/defer-render-hoc/index.js +10 -5
  22. package/cjs/toolbar/ToolbarProvider.js +31 -21
  23. package/cjs/useDataGrid/VolatileRowsListener.js +6 -8
  24. package/cjs/useDataGrid/initColumnDefinition.js +26 -18
  25. package/cjs/useDataGrid/useDataGrid.js +42 -34
  26. package/cjs/useDataList/recordIterator.js +4 -1
  27. package/cjs/useDataList/useDataList.js +18 -4
  28. package/cjs/utils.js +8 -1
  29. package/cjs/virtualization/AutoHeightList.js +10 -8
  30. package/cjs/virtualization/FluidHeightList.js +15 -7
  31. package/cjs/virtualization/index.js +7 -6
  32. package/esm/Animations/BaseAnimation.js +24 -20
  33. package/esm/Animations/Grow.js +30 -26
  34. package/esm/Animations/GrowRight.js +30 -26
  35. package/esm/Animations/GrowVertical.js +1 -0
  36. package/esm/CheckableGroup.js +29 -19
  37. package/esm/DeferRenderAfterComputation.js +8 -6
  38. package/esm/FocusGroup/FocusGrid.js +27 -19
  39. package/esm/FocusGroup/FocusGroup.js +26 -8
  40. package/esm/FocusGroup/FocusGroupManager.js +4 -8
  41. package/esm/FocusGroup/focusGroupManagerHoc.js +7 -1
  42. package/esm/FocusGroup/useFocusGroupItem.js +8 -2
  43. package/esm/FocusGroup/utils/getNextCellPosition.js +10 -9
  44. package/esm/GroupContext/Group.js +11 -4
  45. package/esm/GroupContext/GroupItem.js +6 -3
  46. package/esm/ScrollSync/ScrollSync.js +22 -20
  47. package/esm/ScrollSync/ScrollSyncPane.js +14 -6
  48. package/esm/ScrollSync/ScrollSyncProvider.js +12 -6
  49. package/esm/createDataInstance/createInstancePlugin.js +6 -0
  50. package/esm/createDataInstance/createInstanceRef.js +8 -0
  51. package/esm/createDataInstance/utils.js +57 -25
  52. package/esm/defer-render-hoc/index.js +10 -5
  53. package/esm/toolbar/ToolbarProvider.js +30 -20
  54. package/esm/useDataGrid/VolatileRowsListener.js +5 -3
  55. package/esm/useDataGrid/initColumnDefinition.js +12 -4
  56. package/esm/useDataGrid/useDataGrid.js +26 -16
  57. package/esm/useDataList/recordIterator.js +4 -1
  58. package/esm/useDataList/useDataList.js +17 -3
  59. package/esm/utils.js +8 -1
  60. package/esm/virtualization/AutoHeightList.js +6 -3
  61. package/esm/virtualization/FluidHeightList.js +14 -6
  62. package/esm/virtualization/index.js +7 -6
  63. package/package.json +8 -4
  64. package/types/toolbar/ToolbarProvider.d.ts +1 -1
  65. package/types/useDataGrid/initColumnDefinition.d.ts +4 -3
  66. package/cjs/package.json +0 -7
  67. package/esm/package.json +0 -7
@@ -4,10 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
+ require('core-js/modules/web.dom-collections.iterator.js');
7
8
  require('core-js/modules/es.string.replace.js');
9
+ require('core-js/modules/esnext.async-iterator.filter.js');
10
+ require('core-js/modules/esnext.iterator.constructor.js');
11
+ require('core-js/modules/esnext.iterator.filter.js');
12
+ require('core-js/modules/esnext.async-iterator.for-each.js');
13
+ require('core-js/modules/esnext.iterator.for-each.js');
8
14
  require('react');
9
15
  var uuid = require('uuid');
10
- var utils = require('@elliemae/ds-utilities/utils');
16
+ var dsUtilities = require('@elliemae/ds-utilities');
11
17
 
12
18
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
19
 
@@ -18,15 +24,16 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
18
24
 
19
25
  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
26
 
21
- const appendHeaderFormatter = utils.curry((formatter, column) => _objectSpread(_objectSpread({}, column), {}, {
27
+ const appendHeaderFormatter = dsUtilities.curry((formatter, column) => _objectSpread(_objectSpread({}, column), {}, {
22
28
  header: _objectSpread(_objectSpread({}, column.header), {}, {
23
- formatters: [...utils.get(column, 'header.formatters', []), formatter]
29
+ formatters: [...dsUtilities.get(column, 'header.formatters', []), formatter]
24
30
  })
25
31
  }));
26
- const appendCellFormatter = utils.curry((formatter, column, path = 'formatters') => {
27
- const nextColumn = utils.cloneDeep(column);
28
- const formatters = utils.get(nextColumn, ['cell', path], []);
29
- const scrollingFormatters = utils.get(nextColumn, 'cell.scrollingFormatters', []);
32
+ const appendCellFormatter = dsUtilities.curry(function (formatter, column) {
33
+ let path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'formatters';
34
+ const nextColumn = dsUtilities.cloneDeep(column);
35
+ const formatters = dsUtilities.get(nextColumn, ['cell', path], []);
36
+ const scrollingFormatters = dsUtilities.get(nextColumn, 'cell.scrollingFormatters', []);
30
37
 
31
38
  if (Array.isArray(formatter)) {
32
39
  if (formatter[1]) scrollingFormatters.push(formatter[1]);
@@ -36,8 +43,8 @@ const appendCellFormatter = utils.curry((formatter, column, path = 'formatters')
36
43
  scrollingFormatters.push(formatter);
37
44
  }
38
45
 
39
- utils.set(nextColumn, ['cell', path], formatters);
40
- utils.set(nextColumn, 'cell.scrollingFormatters', scrollingFormatters);
46
+ dsUtilities.set(nextColumn, ['cell', path], formatters);
47
+ dsUtilities.set(nextColumn, 'cell.scrollingFormatters', scrollingFormatters);
41
48
  return nextColumn;
42
49
  });
43
50
  const defaultColumnDefinitionOptions = {
@@ -46,18 +53,19 @@ const defaultColumnDefinitionOptions = {
46
53
  isUserColumn: true,
47
54
  visible: true
48
55
  };
49
- const mergeClassNameToColumnHeader = utils.curry((className, column) => {
50
- const headerProps = utils.get(column, ['header', 'props'], {});
56
+ const mergeClassNameToColumnHeader = dsUtilities.curry((className, column) => {
57
+ const headerProps = dsUtilities.get(column, ['header', 'props'], {});
51
58
  const headerClassName = headerProps.className || '';
52
59
  return _objectSpread(_objectSpread({}, column), {}, {
53
60
  header: _objectSpread(_objectSpread({}, column.header), {}, {
54
61
  props: _objectSpread(_objectSpread({}, headerProps), {}, {
55
- className: `${headerClassName} ${className}`
62
+ className: "".concat(headerClassName, " ").concat(className)
56
63
  })
57
64
  })
58
65
  });
59
66
  });
60
- function initColumnDefinition(options = {}) {
67
+ function initColumnDefinition() {
68
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
61
69
  // eslint-disable-next-line complexity
62
70
  return column => {
63
71
  // todo: clean this
@@ -89,13 +97,13 @@ function initColumnDefinition(options = {}) {
89
97
 
90
98
  column.header = _objectSpread(_objectSpread({}, column.header), {}, {
91
99
  label: column.label,
92
- formatters: [...utils.get(column, ['header', 'formatters'], [])],
100
+ formatters: [...dsUtilities.get(column, ['header', 'formatters'], [])],
93
101
  props: {
94
102
  style: column.headerStyle || {}
95
103
  }
96
104
  });
97
105
 
98
- if (useTextTruncation && !(utils.isFunction(column.customHeaderRenderer) || column.header.formatters.length)) {
106
+ if (useTextTruncation && !(dsUtilities.isFunction(column.customHeaderRenderer) || column.header.formatters.length)) {
99
107
  column.header.formatters.push(value => /*#__PURE__*/_jsx__default["default"]("span", {
100
108
  className: "cell-value"
101
109
  }, void 0, value));
@@ -104,14 +112,14 @@ function initColumnDefinition(options = {}) {
104
112
 
105
113
  column.cell = _objectSpread(_objectSpread({}, column.cell), {}, {
106
114
  transforms: [],
107
- formatters: [...utils.get(column, ['cell', 'formatters'], [])],
108
- scrollingFormatters: [...utils.get(column, ['cell', 'formatters'], [])],
115
+ formatters: [...dsUtilities.get(column, ['cell', 'formatters'], [])],
116
+ scrollingFormatters: [...dsUtilities.get(column, ['cell', 'formatters'], [])],
109
117
  props: {
110
118
  style: column.cellStyle || {}
111
119
  }
112
120
  });
113
121
 
114
- if (useTextTruncation && !(utils.isFunction(column.customRenderer) || column.cell.formatters.length)) {
122
+ if (useTextTruncation && !(dsUtilities.isFunction(column.customRenderer) || column.cell.formatters.length)) {
115
123
  column.cell.formatters.push(value => /*#__PURE__*/_jsx__default["default"]("span", {
116
124
  className: "cell-value",
117
125
  style: {
@@ -2,15 +2,22 @@
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
- var utils$1 = require('@elliemae/ds-utilities/utils');
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');
6
16
  var React = require('react');
7
17
  var uuid = require('uuid');
8
18
  var resolve = require('table-resolver');
9
- var useDerivedStateFromProps = require('@elliemae/ds-utilities/hooks/useDerivedStateFromProps');
10
- var usePrevious = require('@elliemae/ds-utilities/hooks/usePrevious');
11
- var system = require('@elliemae/ds-utilities/system');
12
19
  var initColumnDefinition = require('./initColumnDefinition.js');
13
- var utils$2 = require('../createDataInstance/utils.js');
20
+ var utils$1 = require('../createDataInstance/utils.js');
14
21
  var VolatileRowsListener = require('./VolatileRowsListener.js');
15
22
  var utils = require('../utils.js');
16
23
 
@@ -37,8 +44,6 @@ function _interopNamespace(e) {
37
44
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
38
45
  var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
39
46
  var resolve__namespace = /*#__PURE__*/_interopNamespace(resolve);
40
- var useDerivedStateFromProps__default = /*#__PURE__*/_interopDefaultLegacy(useDerivedStateFromProps);
41
- var usePrevious__default = /*#__PURE__*/_interopDefaultLegacy(usePrevious);
42
47
 
43
48
  const _excluded = ["uuid", "plugins", "rows", "columns", "renderers"];
44
49
 
@@ -73,15 +78,15 @@ function useDataGrid(_ref) {
73
78
 
74
79
  const [RowsObserver] = React.useState(() => new VolatileRowsListener()); // todo move this with rows composition
75
80
 
76
- const [originalRows, updateRows] = useDerivedStateFromProps__default["default"](rows, {
81
+ const [originalRows, updateRows] = dsUtilities.useDerivedStateFromProps(rows, {
77
82
  onUpdate: resolve__namespace.resolve({
78
83
  columns,
79
- method: extra => utils$1.compose(resolve__namespace.byFunction('valueTransformation')(extra), resolve__namespace.nested(extra))
84
+ method: extra => dsUtilities.compose(resolve__namespace.byFunction('valueTransformation')(extra), resolve__namespace.nested(extra))
80
85
  }),
81
86
  updateOnStateChange: true
82
87
  });
83
88
  instance.current = {
84
- decoratedRenderers: utils$1.cloneDeep(renderers),
89
+ decoratedRenderers: dsUtilities.cloneDeep(renderers),
85
90
  decoratedColumns: columns,
86
91
  columns,
87
92
  rows,
@@ -160,18 +165,21 @@ function useDataGrid(_ref) {
160
165
  });
161
166
  }, instance.current);
162
167
 
163
- const reduceHotKey = (nextInstance, {
164
- key,
165
- handler,
166
- options
167
- }) => _objectSpread(_objectSpread({}, nextInstance), {}, {
168
- hotKeys: _objectSpread(_objectSpread({}, nextInstance.hotKeys), {}, {
169
- [key]: {
170
- handler,
171
- options
172
- }
173
- })
174
- });
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
+ };
175
183
 
176
184
  instance.current = decorators.registerHotKeys.reduce((nextInstance, decorator) => {
177
185
  const hotKeys = decorator(nextInstance);
@@ -182,28 +190,28 @@ function useDataGrid(_ref) {
182
190
 
183
191
  return reduceHotKey(nextInstance, hotKeys);
184
192
  }, instance.current);
185
- instance.current.decoratedRenderers = utils$2.applyDecorators(instance.current.decoratedRenderers, decorators.decorateRenderers, instance.current);
193
+ instance.current.decoratedRenderers = utils$1.applyDecorators(instance.current.decoratedRenderers, decorators.decorateRenderers, instance.current);
186
194
  instance.current.decoratedColumns = React.useMemo(() => {
187
- const visibleColumns = utils$1.cloneDeep(columns).filter(column => typeof column.visible === 'undefined' || column.visible);
188
- return visibleColumns.length ? utils$2.decorateColumns(visibleColumns, decorators, instance.current) : [];
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) : [];
189
197
  }, [columns]);
190
- instance.current.getBodyProps = utils$2.reducePropsGetter(decorators.getBodyProps, instance.current);
191
- instance.current.getHeaderProps = utils$2.reducePropsGetter(decorators.getHeaderProps, instance.current);
192
- instance.current.getRowProps = utils$2.reducePropsGetter(decorators.getRowProps, instance.current);
193
- instance.current.getHeaderRowProps = utils$2.reducePropsGetter(decorators.getHeaderRowProps, instance.current);
194
- instance.current.getTableProps = utils$2.reducePropsGetter(decorators.getTableProps, instance.current);
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);
195
203
  instance.current.composedRows = decorators.composeRows.reduce((nextRows, getter) => getter(nextRows, instance.current), instance.current.composedRows);
196
204
  RowsObserver.notify(instance.current.composedRows);
197
205
  const currentShouldRefocus = instance.current.shouldRefocus.current;
198
- const prevState = usePrevious__default["default"](instance.current.state);
206
+ const prevState = dsUtilities.usePrevious(instance.current.state);
199
207
 
200
- if (utils$1.isObject(currentShouldRefocus) && currentShouldRefocus.forced) {
208
+ if (dsUtilities.isObject(currentShouldRefocus) && currentShouldRefocus.forced) {
201
209
  instance.current.shouldRefocus.current = currentShouldRefocus.value;
202
210
  } else {
203
- instance.current.shouldRefocus.current = !utils$1.isEqual(prevState, instance.current.state);
211
+ instance.current.shouldRefocus.current = !dsUtilities.isEqual(prevState, instance.current.state);
204
212
  }
205
213
 
206
- if (props.instanceRef) system.setRef(props.instanceRef, instance.current);
214
+ if (props.instanceRef) dsUtilities.setRef(props.instanceRef, instance.current);
207
215
  return _objectSpread(_objectSpread({}, instance.current), {}, {
208
216
  decorators
209
217
  });
@@ -6,7 +6,10 @@ const defaultStrategy = () => {
6
6
  throw Error('Implement an iterator strategy for record iterator');
7
7
  };
8
8
 
9
- function recordIterator(records, strategy = defaultStrategy, decorators = [], instance) {
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;
10
13
  const nextRows = [];
11
14
  strategy({
12
15
  data: records,
@@ -4,8 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
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');
7
15
  var React = require('react');
8
- var system = require('@elliemae/ds-utilities/system');
16
+ var dsUtilities = require('@elliemae/ds-utilities');
9
17
  var get = require('lodash/get');
10
18
  var utils = require('../createDataInstance/utils.js');
11
19
  var recordIterator = require('./recordIterator.js');
@@ -22,8 +30,14 @@ const _excluded = ["data", "plugins", "renderers", "itemRenderer", "customDecora
22
30
  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; }
23
31
 
24
32
  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; }
25
- const getItemLabel = (record, nameKey = 'name') => get__default["default"](record, ['data', nameKey]);
26
- const getItemChildren = (record, childrenKey = 'children') => get__default["default"](record, ['data', childrenKey]);
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]);
36
+ };
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]);
40
+ };
27
41
  const listRenderers = {
28
42
  list: 'ul',
29
43
  item: 'li'
@@ -79,7 +93,7 @@ function useDataList(_ref) {
79
93
  nextRecords = decorators.records.reduce((nextRows, getter) => getter(nextRows, instance.current), nextRecords);
80
94
  return nextRecords;
81
95
  });
82
- if (props.instanceRef) system.setRef(props.instanceRef, instance.current);
96
+ if (props.instanceRef) dsUtilities.setRef(props.instanceRef, instance.current);
83
97
  return instance.current;
84
98
  }
85
99
 
package/cjs/utils.js CHANGED
@@ -3,6 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
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.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');
6
13
 
7
14
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
15
 
@@ -69,7 +76,7 @@ const getTotalScroll = elem => {
69
76
  };
70
77
  };
71
78
  const getTransformProps = (x, y) => ({
72
- transform: `translate(${x}px, ${y}px)`
79
+ transform: "translate(".concat(x, "px, ").concat(y, "px)")
73
80
  });
74
81
  const listWithChildren = (list, childrenProp) => list.map(item => _objectSpread(_objectSpread({}, item), {}, {
75
82
  [childrenProp]: item[childrenProp] ? listWithChildren(item[childrenProp], childrenProp) : []
@@ -2,20 +2,22 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
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');
5
10
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
11
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
12
  var React = require('react');
8
13
  var reactWindow = require('react-window');
9
- var utils = require('@elliemae/ds-utilities/utils');
10
- var system = require('@elliemae/ds-utilities/system');
11
- var useWindowScrollerList = require('@elliemae/ds-utilities/hooks/useWindowScrollerList');
14
+ var dsUtilities = require('@elliemae/ds-utilities');
12
15
  var jsxRuntime = require('react/jsx-runtime');
13
16
 
14
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
18
 
16
19
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
17
20
  var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
18
- var useWindowScrollerList__default = /*#__PURE__*/_interopDefaultLegacy(useWindowScrollerList);
19
21
 
20
22
  const _excluded = ["itemCount", "className", "innerRef", "itemData", "itemKey", "itemSize", "outerRef", "component"];
21
23
 
@@ -37,20 +39,20 @@ const AutoHeightList = /*#__PURE__*/React.forwardRef((_ref, ref) => {
37
39
 
38
40
  const listRef = React.useRef();
39
41
  const outerListRef = React.useRef();
40
- useWindowScrollerList__default["default"]({
42
+ dsUtilities.useWindowScrollerList({
41
43
  listInstance: listRef,
42
44
  outerListRef
43
45
  });
44
46
  return /*#__PURE__*/jsxRuntime.jsx(ListComponent, _objectSpread(_objectSpread({}, otherProps), {}, {
45
- ref: system.mergeRefs(ref, listRef),
46
- className: utils.cx(className, 'window-scroller-override'),
47
+ ref: dsUtilities.mergeRefs(ref, listRef),
48
+ className: dsUtilities.cx(className, 'window-scroller-override'),
47
49
  height: window.innerHeight,
48
50
  innerRef: innerRef,
49
51
  itemCount: itemCount,
50
52
  itemData: itemData,
51
53
  itemKey: itemKey,
52
54
  itemSize: itemSize,
53
- outerRef: system.mergeRefs(outerListRef, outerRef),
55
+ outerRef: dsUtilities.mergeRefs(outerListRef, outerRef),
54
56
  overscanCount: 10,
55
57
  useIsScrolling: true
56
58
  }));
@@ -2,6 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
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');
5
10
  var _jsx = require('@babel/runtime/helpers/jsx');
6
11
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
12
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
@@ -29,13 +34,16 @@ const FluidHeightList = /*#__PURE__*/React.forwardRef((_ref, ref) => {
29
34
 
30
35
  return /*#__PURE__*/_jsx__default["default"](AutoSizer__default["default"], {
31
36
  disableWidth: true
32
- }, void 0, ({
33
- height: fluidHeight
34
- }) => /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread(_objectSpread({}, props), {}, {
35
- ref: ref,
36
- height: fluidHeight - 32 // taking in count the margins of the list
37
-
38
- })));
37
+ }, void 0, _ref2 => {
38
+ let {
39
+ height: fluidHeight
40
+ } = _ref2;
41
+ return /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread(_objectSpread({}, props), {}, {
42
+ ref: ref,
43
+ height: fluidHeight - 32 // taking in count the margins of the list
44
+
45
+ }));
46
+ });
39
47
  });
40
48
 
41
49
  exports.FluidHeightList = FluidHeightList;
@@ -5,12 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var FluidHeightList = require('./FluidHeightList.js');
6
6
  var AutoHeightList = require('./AutoHeightList.js');
7
7
 
8
- function getVirtualListComponent({
9
- component: Component,
10
- fluid,
11
- height,
12
- autoHeight
13
- }) {
8
+ function getVirtualListComponent(_ref) {
9
+ let {
10
+ component: Component,
11
+ fluid,
12
+ height,
13
+ autoHeight
14
+ } = _ref;
14
15
  if (autoHeight) return AutoHeightList.AutoHeightList;
15
16
  if (fluid) return FluidHeightList.FluidHeightList;
16
17
  return Component;
@@ -1,26 +1,30 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import 'react';
3
4
  import { Transition } from 'react-spring/renderprops';
4
5
 
5
- const BaseAnimation = ({
6
- keys = undefined,
7
- items = [],
8
- duration = 100,
9
- enter = {},
10
- from = {},
11
- leave = {},
12
- onRest = () => null,
13
- children
14
- }) => /*#__PURE__*/_jsx(Transition, {
15
- config: {
16
- duration
17
- },
18
- enter: enter,
19
- from: from,
20
- items: items,
21
- keys: keys,
22
- leave: leave,
23
- onRest: onRest
24
- }, void 0, children);
6
+ const BaseAnimation = _ref => {
7
+ let {
8
+ keys = undefined,
9
+ items = [],
10
+ duration = 100,
11
+ enter = {},
12
+ from = {},
13
+ leave = {},
14
+ onRest = () => null,
15
+ children
16
+ } = _ref;
17
+ return /*#__PURE__*/_jsx(Transition, {
18
+ config: {
19
+ duration
20
+ },
21
+ enter: enter,
22
+ from: from,
23
+ items: items,
24
+ keys: keys,
25
+ leave: leave,
26
+ onRest: onRest
27
+ }, void 0, children);
28
+ };
25
29
 
26
30
  export { BaseAnimation as default };
@@ -1,32 +1,36 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import 'react';
3
4
  import BaseAnimation from './BaseAnimation.js';
4
5
 
5
- const Grow = ({
6
- keys = undefined,
7
- duration,
8
- items = undefined,
9
- from = 0,
10
- to = 1,
11
- children,
12
- onRest = () => null
13
- }) => /*#__PURE__*/_jsx(BaseAnimation, {
14
- duration: duration,
15
- enter: {
16
- opacity: 1,
17
- transform: `scale(${to})`
18
- },
19
- from: {
20
- opacity: 0,
21
- transform: `scale(${from})`
22
- },
23
- items: items,
24
- keys: keys,
25
- leave: {
26
- opacity: 0,
27
- transform: `scale(${from})`
28
- },
29
- onRest: onRest
30
- }, void 0, children);
6
+ const Grow = _ref => {
7
+ let {
8
+ keys = undefined,
9
+ duration,
10
+ items = undefined,
11
+ from = 0,
12
+ to = 1,
13
+ children,
14
+ onRest = () => null
15
+ } = _ref;
16
+ return /*#__PURE__*/_jsx(BaseAnimation, {
17
+ duration: duration,
18
+ enter: {
19
+ opacity: 1,
20
+ transform: "scale(".concat(to, ")")
21
+ },
22
+ from: {
23
+ opacity: 0,
24
+ transform: "scale(".concat(from, ")")
25
+ },
26
+ items: items,
27
+ keys: keys,
28
+ leave: {
29
+ opacity: 0,
30
+ transform: "scale(".concat(from, ")")
31
+ },
32
+ onRest: onRest
33
+ }, void 0, children);
34
+ };
31
35
 
32
36
  export { Grow as default };
@@ -1,32 +1,36 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import 'react';
3
4
  import BaseAnimation from './BaseAnimation.js';
4
5
 
5
- const GrowRight = ({
6
- keys = undefined,
7
- items = undefined,
8
- duration = 200,
9
- from = 0,
10
- to = 1,
11
- children,
12
- onRest = () => null
13
- }) => /*#__PURE__*/_jsx(BaseAnimation, {
14
- duration: duration,
15
- enter: {
16
- opacity: `${to}`,
17
- transform: 'translateX(0px)'
18
- },
19
- from: {
20
- opacity: `${from}`,
21
- transform: 'translateX(100%)'
22
- },
23
- items: items,
24
- keys: keys,
25
- leave: {
26
- opacity: `${from}`,
27
- transform: 'translateX(100%)'
28
- },
29
- onRest: onRest
30
- }, void 0, children);
6
+ const GrowRight = _ref => {
7
+ let {
8
+ keys = undefined,
9
+ items = undefined,
10
+ duration = 200,
11
+ from = 0,
12
+ to = 1,
13
+ children,
14
+ onRest = () => null
15
+ } = _ref;
16
+ return /*#__PURE__*/_jsx(BaseAnimation, {
17
+ duration: duration,
18
+ enter: {
19
+ opacity: "".concat(to),
20
+ transform: 'translateX(0px)'
21
+ },
22
+ from: {
23
+ opacity: "".concat(from),
24
+ transform: 'translateX(100%)'
25
+ },
26
+ items: items,
27
+ keys: keys,
28
+ leave: {
29
+ opacity: "".concat(from),
30
+ transform: 'translateX(100%)'
31
+ },
32
+ onRest: onRest
33
+ }, void 0, children);
34
+ };
31
35
 
32
36
  export { GrowRight as default };
@@ -1,3 +1,4 @@
1
1
  import '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import 'react';
3
4
  import 'react-spring/renderprops';