@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.
- package/dist/cjs/capitalize.js +35 -0
- package/dist/cjs/capitalize.js.map +7 -0
- package/dist/cjs/compose.js +45 -0
- package/dist/cjs/compose.js.map +7 -0
- package/dist/cjs/getComponentFromProps.js +57 -0
- package/dist/cjs/getComponentFromProps.js.map +7 -0
- package/dist/cjs/hooks/index.js +75 -0
- package/dist/cjs/hooks/index.js.map +7 -0
- package/dist/cjs/hooks/useCallbackAfterRender.js +45 -0
- package/dist/cjs/hooks/useCallbackAfterRender.js.map +7 -0
- package/dist/cjs/hooks/useCancellableDelayedCallback.js +51 -0
- package/dist/cjs/hooks/useCancellableDelayedCallback.js.map +7 -0
- package/dist/cjs/hooks/useDerivedStateFromProps.js +67 -0
- package/dist/cjs/hooks/useDerivedStateFromProps.js.map +7 -0
- package/dist/cjs/hooks/useExecutionTimer.js +50 -0
- package/dist/cjs/hooks/useExecutionTimer.js.map +7 -0
- package/dist/cjs/hooks/useExpandState.js +137 -0
- package/dist/cjs/hooks/useExpandState.js.map +7 -0
- package/dist/cjs/hooks/useFocusTrap.js +49 -0
- package/dist/cjs/hooks/useFocusTrap.js.map +7 -0
- package/dist/cjs/hooks/useHotkeys.js +45 -0
- package/dist/cjs/hooks/useHotkeys.js.map +7 -0
- package/dist/cjs/hooks/useHoverHandlersDelay.js +58 -0
- package/dist/cjs/hooks/useHoverHandlersDelay.js.map +7 -0
- package/dist/cjs/hooks/useIsShowingEllipsis.js +58 -0
- package/dist/cjs/hooks/useIsShowingEllipsis.js.map +7 -0
- package/dist/cjs/hooks/useOnElementResize.js +55 -0
- package/dist/cjs/hooks/useOnElementResize.js.map +7 -0
- package/dist/cjs/hooks/useParentElement.js +43 -0
- package/dist/cjs/hooks/useParentElement.js.map +7 -0
- package/dist/cjs/hooks/usePrevious.js +44 -0
- package/dist/cjs/hooks/usePrevious.js.map +7 -0
- package/dist/cjs/hooks/useResizeObserver.js +60 -0
- package/dist/cjs/hooks/useResizeObserver.js.map +7 -0
- package/dist/cjs/hooks/useSetRef.js +42 -0
- package/dist/cjs/hooks/useSetRef.js.map +7 -0
- package/dist/cjs/hooks/useShouldRecalculate.js +44 -0
- package/dist/cjs/hooks/useShouldRecalculate.js.map +7 -0
- package/dist/cjs/hooks/useWindowScrollerList.js +83 -0
- package/dist/cjs/hooks/useWindowScrollerList.js.map +7 -0
- package/dist/cjs/hooks/useWindowSize.js +57 -0
- package/dist/cjs/hooks/useWindowSize.js.map +7 -0
- package/dist/cjs/index.js +148 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/onClickHandlerForNonInteractiveElements.js +49 -0
- package/dist/cjs/onClickHandlerForNonInteractiveElements.js.map +7 -0
- package/dist/cjs/operators.js +68 -0
- package/dist/cjs/operators.js.map +7 -0
- package/dist/cjs/platform.js +37 -0
- package/dist/cjs/platform.js.map +7 -0
- package/dist/cjs/reactTypesUtility.js +58 -0
- package/dist/cjs/reactTypesUtility.js.map +7 -0
- package/dist/cjs/scrollingTimer.js +46 -0
- package/dist/cjs/scrollingTimer.js.map +7 -0
- package/dist/cjs/system.js +60 -0
- package/dist/cjs/system.js.map +7 -0
- package/dist/cjs/timeUtils.js +43 -0
- package/dist/cjs/timeUtils.js.map +7 -0
- package/dist/cjs/utils.js +143 -0
- package/dist/cjs/utils.js.map +7 -0
- package/dist/cjs/validations.js +57 -0
- package/dist/cjs/validations.js.map +7 -0
- package/dist/esm/capitalize.js +6 -0
- package/dist/esm/capitalize.js.map +7 -0
- package/dist/esm/compose.js +16 -0
- package/dist/esm/compose.js.map +7 -0
- package/dist/esm/getComponentFromProps.js +30 -0
- package/dist/esm/getComponentFromProps.js.map +7 -0
- package/dist/esm/hooks/index.js +46 -0
- package/dist/esm/hooks/index.js.map +7 -0
- package/dist/esm/hooks/useCallbackAfterRender.js +16 -0
- package/dist/esm/hooks/useCallbackAfterRender.js.map +7 -0
- package/dist/esm/hooks/useCancellableDelayedCallback.js +22 -0
- package/dist/esm/hooks/useCancellableDelayedCallback.js.map +7 -0
- package/dist/esm/hooks/useDerivedStateFromProps.js +38 -0
- package/dist/esm/hooks/useDerivedStateFromProps.js.map +7 -0
- package/dist/esm/hooks/useExecutionTimer.js +21 -0
- package/dist/esm/hooks/useExecutionTimer.js.map +7 -0
- package/dist/esm/hooks/useExpandState.js +110 -0
- package/dist/esm/hooks/useExpandState.js.map +7 -0
- package/dist/esm/hooks/useFocusTrap.js +20 -0
- package/dist/esm/hooks/useFocusTrap.js.map +7 -0
- package/dist/esm/hooks/useHotkeys.js +16 -0
- package/dist/esm/hooks/useHotkeys.js.map +7 -0
- package/{esm → dist/esm}/hooks/useHoverHandlersDelay.js +15 -12
- package/dist/esm/hooks/useHoverHandlersDelay.js.map +7 -0
- package/dist/esm/hooks/useIsShowingEllipsis.js +29 -0
- package/dist/esm/hooks/useIsShowingEllipsis.js.map +7 -0
- package/dist/esm/hooks/useOnElementResize.js +26 -0
- package/dist/esm/hooks/useOnElementResize.js.map +7 -0
- package/dist/esm/hooks/useParentElement.js +14 -0
- package/dist/esm/hooks/useParentElement.js.map +7 -0
- package/dist/esm/hooks/usePrevious.js +15 -0
- package/dist/esm/hooks/usePrevious.js.map +7 -0
- package/dist/esm/hooks/useResizeObserver.js +31 -0
- package/dist/esm/hooks/useResizeObserver.js.map +7 -0
- package/dist/esm/hooks/useSetRef.js +13 -0
- package/dist/esm/hooks/useSetRef.js.map +7 -0
- package/dist/esm/hooks/useShouldRecalculate.js +15 -0
- package/dist/esm/hooks/useShouldRecalculate.js.map +7 -0
- package/{esm → dist/esm}/hooks/useWindowScrollerList.js +20 -29
- package/dist/esm/hooks/useWindowScrollerList.js.map +7 -0
- package/dist/esm/hooks/useWindowSize.js +28 -0
- package/dist/esm/hooks/useWindowSize.js.map +7 -0
- package/dist/esm/index.js +210 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/onClickHandlerForNonInteractiveElements.js +20 -0
- package/dist/esm/onClickHandlerForNonInteractiveElements.js.map +7 -0
- package/dist/esm/operators.js +39 -0
- package/dist/esm/operators.js.map +7 -0
- package/dist/esm/platform.js +8 -0
- package/dist/esm/platform.js.map +7 -0
- package/dist/esm/reactTypesUtility.js +29 -0
- package/dist/esm/reactTypesUtility.js.map +7 -0
- package/dist/esm/scrollingTimer.js +17 -0
- package/dist/esm/scrollingTimer.js.map +7 -0
- package/dist/esm/system.js +31 -0
- package/dist/esm/system.js.map +7 -0
- package/dist/esm/timeUtils.js +14 -0
- package/dist/esm/timeUtils.js.map +7 -0
- package/dist/esm/utils.js +154 -0
- package/dist/esm/utils.js.map +7 -0
- package/dist/esm/validations.js +28 -0
- package/dist/esm/validations.js.map +7 -0
- package/package.json +82 -69
- package/cjs/capitalize.js +0 -7
- package/cjs/compose.js +0 -38
- package/cjs/getComponentFromProps.js +0 -30
- package/cjs/hooks/index.js +0 -61
- package/cjs/hooks/useCancellableDelayedCallback.js +0 -26
- package/cjs/hooks/useDerivedStateFromProps.js +0 -56
- package/cjs/hooks/useExecutionTimer.js +0 -31
- package/cjs/hooks/useExpandState.js +0 -133
- package/cjs/hooks/useHotkeys.js +0 -25
- package/cjs/hooks/useHoverHandlersDelay.js +0 -28
- package/cjs/hooks/useOnElementResize.js +0 -37
- package/cjs/hooks/useParentElement.js +0 -16
- package/cjs/hooks/usePrevious.js +0 -13
- package/cjs/hooks/useResizeObserver.js +0 -33
- package/cjs/hooks/useSetRef.js +0 -15
- package/cjs/hooks/useShouldRecalculate.js +0 -17
- package/cjs/hooks/useWindowScrollerList.js +0 -65
- package/cjs/hooks/useWindowSize.js +0 -27
- package/cjs/index.js +0 -266
- package/cjs/onClickHandlerForNonInteractiveElements.js +0 -22
- package/cjs/operators.js +0 -63
- package/cjs/platform.js +0 -9
- package/cjs/reactTypesUtility.js +0 -35
- package/cjs/scrollingTimer.js +0 -24
- package/cjs/system.js +0 -43
- package/cjs/timeUtils.js +0 -25
- package/cjs/utils.js +0 -263
- package/cjs/validations.js +0 -44
- package/esm/capitalize.js +0 -3
- package/esm/compose.js +0 -34
- package/esm/getComponentFromProps.js +0 -23
- package/esm/hooks/index.js +0 -18
- package/esm/hooks/useCancellableDelayedCallback.js +0 -24
- package/esm/hooks/useDerivedStateFromProps.js +0 -54
- package/esm/hooks/useExecutionTimer.js +0 -29
- package/esm/hooks/useExpandState.js +0 -127
- package/esm/hooks/useHotkeys.js +0 -19
- package/esm/hooks/useOnElementResize.js +0 -33
- package/esm/hooks/useParentElement.js +0 -12
- package/esm/hooks/usePrevious.js +0 -11
- package/esm/hooks/useResizeObserver.js +0 -26
- package/esm/hooks/useSetRef.js +0 -11
- package/esm/hooks/useShouldRecalculate.js +0 -15
- package/esm/hooks/useWindowSize.js +0 -25
- package/esm/index.js +0 -31
- package/esm/onClickHandlerForNonInteractiveElements.js +0 -20
- package/esm/operators.js +0 -46
- package/esm/platform.js +0 -4
- package/esm/reactTypesUtility.js +0 -22
- package/esm/scrollingTimer.js +0 -20
- package/esm/system.js +0 -37
- package/esm/timeUtils.js +0 -20
- package/esm/utils.js +0 -99
- package/esm/validations.js +0 -38
- package/types/capitalize.d.ts +0 -1
- package/types/compose.d.ts +0 -11
- package/types/getComponentFromProps.d.ts +0 -2
- package/types/hooks/index.d.ts +0 -18
- package/types/hooks/useCancellableDelayedCallback.d.ts +0 -1
- package/types/hooks/useDerivedStateFromProps.d.ts +0 -1
- package/types/hooks/useExecutionTimer.d.ts +0 -1
- package/types/hooks/useExpandState.d.ts +0 -22
- package/types/hooks/useHotkeys.d.ts +0 -5
- package/types/hooks/useHoverHandlersDelay.d.ts +0 -9
- package/types/hooks/useOnElementResize.d.ts +0 -2
- package/types/hooks/useParentElement.d.ts +0 -1
- package/types/hooks/usePrevious.d.ts +0 -2
- package/types/hooks/useResizeObserver.d.ts +0 -2
- package/types/hooks/useSetRef.d.ts +0 -2
- package/types/hooks/useShouldRecalculate.d.ts +0 -1
- package/types/hooks/useWindowScrollerList.d.ts +0 -4
- package/types/hooks/useWindowSize.d.ts +0 -1
- package/types/index.d.ts +0 -13
- package/types/onClickHandlerForNonInteractiveElements.d.ts +0 -12
- package/types/operators.d.ts +0 -31
- package/types/platform.d.ts +0 -2
- package/types/reactTypesUtility.d.ts +0 -6
- package/types/scrollingTimer.d.ts +0 -1
- package/types/system.d.ts +0 -3
- package/types/timeUtils.d.ts +0 -7
- package/types/utils.d.ts +0 -23
- package/types/validations.d.ts +0 -23
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useResizeObserver.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useState } from 'react';\nimport raf from 'raf';\nimport ResizeObserver from 'resize-observer-polyfill';\n\nexport const useResizeObserver = (handler, el) => {\n const [node, setRef] = useState(el);\n\n const resizeObserver = 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.offsetWidth,\n height: entry.target.offsetHeight,\n },\n entry.target,\n ),\n );\n });\n\n const htmlEl = el || node;\n\n useEffect(() => {\n if (htmlEl) resizeObserver.observe(htmlEl);\n return () => htmlEl && resizeObserver.unobserve(htmlEl);\n }, [htmlEl]);\n\n return [setRef];\n};\n\nexport default useResizeObserver;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AACpC,iBAAgB;AAChB,sCAA2B;AAEpB,MAAM,oBAAoB,CAAC,SAAS,OAAO;AAChD,QAAM,CAAC,MAAM,UAAU,2BAAS;AAEhC,QAAM,iBAAiB,IAAI,wCAAe,aAAW;AACnD,QAAI,CAAC,MAAM,QAAQ;AAAU;AAC7B,QAAI,CAAC,QAAQ;AAAQ;AACrB,UAAM,QAAQ,QAAQ;AAGtB,4BAAI,MACF,QACE;AAAA,MACE,OAAO,MAAM,OAAO;AAAA,MACpB,QAAQ,MAAM,OAAO;AAAA,OAEvB,MAAM;AAAA;AAKZ,QAAM,SAAS,MAAM;AAErB,8BAAU,MAAM;AACd,QAAI;AAAQ,qBAAe,QAAQ;AACnC,WAAO,MAAM,UAAU,eAAe,UAAU;AAAA,KAC/C,CAAC;AAEJ,SAAO,CAAC;AAAA;AAGV,IAAO,4BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 useSetRef_exports = {};
|
|
29
|
+
__export(useSetRef_exports, {
|
|
30
|
+
useSetRef: () => useSetRef
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = require("react");
|
|
34
|
+
const useSetRef = (initial) => {
|
|
35
|
+
const ref = (0, import_react.useRef)(initial);
|
|
36
|
+
const setRef = (0, import_react.useCallback)((node) => {
|
|
37
|
+
ref.current = node;
|
|
38
|
+
}, []);
|
|
39
|
+
return [ref, setRef];
|
|
40
|
+
};
|
|
41
|
+
module.exports = __toCommonJS(useSetRef_exports);
|
|
42
|
+
//# sourceMappingURL=useSetRef.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useSetRef.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useCallback, useRef } from 'react';\n\nexport const useSetRef = (initial) => {\n const ref = useRef(initial);\n const setRef = useCallback((node) => {\n ref.current = node;\n }, []);\n return [ref, setRef];\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AAE7B,MAAM,YAAY,CAAC,YAAY;AACpC,QAAM,MAAM,yBAAO;AACnB,QAAM,SAAS,8BAAY,CAAC,SAAS;AACnC,QAAI,UAAU;AAAA,KACb;AACH,SAAO,CAAC,KAAK;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 useShouldRecalculate_exports = {};
|
|
29
|
+
__export(useShouldRecalculate_exports, {
|
|
30
|
+
default: () => useShouldRecalculate_default,
|
|
31
|
+
useShouldRecalculate: () => useShouldRecalculate
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_react = require("react");
|
|
35
|
+
const useShouldRecalculate = (bool) => {
|
|
36
|
+
const prevValueRef = (0, import_react.useRef)(0);
|
|
37
|
+
if (!bool) {
|
|
38
|
+
prevValueRef.current += 1;
|
|
39
|
+
}
|
|
40
|
+
return prevValueRef.current;
|
|
41
|
+
};
|
|
42
|
+
var useShouldRecalculate_default = useShouldRecalculate;
|
|
43
|
+
module.exports = __toCommonJS(useShouldRecalculate_exports);
|
|
44
|
+
//# sourceMappingURL=useShouldRecalculate.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useShouldRecalculate.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useRef } from 'react';\n\nexport const useShouldRecalculate = (bool) => {\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;ACAA,YAAuB;ADAvB,mBAAuB;AAEhB,MAAM,uBAAuB,CAAC,SAAS;AAC5C,QAAM,eAAe,yBAAO;AAC5B,MAAI,CAAC,MAAM;AAET,iBAAa,WAAW;AAAA;AAE1B,SAAO,aAAa;AAAA;AAGtB,IAAO,+BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var useWindowScrollerList_exports = {};
|
|
29
|
+
__export(useWindowScrollerList_exports, {
|
|
30
|
+
default: () => useWindowScrollerList_default,
|
|
31
|
+
useWindowScrollerList: () => useWindowScrollerList
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_react = require("react");
|
|
35
|
+
function getScrollOffset(element = { scrollTop: 0, scrollLeft: 0 }) {
|
|
36
|
+
return {
|
|
37
|
+
top: element.scrollTop,
|
|
38
|
+
left: element.scrollLeft
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function getPositionOffset(listEl, scrollableEl) {
|
|
42
|
+
const scrollOffset = getScrollOffset(scrollableEl);
|
|
43
|
+
const elementRect = listEl.getBoundingClientRect();
|
|
44
|
+
const containerRect = scrollableEl.getBoundingClientRect();
|
|
45
|
+
return {
|
|
46
|
+
top: elementRect.top + scrollOffset.top - containerRect.top,
|
|
47
|
+
left: elementRect.left + scrollOffset.top - containerRect.left
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function isParent(parentNode, childNode) {
|
|
51
|
+
return childNode.parentNode === parentNode || childNode.parentNode && isParent(parentNode, childNode.parentNode);
|
|
52
|
+
}
|
|
53
|
+
const useWindowScrollerList = ({ listInstance, outerListRef }) => {
|
|
54
|
+
const scrollableParent = (0, import_react.useRef)();
|
|
55
|
+
const listOffset = (0, import_react.useRef)();
|
|
56
|
+
const getElementOffset = () => {
|
|
57
|
+
listOffset.current = getPositionOffset(outerListRef.current, scrollableParent.current);
|
|
58
|
+
};
|
|
59
|
+
const handleScroll = (e) => {
|
|
60
|
+
if (!scrollableParent.current) {
|
|
61
|
+
const containerTarget = e.target === document ? document.body : e.target;
|
|
62
|
+
scrollableParent.current = isParent(containerTarget, outerListRef.current) && containerTarget;
|
|
63
|
+
}
|
|
64
|
+
if (!scrollableParent.current)
|
|
65
|
+
return;
|
|
66
|
+
getElementOffset();
|
|
67
|
+
const scrollOffset = getScrollOffset(scrollableParent.current);
|
|
68
|
+
const scrollTop = Math.max(0, scrollOffset.top - listOffset.current.top);
|
|
69
|
+
if (listInstance.current)
|
|
70
|
+
listInstance.current.scrollTo(scrollTop);
|
|
71
|
+
};
|
|
72
|
+
(0, import_react.useEffect)(() => {
|
|
73
|
+
window.addEventListener("scroll", handleScroll, true);
|
|
74
|
+
window.addEventListener("resize", getElementOffset, true);
|
|
75
|
+
return () => {
|
|
76
|
+
window.removeEventListener("scroll", handleScroll, true);
|
|
77
|
+
window.removeEventListener("resize", getElementOffset, true);
|
|
78
|
+
};
|
|
79
|
+
}, []);
|
|
80
|
+
};
|
|
81
|
+
var useWindowScrollerList_default = useWindowScrollerList;
|
|
82
|
+
module.exports = __toCommonJS(useWindowScrollerList_exports);
|
|
83
|
+
//# sourceMappingURL=useWindowScrollerList.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useWindowScrollerList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useRef } from 'react';\n\nfunction getScrollOffset(element = { scrollTop: 0, scrollLeft: 0 }) {\n return {\n top: element.scrollTop,\n left: element.scrollLeft,\n };\n}\n\nfunction getPositionOffset(listEl, scrollableEl) {\n const scrollOffset = getScrollOffset(scrollableEl);\n const elementRect = listEl.getBoundingClientRect();\n const containerRect = scrollableEl.getBoundingClientRect();\n return {\n top: elementRect.top + scrollOffset.top - containerRect.top,\n left: elementRect.left + scrollOffset.top - containerRect.left,\n };\n}\n\nfunction isParent(parentNode, childNode) {\n return (\n childNode.parentNode === parentNode ||\n (childNode.parentNode && isParent(parentNode, childNode.parentNode))\n );\n}\n\nexport const useWindowScrollerList = ({ listInstance, outerListRef }) => {\n const scrollableParent = useRef();\n const listOffset = useRef();\n\n const getElementOffset = () => {\n listOffset.current = getPositionOffset(\n outerListRef.current,\n scrollableParent.current,\n );\n };\n\n const handleScroll = e => {\n if (!scrollableParent.current) {\n const containerTarget = e.target === document ? document.body : e.target;\n scrollableParent.current =\n isParent(containerTarget, outerListRef.current) && containerTarget;\n }\n\n if (!scrollableParent.current) return;\n\n getElementOffset();\n\n const scrollOffset = getScrollOffset(scrollableParent.current);\n const scrollTop = Math.max(0, scrollOffset.top - listOffset.current.top);\n if (listInstance.current) listInstance.current.scrollTo(scrollTop);\n };\n\n useEffect(() => {\n window.addEventListener('scroll', handleScroll, true);\n window.addEventListener('resize', getElementOffset, true);\n return () => {\n window.removeEventListener('scroll', handleScroll, true);\n window.removeEventListener('resize', getElementOffset, true);\n };\n }, []);\n};\n\nexport default useWindowScrollerList;", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAElC,yBAAyB,UAAU,EAAE,WAAW,GAAG,YAAY,KAAK;AAClE,SAAO;AAAA,IACL,KAAK,QAAQ;AAAA,IACb,MAAM,QAAQ;AAAA;AAAA;AAIlB,2BAA2B,QAAQ,cAAc;AAC/C,QAAM,eAAe,gBAAgB;AACrC,QAAM,cAAc,OAAO;AAC3B,QAAM,gBAAgB,aAAa;AACnC,SAAO;AAAA,IACL,KAAK,YAAY,MAAM,aAAa,MAAM,cAAc;AAAA,IACxD,MAAM,YAAY,OAAO,aAAa,MAAM,cAAc;AAAA;AAAA;AAI9D,kBAAkB,YAAY,WAAW;AACvC,SACE,UAAU,eAAe,cACxB,UAAU,cAAc,SAAS,YAAY,UAAU;AAAA;AAIrD,MAAM,wBAAwB,CAAC,EAAE,cAAc,mBAAmB;AACvE,QAAM,mBAAmB;AACzB,QAAM,aAAa;AAEnB,QAAM,mBAAmB,MAAM;AAC7B,eAAW,UAAU,kBACnB,aAAa,SACb,iBAAiB;AAAA;AAIrB,QAAM,eAAe,OAAK;AACxB,QAAI,CAAC,iBAAiB,SAAS;AAC7B,YAAM,kBAAkB,EAAE,WAAW,WAAW,SAAS,OAAO,EAAE;AAClE,uBAAiB,UACf,SAAS,iBAAiB,aAAa,YAAY;AAAA;AAGvD,QAAI,CAAC,iBAAiB;AAAS;AAE/B;AAEA,UAAM,eAAe,gBAAgB,iBAAiB;AACtD,UAAM,YAAY,KAAK,IAAI,GAAG,aAAa,MAAM,WAAW,QAAQ;AACpE,QAAI,aAAa;AAAS,mBAAa,QAAQ,SAAS;AAAA;AAG1D,8BAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,cAAc;AAChD,WAAO,iBAAiB,UAAU,kBAAkB;AACpD,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,cAAc;AACnD,aAAO,oBAAoB,UAAU,kBAAkB;AAAA;AAAA,KAExD;AAAA;AAGL,IAAO,gCAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var useWindowSize_exports = {};
|
|
29
|
+
__export(useWindowSize_exports, {
|
|
30
|
+
default: () => useWindowSize_default,
|
|
31
|
+
useWindowSize: () => useWindowSize
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_react = require("react");
|
|
35
|
+
const useWindowSize = () => {
|
|
36
|
+
const [size, setSize] = (0, import_react.useState)([0, 0]);
|
|
37
|
+
(0, import_react.useLayoutEffect)(() => {
|
|
38
|
+
if (!window)
|
|
39
|
+
return false;
|
|
40
|
+
function updateSize() {
|
|
41
|
+
setSize([window.innerWidth, window.innerHeight]);
|
|
42
|
+
}
|
|
43
|
+
window.addEventListener("resize", updateSize);
|
|
44
|
+
window.addEventListener("orientationchange", updateSize);
|
|
45
|
+
updateSize();
|
|
46
|
+
return () => {
|
|
47
|
+
window.removeEventListener("resize", updateSize);
|
|
48
|
+
window.removeEventListener("orientationchange", updateSize);
|
|
49
|
+
};
|
|
50
|
+
}, []);
|
|
51
|
+
if (!window)
|
|
52
|
+
return false;
|
|
53
|
+
return size;
|
|
54
|
+
};
|
|
55
|
+
var useWindowSize_default = useWindowSize;
|
|
56
|
+
module.exports = __toCommonJS(useWindowSize_exports);
|
|
57
|
+
//# sourceMappingURL=useWindowSize.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useWindowSize.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useLayoutEffect, useState } from 'react';\n\nexport const useWindowSize = () => {\n const [size, setSize] = useState([0, 0]);\n useLayoutEffect(() => {\n if (!window) return false;\n function updateSize() {\n setSize([window.innerWidth, window.innerHeight]);\n }\n window.addEventListener('resize', updateSize);\n window.addEventListener('orientationchange', updateSize);\n updateSize();\n return () => {\n window.removeEventListener('resize', updateSize);\n window.removeEventListener('orientationchange', updateSize);\n };\n }, []);\n if (!window) return false;\n return size;\n};\n\nexport default useWindowSize;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA0C;AAEnC,MAAM,gBAAgB,MAAM;AACjC,QAAM,CAAC,MAAM,WAAW,2BAAS,CAAC,GAAG;AACrC,oCAAgB,MAAM;AACpB,QAAI,CAAC;AAAQ,aAAO;AACpB,0BAAsB;AACpB,cAAQ,CAAC,OAAO,YAAY,OAAO;AAAA;AAErC,WAAO,iBAAiB,UAAU;AAClC,WAAO,iBAAiB,qBAAqB;AAC7C;AACA,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU;AACrC,aAAO,oBAAoB,qBAAqB;AAAA;AAAA,KAEjD;AACH,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO;AAAA;AAGT,IAAO,wBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
DOCUMENT: () => import_platform.DOCUMENT,
|
|
31
|
+
WINDOW: () => import_platform.WINDOW,
|
|
32
|
+
addLeadingZeros: () => import_timeUtils.addLeadingZeros,
|
|
33
|
+
addOrRemove: () => import_utils.addOrRemove,
|
|
34
|
+
arrayMove: () => import_utils.arrayMove,
|
|
35
|
+
capitalize: () => import_capitalize.capitalize,
|
|
36
|
+
checkEmpty: () => import_operators.checkEmpty,
|
|
37
|
+
checkNotEmpty: () => import_operators.checkNotEmpty,
|
|
38
|
+
cloneDeep: () => import_utils.cloneDeep,
|
|
39
|
+
compose: () => import_compose.compose,
|
|
40
|
+
contains: () => import_operators.contains,
|
|
41
|
+
curry: () => import_utils.curry,
|
|
42
|
+
cx: () => import_utils.cx,
|
|
43
|
+
debounce: () => import_utils.debounce,
|
|
44
|
+
differenceBy: () => import_utils.differenceBy,
|
|
45
|
+
differenceWith: () => import_utils.differenceWith,
|
|
46
|
+
equal: () => import_operators.equal,
|
|
47
|
+
filter: () => import_utils.filter,
|
|
48
|
+
findIndex: () => import_utils.findIndex,
|
|
49
|
+
get: () => import_utils.get,
|
|
50
|
+
getComponentFromProps: () => import_getComponentFromProps.default,
|
|
51
|
+
getVisibleTimeByFormat: () => import_timeUtils.getVisibleTimeByFormat,
|
|
52
|
+
greaterThan: () => import_operators.greaterThan,
|
|
53
|
+
greaterThanOrEquals: () => import_operators.greaterThanOrEquals,
|
|
54
|
+
groupBy: () => import_utils.groupBy,
|
|
55
|
+
hashArray: () => import_utils.hashArray,
|
|
56
|
+
isBoolean: () => import_utils.isBoolean,
|
|
57
|
+
isClassComponent: () => import_reactTypesUtility.isClassComponent,
|
|
58
|
+
isCompositeTypeElement: () => import_reactTypesUtility.isCompositeTypeElement,
|
|
59
|
+
isDOMTypeElement: () => import_reactTypesUtility.isDOMTypeElement,
|
|
60
|
+
isElement: () => import_reactTypesUtility.isElement,
|
|
61
|
+
isEmpty: () => import_utils.isEmpty,
|
|
62
|
+
isEqual: () => import_utils.isEqual,
|
|
63
|
+
isEqualWith: () => import_utils.isEqualWith,
|
|
64
|
+
isFunction: () => import_utils.isFunction,
|
|
65
|
+
isFunctionComponent: () => import_reactTypesUtility.isFunctionComponent,
|
|
66
|
+
isGreaterThan: () => import_validations.isGreaterThan,
|
|
67
|
+
isIn: () => import_operators.isIn,
|
|
68
|
+
isNaN: () => import_utils.isNaN,
|
|
69
|
+
isNotIn: () => import_operators.isNotIn,
|
|
70
|
+
isNotNull: () => import_operators.isNotNull,
|
|
71
|
+
isNull: () => import_operators.isNull,
|
|
72
|
+
isObject: () => import_utils.isObject,
|
|
73
|
+
isReactComponent: () => import_reactTypesUtility.isReactComponent,
|
|
74
|
+
isRequired: () => import_validations.isRequired,
|
|
75
|
+
isString: () => import_utils.isString,
|
|
76
|
+
isValidDate: () => import_validations.isValidDate,
|
|
77
|
+
lessThanOrEquals: () => import_operators.lessThanOrEquals,
|
|
78
|
+
logger: () => import_system.logger,
|
|
79
|
+
maxBy: () => import_utils.maxBy,
|
|
80
|
+
meanBy: () => import_utils.meanBy,
|
|
81
|
+
mergeRefs: () => import_system.mergeRefs,
|
|
82
|
+
noop: () => import_utils.noop,
|
|
83
|
+
notEqual: () => import_operators.notEqual,
|
|
84
|
+
omit: () => import_utils.omit,
|
|
85
|
+
onClickHandlerForNonInteractiveElements: () => import_onClickHandlerForNonInteractiveElements.default,
|
|
86
|
+
orderBy: () => import_utils.orderBy,
|
|
87
|
+
padStart: () => import_utils.padStart,
|
|
88
|
+
parseInt: () => import_utils.parseInt,
|
|
89
|
+
pick: () => import_utils.pick,
|
|
90
|
+
pickBy: () => import_utils.pickBy,
|
|
91
|
+
property: () => import_utils.property,
|
|
92
|
+
pull: () => import_utils.pull,
|
|
93
|
+
range: () => import_utils.range,
|
|
94
|
+
removeUndefinedProperties: () => import_utils.removeUndefinedProperties,
|
|
95
|
+
resetTimer: () => import_scrollingTimer.resetTimer,
|
|
96
|
+
runAll: () => import_utils.runAll,
|
|
97
|
+
safeCall: () => import_utils.safeCall,
|
|
98
|
+
set: () => import_utils.set,
|
|
99
|
+
setRef: () => import_system.setRef,
|
|
100
|
+
sortBy: () => import_utils.sortBy,
|
|
101
|
+
startsWith: () => import_operators.startsWith,
|
|
102
|
+
sumBy: () => import_utils.sumBy,
|
|
103
|
+
throttle: () => import_utils.throttle,
|
|
104
|
+
toggleInArray: () => import_utils.toggleInArray,
|
|
105
|
+
toggleInObject: () => import_utils.toggleInObject,
|
|
106
|
+
transform: () => import_utils.transform,
|
|
107
|
+
uniq: () => import_utils.uniq,
|
|
108
|
+
uniqBy: () => import_utils.uniqBy,
|
|
109
|
+
useCallbackAfterRender: () => import_hooks.useCallbackAfterRender,
|
|
110
|
+
useCancellableDelayedCallback: () => import_hooks.useCancellableDelayedCallback,
|
|
111
|
+
useDerivedStateFromProps: () => import_hooks.useDerivedStateFromProps,
|
|
112
|
+
useExecutionTimer: () => import_hooks.useExecutionTimer,
|
|
113
|
+
useExpandState: () => import_hooks.useExpandState,
|
|
114
|
+
useFocusTrap: () => import_hooks.useFocusTrap,
|
|
115
|
+
useForceUpdate: () => import_hooks.useForceUpdate,
|
|
116
|
+
useHotkeys: () => import_hooks.useHotkeys,
|
|
117
|
+
useHoverHandlersDelay: () => import_hooks.useHoverHandlersDelay,
|
|
118
|
+
useIsShowingEllipsis: () => import_hooks.useIsShowingEllipsis,
|
|
119
|
+
useMeasure: () => import_hooks.useMeasure,
|
|
120
|
+
useOnClickOutside: () => import_hooks.useOnClickOutside,
|
|
121
|
+
useOnElementResize: () => import_hooks.useOnElementResize,
|
|
122
|
+
useParentElement: () => import_hooks.useParentElement,
|
|
123
|
+
usePrevious: () => import_hooks.usePrevious,
|
|
124
|
+
useResizeObserver: () => import_hooks.useResizeObserver,
|
|
125
|
+
useSetRef: () => import_hooks.useSetRef,
|
|
126
|
+
useShouldRecalculate: () => import_hooks.useShouldRecalculate,
|
|
127
|
+
useUncontrolled: () => import_hooks.useUncontrolled,
|
|
128
|
+
useWindowScrollerList: () => import_hooks.useWindowScrollerList,
|
|
129
|
+
useWindowSize: () => import_hooks.useWindowSize,
|
|
130
|
+
validDate: () => import_operators.validDate,
|
|
131
|
+
values: () => import_utils.values
|
|
132
|
+
});
|
|
133
|
+
var React = __toESM(require("react"));
|
|
134
|
+
var import_getComponentFromProps = __toESM(require("./getComponentFromProps"));
|
|
135
|
+
var import_onClickHandlerForNonInteractiveElements = __toESM(require("./onClickHandlerForNonInteractiveElements"));
|
|
136
|
+
var import_capitalize = require("./capitalize");
|
|
137
|
+
var import_operators = require("./operators");
|
|
138
|
+
var import_utils = require("./utils");
|
|
139
|
+
var import_system = require("./system");
|
|
140
|
+
var import_hooks = require("./hooks");
|
|
141
|
+
var import_timeUtils = require("./timeUtils");
|
|
142
|
+
var import_compose = require("./compose");
|
|
143
|
+
var import_platform = require("./platform");
|
|
144
|
+
var import_reactTypesUtility = require("./reactTypesUtility");
|
|
145
|
+
var import_scrollingTimer = require("./scrollingTimer");
|
|
146
|
+
var import_validations = require("./validations");
|
|
147
|
+
module.exports = __toCommonJS(src_exports);
|
|
148
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { default as getComponentFromProps } from './getComponentFromProps';\nexport { default as onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements';\nexport { capitalize } from './capitalize';\nexport {\n checkNotEmpty,\n checkEmpty,\n greaterThan,\n validDate,\n equal,\n notEqual,\n isNull,\n isNotNull,\n isIn,\n isNotIn,\n greaterThanOrEquals,\n lessThanOrEquals,\n startsWith,\n contains,\n} from './operators';\nexport {\n cx,\n runAll,\n hashArray,\n safeCall,\n removeUndefinedProperties,\n isObject,\n curry,\n arrayMove,\n uniq,\n filter,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n cloneDeep,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n pull,\n sortBy,\n sumBy,\n transform,\n isFunction,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n toggleInObject,\n toggleInArray,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n addOrRemove,\n isEqualWith,\n isBoolean,\n} from './utils';\nexport { setRef, mergeRefs, logger } from './system';\nexport {\n useMeasure,\n useForceUpdate,\n useOnClickOutside,\n useUncontrolled,\n useExecutionTimer,\n useExpandState,\n useHotkeys,\n useHoverHandlersDelay,\n useResizeObserver,\n useShouldRecalculate,\n useWindowScrollerList,\n useWindowSize,\n usePrevious,\n useCancellableDelayedCallback,\n useDerivedStateFromProps,\n useSetRef,\n useParentElement,\n useOnElementResize,\n useIsShowingEllipsis,\n useCallbackAfterRender,\n useFocusTrap,\n} from './hooks';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils';\nexport { compose } from './compose';\nexport { DOCUMENT, WINDOW } from './platform';\nexport {\n isClassComponent,\n isFunctionComponent,\n isReactComponent,\n isElement,\n isDOMTypeElement,\n isCompositeTypeElement,\n} from './reactTypesUtility';\nexport { resetTimer } from './scrollingTimer';\nexport { isRequired, isGreaterThan, isValidDate } from './validations';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAiD;AACjD,qDAAmE;AACnE,wBAA2B;AAC3B,uBAeO;AACP,mBA+CO;AACP,oBAA0C;AAC1C,mBAsBO;AACP,uBAAwD;AACxD,qBAAwB;AACxB,sBAAiC;AACjC,+BAOO;AACP,4BAA2B;AAC3B,yBAAuD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var onClickHandlerForNonInteractiveElements_exports = {};
|
|
29
|
+
__export(onClickHandlerForNonInteractiveElements_exports, {
|
|
30
|
+
default: () => onClickHandlerForNonInteractiveElements_default,
|
|
31
|
+
onClickHandlerForNonInteractiveElements: () => onClickHandlerForNonInteractiveElements
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
const onClickHandlerForNonInteractiveElements = (onClickHandler) => ({
|
|
35
|
+
role: "button",
|
|
36
|
+
tabIndex: "0",
|
|
37
|
+
onClick: onClickHandler,
|
|
38
|
+
onKeyPress: (event) => {
|
|
39
|
+
event.stopPropagation();
|
|
40
|
+
const { keycode, key } = event;
|
|
41
|
+
if (key === "Enter")
|
|
42
|
+
onClickHandler(event);
|
|
43
|
+
else if (keycode === 13)
|
|
44
|
+
onClickHandler(event);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
var onClickHandlerForNonInteractiveElements_default = onClickHandlerForNonInteractiveElements;
|
|
48
|
+
module.exports = __toCommonJS(onClickHandlerForNonInteractiveElements_exports);
|
|
49
|
+
//# sourceMappingURL=onClickHandlerForNonInteractiveElements.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/onClickHandlerForNonInteractiveElements.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * onClickHandler: callback\n *\n * @param onClickHandler\n */\nexport const onClickHandlerForNonInteractiveElements = onClickHandler => ({\n role: 'button',\n tabIndex: '0',\n onClick: onClickHandler,\n onKeyPress: event => {\n event.stopPropagation();\n const { keycode, key } = event;\n if (key === 'Enter') onClickHandler(event);\n else if (keycode === 13) onClickHandler(event);\n },\n});\n\nexport default onClickHandlerForNonInteractiveElements;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKhB,MAAM,0CAA0C,oBAAmB;AAAA,EACxE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY,WAAS;AACnB,UAAM;AACN,UAAM,EAAE,SAAS,QAAQ;AACzB,QAAI,QAAQ;AAAS,qBAAe;AAAA,aAC3B,YAAY;AAAI,qBAAe;AAAA;AAAA;AAI5C,IAAO,kDAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var operators_exports = {};
|
|
29
|
+
__export(operators_exports, {
|
|
30
|
+
checkEmpty: () => checkEmpty,
|
|
31
|
+
checkNotEmpty: () => checkNotEmpty,
|
|
32
|
+
contains: () => contains,
|
|
33
|
+
equal: () => equal,
|
|
34
|
+
greaterThan: () => greaterThan,
|
|
35
|
+
greaterThanOrEquals: () => greaterThanOrEquals,
|
|
36
|
+
isIn: () => isIn,
|
|
37
|
+
isNotIn: () => isNotIn,
|
|
38
|
+
isNotNull: () => isNotNull,
|
|
39
|
+
isNull: () => isNull,
|
|
40
|
+
lessThanOrEquals: () => lessThanOrEquals,
|
|
41
|
+
notEqual: () => notEqual,
|
|
42
|
+
startsWith: () => startsWith,
|
|
43
|
+
validDate: () => validDate
|
|
44
|
+
});
|
|
45
|
+
var React = __toESM(require("react"));
|
|
46
|
+
var import_lodash = require("lodash");
|
|
47
|
+
const checkNotEmpty = (value) => value === "" || value === void 0 || value == [] || value === null || (0, import_lodash.isEmpty)(value);
|
|
48
|
+
const checkEmpty = (value) => !(0, import_lodash.isEmpty)(value);
|
|
49
|
+
const greaterThan = (value, comparator) => value > comparator;
|
|
50
|
+
const validDate = (value) => {
|
|
51
|
+
const dateValidationRegex = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
|
|
52
|
+
if (!dateValidationRegex.test(value))
|
|
53
|
+
return false;
|
|
54
|
+
const [m, d, y] = value.split("/").map((n) => Number(n));
|
|
55
|
+
return m === Number(new Date(y, m - 1, d).getMonth()) + 1 && d === Number(new Date(y, m - 1, d).getDate());
|
|
56
|
+
};
|
|
57
|
+
const equal = (a, b) => a === b;
|
|
58
|
+
const notEqual = (a, b) => !equal(a, b);
|
|
59
|
+
const isNull = (a) => checkNotEmpty(a);
|
|
60
|
+
const isNotNull = (a) => !isNull(a);
|
|
61
|
+
const isIn = (a, b) => b.indexOf(a) > -1;
|
|
62
|
+
const isNotIn = (a, b) => !isIn(a, b);
|
|
63
|
+
const greaterThanOrEquals = (value, comparator) => value >= comparator;
|
|
64
|
+
const lessThanOrEquals = (value, comparator) => value <= comparator;
|
|
65
|
+
const startsWith = (value, comparator) => String(value).startsWith(comparator);
|
|
66
|
+
const contains = (value, comparator) => String(value).includes(comparator);
|
|
67
|
+
module.exports = __toCommonJS(operators_exports);
|
|
68
|
+
//# sourceMappingURL=operators.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/operators.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { isEmpty } from 'lodash';\n/**\n * Check if the value is null undefined ''\n *\n * @param value\n */\nexport const checkNotEmpty = (value) =>\n value === '' || value === undefined || value == [] || value === null || isEmpty(value);\n\nexport const checkEmpty = (value) => !isEmpty(value)\n/**\n * @param value: number\n * @param comparator: number\n * @param value\n * @param comparator\n */\nexport const greaterThan = (value, comparator) => value > comparator;\n\n/**\n * Check if a valid date with format MM/DD/YYYY\n *\n * @param {*} value: string\n * @param value\n */\nexport const validDate = (value) => {\n const dateValidationRegex = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if (!dateValidationRegex.test(value)) return false;\n const [m, d, y] = value.split('/').map((n) => Number(n));\n return (\n m === Number(new Date(y, m - 1, d).getMonth()) + 1 &&\n d === Number(new Date(y, m - 1, d).getDate())\n );\n};\n\nexport const equal = (a, b) => a === b;\n\nexport const notEqual = (a, b) => !equal(a, b);\n\nexport const isNull = (a) => checkNotEmpty(a);\n\nexport const isNotNull = (a) => !isNull(a);\n\nexport const isIn = (a, b) => b.indexOf(a) > -1;\n\nexport const isNotIn = (a, b) => !isIn(a, b);\n\nexport const greaterThanOrEquals = (value, comparator) => value >= comparator;\nexport const lessThanOrEquals = (value, comparator) => value <= comparator;\nexport const startsWith = (value, comparator) =>\n String(value).startsWith(comparator);\nexport const contains = (value, comparator) =>\n String(value).includes(comparator);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAwB;AAMjB,MAAM,gBAAgB,CAAC,UAC5B,UAAU,MAAM,UAAU,UAAa,SAAS,MAAM,UAAU,QAAQ,2BAAQ;AAE3E,MAAM,aAAa,CAAC,UAAU,CAAC,2BAAQ;AAOvC,MAAM,cAAc,CAAC,OAAO,eAAe,QAAQ;AAQnD,MAAM,YAAY,CAAC,UAAU;AAClC,QAAM,sBAAsB;AAC5B,MAAI,CAAC,oBAAoB,KAAK;AAAQ,WAAO;AAC7C,QAAM,CAAC,GAAG,GAAG,KAAK,MAAM,MAAM,KAAK,IAAI,CAAC,MAAM,OAAO;AACrD,SACE,MAAM,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,GAAG,cAAc,KACjD,MAAM,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,GAAG;AAAA;AAIhC,MAAM,QAAQ,CAAC,GAAG,MAAM,MAAM;AAE9B,MAAM,WAAW,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG;AAErC,MAAM,SAAS,CAAC,MAAM,cAAc;AAEpC,MAAM,YAAY,CAAC,MAAM,CAAC,OAAO;AAEjC,MAAM,OAAO,CAAC,GAAG,MAAM,EAAE,QAAQ,KAAK;AAEtC,MAAM,UAAU,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG;AAEnC,MAAM,sBAAsB,CAAC,OAAO,eAAe,SAAS;AAC5D,MAAM,mBAAmB,CAAC,OAAO,eAAe,SAAS;AACzD,MAAM,aAAa,CAAC,OAAO,eAChC,OAAO,OAAO,WAAW;AACpB,MAAM,WAAW,CAAC,OAAO,eAC9B,OAAO,OAAO,SAAS;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var platform_exports = {};
|
|
29
|
+
__export(platform_exports, {
|
|
30
|
+
DOCUMENT: () => DOCUMENT,
|
|
31
|
+
WINDOW: () => WINDOW
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
const DOCUMENT = typeof document !== "undefined" ? document : null;
|
|
35
|
+
const WINDOW = typeof window !== "undefined" ? window : null;
|
|
36
|
+
module.exports = __toCommonJS(platform_exports);
|
|
37
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/platform.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const DOCUMENT = typeof document !== 'undefined' ? document : null;\nexport const WINDOW = typeof window !== 'undefined' ? window : null;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,WAAW,OAAO,aAAa,cAAc,WAAW;AAC9D,MAAM,SAAS,OAAO,WAAW,cAAc,SAAS;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|