sf-i-events 1.0.913 → 1.0.914
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/dev/index.html +61 -2
- package/package.json +1 -1
- package/sf-i-events.js +5 -5
- package/src/sf-i-events.ts +5 -5
- package/src/util.ts +11 -1
- package/util.d.ts +2 -0
- package/util.js +12 -1
package/dev/index.html
CHANGED
|
@@ -829,6 +829,65 @@
|
|
|
829
829
|
disablesignoff="yes" disableclientresponse="yes">
|
|
830
830
|
|
|
831
831
|
</sf-i-events> -->
|
|
832
|
+
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
833
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
834
|
+
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
835
|
+
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
836
|
+
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
837
|
+
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
838
|
+
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
839
|
+
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws" fill="solid"
|
|
840
|
+
username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410"
|
|
841
|
+
projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global"
|
|
842
|
+
countryid="8ee18117-0cca-49be-80f4-1f712d871fef" selectedcriteria="Country - Singapore" myrole="reporter"
|
|
843
|
+
showregisterexport="false"
|
|
844
|
+
features="["notices","contracts","licenses","rcmresources"]"
|
|
845
|
+
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
846
|
+
eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]"
|
|
847
|
+
eventpreviewfields="["obligation"]"
|
|
848
|
+
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
849
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
850
|
+
|
|
851
|
+
<div slot="uploader">
|
|
852
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
853
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx"]"
|
|
854
|
+
extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="31457280"
|
|
855
|
+
allowdownload="yes"></sf-i-uploader>
|
|
856
|
+
</div>
|
|
857
|
+
<div slot="reporting">
|
|
858
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
859
|
+
</div>
|
|
860
|
+
|
|
861
|
+
</sf-i-events> -->
|
|
862
|
+
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
863
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
864
|
+
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
865
|
+
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
866
|
+
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
867
|
+
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
868
|
+
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
869
|
+
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws" fill="pattern"
|
|
870
|
+
username="Neeti Kharbanda" userprofileid="ef467815-de15-4c11-8149-24a3ffad2904"
|
|
871
|
+
projectid="a81b6ae1-98de-4b72-8cf0-9aaee5b61891" projectname="Khaitan"
|
|
872
|
+
countryid="f0e588c1-bc61-4bc9-8db1-10fabe616cc9" selectedcriteria="Country - India" enabledeletelatestreport="true"
|
|
873
|
+
features="[]"
|
|
874
|
+
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
875
|
+
eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]"
|
|
876
|
+
eventpreviewfields="["obligationtitle"]"
|
|
877
|
+
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
878
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
879
|
+
|
|
880
|
+
<div slot="uploader">
|
|
881
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
882
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx"]"
|
|
883
|
+
extract="yes" projectid="a81b6ae1-98de-4b72-8cf0-9aaee5b61891" maxsize="31457280"
|
|
884
|
+
allowdownload="yes"></sf-i-uploader>
|
|
885
|
+
</div>
|
|
886
|
+
<div slot="reporting">
|
|
887
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
888
|
+
</div>
|
|
889
|
+
|
|
890
|
+
</sf-i-events>
|
|
832
891
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
833
892
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
834
893
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -928,7 +987,7 @@
|
|
|
928
987
|
</div>
|
|
929
988
|
|
|
930
989
|
</sf-i-events> -->
|
|
931
|
-
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
990
|
+
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
932
991
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
933
992
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
934
993
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -956,7 +1015,7 @@
|
|
|
956
1015
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
957
1016
|
</div>
|
|
958
1017
|
|
|
959
|
-
</sf-i-events>
|
|
1018
|
+
</sf-i-events> -->
|
|
960
1019
|
<!-- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding"
|
|
961
1020
|
locations="{"India":{"Maharashtra":["Pune","Mumbai"],"Telangana":["Telangana"]},"Canada":{"CanadaSO":["CanadaLO"]},"Singapore":{"SingaporeSO":["Orchard","Raffles","Robinson","Tanjong","Tras"]},"United Kingdom":{"UnitedSO":["UnitedLO"]},"United States of America":{"AmericaSO":["AmericaLO"]}}"
|
|
962
1021
|
contractstartdate="1/4/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech"
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -3765,7 +3765,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3765
3765
|
}
|
|
3766
3766
|
let streamEventTitles = eventsContainer.querySelectorAll('.stream-event-title');
|
|
3767
3767
|
for (let streamEventTitle of streamEventTitles) {
|
|
3768
|
-
if (streamEventTitle.id == 'stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + (((_c = event.module) !== null && _c !== void 0 ? _c : false) ? event.module : 'compliance')) {
|
|
3768
|
+
if (streamEventTitle.id == 'stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + (((_c = event.module) !== null && _c !== void 0 ? _c : false) ? event.module : 'compliance') + '-') {
|
|
3769
3769
|
streamEventTitle.setAttribute('part', 'stream-event-title-selected');
|
|
3770
3770
|
}
|
|
3771
3771
|
else {
|
|
@@ -4819,7 +4819,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4819
4819
|
listReportingContainer.innerHTML = '';
|
|
4820
4820
|
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-');
|
|
4821
4821
|
buttonListReporting.setAttribute('part', 'button-list-reporting');
|
|
4822
|
-
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module);
|
|
4822
|
+
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module + '-');
|
|
4823
4823
|
streamEventTitle.removeAttribute('part');
|
|
4824
4824
|
}
|
|
4825
4825
|
if (this.selectedItemIds.length === 0) {
|
|
@@ -8614,7 +8614,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8614
8614
|
listReportingContainer.innerHTML = '';
|
|
8615
8615
|
let buttonListReporting = this._SfThisContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-');
|
|
8616
8616
|
buttonListReporting.setAttribute('part', 'button-list-reporting');
|
|
8617
|
-
let streamEventTitle = this._SfThisContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module);
|
|
8617
|
+
let streamEventTitle = this._SfThisContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module + '-');
|
|
8618
8618
|
streamEventTitle.removeAttribute('part');
|
|
8619
8619
|
}
|
|
8620
8620
|
if (this.selectedItemIds.length === 0) {
|
|
@@ -9139,7 +9139,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9139
9139
|
listReportingContainer.innerHTML = '';
|
|
9140
9140
|
let buttonListReporting = this._SfStreamContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-');
|
|
9141
9141
|
buttonListReporting.setAttribute('part', 'button-list-reporting');
|
|
9142
|
-
let streamEventTitle = this._SfStreamContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module);
|
|
9142
|
+
let streamEventTitle = this._SfStreamContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module + '-');
|
|
9143
9143
|
streamEventTitle.removeAttribute('part');
|
|
9144
9144
|
}
|
|
9145
9145
|
if (this.selectedItemIds.length === 0) {
|
|
@@ -13498,7 +13498,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13498
13498
|
if (!this.getEventHideFields().includes(statuteFields[i])) {
|
|
13499
13499
|
html += '<div class="m-20">';
|
|
13500
13500
|
html += '<div part="detail-head"><strong>' + statuteFields[i] + '</strong></div>';
|
|
13501
|
-
if ((event[statuteFields[i]] + "").indexOf("[") >= 0) {
|
|
13501
|
+
if ((event[statuteFields[i]] + "").indexOf("[") >= 0 && Util.isJSONParsable((event[statuteFields[i]] + ""))) {
|
|
13502
13502
|
html += this.getEventTexts(statuteFields[i], JSON.parse(event[statuteFields[i]]), event);
|
|
13503
13503
|
}
|
|
13504
13504
|
else {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -6125,7 +6125,7 @@ export class SfIEvents extends LitElement {
|
|
|
6125
6125
|
}
|
|
6126
6126
|
let streamEventTitles = eventsContainer.querySelectorAll('.stream-event-title') as NodeListOf<SfIElasticText>
|
|
6127
6127
|
for (let streamEventTitle of streamEventTitles) {
|
|
6128
|
-
if (streamEventTitle.id == 'stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + ((event.module ?? false) ? event.module : 'compliance')) {
|
|
6128
|
+
if (streamEventTitle.id == 'stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-') {
|
|
6129
6129
|
streamEventTitle.setAttribute('part', 'stream-event-title-selected')
|
|
6130
6130
|
} else {
|
|
6131
6131
|
streamEventTitle.removeAttribute('part')
|
|
@@ -7267,7 +7267,7 @@ export class SfIEvents extends LitElement {
|
|
|
7267
7267
|
listReportingContainer.innerHTML = '';
|
|
7268
7268
|
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') as HTMLButtonElement
|
|
7269
7269
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
7270
|
-
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
7270
|
+
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module + '-') as SfIElasticText
|
|
7271
7271
|
streamEventTitle.removeAttribute('part')
|
|
7272
7272
|
}
|
|
7273
7273
|
|
|
@@ -11790,7 +11790,7 @@ export class SfIEvents extends LitElement {
|
|
|
11790
11790
|
listReportingContainer.innerHTML = '';
|
|
11791
11791
|
let buttonListReporting = (this._SfThisContainer as HTMLDivElement).querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') as HTMLButtonElement
|
|
11792
11792
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
11793
|
-
let streamEventTitle = (this._SfThisContainer as HTMLDivElement).querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
11793
|
+
let streamEventTitle = (this._SfThisContainer as HTMLDivElement).querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module + '-') as SfIElasticText
|
|
11794
11794
|
streamEventTitle.removeAttribute('part')
|
|
11795
11795
|
|
|
11796
11796
|
}
|
|
@@ -12415,7 +12415,7 @@ export class SfIEvents extends LitElement {
|
|
|
12415
12415
|
listReportingContainer.innerHTML = '';
|
|
12416
12416
|
let buttonListReporting = (this._SfStreamContainer as HTMLDivElement).querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') as HTMLButtonElement
|
|
12417
12417
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
12418
|
-
let streamEventTitle = (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
12418
|
+
let streamEventTitle = (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module + '-') as SfIElasticText
|
|
12419
12419
|
streamEventTitle.removeAttribute('part')
|
|
12420
12420
|
}
|
|
12421
12421
|
|
|
@@ -17487,7 +17487,7 @@ export class SfIEvents extends LitElement {
|
|
|
17487
17487
|
|
|
17488
17488
|
html += '<div class="m-20">';
|
|
17489
17489
|
html += '<div part="detail-head"><strong>' + statuteFields[i] + '</strong></div>'
|
|
17490
|
-
if ((event[statuteFields[i]] + "").indexOf("[") >= 0) {
|
|
17490
|
+
if ((event[statuteFields[i]] + "").indexOf("[") >= 0 && Util.isJSONParsable((event[statuteFields[i]] + ""))) {
|
|
17491
17491
|
html += this.getEventTexts(statuteFields[i], JSON.parse(event[statuteFields[i]]), event);
|
|
17492
17492
|
} else {
|
|
17493
17493
|
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (event[statuteFields[i]] + "").replace(/"/g, "") + '" minLength="80"></sf-i-elastic-text>';
|
package/src/util.ts
CHANGED
|
@@ -564,8 +564,18 @@ export const downloadExcelFromCSV = (csvString: string, fileName: string = 'repo
|
|
|
564
564
|
document.body.removeChild(link);
|
|
565
565
|
};
|
|
566
566
|
|
|
567
|
+
function isJSONParsable(str: unknown): boolean {
|
|
568
|
+
if (typeof str !== "string") return false;
|
|
569
|
+
try {
|
|
570
|
+
JSON.parse(str);
|
|
571
|
+
return true;
|
|
572
|
+
} catch {
|
|
573
|
+
return false;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
567
577
|
const exportFunctions = {
|
|
568
|
-
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
|
|
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
|
|
569
579
|
};
|
|
570
580
|
|
|
571
581
|
export default exportFunctions;
|
package/util.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare function getProjectUsermap(): any;
|
|
|
22
22
|
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
|
+
declare function isJSONParsable(str: unknown): boolean;
|
|
25
26
|
declare const exportFunctions: {
|
|
26
27
|
callApiPresignedDelete: typeof callApiPresignedDelete;
|
|
27
28
|
callApiPresignedGet: typeof callApiPresignedGet;
|
|
@@ -49,6 +50,7 @@ declare const exportFunctions: {
|
|
|
49
50
|
getFeatures: typeof getFeatures;
|
|
50
51
|
getProjectUsermap: typeof getProjectUsermap;
|
|
51
52
|
downloadExcelFromCSV: (csvString: string, fileName: string | undefined, title: string, projectname: string) => void;
|
|
53
|
+
isJSONParsable: typeof isJSONParsable;
|
|
52
54
|
};
|
|
53
55
|
export default exportFunctions;
|
|
54
56
|
//# sourceMappingURL=util.d.ts.map
|
package/util.js
CHANGED
|
@@ -475,8 +475,19 @@ export const downloadExcelFromCSV = (csvString, fileName = 'report.xlsx', title,
|
|
|
475
475
|
link.click();
|
|
476
476
|
document.body.removeChild(link);
|
|
477
477
|
};
|
|
478
|
+
function isJSONParsable(str) {
|
|
479
|
+
if (typeof str !== "string")
|
|
480
|
+
return false;
|
|
481
|
+
try {
|
|
482
|
+
JSON.parse(str);
|
|
483
|
+
return true;
|
|
484
|
+
}
|
|
485
|
+
catch {
|
|
486
|
+
return false;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
478
489
|
const exportFunctions = {
|
|
479
|
-
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
|
|
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
|
|
480
491
|
};
|
|
481
492
|
export default exportFunctions;
|
|
482
493
|
//# sourceMappingURL=util.js.map
|