abdul-react 0.0.41 → 0.0.42
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/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/_virtual/index12.js +2 -2
- package/lib/index.cjs +13 -0
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/utils/debounce/debounce.d.ts +1 -0
- package/lib/utils/debounce/debounce.js +13 -0
- package/lib/utils/debounce/debounce.js.map +1 -1
- package/package.json +1 -1
package/lib/_virtual/index10.js
CHANGED
package/lib/_virtual/index11.js
CHANGED
package/lib/_virtual/index12.js
CHANGED
package/lib/index.cjs
CHANGED
|
@@ -45082,7 +45082,11 @@ const ExcelContextMenu = ({
|
|
|
45082
45082
|
|
|
45083
45083
|
const debounce = (func, delay) => {
|
|
45084
45084
|
let timeoutId = null;
|
|
45085
|
+
let lastArgs = null;
|
|
45086
|
+
let lastThis;
|
|
45085
45087
|
const debounced = function (...args) {
|
|
45088
|
+
lastArgs = args;
|
|
45089
|
+
lastThis = this;
|
|
45086
45090
|
// Clear the previous timeout if it exists
|
|
45087
45091
|
if (timeoutId) clearTimeout(timeoutId);
|
|
45088
45092
|
// Set a new timeout
|
|
@@ -45095,6 +45099,15 @@ const debounce = (func, delay) => {
|
|
|
45095
45099
|
if (timeoutId) clearTimeout(timeoutId);
|
|
45096
45100
|
timeoutId = null;
|
|
45097
45101
|
};
|
|
45102
|
+
debounced.flush = () => {
|
|
45103
|
+
if (timeoutId) {
|
|
45104
|
+
clearTimeout(timeoutId);
|
|
45105
|
+
func.apply(lastThis, lastArgs ?? []);
|
|
45106
|
+
lastArgs = null;
|
|
45107
|
+
lastThis = null;
|
|
45108
|
+
timeoutId = null;
|
|
45109
|
+
}
|
|
45110
|
+
};
|
|
45098
45111
|
return debounced;
|
|
45099
45112
|
};
|
|
45100
45113
|
|