@elliemae/ds-utilities 2.3.1 → 3.0.0-alpha.3

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 (208) hide show
  1. package/dist/cjs/capitalize.js +35 -0
  2. package/dist/cjs/capitalize.js.map +7 -0
  3. package/dist/cjs/compose.js +45 -0
  4. package/dist/cjs/compose.js.map +7 -0
  5. package/dist/cjs/getComponentFromProps.js +57 -0
  6. package/dist/cjs/getComponentFromProps.js.map +7 -0
  7. package/dist/cjs/hooks/index.js +73 -0
  8. package/dist/cjs/hooks/index.js.map +7 -0
  9. package/dist/cjs/hooks/useCancellableDelayedCallback.js +51 -0
  10. package/dist/cjs/hooks/useCancellableDelayedCallback.js.map +7 -0
  11. package/dist/cjs/hooks/useDerivedStateFromProps.js +67 -0
  12. package/dist/cjs/hooks/useDerivedStateFromProps.js.map +7 -0
  13. package/dist/cjs/hooks/useExecutionTimer.js +50 -0
  14. package/dist/cjs/hooks/useExecutionTimer.js.map +7 -0
  15. package/dist/cjs/hooks/useExpandState.js +137 -0
  16. package/dist/cjs/hooks/useExpandState.js.map +7 -0
  17. package/dist/cjs/hooks/useFocusTrap.js +49 -0
  18. package/dist/cjs/hooks/useFocusTrap.js.map +7 -0
  19. package/dist/cjs/hooks/useHotkeys.js +45 -0
  20. package/dist/cjs/hooks/useHotkeys.js.map +7 -0
  21. package/dist/cjs/hooks/useHoverHandlersDelay.js +58 -0
  22. package/dist/cjs/hooks/useHoverHandlersDelay.js.map +7 -0
  23. package/dist/cjs/hooks/useIsShowingEllipsis.js +58 -0
  24. package/dist/cjs/hooks/useIsShowingEllipsis.js.map +7 -0
  25. package/dist/cjs/hooks/useOnElementResize.js +55 -0
  26. package/dist/cjs/hooks/useOnElementResize.js.map +7 -0
  27. package/dist/cjs/hooks/useParentElement.js +43 -0
  28. package/dist/cjs/hooks/useParentElement.js.map +7 -0
  29. package/dist/cjs/hooks/usePrevious.js +44 -0
  30. package/dist/cjs/hooks/usePrevious.js.map +7 -0
  31. package/dist/cjs/hooks/useResizeObserver.js +60 -0
  32. package/dist/cjs/hooks/useResizeObserver.js.map +7 -0
  33. package/dist/cjs/hooks/useSetRef.js +42 -0
  34. package/dist/cjs/hooks/useSetRef.js.map +7 -0
  35. package/dist/cjs/hooks/useShouldRecalculate.js +44 -0
  36. package/dist/cjs/hooks/useShouldRecalculate.js.map +7 -0
  37. package/dist/cjs/hooks/useWindowScrollerList.js +83 -0
  38. package/dist/cjs/hooks/useWindowScrollerList.js.map +7 -0
  39. package/dist/cjs/hooks/useWindowSize.js +57 -0
  40. package/dist/cjs/hooks/useWindowSize.js.map +7 -0
  41. package/dist/cjs/index.js +146 -0
  42. package/dist/cjs/index.js.map +7 -0
  43. package/dist/cjs/onClickHandlerForNonInteractiveElements.js +49 -0
  44. package/dist/cjs/onClickHandlerForNonInteractiveElements.js.map +7 -0
  45. package/dist/cjs/operators.js +68 -0
  46. package/dist/cjs/operators.js.map +7 -0
  47. package/dist/cjs/platform.js +37 -0
  48. package/dist/cjs/platform.js.map +7 -0
  49. package/dist/cjs/reactTypesUtility.js +58 -0
  50. package/dist/cjs/reactTypesUtility.js.map +7 -0
  51. package/dist/cjs/scrollingTimer.js +46 -0
  52. package/dist/cjs/scrollingTimer.js.map +7 -0
  53. package/dist/cjs/system.js +60 -0
  54. package/dist/cjs/system.js.map +7 -0
  55. package/dist/cjs/timeUtils.js +43 -0
  56. package/dist/cjs/timeUtils.js.map +7 -0
  57. package/dist/cjs/utils.js +143 -0
  58. package/dist/cjs/utils.js.map +7 -0
  59. package/dist/cjs/validations.js +57 -0
  60. package/dist/cjs/validations.js.map +7 -0
  61. package/dist/esm/capitalize.js +6 -0
  62. package/dist/esm/capitalize.js.map +7 -0
  63. package/dist/esm/compose.js +16 -0
  64. package/dist/esm/compose.js.map +7 -0
  65. package/dist/esm/getComponentFromProps.js +30 -0
  66. package/dist/esm/getComponentFromProps.js.map +7 -0
  67. package/dist/esm/hooks/index.js +44 -0
  68. package/dist/esm/hooks/index.js.map +7 -0
  69. package/dist/esm/hooks/useCancellableDelayedCallback.js +22 -0
  70. package/dist/esm/hooks/useCancellableDelayedCallback.js.map +7 -0
  71. package/dist/esm/hooks/useDerivedStateFromProps.js +38 -0
  72. package/dist/esm/hooks/useDerivedStateFromProps.js.map +7 -0
  73. package/dist/esm/hooks/useExecutionTimer.js +21 -0
  74. package/dist/esm/hooks/useExecutionTimer.js.map +7 -0
  75. package/dist/esm/hooks/useExpandState.js +110 -0
  76. package/dist/esm/hooks/useExpandState.js.map +7 -0
  77. package/dist/esm/hooks/useFocusTrap.js +20 -0
  78. package/dist/esm/hooks/useFocusTrap.js.map +7 -0
  79. package/dist/esm/hooks/useHotkeys.js +16 -0
  80. package/dist/esm/hooks/useHotkeys.js.map +7 -0
  81. package/{esm → dist/esm}/hooks/useHoverHandlersDelay.js +15 -12
  82. package/dist/esm/hooks/useHoverHandlersDelay.js.map +7 -0
  83. package/{esm → dist/esm}/hooks/useIsShowingEllipsis.js +9 -12
  84. package/dist/esm/hooks/useIsShowingEllipsis.js.map +7 -0
  85. package/dist/esm/hooks/useOnElementResize.js +26 -0
  86. package/dist/esm/hooks/useOnElementResize.js.map +7 -0
  87. package/dist/esm/hooks/useParentElement.js +14 -0
  88. package/dist/esm/hooks/useParentElement.js.map +7 -0
  89. package/dist/esm/hooks/usePrevious.js +15 -0
  90. package/dist/esm/hooks/usePrevious.js.map +7 -0
  91. package/dist/esm/hooks/useResizeObserver.js +31 -0
  92. package/dist/esm/hooks/useResizeObserver.js.map +7 -0
  93. package/dist/esm/hooks/useSetRef.js +13 -0
  94. package/dist/esm/hooks/useSetRef.js.map +7 -0
  95. package/dist/esm/hooks/useShouldRecalculate.js +15 -0
  96. package/dist/esm/hooks/useShouldRecalculate.js.map +7 -0
  97. package/{esm → dist/esm}/hooks/useWindowScrollerList.js +20 -29
  98. package/dist/esm/hooks/useWindowScrollerList.js.map +7 -0
  99. package/dist/esm/hooks/useWindowSize.js +28 -0
  100. package/dist/esm/hooks/useWindowSize.js.map +7 -0
  101. package/dist/esm/index.js +206 -0
  102. package/dist/esm/index.js.map +7 -0
  103. package/dist/esm/onClickHandlerForNonInteractiveElements.js +20 -0
  104. package/dist/esm/onClickHandlerForNonInteractiveElements.js.map +7 -0
  105. package/dist/esm/operators.js +39 -0
  106. package/dist/esm/operators.js.map +7 -0
  107. package/dist/esm/platform.js +8 -0
  108. package/dist/esm/platform.js.map +7 -0
  109. package/dist/esm/reactTypesUtility.js +29 -0
  110. package/dist/esm/reactTypesUtility.js.map +7 -0
  111. package/dist/esm/scrollingTimer.js +17 -0
  112. package/dist/esm/scrollingTimer.js.map +7 -0
  113. package/dist/esm/system.js +31 -0
  114. package/dist/esm/system.js.map +7 -0
  115. package/dist/esm/timeUtils.js +14 -0
  116. package/dist/esm/timeUtils.js.map +7 -0
  117. package/dist/esm/utils.js +154 -0
  118. package/dist/esm/utils.js.map +7 -0
  119. package/dist/esm/validations.js +28 -0
  120. package/dist/esm/validations.js.map +7 -0
  121. package/package.json +80 -75
  122. package/cjs/capitalize.js +0 -7
  123. package/cjs/compose.js +0 -38
  124. package/cjs/getComponentFromProps.js +0 -30
  125. package/cjs/hooks/index.js +0 -65
  126. package/cjs/hooks/useCancellableDelayedCallback.js +0 -26
  127. package/cjs/hooks/useDerivedStateFromProps.js +0 -56
  128. package/cjs/hooks/useExecutionTimer.js +0 -31
  129. package/cjs/hooks/useExpandState.js +0 -133
  130. package/cjs/hooks/useFocusTrap.js +0 -31
  131. package/cjs/hooks/useHotkeys.js +0 -25
  132. package/cjs/hooks/useHoverHandlersDelay.js +0 -28
  133. package/cjs/hooks/useIsShowingEllipsis.js +0 -36
  134. package/cjs/hooks/useOnElementResize.js +0 -38
  135. package/cjs/hooks/useParentElement.js +0 -16
  136. package/cjs/hooks/usePrevious.js +0 -13
  137. package/cjs/hooks/useResizeObserver.js +0 -33
  138. package/cjs/hooks/useSetRef.js +0 -15
  139. package/cjs/hooks/useShouldRecalculate.js +0 -17
  140. package/cjs/hooks/useWindowScrollerList.js +0 -65
  141. package/cjs/hooks/useWindowSize.js +0 -27
  142. package/cjs/index.js +0 -270
  143. package/cjs/onClickHandlerForNonInteractiveElements.js +0 -22
  144. package/cjs/operators.js +0 -63
  145. package/cjs/platform.js +0 -9
  146. package/cjs/reactTypesUtility.js +0 -35
  147. package/cjs/scrollingTimer.js +0 -24
  148. package/cjs/system.js +0 -43
  149. package/cjs/timeUtils.js +0 -25
  150. package/cjs/utils.js +0 -263
  151. package/cjs/validations.js +0 -44
  152. package/esm/capitalize.js +0 -3
  153. package/esm/compose.js +0 -34
  154. package/esm/getComponentFromProps.js +0 -23
  155. package/esm/hooks/index.js +0 -20
  156. package/esm/hooks/useCancellableDelayedCallback.js +0 -24
  157. package/esm/hooks/useDerivedStateFromProps.js +0 -54
  158. package/esm/hooks/useExecutionTimer.js +0 -29
  159. package/esm/hooks/useExpandState.js +0 -127
  160. package/esm/hooks/useFocusTrap.js +0 -27
  161. package/esm/hooks/useHotkeys.js +0 -19
  162. package/esm/hooks/useOnElementResize.js +0 -34
  163. package/esm/hooks/useParentElement.js +0 -12
  164. package/esm/hooks/usePrevious.js +0 -11
  165. package/esm/hooks/useResizeObserver.js +0 -26
  166. package/esm/hooks/useSetRef.js +0 -11
  167. package/esm/hooks/useShouldRecalculate.js +0 -15
  168. package/esm/hooks/useWindowSize.js +0 -25
  169. package/esm/index.js +0 -33
  170. package/esm/onClickHandlerForNonInteractiveElements.js +0 -20
  171. package/esm/operators.js +0 -46
  172. package/esm/platform.js +0 -4
  173. package/esm/reactTypesUtility.js +0 -22
  174. package/esm/scrollingTimer.js +0 -20
  175. package/esm/system.js +0 -37
  176. package/esm/timeUtils.js +0 -20
  177. package/esm/utils.js +0 -99
  178. package/esm/validations.js +0 -38
  179. package/types/capitalize.d.ts +0 -1
  180. package/types/compose.d.ts +0 -11
  181. package/types/getComponentFromProps.d.ts +0 -2
  182. package/types/hooks/index.d.ts +0 -20
  183. package/types/hooks/useCancellableDelayedCallback.d.ts +0 -1
  184. package/types/hooks/useDerivedStateFromProps.d.ts +0 -1
  185. package/types/hooks/useExecutionTimer.d.ts +0 -1
  186. package/types/hooks/useExpandState.d.ts +0 -22
  187. package/types/hooks/useFocusTrap.d.ts +0 -8
  188. package/types/hooks/useHotkeys.d.ts +0 -5
  189. package/types/hooks/useHoverHandlersDelay.d.ts +0 -9
  190. package/types/hooks/useIsShowingEllipsis.d.ts +0 -5
  191. package/types/hooks/useOnElementResize.d.ts +0 -2
  192. package/types/hooks/useParentElement.d.ts +0 -1
  193. package/types/hooks/usePrevious.d.ts +0 -2
  194. package/types/hooks/useResizeObserver.d.ts +0 -2
  195. package/types/hooks/useSetRef.d.ts +0 -2
  196. package/types/hooks/useShouldRecalculate.d.ts +0 -1
  197. package/types/hooks/useWindowScrollerList.d.ts +0 -4
  198. package/types/hooks/useWindowSize.d.ts +0 -1
  199. package/types/index.d.ts +0 -13
  200. package/types/onClickHandlerForNonInteractiveElements.d.ts +0 -12
  201. package/types/operators.d.ts +0 -31
  202. package/types/platform.d.ts +0 -2
  203. package/types/reactTypesUtility.d.ts +0 -6
  204. package/types/scrollingTimer.d.ts +0 -1
  205. package/types/system.d.ts +0 -3
  206. package/types/timeUtils.d.ts +0 -7
  207. package/types/utils.d.ts +0 -23
  208. package/types/validations.d.ts +0 -23
