@elliemae/ds-utilities 3.16.0 → 3.16.1

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 (153) hide show
  1. package/dist/cjs/algorithms/crossTypeSort.js +4 -0
  2. package/dist/cjs/algorithms/crossTypeSort.js.map +1 -1
  3. package/dist/cjs/capitalize.js +4 -0
  4. package/dist/cjs/capitalize.js.map +1 -1
  5. package/dist/cjs/compose.js +4 -0
  6. package/dist/cjs/compose.js.map +1 -1
  7. package/dist/cjs/deprecated/deprecatedMsg.js +4 -0
  8. package/dist/cjs/deprecated/deprecatedMsg.js.map +1 -1
  9. package/dist/cjs/deprecated/index.js +10 -6
  10. package/dist/cjs/deprecated/index.js.map +2 -2
  11. package/dist/cjs/deprecated/reactTypesUtility.js +5 -1
  12. package/dist/cjs/deprecated/reactTypesUtility.js.map +2 -2
  13. package/dist/cjs/deprecated/scrollingTimer.js +5 -1
  14. package/dist/cjs/deprecated/scrollingTimer.js.map +2 -2
  15. package/dist/cjs/deprecated/useParentElement.js +4 -0
  16. package/dist/cjs/deprecated/useParentElement.js.map +1 -1
  17. package/dist/cjs/deprecated/useSetRef.js +5 -1
  18. package/dist/cjs/deprecated/useSetRef.js.map +2 -2
  19. package/dist/cjs/deprecated/useUncontrolled.js +5 -1
  20. package/dist/cjs/deprecated/useUncontrolled.js.map +2 -2
  21. package/dist/cjs/deprecated/useWindowSize.js +5 -1
  22. package/dist/cjs/deprecated/useWindowSize.js.map +2 -2
  23. package/dist/cjs/getComponentFromProps.js +5 -0
  24. package/dist/cjs/getComponentFromProps.js.map +1 -1
  25. package/dist/cjs/hooks/index.js +25 -19
  26. package/dist/cjs/hooks/index.js.map +2 -2
  27. package/dist/cjs/hooks/useCallbackAfterRender.js +4 -0
  28. package/dist/cjs/hooks/useCallbackAfterRender.js.map +1 -1
  29. package/dist/cjs/hooks/useCancellableDelayedCallback.js +4 -0
  30. package/dist/cjs/hooks/useCancellableDelayedCallback.js.map +1 -1
  31. package/dist/cjs/hooks/useDerivedStateFromProps.js +5 -1
  32. package/dist/cjs/hooks/useDerivedStateFromProps.js.map +2 -2
  33. package/dist/cjs/hooks/useDimensions.js +4 -0
  34. package/dist/cjs/hooks/useDimensions.js.map +1 -1
  35. package/dist/cjs/hooks/useExecutionTimer.js +4 -0
  36. package/dist/cjs/hooks/useExecutionTimer.js.map +1 -1
  37. package/dist/cjs/hooks/useExpandState.js +6 -2
  38. package/dist/cjs/hooks/useExpandState.js.map +2 -2
  39. package/dist/cjs/hooks/useFocusTrap.js +5 -1
  40. package/dist/cjs/hooks/useFocusTrap.js.map +2 -2
  41. package/dist/cjs/hooks/useHeadlessTooltip.js +140 -0
  42. package/dist/cjs/hooks/useHeadlessTooltip.js.map +7 -0
  43. package/dist/cjs/hooks/useHotkeys.js +4 -0
  44. package/dist/cjs/hooks/useHotkeys.js.map +1 -1
  45. package/dist/cjs/hooks/useHoverHandlersDelay.js +4 -0
  46. package/dist/cjs/hooks/useHoverHandlersDelay.js.map +1 -1
  47. package/dist/cjs/hooks/useIsMobile.js +4 -0
  48. package/dist/cjs/hooks/useIsMobile.js.map +1 -1
  49. package/dist/cjs/hooks/useIsShowingEllipsis.js +4 -0
  50. package/dist/cjs/hooks/useIsShowingEllipsis.js.map +1 -1
  51. package/dist/cjs/hooks/useMakeMutable.js +4 -0
  52. package/dist/cjs/hooks/useMakeMutable.js.map +1 -1
  53. package/dist/cjs/hooks/useNativeResizeObserver.js +52 -0
  54. package/dist/cjs/hooks/useNativeResizeObserver.js.map +7 -0
  55. package/dist/cjs/hooks/useOnBlurOut.js +5 -1
  56. package/dist/cjs/hooks/useOnBlurOut.js.map +2 -2
  57. package/dist/cjs/hooks/useOnElementResize.js +4 -0
  58. package/dist/cjs/hooks/useOnElementResize.js.map +1 -1
  59. package/dist/cjs/hooks/useOnFirstFocusIn.js +5 -1
  60. package/dist/cjs/hooks/useOnFirstFocusIn.js.map +2 -2
  61. package/dist/cjs/hooks/useOnSpecificFocus.js +5 -1
  62. package/dist/cjs/hooks/useOnSpecificFocus.js.map +2 -2
  63. package/dist/cjs/hooks/usePrevious.js +4 -0
  64. package/dist/cjs/hooks/usePrevious.js.map +1 -1
  65. package/dist/cjs/hooks/useResizeObserver.js +4 -0
  66. package/dist/cjs/hooks/useResizeObserver.js.map +1 -1
  67. package/dist/cjs/hooks/useShouldRecalculate.js +4 -0
  68. package/dist/cjs/hooks/useShouldRecalculate.js.map +1 -1
  69. package/dist/cjs/hooks/useWindowScrollerList.js +4 -0
  70. package/dist/cjs/hooks/useWindowScrollerList.js.map +1 -1
  71. package/dist/cjs/index.js +21 -16
  72. package/dist/cjs/index.js.map +2 -2
  73. package/dist/cjs/objectUtilities.js +4 -0
  74. package/dist/cjs/objectUtilities.js.map +1 -1
  75. package/dist/cjs/onClickHandlerForNonInteractiveElements.js +4 -0
  76. package/dist/cjs/onClickHandlerForNonInteractiveElements.js.map +1 -1
  77. package/dist/cjs/operators.js +8 -1
  78. package/dist/cjs/operators.js.map +1 -1
  79. package/dist/cjs/package.json +7 -0
  80. package/dist/cjs/platform.js +4 -0
  81. package/dist/cjs/platform.js.map +1 -1
  82. package/dist/cjs/props-helpers/index.js +4 -0
  83. package/dist/cjs/props-helpers/index.js.map +1 -1
  84. package/dist/cjs/reactTypesUtility.js +4 -0
  85. package/dist/cjs/reactTypesUtility.js.map +1 -1
  86. package/dist/cjs/system.js +5 -1
  87. package/dist/cjs/system.js.map +2 -2
  88. package/dist/cjs/timeUtils.js +5 -1
  89. package/dist/cjs/timeUtils.js.map +2 -2
  90. package/dist/cjs/utils.js +4 -0
  91. package/dist/cjs/utils.js.map +1 -1
  92. package/dist/cjs/validations.js +5 -1
  93. package/dist/cjs/validations.js.map +2 -2
  94. package/dist/esm/compose.js.map +1 -1
  95. package/dist/esm/deprecated/index.js +6 -6
  96. package/dist/esm/deprecated/index.js.map +1 -1
  97. package/dist/esm/deprecated/reactTypesUtility.js +1 -1
  98. package/dist/esm/deprecated/reactTypesUtility.js.map +1 -1
  99. package/dist/esm/deprecated/scrollingTimer.js +1 -1
  100. package/dist/esm/deprecated/scrollingTimer.js.map +1 -1
  101. package/dist/esm/deprecated/useSetRef.js +1 -1
  102. package/dist/esm/deprecated/useSetRef.js.map +1 -1
  103. package/dist/esm/deprecated/useUncontrolled.js +1 -1
  104. package/dist/esm/deprecated/useUncontrolled.js.map +1 -1
  105. package/dist/esm/deprecated/useWindowSize.js +1 -1
  106. package/dist/esm/deprecated/useWindowSize.js.map +1 -1
  107. package/dist/esm/getComponentFromProps.js +1 -0
  108. package/dist/esm/getComponentFromProps.js.map +1 -1
  109. package/dist/esm/hooks/index.js +21 -19
  110. package/dist/esm/hooks/index.js.map +2 -2
  111. package/dist/esm/hooks/useDerivedStateFromProps.js +1 -1
  112. package/dist/esm/hooks/useDerivedStateFromProps.js.map +1 -1
  113. package/dist/esm/hooks/useExpandState.js +2 -2
  114. package/dist/esm/hooks/useExpandState.js.map +2 -2
  115. package/dist/esm/hooks/useFocusTrap.js +1 -1
  116. package/dist/esm/hooks/useFocusTrap.js.map +2 -2
  117. package/dist/esm/hooks/useHeadlessTooltip.js +110 -0
  118. package/dist/esm/hooks/useHeadlessTooltip.js.map +7 -0
  119. package/dist/esm/hooks/useIsMobile.js.map +1 -1
  120. package/dist/esm/hooks/useNativeResizeObserver.js +22 -0
  121. package/dist/esm/hooks/useNativeResizeObserver.js.map +7 -0
  122. package/dist/esm/hooks/useOnBlurOut.js +1 -1
  123. package/dist/esm/hooks/useOnBlurOut.js.map +1 -1
  124. package/dist/esm/hooks/useOnFirstFocusIn.js +1 -1
  125. package/dist/esm/hooks/useOnFirstFocusIn.js.map +1 -1
  126. package/dist/esm/hooks/useOnSpecificFocus.js +1 -1
  127. package/dist/esm/hooks/useOnSpecificFocus.js.map +1 -1
  128. package/dist/esm/hooks/useResizeObserver.js.map +1 -1
  129. package/dist/esm/index.js +19 -17
  130. package/dist/esm/index.js.map +2 -2
  131. package/dist/esm/objectUtilities.js.map +1 -1
  132. package/dist/esm/operators.js +4 -1
  133. package/dist/esm/operators.js.map +1 -1
  134. package/dist/esm/package.json +7 -0
  135. package/dist/esm/system.js +1 -1
  136. package/dist/esm/system.js.map +1 -1
  137. package/dist/esm/timeUtils.js +1 -1
  138. package/dist/esm/timeUtils.js.map +1 -1
  139. package/dist/esm/utils.js.map +1 -1
  140. package/dist/esm/validations.js +1 -1
  141. package/dist/esm/validations.js.map +1 -1
  142. package/dist/types/deprecated/index.d.ts +6 -6
  143. package/dist/types/hooks/index.d.ts +20 -19
  144. package/dist/types/hooks/tests/useHeadlessTooltip.func.test.d.ts +1 -0
  145. package/dist/types/hooks/tests/useHeadlessTooltip.render.test.d.ts +1 -0
  146. package/dist/types/hooks/useFocusTrap.d.ts +1 -1
  147. package/dist/types/hooks/useHeadlessTooltip.d.ts +85 -0
  148. package/dist/types/hooks/useNativeResizeObserver.d.ts +4 -0
  149. package/dist/types/hooks/useOnBlurOut.d.ts +1 -1
  150. package/dist/types/hooks/useOnFirstFocusIn.d.ts +1 -1
  151. package/dist/types/hooks/useOnSpecificFocus.d.ts +1 -1
  152. package/dist/types/index.d.ts +16 -16
  153. package/package.json +5 -8
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -30,7 +34,7 @@ __export(useOnSpecificFocus_exports, {
30
34
  module.exports = __toCommonJS(useOnSpecificFocus_exports);
31
35
  var React = __toESM(require("react"));
32
36
  var import_react = require("react");
33
- var import_props_helpers = require("../props-helpers");
37
+ var import_props_helpers = require("../props-helpers/index.js");
34
38
  const propTypes = {
35
39
  onFocus: import_props_helpers.PropTypes.func.description(
36
40
  "The function to be invoked when focusing specifically the element attached to (ignoring child focus events)"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useOnSpecificFocus.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback } from 'react';\nimport { describe, PropTypes } from '../props-helpers';\n\nconst propTypes = {\n onFocus: PropTypes.func\n .description(\n 'The function to be invoked when focusing specifically the element attached to (ignoring child focus events)',\n )\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n} as WeakValidationMap<unknown>;\n\ntype OnFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseOnBlurOut = ({ onFocus }: { onFocus: OnFocusCb }) => OnFocusCb;\nconst useOnSpecificFocus: UseOnBlurOut = ({ onFocus }) =>\n useCallback<OnFocusCb>(\n (e, ...args) => {\n const { currentTarget, target } = e;\n if (currentTarget === target && document.activeElement === currentTarget) onFocus(e, ...args);\n },\n [onFocus],\n );\nconst UseOnSpecificFocusWithSchema = describe(useOnSpecificFocus);\nUseOnSpecificFocusWithSchema.propTypes = propTypes;\n\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA4B;AAC5B,2BAAoC;AAEpC,MAAM,YAAY;AAAA,EAChB,SAAS,+BAAU,KAChB;AAAA,IACC;AAAA,EACF,EACC,UAAU,qDAAqD,EAAE;AACtE;AAIA,MAAM,qBAAmC,CAAC,EAAE,QAAQ,UAClD;AAAA,EACE,CAAC,MAAM,SAAS;AACd,UAAM,EAAE,eAAe,OAAO,IAAI;AAClC,QAAI,kBAAkB,UAAU,SAAS,kBAAkB;AAAe,cAAQ,GAAG,GAAG,IAAI;AAAA,EAC9F;AAAA,EACA,CAAC,OAAO;AACV;AACF,MAAM,mCAA+B,+BAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback } from 'react';\nimport { describe, PropTypes } from '../props-helpers/index.js';\n\nconst propTypes = {\n onFocus: PropTypes.func\n .description(\n 'The function to be invoked when focusing specifically the element attached to (ignoring child focus events)',\n )\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n} as WeakValidationMap<unknown>;\n\ntype OnFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseOnBlurOut = ({ onFocus }: { onFocus: OnFocusCb }) => OnFocusCb;\nconst useOnSpecificFocus: UseOnBlurOut = ({ onFocus }) =>\n useCallback<OnFocusCb>(\n (e, ...args) => {\n const { currentTarget, target } = e;\n if (currentTarget === target && document.activeElement === currentTarget) onFocus(e, ...args);\n },\n [onFocus],\n );\nconst UseOnSpecificFocusWithSchema = describe(useOnSpecificFocus);\nUseOnSpecificFocusWithSchema.propTypes = propTypes;\n\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA4B;AAC5B,2BAAoC;AAEpC,MAAM,YAAY;AAAA,EAChB,SAAS,+BAAU,KAChB;AAAA,IACC;AAAA,EACF,EACC,UAAU,qDAAqD,EAAE;AACtE;AAIA,MAAM,qBAAmC,CAAC,EAAE,QAAQ,UAClD;AAAA,EACE,CAAC,MAAM,SAAS;AACd,UAAM,EAAE,eAAe,OAAO,IAAI;AAClC,QAAI,kBAAkB,UAAU,SAAS,kBAAkB;AAAe,cAAQ,GAAG,GAAG,IAAI;AAAA,EAC9F;AAAA,EACA,CAAC,OAAO;AACV;AACF,MAAM,mCAA+B,+BAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/usePrevious.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useEffect, useRef } from 'react';\n\nexport const usePrevious = (value: unknown) => {\n const ref = useRef<unknown>();\n\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n};\n\nexport default usePrevious;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAE3B,MAAM,cAAc,CAAC,UAAmB;AAC7C,QAAM,UAAM,qBAAgB;AAE5B,8BAAU,MAAM;AACd,QAAI,UAAU;AAAA,EAChB,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO,IAAI;AACb;AAEA,IAAO,sBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAE3B,MAAM,cAAc,CAAC,UAAmB;AAC7C,QAAM,UAAM,qBAAgB;AAE5B,8BAAU,MAAM;AACd,QAAI,UAAU;AAAA,EAChB,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO,IAAI;AACb;AAEA,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useResizeObserver.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useEffect, useMemo, useState } from 'react';\nimport raf from 'raf';\nimport ResizeObserver from 'resize-observer-polyfill';\n\ntype HandlerT = (measures: { width: number; height: number }, element: Element) => void;\n\nexport const useResizeObserver = (handler: HandlerT, el: HTMLElement) => {\n const [node, setRef] = useState(el);\n\n const resizeObserver = useMemo(\n () =>\n new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) return;\n if (!entries.length) return;\n const entry = entries[0];\n\n // execute on the next animation frame\n raf(() =>\n handler(\n {\n width: (entry.target as HTMLElement).offsetWidth,\n height: (entry.target as HTMLElement).offsetHeight,\n },\n entry.target,\n ),\n );\n }),\n [handler],\n );\n\n const htmlEl = el || node;\n\n useEffect(() => {\n if (htmlEl) resizeObserver.observe(htmlEl);\n return () => htmlEl && resizeObserver.unobserve(htmlEl);\n }, [htmlEl, resizeObserver]);\n\n return [setRef];\n};\n\nexport default useResizeObserver;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAA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E,OAAQ,MAAM,OAAuB;AAAA,YACrC,QAAS,MAAM,OAAuB;AAAA,UACxC;AAAA,UACA,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF,CAAC;AAAA,IACH,CAAC,OAAO;AAAA,EACV;AAEA,QAAM,SAAS,MAAM;AAErB,8BAAU,MAAM;AACd,QAAI;AAAQ,qBAAe,QAAQ,MAAM;AACzC,WAAO,MAAM,UAAU,eAAe,UAAU,MAAM;AAAA,EACxD,GAAG,CAAC,QAAQ,cAAc,CAAC;AAE3B,SAAO,CAAC,MAAM;AAChB;AAEA,IAAO,4BAAQ;",
6
6
  "names": ["ResizeObserver", "raf"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useShouldRecalculate.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useRef } from 'react';\n\nexport const useShouldRecalculate = (bool: boolean) => {\n const prevValueRef = useRef(0);\n if (!bool) {\n // If we need to recalculate, change the value we return\n prevValueRef.current += 1;\n } // else we return the same value as the previous render, which won't trigger a recalculation\n return prevValueRef.current;\n};\n\nexport default useShouldRecalculate;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAuB;AAEhB,MAAM,uBAAuB,CAAC,SAAkB;AACrD,QAAM,mBAAe,qBAAO,CAAC;AAC7B,MAAI,CAAC,MAAM;AAET,iBAAa,WAAW;AAAA,EAC1B;AACA,SAAO,aAAa;AACtB;AAEA,IAAO,+BAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAuB;AAEhB,MAAM,uBAAuB,CAAC,SAAkB;AACrD,QAAM,mBAAe,qBAAO,CAAC;AAC7B,MAAI,CAAC,MAAM;AAET,iBAAa,WAAW;AAAA,EAC1B;AACA,SAAO,aAAa;AACtB;AAEA,IAAO,+BAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useWindowScrollerList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type React from 'react';\nimport { useCallback, useEffect, useRef } from 'react';\n\ninterface UseWindowScrollerListArg {\n listInstance: React.RefObject<HTMLElement>;\n outerListRef: React.RefObject<HTMLElement>;\n}\n\nfunction getScrollOffset(element = { scrollTop: 0, scrollLeft: 0 }) {\n return {\n top: element.scrollTop,\n left: element.scrollLeft,\n };\n}\n\nfunction getPositionOffset(listEl: HTMLElement, scrollableEl: HTMLElement) {\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: EventTarget | null, childNode: HTMLElement | null): boolean {\n return (\n childNode?.parentNode === (parentNode as ParentNode) ||\n (!!childNode?.parentNode && isParent(parentNode, childNode.parentNode as HTMLElement))\n );\n}\n\nexport const useWindowScrollerList = ({ listInstance, outerListRef }: UseWindowScrollerListArg) => {\n const scrollableParent = useRef<HTMLElement | false>();\n const listOffset = useRef<ReturnType<typeof getPositionOffset>>();\n\n const getElementOffset = useCallback(() => {\n if (outerListRef.current && scrollableParent.current) {\n listOffset.current = getPositionOffset(outerListRef.current, scrollableParent.current);\n }\n }, [outerListRef]);\n\n const handleScroll: EventListener = useCallback(\n (e) => {\n if (!scrollableParent.current) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const containerTarget = e.target === document ? document.body : e.target;\n scrollableParent.current = isParent(containerTarget, outerListRef.current) && (containerTarget as HTMLElement);\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 ?? 0));\n if (listInstance.current) listInstance.current.scrollTo({ top: scrollTop });\n },\n [getElementOffset, listInstance, outerListRef],\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 }, [getElementOffset, handleScroll]);\n};\n\nexport default useWindowScrollerList;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+C;AAO/C,SAAS,gBAAgB,UAAU,EAAE,WAAW,GAAG,YAAY,EAAE,GAAG;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AC,MAAM;AACL,UAAI,CAAC,iBAAiB,SAAS;AAE7B,cAAM,kBAAkB,EAAE,WAAW,WAAW,SAAS,OAAO,EAAE;AAClE,yBAAiB,UAAU,SAAS,iBAAiB,aAAa,OAAO,KAAM;AAAA,MACjF;AAEA,UAAI,CAAC,iBAAiB;AAAS;AAE/B,uBAAiB;AAEjB,YAAM,eAAe,gBAAgB,iBAAiB,OAAO;AAC7D,YAAM,YAAY,KAAK,IAAI,GAAG,aAAa,OAAO,WAAW,SAAS,OAAO,EAAE;AAC/E,UAAI,aAAa;AAAS,qBAAa,QAAQ,SAAS,EAAE,KAAK,UAAU,CAAC;AAAA,IAC5E;AAAA,IACA,CAAC,kBAAkB,cAAc,YAAY;AAAA,EAC/C;AAEA,8BAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,cAAc,IAAI;AACpD,WAAO,iBAAiB,UAAU,kBAAkB,IAAI;AACxD,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,cAAc,IAAI;AACvD,aAAO,oBAAoB,UAAU,kBAAkB,IAAI;AAAA,IAC7D;AAAA,EACF,GAAG,CAAC,kBAAkB,YAAY,CAAC;AACrC;AAEA,IAAO,gCAAQ;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -19,6 +19,10 @@ var __copyProps = (to, from, except, desc) => {
19
19
  };
20
20
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
21
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
26
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
27
  mod
24
28
  ));
