sf-i-events 1.0.829 → 1.0.830

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
@@ -759,9 +759,19 @@
759
759
  </div>
760
760
 
761
761
  </sf-i-events> -->
762
- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding" 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;]}}" contractstartdate="1/4/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile" disablesignoff="yes" disableclientresponse="yes">
762
+ <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="pattern" username="Dipti" userprofileid="d888568d-0599-46f9-9d73-55ea76345db1" projectid="c7d18a84-c2df-4dc2-b75f-5820549f5e5c" projectname="Chitale" countryid="4252b692-e47c-4244-9500-0bea51150031" enabledeletelatestreport="true" features="[]" 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;}]" 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;}]" eventpreviewfields="[&quot;obligationtitle&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
763
763
 
764
+ <div slot="uploader">
765
+ <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" extract="yes" projectid="c7d18a84-c2df-4dc2-b75f-5820549f5e5c" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
766
+ </div>
767
+ <div slot="reporting">
768
+ <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
769
+ </div>
770
+
764
771
  </sf-i-events>
772
+ <!-- <sf-i-events projectid="5a05b884-d7ed-4f63-b623-4d305ea2cfd6" projectname="Standard Radiators Private Limited" mode="onboarding" locations="{&quot;India&quot;:{&quot;Punjab&quot;:[&quot;Punjab Warehouse&quot;],&quot;Gujarat&quot;:[&quot;RO &amp; Unit I&quot;,&quot;Unit II&quot;]}}" contractstartdate="01/03/2025" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile" disablesignoff="yes" disableclientresponse="yes">
773
+
774
+ </sf-i-events> -->
765
775
 
766
776
  </sf-i-events>
767
777
  <script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.829",
