pixel-priya 1.2.42 → 1.2.45
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/index12.js +2 -2
- package/lib/assets/icons/clock_face.svg.js +6 -0
- package/lib/assets/icons/clock_face.svg.js.map +1 -0
- package/lib/assets/icons/re_run_failed_only.svg.js +1 -1
- package/lib/assets/icons/re_run_failed_only.svg.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/Editor/Editor.js +6 -2
- package/lib/components/Editor/Editor.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFile.js +21 -23
- package/lib/components/Excel/ExcelFile/ExcelFile.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js +16 -16
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js.map +1 -1
- package/lib/components/Icon/iconList.js +2 -0
- package/lib/components/Icon/iconList.js.map +1 -1
- package/lib/components/Search/Search.js +2 -1
- package/lib/components/Search/Search.js.map +1 -1
- package/lib/components/Select/Select.js +4 -5
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Select/components/Dropdown.js +5 -3
- package/lib/components/Select/components/Dropdown.js.map +1 -1
- package/lib/components/Select/components/types.d.ts +1 -0
- package/lib/components/Select/components/types.js.map +1 -1
- package/lib/components/Select/types.d.ts +1 -0
- package/lib/components/SequentialConnectingBranch/components/Branches/Branches.js +1 -0
- package/lib/components/SequentialConnectingBranch/components/Branches/Branches.js.map +1 -1
- package/lib/components/TableTreeFn/Components/TableCell.js +3 -3
- package/lib/components/TableTreeFn/Components/TableCell.js.map +1 -1
- package/lib/index.cjs +111 -62
- 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/css/index.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/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.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 +2 -2
|
@@ -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,IAAI;AACjC,EAAA,IAAIC,QAAa;AAEjB,EAAA,MAAMC,SAAS,GAAsB,UAAqB,GAAGC,IAAW,EAAA;AACtE;AACA,IAAA,IAAIJ,SAAS,EAAEK,YAAY,CAACL,SAAS,CAAC;AAEtCC,IAAAA,QAAQ,GAAGG,IAAI;AACfF,IAAAA,QAAQ,GAAG,IAAI;AAEf;IACAF,SAAS,GAAGM,UAAU,CAAC,MAAK;AAC1B,MAAA,IAAIL,QAAQ,EAAE;AACZH,QAAAA,IAAI,CAACS,KAAK,CAACL,QAAQ,EAAED,QAAQ,CAAC;AAC9BA,QAAAA,QAAQ,GAAG,IAAI;AACfC,QAAAA,QAAQ,GAAG,IAAI;AACjB,MAAA;AACAF,MAAAA,SAAS,GAAG,IAAI;IAClB,CAAC,EAAED,KAAK,CAAC;EACX,CAAC;AAED;EACAI,SAAS,CAACK,MAAM,GAAG,MAAK;AACtB,IAAA,IAAIR,SAAS,EAAEK,YAAY,CAACL,SAAS,CAAC;AACtCA,IAAAA,SAAS,GAAG,IAAI;AAChBC,IAAAA,QAAQ,GAAG,IAAI;AACfC,IAAAA,QAAQ,GAAG,IAAI;EACjB,CAAC;AAED;EACAC,SAAS,CAACM,KAAK,GAAG,MAAK;AACrB,IAAA,IAAIT,SAAS,EAAE;MACbK,YAAY,CAACL,SAAS,CAAC;AACvB,MAAA,IAAIC,QAAQ,EAAE;AACZH,QAAAA,IAAI,CAACS,KAAK,CAACL,QAAQ,EAAED,QAAQ,CAAC;AAC9BA,QAAAA,QAAQ,GAAG,IAAI;AACfC,QAAAA,QAAQ,GAAG,IAAI;AACjB,MAAA;AACAF,MAAAA,SAAS,GAAG,IAAI;AAClB,IAAA;EACF,CAAC;AAED,EAAA,OAAOG,SAAS;AAClB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixel-priya",
|
|
3
3
|
"description": "Great for pixel-perfect, design-focused components in React",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.45",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"lib/styles.css"
|
|
10
10
|
],
|
|
11
11
|
"author": {
|
|
12
|
-
"name": "
|
|
12
|
+
"name": "priya"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"devDependencies": {
|