@@ -0,0 +1,83 @@
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 useWindowScrollerList_exports = {};
29
+ __export(useWindowScrollerList_exports, {
30
+ default: () => useWindowScrollerList_default,
31
+ useWindowScrollerList: () => useWindowScrollerList
32
+ });
33
+ var React = __toESM(require("react"));
34
+ var import_react = require("react");
35
+ function getScrollOffset(element = { scrollTop: 0, scrollLeft: 0 }) {
36
+ return {
37
+ top: element.scrollTop,
38
+ left: element.scrollLeft
39
+ };
40
+ }
41
+ function getPositionOffset(listEl, scrollableEl) {
42
+ const scrollOffset = getScrollOffset(scrollableEl);
43
+ const elementRect = listEl.getBoundingClientRect();
44
+ const containerRect = scrollableEl.getBoundingClientRect();
45
+ return {
46
+ top: elementRect.top + scrollOffset.top - containerRect.top,
47
+ left: elementRect.left + scrollOffset.top - containerRect.left
48
+ };
49
+ }
50
+ function isParent(parentNode, childNode) {
51
+ return childNode.parentNode === parentNode || childNode.parentNode && isParent(parentNode, childNode.parentNode);
52
+ }
53
+ const useWindowScrollerList = ({ listInstance, outerListRef }) => {
54
+ const scrollableParent = (0, import_react.useRef)();
55
+ const listOffset = (0, import_react.useRef)();
56
+ const getElementOffset = () => {
57
+ listOffset.current = getPositionOffset(outerListRef.current, scrollableParent.current);
58
+ };
59
+ const handleScroll = (e) => {
60
+ if (!scrollableParent.current) {
61
+ const containerTarget = e.target === document ? document.body : e.target;
62
+ scrollableParent.current = isParent(containerTarget, outerListRef.current) && containerTarget;
63
+ }
64
+ if (!scrollableParent.current)
65
+ return;
66
+ getElementOffset();
67
+ const scrollOffset = getScrollOffset(scrollableParent.current);
68
+ const scrollTop = Math.max(0, scrollOffset.top - listOffset.current.top);
69
+ if (listInstance.current)
70
+ listInstance.current.scrollTo(scrollTop);
71
+ };
72
+ (0, import_react.useEffect)(() => {
73
+ window.addEventListener("scroll", handleScroll, true);
74
+ window.addEventListener("resize", getElementOffset, true);
75
+ return () => {
76
+ window.removeEventListener("scroll", handleScroll, true);
77
+ window.removeEventListener("resize", getElementOffset, true);
78
+ };
79
+ }, []);
80
+ };
81
+ var useWindowScrollerList_default = useWindowScrollerList;
82
+ module.exports = __toCommonJS(useWindowScrollerList_exports);
83
+ //# sourceMappingURL=useWindowScrollerList.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/useWindowScrollerList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { useEffect, useRef } from 'react';\n\nfunction getScrollOffset(element = { scrollTop: 0, scrollLeft: 0 }) {\n return {\n top: element.scrollTop,\n left: element.scrollLeft,\n };\n}\n\nfunction getPositionOffset(listEl, scrollableEl) {\n const scrollOffset = getScrollOffset(scrollableEl);\n const elementRect = listEl.getBoundingClientRect();\n const containerRect = scrollableEl.getBoundingClientRect();\n return {\n top: elementRect.top + scrollOffset.top - containerRect.top,\n left: elementRect.left + scrollOffset.top - containerRect.left,\n };\n}\n\nfunction isParent(parentNode, childNode) {\n return (\n childNode.parentNode === parentNode ||\n (childNode.parentNode && isParent(parentNode, childNode.parentNode))\n );\n}\n\nexport const useWindowScrollerList = ({ listInstance, outerListRef }) => {\n const scrollableParent = useRef();\n const listOffset = useRef();\n\n const getElementOffset = () => {\n listOffset.current = getPositionOffset(\n outerListRef.current,\n scrollableParent.current,\n );\n };\n\n const handleScroll = e => {\n if (!scrollableParent.current) {\n const containerTarget = e.target === document ? document.body : e.target;\n scrollableParent.current =\n isParent(containerTarget, outerListRef.current) && containerTarget;\n }\n\n if (!scrollableParent.current) return;\n\n getElementOffset();\n\n const scrollOffset = getScrollOffset(scrollableParent.current);\n const scrollTop = Math.max(0, scrollOffset.top - listOffset.current.top);\n if (listInstance.current) listInstance.current.scrollTo(scrollTop);\n };\n\n useEffect(() => {\n window.addEventListener('scroll', handleScroll, true);\n window.addEventListener('resize', getElementOffset, true);\n return () => {\n window.removeEventListener('scroll', handleScroll, true);\n window.removeEventListener('resize', getElementOffset, true);\n };\n }, []);\n};\n\nexport default useWindowScrollerList;", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAElC,yBAAyB,UAAU,EAAE,WAAW,GAAG,YAAY,KAAK;AAClE,SAAO;AAAA,IACL,KAAK,QAAQ;AAAA,IACb,MAAM,QAAQ;AAAA;AAAA;AAIlB,2BAA2B,QAAQ,cAAc;AAC/C,QAAM,eAAe,gBAAgB;AACrC,QAAM,cAAc,OAAO;AAC3B,QAAM,gBAAgB,aAAa;AACnC,SAAO;AAAA,IACL,KAAK,YAAY,MAAM,aAAa,MAAM,cAAc;AAAA,IACxD,MAAM,YAAY,OAAO,aAAa,MAAM,cAAc;AAAA;AAAA;AAI9D,kBAAkB,YAAY,WAAW;AACvC,SACE,UAAU,eAAe,cACxB,UAAU,cAAc,SAAS,YAAY,UAAU;AAAA;AAIrD,MAAM,wBAAwB,CAAC,EAAE,cAAc,mBAAmB;AACvE,QAAM,mBAAmB;AACzB,QAAM,aAAa;AAEnB,QAAM,mBAAmB,MAAM;AAC7B,eAAW,UAAU,kBACnB,aAAa,SACb,iBAAiB;AAAA;AAIrB,QAAM,eAAe,OAAK;AACxB,QAAI,CAAC,iBAAiB,SAAS;AAC7B,YAAM,kBAAkB,EAAE,WAAW,WAAW,SAAS,OAAO,EAAE;AAClE,uBAAiB,UACf,SAAS,iBAAiB,aAAa,YAAY;AAAA;AAGvD,QAAI,CAAC,iBAAiB;AAAS;AAE/B;AAEA,UAAM,eAAe,gBAAgB,iBAAiB;AACtD,UAAM,YAAY,KAAK,IAAI,GAAG,aAAa,MAAM,WAAW,QAAQ;AACpE,QAAI,aAAa;AAAS,mBAAa,QAAQ,SAAS;AAAA;AAG1D,8BAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,cAAc;AAChD,WAAO,iBAAiB,UAAU,kBAAkB;AACpD,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,cAAc;AACnD,aAAO,oBAAoB,UAAU,kBAAkB;AAAA;AAAA,KAExD;AAAA;AAGL,IAAO,gCAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,57 @@
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 useWindowSize_exports = {};
29
+ __export(useWindowSize_exports, {
30
+ default: () => useWindowSize_default,
31
+ useWindowSize: () => useWindowSize
32
+ });
33
+ var React = __toESM(require("react"));
34
+ var import_react = require("react");
35
+ const useWindowSize = () => {
36
+ const [size, setSize] = (0, import_react.useState)([0, 0]);
37
+ (0, import_react.useLayoutEffect)(() => {
38
+ if (!window)
39
+ return false;
40
+ function updateSize() {
41
+ setSize([window.innerWidth, window.innerHeight]);
42
+ }
43
+ window.addEventListener("resize", updateSize);
44
+ window.addEventListener("orientationchange", updateSize);
45
+ updateSize();
46
+ return () => {
47
+ window.removeEventListener("resize", updateSize);
48
+ window.removeEventListener("orientationchange", updateSize);
49
+ };
50
+ }, []);
51
+ if (!window)
52
+ return false;
53
+ return size;
54
+ };
55
+ var useWindowSize_default = useWindowSize;
56
+ module.exports = __toCommonJS(useWindowSize_exports);
57
+ //# sourceMappingURL=useWindowSize.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/useWindowSize.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { useLayoutEffect, useState } from 'react';\n\nexport const useWindowSize = () => {\n const [size, setSize] = useState([0, 0]);\n useLayoutEffect(() => {\n if (!window) return false;\n function updateSize() {\n setSize([window.innerWidth, window.innerHeight]);\n }\n window.addEventListener('resize', updateSize);\n window.addEventListener('orientationchange', updateSize);\n updateSize();\n return () => {\n window.removeEventListener('resize', updateSize);\n window.removeEventListener('orientationchange', updateSize);\n };\n }, []);\n if (!window) return false;\n return size;\n};\n\nexport default useWindowSize;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA0C;AAEnC,MAAM,gBAAgB,MAAM;AACjC,QAAM,CAAC,MAAM,WAAW,2BAAS,CAAC,GAAG;AACrC,oCAAgB,MAAM;AACpB,QAAI,CAAC;AAAQ,aAAO;AACpB,0BAAsB;AACpB,cAAQ,CAAC,OAAO,YAAY,OAAO;AAAA;AAErC,WAAO,iBAAiB,UAAU;AAClC,WAAO,iBAAiB,qBAAqB;AAC7C;AACA,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU;AACrC,aAAO,oBAAoB,qBAAqB;AAAA;AAAA,KAEjD;AACH,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO;AAAA;AAGT,IAAO,wBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,146 @@
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 src_exports = {};
29
+ __export(src_exports, {
30
+ DOCUMENT: () => import_platform.DOCUMENT,
31
+ WINDOW: () => import_platform.WINDOW,
32
+ addLeadingZeros: () => import_timeUtils.addLeadingZeros,
33
+ addOrRemove: () => import_utils.addOrRemove,
34
+ arrayMove: () => import_utils.arrayMove,
35
+ capitalize: () => import_capitalize.capitalize,
36
+ checkEmpty: () => import_operators.checkEmpty,
37
+ checkNotEmpty: () => import_operators.checkNotEmpty,
38
+ cloneDeep: () => import_utils.cloneDeep,
39
+ compose: () => import_compose.compose,
40
+ contains: () => import_operators.contains,
41
+ curry: () => import_utils.curry,
42
+ cx: () => import_utils.cx,
43
+ debounce: () => import_utils.debounce,
44
+ differenceBy: () => import_utils.differenceBy,
45
+ differenceWith: () => import_utils.differenceWith,
46
+ equal: () => import_operators.equal,
47
+ filter: () => import_utils.filter,
48
+ findIndex: () => import_utils.findIndex,
49
+ get: () => import_utils.get,
50
+ getComponentFromProps: () => import_getComponentFromProps.default,
51
+ getVisibleTimeByFormat: () => import_timeUtils.getVisibleTimeByFormat,
52
+ greaterThan: () => import_operators.greaterThan,
53
+ greaterThanOrEquals: () => import_operators.greaterThanOrEquals,
54
+ groupBy: () => import_utils.groupBy,
55
+ hashArray: () => import_utils.hashArray,
56
+ isBoolean: () => import_utils.isBoolean,
57
+ isClassComponent: () => import_reactTypesUtility.isClassComponent,
58
+ isCompositeTypeElement: () => import_reactTypesUtility.isCompositeTypeElement,
59
+ isDOMTypeElement: () => import_reactTypesUtility.isDOMTypeElement,
60
+ isElement: () => import_reactTypesUtility.isElement,
61
+ isEmpty: () => import_utils.isEmpty,
62
+ isEqual: () => import_utils.isEqual,
63
+ isEqualWith: () => import_utils.isEqualWith,
64
+ isFunction: () => import_utils.isFunction,
65
+ isFunctionComponent: () => import_reactTypesUtility.isFunctionComponent,
66
+ isGreaterThan: () => import_validations.isGreaterThan,
67
+ isIn: () => import_operators.isIn,
68
+ isNaN: () => import_utils.isNaN,
69
+ isNotIn: () => import_operators.isNotIn,
70
+ isNotNull: () => import_operators.isNotNull,
71
+ isNull: () => import_operators.isNull,
72
+ isObject: () => import_utils.isObject,
73
+ isReactComponent: () => import_reactTypesUtility.isReactComponent,
74
+ isRequired: () => import_validations.isRequired,
75
+ isString: () => import_utils.isString,
76
+ isValidDate: () => import_validations.isValidDate,
77
+ lessThanOrEquals: () => import_operators.lessThanOrEquals,
78
+ logger: () => import_system.logger,
79
+ maxBy: () => import_utils.maxBy,
80
+ meanBy: () => import_utils.meanBy,
81
+ mergeRefs: () => import_system.mergeRefs,
82
+ noop: () => import_utils.noop,
83
+ notEqual: () => import_operators.notEqual,
84
+ omit: () => import_utils.omit,
85
+ onClickHandlerForNonInteractiveElements: () => import_onClickHandlerForNonInteractiveElements.default,
86
+ orderBy: () => import_utils.orderBy,
87
+ padStart: () => import_utils.padStart,
88
+ parseInt: () => import_utils.parseInt,
89
+ pick: () => import_utils.pick,
90
+ pickBy: () => import_utils.pickBy,
91
+ property: () => import_utils.property,
92
+ pull: () => import_utils.pull,
93
+ range: () => import_utils.range,
94
+ removeUndefinedProperties: () => import_utils.removeUndefinedProperties,
95
+ resetTimer: () => import_scrollingTimer.resetTimer,
96
+ runAll: () => import_utils.runAll,
97
+ safeCall: () => import_utils.safeCall,
98
+ set: () => import_utils.set,
99
+ setRef: () => import_system.setRef,
100
+ sortBy: () => import_utils.sortBy,
101
+ startsWith: () => import_operators.startsWith,
102
+ sumBy: () => import_utils.sumBy,
103
+ throttle: () => import_utils.throttle,
104
+ toggleInArray: () => import_utils.toggleInArray,
105
+ toggleInObject: () => import_utils.toggleInObject,
106
+ transform: () => import_utils.transform,
107
+ uniq: () => import_utils.uniq,
108
+ uniqBy: () => import_utils.uniqBy,
109
+ useCancellableDelayedCallback: () => import_hooks.useCancellableDelayedCallback,
110
+ useDerivedStateFromProps: () => import_hooks.useDerivedStateFromProps,
111
+ useExecutionTimer: () => import_hooks.useExecutionTimer,
112
+ useExpandState: () => import_hooks.useExpandState,
113
+ useForceUpdate: () => import_hooks.useForceUpdate,
114
+ useHotkeys: () => import_hooks.useHotkeys,
115
+ useHoverHandlersDelay: () => import_hooks.useHoverHandlersDelay,
116
+ useIsShowingEllipsis: () => import_hooks.useIsShowingEllipsis,
117
+ useMeasure: () => import_hooks.useMeasure,
118
+ useOnClickOutside: () => import_hooks.useOnClickOutside,
119
+ useOnElementResize: () => import_hooks.useOnElementResize,
120
+ useParentElement: () => import_hooks.useParentElement,
121
+ usePrevious: () => import_hooks.usePrevious,
122
+ useResizeObserver: () => import_hooks.useResizeObserver,
123
+ useSetRef: () => import_hooks.useSetRef,
124
+ useShouldRecalculate: () => import_hooks.useShouldRecalculate,
125
+ useUncontrolled: () => import_hooks.useUncontrolled,
126
+ useWindowScrollerList: () => import_hooks.useWindowScrollerList,
127
+ useWindowSize: () => import_hooks.useWindowSize,
128
+ validDate: () => import_operators.validDate,
129
+ values: () => import_utils.values
130
+ });
131
+ var React = __toESM(require("react"));
132
+ var import_getComponentFromProps = __toESM(require("./getComponentFromProps"));
133
+ var import_onClickHandlerForNonInteractiveElements = __toESM(require("./onClickHandlerForNonInteractiveElements"));
134
+ var import_capitalize = require("./capitalize");
135
+ var import_operators = require("./operators");
136
+ var import_utils = require("./utils");
137
+ var import_system = require("./system");
138
+ var import_hooks = require("./hooks");
139
+ var import_timeUtils = require("./timeUtils");
140
+ var import_compose = require("./compose");
141
+ var import_platform = require("./platform");
142
+ var import_reactTypesUtility = require("./reactTypesUtility");
143
+ var import_scrollingTimer = require("./scrollingTimer");
144
+ var import_validations = require("./validations");
145
+ module.exports = __toCommonJS(src_exports);
146
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export { default as getComponentFromProps } from './getComponentFromProps';\nexport { default as onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements';\nexport { capitalize } from './capitalize';\nexport {\n checkNotEmpty,\n checkEmpty,\n greaterThan,\n validDate,\n equal,\n notEqual,\n isNull,\n isNotNull,\n isIn,\n isNotIn,\n greaterThanOrEquals,\n lessThanOrEquals,\n startsWith,\n contains,\n} from './operators';\nexport {\n cx,\n runAll,\n hashArray,\n safeCall,\n removeUndefinedProperties,\n isObject,\n curry,\n arrayMove,\n uniq,\n filter,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n cloneDeep,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n pull,\n sortBy,\n sumBy,\n transform,\n isFunction,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n toggleInObject,\n toggleInArray,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n addOrRemove,\n isEqualWith,\n isBoolean,\n} from './utils';\nexport { setRef, mergeRefs, logger } from './system';\nexport {\n useMeasure,\n useForceUpdate,\n useOnClickOutside,\n useUncontrolled,\n useExecutionTimer,\n useExpandState,\n useHotkeys,\n useHoverHandlersDelay,\n useResizeObserver,\n useShouldRecalculate,\n useWindowScrollerList,\n useWindowSize,\n usePrevious,\n useCancellableDelayedCallback,\n useDerivedStateFromProps,\n useSetRef,\n useParentElement,\n useOnElementResize,\n useIsShowingEllipsis,\n} from './hooks';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils';\nexport { compose } from './compose';\nexport { DOCUMENT, WINDOW } from './platform';\nexport {\n isClassComponent,\n isFunctionComponent,\n isReactComponent,\n isElement,\n isDOMTypeElement,\n isCompositeTypeElement,\n} from './reactTypesUtility';\nexport { resetTimer } from './scrollingTimer';\nexport { isRequired, isGreaterThan, isValidDate } from './validations';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAiD;AACjD,qDAAmE;AACnE,wBAA2B;AAC3B,uBAeO;AACP,mBA+CO;AACP,oBAA0C;AAC1C,mBAoBO;AACP,uBAAwD;AACxD,qBAAwB;AACxB,sBAAiC;AACjC,+BAOO;AACP,4BAA2B;AAC3B,yBAAuD;",
6
+ "names": []
7
+ }
@@ -0,0 +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 onClickHandlerForNonInteractiveElements_exports = {};
29
+ __export(onClickHandlerForNonInteractiveElements_exports, {
30
+ default: () => onClickHandlerForNonInteractiveElements_default,
31
+ onClickHandlerForNonInteractiveElements: () => onClickHandlerForNonInteractiveElements
32
+ });
33
+ var React = __toESM(require("react"));
34
+ const onClickHandlerForNonInteractiveElements = (onClickHandler) => ({
35
+ role: "button",
36
+ tabIndex: "0",
37
+ onClick: onClickHandler,
38
+ onKeyPress: (event) => {
39
+ event.stopPropagation();
40
+ const { keycode, key } = event;
41
+ if (key === "Enter")
42
+ onClickHandler(event);
43
+ else if (keycode === 13)
44
+ onClickHandler(event);
45
+ }
46
+ });
47
+ var onClickHandlerForNonInteractiveElements_default = onClickHandlerForNonInteractiveElements;
48
+ module.exports = __toCommonJS(onClickHandlerForNonInteractiveElements_exports);
49
+ //# sourceMappingURL=onClickHandlerForNonInteractiveElements.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/onClickHandlerForNonInteractiveElements.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/**\n * onClickHandler: callback\n *\n * @param onClickHandler\n */\nexport const onClickHandlerForNonInteractiveElements = onClickHandler => ({\n role: 'button',\n tabIndex: '0',\n onClick: onClickHandler,\n onKeyPress: event => {\n event.stopPropagation();\n const { keycode, key } = event;\n if (key === 'Enter') onClickHandler(event);\n else if (keycode === 13) onClickHandler(event);\n },\n});\n\nexport default onClickHandlerForNonInteractiveElements;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKhB,MAAM,0CAA0C,oBAAmB;AAAA,EACxE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY,WAAS;AACnB,UAAM;AACN,UAAM,EAAE,SAAS,QAAQ;AACzB,QAAI,QAAQ;AAAS,qBAAe;AAAA,aAC3B,YAAY;AAAI,qBAAe;AAAA;AAAA;AAI5C,IAAO,kDAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,68 @@
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 operators_exports = {};
29
+ __export(operators_exports, {
30
+ checkEmpty: () => checkEmpty,
31
+ checkNotEmpty: () => checkNotEmpty,
32
+ contains: () => contains,
33
+ equal: () => equal,
34
+ greaterThan: () => greaterThan,
35
+ greaterThanOrEquals: () => greaterThanOrEquals,
36
+ isIn: () => isIn,
37
+ isNotIn: () => isNotIn,
38
+ isNotNull: () => isNotNull,
39
+ isNull: () => isNull,
40
+ lessThanOrEquals: () => lessThanOrEquals,
41
+ notEqual: () => notEqual,
42
+ startsWith: () => startsWith,
43
+ validDate: () => validDate
44
+ });
45
+ var React = __toESM(require("react"));
46
+ var import_lodash = require("lodash");
47
+ const checkNotEmpty = (value) => value === "" || value === void 0 || value == [] || value === null || (0, import_lodash.isEmpty)(value);
48
+ const checkEmpty = (value) => !(0, import_lodash.isEmpty)(value);
49
+ const greaterThan = (value, comparator) => value > comparator;
50
+ const validDate = (value) => {
51
+ const dateValidationRegex = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
52
+ if (!dateValidationRegex.test(value))
53
+ return false;
54
+ const [m, d, y] = value.split("/").map((n) => Number(n));
55
+ return m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());
56
+ };
57
+ const equal = (a, b) => a === b;
58
+ const notEqual = (a, b) => !equal(a, b);
59
+ const isNull = (a) => checkNotEmpty(a);
60
+ const isNotNull = (a) => !isNull(a);
61
+ const isIn = (a, b) => b.indexOf(a) > -1;
62
+ const isNotIn = (a, b) => !isIn(a, b);
63
+ const greaterThanOrEquals = (value, comparator) => value >= comparator;
64
+ const lessThanOrEquals = (value, comparator) => value <= comparator;
65
+ const startsWith = (value, comparator) => String(value).startsWith(comparator);
66
+ const contains = (value, comparator) => String(value).includes(comparator);
67
+ module.exports = __toCommonJS(operators_exports);
68
+ //# sourceMappingURL=operators.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/operators.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { isEmpty } from 'lodash';\n/**\n * Check if the value is null undefined ''\n *\n * @param value\n */\nexport const checkNotEmpty = (value) =>\n value === '' || value === undefined || value == [] || value === null || isEmpty(value);\n\nexport const checkEmpty = (value) => !isEmpty(value)\n/**\n * @param value: number\n * @param comparator: number\n * @param value\n * @param comparator\n */\nexport const greaterThan = (value, comparator) => value > comparator;\n\n/**\n * Check if a valid date with format MM/DD/YYYY\n *\n * @param {*} value: string\n * @param value\n */\nexport const validDate = (value) => {\n const dateValidationRegex = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if (!dateValidationRegex.test(value)) return false;\n const [m, d, y] = value.split('/').map((n) => Number(n));\n return (\n m === Number(new Date(y, m - 1, d).getMonth()) + 1 &&\n d === Number(new Date(y, m - 1, d).getDate())\n );\n};\n\nexport const equal = (a, b) => a === b;\n\nexport const notEqual = (a, b) => !equal(a, b);\n\nexport const isNull = (a) => checkNotEmpty(a);\n\nexport const isNotNull = (a) => !isNull(a);\n\nexport const isIn = (a, b) => b.indexOf(a) > -1;\n\nexport const isNotIn = (a, b) => !isIn(a, b);\n\nexport const greaterThanOrEquals = (value, comparator) => value >= comparator;\nexport const lessThanOrEquals = (value, comparator) => value <= comparator;\nexport const startsWith = (value, comparator) =>\n String(value).startsWith(comparator);\nexport const contains = (value, comparator) =>\n String(value).includes(comparator);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAwB;AAMjB,MAAM,gBAAgB,CAAC,UAC5B,UAAU,MAAM,UAAU,UAAa,SAAS,MAAM,UAAU,QAAQ,2BAAQ;AAE3E,MAAM,aAAa,CAAC,UAAU,CAAC,2BAAQ;AAOvC,MAAM,cAAc,CAAC,OAAO,eAAe,QAAQ;AAQnD,MAAM,YAAY,CAAC,UAAU;AAClC,QAAM,sBAAsB;AAC5B,MAAI,CAAC,oBAAoB,KAAK;AAAQ,WAAO;AAC7C,QAAM,CAAC,GAAG,GAAG,KAAK,MAAM,MAAM,KAAK,IAAI,CAAC,MAAM,OAAO;AACrD,SACE,MAAM,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,GAAG,cAAc,KACjD,MAAM,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,GAAG;AAAA;AAIhC,MAAM,QAAQ,CAAC,GAAG,MAAM,MAAM;AAE9B,MAAM,WAAW,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG;AAErC,MAAM,SAAS,CAAC,MAAM,cAAc;AAEpC,MAAM,YAAY,CAAC,MAAM,CAAC,OAAO;AAEjC,MAAM,OAAO,CAAC,GAAG,MAAM,EAAE,QAAQ,KAAK;AAEtC,MAAM,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG;AAEnC,MAAM,sBAAsB,CAAC,OAAO,eAAe,SAAS;AAC5D,MAAM,mBAAmB,CAAC,OAAO,eAAe,SAAS;AACzD,MAAM,aAAa,CAAC,OAAO,eAChC,OAAO,OAAO,WAAW;AACpB,MAAM,WAAW,CAAC,OAAO,eAC9B,OAAO,OAAO,SAAS;",
6
+ "names": []
7
+ }
@@ -0,0 +1,37 @@
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 platform_exports = {};
29
+ __export(platform_exports, {
30
+ DOCUMENT: () => DOCUMENT,
31
+ WINDOW: () => WINDOW
32
+ });
33
+ var React = __toESM(require("react"));
34
+ const DOCUMENT = typeof document !== "undefined" ? document : null;
35
+ const WINDOW = typeof window !== "undefined" ? window : null;
36
+ module.exports = __toCommonJS(platform_exports);
37
+ //# sourceMappingURL=platform.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/platform.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const DOCUMENT = typeof document !== 'undefined' ? document : null;\nexport const WINDOW = typeof window !== 'undefined' ? window : null;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,WAAW,OAAO,aAAa,cAAc,WAAW;AAC9D,MAAM,SAAS,OAAO,WAAW,cAAc,SAAS;",
6
+ "names": []
7
+ }
@@ -0,0 +1,58 @@
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 reactTypesUtility_exports = {};
29
+ __export(reactTypesUtility_exports, {
30
+ isClassComponent: () => isClassComponent,
31
+ isCompositeTypeElement: () => isCompositeTypeElement,
32
+ isDOMTypeElement: () => isDOMTypeElement,
33
+ isElement: () => isElement,
34
+ isFunctionComponent: () => isFunctionComponent,
35
+ isReactComponent: () => isReactComponent
36
+ });
37
+ var React = __toESM(require("react"));
38
+ var import_react = __toESM(require("react"));
39
+ function isClassComponent(component) {
40
+ return !!(typeof component === "function" && !!component.prototype.isReactComponent);
41
+ }
42
+ function isFunctionComponent(component) {
43
+ return typeof component === "function" && String(component).includes("return React.createElement");
44
+ }
45
+ function isReactComponent(component) {
46
+ return !!(isClassComponent(component) || isFunctionComponent(component));
47
+ }
48
+ function isElement(element) {
49
+ return import_react.default.isValidElement(element);
50
+ }
51
+ function isDOMTypeElement(element) {
52
+ return isElement(element) && typeof element.type === "string";
53
+ }
54
+ function isCompositeTypeElement(element) {
55
+ return isElement(element) && typeof element.type === "function";
56
+ }
57
+ module.exports = __toCommonJS(reactTypesUtility_exports);
58
+ //# sourceMappingURL=reactTypesUtility.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/reactTypesUtility.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\n\nexport function isClassComponent(component) {\n return !!(typeof component === 'function' && !!component.prototype.isReactComponent);\n}\n\nexport function isFunctionComponent(component) {\n return typeof component === 'function' && String(component).includes('return React.createElement');\n}\n\nexport function isReactComponent(component) {\n return !!(isClassComponent(component) || isFunctionComponent(component));\n}\n\nexport function isElement(element) {\n return React.isValidElement(element);\n}\n\nexport function isDOMTypeElement(element) {\n return isElement(element) && typeof element.type === 'string';\n}\n\nexport function isCompositeTypeElement(element) {\n return isElement(element) && typeof element.type === 'function';\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAEX,0BAA0B,WAAW;AAC1C,SAAO,CAAC,CAAE,QAAO,cAAc,cAAc,CAAC,CAAC,UAAU,UAAU;AAAA;AAG9D,6BAA6B,WAAW;AAC7C,SAAO,OAAO,cAAc,cAAc,OAAO,WAAW,SAAS;AAAA;AAGhE,0BAA0B,WAAW;AAC1C,SAAO,CAAC,CAAE,kBAAiB,cAAc,oBAAoB;AAAA;AAGxD,mBAAmB,SAAS;AACjC,SAAO,qBAAM,eAAe;AAAA;AAGvB,0BAA0B,SAAS;AACxC,SAAO,UAAU,YAAY,OAAO,QAAQ,SAAS;AAAA;AAGhD,gCAAgC,SAAS;AAC9C,SAAO,UAAU,YAAY,OAAO,QAAQ,SAAS;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,46 @@
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 scrollingTimer_exports = {};
29
+ __export(scrollingTimer_exports, {
30
+ resetTimer: () => resetTimer
31
+ });
32
+ var React = __toESM(require("react"));
33
+ const resetTimer = (func) => {
34
+ let timeout;
35
+ return function(...args) {
36
+ const context = this;
37
+ const lastCall = () => {
38
+ timeout = null;
39
+ func.apply(context, args);
40
+ };
41
+ clearTimeout(timeout);
42
+ timeout = setTimeout(lastCall, 300);
43
+ };
44
+ };
45
+ module.exports = __toCommonJS(scrollingTimer_exports);
46
+ //# sourceMappingURL=scrollingTimer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/scrollingTimer.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const resetTimer = (func) => {\n let timeout;\n return function(...args) {\n const context = this;\n\n const lastCall = () => {\n timeout = null;\n func.apply(context, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(lastCall, 300);\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa,CAAC,SAAS;AAClC,MAAI;AACJ,SAAO,YAAY,MAAM;AACvB,UAAM,UAAU;AAEhB,UAAM,WAAW,MAAM;AACrB,gBAAU;AACV,WAAK,MAAM,SAAS;AAAA;AAGtB,iBAAa;AACb,cAAU,WAAW,UAAU;AAAA;AAAA;",
6
+ "names": []
7
+ }