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 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="[&quot;notices&quot;,&quot;contracts&quot;,&quot;licenses&quot;,&quot;rcmresources&quot;]"
845
+ eventfielddependencies="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]"
846
+ eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]"
847
+ eventpreviewfields="[&quot;obligation&quot;]"
848
+ eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]"
849
+ calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
850
+
851
+ <div slot="uploader">
852
+ <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
853
+ allowedextensions="[&quot;jpg&quot;,&quot;jpeg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]"
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="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]"
875
+ eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]"
876
+ eventpreviewfields="[&quot;obligationtitle&quot;]"
877
+ eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]"
878
+ calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
879
+
880
+ <div slot="uploader">
881
+ <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
882
+ allowedextensions="[&quot;jpg&quot;,&quot;jpeg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]"
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="{&quot;India&quot;:{&quot;Maharashtra&quot;:[&quot;Pune&quot;,&quot;Mumbai&quot;],&quot;Telangana&quot;:[&quot;Telangana&quot;]},&quot;Canada&quot;:{&quot;CanadaSO&quot;:[&quot;CanadaLO&quot;]},&quot;Singapore&quot;:{&quot;SingaporeSO&quot;:[&quot;Orchard&quot;,&quot;Raffles&quot;,&quot;Robinson&quot;,&quot;Tanjong&quot;,&quot;Tras&quot;]},&quot;United Kingdom&quot;:{&quot;UnitedSO&quot;:[&quot;UnitedLO&quot;]},&quot;United States of America&quot;:{&quot;AmericaSO&quot;:[&quot;AmericaLO&quot;]}}"
962
1021
  contractstartdate="1/4/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.913",
4
+ "version": "1.0.914",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
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 {
@@ -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