4
+ "version": "1.0.830",
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
@@ -9725,7 +9725,7 @@ let SfIEvents = class SfIEvents extends LitElement {
9725
9725
  //console.log('event detail comments', comments);
9726
9726
  //console.log('event dateofcompletion', dateOfCompletion);
9727
9727
  //console.log('event detail documenttype', documentType);
9728
- const basicFields = ['id', 'shortid', 'entityname', 'locationname', 'functions'];
9728
+ const basicFields = ['id', 'shortid', 'entityname', 'locationname', 'functions', 'attachment'];
9729
9729
  const statuteFields = ['jurisdiction', 'country', 'state', 'category', 'subcategory', 'statute'];
9730
9730
  const complianceFields = ['specificity', 'reference', 'obligation', 'penalty', 'authority', 'frequency', 'subfrequency', 'obligationtype', 'duedate', 'applicability', 'form', 'additionalurls', 'adhocquestion', 'adhocquestionschedule', 'adhocinstances', 'uploadguidance'];
9731
9731
  const grcFields = ['internalcontrols', 'firstlineofdefence', 'secondlineofdefence', 'thirdlineofdefence', 'risk', 'riskarea'];
@@ -9779,7 +9779,11 @@ let SfIEvents = class SfIEvents extends LitElement {
9779
9779
  html += '<div class="m-20">';
9780
9780
  html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9781
9781
  console.log('basicFields', event[basicFields[i]] + "");
9782
- if ((event[basicFields[i]] + "").indexOf("[") >= 0) {
9782
+ if (basicFields[i] == 'attachment') {
9783
+ let attachment = JSON.parse(event[basicFields[i]] + "");
9784
+ html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader>`;
9785
+ }
9786
+ else if ((event[basicFields[i]] + "").indexOf("[") >= 0) {
9783
9787
  html += this.getEventTexts(basicFields[i], JSON.parse(event[basicFields[i]]), event).replace(/ *\([^)]*\) */g, "").trim();
9784
9788
  }
9785
9789
  else {
@@ -10013,6 +10017,10 @@ let SfIEvents = class SfIEvents extends LitElement {
10013
10017
  }
10014
10018
  this._SfDetailContainer.innerHTML = html;
10015
10019
  this._SfDetailContainer.style.display = 'block';
10020
+ let attachmentUploaders = this._SfDetailContainer.querySelectorAll('.event-attachment');
10021
+ for (let attachmentUploader of attachmentUploaders) {
10022
+ attachmentUploader.loadMode();
10023
+ }
10016
10024
  (_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
10017
10025
  await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
10018
10026
  this.setSuccess('Deleted successfully!');
@@ -13027,6 +13035,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13027
13035
  var mapped = false;
13028
13036
  var extraFields = null;
13029
13037
  var previousExtraFields = null;
13038
+ console.log('mappedcompliances', mappedCompliances);
13030
13039
  for (var j = 0; j < mappedCompliances.data.mappings.mappings.length; j++) {
13031
13040
  if (mappedCompliances.data.mappings.mappings[j].id == resultCompliances.values[i].id) {
13032
13041
  if (mappedCompliances.data.mappings.mappings[j].selected) {
@@ -13342,7 +13342,7 @@ export class SfIEvents extends LitElement {
13342
13342
  //console.log('event detail comments', comments);
13343
13343
  //console.log('event dateofcompletion', dateOfCompletion);
13344
13344
  //console.log('event detail documenttype', documentType);
13345
- const basicFields = ['id', 'shortid', 'entityname', 'locationname','functions'];
13345
+ const basicFields = ['id', 'shortid', 'entityname', 'locationname','functions', 'attachment'];
13346
13346
  const statuteFields = ['jurisdiction', 'country', 'state', 'category', 'subcategory', 'statute'];
13347
13347
  const complianceFields = ['specificity', 'reference', 'obligation', 'penalty', 'authority', 'frequency', 'subfrequency', 'obligationtype', 'duedate', 'applicability', 'form', 'additionalurls', 'adhocquestion', 'adhocquestionschedule', 'adhocinstances', 'uploadguidance'];
13348
13348
  const grcFields = ['internalcontrols', 'firstlineofdefence', 'secondlineofdefence', 'thirdlineofdefence', 'risk', 'riskarea'];
@@ -13408,7 +13408,10 @@ export class SfIEvents extends LitElement {
13408
13408
  html += '<div class="m-20">';
13409
13409
  html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13410
13410
  console.log('basicFields', event[basicFields[i]] + "");
13411
- if((event[basicFields[i]] + "").indexOf("[") >= 0) {
13411
+ if(basicFields[i] == 'attachment') {
13412
+ let attachment = JSON.parse(event[basicFields[i]] + "");
13413
+ html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{"key":attachment.key,"ext":attachment.ext}]).replace(/"/g,'&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader>`
13414
+ } else if((event[basicFields[i]] + "").indexOf("[") >= 0) {
13412
13415
  html += this.getEventTexts(basicFields[i], JSON.parse(event[basicFields[i]]), event).replace(/ *\([^)]*\) */g, "").trim();
13413
13416
  } else {
13414
13417
  html += '<sf-i-elastic-text text="'+(event[basicFields[i]] + "").replace(/"/g, "").replace(/ *\([^)]*\) */g, "").trim().split(';')[0]+'" minLength="80"></sf-i-elastic-text>';
@@ -13701,6 +13704,10 @@ export class SfIEvents extends LitElement {
13701
13704
 
13702
13705
  (this._SfDetailContainer as HTMLDivElement).innerHTML = html;
13703
13706
  (this._SfDetailContainer as HTMLDivElement).style.display = 'block';
13707
+ let attachmentUploaders = (this._SfDetailContainer as HTMLDivElement).querySelectorAll('.event-attachment') as NodeListOf<SfIUploader>
13708
+ for(let attachmentUploader of attachmentUploaders){
13709
+ attachmentUploader.loadMode();
13710
+ }
13704
13711
  (this._SfDetailContainer as HTMLDivElement).querySelector('.button-delete')?.addEventListener('click', async () => {
13705
13712
 
13706
13713
  await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
@@ -17627,6 +17634,7 @@ export class SfIEvents extends LitElement {
17627
17634
  var mapped = false;
17628
17635
  var extraFields = null;
17629
17636
  var previousExtraFields = null;
17637
+ console.log('mappedcompliances',mappedCompliances)
17630
17638
  for(var j = 0; j < mappedCompliances.data.mappings.mappings.length; j++) {
17631
17639
  if(mappedCompliances.data.mappings.mappings[j].id == resultCompliances.values[i].id) {
17632
17640
  if(mappedCompliances.data.mappings.mappings[j].selected) {