@@ -113,6 +117,7 @@ __export(src_exports, {
113
117
  useExpandState: () => import_hooks.useExpandState,
114
118
  useFocusTrap: () => import_hooks.useFocusTrap,
115
119
  useForceUpdate: () => import_hooks.useForceUpdate,
120
+ useHeadlessTooltip: () => import_hooks.useHeadlessTooltip,
116
121
  useHotkeys: () => import_hooks.useHotkeys,
117
122
  useHoverHandlersDelay: () => import_hooks.useHoverHandlersDelay,
118
123
  useIsMobile: () => import_hooks.useIsMobile,
@@ -133,20 +138,20 @@ __export(src_exports, {
133
138
  });
134
139
  module.exports = __toCommonJS(src_exports);
135
140
  var React = __toESM(require("react"));
136
- var import_getComponentFromProps = __toESM(require("./getComponentFromProps"));
137
- var import_onClickHandlerForNonInteractiveElements = __toESM(require("./onClickHandlerForNonInteractiveElements"));
138
- var import_capitalize = require("./capitalize");
139
- var import_objectUtilities = require("./objectUtilities");
140
- var import_operators = require("./operators");
141
- var import_utils = require("./utils");
142
- var import_system = require("./system");
143
- var import_hooks = require("./hooks");
144
- var import_timeUtils = require("./timeUtils");
145
- var import_compose = require("./compose");
146
- var import_platform = require("./platform");
147
- var import_reactTypesUtility = require("./reactTypesUtility");
148
- var import_validations = require("./validations");
149
- var import_crossTypeSort = require("./algorithms/crossTypeSort");
150
- __reExport(src_exports, require("./deprecated"), module.exports);
151
- __reExport(src_exports, require("./props-helpers"), module.exports);
141
+ var import_getComponentFromProps = __toESM(require("./getComponentFromProps.js"));
142
+ var import_onClickHandlerForNonInteractiveElements = __toESM(require("./onClickHandlerForNonInteractiveElements.js"));
143
+ var import_capitalize = require("./capitalize.js");
144
+ var import_objectUtilities = require("./objectUtilities.js");
145
+ var import_operators = require("./operators.js");
146
+ var import_utils = require("./utils.js");
147
+ var import_system = require("./system.js");
148
+ var import_hooks = require("./hooks/index.js");
149
+ var import_timeUtils = require("./timeUtils.js");
150
+ var import_compose = require("./compose.js");
151
+ var import_platform = require("./platform.js");
152
+ var import_reactTypesUtility = require("./reactTypesUtility.js");
153
+ var import_validations = require("./validations.js");
154
+ var import_crossTypeSort = require("./algorithms/crossTypeSort.js");
155
+ __reExport(src_exports, require("./deprecated/index.js"), module.exports);
156
+ __reExport(src_exports, require("./props-helpers/index.js"), module.exports);
152
157
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities';\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, setMultipleRefs, logger } from './system';\nexport {\n useMeasure,\n useForceUpdate,\n useOnClickOutside,\n useExecutionTimer,\n useExpandState,\n useHotkeys,\n useHoverHandlersDelay,\n useResizeObserver,\n useShouldRecalculate,\n useWindowScrollerList,\n usePrevious,\n useCancellableDelayedCallback,\n useDerivedStateFromProps,\n useOnElementResize,\n useIsShowingEllipsis,\n useMakeMutable,\n useCallbackAfterRender,\n useFocusTrap,\n UseFocusTrapWithSchema,\n useIsMobile,\n useOnBlurOut,\n UseOnBlurOutWithSchema,\n useOnFirstFocusIn,\n UseOnFirstFocusInWithSchema,\n useOnSpecificFocus,\n UseOnSpecificFocusWithSchema,\n} from './hooks';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils';\nexport { compose } from './compose';\nexport { DOCUMENT, WINDOW } from './platform';\nexport { isDOMTypeElement } from './reactTypesUtility';\nexport { isRequired, isGreaterThan, isValidDate } from './validations';\n\nexport { crossTypeSort } from './algorithms/crossTypeSort';\n\n// TODO -- REMOVE WHEN READY\nexport * from './deprecated';\nexport * from './props-helpers';\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAiD;AACjD,qDAAmE;AACnE,wBAA2B;AAC3B,6BAA6D;AAC7D,uBAeO;AACP,mBA+CO;AACP,oBAA2D;AAC3D,mBA2BO;AACP,uBAAwD;AACxD,qBAAwB;AACxB,sBAAiC;AACjC,+BAAiC;AACjC,yBAAuD;AAEvD,2BAA8B;AAG9B,wBAAc,yBA1Gd;AA2GA,wBAAc,4BA3Gd;",
4
+ "sourcesContent": ["export { default as getComponentFromProps } from './getComponentFromProps.js';\nexport { default as onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements.js';\nexport { capitalize } from './capitalize.js';\nexport { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities.js';\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.js';\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.js';\nexport { setRef, mergeRefs, setMultipleRefs, logger } from './system.js';\nexport {\n useMeasure,\n useForceUpdate,\n useOnClickOutside,\n useExecutionTimer,\n useExpandState,\n useHotkeys,\n useHoverHandlersDelay,\n useResizeObserver,\n useShouldRecalculate,\n useWindowScrollerList,\n usePrevious,\n useCancellableDelayedCallback,\n useDerivedStateFromProps,\n useOnElementResize,\n useIsShowingEllipsis,\n useMakeMutable,\n useCallbackAfterRender,\n useFocusTrap,\n UseFocusTrapWithSchema,\n useIsMobile,\n useOnBlurOut,\n UseOnBlurOutWithSchema,\n useOnFirstFocusIn,\n UseOnFirstFocusInWithSchema,\n useOnSpecificFocus,\n UseOnSpecificFocusWithSchema,\n useHeadlessTooltip,\n} from './hooks/index.js';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils.js';\nexport { compose } from './compose.js';\nexport { DOCUMENT, WINDOW } from './platform.js';\nexport { isDOMTypeElement } from './reactTypesUtility.js';\nexport { isRequired, isGreaterThan, isValidDate } from './validations.js';\n\nexport { crossTypeSort } from './algorithms/crossTypeSort.js';\n\n// TODO -- REMOVE WHEN READY\nexport * from './deprecated/index.js';\nexport * from './props-helpers/index.js';\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAiD;AACjD,qDAAmE;AACnE,wBAA2B;AAC3B,6BAA6D;AAC7D,uBAeO;AACP,mBA+CO;AACP,oBAA2D;AAC3D,mBA4BO;AACP,uBAAwD;AACxD,qBAAwB;AACxB,sBAAiC;AACjC,+BAAiC;AACjC,yBAAuD;AAEvD,2BAA8B;AAG9B,wBAAc,kCA3Gd;AA4GA,wBAAc,qCA5Gd;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/objectUtilities.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["const JSONKeyValueRegExp = /\"(.+?)\": \"(.+?)\",?$/gm;\nconst prettyStringfy = (obj: Record<string, unknown>): string => JSON.stringify(obj, null, 2);\nfunction getFirstGroup(regexp: RegExp, str: string) {\n const array = [...str.matchAll(regexp)];\n const firstGroup = array.map((m) => m[1]).filter((v) => v !== undefined);\n if (firstGroup.length > 0) return firstGroup;\n return null;\n}\nfunction getSecondGroup(regexp: RegExp, str: string) {\n const array = [...str.matchAll(regexp)];\n const secondGroup = array.map((m) => m[2]).filter((v) => v !== undefined);\n if (secondGroup.length > 0) return secondGroup;\n return null;\n}\nexport const getObjectValuesToArray = (obj: Record<string, unknown>): string[] | null =>\n getSecondGroup(JSONKeyValueRegExp, prettyStringfy(obj));\n\nexport const getObjectKeysToArray = (obj: Record<string, unknown>): string[] | null =>\n getFirstGroup(JSONKeyValueRegExp, prettyStringfy(obj));\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AC,MAAM,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,MAAM,MAAS;AACxE,MAAI,YAAY,SAAS;AAAG,WAAO;AACnC,SAAO;AACT;AACO,MAAM,yBAAyB,CAAC,QACrC,eAAe,oBAAoB,eAAe,GAAG,CAAC;AAEjD,MAAM,uBAAuB,CAAC,QACnC,cAAc,oBAAoB,eAAe,GAAG,CAAC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/onClickHandlerForNonInteractiveElements.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type React from 'react';\n\nexport const onClickHandlerForNonInteractiveElements = (\n onClickHandler: React.MouseEventHandler & React.KeyboardEventHandler,\n) => ({\n role: 'button',\n tabIndex: '0',\n onClick: onClickHandler,\n onKeyPress: (event: React.KeyboardEvent) => {\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;AAAA;ACAA,YAAuB;ADEhB,MAAM,0CAA0C,CACrD,oBACI;AAAA,EACJ,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY,CAAC,UAA+B;AAC1C,UAAM,gBAAgB;AACtB,UAAM,EAAE,SAAS,IAAI,IAAI;AACzB,QAAI,QAAQ;AAAS,qBAAe,KAAK;AAAA,aAChC,YAAY;AAAI,qBAAe,KAAK;AAAA,EAC/C;AACF;AAEA,IAAO,kDAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,0CAA0C,CACrD,oBACI;AAAA,EACJ,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY,CAAC,UAA+B;AAC1C,UAAM,gBAAgB;AACtB,UAAM,EAAE,SAAS,IAAI,IAAI;AACzB,QAAI,QAAQ;AAAS,qBAAe,KAAK;AAAA,aAChC,YAAY;AAAI,qBAAe,KAAK;AAAA,EAC/C;AACF;AAEA,IAAO,kDAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -42,7 +46,10 @@ __export(operators_exports, {
42
46
  module.exports = __toCommonJS(operators_exports);
43
47
  var React = __toESM(require("react"));
44
48
  var import_lodash = require("lodash");
45
- const checkNotEmpty = (value) => value === "" || value === void 0 || value === null || (0, import_lodash.isEmpty)(value);
49
+ const checkNotEmpty = (value) => (
50
+ // eslint-disable-next-line eqeqeq
51
+ value === "" || value === void 0 || value === null || (0, import_lodash.isEmpty)(value)
52
+ );
46
53
  const checkEmpty = (value) => !(0, import_lodash.isEmpty)(value);
47
54
  const greaterThan = (value, comparator) => value > comparator;
48
55
  const validDate = (value) => {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/operators.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { isEmpty } from 'lodash';\n\n// Check if the value is empty\nexport const checkNotEmpty = (value: unknown) =>\n // eslint-disable-next-line eqeqeq\n value === '' || value === undefined || value === null || isEmpty(value);\n\n// Check if the value is not empty\nexport const checkEmpty = (value: unknown) => !isEmpty(value);\n\nexport const greaterThan = (value: number, comparator: number) => value > comparator;\n\n// Check if a valid date with format MM/DD/YYYY\nexport const validDate = (value: string) => {\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 m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());\n};\n\nexport const equal = (a: unknown, b: unknown) => a === b;\n\nexport const notEqual = (a: unknown, b: unknown) => !equal(a, b);\n\nexport const isNull = (a: unknown) => checkNotEmpty(a);\n\nexport const isNotNull = (a: unknown) => !isNull(a);\n\nexport const isIn = <T,>(a: T, b: T[]) => b.indexOf(a) > -1;\n\nexport const isNotIn = <T,>(a: T, b: T[]) => !isIn(a, b);\n\nexport const greaterThanOrEquals = (value: number, comparator: number) => value >= comparator;\nexport const lessThanOrEquals = (value: number, comparator: number) => value <= comparator;\nexport const startsWith = (value: unknown, comparator: string) => String(value).startsWith(comparator);\nexport const contains = (value: unknown, comparator: string) => 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;AAAA;ACAA,YA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
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/platform.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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;AAAA;ACAA,YAAuB;ADAhB,MAAM,WAAW,OAAO,aAAa,cAAc,WAAW;AAC9D,MAAM,SAAS,OAAO,WAAW,cAAc,SAAS;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,WAAW,OAAO,aAAa,cAAc,WAAW;AAC9D,MAAM,SAAS,OAAO,WAAW,cAAc,SAAS;",
6
6
  "names": []
7
7
  }
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
17
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
18
22
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
23
  mod
20
24
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/props-helpers/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type {} from '@elliemae/ds-props-helpers';\nexport * from '@elliemae/ds-props-helpers';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADCvB,kCAAc,uCADd;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADCvB,kCAAc,uCADd;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/reactTypesUtility.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\n\nconst isElement = (element: Record<string, unknown> | null | undefined) => React.isValidElement(element);\n\nexport const isDOMTypeElement = (element: Record<string, unknown> | null | undefined) =>\n isElement(element) && typeof element?.type === 'string';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAElB,MAAM,YAAY,CAAC,YAAwD,aAAAA,QAAM,eAAe,OAAO;AAEhG,MAAM,mBAAmB,CAAC,YAC/B,UAAU,OAAO,KAAK,OAAO,SAAS,SAAS;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAElB,MAAM,YAAY,CAAC,YAAwD,aAAAA,QAAM,eAAe,OAAO;AAEhG,MAAM,mBAAmB,CAAC,YAC/B,UAAU,OAAO,KAAK,OAAO,SAAS,SAAS;",
6
6
  "names": ["React"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -31,7 +35,7 @@ __export(system_exports, {
31
35
  });
32
36
  module.exports = __toCommonJS(system_exports);
33
37
  var React = __toESM(require("react"));
34
- var import_utils = require("./utils");
38
+ var import_utils = require("./utils.js");
35
39
  const setRef = (ref, value) => {
36
40
  if ((0, import_utils.isFunction)(ref)) {
37
41
  ref(value);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/system.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type React from 'react';\nimport { isFunction } from './utils';\n\ntype AnyRef<T extends HTMLElement> =\n | React.MutableRefObject<T | null>\n | ((_ref: T | null) => void)\n | React.Dispatch<React.SetStateAction<T | null>>\n | false;\n\nexport const setRef = <T extends HTMLElement>(ref: AnyRef<T>, value: T) => {\n if (isFunction(ref)) {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n};\n\nexport const mergeRefs = <T extends HTMLElement>(...refs: AnyRef<T>[]) => {\n const mergeRefsFunc = (node: T | null) => {\n if (!node) return;\n refs.forEach((ref) => setRef(ref, node));\n };\n return mergeRefsFunc;\n};\n\nexport function setMultipleRefs<T = unknown>(\n refs: Array<React.RefObject<T> | React.LegacyRef<T>>,\n): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n}\n\nexport function logger(...args: unknown[]) {\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;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2B;AAQpB,MAAM,SAAS,CAAwB,KAAgB,UAAa;AACzE,UAAI,yBAAW,GAAG,GAAG;AACnB,QAAI,KAAK;AAAA,EACX,WAAW,KAAK;AACd,QAAI,UAAU;AAAA,EAChB;AACF;AAEO,MAAM,YAAY,IAA2B,SAAsB;AACxE,QAAM,gBAAgB,CAAC,SAAmB;AACxC,QAAI,CAAC;AAAM;AACX,SAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAAA,EACzC;AACA,SAAO;AACT;AAEO,SAAS,gBACd,MACsB;AACtB,SAAO,CAAC,UAAU;AAChB,SAAK,QAAQ,CAAC,QAAQ;AACpB,UAAI,OAAO,QAAQ,YAAY;AAC7B,YAAI,KAAK;AAAA,MACX,WAAW,OAAO,MAAM;AACtB,QAAC,IAAyC,UAAU;AAAA,MACtD;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,SAAS,UAAU,MAAiB;AAEzC,UAAQ,IAAI,GAAG,IAAI;AACrB;",
4
+ "sourcesContent": ["import type React from 'react';\nimport { isFunction } from './utils.js';\n\ntype AnyRef<T extends HTMLElement> =\n | React.MutableRefObject<T | null>\n | ((_ref: T | null) => void)\n | React.Dispatch<React.SetStateAction<T | null>>\n | false;\n\nexport const setRef = <T extends HTMLElement>(ref: AnyRef<T>, value: T) => {\n if (isFunction(ref)) {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n};\n\nexport const mergeRefs = <T extends HTMLElement>(...refs: AnyRef<T>[]) => {\n const mergeRefsFunc = (node: T | null) => {\n if (!node) return;\n refs.forEach((ref) => setRef(ref, node));\n };\n return mergeRefsFunc;\n};\n\nexport function setMultipleRefs<T = unknown>(\n refs: Array<React.RefObject<T> | React.LegacyRef<T>>,\n): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n}\n\nexport function logger(...args: unknown[]) {\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;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2B;AAQpB,MAAM,SAAS,CAAwB,KAAgB,UAAa;AACzE,UAAI,yBAAW,GAAG,GAAG;AACnB,QAAI,KAAK;AAAA,EACX,WAAW,KAAK;AACd,QAAI,UAAU;AAAA,EAChB;AACF;AAEO,MAAM,YAAY,IAA2B,SAAsB;AACxE,QAAM,gBAAgB,CAAC,SAAmB;AACxC,QAAI,CAAC;AAAM;AACX,SAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAAA,EACzC;AACA,SAAO;AACT;AAEO,SAAS,gBACd,MACsB;AACtB,SAAO,CAAC,UAAU;AAChB,SAAK,QAAQ,CAAC,QAAQ;AACpB,UAAI,OAAO,QAAQ,YAAY;AAC7B,YAAI,KAAK;AAAA,MACX,WAAW,OAAO,MAAM;AACtB,QAAC,IAAyC,UAAU;AAAA,MACtD;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,SAAS,UAAU,MAAiB;AAEzC,UAAQ,IAAI,GAAG,IAAI;AACrB;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -29,7 +33,7 @@ __export(timeUtils_exports, {
29
33
  });
30
34
  module.exports = __toCommonJS(timeUtils_exports);
31
35
  var React = __toESM(require("react"));
32
- var import_utils = require("./utils");
36
+ var import_utils = require("./utils.js");
33
37
  const getVisibleTimeByFormat = (format) => ({
34
38
  showHours: format.indexOf("H") > -1 || format.indexOf("h") > -1 || format.indexOf("k") > -1,
35
39
  showMinutes: format.indexOf("m") > -1,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/timeUtils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { padStart } from './utils';\n\nexport const getVisibleTimeByFormat = (format: string) => ({\n showHours: format.indexOf('H') > -1 || format.indexOf('h') > -1 || format.indexOf('k') > -1,\n showMinutes: format.indexOf('m') > -1,\n showSeconds: format.indexOf('s') > -1,\n use12Hours: format.indexOf('A') > -1 || format.indexOf('h') > -1 || format.indexOf('a') > -1,\n});\n\nexport const addLeadingZeros = (count: number) => (number: number) => padStart(String(number), count, '0');\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyB;AAElB,MAAM,yBAAyB,CAAC,YAAoB;AAAA,EACzD,WAAW,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI;AAAA,EACzF,aAAa,OAAO,QAAQ,GAAG,IAAI;AAAA,EACnC,aAAa,OAAO,QAAQ,GAAG,IAAI;AAAA,EACnC,YAAY,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI;AAC5F;AAEO,MAAM,kBAAkB,CAAC,UAAkB,CAAC,eAAmB,uBAAS,OAAO,MAAM,GAAG,OAAO,GAAG;",
4
+ "sourcesContent": ["import { padStart } from './utils.js';\n\nexport const getVisibleTimeByFormat = (format: string) => ({\n showHours: format.indexOf('H') > -1 || format.indexOf('h') > -1 || format.indexOf('k') > -1,\n showMinutes: format.indexOf('m') > -1,\n showSeconds: format.indexOf('s') > -1,\n use12Hours: format.indexOf('A') > -1 || format.indexOf('h') > -1 || format.indexOf('a') > -1,\n});\n\nexport const addLeadingZeros = (count: number) => (number: number) => padStart(String(number), count, '0');\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyB;AAElB,MAAM,yBAAyB,CAAC,YAAoB;AAAA,EACzD,WAAW,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI;AAAA,EACzF,aAAa,OAAO,QAAQ,GAAG,IAAI;AAAA,EACnC,aAAa,OAAO,QAAQ,GAAG,IAAI;AAAA,EACnC,YAAY,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI;AAC5F;AAEO,MAAM,kBAAkB,CAAC,UAAkB,CAAC,eAAmB,uBAAS,OAAO,MAAM,GAAG,OAAO,GAAG;",
6
6
  "names": []
7
7
  }
package/dist/cjs/utils.js CHANGED
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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\ntype UnknownFunctionT = (...args: unknown[]) => unknown;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ValidKeys = string | number | symbol;\n\n/**\n * Concatenates classNames from arguments\n *\n * @param {...any} classnames classnames you want to join\n * @returns {string} All classnames string concatenated\n */\nexport const cx = (...classnames: string[]): string => classnames.reduce((result, cn) => `${result} ${cn || ''}`, '');\n\n// if entry exists, remove it, if not, add it\nconst toggleInObject = (obj: Record<string, unknown>, key: string, value: unknown) =>\n obj[key] !== undefined ? omit(obj, [key]) : { ...obj, [key]: value };\n\nconst toggleInArray = (array: unknown[], value: unknown) => (array.indexOf(value) === -1 ? [value] : []);\n\nconst arrayMoveMutate = (array: unknown[], from: number, to: number) => {\n array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);\n};\n\nconst arrayMove = <T,>(array: T[], from: number, to: number): T[] => {\n array = array.slice();\n arrayMoveMutate(array, from, to);\n return array;\n};\n\nconst accessorDefault = <T,>(item: T): T => item;\n\nconst addOrRemove = <T,>(array: T[], item: T, accessor = accessorDefault): T[] => {\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: (UnknownFunctionT | UnknownFunctionT[])[]) {\n return (...args: unknown[]) =>\n fns.forEach((fn) => {\n if (Array.isArray(fn)) runAll(fn);\n if (isFunction(fn)) fn(...args);\n });\n}\n\nexport function hashArray(arr: (ValidKeys | Record<string, ValidKeys>)[], fieldName?: string) {\n return arr.reduce<Record<ValidKeys, boolean>>((result, item) => {\n const newKey: ValidKeys = fieldName && typeof item === 'object' ? item[fieldName] : (item as ValidKeys);\n return {\n ...result,\n [newKey]: true,\n };\n }, {});\n}\n\nexport function safeCall(fun: unknown, ...args: unknown[]) {\n if (isFunction(fun)) {\n fun(...args);\n }\n}\n\nexport const removeUndefinedProperties = (obj: Record<string, unknown>) => {\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;AAAA;ACAA,YAAuB;ADQvB,oBAsCO;AAYA,MAAM,KAAK,IAAI,eAAiC,WAAW,OAAO,CAAC,QAAQ,OAAO,GAAG,UAAU,MAAM,MAAM,EAAE;AAGpH,MAAM,iBAAiB,CAAC,KAA8B,KAAa,UACjE,IAAI,SAAS,aAAY,oBAAK,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,MAAM;AAErE,MAAM,gBAAgB,CAAC,OAAkB,UAAoB,MAAM,QAAQ,KAAK,MAAM,KAAK,CAAC,KAAK,IAAI,CAAC;AAEtG,MAAM,kBAAkB,CAAC,OAAkB,MAAc,OAAe;AACtE,QAAM,OAAO,KAAK,IAAI,MAAM,SAAS,KAAK,IAAI,GAAG,MAAM,OAAO,MAAM,CAAC,EAAE,E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,CAAC,GAAG,OAAO,IAAI;AACxB;AAEO,SAAS,UAAU,KAAgD;AACxE,SAAO,IAAI,SACT,IAAI,QAAQ,CAAC,OAAO;AAClB,QAAI,MAAM,QAAQ,EAAE;AAAG,aAAO,EAAE;AAChC,YAAI,0BAAW,EAAE;AAAG,SAAG,GAAG,IAAI;AAAA,EAChC,CAAC;AACL;AAEO,SAAS,UAAU,KAAgD,WAAoB;AAC5F,SAAO,IAAI,OAAmC,CAAC,QAAQ,SAAS;AAC9D,UAAM,SAAoB,aAAa,OAAO,SAAS,WAAW,KAAK,SAAS,IAAK;AACrF,WAAO;AAAA,MACL,GAAG;AAAA,MACH,CAAC,MAAM,GAAG;AAAA,IACZ;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAEO,SAAS,SAAS,QAAiB,MAAiB;AACzD,UAAI,0BAAW,GAAG,GAAG;AACnB,QAAI,GAAG,IAAI;AAAA,EACb;AACF;AAEO,MAAM,4BAA4B,CAAC,QAAiC;AACzE,QAAM,cAAc,EAAE,GAAG,IAAI;AAC7B,SAAO,KAAK,GAAG,EAAE,QAAQ,CAAC,QAAQ,YAAY,GAAG,MAAM,UAAa,OAAO,YAAY,GAAG,CAAC;AAC3F,SAAO;AACT;AAEA,IAAO,gBAAQ,CAAC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -30,7 +34,7 @@ __export(validations_exports, {
30
34
  });
31
35
  module.exports = __toCommonJS(validations_exports);
32
36
  var React = __toESM(require("react"));
33
- var import_operators = require("./operators");
37
+ var import_operators = require("./operators.js");
34
38
  const isRequired = ({ value, help = "Field is Required" }) => ({
35
39
  payload: help,
36
40
  error: (0, import_operators.checkNotEmpty)(value)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/validations.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { checkNotEmpty, greaterThan, validDate } from './operators';\n\ninterface IsRequiredArg {\n value: unknown;\n help?: string;\n}\n\ninterface IsGreaterThanArg {\n value: number;\n help?: string;\n comparator?: number;\n}\n\ninterface IsValidDateArg {\n value: string;\n help?: string;\n format?: string;\n}\n\nexport const isRequired = ({ value, help = 'Field is Required' }: IsRequiredArg) => ({\n payload: help,\n error: checkNotEmpty(value),\n});\n\nexport const isGreaterThan = ({ value, help, comparator = 0 }: IsGreaterThanArg) => {\n const helpMessage = help ?? `Max value ${comparator}`;\n return {\n payload: helpMessage,\n error: greaterThan(value, comparator),\n };\n};\n\nexport const isValidDate = ({ value, help, format = 'MM/DD/AAA' }: IsValidDateArg) => {\n const helpMessage = help ?? `Valid Date is required ${format}`;\n return {\n payload: helpMessage,\n error: !validDate(value),\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAsD;AAmB/C,MAAM,aAAa,CAAC,EAAE,OAAO,OAAO,oBAAoB,OAAsB;AAAA,EACnF,SAAS;AAAA,EACT,WAAO,gCAAc,KAAK;AAC5B;AAEO,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,aAAa,EAAE,MAAwB;AAClF,QAAM,cAAc,QAAQ,aAAa;AACzC,SAAO;AAAA,IACL,SAAS;AAAA,IACT,WAAO,8BAAY,OAAO,UAAU;AAAA,EACtC;AACF;AAEO,MAAM,cAAc,CAAC,EAAE,OAAO,MAAM,SAAS,YAAY,MAAsB;AACpF,QAAM,cAAc,QAAQ,0BAA0B;AACtD,SAAO;AAAA,IACL,SAAS;AAAA,IACT,OAAO,KAAC,4BAAU,KAAK;AAAA,EACzB;AACF;",
4
+ "sourcesContent": ["import { checkNotEmpty, greaterThan, validDate } from './operators.js';\n\ninterface IsRequiredArg {\n value: unknown;\n help?: string;\n}\n\ninterface IsGreaterThanArg {\n value: number;\n help?: string;\n comparator?: number;\n}\n\ninterface IsValidDateArg {\n value: string;\n help?: string;\n format?: string;\n}\n\nexport const isRequired = ({ value, help = 'Field is Required' }: IsRequiredArg) => ({\n payload: help,\n error: checkNotEmpty(value),\n});\n\nexport const isGreaterThan = ({ value, help, comparator = 0 }: IsGreaterThanArg) => {\n const helpMessage = help ?? `Max value ${comparator}`;\n return {\n payload: helpMessage,\n error: greaterThan(value, comparator),\n };\n};\n\nexport const isValidDate = ({ value, help, format = 'MM/DD/AAA' }: IsValidDateArg) => {\n const helpMessage = help ?? `Valid Date is required ${format}`;\n return {\n payload: helpMessage,\n error: !validDate(value),\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAsD;AAmB/C,MAAM,aAAa,CAAC,EAAE,OAAO,OAAO,oBAAoB,OAAsB;AAAA,EACnF,SAAS;AAAA,EACT,WAAO,gCAAc,KAAK;AAC5B;AAEO,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,aAAa,EAAE,MAAwB;AAClF,QAAM,cAAc,QAAQ,aAAa;AACzC,SAAO;AAAA,IACL,SAAS;AAAA,IACT,WAAO,8BAAY,OAAO,UAAU;AAAA,EACtC;AACF;AAEO,MAAM,cAAc,CAAC,EAAE,OAAO,MAAM,SAAS,YAAY,MAAsB;AACpF,QAAM,cAAc,QAAQ,0BAA0B;AACtD,SAAO;AAAA,IACL,SAAS;AAAA,IACT,OAAO,KAAC,4BAAU,KAAK;AAAA,EACzB;AACF;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/compose.tsx"],
4
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\ntype UnknownFunctionT = (...args: unknown[]) => unknown;\n\nexport const compose = (...funcs: UnknownFunctionT[]): UnknownFunctionT => {\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(\n (a, b) =>\n (...args) =>\n a(b(...args)),\n );\n};\n\nexport default compose;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACahB,MAAM,UAAU,IAAI,UAAgD;AACzE,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,CAAC,QAAQ;AAAA,EAClB;AAEA,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,MAAM;AAAA,EACf;AAEA,SAAO,MAAM;AAAA,IACX,CAAC,GAAG,MACF,IAAI,SACF,EAAE,EAAE,GAAG,IAAI,CAAC;AAAA,EAClB;AACF;AAEA,IAAO,kBAAQ;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACahB,MAAM,UAAU,IAAI,UAAgD;AACzE,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,CAAC,QAAQ;AAAA,EAClB;AAEA,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,MAAM,CAAC;AAAA,EAChB;AAEA,SAAO,MAAM;AAAA,IACX,CAAC,GAAG,MACF,IAAI,SACF,EAAE,EAAE,GAAG,IAAI,CAAC;AAAA,EAClB;AACF;AAEA,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- export * from "./reactTypesUtility";
3
- export * from "./scrollingTimer";
4
- export * from "./useParentElement";
5
- export * from "./useSetRef";
6
- export * from "./useUncontrolled";
7
- export * from "./useWindowSize";
2
+ export * from "./reactTypesUtility.js";
3
+ export * from "./scrollingTimer.js";
4
+ export * from "./useParentElement.js";
5
+ export * from "./useSetRef.js";
6
+ export * from "./useUncontrolled.js";
7
+ export * from "./useWindowSize.js";
8
8
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './reactTypesUtility';\nexport * from './scrollingTimer';\nexport * from './useParentElement';\nexport * from './useSetRef';\nexport * from './useUncontrolled';\nexport * from './useWindowSize';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './reactTypesUtility.js';\nexport * from './scrollingTimer.js';\nexport * from './useParentElement.js';\nexport * from './useSetRef.js';\nexport * from './useUncontrolled.js';\nexport * from './useWindowSize.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React2 from "react";
3
- import { deprecatedMsg } from "./deprecatedMsg";
3
+ import { deprecatedMsg } from "./deprecatedMsg.js";
4
4
  function isClassComponent(component) {
5
5
  console.warn(`isClassComponent ${deprecatedMsg}`);
6
6
  return !!(typeof component === "function" && !!component.prototype.isReactComponent);