@elliemae/ds-shared 2.2.0-alpha.4 → 3.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/cjs/Animations/BaseAnimation.js +35 -55
  2. package/cjs/Animations/Grow.js +41 -54
  3. package/cjs/Animations/GrowRight.js +41 -63
  4. package/cjs/Animations/GrowVertical.js +7 -47
  5. package/cjs/CheckableGroup.js +65 -67
  6. package/cjs/DeferRenderAfterComputation.js +24 -48
  7. package/cjs/FocusGroup/FocusGrid.js +143 -108
  8. package/cjs/FocusGroup/FocusGroup.js +147 -88
  9. package/cjs/FocusGroup/FocusGroupContext.js +11 -38
  10. package/cjs/FocusGroup/FocusGroupManager.js +47 -56
  11. package/cjs/FocusGroup/focusGroupManagerHoc.js +42 -52
  12. package/cjs/FocusGroup/index.js +21 -47
  13. package/cjs/FocusGroup/useFocusGroupItem.js +51 -59
  14. package/cjs/FocusGroup/utils/getNextCellPosition.js +27 -47
  15. package/cjs/GroupContext/Group.js +73 -64
  16. package/cjs/GroupContext/GroupContext.js +13 -36
  17. package/cjs/GroupContext/GroupItem.js +21 -39
  18. package/cjs/GroupContext/index.js +13 -39
  19. package/cjs/ScrollSync/ScrollSync.js +75 -60
  20. package/cjs/ScrollSync/ScrollSyncPane.js +60 -52
  21. package/cjs/ScrollSync/ScrollSyncProvider.js +50 -103
  22. package/cjs/ScrollSync/index.js +11 -37
  23. package/cjs/ScrollSync/useScrollSync.js +7 -38
  24. package/cjs/constants.js +46 -65
  25. package/cjs/createDataInstance/createInstancePlugin.js +29 -41
  26. package/cjs/createDataInstance/createInstanceRef.js +71 -66
  27. package/cjs/createDataInstance/utils.js +100 -76
  28. package/cjs/defer-render-hoc/index.js +41 -48
  29. package/cjs/dimsum.config.js +6 -38
  30. package/cjs/index.js +17 -40
  31. package/cjs/prop-types.js +49 -106
  32. package/cjs/react-spring/index.js +14 -28
  33. package/cjs/react-spring/renderprops.js +14 -28
  34. package/cjs/toolbar/ToolbarProvider.js +94 -82
  35. package/cjs/useDataGrid/VolatileRowsListener.js +13 -38
  36. package/cjs/useDataGrid/index.js +7 -36
  37. package/cjs/useDataGrid/initColumnDefinition.js +110 -105
  38. package/cjs/useDataGrid/useDataGrid.js +148 -122
  39. package/cjs/useDataList/index.js +7 -36
  40. package/cjs/useDataList/recordIterator.js +18 -42
  41. package/cjs/useDataList/useDataList.js +83 -74
  42. package/cjs/utils.js +80 -71
  43. package/cjs/virtualization/AutoHeightList.js +54 -62
  44. package/cjs/virtualization/FluidHeightList.js +48 -42
  45. package/cjs/virtualization/index.js +20 -48
  46. package/esm/Animations/BaseAnimation.js +29 -26
  47. package/esm/Animations/Grow.js +35 -25
  48. package/esm/Animations/GrowRight.js +35 -34
  49. package/esm/Animations/GrowVertical.js +4 -29
  50. package/esm/CheckableGroup.js +52 -35
  51. package/esm/DeferRenderAfterComputation.js +15 -16
  52. package/esm/FocusGroup/FocusGrid.js +117 -64
  53. package/esm/FocusGroup/FocusGroup.js +137 -56
  54. package/esm/FocusGroup/FocusGroupContext.js +5 -9
  55. package/esm/FocusGroup/FocusGroupManager.js +38 -24
  56. package/esm/FocusGroup/focusGroupManagerHoc.js +36 -24
  57. package/esm/FocusGroup/index.js +6 -18
  58. package/esm/FocusGroup/useFocusGroupItem.js +40 -28
  59. package/esm/FocusGroup/utils/getNextCellPosition.js +25 -18
  60. package/esm/GroupContext/Group.js +66 -34
  61. package/esm/GroupContext/GroupContext.js +5 -7
  62. package/esm/GroupContext/GroupItem.js +15 -10
  63. package/esm/GroupContext/index.js +3 -10
  64. package/esm/ScrollSync/ScrollSync.js +64 -30
  65. package/esm/ScrollSync/ScrollSyncPane.js +52 -22
  66. package/esm/ScrollSync/ScrollSyncProvider.js +42 -74
  67. package/esm/ScrollSync/index.js +2 -8
  68. package/esm/ScrollSync/useScrollSync.js +5 -9
  69. package/esm/constants.js +28 -37
  70. package/esm/createDataInstance/createInstancePlugin.js +23 -12
  71. package/esm/createDataInstance/createInstanceRef.js +59 -36
  72. package/esm/createDataInstance/utils.js +85 -48
  73. package/esm/defer-render-hoc/index.js +31 -17
  74. package/esm/dimsum.config.js +4 -9
  75. package/esm/index.js +5 -11
  76. package/esm/prop-types.js +31 -75
  77. package/esm/react-spring/index.js +1 -3
  78. package/esm/react-spring/renderprops.js +1 -3
  79. package/esm/toolbar/ToolbarProvider.js +74 -45
  80. package/esm/useDataGrid/VolatileRowsListener.js +11 -9
  81. package/esm/useDataGrid/index.js +1 -7
  82. package/esm/useDataGrid/initColumnDefinition.js +94 -78
  83. package/esm/useDataGrid/useDataGrid.js +99 -82
  84. package/esm/useDataList/index.js +1 -7
  85. package/esm/useDataList/recordIterator.js +14 -13
  86. package/esm/useDataList/useDataList.js +67 -44
  87. package/esm/utils.js +59 -42
  88. package/esm/virtualization/AutoHeightList.js +40 -28
  89. package/esm/virtualization/FluidHeightList.js +38 -14
  90. package/esm/virtualization/index.js +16 -19
  91. package/package.json +3 -3
  92. package/types/Animations/BaseAnimation.d.ts +0 -1
  93. package/types/Animations/Grow.d.ts +0 -1
  94. package/types/Animations/GrowRight.d.ts +0 -1
  95. package/types/CheckableGroup.d.ts +0 -1
  96. package/types/DeferRenderAfterComputation.d.ts +2 -3
  97. package/types/FocusGroup/FocusGrid.d.ts +3 -5
  98. package/types/FocusGroup/FocusGroup.d.ts +1 -3
  99. package/types/FocusGroup/FocusGroupContext.d.ts +2 -3
  100. package/types/FocusGroup/FocusGroupManager.d.ts +1 -3
  101. package/types/FocusGroup/focusGroupManagerHoc.d.ts +1 -3
  102. package/types/FocusGroup/index.d.ts +6 -6
  103. package/types/FocusGroup/useFocusGroupItem.d.ts +1 -3
  104. package/types/FocusGroup/utils/getNextCellPosition.d.ts +1 -3
  105. package/types/GroupContext/Group.d.ts +0 -1
  106. package/types/GroupContext/GroupItem.d.ts +0 -1
  107. package/types/GroupContext/index.d.ts +3 -3
  108. package/types/ScrollSync/ScrollSync.d.ts +2 -4
  109. package/types/ScrollSync/ScrollSyncPane.d.ts +2 -2
  110. package/types/ScrollSync/index.d.ts +2 -2
  111. package/types/ScrollSync/useScrollSync.d.ts +5 -6
  112. package/types/createDataInstance/createInstancePlugin.d.ts +1 -2
  113. package/types/createDataInstance/createInstanceRef.d.ts +1 -3
  114. package/types/dimsum.config.d.ts +2 -3
  115. package/types/index.d.ts +2 -2
  116. package/types/toolbar/ToolbarProvider.d.ts +8 -3
  117. package/types/useDataGrid/VolatileRowsListener.d.ts +1 -3
  118. package/types/useDataGrid/index.d.ts +1 -1
  119. package/types/useDataGrid/initColumnDefinition.d.ts +1 -2
  120. package/types/useDataGrid/useDataGrid.d.ts +2 -3
  121. package/types/useDataList/index.d.ts +1 -1
  122. package/types/useDataList/useDataList.d.ts +2 -3
  123. package/cjs/Animations/BaseAnimation.js.map +0 -7
  124. package/cjs/Animations/Grow.js.map +0 -7
  125. package/cjs/Animations/GrowRight.js.map +0 -7
  126. package/cjs/Animations/GrowVertical.js.map +0 -7
  127. package/cjs/CheckableGroup.js.map +0 -7
  128. package/cjs/DeferRenderAfterComputation.js.map +0 -7
  129. package/cjs/FocusGroup/FocusGrid.js.map +0 -7
  130. package/cjs/FocusGroup/FocusGroup.js.map +0 -7
  131. package/cjs/FocusGroup/FocusGroupContext.js.map +0 -7
  132. package/cjs/FocusGroup/FocusGroupManager.js.map +0 -7
  133. package/cjs/FocusGroup/focusGroupManagerHoc.js.map +0 -7
  134. package/cjs/FocusGroup/index.js.map +0 -7
  135. package/cjs/FocusGroup/useFocusGroupItem.js.map +0 -7
  136. package/cjs/FocusGroup/utils/getNextCellPosition.js.map +0 -7
  137. package/cjs/GroupContext/Group.js.map +0 -7
  138. package/cjs/GroupContext/GroupContext.js.map +0 -7
  139. package/cjs/GroupContext/GroupItem.js.map +0 -7
  140. package/cjs/GroupContext/index.js.map +0 -7
  141. package/cjs/ScrollSync/ScrollSync.js.map +0 -7
  142. package/cjs/ScrollSync/ScrollSyncPane.js.map +0 -7
  143. package/cjs/ScrollSync/ScrollSyncProvider.js.map +0 -7
  144. package/cjs/ScrollSync/index.js.map +0 -7
  145. package/cjs/ScrollSync/useScrollSync.js.map +0 -7
  146. package/cjs/constants.js.map +0 -7
  147. package/cjs/createDataInstance/createInstancePlugin.js.map +0 -7
  148. package/cjs/createDataInstance/createInstanceRef.js.map +0 -7
  149. package/cjs/createDataInstance/utils.js.map +0 -7
  150. package/cjs/defer-render-hoc/index.js.map +0 -7
  151. package/cjs/dimsum.config.js.map +0 -7
  152. package/cjs/index.js.map +0 -7
  153. package/cjs/prop-types.js.map +0 -7
  154. package/cjs/react-spring/index.js.map +0 -7
  155. package/cjs/react-spring/renderprops.js.map +0 -7
  156. package/cjs/toolbar/ToolbarProvider.js.map +0 -7
  157. package/cjs/useDataGrid/VolatileRowsListener.js.map +0 -7
  158. package/cjs/useDataGrid/index.js.map +0 -7
  159. package/cjs/useDataGrid/initColumnDefinition.js.map +0 -7
  160. package/cjs/useDataGrid/useDataGrid.js.map +0 -7
  161. package/cjs/useDataList/index.js.map +0 -7
  162. package/cjs/useDataList/recordIterator.js.map +0 -7
  163. package/cjs/useDataList/useDataList.js.map +0 -7
  164. package/cjs/utils.js.map +0 -7
  165. package/cjs/virtualization/AutoHeightList.js.map +0 -7
  166. package/cjs/virtualization/FluidHeightList.js.map +0 -7
  167. package/cjs/virtualization/index.js.map +0 -7
  168. package/esm/Animations/BaseAnimation.js.map +0 -7
  169. package/esm/Animations/Grow.js.map +0 -7
  170. package/esm/Animations/GrowRight.js.map +0 -7
  171. package/esm/Animations/GrowVertical.js.map +0 -7
  172. package/esm/CheckableGroup.js.map +0 -7
  173. package/esm/DeferRenderAfterComputation.js.map +0 -7
  174. package/esm/FocusGroup/FocusGrid.js.map +0 -7
  175. package/esm/FocusGroup/FocusGroup.js.map +0 -7
  176. package/esm/FocusGroup/FocusGroupContext.js.map +0 -7
  177. package/esm/FocusGroup/FocusGroupManager.js.map +0 -7
  178. package/esm/FocusGroup/focusGroupManagerHoc.js.map +0 -7
  179. package/esm/FocusGroup/index.js.map +0 -7
  180. package/esm/FocusGroup/useFocusGroupItem.js.map +0 -7
  181. package/esm/FocusGroup/utils/getNextCellPosition.js.map +0 -7
  182. package/esm/GroupContext/Group.js.map +0 -7
  183. package/esm/GroupContext/GroupContext.js.map +0 -7
  184. package/esm/GroupContext/GroupItem.js.map +0 -7
  185. package/esm/GroupContext/index.js.map +0 -7
  186. package/esm/ScrollSync/ScrollSync.js.map +0 -7
  187. package/esm/ScrollSync/ScrollSyncPane.js.map +0 -7
  188. package/esm/ScrollSync/ScrollSyncProvider.js.map +0 -7
  189. package/esm/ScrollSync/index.js.map +0 -7
  190. package/esm/ScrollSync/useScrollSync.js.map +0 -7
  191. package/esm/constants.js.map +0 -7
  192. package/esm/createDataInstance/createInstancePlugin.js.map +0 -7
  193. package/esm/createDataInstance/createInstanceRef.js.map +0 -7
  194. package/esm/createDataInstance/utils.js.map +0 -7
  195. package/esm/defer-render-hoc/index.js.map +0 -7
  196. package/esm/dimsum.config.js.map +0 -7
  197. package/esm/index.js.map +0 -7
  198. package/esm/prop-types.js.map +0 -7
  199. package/esm/react-spring/index.js.map +0 -7
  200. package/esm/react-spring/renderprops.js.map +0 -7
  201. package/esm/toolbar/ToolbarProvider.js.map +0 -7
  202. package/esm/useDataGrid/VolatileRowsListener.js.map +0 -7
  203. package/esm/useDataGrid/index.js.map +0 -7
  204. package/esm/useDataGrid/initColumnDefinition.js.map +0 -7
  205. package/esm/useDataGrid/useDataGrid.js.map +0 -7
  206. package/esm/useDataList/index.js.map +0 -7
  207. package/esm/useDataList/recordIterator.js.map +0 -7
  208. package/esm/useDataList/useDataList.js.map +0 -7
  209. package/esm/utils.js.map +0 -7
  210. package/esm/virtualization/AutoHeightList.js.map +0 -7
  211. package/esm/virtualization/FluidHeightList.js.map +0 -7
  212. package/esm/virtualization/index.js.map +0 -7
