@elliemae/ds-utilities 3.0.0-next.9 → 3.0.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.
- package/dist/cjs/capitalize.js +9 -16
- package/dist/cjs/capitalize.js.map +1 -1
- package/dist/cjs/compose.js +9 -16
- package/dist/cjs/compose.js.map +2 -2
- package/dist/cjs/deprecated/deprecatedMsg.js +28 -0
- package/dist/cjs/deprecated/deprecatedMsg.js.map +7 -0
- package/dist/cjs/deprecated/index.js +27 -0
- package/dist/cjs/deprecated/index.js.map +7 -0
- package/dist/cjs/deprecated/reactTypesUtility.js +53 -0
- package/dist/cjs/deprecated/reactTypesUtility.js.map +7 -0
- package/dist/cjs/deprecated/scrollingTimer.js +41 -0
- package/dist/cjs/deprecated/scrollingTimer.js.map +7 -0
- package/dist/cjs/deprecated/useParentElement.js +36 -0
- package/dist/cjs/deprecated/useParentElement.js.map +7 -0
- package/dist/cjs/deprecated/useSetRef.js +37 -0
- package/dist/cjs/deprecated/useSetRef.js.map +7 -0
- package/dist/cjs/deprecated/useUncontrolled.js +33 -0
- package/dist/cjs/deprecated/useUncontrolled.js.map +7 -0
- package/dist/cjs/{hooks → deprecated}/useWindowSize.js +15 -18
- package/dist/cjs/deprecated/useWindowSize.js.map +7 -0
- package/dist/cjs/getComponentFromProps.js +10 -17
- package/dist/cjs/getComponentFromProps.js.map +2 -2
- package/dist/cjs/hooks/index.js +29 -32
- package/dist/cjs/hooks/index.js.map +2 -2
- package/dist/cjs/hooks/useCallbackAfterRender.js +12 -18
- package/dist/cjs/hooks/useCallbackAfterRender.js.map +2 -2
- package/dist/cjs/hooks/useCancellableDelayedCallback.js +9 -16
- package/dist/cjs/hooks/useCancellableDelayedCallback.js.map +2 -2
- package/dist/cjs/hooks/useDerivedStateFromProps.js +9 -16
- package/dist/cjs/hooks/useDerivedStateFromProps.js.map +2 -2
- package/dist/cjs/hooks/useExecutionTimer.js +13 -18
- package/dist/cjs/hooks/useExecutionTimer.js.map +2 -2
- package/dist/cjs/hooks/useExpandState.js +9 -16
- package/dist/cjs/hooks/useExpandState.js.map +2 -2
- package/dist/cjs/hooks/useFocusTrap.js +76 -28
- package/dist/cjs/hooks/useFocusTrap.js.map +2 -2
- package/dist/cjs/hooks/useHotkeys.js +10 -17
- package/dist/cjs/hooks/useHotkeys.js.map +2 -2
- package/dist/cjs/hooks/useHoverHandlersDelay.js +15 -20
- package/dist/cjs/hooks/useHoverHandlersDelay.js.map +2 -2
- package/dist/cjs/hooks/useIsMobile.js +50 -0
- package/dist/cjs/hooks/useIsMobile.js.map +7 -0
- package/dist/cjs/hooks/useIsShowingEllipsis.js +9 -16
- package/dist/cjs/hooks/useIsShowingEllipsis.js.map +1 -1
- package/dist/cjs/hooks/useOnBlurOut.js +43 -0
- package/dist/cjs/hooks/useOnBlurOut.js.map +7 -0
- package/dist/cjs/hooks/useOnElementResize.js +9 -16
- package/dist/cjs/hooks/useOnElementResize.js.map +1 -1
- package/dist/cjs/hooks/useOnFirstFocusIn.js +61 -0
- package/dist/cjs/hooks/useOnFirstFocusIn.js.map +7 -0
- package/dist/cjs/hooks/useOnSpecificFocus.js +40 -0
- package/dist/cjs/hooks/useOnSpecificFocus.js.map +7 -0
- package/dist/cjs/hooks/usePrevious.js +9 -16
- package/dist/cjs/hooks/usePrevious.js.map +2 -2
- package/dist/cjs/hooks/useResizeObserver.js +12 -19
- package/dist/cjs/hooks/useResizeObserver.js.map +2 -2
- package/dist/cjs/hooks/useShouldRecalculate.js +9 -16
- package/dist/cjs/hooks/useShouldRecalculate.js.map +2 -2
- package/dist/cjs/hooks/useWindowScrollerList.js +20 -25
- package/dist/cjs/hooks/useWindowScrollerList.js.map +2 -2
- package/dist/cjs/index.js +23 -27
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/objectUtilities.js +46 -0
- package/dist/cjs/objectUtilities.js.map +7 -0
- package/dist/cjs/onClickHandlerForNonInteractiveElements.js +11 -18
- package/dist/cjs/onClickHandlerForNonInteractiveElements.js.map +2 -2
- package/dist/cjs/operators.js +9 -16
- package/dist/cjs/operators.js.map +2 -2
- package/dist/cjs/platform.js +9 -16
- package/dist/cjs/platform.js.map +1 -1
- package/dist/cjs/props-helpers/defaultProps/index.js +22 -0
- package/dist/cjs/props-helpers/defaultProps/index.js.map +7 -0
- package/dist/cjs/props-helpers/defaultProps/useMemoMergePropsWithDefault.js +55 -0
- package/dist/cjs/props-helpers/defaultProps/useMemoMergePropsWithDefault.js.map +7 -0
- package/dist/cjs/props-helpers/getProps/index.js +30 -0
- package/dist/cjs/props-helpers/getProps/index.js.map +7 -0
- package/dist/cjs/props-helpers/globalProps/constants.js +390 -0
- package/dist/cjs/props-helpers/globalProps/constants.js.map +7 -0
- package/dist/cjs/props-helpers/globalProps/getGlobalAttributes.js +45 -0
- package/dist/cjs/props-helpers/globalProps/getGlobalAttributes.js.map +7 -0
- package/dist/cjs/props-helpers/globalProps/globalAttributesPropTypes.js +391 -0
- package/dist/cjs/props-helpers/globalProps/globalAttributesPropTypes.js.map +7 -0
- package/dist/cjs/props-helpers/globalProps/index.js +24 -0
- package/dist/cjs/props-helpers/globalProps/index.js.map +7 -0
- package/dist/cjs/props-helpers/globalProps/useGetGlobalAttributes.js +33 -0
- package/dist/cjs/props-helpers/globalProps/useGetGlobalAttributes.js.map +7 -0
- package/dist/cjs/props-helpers/index.js +28 -0
- package/dist/cjs/props-helpers/index.js.map +7 -0
- package/dist/cjs/props-helpers/propTypes/PropTypes.js +144 -0
- package/dist/cjs/props-helpers/propTypes/PropTypes.js.map +7 -0
- package/dist/cjs/props-helpers/propTypes/customPropTypes.js +31 -0
- package/dist/cjs/props-helpers/propTypes/customPropTypes.js.map +7 -0
- package/dist/cjs/props-helpers/propTypes/describe.js +74 -0
- package/dist/cjs/props-helpers/propTypes/describe.js.map +7 -0
- package/dist/cjs/props-helpers/propTypes/describeConversions.js +89 -0
- package/dist/cjs/props-helpers/propTypes/describeConversions.js.map +7 -0
- package/dist/cjs/props-helpers/propTypes/describeGuards.js +42 -0
- package/dist/cjs/props-helpers/propTypes/describeGuards.js.map +7 -0
- package/dist/cjs/props-helpers/propTypes/index.js +30 -0
- package/dist/cjs/props-helpers/propTypes/index.js.map +7 -0
- package/dist/cjs/props-helpers/propTypes/toTypescript.js +147 -0
- package/dist/cjs/props-helpers/propTypes/toTypescript.js.map +7 -0
- package/dist/cjs/props-helpers/propTypes/types.js +20 -0
- package/dist/cjs/props-helpers/propTypes/types.js.map +7 -0
- package/dist/cjs/props-helpers/tests/globalProps/TestComponent.js +47 -0
- package/dist/cjs/props-helpers/tests/globalProps/TestComponent.js.map +7 -0
- package/dist/cjs/props-helpers/tests/validation/test.schema.js +62 -0
- package/dist/cjs/props-helpers/tests/validation/test.schema.js.map +7 -0
- package/dist/cjs/props-helpers/tests/xstyledProps/TestComponent.js +53 -0
- package/dist/cjs/props-helpers/tests/xstyledProps/TestComponent.js.map +7 -0
- package/dist/cjs/props-helpers/useDeprecateComponent/index.js +33 -0
- package/dist/cjs/props-helpers/useDeprecateComponent/index.js.map +7 -0
- package/dist/cjs/props-helpers/validation/errorTemplates.js +41 -0
- package/dist/cjs/props-helpers/validation/errorTemplates.js.map +7 -0
- package/dist/cjs/props-helpers/validation/index.js +23 -0
- package/dist/cjs/props-helpers/validation/index.js.map +7 -0
- package/dist/cjs/props-helpers/validation/typescriptGuards.js +76 -0
- package/dist/cjs/props-helpers/validation/typescriptGuards.js.map +7 -0
- package/dist/cjs/props-helpers/validation/typescriptParsers.js +69 -0
- package/dist/cjs/props-helpers/validation/typescriptParsers.js.map +7 -0
- package/dist/cjs/props-helpers/validation/typescriptValidator.js +170 -0
- package/dist/cjs/props-helpers/validation/typescriptValidator.js.map +7 -0
- package/dist/cjs/props-helpers/xstyledProps/constants.js +81 -0
- package/dist/cjs/props-helpers/xstyledProps/constants.js.map +7 -0
- package/dist/cjs/props-helpers/xstyledProps/index.js +23 -0
- package/dist/cjs/props-helpers/xstyledProps/index.js.map +7 -0
- package/dist/cjs/props-helpers/xstyledProps/useGetXstyledProps.js +41 -0
- package/dist/cjs/props-helpers/xstyledProps/useGetXstyledProps.js.map +7 -0
- package/dist/cjs/props-helpers/xstyledProps/xstyledPropTypes.js +94 -0
- package/dist/cjs/props-helpers/xstyledProps/xstyledPropTypes.js.map +7 -0
- package/dist/cjs/reactTypesUtility.js +12 -40
- package/dist/cjs/reactTypesUtility.js.map +2 -2
- package/dist/cjs/system.js +14 -26
- package/dist/cjs/system.js.map +2 -2
- package/dist/cjs/timeUtils.js +9 -16
- package/dist/cjs/timeUtils.js.map +2 -2
- package/dist/cjs/utils.js +15 -19
- package/dist/cjs/utils.js.map +2 -2
- package/dist/cjs/validations.js +13 -22
- package/dist/cjs/validations.js.map +2 -2
- package/dist/esm/capitalize.js.map +1 -1
- package/dist/esm/compose.js.map +2 -2
- package/dist/esm/deprecated/deprecatedMsg.js +6 -0
- package/dist/esm/deprecated/deprecatedMsg.js.map +7 -0
- package/dist/esm/deprecated/index.js +8 -0
- package/dist/esm/deprecated/index.js.map +7 -0
- package/dist/esm/deprecated/reactTypesUtility.js +31 -0
- package/dist/esm/deprecated/reactTypesUtility.js.map +7 -0
- package/dist/esm/{scrollingTimer.js → deprecated/scrollingTimer.js} +5 -3
- package/dist/esm/deprecated/scrollingTimer.js.map +7 -0
- package/dist/esm/{hooks → deprecated}/useParentElement.js +0 -0
- package/dist/esm/deprecated/useParentElement.js.map +7 -0
- package/dist/esm/{hooks → deprecated}/useSetRef.js +2 -0
- package/dist/esm/deprecated/useSetRef.js.map +7 -0
- package/dist/esm/deprecated/useUncontrolled.js +11 -0
- package/dist/esm/deprecated/useUncontrolled.js.map +7 -0
- package/dist/esm/{hooks → deprecated}/useWindowSize.js +6 -2
- package/dist/esm/deprecated/useWindowSize.js.map +7 -0
- package/dist/esm/getComponentFromProps.js +1 -1
- package/dist/esm/getComponentFromProps.js.map +2 -2
- package/dist/esm/hooks/index.js +20 -16
- package/dist/esm/hooks/index.js.map +2 -2
- package/dist/esm/hooks/useCallbackAfterRender.js +4 -3
- package/dist/esm/hooks/useCallbackAfterRender.js.map +2 -2
- package/dist/esm/hooks/useCancellableDelayedCallback.js.map +2 -2
- package/dist/esm/hooks/useDerivedStateFromProps.js.map +2 -2
- package/dist/esm/hooks/useExecutionTimer.js +4 -2
- package/dist/esm/hooks/useExecutionTimer.js.map +2 -2
- package/dist/esm/hooks/useExpandState.js.map +2 -2
- package/dist/esm/hooks/useFocusTrap.js +68 -13
- package/dist/esm/hooks/useFocusTrap.js.map +2 -2
- package/dist/esm/hooks/useHotkeys.js +1 -1
- package/dist/esm/hooks/useHotkeys.js.map +2 -2
- package/dist/esm/hooks/useHoverHandlersDelay.js +6 -4
- package/dist/esm/hooks/useHoverHandlersDelay.js.map +2 -2
- package/dist/esm/hooks/useIsMobile.js +28 -0
- package/dist/esm/hooks/useIsMobile.js.map +7 -0
- package/dist/esm/hooks/useIsShowingEllipsis.js.map +1 -1
- package/dist/esm/hooks/useOnBlurOut.js +21 -0
- package/dist/esm/hooks/useOnBlurOut.js.map +7 -0
- package/dist/esm/hooks/useOnElementResize.js.map +1 -1
- package/dist/esm/hooks/useOnFirstFocusIn.js +39 -0
- package/dist/esm/hooks/useOnFirstFocusIn.js.map +7 -0
- package/dist/esm/hooks/useOnSpecificFocus.js +18 -0
- package/dist/esm/hooks/useOnSpecificFocus.js.map +7 -0
- package/dist/esm/hooks/usePrevious.js.map +2 -2
- package/dist/esm/hooks/useResizeObserver.js +4 -4
- package/dist/esm/hooks/useResizeObserver.js.map +2 -2
- package/dist/esm/hooks/useShouldRecalculate.js.map +2 -2
- package/dist/esm/hooks/useWindowScrollerList.js +12 -10
- package/dist/esm/hooks/useWindowScrollerList.js.map +2 -2
- package/dist/esm/index.js +23 -24
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/objectUtilities.js +24 -0
- package/dist/esm/objectUtilities.js.map +7 -0
- package/dist/esm/onClickHandlerForNonInteractiveElements.js +2 -2
- package/dist/esm/onClickHandlerForNonInteractiveElements.js.map +2 -2
- package/dist/esm/operators.js.map +2 -2
- package/dist/esm/props-helpers/defaultProps/index.js +3 -0
- package/dist/esm/props-helpers/defaultProps/index.js.map +7 -0
- package/dist/esm/props-helpers/defaultProps/useMemoMergePropsWithDefault.js +35 -0
- package/dist/esm/props-helpers/defaultProps/useMemoMergePropsWithDefault.js.map +7 -0
- package/dist/esm/props-helpers/getProps/index.js +8 -0
- package/dist/esm/props-helpers/getProps/index.js.map +7 -0
- package/dist/esm/props-helpers/globalProps/constants.js +368 -0
- package/dist/esm/props-helpers/globalProps/constants.js.map +7 -0
- package/dist/esm/props-helpers/globalProps/getGlobalAttributes.js +23 -0
- package/dist/esm/props-helpers/globalProps/getGlobalAttributes.js.map +7 -0
- package/dist/esm/props-helpers/globalProps/globalAttributesPropTypes.js +369 -0
- package/dist/esm/props-helpers/globalProps/globalAttributesPropTypes.js.map +7 -0
- package/dist/esm/props-helpers/globalProps/index.js +5 -0
- package/dist/esm/props-helpers/globalProps/index.js.map +7 -0
- package/dist/esm/props-helpers/globalProps/useGetGlobalAttributes.js +11 -0
- package/dist/esm/props-helpers/globalProps/useGetGlobalAttributes.js.map +7 -0
- package/dist/esm/props-helpers/index.js +9 -0
- package/dist/esm/props-helpers/index.js.map +7 -0
- package/dist/esm/props-helpers/propTypes/PropTypes.js +124 -0
- package/dist/esm/props-helpers/propTypes/PropTypes.js.map +7 -0
- package/dist/esm/props-helpers/propTypes/customPropTypes.js +9 -0
- package/dist/esm/props-helpers/propTypes/customPropTypes.js.map +7 -0
- package/dist/esm/props-helpers/propTypes/describe.js +52 -0
- package/dist/esm/props-helpers/propTypes/describe.js.map +7 -0
- package/dist/esm/props-helpers/propTypes/describeConversions.js +76 -0
- package/dist/esm/props-helpers/propTypes/describeConversions.js.map +7 -0
- package/dist/esm/props-helpers/propTypes/describeGuards.js +20 -0
- package/dist/esm/props-helpers/propTypes/describeGuards.js.map +7 -0
- package/dist/esm/props-helpers/propTypes/index.js +8 -0
- package/dist/esm/props-helpers/propTypes/index.js.map +7 -0
- package/dist/esm/props-helpers/propTypes/toTypescript.js +127 -0
- package/dist/esm/props-helpers/propTypes/toTypescript.js.map +7 -0
- package/dist/esm/props-helpers/propTypes/types.js +2 -0
- package/dist/esm/props-helpers/propTypes/types.js.map +7 -0
- package/dist/esm/props-helpers/tests/globalProps/TestComponent.js +27 -0
- package/dist/esm/props-helpers/tests/globalProps/TestComponent.js.map +7 -0
- package/dist/esm/props-helpers/tests/validation/test.schema.js +40 -0
- package/dist/esm/props-helpers/tests/validation/test.schema.js.map +7 -0
- package/dist/esm/props-helpers/tests/xstyledProps/TestComponent.js +33 -0
- package/dist/esm/props-helpers/tests/xstyledProps/TestComponent.js.map +7 -0
- package/dist/esm/props-helpers/useDeprecateComponent/index.js +11 -0
- package/dist/esm/props-helpers/useDeprecateComponent/index.js.map +7 -0
- package/dist/esm/props-helpers/validation/errorTemplates.js +19 -0
- package/dist/esm/props-helpers/validation/errorTemplates.js.map +7 -0
- package/dist/esm/props-helpers/validation/index.js +4 -0
- package/dist/esm/props-helpers/validation/index.js.map +7 -0
- package/dist/esm/props-helpers/validation/typescriptGuards.js +54 -0
- package/dist/esm/props-helpers/validation/typescriptGuards.js.map +7 -0
- package/dist/esm/props-helpers/validation/typescriptParsers.js +47 -0
- package/dist/esm/props-helpers/validation/typescriptParsers.js.map +7 -0
- package/dist/esm/props-helpers/validation/typescriptValidator.js +159 -0
- package/dist/esm/props-helpers/validation/typescriptValidator.js.map +7 -0
- package/dist/esm/props-helpers/xstyledProps/constants.js +59 -0
- package/dist/esm/props-helpers/xstyledProps/constants.js.map +7 -0
- package/dist/esm/props-helpers/xstyledProps/index.js +4 -0
- package/dist/esm/props-helpers/xstyledProps/index.js.map +7 -0
- package/dist/esm/props-helpers/xstyledProps/useGetXstyledProps.js +19 -0
- package/dist/esm/props-helpers/xstyledProps/useGetXstyledProps.js.map +7 -0
- package/dist/esm/props-helpers/xstyledProps/xstyledPropTypes.js +72 -0
- package/dist/esm/props-helpers/xstyledProps/xstyledPropTypes.js.map +7 -0
- package/dist/esm/reactTypesUtility.js +3 -24
- package/dist/esm/reactTypesUtility.js.map +2 -2
- package/dist/esm/system.js +5 -10
- package/dist/esm/system.js.map +2 -2
- package/dist/esm/timeUtils.js.map +2 -2
- package/dist/esm/utils.js +6 -3
- package/dist/esm/utils.js.map +2 -2
- package/dist/esm/validations.js +4 -6
- package/dist/esm/validations.js.map +2 -2
- package/package.json +10 -9
- package/dist/cjs/hooks/useParentElement.js +0 -43
- package/dist/cjs/hooks/useParentElement.js.map +0 -7
- package/dist/cjs/hooks/useSetRef.js +0 -42
- package/dist/cjs/hooks/useSetRef.js.map +0 -7
- package/dist/cjs/hooks/useWindowSize.js.map +0 -7
- package/dist/cjs/scrollingTimer.js +0 -46
- package/dist/cjs/scrollingTimer.js.map +0 -7
- package/dist/esm/hooks/useParentElement.js.map +0 -7
- package/dist/esm/hooks/useSetRef.js.map +0 -7
- package/dist/esm/hooks/useWindowSize.js.map +0 -7
- package/dist/esm/scrollingTimer.js.map +0 -7
package/dist/esm/hooks/index.js
CHANGED
|
@@ -2,25 +2,29 @@ import * as React from "react";
|
|
|
2
2
|
import { default as default2 } from "use-measure";
|
|
3
3
|
import { default as default3 } from "use-force-update";
|
|
4
4
|
import { default as default4 } from "use-onclickoutside";
|
|
5
|
-
import {
|
|
5
|
+
import { useCallbackAfterRender } from "./useCallbackAfterRender";
|
|
6
|
+
import { useCancellableDelayedCallback } from "./useCancellableDelayedCallback";
|
|
7
|
+
import { useDerivedStateFromProps } from "./useDerivedStateFromProps";
|
|
6
8
|
import { useExecutionTimer } from "./useExecutionTimer";
|
|
7
9
|
import { useExpandState } from "./useExpandState";
|
|
10
|
+
import { useFocusTrap, UseFocusTrapWithSchema } from "./useFocusTrap";
|
|
8
11
|
import { useHotkeys } from "./useHotkeys";
|
|
9
12
|
import { useHoverHandlersDelay } from "./useHoverHandlersDelay";
|
|
13
|
+
import { useIsMobile } from "./useIsMobile";
|
|
14
|
+
import { useIsShowingEllipsis } from "./useIsShowingEllipsis";
|
|
15
|
+
import { useOnBlurOut, UseOnBlurOutWithSchema } from "./useOnBlurOut";
|
|
16
|
+
import { useOnElementResize } from "./useOnElementResize";
|
|
17
|
+
import { useOnFirstFocusIn, UseOnFirstFocusInWithSchema } from "./useOnFirstFocusIn";
|
|
18
|
+
import { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from "./useOnSpecificFocus";
|
|
19
|
+
import { usePrevious } from "./usePrevious";
|
|
10
20
|
import { useResizeObserver } from "./useResizeObserver";
|
|
11
21
|
import { useShouldRecalculate } from "./useShouldRecalculate";
|
|
12
22
|
import { useWindowScrollerList } from "./useWindowScrollerList";
|
|
13
|
-
import { useWindowSize } from "./useWindowSize";
|
|
14
|
-
import { usePrevious } from "./usePrevious";
|
|
15
|
-
import { useCancellableDelayedCallback } from "./useCancellableDelayedCallback";
|
|
16
|
-
import { useDerivedStateFromProps } from "./useDerivedStateFromProps";
|
|
17
|
-
import { useSetRef } from "./useSetRef";
|
|
18
|
-
import { useParentElement } from "./useParentElement";
|
|
19
|
-
import { useOnElementResize } from "./useOnElementResize";
|
|
20
|
-
import { useIsShowingEllipsis } from "./useIsShowingEllipsis";
|
|
21
|
-
import { useCallbackAfterRender } from "./useCallbackAfterRender";
|
|
22
|
-
import { useFocusTrap } from "./useFocusTrap";
|
|
23
23
|
export {
|
|
24
|
+
UseFocusTrapWithSchema,
|
|
25
|
+
UseOnBlurOutWithSchema,
|
|
26
|
+
UseOnFirstFocusInWithSchema,
|
|
27
|
+
UseOnSpecificFocusWithSchema,
|
|
24
28
|
useCallbackAfterRender,
|
|
25
29
|
useCancellableDelayedCallback,
|
|
26
30
|
useDerivedStateFromProps,
|
|
@@ -30,17 +34,17 @@ export {
|
|
|
30
34
|
default3 as useForceUpdate,
|
|
31
35
|
useHotkeys,
|
|
32
36
|
useHoverHandlersDelay,
|
|
37
|
+
useIsMobile,
|
|
33
38
|
useIsShowingEllipsis,
|
|
34
39
|
default2 as useMeasure,
|
|
40
|
+
useOnBlurOut,
|
|
35
41
|
default4 as useOnClickOutside,
|
|
36
42
|
useOnElementResize,
|
|
37
|
-
|
|
43
|
+
useOnFirstFocusIn,
|
|
44
|
+
useOnSpecificFocus,
|
|
38
45
|
usePrevious,
|
|
39
46
|
useResizeObserver,
|
|
40
|
-
useSetRef,
|
|
41
47
|
useShouldRecalculate,
|
|
42
|
-
|
|
43
|
-
useWindowScrollerList,
|
|
44
|
-
useWindowSize
|
|
48
|
+
useWindowScrollerList
|
|
45
49
|
};
|
|
46
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default as useMeasure } from 'use-measure';\nexport { default as useForceUpdate } from 'use-force-update';\nexport { default as useOnClickOutside } from 'use-onclickoutside';\nexport {
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default as useMeasure } from 'use-measure';\nexport { default as useForceUpdate } from 'use-force-update';\nexport { default as useOnClickOutside } from 'use-onclickoutside';\n\nexport { useCallbackAfterRender } from './useCallbackAfterRender';\nexport { useCancellableDelayedCallback } from './useCancellableDelayedCallback';\nexport { useDerivedStateFromProps } from './useDerivedStateFromProps';\nexport { useExecutionTimer } from './useExecutionTimer';\nexport { useExpandState } from './useExpandState';\nexport { useFocusTrap, UseFocusTrapWithSchema } from './useFocusTrap';\nexport { useHotkeys } from './useHotkeys';\nexport { useHoverHandlersDelay } from './useHoverHandlersDelay';\nexport { useIsMobile } from './useIsMobile';\nexport { useIsShowingEllipsis } from './useIsShowingEllipsis';\nexport { useOnBlurOut, UseOnBlurOutWithSchema } from './useOnBlurOut';\nexport { useOnElementResize } from './useOnElementResize';\nexport { useOnFirstFocusIn, UseOnFirstFocusInWithSchema } from './useOnFirstFocusIn';\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from './useOnSpecificFocus';\nexport { usePrevious } from './usePrevious';\nexport { useResizeObserver } from './useResizeObserver';\nexport { useShouldRecalculate } from './useShouldRecalculate';\nexport { useWindowScrollerList } from './useWindowScrollerList';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useRef, useLayoutEffect } from "react";
|
|
3
|
-
const useCallbackAfterRender = () => {
|
|
2
|
+
import { useRef, useLayoutEffect, useMemo, useEffect } from "react";
|
|
3
|
+
const useCallbackAfterRender = (isLayout = false) => {
|
|
4
4
|
const lastRun = useRef(null);
|
|
5
|
-
|
|
5
|
+
const effect = useMemo(() => isLayout ? useLayoutEffect : useEffect, [isLayout]);
|
|
6
|
+
effect(() => {
|
|
6
7
|
lastRun.current?.();
|
|
7
8
|
lastRun.current = null;
|
|
8
9
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useCallbackAfterRender.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef, useLayoutEffect } from 'react';\n\n// Inspired in https://github.com/ryuuji3/react-hooks/blob/4b183d61c30abf17efeab2240f8ff652a5dbb8e2/packages/use-callback-after-render/src/hooks/useCallbackAfterRender.ts\nexport const useCallbackAfterRender = (): Callback => {\n const lastRun = useRef<(() => void) | null>(null);\n\n useLayoutEffect(() => {\n lastRun.current?.();\n lastRun.current = null;\n });\n\n return (callback) => {\n lastRun.current = callback; // schedule callback after render\n };\n};\n
|
|
5
|
-
"mappings": "AAAA;ACAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef, useLayoutEffect, useMemo, useEffect } from 'react';\n\ntype Callback = (callback: () => void) => void;\n\n// Inspired in https://github.com/ryuuji3/react-hooks/blob/4b183d61c30abf17efeab2240f8ff652a5dbb8e2/packages/use-callback-after-render/src/hooks/useCallbackAfterRender.ts\nexport const useCallbackAfterRender = (isLayout = false): Callback => {\n const lastRun = useRef<(() => void) | null>(null);\n\n const effect = useMemo(() => (isLayout ? useLayoutEffect : useEffect), [isLayout]);\n\n effect(() => {\n lastRun.current?.();\n lastRun.current = null;\n });\n\n return (callback) => {\n lastRun.current = callback; // schedule callback after render\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAKO,MAAM,yBAAyB,CAAC,WAAW,UAAoB;AACpE,QAAM,UAAU,OAA4B,IAAI;AAEhD,QAAM,SAAS,QAAQ,MAAO,WAAW,kBAAkB,WAAY,CAAC,QAAQ,CAAC;AAEjF,SAAO,MAAM;AACX,YAAQ,UAAU;AAClB,YAAQ,UAAU;AAAA,EACpB,CAAC;AAED,SAAO,CAAC,aAAa;AACnB,YAAQ,UAAU;AAAA,EACpB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useCancellableDelayedCallback.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback, useRef } from 'react';\n\nexport const useCancellableDelayedCallback = (cb, delay) => {\n const timeoutRef = useRef();\n const cancel = useCallback(() => {\n const timeoutId = timeoutRef.current;\n if (timeoutId) {\n timeoutRef.current = undefined;\n clearTimeout(timeoutId);\n }\n }, [timeoutRef]);\n const delayedCb = useCallback(\n (...args) => {\n timeoutRef.current = setTimeout(() => cb(...args), delay);\n },\n [cb, delay],\n );\n\n return [delayedCb, cancel];\n};\n\nexport default useCancellableDelayedCallback;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback, useRef } from 'react';\n\ntype Callback = (...args: unknown[]) => unknown;\n\nexport const useCancellableDelayedCallback = (cb: Callback, delay: number) => {\n const timeoutRef = useRef<NodeJS.Timeout>();\n const cancel = useCallback(() => {\n const timeoutId = timeoutRef.current;\n if (timeoutId) {\n timeoutRef.current = undefined;\n clearTimeout(timeoutId);\n }\n }, [timeoutRef]);\n const delayedCb: Callback = useCallback(\n (...args) => {\n timeoutRef.current = setTimeout(() => cb(...args), delay);\n },\n [cb, delay],\n );\n\n return [delayedCb, cancel];\n};\n\nexport default useCancellableDelayedCallback;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAIO,MAAM,gCAAgC,CAAC,IAAc,UAAkB;AAC5E,QAAM,aAAa,OAAuB;AAC1C,QAAM,SAAS,YAAY,MAAM;AAC/B,UAAM,YAAY,WAAW;AAC7B,QAAI,WAAW;AACb,iBAAW,UAAU;AACrB,mBAAa,SAAS;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AACf,QAAM,YAAsB,YAC1B,IAAI,SAAS;AACX,eAAW,UAAU,WAAW,MAAM,GAAG,GAAG,IAAI,GAAG,KAAK;AAAA,EAC1D,GACA,CAAC,IAAI,KAAK,CACZ;AAEA,SAAO,CAAC,WAAW,MAAM;AAC3B;AAEA,IAAO,wCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useDerivedStateFromProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef, useState } from 'react';\nimport { isEqual, isFunction } from '../utils';\n\nconst defaultPropUpdateOnChange = prop => prop;\n\nfunction defaultShouldUpdate({ prop, prevProp, stateValue }) {\n return !isEqual(prop, prevProp) && !isEqual(prop, stateValue);\n}\n\nfunction setStateWithUpdate(onUpdate
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useState } from 'react';\nimport { isEqual, isFunction } from '../utils';\n\ninterface ShouldUpdateArg {\n prop: unknown;\n prevProp: unknown;\n stateValue: unknown;\n}\n\ntype OnUpdateT<T> = (prop: T, prevProp?: T | Record<string, never>) => T;\n\ninterface OptionsT<T> {\n onUpdate?: OnUpdateT<T>;\n shouldUpdate?: (arg: ShouldUpdateArg) => boolean;\n updateOnStateChange?: boolean;\n}\n\nconst defaultPropUpdateOnChange = <T,>(prop: T) => prop;\n\nfunction defaultShouldUpdate({ prop, prevProp, stateValue }: ShouldUpdateArg) {\n return !isEqual(prop, prevProp) && !isEqual(prop, stateValue);\n}\n\nfunction setStateWithUpdate<T>(onUpdate: OnUpdateT<T>, setState: React.Dispatch<React.SetStateAction<T>>) {\n return (state: React.SetStateAction<T>) => {\n setState((prevState: T) => onUpdate(isFunction(state) ? state(prevState) : state, prevState));\n };\n}\n\nexport const useDerivedStateFromProps = <T,>(\n prop: T,\n options: OptionsT<T> = {},\n): [T, React.Dispatch<React.SetStateAction<T>>] => {\n const {\n onUpdate = defaultPropUpdateOnChange as OnUpdateT<T>,\n shouldUpdate = defaultShouldUpdate,\n updateOnStateChange = false,\n } = options;\n\n const [stateValue, setState] = useState(onUpdate(prop, {}));\n const handleSetState = updateOnStateChange ? setStateWithUpdate(onUpdate, setState) : setState;\n const prevProp = useRef(prop);\n\n if (\n shouldUpdate({\n prop,\n prevProp: prevProp.current,\n stateValue,\n })\n ) {\n const nextProp = onUpdate(prop, prevProp.current);\n setState(nextProp);\n }\n prevProp.current = prop;\n return [stateValue, handleSetState];\n};\n\nexport default useDerivedStateFromProps;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAgBA,MAAM,4BAA4B,CAAK,SAAY;AAEnD,6BAA6B,EAAE,MAAM,UAAU,cAA+B;AAC5E,SAAO,CAAC,QAAQ,MAAM,QAAQ,KAAK,CAAC,QAAQ,MAAM,UAAU;AAC9D;AAEA,4BAA+B,UAAwB,UAAmD;AACxG,SAAO,CAAC,UAAmC;AACzC,aAAS,CAAC,cAAiB,SAAS,WAAW,KAAK,IAAI,MAAM,SAAS,IAAI,OAAO,SAAS,CAAC;AAAA,EAC9F;AACF;AAEO,MAAM,2BAA2B,CACtC,MACA,UAAuB,CAAC,MACyB;AACjD,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,eAAe;AAAA,IACf,sBAAsB;AAAA,MACpB;AAEJ,QAAM,CAAC,YAAY,YAAY,SAAS,SAAS,MAAM,CAAC,CAAC,CAAC;AAC1D,QAAM,iBAAiB,sBAAsB,mBAAmB,UAAU,QAAQ,IAAI;AACtF,QAAM,WAAW,OAAO,IAAI;AAE5B,MACE,aAAa;AAAA,IACX;AAAA,IACA,UAAU,SAAS;AAAA,IACnB;AAAA,EACF,CAAC,GACD;AACA,UAAM,WAAW,SAAS,MAAM,SAAS,OAAO;AAChD,aAAS,QAAQ;AAAA,EACnB;AACA,WAAS,UAAU;AACnB,SAAO,CAAC,YAAY,cAAc;AACpC;AAEA,IAAO,mCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,11 +4,13 @@ const useExecutionTimer = (startFn, cleanFn, delayTime) => {
|
|
|
4
4
|
const startTimer = useRef();
|
|
5
5
|
const closeTimer = useRef();
|
|
6
6
|
const startFunction = (...args) => {
|
|
7
|
-
|
|
7
|
+
if (closeTimer.current)
|
|
8
|
+
clearTimeout(closeTimer.current);
|
|
8
9
|
startTimer.current = setTimeout(() => startFn(...args), delayTime);
|
|
9
10
|
};
|
|
10
11
|
const cleanFunction = (...args) => {
|
|
11
|
-
|
|
12
|
+
if (startTimer.current)
|
|
13
|
+
clearTimeout(startTimer.current);
|
|
12
14
|
closeTimer.current = setTimeout(() => cleanFn(...args), 30);
|
|
13
15
|
};
|
|
14
16
|
return [startFunction, cleanFunction];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useExecutionTimer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef } from 'react';\n\nexport const useExecutionTimer = (startFn, cleanFn, delayTime) => {\n const startTimer = useRef();\n const closeTimer = useRef();\n\n const startFunction = (...args) => {\n clearTimeout(closeTimer.current);\n startTimer.current = setTimeout(() => startFn(...args), delayTime);\n };\n\n const cleanFunction = (...args) => {\n clearTimeout(startTimer.current);\n closeTimer.current = setTimeout(() => cleanFn(...args), 30);\n };\n return [startFunction, cleanFunction];\n};\n\nexport default useExecutionTimer;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef } from 'react';\n\ntype Callback = (...args: unknown[]) => unknown;\n\nexport const useExecutionTimer = (startFn: Callback, cleanFn: Callback, delayTime: number) => {\n const startTimer = useRef<NodeJS.Timeout>();\n const closeTimer = useRef<NodeJS.Timeout>();\n\n const startFunction: Callback = (...args) => {\n if (closeTimer.current) clearTimeout(closeTimer.current);\n startTimer.current = setTimeout(() => startFn(...args), delayTime);\n };\n\n const cleanFunction: Callback = (...args) => {\n if (startTimer.current) clearTimeout(startTimer.current);\n closeTimer.current = setTimeout(() => cleanFn(...args), 30);\n };\n return [startFunction, cleanFunction];\n};\n\nexport default useExecutionTimer;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAIO,MAAM,oBAAoB,CAAC,SAAmB,SAAmB,cAAsB;AAC5F,QAAM,aAAa,OAAuB;AAC1C,QAAM,aAAa,OAAuB;AAE1C,QAAM,gBAA0B,IAAI,SAAS;AAC3C,QAAI,WAAW;AAAS,mBAAa,WAAW,OAAO;AACvD,eAAW,UAAU,WAAW,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS;AAAA,EACnE;AAEA,QAAM,gBAA0B,IAAI,SAAS;AAC3C,QAAI,WAAW;AAAS,mBAAa,WAAW,OAAO;AACvD,eAAW,UAAU,WAAW,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE;AAAA,EAC5D;AACA,SAAO,CAAC,eAAe,aAAa;AACtC;AAEA,IAAO,4BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useExpandState.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { isFunction } from '../utils';\nimport { useDerivedStateFromProps } from './useDerivedStateFromProps';\n\nconst toggleStateInObject = (obj, key, value) => {\n const nextObj = { ...obj };\n if (nextObj[key]) {\n delete nextObj[key];\n } else {\n nextObj[key] = value;\n }\n return nextObj;\n};\n\nconst noop = () => null;\n\nexport const useExpandState = ({\n items = [],\n itemKey = 'id',\n expanded: expandedProp = {},\n onExpand,\n onExpandChange = noop,\n onExpandAll = noop,\n onToggleExpand,\n onCollapse,\n}) => {\n const [expanded, setExpanded] = useDerivedStateFromProps(expandedProp);\n\n const isExpandedAll = useMemo(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { isFunction } from '../utils';\nimport { useDerivedStateFromProps } from './useDerivedStateFromProps';\n\ntype ItemT = Record<string, string>;\ninterface UseExpandStateArg {\n items?: ItemT[];\n itemKey?: keyof ItemT;\n expanded?: Record<string, boolean>;\n onExpand: (item: ItemT) => void;\n onExpandChange: (nextState: Record<string, boolean>, item?: ItemT) => void;\n onExpandAll: (nextState: Record<string, boolean>) => void;\n onToggleExpand: (item: ItemT) => void;\n onCollapse: (item: ItemT) => void;\n}\n\nconst toggleStateInObject = <T,>(obj: Record<string, T>, key: string, value: T) => {\n const nextObj = { ...obj };\n if (nextObj[key]) {\n delete nextObj[key];\n } else {\n nextObj[key] = value;\n }\n return nextObj;\n};\n\nconst noop = () => null;\n\nexport const useExpandState = ({\n items = [],\n itemKey = 'id',\n expanded: expandedProp = {},\n onExpand,\n onExpandChange = noop,\n onExpandAll = noop,\n onToggleExpand,\n onCollapse,\n}: UseExpandStateArg) => {\n const [expanded, setExpanded] = useDerivedStateFromProps(expandedProp);\n\n const isExpandedAll = useMemo(() => Object.keys(expanded).length === items.length, [expanded, items]);\n\n const toggleExpandAll = (stateData = true) => {\n setExpanded(() => {\n const nextState: Record<string, boolean> = {};\n if (!isExpandedAll) {\n items.forEach((item) => {\n nextState[item[itemKey]] = stateData;\n });\n }\n onExpandChange(nextState);\n onExpandAll(nextState);\n return nextState;\n });\n };\n\n const expand = (item: ItemT, stateData = true) => {\n if (!item) return;\n if (isFunction(onExpand)) {\n onExpand(item);\n }\n setExpanded((prevState) => {\n const key = item[itemKey];\n const nextState = { ...prevState, [key]: stateData };\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n const toggleExpand = (item: ItemT, stateData = true) => {\n if (isFunction(onToggleExpand)) {\n onToggleExpand(item);\n }\n setExpanded((prevState) => {\n const key = item[itemKey];\n const nextState = toggleStateInObject(prevState, key, stateData);\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n const collapse = (item: ItemT) => {\n if (isFunction(onCollapse)) {\n onCollapse(item);\n }\n setExpanded((prevState) => {\n const nextState = { ...prevState };\n delete nextState[item[itemKey]];\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n return {\n state: { expanded, isExpandedAll },\n actions: {\n expand,\n toggleExpandAll,\n toggleExpand,\n collapse,\n },\n setExpanded,\n };\n};\n\nexport default useExpandState;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AAcA,MAAM,sBAAsB,CAAK,KAAwB,KAAa,UAAa;AACjF,QAAM,UAAU,mBAAK;AACrB,MAAI,QAAQ,MAAM;AAChB,WAAO,QAAQ;AAAA,EACjB,OAAO;AACL,YAAQ,OAAO;AAAA,EACjB;AACA,SAAO;AACT;AAEA,MAAM,OAAO,MAAM;AAEZ,MAAM,iBAAiB,CAAC;AAAA,EAC7B,QAAQ,CAAC;AAAA,EACT,UAAU;AAAA,EACV,UAAU,eAAe,CAAC;AAAA,EAC1B;AAAA,EACA,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd;AAAA,EACA;AAAA,MACuB;AACvB,QAAM,CAAC,UAAU,eAAe,yBAAyB,YAAY;AAErE,QAAM,gBAAgB,QAAQ,MAAM,OAAO,KAAK,QAAQ,EAAE,WAAW,MAAM,QAAQ,CAAC,UAAU,KAAK,CAAC;AAEpG,QAAM,kBAAkB,CAAC,YAAY,SAAS;AAC5C,gBAAY,MAAM;AAChB,YAAM,YAAqC,CAAC;AAC5C,UAAI,CAAC,eAAe;AAClB,cAAM,QAAQ,CAAC,SAAS;AACtB,oBAAU,KAAK,YAAY;AAAA,QAC7B,CAAC;AAAA,MACH;AACA,qBAAe,SAAS;AACxB,kBAAY,SAAS;AACrB,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,SAAS,CAAC,MAAa,YAAY,SAAS;AAChD,QAAI,CAAC;AAAM;AACX,QAAI,WAAW,QAAQ,GAAG;AACxB,eAAS,IAAI;AAAA,IACf;AACA,gBAAY,CAAC,cAAc;AACzB,YAAM,MAAM,KAAK;AACjB,YAAM,YAAY,iCAAK,YAAL,GAAiB,MAAM,UAAU;AACnD,qBAAe,WAAW,IAAI;AAC9B,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,eAAe,CAAC,MAAa,YAAY,SAAS;AACtD,QAAI,WAAW,cAAc,GAAG;AAC9B,qBAAe,IAAI;AAAA,IACrB;AACA,gBAAY,CAAC,cAAc;AACzB,YAAM,MAAM,KAAK;AACjB,YAAM,YAAY,oBAAoB,WAAW,KAAK,SAAS;AAC/D,qBAAe,WAAW,IAAI;AAC9B,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,WAAW,CAAC,SAAgB;AAChC,QAAI,WAAW,UAAU,GAAG;AAC1B,iBAAW,IAAI;AAAA,IACjB;AACA,gBAAY,CAAC,cAAc;AACzB,YAAM,YAAY,mBAAK;AACvB,aAAO,UAAU,KAAK;AACtB,qBAAe,WAAW,IAAI;AAC9B,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,OAAO,EAAE,UAAU,cAAc;AAAA,IACjC,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,20 +1,75 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { useCallback, useEffect } from "react";
|
|
3
|
+
import { describe, PropTypes } from "../props-helpers";
|
|
4
|
+
const useFocusTrapProps = {
|
|
5
|
+
firstElementRef: "object",
|
|
6
|
+
lastElementRef: "object",
|
|
7
|
+
onKeyDown: "function"
|
|
8
|
+
};
|
|
9
|
+
const getVariableType = (arg) => {
|
|
10
|
+
if (Array.isArray(arg))
|
|
11
|
+
return "array";
|
|
12
|
+
if (arg === null)
|
|
13
|
+
return "null";
|
|
14
|
+
if (arg === void 0)
|
|
15
|
+
return "undefined";
|
|
16
|
+
return typeof arg;
|
|
17
|
+
};
|
|
18
|
+
const throwTypeError = (validPropKey, invalidProp) => {
|
|
19
|
+
throw new Error(`Warning: You are trying to pass a not valid "${validPropKey}" property to use a useFocusTrap hook, please provide a valid type.
|
|
20
|
+
|
|
21
|
+
Received: ${getVariableType(invalidProp)}
|
|
22
|
+
Expected: ${useFocusTrapProps[validPropKey]}
|
|
23
|
+
`);
|
|
24
|
+
};
|
|
25
|
+
const throwRequiredError = (validPropKey) => {
|
|
26
|
+
throw new Error(`Warning: Please provide a "${validPropKey}" property to use a useFocusTrap hook, this property is required.`);
|
|
27
|
+
};
|
|
28
|
+
const validateProps = (componentProps) => {
|
|
29
|
+
if (componentProps.firstElementRef === void 0) {
|
|
30
|
+
throwRequiredError("firstElementRef");
|
|
31
|
+
}
|
|
32
|
+
if (componentProps.lastElementRef === void 0) {
|
|
33
|
+
throwRequiredError("lastElementRef");
|
|
10
34
|
}
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
e.stopPropagation();
|
|
14
|
-
lastElementRef.current.focus();
|
|
35
|
+
if (componentProps.firstElementRef && typeof componentProps.firstElementRef !== "object") {
|
|
36
|
+
throwTypeError("firstElementRef", componentProps.firstElementRef);
|
|
15
37
|
}
|
|
16
|
-
|
|
38
|
+
if (componentProps.lastElementRef && typeof componentProps.lastElementRef !== "object") {
|
|
39
|
+
throwTypeError("lastElementRef", componentProps.lastElementRef);
|
|
40
|
+
}
|
|
41
|
+
if (componentProps.onKeyDown && typeof componentProps.onKeyDown !== "function") {
|
|
42
|
+
throwTypeError("onKeyDown", componentProps.onKeyDown);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const propTypes = {
|
|
46
|
+
firstElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description("Reference to the first element in the focus trap.").isRequired,
|
|
47
|
+
lastElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description("Reference to the second element in the focus trap.").isRequired,
|
|
48
|
+
onKeyDown: PropTypes.func.description("Optional onKeyDown callback.")
|
|
49
|
+
};
|
|
50
|
+
const useFocusTrap = (props) => {
|
|
51
|
+
useEffect(() => validateProps(props), [props]);
|
|
52
|
+
const { firstElementRef, lastElementRef, onKeyDown } = props;
|
|
53
|
+
return useCallback((e) => {
|
|
54
|
+
if (onKeyDown)
|
|
55
|
+
onKeyDown(e);
|
|
56
|
+
if (e.key === "Tab" && !e.shiftKey && e.target === lastElementRef.current && firstElementRef.current) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
firstElementRef.current.focus();
|
|
60
|
+
}
|
|
61
|
+
if (e.key === "Tab" && e.shiftKey && e.target === firstElementRef.current && lastElementRef.current) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
lastElementRef.current.focus();
|
|
65
|
+
}
|
|
66
|
+
}, [firstElementRef, lastElementRef, onKeyDown]);
|
|
67
|
+
};
|
|
68
|
+
useFocusTrap.displayName = "useFocusTrap";
|
|
69
|
+
const UseFocusTrapWithSchema = describe(useFocusTrap);
|
|
70
|
+
UseFocusTrapWithSchema.propTypes = propTypes;
|
|
17
71
|
export {
|
|
72
|
+
UseFocusTrapWithSchema,
|
|
18
73
|
useFocusTrap
|
|
19
74
|
};
|
|
20
75
|
//# sourceMappingURL=useFocusTrap.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useFocusTrap.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\n\ntype UseFocusTrapT = <T extends HTMLElement = HTMLElement, K extends HTMLElement = HTMLElement>({\n firstElementRef,\n lastElementRef,\n onKeyDown,\n}: {\n firstElementRef: React.MutableRefObject<T | null>;\n lastElementRef: React.MutableRefObject<K | null>;\n onKeyDown?: (e: KeyboardEvent) => void;\n}) => (e: KeyboardEvent) => void;\n\
|
|
5
|
-
"mappings": "AAAA;ACAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useEffect, WeakValidationMap } from 'react';\nimport { describe, PropTypes } from '../props-helpers';\n\nconst useFocusTrapProps: { [index: string]: string } = {\n firstElementRef: 'object',\n lastElementRef: 'object',\n onKeyDown: 'function',\n};\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwTypeError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `Warning: You are trying to pass a not valid \"${validPropKey}\" property to use a useFocusTrap hook, please provide a valid type.\n\n Received: ${getVariableType(invalidProp)}\n Expected: ${useFocusTrapProps[validPropKey]}\n `,\n );\n};\n\nconst throwRequiredError = (validPropKey: string): void => {\n throw new Error(\n `Warning: Please provide a \"${validPropKey}\" property to use a useFocusTrap hook, this property is required.`,\n );\n};\n\nconst validateProps = (componentProps: Record<string, unknown>): void => {\n if (componentProps.firstElementRef === undefined) {\n throwRequiredError('firstElementRef');\n }\n if (componentProps.lastElementRef === undefined) {\n throwRequiredError('lastElementRef');\n }\n if (componentProps.firstElementRef && typeof componentProps.firstElementRef !== 'object') {\n throwTypeError('firstElementRef', componentProps.firstElementRef);\n }\n if (componentProps.lastElementRef && typeof componentProps.lastElementRef !== 'object') {\n throwTypeError('lastElementRef', componentProps.lastElementRef);\n }\n if (componentProps.onKeyDown && typeof componentProps.onKeyDown !== 'function') {\n throwTypeError('onKeyDown', componentProps.onKeyDown);\n }\n};\n\nconst propTypes = {\n firstElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description(\n 'Reference to the first element in the focus trap.',\n ).isRequired,\n lastElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description(\n 'Reference to the second element in the focus trap.',\n ).isRequired,\n onKeyDown: PropTypes.func.description('Optional onKeyDown callback.'),\n} as WeakValidationMap<unknown>;\n\ntype UseFocusTrapT = <T extends HTMLElement = HTMLElement, K extends HTMLElement = HTMLElement>({\n firstElementRef,\n lastElementRef,\n onKeyDown,\n}: {\n firstElementRef: React.MutableRefObject<T | null>;\n lastElementRef: React.MutableRefObject<K | null>;\n onKeyDown?: (e: KeyboardEvent) => void;\n}) => (e: KeyboardEvent) => void;\n\nconst useFocusTrap: UseFocusTrapT = (props) => {\n // We need to investigate how to validate references with useValidateTypescriptPropTypes.\n useEffect(() => validateProps(props), [props]);\n\n const { firstElementRef, lastElementRef, onKeyDown } = props;\n\n return useCallback(\n (e: KeyboardEvent) => {\n if (onKeyDown) onKeyDown(e);\n // we need to check all the condition before preventing default\n // because we want last-element/first-element tab/shift-tab to keep working\n\n if (e.key === 'Tab' && !e.shiftKey && e.target === lastElementRef.current && firstElementRef.current) {\n e.preventDefault();\n e.stopPropagation();\n firstElementRef.current.focus();\n }\n if (e.key === 'Tab' && e.shiftKey && e.target === firstElementRef.current && lastElementRef.current) {\n e.preventDefault();\n e.stopPropagation();\n lastElementRef.current.focus();\n }\n },\n [firstElementRef, lastElementRef, onKeyDown],\n );\n};\n\nuseFocusTrap.displayName = 'useFocusTrap';\nconst UseFocusTrapWithSchema = describe(useFocusTrap);\n\nUseFocusTrapWithSchema.propTypes = propTypes;\n\nexport { useFocusTrap, UseFocusTrapWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,oBAAiD;AAAA,EACrD,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,WAAW;AACb;AAEA,MAAM,kBAAkB,CAAC,QAAyB;AAChD,MAAI,MAAM,QAAQ,GAAG;AAAG,WAAO;AAC/B,MAAI,QAAQ;AAAM,WAAO;AACzB,MAAI,QAAQ;AAAW,WAAO;AAC9B,SAAO,OAAO;AAChB;AAEA,MAAM,iBAAiB,CAAC,cAAsB,gBAA+B;AAC3E,QAAM,IAAI,MACR,gDAAgD;AAAA;AAAA,cAEtC,gBAAgB,WAAW;AAAA,cAC3B,kBAAkB;AAAA,GAE9B;AACF;AAEA,MAAM,qBAAqB,CAAC,iBAA+B;AACzD,QAAM,IAAI,MACR,8BAA8B,+EAChC;AACF;AAEA,MAAM,gBAAgB,CAAC,mBAAkD;AACvE,MAAI,eAAe,oBAAoB,QAAW;AAChD,uBAAmB,iBAAiB;AAAA,EACtC;AACA,MAAI,eAAe,mBAAmB,QAAW;AAC/C,uBAAmB,gBAAgB;AAAA,EACrC;AACA,MAAI,eAAe,mBAAmB,OAAO,eAAe,oBAAoB,UAAU;AACxF,mBAAe,mBAAmB,eAAe,eAAe;AAAA,EAClE;AACA,MAAI,eAAe,kBAAkB,OAAO,eAAe,mBAAmB,UAAU;AACtF,mBAAe,kBAAkB,eAAe,cAAc;AAAA,EAChE;AACA,MAAI,eAAe,aAAa,OAAO,eAAe,cAAc,YAAY;AAC9E,mBAAe,aAAa,eAAe,SAAS;AAAA,EACtD;AACF;AAEA,MAAM,YAAY;AAAA,EAChB,iBAAiB,UAAU,UAAU,CAAC,UAAU,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,IAAI,CAAC,EAAE,YAC9E,mDACF,EAAE;AAAA,EACF,gBAAgB,UAAU,UAAU,CAAC,UAAU,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,IAAI,CAAC,EAAE,YAC7E,oDACF,EAAE;AAAA,EACF,WAAW,UAAU,KAAK,YAAY,8BAA8B;AACtE;AAYA,MAAM,eAA8B,CAAC,UAAU;AAE7C,YAAU,MAAM,cAAc,KAAK,GAAG,CAAC,KAAK,CAAC;AAE7C,QAAM,EAAE,iBAAiB,gBAAgB,cAAc;AAEvD,SAAO,YACL,CAAC,MAAqB;AACpB,QAAI;AAAW,gBAAU,CAAC;AAI1B,QAAI,EAAE,QAAQ,SAAS,CAAC,EAAE,YAAY,EAAE,WAAW,eAAe,WAAW,gBAAgB,SAAS;AACpG,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,sBAAgB,QAAQ,MAAM;AAAA,IAChC;AACA,QAAI,EAAE,QAAQ,SAAS,EAAE,YAAY,EAAE,WAAW,gBAAgB,WAAW,eAAe,SAAS;AACnG,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,qBAAe,QAAQ,MAAM;AAAA,IAC/B;AAAA,EACF,GACA,CAAC,iBAAiB,gBAAgB,SAAS,CAC7C;AACF;AAEA,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AAEpD,uBAAuB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,7 +6,7 @@ const useHotkeys = ({ keys, handler, options = {} }, deps = []) => {
|
|
|
6
6
|
useEffect(() => {
|
|
7
7
|
hotkeys(keys, options, memoizedCallback);
|
|
8
8
|
return () => hotkeys.unbind(keys);
|
|
9
|
-
}, [memoizedCallback]);
|
|
9
|
+
}, [keys, memoizedCallback, options]);
|
|
10
10
|
};
|
|
11
11
|
var useHotkeys_default = useHotkeys;
|
|
12
12
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useHotkeys.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import hotkeys from 'hotkeys-js';\nimport { useCallback, useEffect } from 'react';\n\nexport const useHotkeys = ({ keys, handler, options = {} }, deps = []) => {\n const memoizedCallback = useCallback(handler, deps);\n\n useEffect(() => {\n hotkeys(keys, options, memoizedCallback);\n\n return () => hotkeys.unbind(keys);\n }, [memoizedCallback]);\n};\n\nexport default useHotkeys;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import hotkeys, { KeyHandler } from 'hotkeys-js';\nimport { useCallback, useEffect } from 'react';\n\ntype Options = {\n scope?: string;\n element?: HTMLElement | null;\n keyup?: boolean | null;\n keydown?: boolean | null;\n splitKey?: string;\n};\ninterface UseHotKeysArg {\n keys: string;\n options?: Options;\n handler: KeyHandler;\n}\n\nexport const useHotkeys = ({ keys, handler, options = {} }: UseHotKeysArg, deps: unknown[] = []) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const memoizedCallback = useCallback(handler, deps);\n\n useEffect(() => {\n hotkeys(keys, options, memoizedCallback);\n\n return () => hotkeys.unbind(keys);\n }, [keys, memoizedCallback, options]);\n};\n\nexport default useHotkeys;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAeO,MAAM,aAAa,CAAC,EAAE,MAAM,SAAS,UAAU,CAAC,KAAoB,OAAkB,CAAC,MAAM;AAElG,QAAM,mBAAmB,YAAY,SAAS,IAAI;AAElD,YAAU,MAAM;AACd,YAAQ,MAAM,SAAS,gBAAgB;AAEvC,WAAO,MAAM,QAAQ,OAAO,IAAI;AAAA,EAClC,GAAG,CAAC,MAAM,kBAAkB,OAAO,CAAC;AACtC;AAEA,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -9,13 +9,15 @@ const useHoverHandlersDelay = ({
|
|
|
9
9
|
const hideTimer = useRef();
|
|
10
10
|
const showTimer = useRef();
|
|
11
11
|
const delayedHide = useCallback(() => {
|
|
12
|
-
|
|
12
|
+
if (showTimer.current)
|
|
13
|
+
clearTimeout(showTimer.current);
|
|
13
14
|
hideTimer.current = setTimeout(onMouseLeave, hideDelay);
|
|
14
|
-
}, []);
|
|
15
|
+
}, [hideDelay, onMouseLeave]);
|
|
15
16
|
const delayedShow = useCallback(() => {
|
|
16
|
-
|
|
17
|
+
if (hideTimer.current)
|
|
18
|
+
clearTimeout(hideTimer.current);
|
|
17
19
|
showTimer.current = setTimeout(onMouseOver, showDelay);
|
|
18
|
-
}, []);
|
|
20
|
+
}, [onMouseOver, showDelay]);
|
|
19
21
|
return {
|
|
20
22
|
onMouseOver: delayedShow,
|
|
21
23
|
onMouseLeave: delayedHide
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useHoverHandlersDelay.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback, useRef } from 'react';\n\nexport const useHoverHandlersDelay = ({\n onMouseOver,\n onMouseLeave,\n hideDelay = 300,\n showDelay = 300,\n}) => {\n const hideTimer = useRef();\n const showTimer = useRef();\n\n const delayedHide = useCallback(() => {\n clearTimeout(showTimer.current);\n hideTimer.current = setTimeout(onMouseLeave, hideDelay);\n }, []);\n\n const delayedShow = useCallback(() => {\n clearTimeout(hideTimer.current);\n showTimer.current = setTimeout(onMouseOver, showDelay);\n }, []);\n\n return {\n onMouseOver: delayedShow,\n onMouseLeave: delayedHide,\n };\n};\n\nexport default useHoverHandlersDelay;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback, useRef } from 'react';\n\ninterface UseHoverHandlersDelayArg {\n onMouseOver: () => void;\n onMouseLeave: () => void;\n hideDelay?: number;\n showDelay?: number;\n}\n\nexport const useHoverHandlersDelay = ({\n onMouseOver,\n onMouseLeave,\n hideDelay = 300,\n showDelay = 300,\n}: UseHoverHandlersDelayArg) => {\n const hideTimer = useRef<NodeJS.Timeout>();\n const showTimer = useRef<NodeJS.Timeout>();\n\n const delayedHide = useCallback(() => {\n if (showTimer.current) clearTimeout(showTimer.current);\n hideTimer.current = setTimeout(onMouseLeave, hideDelay);\n }, [hideDelay, onMouseLeave]);\n\n const delayedShow = useCallback(() => {\n if (hideTimer.current) clearTimeout(hideTimer.current);\n showTimer.current = setTimeout(onMouseOver, showDelay);\n }, [onMouseOver, showDelay]);\n\n return {\n onMouseOver: delayedShow,\n onMouseLeave: delayedHide,\n };\n};\n\nexport default useHoverHandlersDelay;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AASO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,MACkB;AAC9B,QAAM,YAAY,OAAuB;AACzC,QAAM,YAAY,OAAuB;AAEzC,QAAM,cAAc,YAAY,MAAM;AACpC,QAAI,UAAU;AAAS,mBAAa,UAAU,OAAO;AACrD,cAAU,UAAU,WAAW,cAAc,SAAS;AAAA,EACxD,GAAG,CAAC,WAAW,YAAY,CAAC;AAE5B,QAAM,cAAc,YAAY,MAAM;AACpC,QAAI,UAAU;AAAS,mBAAa,UAAU,OAAO;AACrD,cAAU,UAAU,WAAW,aAAa,SAAS;AAAA,EACvD,GAAG,CAAC,aAAa,SAAS,CAAC;AAE3B,SAAO;AAAA,IACL,aAAa;AAAA,IACb,cAAc;AAAA,EAChB;AACF;AAEA,IAAO,gCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
4
|
+
const theme = getDefaultTheme();
|
|
5
|
+
const isMobile = () => {
|
|
6
|
+
if (!window)
|
|
7
|
+
return false;
|
|
8
|
+
return Number(theme.breakpoints.medium.split("px")[0]) - window.innerWidth >= 0;
|
|
9
|
+
};
|
|
10
|
+
const useIsMobile = () => {
|
|
11
|
+
const [mobile, setMobile] = useState(isMobile());
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
function handleResize() {
|
|
14
|
+
setMobile(isMobile());
|
|
15
|
+
}
|
|
16
|
+
window?.addEventListener("resize", handleResize);
|
|
17
|
+
return () => {
|
|
18
|
+
window?.removeEventListener("resize", handleResize);
|
|
19
|
+
};
|
|
20
|
+
}, []);
|
|
21
|
+
if (!window)
|
|
22
|
+
return false;
|
|
23
|
+
return mobile;
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
useIsMobile
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=useIsMobile.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useIsMobile.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useState, useEffect } from 'react';\nimport { getDefaultTheme } from '@elliemae/pui-theme';\nimport type { Theme } from '@elliemae/pui-theme';\n\nconst theme = getDefaultTheme() as Theme;\n\nconst isMobile = (): boolean => {\n if (!window) return false;\n return Number(theme.breakpoints.medium.split('px')[0]) - window.innerWidth >= 0;\n};\n\nexport const useIsMobile = (): boolean => {\n const [mobile, setMobile] = useState<boolean>(isMobile());\n\n useEffect(() => {\n function handleResize() {\n setMobile(isMobile());\n }\n window?.addEventListener('resize', handleResize);\n return () => {\n window?.removeEventListener('resize', handleResize);\n };\n }, []);\n\n if (!window) return false;\n return mobile;\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAGA,MAAM,QAAQ,gBAAgB;AAE9B,MAAM,WAAW,MAAe;AAC9B,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO,OAAO,MAAM,YAAY,OAAO,MAAM,IAAI,EAAE,EAAE,IAAI,OAAO,cAAc;AAChF;AAEO,MAAM,cAAc,MAAe;AACxC,QAAM,CAAC,QAAQ,aAAa,SAAkB,SAAS,CAAC;AAExD,YAAU,MAAM;AACd,4BAAwB;AACtB,gBAAU,SAAS,CAAC;AAAA,IACtB;AACA,YAAQ,iBAAiB,UAAU,YAAY;AAC/C,WAAO,MAAM;AACX,cAAQ,oBAAoB,UAAU,YAAY;AAAA,IACpD;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useIsShowingEllipsis.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useEffect, useState, useMemo } from 'react';\n\nexport const useIsShowingEllipsis = <T extends HTMLElement | null = HTMLElement | null>() => {\n const [element, setElement] = useState<T>();\n\n const [isShowingEllipsis, setIsShowingEllipsis] = useState(false);\n\n const resizeObserver = useMemo(\n () =>\n new ResizeObserver((entries) => {\n if (entries.length) {\n const [textWrapperEntry] = entries;\n const el = textWrapperEntry.target;\n setIsShowingEllipsis(el?.scrollWidth > el?.clientWidth);\n }\n }),\n [],\n );\n\n useEffect(() => {\n if (element) {\n setIsShowingEllipsis(element.scrollWidth > element.clientWidth);\n resizeObserver.observe(element);\n }\n return () => {\n if (element) {\n resizeObserver.unobserve(element);\n }\n };\n }, [resizeObserver, element]);\n\n return { setElement, isShowingEllipsis };\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAEO,MAAM,uBAAuB,MAAyD;AAC3F,QAAM,CAAC,SAAS,cAAc;
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,MAAM,uBAAuB,MAAyD;AAC3F,QAAM,CAAC,SAAS,cAAc,SAAY;AAE1C,QAAM,CAAC,mBAAmB,wBAAwB,SAAS,KAAK;AAEhE,QAAM,iBAAiB,QACrB,MACE,IAAI,eAAe,CAAC,YAAY;AAC9B,QAAI,QAAQ,QAAQ;AAClB,YAAM,CAAC,oBAAoB;AAC3B,YAAM,KAAK,iBAAiB;AAC5B,2BAAqB,IAAI,cAAc,IAAI,WAAW;AAAA,IACxD;AAAA,EACF,CAAC,GACH,CAAC,CACH;AAEA,YAAU,MAAM;AACd,QAAI,SAAS;AACX,2BAAqB,QAAQ,cAAc,QAAQ,WAAW;AAC9D,qBAAe,QAAQ,OAAO;AAAA,IAChC;AACA,WAAO,MAAM;AACX,UAAI,SAAS;AACX,uBAAe,UAAU,OAAO;AAAA,MAClC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,gBAAgB,OAAO,CAAC;AAE5B,SAAO,EAAE,YAAY,kBAAkB;AACzC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { describe, PropTypes } from "../props-helpers";
|
|
4
|
+
const propTypes = {
|
|
5
|
+
onBlur: PropTypes.func.description("The function to be invoked when focus exits the wrapping container").signature("((e: React.FocusEvent, ...args: unknown[]) => void)").isRequired
|
|
6
|
+
};
|
|
7
|
+
const useOnBlurOut = ({ onBlur }) => useCallback((e, ...args) => {
|
|
8
|
+
const { currentTarget } = e;
|
|
9
|
+
requestAnimationFrame(() => {
|
|
10
|
+
if (!currentTarget.contains(document.activeElement)) {
|
|
11
|
+
onBlur(e, ...args);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}, [onBlur]);
|
|
15
|
+
const UseOnBlurOutWithSchema = describe(useOnBlurOut);
|
|
16
|
+
UseOnBlurOutWithSchema.propTypes = propTypes;
|
|
17
|
+
export {
|
|
18
|
+
UseOnBlurOutWithSchema,
|
|
19
|
+
useOnBlurOut
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useOnBlurOut.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useOnBlurOut.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, WeakValidationMap } from 'react';\nimport { describe, PropTypes } from '../props-helpers';\n\nconst propTypes = {\n onBlur: PropTypes.func\n .description('The function to be invoked when focus exits the wrapping container')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n} as WeakValidationMap<unknown>;\n\ntype OnBlurCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseOnBlurOut = ({ onBlur }: { onBlur: OnBlurCb }) => OnBlurCb;\nconst useOnBlurOut: UseOnBlurOut = ({ onBlur }) =>\n useCallback<OnBlurCb>(\n (e, ...args) => {\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n // Check if the new focused element is a child of the original container\n if (!currentTarget.contains(document.activeElement)) {\n onBlur(e, ...args);\n }\n });\n },\n [onBlur],\n );\n\nconst UseOnBlurOutWithSchema = describe(useOnBlurOut);\nUseOnBlurOutWithSchema.propTypes = propTypes;\n\nexport { useOnBlurOut, UseOnBlurOutWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,YAAY;AAAA,EAChB,QAAQ,UAAU,KACf,YAAY,oEAAoE,EAChF,UAAU,qDAAqD,EAAE;AACtE;AAIA,MAAM,eAA6B,CAAC,EAAE,aACpC,YACE,CAAC,MAAM,SAAS;AACd,QAAM,EAAE,kBAAkB;AAE1B,wBAAsB,MAAM;AAE1B,QAAI,CAAC,cAAc,SAAS,SAAS,aAAa,GAAG;AACnD,aAAO,GAAG,GAAG,IAAI;AAAA,IACnB;AAAA,EACF,CAAC;AACH,GACA,CAAC,MAAM,CACT;AAEF,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useOnElementResize.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useEffect, useRef, useMemo } from 'react';\n\n// Custom hook to track dimension of a component\n// Taken and modified from https://stackoverflow.com/a/60218754\nexport const useOnElementResize = <T extends HTMLElement>(\n targetRef: React.RefObject<T>,\n): Record<'width' | 'height', number> => {\n const [width, setWidth] = useState(targetRef.current?.offsetWidth ?? 0);\n const [height, setHeight] = useState(targetRef.current?.offsetHeight ?? 0);\n const observer = useRef<ResizeObserver>();\n\n useEffect(() => {\n function outputsize() {\n setWidth(targetRef.current?.offsetWidth ?? 0);\n setHeight(targetRef.current?.offsetHeight ?? 0);\n }\n\n observer.current = new ResizeObserver(outputsize);\n observer.current.observe(targetRef.current as Element);\n\n return () => {\n observer.current?.disconnect();\n };\n }, [targetRef]);\n\n return useMemo(\n () => ({\n width,\n height,\n }),\n [width, height],\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAIO,MAAM,qBAAqB,CAChC,cACuC;AACvC,QAAM,CAAC,OAAO,YAAY,SAAS,UAAU,SAAS,eAAe;
|
|
5
|
+
"mappings": "AAAA;ACAA;AAIO,MAAM,qBAAqB,CAChC,cACuC;AACvC,QAAM,CAAC,OAAO,YAAY,SAAS,UAAU,SAAS,eAAe,CAAC;AACtE,QAAM,CAAC,QAAQ,aAAa,SAAS,UAAU,SAAS,gBAAgB,CAAC;AACzE,QAAM,WAAW,OAAuB;AAExC,YAAU,MAAM;AACd,0BAAsB;AACpB,eAAS,UAAU,SAAS,eAAe,CAAC;AAC5C,gBAAU,UAAU,SAAS,gBAAgB,CAAC;AAAA,IAChD;AAEA,aAAS,UAAU,IAAI,eAAe,UAAU;AAChD,aAAS,QAAQ,QAAQ,UAAU,OAAkB;AAErD,WAAO,MAAM;AACX,eAAS,SAAS,WAAW;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,SAAS,CAAC;AAEd,SAAO,QACL,MAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF,IACA,CAAC,OAAO,MAAM,CAChB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useCallback, useMemo, useRef } from "react";
|
|
3
|
+
import { describe, PropTypes } from "../props-helpers";
|
|
4
|
+
const propTypes = {
|
|
5
|
+
onFirstFocusCb: PropTypes.func.description("The function to be invoked when focus enters the wrapping container for the first time").signature("((e: React.FocusEvent, ...args: unknown[]) => void)").isRequired,
|
|
6
|
+
onBlurCb: PropTypes.func.description("Optional onBlur function to be invoked along the returned onBlur handler").signature("((e: React.FocusEvent, ...args: unknown[]) => void)")
|
|
7
|
+
};
|
|
8
|
+
const useOnFirstFocusIn = ({ onFirstFocus, onBlur }) => {
|
|
9
|
+
const mutableDidChildBlur = useRef(false);
|
|
10
|
+
const onFirstFocusHelper = useCallback((e, ...args) => {
|
|
11
|
+
const { currentTarget } = e;
|
|
12
|
+
requestAnimationFrame(() => {
|
|
13
|
+
const isChildFocus = currentTarget.contains(document.activeElement);
|
|
14
|
+
const isFirstFocus = isChildFocus && !mutableDidChildBlur.current;
|
|
15
|
+
if (isFirstFocus) {
|
|
16
|
+
onFirstFocus(e, ...args);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}, [onFirstFocus]);
|
|
20
|
+
const onBlurHelper = useCallback((e, ...args) => {
|
|
21
|
+
onBlur?.(e, ...args);
|
|
22
|
+
const { currentTarget } = e;
|
|
23
|
+
requestAnimationFrame(() => {
|
|
24
|
+
const isChildBlur = currentTarget.contains(document.activeElement);
|
|
25
|
+
mutableDidChildBlur.current = isChildBlur;
|
|
26
|
+
});
|
|
27
|
+
}, [onBlur]);
|
|
28
|
+
return useMemo(() => ({
|
|
29
|
+
onFirstFocus: onFirstFocusHelper,
|
|
30
|
+
onBlur: onBlurHelper
|
|
31
|
+
}), [onFirstFocusHelper, onBlurHelper]);
|
|
32
|
+
};
|
|
33
|
+
const UseOnFirstFocusInWithSchema = describe(useOnFirstFocusIn);
|
|
34
|
+
UseOnFirstFocusInWithSchema.propTypes = propTypes;
|
|
35
|
+
export {
|
|
36
|
+
UseOnFirstFocusInWithSchema,
|
|
37
|
+
useOnFirstFocusIn
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=useOnFirstFocusIn.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useOnFirstFocusIn.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useMemo, useRef, WeakValidationMap } from 'react';\nimport { describe, PropTypes } from '../props-helpers';\n\nconst propTypes = {\n onFirstFocusCb: PropTypes.func\n .description('The function to be invoked when focus enters the wrapping container for the first time')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n onBlurCb: PropTypes.func\n .description('Optional onBlur function to be invoked along the returned onBlur handler')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)'),\n} as WeakValidationMap<unknown>;\n\ntype OnBlurCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype OnFirstFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseFirstFocusIn = ({ onFirstFocus, onBlur }: { onFirstFocus: OnFirstFocusCb; onBlur: OnBlurCb }) => {\n onFirstFocus: OnFirstFocusCb;\n onBlur: OnBlurCb;\n};\n\nconst useOnFirstFocusIn: UseFirstFocusIn = ({ onFirstFocus, onBlur }) => {\n const mutableDidChildBlur = useRef(false);\n const onFirstFocusHelper = useCallback<OnFirstFocusCb>(\n (e, ...args) => {\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n const isChildFocus = currentTarget.contains(document.activeElement);\n const isFirstFocus = isChildFocus && !mutableDidChildBlur.current;\n if (isFirstFocus) {\n onFirstFocus(e, ...args);\n }\n });\n },\n [onFirstFocus],\n );\n const onBlurHelper = useCallback<OnBlurCb>(\n (e, ...args) => {\n onBlur?.(e, ...args);\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n const isChildBlur = currentTarget.contains(document.activeElement);\n mutableDidChildBlur.current = isChildBlur;\n });\n },\n [onBlur],\n );\n return useMemo(\n () => ({\n onFirstFocus: onFirstFocusHelper,\n onBlur: onBlurHelper,\n }),\n [onFirstFocusHelper, onBlurHelper],\n );\n};\n\nconst UseOnFirstFocusInWithSchema = describe(useOnFirstFocusIn);\nUseOnFirstFocusInWithSchema.propTypes = propTypes;\n\nexport { useOnFirstFocusIn, UseOnFirstFocusInWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,YAAY;AAAA,EAChB,gBAAgB,UAAU,KACvB,YAAY,wFAAwF,EACpG,UAAU,qDAAqD,EAAE;AAAA,EACpE,UAAU,UAAU,KACjB,YAAY,0EAA0E,EACtF,UAAU,qDAAqD;AACpE;AASA,MAAM,oBAAqC,CAAC,EAAE,cAAc,aAAa;AACvE,QAAM,sBAAsB,OAAO,KAAK;AACxC,QAAM,qBAAqB,YACzB,CAAC,MAAM,SAAS;AACd,UAAM,EAAE,kBAAkB;AAE1B,0BAAsB,MAAM;AAC1B,YAAM,eAAe,cAAc,SAAS,SAAS,aAAa;AAClE,YAAM,eAAe,gBAAgB,CAAC,oBAAoB;AAC1D,UAAI,cAAc;AAChB,qBAAa,GAAG,GAAG,IAAI;AAAA,MACzB;AAAA,IACF,CAAC;AAAA,EACH,GACA,CAAC,YAAY,CACf;AACA,QAAM,eAAe,YACnB,CAAC,MAAM,SAAS;AACd,aAAS,GAAG,GAAG,IAAI;AACnB,UAAM,EAAE,kBAAkB;AAE1B,0BAAsB,MAAM;AAC1B,YAAM,cAAc,cAAc,SAAS,SAAS,aAAa;AACjE,0BAAoB,UAAU;AAAA,IAChC,CAAC;AAAA,EACH,GACA,CAAC,MAAM,CACT;AACA,SAAO,QACL,MAAO;AAAA,IACL,cAAc;AAAA,IACd,QAAQ;AAAA,EACV,IACA,CAAC,oBAAoB,YAAY,CACnC;AACF;AAEA,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { describe, PropTypes } from "../props-helpers";
|
|
4
|
+
const propTypes = {
|
|
5
|
+
onFocus: PropTypes.func.description("The function to be invoked when focusing specifically the element attached to (ignoring child focus events)").signature("((e: React.FocusEvent, ...args: unknown[]) => void)").isRequired
|
|
6
|
+
};
|
|
7
|
+
const useOnSpecificFocus = ({ onFocus }) => useCallback((e, ...args) => {
|
|
8
|
+
const { currentTarget, target } = e;
|
|
9
|
+
if (currentTarget === target && document.activeElement === currentTarget)
|
|
10
|
+
onFocus(e, ...args);
|
|
11
|
+
}, [onFocus]);
|
|
12
|
+
const UseOnSpecificFocusWithSchema = describe(useOnSpecificFocus);
|
|
13
|
+
UseOnSpecificFocusWithSchema.propTypes = propTypes;
|
|
14
|
+
export {
|
|
15
|
+
UseOnSpecificFocusWithSchema,
|
|
16
|
+
useOnSpecificFocus
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useOnSpecificFocus.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useOnSpecificFocus.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, WeakValidationMap } 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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,YAAY;AAAA,EAChB,SAAS,UAAU,KAChB,YACC,6GACF,EACC,UAAU,qDAAqD,EAAE;AACtE;AAIA,MAAM,qBAAmC,CAAC,EAAE,cAC1C,YACE,CAAC,MAAM,SAAS;AACd,QAAM,EAAE,eAAe,WAAW;AAClC,MAAI,kBAAkB,UAAU,SAAS,kBAAkB;AAAe,YAAQ,GAAG,GAAG,IAAI;AAC9F,GACA,CAAC,OAAO,CACV;AACF,MAAM,+BAA+B,SAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/usePrevious.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useEffect, useRef } from 'react';\n\nexport const usePrevious = (value) => {\n const ref = useRef();\n\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n};\n\nexport default usePrevious;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAEO,MAAM,cAAc,CAAC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,MAAM,cAAc,CAAC,UAAmB;AAC7C,QAAM,MAAM,OAAgB;AAE5B,YAAU,MAAM;AACd,QAAI,UAAU;AAAA,EAChB,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO,IAAI;AACb;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|