sf-i-events 1.0.937 → 1.0.938
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/package.json +1 -1
- package/sf-i-events.d.ts +5 -2
- package/sf-i-events.js +423 -33
- package/src/sf-i-events.ts +388 -35
- package/src/util.ts +16 -1
- package/util.d.ts +2 -0
- package/util.js +10 -1
package/src/util.ts
CHANGED
|
@@ -574,8 +574,23 @@ function isJSONParsable(str: unknown): boolean {
|
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
|
|
577
|
+
function isVisible(el: HTMLElement): boolean {
|
|
578
|
+
const style = window.getComputedStyle(el);
|
|
579
|
+
const rect = el.getBoundingClientRect();
|
|
580
|
+
console.log('previous style', style.display, rect, el.id);
|
|
581
|
+
|
|
582
|
+
return (
|
|
583
|
+
rect.height > 0 &&
|
|
584
|
+
rect.width >= 0
|
|
585
|
+
) && (
|
|
586
|
+
style.display !== "none" &&
|
|
587
|
+
style.visibility !== "hidden" &&
|
|
588
|
+
style.opacity !== "0"
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
|
|
577
592
|
const exportFunctions = {
|
|
578
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, setFeatures, getFeatures, getProjectUsermap, downloadExcelFromCSV, isJSONParsable
|
|
593
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, setFeatures, getFeatures, getProjectUsermap, downloadExcelFromCSV, isJSONParsable, isVisible
|
|
579
594
|
};
|
|
580
595
|
|
|
581
596
|
export default exportFunctions;
|
package/util.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ declare function setFeatures(features: any): void;
|
|
|
23
23
|
declare function getFeatures(): any;
|
|
24
24
|
export declare const downloadExcelFromCSV: (csvString: string, fileName: string | undefined, title: string, projectname: string) => void;
|
|
25
25
|
declare function isJSONParsable(str: unknown): boolean;
|
|
26
|
+
declare function isVisible(el: HTMLElement): boolean;
|
|
26
27
|
declare const exportFunctions: {
|
|
27
28
|
callApiPresignedDelete: typeof callApiPresignedDelete;
|
|
28
29
|
callApiPresignedGet: typeof callApiPresignedGet;
|
|
@@ -51,6 +52,7 @@ declare const exportFunctions: {
|
|
|
51
52
|
getProjectUsermap: typeof getProjectUsermap;
|
|
52
53
|
downloadExcelFromCSV: (csvString: string, fileName: string | undefined, title: string, projectname: string) => void;
|
|
53
54
|
isJSONParsable: typeof isJSONParsable;
|
|
55
|
+
isVisible: typeof isVisible;
|
|
54
56
|
};
|
|
55
57
|
export default exportFunctions;
|
|
56
58
|
//# sourceMappingURL=util.d.ts.map
|
package/util.js
CHANGED
|
@@ -486,8 +486,17 @@ function isJSONParsable(str) {
|
|
|
486
486
|
return false;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
+
function isVisible(el) {
|
|
490
|
+
const style = window.getComputedStyle(el);
|
|
491
|
+
const rect = el.getBoundingClientRect();
|
|
492
|
+
console.log('previous style', style.display, rect, el.id);
|
|
493
|
+
return (rect.height > 0 &&
|
|
494
|
+
rect.width >= 0) && (style.display !== "none" &&
|
|
495
|
+
style.visibility !== "hidden" &&
|
|
496
|
+
style.opacity !== "0");
|
|
497
|
+
}
|
|
489
498
|
const exportFunctions = {
|
|
490
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, setFeatures, getFeatures, getProjectUsermap, downloadExcelFromCSV, isJSONParsable
|
|
499
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, setFeatures, getFeatures, getProjectUsermap, downloadExcelFromCSV, isJSONParsable, isVisible
|
|
491
500
|
};
|
|
492
501
|
export default exportFunctions;
|
|
493
502
|
//# sourceMappingURL=util.js.map
|