package/cjs/utils.js CHANGED
@@ -1,95 +1,89 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var utils_exports = {};
29
- __export(utils_exports, {
30
- closest: () => closest,
31
- getAllNonEmptyNodesIds: () => getAllNonEmptyNodesIds,
32
- getOffsetRect: () => getOffsetRect,
33
- getTotalScroll: () => getTotalScroll,
34
- getTransformProps: () => getTransformProps,
35
- isArray: () => isArray,
36
- isDefined: () => isDefined,
37
- isFunction: () => isFunction,
38
- isInternetExplorer: () => isInternetExplorer,
39
- isNumber: () => isNumber,
40
- isString: () => isString,
41
- isUndefined: () => isUndefined,
42
- listWithChildren: () => listWithChildren,
43
- objectType: () => objectType
44
- });
45
- var React = __toESM(require("react"));
46
- const objectType = (obj) => Object.prototype.toString.call(obj).slice(8, -1);
47
- const isDefined = (param) => typeof param !== "undefined";
48
- const isUndefined = (param) => typeof param === "undefined";
49
- const isFunction = (param) => typeof param === "function";
50
- const isNumber = (param) => typeof param === "number" && !isNaN(param);
51
- const isString = (str) => objectType(str) === "String";
52
- const isArray = (arr) => objectType(arr) === "Array";
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.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');
13
+
14
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
+
16
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
17
+
18
+ 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; }
19
+
20
+ 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; }
21
+
22
+ /* eslint-disable no-cond-assign */
23
+ const objectType = obj => Object.prototype.toString.call(obj).slice(8, -1);
24
+ const isDefined = param => typeof param !== 'undefined';
25
+ const isUndefined = param => typeof param === 'undefined';
26
+ const isFunction = param => typeof param === 'function';
27
+ const isNumber = param => typeof param === 'number' && !isNaN(param); // eslint-disable-line
28
+
29
+ const isString = str => objectType(str) === 'String';
30
+ const isArray = arr => objectType(arr) === 'Array';
53
31
  const closest = (target, selector) => {
32
+ // closest(e.target, '.field')
54
33
  while (target) {
55
- if (target.matches && target.matches(selector))
56
- return target;
57
- if (target.msMatchesSelector && target.msMatchesSelector(selector))
58
- return target;
34
+ // eslint-disable-line
35
+ if (target.matches && target.matches(selector)) return target;
36
+ if (target.msMatchesSelector && target.msMatchesSelector(selector)) return target; // eslint-disable-next-line no-param-reassign
37
+
59
38
  target = target.parentNode;
60
39
  }
40
+
61
41
  return null;
62
42
  };
