@jobber/components 6.74.0 → 6.75.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/Autocomplete/index.cjs +1 -2
- package/dist/Autocomplete/index.mjs +1 -2
- package/dist/Autocomplete-cjs.js +2 -2
- package/dist/Autocomplete-es.js +1 -1
- package/dist/Combobox/index.cjs +2 -4
- package/dist/Combobox/index.mjs +2 -4
- package/dist/Combobox-cjs.js +2 -2
- package/dist/Combobox-es.js +2 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +1 -3
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +1 -3
- package/dist/DataList/components/DataListFilters/index.cjs +2 -3
- package/dist/DataList/components/DataListFilters/index.mjs +2 -3
- package/dist/DataList/components/DataListSearch/index.cjs +4 -4
- package/dist/DataList/components/DataListSearch/index.mjs +4 -4
- package/dist/DataList/index.cjs +2 -2
- package/dist/DataList/index.mjs +2 -2
- package/dist/DataListSearch-cjs.js +2 -2
- package/dist/DataListSearch-es.js +3 -3
- package/dist/Gallery/index.cjs +3 -5
- package/dist/Gallery/index.mjs +3 -5
- package/dist/InputNumber/index.cjs +2 -2
- package/dist/InputNumber/index.mjs +2 -2
- package/dist/InputTime/index.mjs +1 -1
- package/dist/LightBox/index.cjs +3 -5
- package/dist/LightBox/index.mjs +3 -5
- package/dist/LightBox-cjs.js +4 -4
- package/dist/LightBox-es.js +1 -1
- package/dist/debounce-es.js +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.mjs +4 -3
- package/dist/throttle-es.js +1 -1
- package/dist/useDebounce-cjs.js +4397 -18
- package/dist/useDebounce-es.js +4398 -19
- package/dist/useResizeObserver-cjs.js +11 -1
- package/dist/useResizeObserver-es.js +11 -1
- package/dist/useScrollToActive-es.js +1 -1
- package/package.json +2 -2
- package/dist/utils/useDebounce.d.ts +0 -11
|
@@ -1075,7 +1075,17 @@ var polyfilled = useResizeObserver$1;
|
|
|
1075
1075
|
width: undefined,
|
|
1076
1076
|
height: undefined,
|
|
1077
1077
|
});
|
|
1078
|
-
const onResize = (0, react_1.useMemo)(() =>
|
|
1078
|
+
const onResize = (0, react_1.useMemo)(() => {
|
|
1079
|
+
return (0, throttle_1.default)(({ width, height }) => {
|
|
1080
|
+
if (!width || width <= 1) {
|
|
1081
|
+
// Ignore invalid values. ResizeObserver is unexpectedly looping between 1 and the actual
|
|
1082
|
+
// width of the element. This is only happening in playwright chromium.
|
|
1083
|
+
// Soon we need to replace this unmaintained package with a more reliable one.
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
setSize({ width, height });
|
|
1087
|
+
}, wait);
|
|
1088
|
+
}, []);
|
|
1079
1089
|
const { ref } = (0, polyfilled_1.default)({
|
|
1080
1090
|
onResize,
|
|
1081
1091
|
});
|
|
@@ -1073,7 +1073,17 @@ var polyfilled = useResizeObserver$1;
|
|
|
1073
1073
|
width: undefined,
|
|
1074
1074
|
height: undefined,
|
|
1075
1075
|
});
|
|
1076
|
-
const onResize = (0, react_1.useMemo)(() =>
|
|
1076
|
+
const onResize = (0, react_1.useMemo)(() => {
|
|
1077
|
+
return (0, throttle_1$1.default)(({ width, height }) => {
|
|
1078
|
+
if (!width || width <= 1) {
|
|
1079
|
+
// Ignore invalid values. ResizeObserver is unexpectedly looping between 1 and the actual
|
|
1080
|
+
// width of the element. This is only happening in playwright chromium.
|
|
1081
|
+
// Soon we need to replace this unmaintained package with a more reliable one.
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
setSize({ width, height });
|
|
1085
|
+
}, wait);
|
|
1086
|
+
}, []);
|
|
1077
1087
|
const { ref } = (0, polyfilled_1.default)({
|
|
1078
1088
|
onResize,
|
|
1079
1089
|
});
|
|
@@ -7,7 +7,7 @@ import { b as isArrayLike_1, k as _baseUnary, a as isArray_1 } from './isTypedAr
|
|
|
7
7
|
import { i as isSymbol_1 } from './isSymbol-es.js';
|
|
8
8
|
import { i as identity_1 } from './identity-es.js';
|
|
9
9
|
import { _ as _baseRest, a as _isIterateeCall } from './_isIterateeCall-es.js';
|
|
10
|
-
import {
|
|
10
|
+
import { a as debounce } from './debounce-es.js';
|
|
11
11
|
import { I as Icon } from './Icon-es.js';
|
|
12
12
|
import { usePopper } from 'react-popper';
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.75.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -542,5 +542,5 @@
|
|
|
542
542
|
"> 1%",
|
|
543
543
|
"IE 10"
|
|
544
544
|
],
|
|
545
|
-
"gitHead": "
|
|
545
|
+
"gitHead": "bde310bbb97ae2d73e8590aa56df407087bb62bd"
|
|
546
546
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import debounce from "lodash/debounce";
|
|
2
|
-
type AnyFunction = (...args: any[]) => any;
|
|
3
|
-
/**
|
|
4
|
-
* A hook to easily manage debounced functions, including their cleanup.
|
|
5
|
-
* @param func The function to debounce.
|
|
6
|
-
* @param wait The number of milliseconds to delay.
|
|
7
|
-
* @param options Optional debounce settings.
|
|
8
|
-
* @returns The debounced function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useDebounce<T extends AnyFunction>(func: T, wait: number, options?: Parameters<typeof debounce>[2]): import("lodash").DebouncedFunc<(...args: Parameters<T>) => any>;
|
|
11
|
-
export {};
|