@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
@@ -1,24 +1,33 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
+ import 'core-js/modules/esnext.async-iterator.map.js';
4
+ import 'core-js/modules/esnext.iterator.map.js';
5
+ import 'core-js/modules/esnext.async-iterator.filter.js';
6
+ import 'core-js/modules/esnext.iterator.constructor.js';
7
+ import 'core-js/modules/esnext.iterator.filter.js';
8
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
9
+ import 'core-js/modules/esnext.iterator.for-each.js';
2
10
  import React, { cloneElement } from 'react';
3
- import { runAll, addOrRemove } from '@elliemae/ds-utilities/utils';
4
- import useDerivedStateFromProps from '@elliemae/ds-utilities/hooks/useDerivedStateFromProps';
11
+ import { useDerivedStateFromProps, runAll, addOrRemove } from '@elliemae/ds-utilities';
5
12
 
6
13
  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; }
7
14
 
8
15
  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(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; }
9
- function useCheckableGroup({
10
- children,
11
- active: activeProp,
12
- multi,
13
- onCheck = () => null
14
- }) {
16
+ function useCheckableGroup(_ref) {
17
+ let {
18
+ children,
19
+ active: activeProp,
20
+ multi,
21
+ onCheck = () => null
22
+ } = _ref;
15
23
  const [active, setActive] = useDerivedStateFromProps(activeProp);
16
24
 
17
- const handleCheck = ({
18
- target: {
19
- value
20
- }
21
- }, item) => {
25
+ const handleCheck = (_ref2, item) => {
26
+ let {
27
+ target: {
28
+ value
29
+ }
30
+ } = _ref2;
22
31
  setActive(prevActive => {
23
32
  const nextActive = multi ? addOrRemove(prevActive, value) : value;
24
33
  onCheck(nextActive, item);
@@ -38,12 +47,13 @@ function useCheckableGroup({
38
47
  });
39
48
  }
40
49
 
41
- function CheckableGroup({
42
- active = [],
43
- multi = false,
44
- // checkbox or radio
45
- children
46
- }) {
50
+ function CheckableGroup(_ref3) {
51
+ let {
52
+ active = [],
53
+ multi = false,
54
+ // checkbox or radio
55
+ children
56
+ } = _ref3;
47
57
  return useCheckableGroup({
48
58
  active,
49
59
  multi,
@@ -1,12 +1,14 @@
1
+ import 'core-js/modules/web.dom-collections.iterator.js';
1
2
  import { useState, useEffect } from 'react';
2
3
  import raf from 'raf';
3
4
 
4
- function DeferRenderAfterComputation({
5
- children,
6
- resolve,
7
- fallback,
8
- timeout = 2000
9
- }) {
5
+ function DeferRenderAfterComputation(_ref) {
6
+ let {
7
+ children,
8
+ resolve,
9
+ fallback,
10
+ timeout = 2000
11
+ } = _ref;
10
12
  const [shouldRender, setShouldRender] = useState(false);
11
13
  useEffect(() => {
12
14
  // eslint-disable-next-line max-nested-callbacks
@@ -1,9 +1,12 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
+ import 'core-js/modules/esnext.iterator.constructor.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import 'core-js/modules/esnext.async-iterator.filter.js';
7
+ import 'core-js/modules/esnext.iterator.filter.js';
3
8
  import React, { useRef, useEffect, useMemo, createContext } from 'react';
4
- import { get, runAll, isFunction } from '@elliemae/ds-utilities/utils';
5
- import useHotkeys from '@elliemae/ds-utilities/hooks/useHotkeys';
6
- import { mergeRefs } from '@elliemae/ds-utilities/system';
9
+ import { mergeRefs, get, runAll, isFunction, useHotkeys } from '@elliemae/ds-utilities';
7
10
  import getNextCellPosition from './utils/getNextCellPosition.js';
8
11
 
9
12
  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; }
@@ -16,10 +19,11 @@ const {
16
19
 
17
20
  const preventDefault = e => e.preventDefault();
18
21
 
19
- function registerHotKeysHooks(hotKeys, {
20
- focusedRow,
21
- focusedCell
22
- }) {
22
+ function registerHotKeysHooks(hotKeys, _ref) {
23
+ let {
24
+ focusedRow,
25
+ focusedCell
26
+ } = _ref;
23
27
  Object.keys(hotKeys).forEach(key => {
24
28
  const {
25
29
  handler,
@@ -40,14 +44,15 @@ function registerHotKeysHooks(hotKeys, {
40
44
  } // eslint-disable-next-line max-statements
41
45
 
42
46
 
43
- function FocusGridProvider({
44
- shouldWrapRows = false,
45
- shouldWrapCells = false,
46
- shouldRefocus = true,
47
- children,
48
- keyBindings,
49
- hotKeys
50
- }) {
47
+ function FocusGridProvider(_ref2) {
48
+ let {
49
+ shouldWrapRows = false,
50
+ shouldWrapCells = false,
51
+ shouldRefocus = true,
52
+ children,
53
+ keyBindings,
54
+ hotKeys
55
+ } = _ref2;
51
56
  const focusedRow = useRef();
52
57
  const focusedCell = useRef();
53
58
  const grid = useRef([]);
@@ -57,10 +62,13 @@ function FocusGridProvider({
57
62
  innerRef: mergeRefs(child.props.innerRef, containerRef)
58
63
  });
59
64
 
60
- const getNode = ({
61
- rowIndex,
62
- cellIndex
63
- }) => get(grid.current, [rowIndex, cellIndex]);
65
+ const getNode = _ref3 => {
66
+ let {
67
+ rowIndex,
68
+ cellIndex
69
+ } = _ref3;
70
+ return get(grid.current, [rowIndex, cellIndex]);
71
+ };
64
72
 
65
73
  const register = (node, rowIndex, columnIndex) => {
66
74
  if (!node) return;
@@ -1,5 +1,13 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
1
3
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import { get, isFunction } from '@elliemae/ds-utilities/utils';
4
+ import 'core-js/modules/web.dom-collections.iterator.js';
5
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
6
+ import 'core-js/modules/esnext.iterator.constructor.js';
7
+ import 'core-js/modules/esnext.iterator.for-each.js';
8
+ import 'core-js/modules/esnext.async-iterator.map.js';
9
+ import 'core-js/modules/esnext.iterator.map.js';
10
+ import { get, isFunction } from '@elliemae/ds-utilities';
3
11
  import hotkeys from 'hotkeys-js';
4
12
 
5
13
  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; }
@@ -9,14 +17,22 @@ const defaultOptions = {
9
17
  orientation: 'vertical'
10
18
  };
11
19
 
12
- const safeCallAction = (e, fun, ...args) => {
20
+ const safeCallAction = function (e, fun) {
13
21
  if (isFunction(fun)) {
14
22
  e.preventDefault();
23
+
24
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
25
+ args[_key - 2] = arguments[_key];
26
+ }
27
+
15
28
  fun(...args);
16
29
  }
17
30
  };
18
31
 
19
- const registerHotkeys = (hotKeys = {}, params, getContainer = () => document) => {
32
+ const registerHotkeys = function () {
33
+ let hotKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
34
+ let params = arguments.length > 1 ? arguments[1] : undefined;
35
+ let getContainer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => document;
20
36
  Object.keys(hotKeys).forEach(hotkey => {
21
37
  const {
22
38
  options,
@@ -37,7 +53,8 @@ const registerHotkeys = (hotKeys = {}, params, getContainer = () => document) =>
37
53
  });
38
54
  };
39
55
 
40
- const unregisterHotKeys = (hotKeys = {}) => {
56
+ const unregisterHotKeys = function () {
57
+ let hotKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
41
58
  Object.keys(hotKeys).forEach(hotkey => {
42
59
  hotkeys.unbind(hotkey);
43
60
  });
@@ -46,9 +63,9 @@ const unregisterHotKeys = (hotKeys = {}) => {
46
63
  const noop = () => null;
47
64
 
48
65
  class FocusGroup {
49
- constructor(options = {}) {
50
- _defineProperty(this, "items", []);
51
-
66
+ constructor() {
67
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
68
+ this.items = [];
52
69
  this.options = _objectSpread(_objectSpread({}, defaultOptions), options);
53
70
  const {
54
71
  orientation
@@ -120,7 +137,8 @@ class FocusGroup {
120
137
  return actions.map(action => typeof action === 'string' ? safeCallAction(e, this.mapActions[action]) : safeCallAction(e, action));
121
138
  }
122
139
 
123
- register(node, props = {}) {
140
+ register(node) {
141
+ let props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
124
142
  const afterIndex = this.items.findIndex(item => item.compareDocumentPosition(node) === Node.DOCUMENT_POSITION_PRECEDING);
125
143
  node.specialOnFocus = props.onFocus || noop;
126
144
  node.specialOnBlur = props.onBlur || noop;
@@ -1,7 +1,6 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
2
  import { Component } from 'react';
4
- import { isFunction } from '@elliemae/ds-utilities/utils';
3
+ import { isFunction } from '@elliemae/ds-utilities';
5
4
  import FocusGroup from './FocusGroup.js';
6
5
  import FocusGroupContext from './FocusGroupContext.js';
7
6
 
@@ -10,9 +9,7 @@ const noop = () => null;
10
9
  class FocusGroupProvider extends Component {
11
10
  constructor(props) {
12
11
  super(props);
13
-
14
- _defineProperty(this, "activated", false);
15
-
12
+ this.activated = false;
16
13
  this.focusGroup = new FocusGroup(props);
17
14
  props.onFocusGroupSet(this);
18
15
  this.actions = {
@@ -100,8 +97,7 @@ class FocusGroupProvider extends Component {
100
97
  }
101
98
 
102
99
  }
103
-
104
- _defineProperty(FocusGroupProvider, "defaultProps", {
100
+ FocusGroupProvider.defaultProps = {
105
101
  exitWhenNoPrevious: false,
106
102
  exitWhenNoNext: false,
107
103
  keyBindings: {},
@@ -110,6 +106,6 @@ _defineProperty(FocusGroupProvider, "defaultProps", {
110
106
  onFocusPreviousGroup: noop,
111
107
  onFocusNextGroup: noop,
112
108
  onFocusGroupSet: noop
113
- });
109
+ };
114
110
 
115
111
  export { FocusGroupProvider as default };
@@ -1,3 +1,8 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
7
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
8
  import 'react';
@@ -9,7 +14,8 @@ const _excluded = ["onExitFocusGroup", "onFocusPrevGroup", "focusKeyBindings"];
9
14
  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; }
10
15
 
11
16
  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(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; }
12
- function FocusGroupHoc(WrappedComponent, options = {}) {
17
+ function FocusGroupHoc(WrappedComponent) {
18
+ let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13
19
  return _ref => {
14
20
  let {
15
21
  onExitFocusGroup,
@@ -4,7 +4,10 @@ import FocusGroupContext from './FocusGroupContext.js';
4
4
 
5
5
  const _excluded = ["register", "unregister"],
6
6
  _excluded2 = ["register", "unregister"];
7
- function useFocusGroupItem(ref = {}, props) {
7
+ function useFocusGroupItem() {
8
+ let ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9
+ let props = arguments.length > 1 ? arguments[1] : undefined;
10
+
8
11
  const _ref = useContext(FocusGroupContext) || {},
9
12
  {
10
13
  register,
@@ -22,7 +25,10 @@ function useFocusGroupItem(ref = {}, props) {
22
25
  if (!register) return {};
23
26
  return otherActions;
24
27
  }
25
- const useFocusGroupWithState = (ref = {}, props) => {
28
+ const useFocusGroupWithState = function () {
29
+ let ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
30
+ let props = arguments.length > 1 ? arguments[1] : undefined;
31
+
26
32
  const _ref2 = useContext(FocusGroupContext) || {},
27
33
  {
28
34
  register,
@@ -1,13 +1,14 @@
1
1
  // eslint-disable-next-line max-statements
2
- function getNextCellPosition({
3
- grid,
4
- currentRow = 0,
5
- currentCell = 0,
6
- directionY,
7
- directionX,
8
- shouldWrapCells,
9
- shouldWrapRows
10
- }) {
2
+ function getNextCellPosition(_ref) {
3
+ let {
4
+ grid,
5
+ currentRow = 0,
6
+ currentCell = 0,
7
+ directionY,
8
+ directionX,
9
+ shouldWrapCells,
10
+ shouldWrapRows
11
+ } = _ref;
11
12
  let nextRow = currentRow + directionY;
12
13
  let nextCell = currentCell + directionX;
13
14
  const rowCount = grid.length;
@@ -1,4 +1,5 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import { Component } from 'react';
3
4
  import { GroupContext } from './GroupContext.js';
4
5
 
@@ -59,9 +60,10 @@ class Group extends Component {
59
60
  };
60
61
  }
61
62
 
62
- static getDerivedStateFromProps(nextProps, {
63
- prevValue
64
- }) {
63
+ static getDerivedStateFromProps(nextProps, _ref) {
64
+ let {
65
+ prevValue
66
+ } = _ref;
65
67
  if (nextProps.activeValue === prevValue) return null;
66
68
  return {
67
69
  activeValue: nextProps.activeValue,
@@ -69,7 +71,7 @@ class Group extends Component {
69
71
  };
70
72
  }
71
73
 
72
- handleChange(e, ...rest) {
74
+ handleChange(e) {
73
75
  const {
74
76
  multiple,
75
77
  onChange
@@ -90,6 +92,11 @@ class Group extends Component {
90
92
  this.setState({
91
93
  activeValue: newValue
92
94
  });
95
+
96
+ for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
97
+ rest[_key - 1] = arguments[_key];
98
+ }
99
+
93
100
  if (onChange) onChange(newValue, ...rest);
94
101
  }
95
102
 
@@ -6,8 +6,11 @@ const {
6
6
  Consumer
7
7
  } = GroupContext;
8
8
 
9
- const GroupItem = ({
10
- render
11
- }) => /*#__PURE__*/_jsx(Consumer, {}, void 0, context => render(context));
9
+ const GroupItem = _ref => {
10
+ let {
11
+ render
12
+ } = _ref;
13
+ return /*#__PURE__*/_jsx(Consumer, {}, void 0, context => render(context));
14
+ };
12
15
 
13
16
  export { GroupItem as default };
@@ -1,5 +1,9 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
3
+ import 'core-js/modules/esnext.iterator.constructor.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
5
+ import 'core-js/modules/esnext.async-iterator.find.js';
6
+ import 'core-js/modules/esnext.iterator.find.js';
3
7
  import React, { Component } from 'react';
4
8
 
5
9
  const ScrollSyncContext = /*#__PURE__*/React.createContext();
@@ -9,10 +13,9 @@ const {
9
13
  class ScrollSync extends Component {
10
14
  constructor(props) {
11
15
  super(props);
16
+ this.panes = {};
12
17
 
13
- _defineProperty(this, "panes", {});
14
-
15
- _defineProperty(this, "registerPane", (node, groups) => {
18
+ this.registerPane = (node, groups) => {
16
19
  groups.forEach(group => {
17
20
  if (!this.panes[group]) {
18
21
  this.panes[group] = [];
@@ -25,36 +28,36 @@ class ScrollSync extends Component {
25
28
  this.panes[group].push(node);
26
29
  });
27
30
  this.addEvents(node, groups);
28
- });
31
+ };
29
32
 
30
- _defineProperty(this, "unregisterPane", (node, groups) => {
33
+ this.unregisterPane = (node, groups) => {
31
34
  groups.forEach(group => {
32
35
  if (this.findPane(node, group)) {
33
36
  this.removeEvents(node);
34
37
  this.panes[group].splice(this.panes[group].indexOf(node), 1);
35
38
  }
36
39
  });
37
- });
40
+ };
38
41
 
39
- _defineProperty(this, "addEvents", (node, groups) => {
42
+ this.addEvents = (node, groups) => {
40
43
  /* For some reason element.addEventListener doesnt work with document.body */
41
44
  node.onscroll = this.handlePaneScroll.bind(this, node, groups); // eslint-disable-line
42
- });
45
+ };
43
46
 
44
- _defineProperty(this, "removeEvents", node => {
47
+ this.removeEvents = node => {
45
48
  /* For some reason element.removeEventListener doesnt work with document.body */
46
49
  node.onscroll = null; // eslint-disable-line
47
- });
50
+ };
48
51
 
49
- _defineProperty(this, "findPane", (node, group) => {
52
+ this.findPane = (node, group) => {
50
53
  if (!this.panes[group]) {
51
54
  return false;
52
55
  }
53
56
 
54
57
  return this.panes[group].find(pane => pane === node);
55
- });
58
+ };
56
59
 
57
- _defineProperty(this, "handlePaneScroll", (node, groups, e) => {
60
+ this.handlePaneScroll = (node, groups, e) => {
58
61
  const {
59
62
  enabled
60
63
  } = this.props;
@@ -63,9 +66,9 @@ class ScrollSync extends Component {
63
66
  window.requestAnimationFrame(() => {
64
67
  this.syncScrollPositions(node, groups);
65
68
  });
66
- });
69
+ };
67
70
 
68
- _defineProperty(this, "syncScrollPositions", (scrolledPane, groups) => {
71
+ this.syncScrollPositions = (scrolledPane, groups) => {
69
72
  groups.forEach(group => {
70
73
  this.panes[group].forEach(pane => {
71
74
  /* For all panes beside the currently scrolling one */
@@ -81,7 +84,7 @@ class ScrollSync extends Component {
81
84
  }
82
85
  });
83
86
  });
84
- });
87
+ };
85
88
 
86
89
  this.syncContext = {
87
90
  registerPane: this.registerPane,
@@ -130,12 +133,11 @@ class ScrollSync extends Component {
130
133
  }
131
134
 
132
135
  }
133
-
134
- _defineProperty(ScrollSync, "defaultProps", {
136
+ ScrollSync.defaultProps = {
135
137
  proportional: true,
136
138
  vertical: true,
137
139
  horizontal: true,
138
140
  enabled: true
139
- });
141
+ };
140
142
 
141
143
  export { ScrollSyncContext, ScrollSync as default };
@@ -1,5 +1,14 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
4
+ import 'core-js/modules/esnext.async-iterator.constructor.js';
5
+ import 'core-js/modules/esnext.async-iterator.to-array.js';
6
+ import 'core-js/modules/esnext.iterator.constructor.js';
7
+ import 'core-js/modules/esnext.iterator.to-array.js';
8
+ import 'core-js/modules/esnext.async-iterator.filter.js';
9
+ import 'core-js/modules/esnext.iterator.filter.js';
10
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
11
+ import 'core-js/modules/esnext.iterator.for-each.js';
3
12
  import { Component } from 'react';
4
13
  import { ScrollSyncContext } from './ScrollSync.js';
5
14
  import { jsx } from 'react/jsx-runtime';
@@ -9,10 +18,10 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
9
18
  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(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; }
10
19
 
11
20
  class ScrollSyncPane extends Component {
12
- constructor(...args) {
13
- super(...args);
21
+ constructor() {
22
+ super(...arguments);
14
23
 
15
- _defineProperty(this, "toArray", groups => [].concat(groups));
24
+ this.toArray = groups => [].concat(groups);
16
25
  }
17
26
 
18
27
  componentWillUnmount() {
@@ -54,11 +63,10 @@ class ScrollSyncPane extends Component {
54
63
 
55
64
  }
56
65
 
57
- _defineProperty(ScrollSyncPane, "defaultProps", {
66
+ ScrollSyncPane.defaultProps = {
58
67
  group: 'default',
59
68
  enabled: true
60
- });
61
-
69
+ };
62
70
  var ScrollSyncPane$1 = (props => /*#__PURE__*/_jsx(ScrollSyncContext.Consumer, {}, void 0, context => /*#__PURE__*/jsx(ScrollSyncPane, _objectSpread(_objectSpread({}, props), {}, {
63
71
  syncContext: context
64
72
  }))));
@@ -1,4 +1,9 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
3
+ import 'core-js/modules/esnext.iterator.constructor.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
5
+ import 'core-js/modules/esnext.async-iterator.find.js';
6
+ import 'core-js/modules/esnext.iterator.find.js';
2
7
  import React from 'react';
3
8
  import raf from 'raf';
4
9
 
@@ -7,12 +12,13 @@ const {
7
12
  Provider
8
13
  } = ScrollSyncContext;
9
14
 
10
- function ScrollSyncProvider({
11
- enabled,
12
- horizontal,
13
- vertical,
14
- children
15
- }) {
15
+ function ScrollSyncProvider(_ref) {
16
+ let {
17
+ enabled,
18
+ horizontal,
19
+ vertical,
20
+ children
21
+ } = _ref;
16
22
  useRef();
17
23
 
18
24
  raf((scrolledPane, pane) => {
@@ -1,4 +1,10 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
1
3
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.constructor.js';
6
+ import 'core-js/modules/esnext.iterator.for-each.js';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
8
 
3
9
  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; }
4
10
 
@@ -1,5 +1,13 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
1
3
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
4
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
5
+ import 'core-js/modules/web.dom-collections.iterator.js';
6
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
7
+ import 'core-js/modules/esnext.iterator.constructor.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
9
+ import 'core-js/modules/esnext.async-iterator.reduce.js';
10
+ import 'core-js/modules/esnext.iterator.reduce.js';
3
11
  import { v4 } from 'uuid';
4
12
  import { useRef, useState, useMemo } from 'react';
5
13
  import { orderBy } from 'lodash';