63
- const getOffsetRect = (elem) => {
43
+ const getOffsetRect = elem => {
44
+ // (1)
64
45
  const box = elem.getBoundingClientRect();
65
- const { body, documentElement } = document;
46
+ const {
47
+ body,
48
+ documentElement
49
+ } = document; // (2)
50
+
66
51
  const scrollTop = window.pageYOffset || documentElement.scrollTop || body.scrollTop;
67
- const scrollLeft = window.pageXOffset || documentElement.scrollLeft || body.scrollLeft;
52
+ const scrollLeft = window.pageXOffset || documentElement.scrollLeft || body.scrollLeft; // (3)
53
+
68
54
  const clientTop = documentElement.clientTop || body.clientTop || 0;
69
- const clientLeft = documentElement.clientLeft || body.clientLeft || 0;
55
+ const clientLeft = documentElement.clientLeft || body.clientLeft || 0; // (4)
56
+
70
57
  const top = box.top + scrollTop - clientTop;
71
58
  const left = box.left + scrollLeft - clientLeft;
72
- return { top: Math.round(top), left: Math.round(left) };
59
+ return {
60
+ top: Math.round(top),
61
+ left: Math.round(left)
62
+ };
73
63
  };
74
- const getTotalScroll = (elem) => {
64
+ const getTotalScroll = elem => {
75
65
  let top = 0;
76
- let left = 0;
66
+ let left = 0; // eslint-disable-next-line no-param-reassign
67
+
77
68
  while (elem = elem.parentNode) {
78
69
  top += elem.scrollTop || 0;
79
70
  left += elem.scrollLeft || 0;
80
71
  }
81
- return { top, left };
72
+
73
+ return {
74
+ top,
75
+ left
76
+ };
82
77
  };
83
78
  const getTransformProps = (x, y) => ({
84
- transform: `translate(${x}px, ${y}px)`
79
+ transform: "translate(".concat(x, "px, ").concat(y, "px)")
85
80
  });
86
- const listWithChildren = (list, childrenProp) => list.map((item) => ({
87
- ...item,
81
+ const listWithChildren = (list, childrenProp) => list.map(item => _objectSpread(_objectSpread({}, item), {}, {
88
82
  [childrenProp]: item[childrenProp] ? listWithChildren(item[childrenProp], childrenProp) : []
89
83
  }));
90
84
  const getAllNonEmptyNodesIds = (items, childrenProp) => {
91
85
  let childrenIds = [];
92
- const ids = items.filter((item) => item[childrenProp].length).map((item) => {
86
+ const ids = items.filter(item => item[childrenProp].length).map(item => {
93
87
  childrenIds = childrenIds.concat(getAllNonEmptyNodesIds(item[childrenProp], childrenProp));
94
88
  return item.id;
95
89
  });
@@ -97,11 +91,26 @@ const getAllNonEmptyNodesIds = (items, childrenProp) => {
97
91
  };
98
92
  const isInternetExplorer = () => {
99
93
  const ua = window.navigator.userAgent;
100
- const msie = ua.indexOf("MSIE ");
94
+ const msie = ua.indexOf('MSIE '); // If Internet Explorer, return version number
95
+
101
96
  if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv:11\./)) {
102
97
  return true;
103
98
  }
99
+
104
100
  return false;
105
101
  };
106
- module.exports = __toCommonJS(utils_exports);
107
- //# sourceMappingURL=utils.js.map
102
+
103
+ exports.closest = closest;
104
+ exports.getAllNonEmptyNodesIds = getAllNonEmptyNodesIds;
105
+ exports.getOffsetRect = getOffsetRect;
106
+ exports.getTotalScroll = getTotalScroll;
107
+ exports.getTransformProps = getTransformProps;
108
+ exports.isArray = isArray;
109
+ exports.isDefined = isDefined;
110
+ exports.isFunction = isFunction;
111
+ exports.isInternetExplorer = isInternetExplorer;
112
+ exports.isNumber = isNumber;
113
+ exports.isString = isString;
114
+ exports.isUndefined = isUndefined;
115
+ exports.listWithChildren = listWithChildren;
116
+ exports.objectType = objectType;
@@ -1,69 +1,61 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var AutoHeightList_exports = {};
29
- __export(AutoHeightList_exports, {
30
- AutoHeightList: () => AutoHeightList
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_react_window = require("react-window");
35
- var import_ds_utilities = require("@elliemae/ds-utilities");
36
- const AutoHeightList = (0, import_react.forwardRef)(({
37
- itemCount,
38
- className,
39
- innerRef,
40
- itemData,
41
- itemKey,
42
- itemSize,
43
- outerRef,
44
- component: ListComponent = import_react_window.FixedSizeList,
45
- ...otherProps
46
- }, ref) => {
47
- const listRef = (0, import_react.useRef)();
48
- const outerListRef = (0, import_react.useRef)();
49
- (0, import_ds_utilities.useWindowScrollerList)({
50
- listInstance: listRef,
51
- outerListRef
52
- });
53
- return /* @__PURE__ */ import_react.default.createElement(ListComponent, {
54
- ...otherProps,
55
- ref: (0, import_ds_utilities.mergeRefs)(ref, listRef),
56
- className: (0, import_ds_utilities.cx)(className, "window-scroller-override"),
57
- height: window.innerHeight,
58
- innerRef,
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
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');
10
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
11
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
12
+ var React = require('react');
13
+ var reactWindow = require('react-window');
14
+ var dsUtilities = require('@elliemae/ds-utilities');
15
+ var jsxRuntime = require('react/jsx-runtime');
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
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
21
+
22
+ const _excluded = ["itemCount", "className", "innerRef", "itemData", "itemKey", "itemSize", "outerRef", "component"];
23
+
24
+ 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; }
25
+
26
+ 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; }
27
+ const AutoHeightList = /*#__PURE__*/React.forwardRef((_ref, ref) => {
28
+ let {
59
29
  itemCount,
30
+ className,
31
+ innerRef,
60
32
  itemData,
61
33
  itemKey,
62
34
  itemSize,
63
- outerRef: (0, import_ds_utilities.mergeRefs)(outerListRef, outerRef),
35
+ outerRef,
36
+ component: ListComponent = reactWindow.FixedSizeList
37
+ } = _ref,
38
+ otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
39
+
40
+ const listRef = React.useRef();
41
+ const outerListRef = React.useRef();
42
+ dsUtilities.useWindowScrollerList({
43
+ listInstance: listRef,
44
+ outerListRef
45
+ });
46
+ return /*#__PURE__*/jsxRuntime.jsx(ListComponent, _objectSpread(_objectSpread({}, otherProps), {}, {
47
+ ref: dsUtilities.mergeRefs(ref, listRef),
48
+ className: dsUtilities.cx(className, 'window-scroller-override'),
49
+ height: window.innerHeight,
50
+ innerRef: innerRef,
51
+ itemCount: itemCount,
52
+ itemData: itemData,
53
+ itemKey: itemKey,
54
+ itemSize: itemSize,
55
+ outerRef: dsUtilities.mergeRefs(outerListRef, outerRef),
64
56
  overscanCount: 10,
65
57
  useIsScrolling: true
66
- });
58
+ }));
67
59
  });
68
- module.exports = __toCommonJS(AutoHeightList_exports);
69
- //# sourceMappingURL=AutoHeightList.js.map
60
+
61
+ exports.AutoHeightList = AutoHeightList;
@@ -1,43 +1,49 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var FluidHeightList_exports = {};
29
- __export(FluidHeightList_exports, {
30
- FluidHeightList: () => FluidHeightList
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
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');
10
+ var _jsx = require('@babel/runtime/helpers/jsx');
11
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
13
+ var React = require('react');
14
+ var AutoSizer = require('react-virtualized-auto-sizer');
15
+ var jsxRuntime = require('react/jsx-runtime');
16
+
17
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
+
19
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
20
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
21
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
22
+ var AutoSizer__default = /*#__PURE__*/_interopDefaultLegacy(AutoSizer);
23
+
24
+ const _excluded = ["component"];
25
+
26
+ 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; }
27
+
28
+ 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; }
29
+ const FluidHeightList = /*#__PURE__*/React.forwardRef((_ref, ref) => {
30
+ let {
31
+ component: Component
32
+ } = _ref,
33
+ props = _objectWithoutProperties__default["default"](_ref, _excluded);
34
+
35
+ return /*#__PURE__*/_jsx__default["default"](AutoSizer__default["default"], {
36
+ disableWidth: true
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
+ });
31
47
  });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_react_virtualized_auto_sizer = __toESM(require("react-virtualized-auto-sizer"));
35
- const FluidHeightList = (0, import_react.forwardRef)(({ component: Component, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(import_react_virtualized_auto_sizer.default, {
36
- disableWidth: true
37
- }, ({ height: fluidHeight }) => /* @__PURE__ */ import_react.default.createElement(Component, {
38
- ...props,
39
- ref,
40
- height: fluidHeight - 32
41
- })));
42
- module.exports = __toCommonJS(FluidHeightList_exports);
43
- //# sourceMappingURL=FluidHeightList.js.map
48
+
49
+ exports.FluidHeightList = FluidHeightList;
@@ -1,50 +1,22 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var virtualization_exports = {};
29
- __export(virtualization_exports, {
30
- AutoHeightList: () => import_AutoHeightList.AutoHeightList,
31
- FluidHeightList: () => import_FluidHeightList.FluidHeightList,
32
- getVirtualListComponent: () => getVirtualListComponent
33
- });
34
- var React = __toESM(require("react"));
35
- var import_FluidHeightList = require("./FluidHeightList");
36
- var import_AutoHeightList = require("./AutoHeightList");
37
- function getVirtualListComponent({
38
- component: Component,
39
- fluid,
40
- height,
41
- autoHeight
42
- }) {
43
- if (autoHeight)
44
- return import_AutoHeightList.AutoHeightList;
45
- if (fluid)
46
- return import_FluidHeightList.FluidHeightList;
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var FluidHeightList = require('./FluidHeightList.js');
6
+ var AutoHeightList = require('./AutoHeightList.js');
7
+
8
+ function getVirtualListComponent(_ref) {
9
+ let {
10
+ component: Component,
11
+ fluid,
12
+ height,
13
+ autoHeight
14
+ } = _ref;
15
+ if (autoHeight) return AutoHeightList.AutoHeightList;
16
+ if (fluid) return FluidHeightList.FluidHeightList;
47
17
  return Component;
48
18
  }
49
- module.exports = __toCommonJS(virtualization_exports);
50
- //# sourceMappingURL=index.js.map
19
+
20
+ exports.FluidHeightList = FluidHeightList.FluidHeightList;
21
+ exports.AutoHeightList = AutoHeightList.AutoHeightList;
22
+ exports.getVirtualListComponent = getVirtualListComponent;
@@ -1,27 +1,30 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { Transition } from "react-spring/renderprops";
4
- const BaseAnimation = ({
5
- keys = void 0,
6
- items = [],
7
- duration = 100,
8
- enter = {},
9
- from = {},
10
- leave = {},
11
- onRest = () => null,
12
- children
13
- }) => /* @__PURE__ */ React2.createElement(Transition, {
14
- config: { duration },
15
- enter,
16
- from,
17
- items,
18
- keys,
19
- leave,
20
- onRest
21
- }, children);
22
- var BaseAnimation_default = BaseAnimation;
23
- export {
24
- BaseAnimation,
25
- BaseAnimation_default as default
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
+ import 'react';
4
+ import { Transition } from 'react-spring/renderprops';
5
+
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);
26
28
  };
27
- //# sourceMappingURL=BaseAnimation.js.map
29
+
30
+ export { BaseAnimation as default };
@@ -1,26 +1,36 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { BaseAnimation } from "./BaseAnimation";
4
- const Grow = ({
5
- keys = void 0,
6
- duration,
7
- items = void 0,
8
- from = 0,
9
- to = 1,
10
- children,
11
- onRest = () => null
12
- }) => /* @__PURE__ */ React2.createElement(BaseAnimation, {
13
- duration,
14
- enter: { opacity: 1, transform: `scale(${to})` },
15
- from: { opacity: 0, transform: `scale(${from})` },
16
- items,
17
- keys,
18
- leave: { opacity: 0, transform: `scale(${from})` },
19
- onRest
20
- }, children);
21
- var Grow_default = Grow;
22
- export {
23
- Grow,
24
- Grow_default as default
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
+ import 'react';
4
+ import BaseAnimation from './BaseAnimation.js';
5
+
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);
25
34
  };
26
- //# sourceMappingURL=Grow.js.map
35
+
36
+ export { Grow as default };