@elliemae/ds-utilities 3.60.0-next.4 → 3.60.0-next.41
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/deprecated/index.js +0 -1
- package/dist/cjs/deprecated/index.js.map +2 -2
- package/dist/cjs/hooks/index.js +2 -4
- package/dist/cjs/hooks/index.js.map +3 -3
- package/dist/cjs/{deprecated/useUncontrolled.js → hooks/useForceUpdate.js} +12 -10
- package/dist/cjs/hooks/useForceUpdate.js.map +7 -0
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/deprecated/index.js +0 -1
- package/dist/esm/deprecated/index.js.map +2 -2
- package/dist/esm/hooks/index.js +2 -4
- package/dist/esm/hooks/index.js.map +2 -2
- package/dist/esm/hooks/useForceUpdate.js +13 -0
- package/dist/esm/hooks/useForceUpdate.js.map +7 -0
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/types/deprecated/index.d.ts +0 -1
- package/dist/types/hooks/index.d.ts +3 -4
- package/dist/types/hooks/useForceUpdate.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +28 -34
- package/dist/cjs/deprecated/useUncontrolled.js.map +0 -7
- package/dist/cjs/hooks/useHotkeys.js +0 -46
- package/dist/cjs/hooks/useHotkeys.js.map +0 -7
- package/dist/esm/deprecated/useUncontrolled.js +0 -11
- package/dist/esm/deprecated/useUncontrolled.js.map +0 -7
- package/dist/esm/hooks/useHotkeys.js +0 -16
- package/dist/esm/hooks/useHotkeys.js.map +0 -7
- package/dist/types/deprecated/useUncontrolled.d.ts +0 -1
- package/dist/types/hooks/useHotkeys.d.ts +0 -15
|
@@ -30,6 +30,5 @@ __reExport(deprecated_exports, require("./reactTypesUtility.js"), module.exports
|
|
|
30
30
|
__reExport(deprecated_exports, require("./scrollingTimer.js"), module.exports);
|
|
31
31
|
__reExport(deprecated_exports, require("./useParentElement.js"), module.exports);
|
|
32
32
|
__reExport(deprecated_exports, require("./useSetRef.js"), module.exports);
|
|
33
|
-
__reExport(deprecated_exports, require("./useUncontrolled.js"), module.exports);
|
|
34
33
|
__reExport(deprecated_exports, require("./useWindowSize.js"), module.exports);
|
|
35
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/deprecated/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './reactTypesUtility.js';\nexport * from './scrollingTimer.js';\nexport * from './useParentElement.js';\nexport * from './useSetRef.js';\nexport * from './
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,mCAAd;AACA,+BAAc,gCADd;AAEA,+BAAc,kCAFd;AAGA,+BAAc,2BAHd;AAIA,+BAAc
|
|
4
|
+
"sourcesContent": ["export * from './reactTypesUtility.js';\nexport * from './scrollingTimer.js';\nexport * from './useParentElement.js';\nexport * from './useSetRef.js';\nexport * from './useWindowSize.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,mCAAd;AACA,+BAAc,gCADd;AAEA,+BAAc,kCAFd;AAGA,+BAAc,2BAHd;AAIA,+BAAc,+BAJd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -35,9 +35,8 @@ __export(hooks_exports, {
|
|
|
35
35
|
useDerivedStateFromProps: () => import_useDerivedStateFromProps.useDerivedStateFromProps,
|
|
36
36
|
useExecutionTimer: () => import_useExecutionTimer.useExecutionTimer,
|
|
37
37
|
useExpandState: () => import_useExpandState.useExpandState,
|
|
38
|
-
useForceUpdate: () =>
|
|
38
|
+
useForceUpdate: () => import_useForceUpdate.useForceUpdate,
|
|
39
39
|
useHeadlessTooltip: () => import_useHeadlessTooltip.useHeadlessTooltip,
|
|
40
|
-
useHotkeys: () => import_useHotkeys.useHotkeys,
|
|
41
40
|
useHoverHandlersDelay: () => import_useHoverHandlersDelay.useHoverHandlersDelay,
|
|
42
41
|
useIsShowingEllipsis: () => import_useIsShowingEllipsis.useIsShowingEllipsis,
|
|
43
42
|
useLatestValueReferenciallyStable: () => import_useMakeMutable.useLatestValueReferenciallyStable,
|
|
@@ -59,7 +58,6 @@ __export(hooks_exports, {
|
|
|
59
58
|
module.exports = __toCommonJS(hooks_exports);
|
|
60
59
|
var React = __toESM(require("react"));
|
|
61
60
|
var import_use_measure = __toESM(require("use-measure"));
|
|
62
|
-
var import_use_force_update = __toESM(require("use-force-update"));
|
|
63
61
|
var import_use_onclickoutside = __toESM(require("use-onclickoutside"));
|
|
64
62
|
var import_useCallbackAfterRender = require("./useCallbackAfterRender.js");
|
|
65
63
|
var import_useCancellableDelayedCallback = require("./useCancellableDelayedCallback.js");
|
|
@@ -67,8 +65,8 @@ var import_useControlledUncontrolledState = require("./useControlledUncontrolled
|
|
|
67
65
|
var import_useDerivedStateFromProps = require("./useDerivedStateFromProps.js");
|
|
68
66
|
var import_useExecutionTimer = require("./useExecutionTimer.js");
|
|
69
67
|
var import_useExpandState = require("./useExpandState.js");
|
|
68
|
+
var import_useForceUpdate = require("./useForceUpdate.js");
|
|
70
69
|
var import_useHeadlessTooltip = require("./useHeadlessTooltip.js");
|
|
71
|
-
var import_useHotkeys = require("./useHotkeys.js");
|
|
72
70
|
var import_useHoverHandlersDelay = require("./useHoverHandlersDelay.js");
|
|
73
71
|
var import_useIsShowingEllipsis = require("./useIsShowingEllipsis.js");
|
|
74
72
|
var import_useMakeMutable = require("./useMakeMutable.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import useMeasure from 'use-measure';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import useMeasure from 'use-measure';\nimport useOnClickOutside from 'use-onclickoutside';\n\nexport { useMeasure, useOnClickOutside };\n\nexport { useCallbackAfterRender } from './useCallbackAfterRender.js';\nexport { useCancellableDelayedCallback } from './useCancellableDelayedCallback.js';\nexport { useControlledUncontrolledState } from './useControlledUncontrolledState.js';\nexport { useDerivedStateFromProps } from './useDerivedStateFromProps.js';\nexport { useExecutionTimer } from './useExecutionTimer.js';\nexport { useExpandState } from './useExpandState.js';\nexport { useForceUpdate } from './useForceUpdate.js';\nexport { useHeadlessTooltip } from './useHeadlessTooltip.js';\nexport { useHoverHandlersDelay } from './useHoverHandlersDelay.js';\nexport { useIsShowingEllipsis } from './useIsShowingEllipsis.js';\nexport { useLatestValueReferenciallyStable, useMakeMutable } from './useMakeMutable.js';\nexport { useNativeIntersectionObserver } from './useNativeIntersectionObserver.js';\nexport { useNativeResizeObserver } from './useNativeResizeObserver.js';\nexport { useOnElementResize } from './useOnElementResize.js';\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from './useOnSpecificFocus.js';\nexport { useOwnerProps } from './useOwnerProps.js';\nexport { usePrevious } from './usePrevious.js';\nexport { useResizeObserver } from './useResizeObserver.js';\nexport { useShouldRecalculate } from './useShouldRecalculate.js';\nexport { useSideEffectSyntheticEvent } from './useSideEffectSyntheticEvent.js';\nexport { useTrackElement } from './useTrackElement.js';\nexport { useWindowScrollerList } from './useWindowScrollerList.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAAA;AAAA,EAAA;AAAA;AAAA,qDAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAuB;AACvB,gCAA8B;AAI9B,oCAAuC;AACvC,2CAA8C;AAC9C,4CAA+C;AAC/C,sCAAyC;AACzC,+BAAkC;AAClC,4BAA+B;AAC/B,4BAA+B;AAC/B,gCAAmC;AACnC,mCAAsC;AACtC,kCAAqC;AACrC,4BAAkE;AAClE,2CAA8C;AAC9C,qCAAwC;AACxC,gCAAmC;AACnC,gCAAiE;AACjE,2BAA8B;AAC9B,yBAA4B;AAC5B,+BAAkC;AAClC,kCAAqC;AACrC,yCAA4C;AAC5C,6BAAgC;AAChC,mCAAsC;",
|
|
6
|
+
"names": ["useMeasure", "useOnClickOutside"]
|
|
7
7
|
}
|
|
@@ -26,16 +26,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
29
|
+
var useForceUpdate_exports = {};
|
|
30
|
+
__export(useForceUpdate_exports, {
|
|
31
|
+
useForceUpdate: () => useForceUpdate
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(useForceUpdate_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
return (0,
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
const createNewObject = () => ({});
|
|
37
|
+
const useForceUpdate = () => {
|
|
38
|
+
const [, setValue] = (0, import_react.useState)(createNewObject);
|
|
39
|
+
return (0, import_react.useCallback)(() => {
|
|
40
|
+
setValue(createNewObject());
|
|
41
|
+
}, []);
|
|
40
42
|
};
|
|
41
|
-
//# sourceMappingURL=
|
|
43
|
+
//# sourceMappingURL=useForceUpdate.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useForceUpdate.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useCallback, useState } from 'react';\n\nconst createNewObject = (): Record<string, never> => ({});\n\n// https://github.com/quisido/quisi.do/blob/main/packages/use-force-update/src/index.ts\nexport const useForceUpdate = () => {\n const [, setValue] = useState<Record<string, never>>(createNewObject);\n\n return useCallback((): void => {\n setValue(createNewObject());\n }, []);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsC;AAEtC,MAAM,kBAAkB,OAA8B,CAAC;AAGhD,MAAM,iBAAiB,MAAM;AAClC,QAAM,CAAC,EAAE,QAAQ,QAAI,uBAAgC,eAAe;AAEpE,aAAO,0BAAY,MAAY;AAC7B,aAAS,gBAAgB,CAAC;AAAA,EAC5B,GAAG,CAAC,CAAC;AACP;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -119,7 +119,6 @@ __export(index_exports, {
|
|
|
119
119
|
useExpandState: () => import_hooks.useExpandState,
|
|
120
120
|
useForceUpdate: () => import_hooks.useForceUpdate,
|
|
121
121
|
useHeadlessTooltip: () => import_hooks.useHeadlessTooltip,
|
|
122
|
-
useHotkeys: () => import_hooks.useHotkeys,
|
|
123
122
|
useHoverHandlersDelay: () => import_hooks.useHoverHandlersDelay,
|
|
124
123
|
useIsShowingEllipsis: () => import_hooks.useIsShowingEllipsis,
|
|
125
124
|
useLatestValueReferenciallyStable: () => import_hooks.useLatestValueReferenciallyStable,
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from '@elliemae/ds-hooks-on-blur-out';\nexport * from '@elliemae/ds-hooks-on-first-focus-in';\nexport * from '@elliemae/ds-hooks-focus-trap';\nexport * from '@elliemae/ds-hooks-is-mobile';\nexport { getComponentFromProps } from './getComponentFromProps.js';\nexport { onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements.js';\nexport { capitalize } from './capitalize.js';\nexport { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities.js';\nexport {\n checkEmpty,\n checkNotEmpty,\n contains,\n equal,\n greaterThan,\n greaterThanOrEquals,\n isIn,\n isNotIn,\n isNotNull,\n isNull,\n lessThanOrEquals,\n notEqual,\n startsWith,\n validDate,\n} from './operators.js';\nexport * as operators from './operators.js';\nexport {\n addOrRemove,\n arrayMove,\n cloneDeep,\n curry,\n cx,\n debounce,\n differenceBy,\n differenceWith,\n filter,\n findIndex,\n get,\n groupBy,\n hashArray,\n isBoolean,\n isEmpty,\n isEqual,\n isEqualWith,\n isFunction,\n isNaN,\n isObject,\n isString,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n padStart,\n parseInt,\n pick,\n pickBy,\n property,\n pull,\n range,\n removeUndefinedProperties,\n runAll,\n safeCall,\n set,\n sortBy,\n sumBy,\n throttle,\n toggleInArray,\n toggleInObject,\n transform,\n uniq,\n uniqBy,\n values,\n} from './utils.js';\nexport { setRef, mergeRefs, setMultipleRefs, logger } from './system.js';\nexport {\n useCallbackAfterRender,\n useCancellableDelayedCallback,\n useControlledUncontrolledState,\n useDerivedStateFromProps,\n useExecutionTimer,\n useExpandState,\n useForceUpdate,\n useHeadlessTooltip,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["export * from '@elliemae/ds-hooks-on-blur-out';\nexport * from '@elliemae/ds-hooks-on-first-focus-in';\nexport * from '@elliemae/ds-hooks-focus-trap';\nexport * from '@elliemae/ds-hooks-is-mobile';\nexport { getComponentFromProps } from './getComponentFromProps.js';\nexport { onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements.js';\nexport { capitalize } from './capitalize.js';\nexport { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities.js';\nexport {\n checkEmpty,\n checkNotEmpty,\n contains,\n equal,\n greaterThan,\n greaterThanOrEquals,\n isIn,\n isNotIn,\n isNotNull,\n isNull,\n lessThanOrEquals,\n notEqual,\n startsWith,\n validDate,\n} from './operators.js';\nexport * as operators from './operators.js';\nexport {\n addOrRemove,\n arrayMove,\n cloneDeep,\n curry,\n cx,\n debounce,\n differenceBy,\n differenceWith,\n filter,\n findIndex,\n get,\n groupBy,\n hashArray,\n isBoolean,\n isEmpty,\n isEqual,\n isEqualWith,\n isFunction,\n isNaN,\n isObject,\n isString,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n padStart,\n parseInt,\n pick,\n pickBy,\n property,\n pull,\n range,\n removeUndefinedProperties,\n runAll,\n safeCall,\n set,\n sortBy,\n sumBy,\n throttle,\n toggleInArray,\n toggleInObject,\n transform,\n uniq,\n uniqBy,\n values,\n} from './utils.js';\nexport { setRef, mergeRefs, setMultipleRefs, logger } from './system.js';\nexport {\n useCallbackAfterRender,\n useCancellableDelayedCallback,\n useControlledUncontrolledState,\n useDerivedStateFromProps,\n useExecutionTimer,\n useExpandState,\n useForceUpdate,\n useHeadlessTooltip,\n useHoverHandlersDelay,\n useIsShowingEllipsis,\n useMakeMutable,\n useLatestValueReferenciallyStable,\n useMeasure,\n useNativeIntersectionObserver,\n useNativeResizeObserver,\n useOnClickOutside,\n useOnElementResize,\n useOnSpecificFocus,\n UseOnSpecificFocusWithSchema,\n useOwnerProps,\n usePrevious,\n useResizeObserver,\n useShouldRecalculate,\n useSideEffectSyntheticEvent,\n useTrackElement,\n useWindowScrollerList,\n} from './hooks/index.js';\n\nexport { findInCircularList } from './findInCircularList.js';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils.js';\nexport { compose } from './compose.js';\nexport { DOCUMENT, WINDOW } from './platform.js';\nexport { isDOMTypeElement } from './reactTypesUtility.js';\nexport { isRequired, isGreaterThan, isValidDate } from './validations.js';\nexport { getHighlightedRerendersStyle } from './getHighlightedRerendersStyle.js';\n\nexport { crossTypeSort } from './algorithms/crossTypeSort.js';\nexport { appendComponentIfNotExist } from './addComponentIfNotExists.js';\n// TODO -- REMOVE WHEN READY\nexport * from './deprecated/index.js';\nexport * from './props-helpers/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAc,2CAAd;AACA,0BAAc,iDADd;AAEA,0BAAc,0CAFd;AAGA,0BAAc,yCAHd;AAIA,mCAAsC;AACtC,qDAAwD;AACxD,wBAA2B;AAC3B,6BAA6D;AAC7D,uBAeO;AACP,gBAA2B;AAC3B,mBA+CO;AACP,oBAA2D;AAC3D,mBA2BO;AAEP,gCAAmC;AACnC,uBAAwD;AACxD,qBAAwB;AACxB,sBAAiC;AACjC,+BAAiC;AACjC,yBAAuD;AACvD,0CAA6C;AAE7C,2BAA8B;AAC9B,qCAA0C;AAE1C,0BAAc,kCAlHd;AAmHA,0BAAc,qCAnHd;",
|
|
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/deprecated/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './reactTypesUtility.js';\nexport * from './scrollingTimer.js';\nexport * from './useParentElement.js';\nexport * from './useSetRef.js';\nexport * from './
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './reactTypesUtility.js';\nexport * from './scrollingTimer.js';\nexport * from './useParentElement.js';\nexport * from './useSetRef.js';\nexport * from './useWindowSize.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import useMeasure from "use-measure";
|
|
3
|
-
import useForceUpdate from "use-force-update";
|
|
4
3
|
import useOnClickOutside from "use-onclickoutside";
|
|
5
4
|
import { useCallbackAfterRender } from "./useCallbackAfterRender.js";
|
|
6
5
|
import { useCancellableDelayedCallback } from "./useCancellableDelayedCallback.js";
|
|
@@ -8,11 +7,11 @@ import { useControlledUncontrolledState } from "./useControlledUncontrolledState
|
|
|
8
7
|
import { useDerivedStateFromProps } from "./useDerivedStateFromProps.js";
|
|
9
8
|
import { useExecutionTimer } from "./useExecutionTimer.js";
|
|
10
9
|
import { useExpandState } from "./useExpandState.js";
|
|
10
|
+
import { useForceUpdate } from "./useForceUpdate.js";
|
|
11
11
|
import { useHeadlessTooltip } from "./useHeadlessTooltip.js";
|
|
12
|
-
import { useHotkeys } from "./useHotkeys.js";
|
|
13
12
|
import { useHoverHandlersDelay } from "./useHoverHandlersDelay.js";
|
|
14
13
|
import { useIsShowingEllipsis } from "./useIsShowingEllipsis.js";
|
|
15
|
-
import {
|
|
14
|
+
import { useLatestValueReferenciallyStable, useMakeMutable } from "./useMakeMutable.js";
|
|
16
15
|
import { useNativeIntersectionObserver } from "./useNativeIntersectionObserver.js";
|
|
17
16
|
import { useNativeResizeObserver } from "./useNativeResizeObserver.js";
|
|
18
17
|
import { useOnElementResize } from "./useOnElementResize.js";
|
|
@@ -34,7 +33,6 @@ export {
|
|
|
34
33
|
useExpandState,
|
|
35
34
|
useForceUpdate,
|
|
36
35
|
useHeadlessTooltip,
|
|
37
|
-
useHotkeys,
|
|
38
36
|
useHoverHandlersDelay,
|
|
39
37
|
useIsShowingEllipsis,
|
|
40
38
|
useLatestValueReferenciallyStable,
|
|
@@ -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", "import useMeasure from 'use-measure';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAO,gBAAgB;AACvB,OAAO,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import useMeasure from 'use-measure';\nimport useOnClickOutside from 'use-onclickoutside';\n\nexport { useMeasure, useOnClickOutside };\n\nexport { useCallbackAfterRender } from './useCallbackAfterRender.js';\nexport { useCancellableDelayedCallback } from './useCancellableDelayedCallback.js';\nexport { useControlledUncontrolledState } from './useControlledUncontrolledState.js';\nexport { useDerivedStateFromProps } from './useDerivedStateFromProps.js';\nexport { useExecutionTimer } from './useExecutionTimer.js';\nexport { useExpandState } from './useExpandState.js';\nexport { useForceUpdate } from './useForceUpdate.js';\nexport { useHeadlessTooltip } from './useHeadlessTooltip.js';\nexport { useHoverHandlersDelay } from './useHoverHandlersDelay.js';\nexport { useIsShowingEllipsis } from './useIsShowingEllipsis.js';\nexport { useLatestValueReferenciallyStable, useMakeMutable } from './useMakeMutable.js';\nexport { useNativeIntersectionObserver } from './useNativeIntersectionObserver.js';\nexport { useNativeResizeObserver } from './useNativeResizeObserver.js';\nexport { useOnElementResize } from './useOnElementResize.js';\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from './useOnSpecificFocus.js';\nexport { useOwnerProps } from './useOwnerProps.js';\nexport { usePrevious } from './usePrevious.js';\nexport { useResizeObserver } from './useResizeObserver.js';\nexport { useShouldRecalculate } from './useShouldRecalculate.js';\nexport { useSideEffectSyntheticEvent } from './useSideEffectSyntheticEvent.js';\nexport { useTrackElement } from './useTrackElement.js';\nexport { useWindowScrollerList } from './useWindowScrollerList.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAO,gBAAgB;AACvB,OAAO,uBAAuB;AAI9B,SAAS,8BAA8B;AACvC,SAAS,qCAAqC;AAC9C,SAAS,sCAAsC;AAC/C,SAAS,gCAAgC;AACzC,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AACtC,SAAS,4BAA4B;AACrC,SAAS,mCAAmC,sBAAsB;AAClE,SAAS,qCAAqC;AAC9C,SAAS,+BAA+B;AACxC,SAAS,0BAA0B;AACnC,SAAS,oBAAoB,oCAAoC;AACjE,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AACrC,SAAS,mCAAmC;AAC5C,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
|
+
const createNewObject = () => ({});
|
|
4
|
+
const useForceUpdate = () => {
|
|
5
|
+
const [, setValue] = useState(createNewObject);
|
|
6
|
+
return useCallback(() => {
|
|
7
|
+
setValue(createNewObject());
|
|
8
|
+
}, []);
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
useForceUpdate
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useForceUpdate.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useForceUpdate.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback, useState } from 'react';\n\nconst createNewObject = (): Record<string, never> => ({});\n\n// https://github.com/quisido/quisi.do/blob/main/packages/use-force-update/src/index.ts\nexport const useForceUpdate = () => {\n const [, setValue] = useState<Record<string, never>>(createNewObject);\n\n return useCallback((): void => {\n setValue(createNewObject());\n }, []);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,aAAa,gBAAgB;AAEtC,MAAM,kBAAkB,OAA8B,CAAC;AAGhD,MAAM,iBAAiB,MAAM;AAClC,QAAM,CAAC,EAAE,QAAQ,IAAI,SAAgC,eAAe;AAEpE,SAAO,YAAY,MAAY;AAC7B,aAAS,gBAAgB,CAAC;AAAA,EAC5B,GAAG,CAAC,CAAC;AACP;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -82,7 +82,6 @@ import {
|
|
|
82
82
|
useExpandState,
|
|
83
83
|
useForceUpdate,
|
|
84
84
|
useHeadlessTooltip,
|
|
85
|
-
useHotkeys,
|
|
86
85
|
useHoverHandlersDelay,
|
|
87
86
|
useIsShowingEllipsis,
|
|
88
87
|
useMakeMutable,
|
|
@@ -204,7 +203,6 @@ export {
|
|
|
204
203
|
useExpandState,
|
|
205
204
|
useForceUpdate,
|
|
206
205
|
useHeadlessTooltip,
|
|
207
|
-
useHotkeys,
|
|
208
206
|
useHoverHandlersDelay,
|
|
209
207
|
useIsShowingEllipsis,
|
|
210
208
|
useLatestValueReferenciallyStable,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from '@elliemae/ds-hooks-on-blur-out';\nexport * from '@elliemae/ds-hooks-on-first-focus-in';\nexport * from '@elliemae/ds-hooks-focus-trap';\nexport * from '@elliemae/ds-hooks-is-mobile';\nexport { getComponentFromProps } from './getComponentFromProps.js';\nexport { onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements.js';\nexport { capitalize } from './capitalize.js';\nexport { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities.js';\nexport {\n checkEmpty,\n checkNotEmpty,\n contains,\n equal,\n greaterThan,\n greaterThanOrEquals,\n isIn,\n isNotIn,\n isNotNull,\n isNull,\n lessThanOrEquals,\n notEqual,\n startsWith,\n validDate,\n} from './operators.js';\nexport * as operators from './operators.js';\nexport {\n addOrRemove,\n arrayMove,\n cloneDeep,\n curry,\n cx,\n debounce,\n differenceBy,\n differenceWith,\n filter,\n findIndex,\n get,\n groupBy,\n hashArray,\n isBoolean,\n isEmpty,\n isEqual,\n isEqualWith,\n isFunction,\n isNaN,\n isObject,\n isString,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n padStart,\n parseInt,\n pick,\n pickBy,\n property,\n pull,\n range,\n removeUndefinedProperties,\n runAll,\n safeCall,\n set,\n sortBy,\n sumBy,\n throttle,\n toggleInArray,\n toggleInObject,\n transform,\n uniq,\n uniqBy,\n values,\n} from './utils.js';\nexport { setRef, mergeRefs, setMultipleRefs, logger } from './system.js';\nexport {\n useCallbackAfterRender,\n useCancellableDelayedCallback,\n useControlledUncontrolledState,\n useDerivedStateFromProps,\n useExecutionTimer,\n useExpandState,\n useForceUpdate,\n useHeadlessTooltip,\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,6BAA6B;AACtC,SAAS,+CAA+C;AACxD,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB,4BAA4B;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,YAAY,eAAe;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,QAAQ,WAAW,iBAAiB,cAAc;AAC3D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from '@elliemae/ds-hooks-on-blur-out';\nexport * from '@elliemae/ds-hooks-on-first-focus-in';\nexport * from '@elliemae/ds-hooks-focus-trap';\nexport * from '@elliemae/ds-hooks-is-mobile';\nexport { getComponentFromProps } from './getComponentFromProps.js';\nexport { onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements.js';\nexport { capitalize } from './capitalize.js';\nexport { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities.js';\nexport {\n checkEmpty,\n checkNotEmpty,\n contains,\n equal,\n greaterThan,\n greaterThanOrEquals,\n isIn,\n isNotIn,\n isNotNull,\n isNull,\n lessThanOrEquals,\n notEqual,\n startsWith,\n validDate,\n} from './operators.js';\nexport * as operators from './operators.js';\nexport {\n addOrRemove,\n arrayMove,\n cloneDeep,\n curry,\n cx,\n debounce,\n differenceBy,\n differenceWith,\n filter,\n findIndex,\n get,\n groupBy,\n hashArray,\n isBoolean,\n isEmpty,\n isEqual,\n isEqualWith,\n isFunction,\n isNaN,\n isObject,\n isString,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n padStart,\n parseInt,\n pick,\n pickBy,\n property,\n pull,\n range,\n removeUndefinedProperties,\n runAll,\n safeCall,\n set,\n sortBy,\n sumBy,\n throttle,\n toggleInArray,\n toggleInObject,\n transform,\n uniq,\n uniqBy,\n values,\n} from './utils.js';\nexport { setRef, mergeRefs, setMultipleRefs, logger } from './system.js';\nexport {\n useCallbackAfterRender,\n useCancellableDelayedCallback,\n useControlledUncontrolledState,\n useDerivedStateFromProps,\n useExecutionTimer,\n useExpandState,\n useForceUpdate,\n useHeadlessTooltip,\n useHoverHandlersDelay,\n useIsShowingEllipsis,\n useMakeMutable,\n useLatestValueReferenciallyStable,\n useMeasure,\n useNativeIntersectionObserver,\n useNativeResizeObserver,\n useOnClickOutside,\n useOnElementResize,\n useOnSpecificFocus,\n UseOnSpecificFocusWithSchema,\n useOwnerProps,\n usePrevious,\n useResizeObserver,\n useShouldRecalculate,\n useSideEffectSyntheticEvent,\n useTrackElement,\n useWindowScrollerList,\n} from './hooks/index.js';\n\nexport { findInCircularList } from './findInCircularList.js';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils.js';\nexport { compose } from './compose.js';\nexport { DOCUMENT, WINDOW } from './platform.js';\nexport { isDOMTypeElement } from './reactTypesUtility.js';\nexport { isRequired, isGreaterThan, isValidDate } from './validations.js';\nexport { getHighlightedRerendersStyle } from './getHighlightedRerendersStyle.js';\n\nexport { crossTypeSort } from './algorithms/crossTypeSort.js';\nexport { appendComponentIfNotExist } from './addComponentIfNotExists.js';\n// TODO -- REMOVE WHEN READY\nexport * from './deprecated/index.js';\nexport * from './props-helpers/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,6BAA6B;AACtC,SAAS,+CAA+C;AACxD,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB,4BAA4B;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,YAAY,eAAe;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,QAAQ,WAAW,iBAAiB,cAAc;AAC3D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,0BAA0B;AACnC,SAAS,wBAAwB,uBAAuB;AACxD,SAAS,eAAe;AACxB,SAAS,UAAU,cAAc;AACjC,SAAS,wBAAwB;AACjC,SAAS,YAAY,eAAe,mBAAmB;AACvD,SAAS,oCAAoC;AAE7C,SAAS,qBAAqB;AAC9B,SAAS,iCAAiC;AAE1C,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import useMeasure from 'use-measure';
|
|
2
|
-
import useForceUpdate from 'use-force-update';
|
|
3
2
|
import useOnClickOutside from 'use-onclickoutside';
|
|
4
|
-
export { useMeasure,
|
|
3
|
+
export { useMeasure, useOnClickOutside };
|
|
5
4
|
export { useCallbackAfterRender } from './useCallbackAfterRender.js';
|
|
6
5
|
export { useCancellableDelayedCallback } from './useCancellableDelayedCallback.js';
|
|
7
6
|
export { useControlledUncontrolledState } from './useControlledUncontrolledState.js';
|
|
8
7
|
export { useDerivedStateFromProps } from './useDerivedStateFromProps.js';
|
|
9
8
|
export { useExecutionTimer } from './useExecutionTimer.js';
|
|
10
9
|
export { useExpandState } from './useExpandState.js';
|
|
10
|
+
export { useForceUpdate } from './useForceUpdate.js';
|
|
11
11
|
export { useHeadlessTooltip } from './useHeadlessTooltip.js';
|
|
12
|
-
export { useHotkeys } from './useHotkeys.js';
|
|
13
12
|
export { useHoverHandlersDelay } from './useHoverHandlersDelay.js';
|
|
14
13
|
export { useIsShowingEllipsis } from './useIsShowingEllipsis.js';
|
|
15
|
-
export {
|
|
14
|
+
export { useLatestValueReferenciallyStable, useMakeMutable } from './useMakeMutable.js';
|
|
16
15
|
export { useNativeIntersectionObserver } from './useNativeIntersectionObserver.js';
|
|
17
16
|
export { useNativeResizeObserver } from './useNativeResizeObserver.js';
|
|
18
17
|
export { useOnElementResize } from './useOnElementResize.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useForceUpdate: () => () => void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { checkEmpty, checkNotEmpty, contains, equal, greaterThan, greaterThanOrE
|
|
|
10
10
|
export * as operators from './operators.js';
|
|
11
11
|
export { addOrRemove, arrayMove, cloneDeep, curry, cx, debounce, differenceBy, differenceWith, filter, findIndex, get, groupBy, hashArray, isBoolean, isEmpty, isEqual, isEqualWith, isFunction, isNaN, isObject, isString, maxBy, meanBy, noop, omit, orderBy, padStart, parseInt, pick, pickBy, property, pull, range, removeUndefinedProperties, runAll, safeCall, set, sortBy, sumBy, throttle, toggleInArray, toggleInObject, transform, uniq, uniqBy, values, } from './utils.js';
|
|
12
12
|
export { setRef, mergeRefs, setMultipleRefs, logger } from './system.js';
|
|
13
|
-
export { useCallbackAfterRender, useCancellableDelayedCallback, useControlledUncontrolledState, useDerivedStateFromProps, useExecutionTimer, useExpandState, useForceUpdate, useHeadlessTooltip,
|
|
13
|
+
export { useCallbackAfterRender, useCancellableDelayedCallback, useControlledUncontrolledState, useDerivedStateFromProps, useExecutionTimer, useExpandState, useForceUpdate, useHeadlessTooltip, useHoverHandlersDelay, useIsShowingEllipsis, useMakeMutable, useLatestValueReferenciallyStable, useMeasure, useNativeIntersectionObserver, useNativeResizeObserver, useOnClickOutside, useOnElementResize, useOnSpecificFocus, UseOnSpecificFocusWithSchema, useOwnerProps, usePrevious, useResizeObserver, useShouldRecalculate, useSideEffectSyntheticEvent, useTrackElement, useWindowScrollerList, } from './hooks/index.js';
|
|
14
14
|
export { findInCircularList } from './findInCircularList.js';
|
|
15
15
|
export { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils.js';
|
|
16
16
|
export { compose } from './compose.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-utilities",
|
|
3
|
-
"version": "3.60.0-next.
|
|
3
|
+
"version": "3.60.0-next.41",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Utilities",
|
|
6
6
|
"files": [
|
|
@@ -35,46 +35,40 @@
|
|
|
35
35
|
"reportFile": "tests.xml",
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"test": "pui-cli test --passWithNoTests --coverage=\"false\"",
|
|
40
|
-
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
41
|
-
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
42
|
-
"dts": "node ../../../scripts/dts.mjs",
|
|
43
|
-
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
44
|
-
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\"",
|
|
45
|
-
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch"
|
|
46
|
-
},
|
|
47
38
|
"publishConfig": {
|
|
48
39
|
"access": "public",
|
|
49
40
|
"typeSafety": false
|
|
50
41
|
},
|
|
51
42
|
"dependencies": {
|
|
52
|
-
"@elliemae/
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"use-force-update": "catalog:",
|
|
64
|
-
"use-measure": "catalog:",
|
|
65
|
-
"use-onclickoutside": "catalog:"
|
|
43
|
+
"@elliemae/pui-theme": "~2.13.0",
|
|
44
|
+
"raf": "~3.4.1",
|
|
45
|
+
"react-dom": "^18.3.1",
|
|
46
|
+
"resize-observer-polyfill": "~1.5.1",
|
|
47
|
+
"use-measure": "~0.3.0",
|
|
48
|
+
"use-onclickoutside": "0.4.1",
|
|
49
|
+
"@elliemae/ds-hooks-focus-trap": "3.60.0-next.41",
|
|
50
|
+
"@elliemae/ds-hooks-is-mobile": "3.60.0-next.41",
|
|
51
|
+
"@elliemae/ds-hooks-on-blur-out": "3.60.0-next.41",
|
|
52
|
+
"@elliemae/ds-hooks-on-first-focus-in": "3.60.0-next.41",
|
|
53
|
+
"@elliemae/ds-props-helpers": "3.60.0-next.41"
|
|
66
54
|
},
|
|
67
55
|
"devDependencies": {
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"jest-cli": "catalog:",
|
|
72
|
-
"react-dom": "catalog:"
|
|
56
|
+
"jest": "^30.0.0",
|
|
57
|
+
"react-dom": "^18.3.1",
|
|
58
|
+
"@elliemae/ds-monorepo-devops": "3.60.0-next.41"
|
|
73
59
|
},
|
|
74
60
|
"peerDependencies": {
|
|
75
|
-
"lodash-es": "
|
|
76
|
-
"react": "
|
|
77
|
-
"react-dom": "
|
|
61
|
+
"lodash-es": "^4.17.21",
|
|
62
|
+
"react": "^18.3.1",
|
|
63
|
+
"react-dom": "^18.3.1"
|
|
78
64
|
},
|
|
79
|
-
"
|
|
80
|
-
|
|
65
|
+
"scripts": {
|
|
66
|
+
"test": "ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
|
|
67
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
68
|
+
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
69
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
70
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
71
|
+
"checkDeps": "npx -yes ../../util/ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\"",
|
|
72
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/deprecated/useUncontrolled.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useUncontrolled as useUncontrolledImplementation } from 'uncontrollable';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport const useUncontrolled = (...args: any[]) => {\n console.warn(`useUncontrolled ${deprecatedMsg}`);\n return useUncontrolledImplementation(...args);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKvB,4BAAiE;AACjE,2BAA8B;AAEvB,MAAM,kBAAkB,IAAI,SAAgB;AACjD,UAAQ,KAAK,mBAAmB,kCAAa,EAAE;AAC/C,aAAO,sBAAAA,iBAA8B,GAAG,IAAI;AAC9C;",
|
|
6
|
-
"names": ["useUncontrolledImplementation"]
|
|
7
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var useHotkeys_exports = {};
|
|
30
|
-
__export(useHotkeys_exports, {
|
|
31
|
-
default: () => useHotkeys_default,
|
|
32
|
-
useHotkeys: () => useHotkeys
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(useHotkeys_exports);
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_hotkeys_js = __toESM(require("hotkeys-js"));
|
|
37
|
-
var import_react = require("react");
|
|
38
|
-
const useHotkeys = ({ keys, handler, options = {} }, deps = []) => {
|
|
39
|
-
const memoizedCallback = (0, import_react.useCallback)(handler, deps);
|
|
40
|
-
(0, import_react.useEffect)(() => {
|
|
41
|
-
(0, import_hotkeys_js.default)(keys, options, memoizedCallback);
|
|
42
|
-
return () => import_hotkeys_js.default.unbind(keys);
|
|
43
|
-
}, [keys, memoizedCallback, options]);
|
|
44
|
-
};
|
|
45
|
-
var useHotkeys_default = useHotkeys;
|
|
46
|
-
//# sourceMappingURL=useHotkeys.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/useHotkeys.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { KeyHandler } from 'hotkeys-js';\nimport hotkeys 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAAoB;AACpB,mBAAuC;AAehC,MAAM,aAAa,CAAC,EAAE,MAAM,SAAS,UAAU,CAAC,EAAE,GAAkB,OAAkB,CAAC,MAAM;AAElG,QAAM,uBAAmB,0BAAY,SAAS,IAAI;AAElD,8BAAU,MAAM;AACd,0BAAAA,SAAQ,MAAM,SAAS,gBAAgB;AAEvC,WAAO,MAAM,kBAAAA,QAAQ,OAAO,IAAI;AAAA,EAClC,GAAG,CAAC,MAAM,kBAAkB,OAAO,CAAC;AACtC;AAEA,IAAO,qBAAQ;",
|
|
6
|
-
"names": ["hotkeys"]
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useUncontrolled as useUncontrolledImplementation } from "uncontrollable";
|
|
3
|
-
import { deprecatedMsg } from "./deprecatedMsg.js";
|
|
4
|
-
const useUncontrolled = (...args) => {
|
|
5
|
-
console.warn(`useUncontrolled ${deprecatedMsg}`);
|
|
6
|
-
return useUncontrolledImplementation(...args);
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
useUncontrolled
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=useUncontrolled.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/useUncontrolled.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useUncontrolled as useUncontrolledImplementation } from 'uncontrollable';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport const useUncontrolled = (...args: any[]) => {\n console.warn(`useUncontrolled ${deprecatedMsg}`);\n return useUncontrolledImplementation(...args);\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACKvB,SAAS,mBAAmB,qCAAqC;AACjE,SAAS,qBAAqB;AAEvB,MAAM,kBAAkB,IAAI,SAAgB;AACjD,UAAQ,KAAK,mBAAmB,aAAa,EAAE;AAC/C,SAAO,8BAA8B,GAAG,IAAI;AAC9C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import hotkeys from "hotkeys-js";
|
|
3
|
-
import { useCallback, useEffect } from "react";
|
|
4
|
-
const useHotkeys = ({ keys, handler, options = {} }, deps = []) => {
|
|
5
|
-
const memoizedCallback = useCallback(handler, deps);
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
hotkeys(keys, options, memoizedCallback);
|
|
8
|
-
return () => hotkeys.unbind(keys);
|
|
9
|
-
}, [keys, memoizedCallback, options]);
|
|
10
|
-
};
|
|
11
|
-
var useHotkeys_default = useHotkeys;
|
|
12
|
-
export {
|
|
13
|
-
useHotkeys_default as default,
|
|
14
|
-
useHotkeys
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=useHotkeys.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useHotkeys.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { KeyHandler } from 'hotkeys-js';\nimport hotkeys 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,YAAY,WAAW;ACCvB,OAAO,aAAa;AACpB,SAAS,aAAa,iBAAiB;AAehC,MAAM,aAAa,CAAC,EAAE,MAAM,SAAS,UAAU,CAAC,EAAE,GAAkB,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
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useUncontrolled: (...args: any[]) => any;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { KeyHandler } from 'hotkeys-js';
|
|
2
|
-
type Options = {
|
|
3
|
-
scope?: string;
|
|
4
|
-
element?: HTMLElement | null;
|
|
5
|
-
keyup?: boolean | null;
|
|
6
|
-
keydown?: boolean | null;
|
|
7
|
-
splitKey?: string;
|
|
8
|
-
};
|
|
9
|
-
interface UseHotKeysArg {
|
|
10
|
-
keys: string;
|
|
11
|
-
options?: Options;
|
|
12
|
-
handler: KeyHandler;
|
|
13
|
-
}
|
|
14
|
-
export declare const useHotkeys: ({ keys, handler, options }: UseHotKeysArg, deps?: unknown[]) => void;
|
|
15
|
-
export default useHotkeys;
|