@micromag/core 0.4.79 → 0.4.83
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/es/hooks.js +5 -10
- package/es/utils.js +1 -1
- package/package.json +18 -18
package/es/hooks.js
CHANGED
|
@@ -224,9 +224,10 @@ const useFormattedTime = (options = null) => {
|
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
const useDebounced = (handler, watchedValue, t0) => {
|
|
227
|
-
const $ = c(
|
|
227
|
+
const $ = c(5);
|
|
228
228
|
const delay = t0 === undefined ? 300 : t0;
|
|
229
229
|
let t1;
|
|
230
|
+
let t2;
|
|
230
231
|
if ($[0] !== delay || $[1] !== handler || $[2] !== watchedValue) {
|
|
231
232
|
t1 = () => {
|
|
232
233
|
const timeoutHandler = setTimeout(() => {
|
|
@@ -238,21 +239,15 @@ const useDebounced = (handler, watchedValue, t0) => {
|
|
|
238
239
|
clearTimeout(timeoutHandler);
|
|
239
240
|
};
|
|
240
241
|
};
|
|
242
|
+
t2 = [watchedValue, delay, handler];
|
|
241
243
|
$[0] = delay;
|
|
242
244
|
$[1] = handler;
|
|
243
245
|
$[2] = watchedValue;
|
|
244
246
|
$[3] = t1;
|
|
247
|
+
$[4] = t2;
|
|
245
248
|
} else {
|
|
246
249
|
t1 = $[3];
|
|
247
|
-
|
|
248
|
-
let t2;
|
|
249
|
-
if ($[4] !== delay || $[5] !== watchedValue) {
|
|
250
|
-
t2 = [watchedValue, delay];
|
|
251
|
-
$[4] = delay;
|
|
252
|
-
$[5] = watchedValue;
|
|
253
|
-
$[6] = t2;
|
|
254
|
-
} else {
|
|
255
|
-
t2 = $[6];
|
|
250
|
+
t2 = $[4];
|
|
256
251
|
}
|
|
257
252
|
useEffect(t1, t2);
|
|
258
253
|
};
|
package/es/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.83",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -94,22 +94,22 @@
|
|
|
94
94
|
"react-dom": "^19.0.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@panneau/displays": "^4.0.40
|
|
98
|
-
"@panneau/element-button": "^4.0.40
|
|
99
|
-
"@panneau/element-buttons": "^4.0.40
|
|
100
|
-
"@panneau/element-dropdown": "^4.0.40
|
|
101
|
-
"@panneau/element-form-group": "^4.0.40
|
|
102
|
-
"@panneau/element-grid": "^4.0.40
|
|
103
|
-
"@panneau/element-icon": "^4.0.40
|
|
104
|
-
"@panneau/element-link": "^4.0.40
|
|
105
|
-
"@panneau/element-media-card": "^4.0.40
|
|
106
|
-
"@panneau/element-media-player": "^4.0.40
|
|
107
|
-
"@panneau/element-modal": "^4.0.40
|
|
108
|
-
"@panneau/fields": "^4.0.40
|
|
109
|
-
"@panneau/filters": "^4.0.40
|
|
110
|
-
"@panneau/intl": "^4.0.40
|
|
111
|
-
"@panneau/medias": "^4.0.
|
|
112
|
-
"@panneau/uppy": "^4.0.40
|
|
97
|
+
"@panneau/displays": "^4.0.40",
|
|
98
|
+
"@panneau/element-button": "^4.0.40",
|
|
99
|
+
"@panneau/element-buttons": "^4.0.40",
|
|
100
|
+
"@panneau/element-dropdown": "^4.0.40",
|
|
101
|
+
"@panneau/element-form-group": "^4.0.40",
|
|
102
|
+
"@panneau/element-grid": "^4.0.40",
|
|
103
|
+
"@panneau/element-icon": "^4.0.40",
|
|
104
|
+
"@panneau/element-link": "^4.0.40",
|
|
105
|
+
"@panneau/element-media-card": "^4.0.40",
|
|
106
|
+
"@panneau/element-media-player": "^4.0.40",
|
|
107
|
+
"@panneau/element-modal": "^4.0.40",
|
|
108
|
+
"@panneau/fields": "^4.0.40",
|
|
109
|
+
"@panneau/filters": "^4.0.40",
|
|
110
|
+
"@panneau/intl": "^4.0.40",
|
|
111
|
+
"@panneau/medias": "^4.0.42",
|
|
112
|
+
"@panneau/uppy": "^4.0.40",
|
|
113
113
|
"@uppy/core": "^5.1.1",
|
|
114
114
|
"@uppy/dashboard": "^5.0.4",
|
|
115
115
|
"@uppy/react": "^5.1.1",
|
|
@@ -157,6 +157,6 @@
|
|
|
157
157
|
"access": "public",
|
|
158
158
|
"registry": "https://registry.npmjs.org/"
|
|
159
159
|
},
|
|
160
|
-
"gitHead": "
|
|
160
|
+
"gitHead": "323b1d85d8fe4665b160783048a92d78f663050f",
|
|
161
161
|
"types": "es/index.d.ts"
|
|
162
162
|
}
|