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.
@@ -1,4 +1,4 @@
1
- var html = {exports: {}};
1
+ var css = {exports: {}};
2
2
 
3
- export { html as __module };
3
+ export { css as __module };
4
4
  //# sourceMappingURL=index10.js.map
@@ -1,4 +1,4 @@
1
- var css = {exports: {}};
1
+ var javascript = {exports: {}};
2
2
 
3
- export { css as __module };
3
+ export { javascript as __module };
4
4
  //# sourceMappingURL=index11.js.map
@@ -1,4 +1,4 @@
1
- var javascript = {exports: {}};
1
+ var html = {exports: {}};
2
2
 
3
- export { javascript as __module };
3
+ export { html as __module };
4
4
  //# sourceMappingURL=index12.js.map
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