@elliemae/ds-utilities 3.0.0-next.2 → 3.0.0-next.6

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 (207) 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 +75 -0
  8. package/dist/cjs/hooks/index.js.map +7 -0
  9. package/dist/cjs/hooks/useCallbackAfterRender.js +45 -0
  10. package/dist/cjs/hooks/useCallbackAfterRender.js.map +7 -0
  11. package/dist/cjs/hooks/useCancellableDelayedCallback.js +51 -0
  12. package/dist/cjs/hooks/useCancellableDelayedCallback.js.map +7 -0
  13. package/dist/cjs/hooks/useDerivedStateFromProps.js +67 -0
  14. package/dist/cjs/hooks/useDerivedStateFromProps.js.map +7 -0
  15. package/dist/cjs/hooks/useExecutionTimer.js +50 -0
  16. package/dist/cjs/hooks/useExecutionTimer.js.map +7 -0
  17. package/dist/cjs/hooks/useExpandState.js +137 -0
  18. package/dist/cjs/hooks/useExpandState.js.map +7 -0
  19. package/dist/cjs/hooks/useFocusTrap.js +49 -0
  20. package/dist/cjs/hooks/useFocusTrap.js.map +7 -0
  21. package/dist/cjs/hooks/useHotkeys.js +45 -0
  22. package/dist/cjs/hooks/useHotkeys.js.map +7 -0
  23. package/dist/cjs/hooks/useHoverHandlersDelay.js +58 -0
  24. package/dist/cjs/hooks/useHoverHandlersDelay.js.map +7 -0
  25. package/dist/cjs/hooks/useIsShowingEllipsis.js +58 -0
  26. package/dist/cjs/hooks/useIsShowingEllipsis.js.map +7 -0
  27. package/dist/cjs/hooks/useOnElementResize.js +55 -0
  28. package/dist/cjs/hooks/useOnElementResize.js.map +7 -0
  29. package/dist/cjs/hooks/useParentElement.js +43 -0
  30. package/dist/cjs/hooks/useParentElement.js.map +7 -0
  31. package/dist/cjs/hooks/usePrevious.js +44 -0
  32. package/dist/cjs/hooks/usePrevious.js.map +7 -0
  33. package/dist/cjs/hooks/useResizeObserver.js +60 -0
  34. package/dist/cjs/hooks/useResizeObserver.js.map +7 -0
  35. package/dist/cjs/hooks/useSetRef.js +42 -0
  36. package/dist/cjs/hooks/useSetRef.js.map +7 -0
  37. package/dist/cjs/hooks/useShouldRecalculate.js +44 -0
  38. package/dist/cjs/hooks/useShouldRecalculate.js.map +7 -0
  39. package/dist/cjs/hooks/useWindowScrollerList.js +83 -0
  40. package/dist/cjs/hooks/useWindowScrollerList.js.map +7 -0
  41. package/dist/cjs/hooks/useWindowSize.js +57 -0
  42. package/dist/cjs/hooks/useWindowSize.js.map +7 -0
  43. package/dist/cjs/index.js +148 -0
  44. package/dist/cjs/index.js.map +7 -0
  45. package/dist/cjs/onClickHandlerForNonInteractiveElements.js +49 -0
  46. package/dist/cjs/onClickHandlerForNonInteractiveElements.js.map +7 -0
  47. package/dist/cjs/operators.js +68 -0
  48. package/dist/cjs/operators.js.map +7 -0
  49. package/dist/cjs/platform.js +37 -0
  50. package/dist/cjs/platform.js.map +7 -0
  51. package/dist/cjs/reactTypesUtility.js +58 -0
  52. package/dist/cjs/reactTypesUtility.js.map +7 -0
  53. package/dist/cjs/scrollingTimer.js +46 -0
  54. package/dist/cjs/scrollingTimer.js.map +7 -0
  55. package/dist/cjs/system.js +60 -0
  56. package/dist/cjs/system.js.map +7 -0
  57. package/dist/cjs/timeUtils.js +43 -0
  58. package/dist/cjs/timeUtils.js.map +7 -0
  59. package/dist/cjs/utils.js +143 -0
  60. package/dist/cjs/utils.js.map +7 -0
  61. package/dist/cjs/validations.js +57 -0
  62. package/dist/cjs/validations.js.map +7 -0
  63. package/dist/esm/capitalize.js +6 -0
  64. package/dist/esm/capitalize.js.map +7 -0
  65. package/dist/esm/compose.js +16 -0
  66. package/dist/esm/compose.js.map +7 -0
  67. package/dist/esm/getComponentFromProps.js +30 -0
  68. package/dist/esm/getComponentFromProps.js.map +7 -0
  69. package/dist/esm/hooks/index.js +46 -0
  70. package/dist/esm/hooks/index.js.map +7 -0
  71. package/dist/esm/hooks/useCallbackAfterRender.js +16 -0
  72. package/dist/esm/hooks/useCallbackAfterRender.js.map +7 -0
  73. package/dist/esm/hooks/useCancellableDelayedCallback.js +22 -0
  74. package/dist/esm/hooks/useCancellableDelayedCallback.js.map +7 -0
  75. package/dist/esm/hooks/useDerivedStateFromProps.js +38 -0
  76. package/dist/esm/hooks/useDerivedStateFromProps.js.map +7 -0
  77. package/dist/esm/hooks/useExecutionTimer.js +21 -0
  78. package/dist/esm/hooks/useExecutionTimer.js.map +7 -0
  79. package/dist/esm/hooks/useExpandState.js +110 -0
  80. package/dist/esm/hooks/useExpandState.js.map +7 -0
  81. package/dist/esm/hooks/useFocusTrap.js +20 -0
  82. package/dist/esm/hooks/useFocusTrap.js.map +7 -0
  83. package/dist/esm/hooks/useHotkeys.js +16 -0
  84. package/dist/esm/hooks/useHotkeys.js.map +7 -0
  85. package/{esm → dist/esm}/hooks/useHoverHandlersDelay.js +15 -12
  86. package/dist/esm/hooks/useHoverHandlersDelay.js.map +7 -0
  87. package/dist/esm/hooks/useIsShowingEllipsis.js +29 -0
  88. package/dist/esm/hooks/useIsShowingEllipsis.js.map +7 -0
  89. package/dist/esm/hooks/useOnElementResize.js +26 -0
  90. package/dist/esm/hooks/useOnElementResize.js.map +7 -0
  91. package/dist/esm/hooks/useParentElement.js +14 -0
  92. package/dist/esm/hooks/useParentElement.js.map +7 -0
  93. package/dist/esm/hooks/usePrevious.js +15 -0
  94. package/dist/esm/hooks/usePrevious.js.map +7 -0
  95. package/dist/esm/hooks/useResizeObserver.js +31 -0
  96. package/dist/esm/hooks/useResizeObserver.js.map +7 -0
  97. package/dist/esm/hooks/useSetRef.js +13 -0
  98. package/dist/esm/hooks/useSetRef.js.map +7 -0
  99. package/dist/esm/hooks/useShouldRecalculate.js +15 -0
  100. package/dist/esm/hooks/useShouldRecalculate.js.map +7 -0
  101. package/{esm → dist/esm}/hooks/useWindowScrollerList.js +20 -29
  102. package/dist/esm/hooks/useWindowScrollerList.js.map +7 -0
  103. package/dist/esm/hooks/useWindowSize.js +28 -0
  104. package/dist/esm/hooks/useWindowSize.js.map +7 -0
  105. package/dist/esm/index.js +210 -0
  106. package/dist/esm/index.js.map +7 -0
  107. package/dist/esm/onClickHandlerForNonInteractiveElements.js +20 -0
  108. package/dist/esm/onClickHandlerForNonInteractiveElements.js.map +7 -0
  109. package/dist/esm/operators.js +39 -0
  110. package/dist/esm/operators.js.map +7 -0
  111. package/dist/esm/platform.js +8 -0
  112. package/dist/esm/platform.js.map +7 -0
  113. package/dist/esm/reactTypesUtility.js +29 -0
  114. package/dist/esm/reactTypesUtility.js.map +7 -0
  115. package/dist/esm/scrollingTimer.js +17 -0
  116. package/dist/esm/scrollingTimer.js.map +7 -0
  117. package/dist/esm/system.js +31 -0
  118. package/dist/esm/system.js.map +7 -0
  119. package/dist/esm/timeUtils.js +14 -0
  120. package/dist/esm/timeUtils.js.map +7 -0
  121. package/dist/esm/utils.js +154 -0
  122. package/dist/esm/utils.js.map +7 -0
  123. package/dist/esm/validations.js +28 -0
  124. package/dist/esm/validations.js.map +7 -0
  125. package/package.json +82 -69
  126. package/cjs/capitalize.js +0 -7
  127. package/cjs/compose.js +0 -38
  128. package/cjs/getComponentFromProps.js +0 -30
  129. package/cjs/hooks/index.js +0 -61
  130. package/cjs/hooks/useCancellableDelayedCallback.js +0 -26
  131. package/cjs/hooks/useDerivedStateFromProps.js +0 -56
  132. package/cjs/hooks/useExecutionTimer.js +0 -31
  133. package/cjs/hooks/useExpandState.js +0 -133
  134. package/cjs/hooks/useHotkeys.js +0 -25
  135. package/cjs/hooks/useHoverHandlersDelay.js +0 -28
  136. package/cjs/hooks/useOnElementResize.js +0 -37
  137. package/cjs/hooks/useParentElement.js +0 -16
  138. package/cjs/hooks/usePrevious.js +0 -13
  139. package/cjs/hooks/useResizeObserver.js +0 -33
  140. package/cjs/hooks/useSetRef.js +0 -15
  141. package/cjs/hooks/useShouldRecalculate.js +0 -17
  142. package/cjs/hooks/useWindowScrollerList.js +0 -65
  143. package/cjs/hooks/useWindowSize.js +0 -27
  144. package/cjs/index.js +0 -266
  145. package/cjs/onClickHandlerForNonInteractiveElements.js +0 -22
  146. package/cjs/operators.js +0 -63
  147. package/cjs/platform.js +0 -9
  148. package/cjs/reactTypesUtility.js +0 -35
  149. package/cjs/scrollingTimer.js +0 -24
  150. package/cjs/system.js +0 -43
  151. package/cjs/timeUtils.js +0 -25
  152. package/cjs/utils.js +0 -263
  153. package/cjs/validations.js +0 -44
  154. package/esm/capitalize.js +0 -3
  155. package/esm/compose.js +0 -34
  156. package/esm/getComponentFromProps.js +0 -23
  157. package/esm/hooks/index.js +0 -18
  158. package/esm/hooks/useCancellableDelayedCallback.js +0 -24
  159. package/esm/hooks/useDerivedStateFromProps.js +0 -54
  160. package/esm/hooks/useExecutionTimer.js +0 -29
  161. package/esm/hooks/useExpandState.js +0 -127
  162. package/esm/hooks/useHotkeys.js +0 -19
  163. package/esm/hooks/useOnElementResize.js +0 -33
  164. package/esm/hooks/useParentElement.js +0 -12
  165. package/esm/hooks/usePrevious.js +0 -11
  166. package/esm/hooks/useResizeObserver.js +0 -26
  167. package/esm/hooks/useSetRef.js +0 -11
  168. package/esm/hooks/useShouldRecalculate.js +0 -15
  169. package/esm/hooks/useWindowSize.js +0 -25
  170. package/esm/index.js +0 -31
  171. package/esm/onClickHandlerForNonInteractiveElements.js +0 -20
  172. package/esm/operators.js +0 -46
  173. package/esm/platform.js +0 -4
  174. package/esm/reactTypesUtility.js +0 -22
  175. package/esm/scrollingTimer.js +0 -20
  176. package/esm/system.js +0 -37
  177. package/esm/timeUtils.js +0 -20
  178. package/esm/utils.js +0 -99
  179. package/esm/validations.js +0 -38
  180. package/types/capitalize.d.ts +0 -1
  181. package/types/compose.d.ts +0 -11
  182. package/types/getComponentFromProps.d.ts +0 -2
  183. package/types/hooks/index.d.ts +0 -18
  184. package/types/hooks/useCancellableDelayedCallback.d.ts +0 -1
  185. package/types/hooks/useDerivedStateFromProps.d.ts +0 -1
  186. package/types/hooks/useExecutionTimer.d.ts +0 -1
  187. package/types/hooks/useExpandState.d.ts +0 -22
  188. package/types/hooks/useHotkeys.d.ts +0 -5
  189. package/types/hooks/useHoverHandlersDelay.d.ts +0 -9
  190. package/types/hooks/useOnElementResize.d.ts +0 -2
  191. package/types/hooks/useParentElement.d.ts +0 -1
  192. package/types/hooks/usePrevious.d.ts +0 -2
  193. package/types/hooks/useResizeObserver.d.ts +0 -2
  194. package/types/hooks/useSetRef.d.ts +0 -2
  195. package/types/hooks/useShouldRecalculate.d.ts +0 -1
  196. package/types/hooks/useWindowScrollerList.d.ts +0 -4
  197. package/types/hooks/useWindowSize.d.ts +0 -1
  198. package/types/index.d.ts +0 -13
  199. package/types/onClickHandlerForNonInteractiveElements.d.ts +0 -12
  200. package/types/operators.d.ts +0 -31
  201. package/types/platform.d.ts +0 -2
  202. package/types/reactTypesUtility.d.ts +0 -6
  203. package/types/scrollingTimer.d.ts +0 -1
  204. package/types/system.d.ts +0 -3
  205. package/types/timeUtils.d.ts +0 -7
  206. package/types/utils.d.ts +0 -23
  207. package/types/validations.d.ts +0 -23
