pixel-react 1.14.82 → 1.14.84
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/lib/assets/icons/apps_icon.svg.js +6 -0
- package/lib/assets/icons/apps_icon.svg.js.map +1 -0
- package/lib/assets/icons/home_icon.svg.js +6 -0
- package/lib/assets/icons/home_icon.svg.js.map +1 -0
- package/lib/components/Charts/BarChart/BarChart.js +38 -8
- package/lib/components/Charts/BarChart/BarChart.js.map +1 -1
- package/lib/components/CreateVariable/CreateVariableSlider.js +25 -7
- package/lib/components/CreateVariable/CreateVariableSlider.js.map +1 -1
- package/lib/components/CreateVariable/types.d.ts +4 -0
- package/lib/components/Excel/ExcelToolBar/ExcelToolBar.js +8 -8
- package/lib/components/Excel/ExcelToolBar/ExcelToolBar.js.map +1 -1
- package/lib/components/Icon/iconList.js +4 -0
- package/lib/components/Icon/iconList.js.map +1 -1
- package/lib/components/IconButton/IconButton.js +5 -1
- package/lib/components/IconButton/IconButton.js.map +1 -1
- package/lib/components/IconButton/types.d.ts +1 -0
- package/lib/components/MultiSelect/Dropdown.js +2 -1
- package/lib/components/MultiSelect/Dropdown.js.map +1 -1
- package/lib/components/MultiSelect/MultiSelect.js +1 -1
- package/lib/components/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/index.cjs +109 -27
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/utils/debounce/debounce.d.ts +1 -0
- package/lib/utils/debounce/debounce.js +24 -1
- package/lib/utils/debounce/debounce.js.map +1 -1
- package/package.json +1 -1
@@ -1,17 +1,40 @@
|
|
1
1
|
const debounce = (func, delay) => {
|
2
2
|
let timeoutId = null;
|
3
|
+
let lastArgs = null;
|
4
|
+
let lastThis;
|
3
5
|
const debounced = function (...args) {
|
4
6
|
// Clear the previous timeout if it exists
|
5
7
|
if (timeoutId) clearTimeout(timeoutId);
|
8
|
+
lastArgs = args;
|
9
|
+
lastThis = this;
|
6
10
|
// Set a new timeout
|
7
11
|
timeoutId = setTimeout(() => {
|
8
|
-
|
12
|
+
if (lastArgs) {
|
13
|
+
func.apply(lastThis, lastArgs);
|
14
|
+
lastArgs = null;
|
15
|
+
lastThis = null;
|
16
|
+
}
|
17
|
+
timeoutId = null;
|
9
18
|
}, delay);
|
10
19
|
};
|
11
20
|
// Method to cancel the debounced function
|
12
21
|
debounced.cancel = () => {
|
13
22
|
if (timeoutId) clearTimeout(timeoutId);
|
14
23
|
timeoutId = null;
|
24
|
+
lastArgs = null;
|
25
|
+
lastThis = null;
|
26
|
+
};
|
27
|
+
// Method to flush the debounced function without waiting for delay
|
28
|
+
debounced.flush = () => {
|
29
|
+
if (timeoutId) {
|
30
|
+
clearTimeout(timeoutId);
|
31
|
+
if (lastArgs) {
|
32
|
+
func.apply(lastThis, lastArgs);
|
33
|
+
lastArgs = null;
|
34
|
+
lastThis = null;
|
35
|
+
}
|
36
|
+
timeoutId = null;
|
37
|
+
}
|
15
38
|
};
|
16
39
|
return debounced;
|
17
40
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"debounce.js","sources":["../../../src/utils/debounce/debounce.ts"],"sourcesContent":[null],"names":["debounce","func","delay","timeoutId","debounced","args","clearTimeout","setTimeout","apply","cancel"],"mappings":"
|
1
|
+
{"version":3,"file":"debounce.js","sources":["../../../src/utils/debounce/debounce.ts"],"sourcesContent":[null],"names":["debounce","func","delay","timeoutId","lastArgs","lastThis","debounced","args","clearTimeout","setTimeout","apply","cancel","flush"],"mappings":"MAQaA,QAAQ,GAAGA,CAACC,IAAc,EAAEC,KAAa,KAAuB;EAC3E,IAAIC,SAAS,GAAyC,IAAI;EAC1D,IAAIC,QAAQ,GAAiB,IA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