@@ -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
+ }
@@ -0,0 +1,60 @@
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 system_exports = {};
29
+ __export(system_exports, {
30
+ logger: () => logger,
31
+ mergeRefs: () => mergeRefs,
32
+ setRef: () => setRef
33
+ });
34
+ var React = __toESM(require("react"));
35
+ var import_utils = require("./utils");
36
+ const setRef = (ref, value) => {
37
+ if ((0, import_utils.isFunction)(ref)) {
38
+ ref(value);
39
+ } else if (ref) {
40
+ ref.current = value;
41
+ }
42
+ };
43
+ function mergeRefs(...refs) {
44
+ return (node) => {
45
+ if (!node)
46
+ return;
47
+ refs.forEach((ref) => {
48
+ if ((0, import_utils.isFunction)(ref)) {
49
+ ref(node);
50
+ } else if (ref) {
51
+ ref.current = node;
52
+ }
53
+ });
54
+ };
55
+ }
56
+ function logger(...args) {
57
+ console.log(...args);
58
+ }
59
+ module.exports = __toCommonJS(system_exports);
60
+ //# sourceMappingURL=system.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/system.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { isFunction } from './utils';\n\nexport const setRef = (ref, value) => {\n if (isFunction(ref)) {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n};\n\nexport function mergeRefs(...refs) {\n return (node) => {\n if (!node) return;\n refs.forEach((ref) => {\n if (isFunction(ref)) {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n });\n };\n}\n\nexport function logger(...args) {\n // eslint-disable-next-line no-console\n console.log(...args);\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA2B;AAEpB,MAAM,SAAS,CAAC,KAAK,UAAU;AACpC,MAAI,6BAAW,MAAM;AACnB,QAAI;AAAA,aACK,KAAK;AACd,QAAI,UAAU;AAAA;AAAA;AAIX,sBAAsB,MAAM;AACjC,SAAO,CAAC,SAAS;AACf,QAAI,CAAC;AAAM;AACX,SAAK,QAAQ,CAAC,QAAQ;AACpB,UAAI,6BAAW,MAAM;AACnB,YAAI;AAAA,iBACK,KAAK;AACd,YAAI,UAAU;AAAA;AAAA;AAAA;AAAA;AAMf,mBAAmB,MAAM;AAE9B,UAAQ,IAAI,GAAG;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
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 timeUtils_exports = {};
29
+ __export(timeUtils_exports, {
30
+ addLeadingZeros: () => addLeadingZeros,
31
+ getVisibleTimeByFormat: () => getVisibleTimeByFormat
32
+ });
33
+ var React = __toESM(require("react"));
34
+ var import_utils = require("./utils");
35
+ const getVisibleTimeByFormat = (format) => ({
36
+ showHours: format.indexOf("H") > -1 || format.indexOf("h") > -1 || format.indexOf("k") > -1,
37
+ showMinutes: format.indexOf("m") > -1,
38
+ showSeconds: format.indexOf("s") > -1,
39
+ use12Hours: format.indexOf("A") > -1 || format.indexOf("h") > -1 || format.indexOf("a") > -1
40
+ });
41
+ const addLeadingZeros = (count) => (number) => (0, import_utils.padStart)(String(number), count, "0");
42
+ module.exports = __toCommonJS(timeUtils_exports);
43
+ //# sourceMappingURL=timeUtils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/timeUtils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { padStart } from './utils';\n\nexport const getVisibleTimeByFormat = format => ({\n showHours:\n format.indexOf('H') > -1 ||\n format.indexOf('h') > -1 ||\n format.indexOf('k') > -1,\n showMinutes: format.indexOf('m') > -1,\n showSeconds: format.indexOf('s') > -1,\n use12Hours:\n format.indexOf('A') > -1 ||\n format.indexOf('h') > -1 ||\n format.indexOf('a') > -1,\n});\n\nexport const addLeadingZeros = count => number =>\n padStart(String(number), count, '0');\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyB;AAElB,MAAM,yBAAyB,YAAW;AAAA,EAC/C,WACE,OAAO,QAAQ,OAAO,MACtB,OAAO,QAAQ,OAAO,MACtB,OAAO,QAAQ,OAAO;AAAA,EACxB,aAAa,OAAO,QAAQ,OAAO;AAAA,EACnC,aAAa,OAAO,QAAQ,OAAO;AAAA,EACnC,YACE,OAAO,QAAQ,OAAO,MACtB,OAAO,QAAQ,OAAO,MACtB,OAAO,QAAQ,OAAO;AAAA;AAGnB,MAAM,kBAAkB,WAAS,YACtC,2BAAS,OAAO,SAAS,OAAO;",
6
+ "names": []
7
+ }
@@ -0,0 +1,143 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
+ var __export = (target, all) => {
26
+ for (var name in all)
27
+ __defProp(target, name, { get: all[name], enumerable: true });
28
+ };
29
+ var __reExport = (target, module2, copyDefault, desc) => {
30
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
31
+ for (let key of __getOwnPropNames(module2))
32
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
33
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
34
+ }
35
+ return target;
36
+ };
37
+ var __toESM = (module2, isNodeMode) => {
38
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
39
+ };
40
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
41
+ return (module2, temp) => {
42
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
43
+ };
44
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
45
+ var utils_exports = {};
46
+ __export(utils_exports, {
47
+ addOrRemove: () => addOrRemove,
48
+ arrayMove: () => arrayMove,
49
+ cloneDeep: () => import_lodash.cloneDeep,
50
+ curry: () => import_lodash.curry,
51
+ cx: () => cx,
52
+ debounce: () => import_lodash.debounce,
53
+ default: () => utils_default,
54
+ differenceBy: () => import_lodash.differenceBy,
55
+ differenceWith: () => import_lodash.differenceWith,
56
+ filter: () => import_lodash.filter,
57
+ findIndex: () => import_lodash.findIndex,
58
+ get: () => import_lodash.get,
59
+ groupBy: () => import_lodash.groupBy,
60
+ hashArray: () => hashArray,
61
+ isBoolean: () => import_lodash.isBoolean,
62
+ isEmpty: () => import_lodash.isEmpty,
63
+ isEqual: () => import_lodash.isEqual,
64
+ isEqualWith: () => import_lodash.isEqualWith,
65
+ isFunction: () => import_lodash.isFunction,
66
+ isNaN: () => import_lodash.isNaN,
67
+ isObject: () => import_lodash.isObject,
68
+ isString: () => import_lodash.isString,
69
+ maxBy: () => import_lodash.maxBy,
70
+ meanBy: () => import_lodash.meanBy,
71
+ noop: () => import_lodash.noop,
72
+ omit: () => import_lodash.omit,
73
+ orderBy: () => import_lodash.orderBy,
74
+ padStart: () => import_lodash.padStart,
75
+ parseInt: () => import_lodash.parseInt,
76
+ pick: () => import_lodash.pick,
77
+ pickBy: () => import_lodash.pickBy,
78
+ property: () => import_lodash.property,
79
+ pull: () => import_lodash.pull,
80
+ range: () => import_lodash.range,
81
+ removeUndefinedProperties: () => removeUndefinedProperties,
82
+ runAll: () => runAll,
83
+ safeCall: () => safeCall,
84
+ set: () => import_lodash.set,
85
+ sortBy: () => import_lodash.sortBy,
86
+ sumBy: () => import_lodash.sumBy,
87
+ throttle: () => import_lodash.throttle,
88
+ toggleInArray: () => toggleInArray,
89
+ toggleInObject: () => toggleInObject,
90
+ transform: () => import_lodash.transform,
91
+ uniq: () => import_lodash.uniq,
92
+ uniqBy: () => import_lodash.uniqBy,
93
+ values: () => import_lodash.values
94
+ });
95
+ var React = __toESM(require("react"));
96
+ var import_lodash = require("lodash");
97
+ const cx = (...classnames) => classnames.reduce((result, cn) => `${result} ${cn || ""}`, "");
98
+ const toggleInObject = (obj, key, value) => obj[key] !== void 0 ? (0, import_lodash.omit)(obj, [key]) : __spreadProps(__spreadValues({}, obj), { [key]: value });
99
+ const toggleInArray = (array, value) => array.indexOf(value) === -1 ? [value] : [];
100
+ const arrayMoveMutate = (array, from, to) => {
101
+ array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);
102
+ };
103
+ const arrayMove = (array, from, to) => {
104
+ array = array.slice();
105
+ arrayMoveMutate(array, from, to);
106
+ return array;
107
+ };
108
+ const accessorDefault = (item) => item;
109
+ const addOrRemove = (array, item, accessor = accessorDefault) => {
110
+ const index = array.findIndex((iItem) => accessor(iItem) === accessor(item));
111
+ if (index !== -1) {
112
+ const nextArray = (0, import_lodash.cloneDeep)(array);
113
+ nextArray.splice(index, 1);
114
+ return nextArray;
115
+ }
116
+ return [...array, item];
117
+ };
118
+ function runAll(...fns) {
119
+ return (...args) => fns.forEach((fn) => {
120
+ if (Array.isArray(fn))
121
+ runAll(fn);
122
+ if ((0, import_lodash.isFunction)(fn))
123
+ fn(...args);
124
+ });
125
+ }
126
+ function hashArray(arr, fieldName) {
127
+ return arr.reduce((result, item) => __spreadProps(__spreadValues({}, result), {
128
+ [fieldName ? item[fieldName] : item]: true
129
+ }), {});
130
+ }
131
+ function safeCall(fun, ...args) {
132
+ if ((0, import_lodash.isFunction)(fun)) {
133
+ fun(...args);
134
+ }
135
+ }
136
+ const removeUndefinedProperties = (obj) => {
137
+ const cleanObject = __spreadValues({}, obj);
138
+ Object.keys(obj).forEach((key) => cleanObject[key] === void 0 && delete cleanObject[key]);
139
+ return cleanObject;
140
+ };
141
+ var utils_default = {};
142
+ module.exports = __toCommonJS(utils_exports);
143
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-lines */\n/**\n * commonly used functions\n * Add a level of indirection to lodash so we can replace\n * it if desired, while keeping function names the same\n */\n// TODO: Import individual packages vs referencing all of lodash\nimport {\n cloneDeep,\n filter,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n noop,\n omit,\n orderBy,\n pull,\n sumBy,\n maxBy,\n meanBy,\n sortBy,\n transform,\n isFunction,\n uniq,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n isEqualWith,\n curry,\n isObject,\n isBoolean,\n} from 'lodash';\n\n/**\n * Concatenates classNames from arguments\n *\n * @param {...any} classnames\n */\nexport const cx = (...classnames) => classnames.reduce((result, cn) => `${result} ${cn || ''}`, '');\n\n// if entry exists, remove it, if not, add it\nconst toggleInObject = (obj, key, value) => (obj[key] !== undefined ? omit(obj, [key]) : { ...obj, [key]: value });\nconst toggleInArray = (array, value) => (array.indexOf(value) === -1 ? [value] : []);\n\nconst arrayMoveMutate = (array, from, to) => {\n array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);\n};\n\nconst arrayMove = (array, from, to) => {\n array = array.slice();\n arrayMoveMutate(array, from, to);\n return array;\n};\n\nconst accessorDefault = (item) => item;\nconst addOrRemove = (array, item, accessor = accessorDefault) => {\n const index = array.findIndex((iItem) => accessor(iItem) === accessor(item));\n\n if (index !== -1) {\n const nextArray = cloneDeep(array);\n nextArray.splice(index, 1);\n return nextArray;\n }\n\n return [...array, item];\n};\n\nexport function runAll(...fns) {\n return (...args) =>\n fns.forEach((fn) => {\n if (Array.isArray(fn)) runAll(fn);\n if (isFunction(fn)) fn(...args);\n });\n}\n\nexport function hashArray(arr, fieldName) {\n return arr.reduce(\n (result, item) => ({\n ...result,\n [fieldName ? item[fieldName] : item]: true,\n }),\n {},\n );\n}\n\nexport function safeCall(fun, ...args) {\n if (isFunction(fun)) {\n fun(...args);\n }\n}\n\nexport const removeUndefinedProperties = (obj) => {\n const cleanObject = { ...obj };\n Object.keys(obj).forEach((key) => cleanObject[key] === undefined && delete cleanObject[key]);\n return cleanObject;\n};\n\nexport default {};\nexport {\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};\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;ACAA,YAAuB;ADQvB,oBAsCO;AAOA,MAAM,KAAK,IAAI,eAAe,WAAW,OAAO,CAAC,QAAQ,OAAO,GAAG,UAAU,MAAM,MAAM;AAGhG,MAAM,iBAAiB,CAAC,KAAK,KAAK,UAAW,IAAI,SAAS,SAAY,wBAAK,KAAK,CAAC,QAAQ,iCAAK,MAAL,GAAW,MAAM;AAC1G,MAAM,gBAAgB,CAAC,OAAO,UAAW,MAAM,QAAQ,WAAW,KAAK,CAAC,SAAS;AAEjF,MAAM,kBAAkB,CAAC,OAAO,MAAM,OAAO;AAC3C,QAAM,OAAO,KAAK,IAAI,MAAM,SAAS,KAAK,IAAI,GAAG,MAAM,OAAO,MAAM,GAAG;AAAA;AAGzE,MAAM,YAAY,CAAC,OAAO,MAAM,OAAO;AACrC,UAAQ,MAAM;AACd,kBAAgB,OAAO,MAAM;AAC7B,SAAO;AAAA;AAGT,MAAM,kBAAkB,CAAC,SAAS;AAClC,MAAM,cAAc,CAAC,OAAO,MAAM,WAAW,oBAAoB;AAC/D,QAAM,QAAQ,MAAM,UAAU,CAAC,UAAU,SAAS,WAAW,SAAS;AAEtE,MAAI,UAAU,IAAI;AAChB,UAAM,YAAY,6BAAU;AAC5B,cAAU,OAAO,OAAO;AACxB,WAAO;AAAA;AAGT,SAAO,CAAC,GAAG,OAAO;AAAA;AAGb,mBAAmB,KAAK;AAC7B,SAAO,IAAI,SACT,IAAI,QAAQ,CAAC,OAAO;AAClB,QAAI,MAAM,QAAQ;AAAK,aAAO;AAC9B,QAAI,8BAAW;AAAK,SAAG,GAAG;AAAA;AAAA;AAIzB,mBAAmB,KAAK,WAAW;AACxC,SAAO,IAAI,OACT,CAAC,QAAQ,SAAU,iCACd,SADc;AAAA,KAEhB,YAAY,KAAK,aAAa,OAAO;AAAA,MAExC;AAAA;AAIG,kBAAkB,QAAQ,MAAM;AACrC,MAAI,8BAAW,MAAM;AACnB,QAAI,GAAG;AAAA;AAAA;AAIJ,MAAM,4BAA4B,CAAC,QAAQ;AAChD,QAAM,cAAc,mBAAK;AACzB,SAAO,KAAK,KAAK,QAAQ,CAAC,QAAQ,YAAY,SAAS,UAAa,OAAO,YAAY;AACvF,SAAO;AAAA;AAGT,IAAO,gBAAQ;",
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 validations_exports = {};
29
+ __export(validations_exports, {
30
+ isGreaterThan: () => isGreaterThan,
31
+ isRequired: () => isRequired,
32
+ isValidDate: () => isValidDate
33
+ });
34
+ var React = __toESM(require("react"));
35
+ var import_operators = require("./operators");
36
+ const isRequired = ({ value, help = "Field is Required" }) => ({
37
+ payload: help,
38
+ error: (0, import_operators.checkNotEmpty)(value)
39
+ });
40
+ const isGreaterThan = ({ value, help, comparator = 0 }) => {
41
+ if (!help)
42
+ help = `Max value ${comparator}`;
43
+ return {
44
+ payload: help,
45
+ error: (0, import_operators.greaterThan)(value, comparator)
46
+ };
47
+ };
48
+ const isValidDate = ({ value, help, format = "MM/DD/AAA" }) => {
49
+ if (!help)
50
+ help = `Valid Date is required ${format}`;
51
+ return {
52
+ payload: help,
53
+ error: !(0, import_operators.validDate)(value)
54
+ };
55
+ };
56
+ module.exports = __toCommonJS(validations_exports);
57
+ //# sourceMappingURL=validations.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/validations.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { checkNotEmpty, greaterThan, validDate } from './operators';\n\nexport const isRequired = ({ value, help = 'Field is Required' }) => ({\n payload: help,\n error: checkNotEmpty(value),\n});\n\nexport const isGreaterThan = ({ value, help, comparator = 0 }) => {\n if (!help) help = `Max value ${comparator}`;\n return {\n payload: help,\n error: greaterThan(value, comparator),\n };\n};\n\nexport const isValidDate = ({ value, help, format = 'MM/DD/AAA' }) => {\n if (!help) help = `Valid Date is required ${format}`;\n return {\n payload: help,\n error: !validDate(value),\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAsD;AAE/C,MAAM,aAAa,CAAC,EAAE,OAAO,OAAO,0BAA2B;AAAA,EACpE,SAAS;AAAA,EACT,OAAO,oCAAc;AAAA;AAGhB,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,aAAa,QAAQ;AAChE,MAAI,CAAC;AAAM,WAAO,aAAa;AAC/B,SAAO;AAAA,IACL,SAAS;AAAA,IACT,OAAO,kCAAY,OAAO;AAAA;AAAA;AAIvB,MAAM,cAAc,CAAC,EAAE,OAAO,MAAM,SAAS,kBAAkB;AACpE,MAAI,CAAC;AAAM,WAAO,0BAA0B;AAC5C,SAAO;AAAA,IACL,SAAS;AAAA,IACT,OAAO,CAAC,gCAAU;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ const capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
3
+ export {
4
+ capitalize
5
+ };
6
+ //# sourceMappingURL=capitalize.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/capitalize.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const capitalize = (string: string): string => string.charAt(0).toUpperCase() + string.slice(1);\n"],
5
+ "mappings": "AAAA;ACAO,MAAM,aAAa,CAAC,WAA2B,OAAO,OAAO,GAAG,gBAAgB,OAAO,MAAM;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ const compose = (...funcs) => {
3
+ if (funcs.length === 0) {
4
+ return (arg) => arg;
5
+ }
6
+ if (funcs.length === 1) {
7
+ return funcs[0];
8
+ }
9
+ return funcs.reduce((a, b) => (...args) => a(b(...args)));
10
+ };
11
+ var compose_default = compose;
12
+ export {
13
+ compose,
14
+ compose_default as default
15
+ };
16
+ //# sourceMappingURL=compose.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/compose.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function. [From redux v4.0.5]\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport const compose = (...funcs) => {\n if (funcs.length === 0) {\n return (arg) => arg;\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce((a, b) => (...args) => a(b(...args)));\n};\n\nexport default compose;\n"],
5
+ "mappings": "AAAA;ACWO,MAAM,UAAU,IAAI,UAAU;AACnC,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,CAAC,QAAQ;AAAA;AAGlB,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,MAAM;AAAA;AAGf,SAAO,MAAM,OAAO,CAAC,GAAG,MAAM,IAAI,SAAS,EAAE,EAAE,GAAG;AAAA;AAGpD,IAAO,kBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,30 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+ import * as React from "react";
18
+ import React2 from "react";
19
+ const getComponentFromProps = (Component, props, children = []) => {
20
+ if (!Component)
21
+ return null;
22
+ const componentChildren = Component.props ? Array.isArray(Component.props.children) ? Component.props.children : [Component.props.children] : null;
23
+ return typeof Component === "function" ? /* @__PURE__ */ React2.createElement(Component, __spreadValues({}, props), children) : React2.cloneElement(Component, __spreadValues(__spreadValues({}, Component.props), props), componentChildren ? [...componentChildren, ...children] : [...children]);
24
+ };
25
+ var getComponentFromProps_default = getComponentFromProps;
26
+ export {
27
+ getComponentFromProps_default as default,
28
+ getComponentFromProps
29
+ };
30
+ //# sourceMappingURL=getComponentFromProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/getComponentFromProps.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-nested-ternary */\nimport React from 'react';\n\nexport const getComponentFromProps = (Component, props, children = []) => {\n if (!Component) return null;\n const componentChildren = Component.props\n ? Array.isArray(Component.props.children)\n ? Component.props.children\n : [Component.props.children]\n : null;\n return typeof Component === 'function' ? (\n <Component {...props}>{children}</Component>\n ) : (\n React.cloneElement(\n Component,\n {\n ...Component.props,\n ...props,\n },\n componentChildren ? [...componentChildren, ...children] : [...children],\n )\n );\n};\n\nexport default getComponentFromProps;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;ACCA;AAEO,MAAM,wBAAwB,CAAC,WAAW,OAAO,WAAW,OAAO;AACxE,MAAI,CAAC;AAAW,WAAO;AACvB,QAAM,oBAAoB,UAAU,QAChC,MAAM,QAAQ,UAAU,MAAM,YAC5B,UAAU,MAAM,WAChB,CAAC,UAAU,MAAM,YACnB;AACJ,SAAO,OAAO,cAAc,aAC1B,qCAAC,WAAD,mBAAe,QAAQ,YAEvB,OAAM,aACJ,WACA,kCACK,UAAU,QACV,QAEL,oBAAoB,CAAC,GAAG,mBAAmB,GAAG,YAAY,CAAC,GAAG;AAAA;AAKpE,IAAO,gCAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,46 @@
1
+ import * as React from "react";
2
+ import { default as default2 } from "use-measure";
3
+ import { default as default3 } from "use-force-update";
4
+ import { default as default4 } from "use-onclickoutside";
5
+ import { useUncontrolled } from "uncontrollable";
6
+ import { useExecutionTimer } from "./useExecutionTimer";
7
+ import { useExpandState } from "./useExpandState";
8
+ import { useHotkeys } from "./useHotkeys";
9
+ import { useHoverHandlersDelay } from "./useHoverHandlersDelay";
10
+ import { useResizeObserver } from "./useResizeObserver";
11
+ import { useShouldRecalculate } from "./useShouldRecalculate";
12
+ import { useWindowScrollerList } from "./useWindowScrollerList";
13
+ import { useWindowSize } from "./useWindowSize";
14
+ import { usePrevious } from "./usePrevious";
15
+ import { useCancellableDelayedCallback } from "./useCancellableDelayedCallback";
16
+ import { useDerivedStateFromProps } from "./useDerivedStateFromProps";
17
+ import { useSetRef } from "./useSetRef";
18
+ import { useParentElement } from "./useParentElement";
19
+ import { useOnElementResize } from "./useOnElementResize";
20
+ import { useIsShowingEllipsis } from "./useIsShowingEllipsis";
21
+ import { useCallbackAfterRender } from "./useCallbackAfterRender";
22
+ import { useFocusTrap } from "./useFocusTrap";
23
+ export {
24
+ useCallbackAfterRender,
25
+ useCancellableDelayedCallback,
26
+ useDerivedStateFromProps,
27
+ useExecutionTimer,
28
+ useExpandState,
29
+ useFocusTrap,
30
+ default3 as useForceUpdate,
31
+ useHotkeys,
32
+ useHoverHandlersDelay,
33
+ useIsShowingEllipsis,
34
+ default2 as useMeasure,
35
+ default4 as useOnClickOutside,
36
+ useOnElementResize,
37
+ useParentElement,
38
+ usePrevious,
39
+ useResizeObserver,
40
+ useSetRef,
41
+ useShouldRecalculate,
42
+ useUncontrolled,
43
+ useWindowScrollerList,
44
+ useWindowSize
45
+ };
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default as useMeasure } from 'use-measure';\nexport { default as useForceUpdate } from 'use-force-update';\nexport { default as useOnClickOutside } from 'use-onclickoutside';\nexport { useUncontrolled } from 'uncontrollable';\nexport { useExecutionTimer } from './useExecutionTimer';\nexport { useExpandState } from './useExpandState';\nexport { useHotkeys } from './useHotkeys';\nexport { useHoverHandlersDelay } from './useHoverHandlersDelay';\nexport { useResizeObserver } from './useResizeObserver';\nexport { useShouldRecalculate } from './useShouldRecalculate';\nexport { useWindowScrollerList } from './useWindowScrollerList';\nexport { useWindowSize } from './useWindowSize';\nexport { usePrevious } from './usePrevious';\nexport { useCancellableDelayedCallback } from './useCancellableDelayedCallback';\nexport { useDerivedStateFromProps } from './useDerivedStateFromProps';\nexport { useSetRef } from './useSetRef';\nexport { useParentElement } from './useParentElement';\nexport { useOnElementResize } from './useOnElementResize';\nexport { useIsShowingEllipsis } from './useIsShowingEllipsis';\nexport { useCallbackAfterRender } from './useCallbackAfterRender';\nexport { useFocusTrap } from './useFocusTrap';\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import { useRef, useLayoutEffect } from "react";
3
+ const useCallbackAfterRender = () => {
4
+ const lastRun = useRef(null);
5
+ useLayoutEffect(() => {
6
+ lastRun.current?.();
7
+ lastRun.current = null;
8
+ });
9
+ return (callback) => {
10
+ lastRun.current = callback;
11
+ };
12
+ };
13
+ export {
14
+ useCallbackAfterRender
15
+ };
16
+ //# sourceMappingURL=useCallbackAfterRender.js.map