sf-i-events 1.0.829 → 1.0.831

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.831",
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'];
@@ -9776,16 +9776,28 @@ let SfIEvents = class SfIEvents extends LitElement {
9776
9776
  for (var i = 0; i < basicFields.length; i++) {
9777
9777
  if (!this.getEventPreviewFields().includes(basicFields[i])) {
9778
9778
  if (!this.getEventHideFields().includes(basicFields[i])) {
9779
- html += '<div class="m-20">';
9780
- html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9781
9779
  console.log('basicFields', event[basicFields[i]] + "");
9782
- if ((event[basicFields[i]] + "").indexOf("[") >= 0) {
9780
+ if (basicFields[i] == 'attachment') {
9781
+ if (event[basicFields[i]].length > 0) {
9782
+ let attachment = JSON.parse(event[basicFields[i]] + "");
9783
+ html += '<div class="m-20">';
9784
+ html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9785
+ 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>`;
9786
+ html += '</div>';
9787
+ }
9788
+ }
9789
+ else if ((event[basicFields[i]] + "").indexOf("[") >= 0) {
9790
+ html += '<div class="m-20">';
9791
+ html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9783
9792
  html += this.getEventTexts(basicFields[i], JSON.parse(event[basicFields[i]]), event).replace(/ *\([^)]*\) */g, "").trim();
9793
+ html += '</div>';
9784
9794
  }
9785
9795
  else {
9796
+ html += '<div class="m-20">';
9797
+ html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9786
9798
  html += '<sf-i-elastic-text text="' + (event[basicFields[i]] + "").replace(/"/g, "").replace(/ *\([^)]*\) */g, "").trim().split(';')[0] + '" minLength="80"></sf-i-elastic-text>';
9799
+ html += '</div>';
9787
9800
  }
9788
- html += '</div>';
9789
9801
  }
9790
9802
  }
9791
9803
  }
@@ -10013,6 +10025,10 @@ let SfIEvents = class SfIEvents extends LitElement {
10013
10025
  }
10014
10026
  this._SfDetailContainer.innerHTML = html;
10015
10027
  this._SfDetailContainer.style.display = 'block';
10028
+ let attachmentUploaders = this._SfDetailContainer.querySelectorAll('.event-attachment');
10029
+ for (let attachmentUploader of attachmentUploaders) {
10030
+ attachmentUploader.loadMode();
10031
+ }
10016
10032
  (_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
10017
10033
  await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
10018
10034
  this.setSuccess('Deleted successfully!');
@@ -13027,6 +13043,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13027
13043
  var mapped = false;
13028
13044
  var extraFields = null;
13029
13045
  var previousExtraFields = null;
13046
+ console.log('mappedcompliances', mappedCompliances);
13030
13047
  for (var j = 0; j < mappedCompliances.data.mappings.mappings.length; j++) {
13031
13048
  if (mappedCompliances.data.mappings.mappings[j].id == resultCompliances.values[i].id) {
13032
13049
  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'];
@@ -13405,15 +13405,26 @@ export class SfIEvents extends LitElement {
13405
13405
 
13406
13406
  if(!this.getEventHideFields().includes(basicFields[i])) {
13407
13407
 
13408
- html += '<div class="m-20">';
13409
- html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13410
13408
  console.log('basicFields', event[basicFields[i]] + "");
13411
- if((event[basicFields[i]] + "").indexOf("[") >= 0) {
13409
+ if(basicFields[i] == 'attachment'){
13410
+ if(event[basicFields[i]].length > 0) {
13411
+ let attachment = JSON.parse(event[basicFields[i]] + "");
13412
+ html += '<div class="m-20">';
13413
+ html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13414
+ 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>`
13415
+ html += '</div>';
13416
+ }
13417
+ } else if((event[basicFields[i]] + "").indexOf("[") >= 0) {
13418
+ html += '<div class="m-20">';
13419
+ html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13412
13420
  html += this.getEventTexts(basicFields[i], JSON.parse(event[basicFields[i]]), event).replace(/ *\([^)]*\) */g, "").trim();
13421
+ html += '</div>';
13413
13422
  } else {
13423
+ html += '<div class="m-20">';
13424
+ html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13414
13425
  html += '<sf-i-elastic-text text="'+(event[basicFields[i]] + "").replace(/"/g, "").replace(/ *\([^)]*\) */g, "").trim().split(';')[0]+'" minLength="80"></sf-i-elastic-text>';
13426
+ html += '</div>';
13415
13427
  }
13416
- html += '</div>';
13417
13428
 
13418
13429
  }
13419
13430
  }
@@ -13701,6 +13712,10 @@ export class SfIEvents extends LitElement {
13701
13712
 
13702
13713
  (this._SfDetailContainer as HTMLDivElement).innerHTML = html;
13703
13714
  (this._SfDetailContainer as HTMLDivElement).style.display = 'block';
13715
+ let attachmentUploaders = (this._SfDetailContainer as HTMLDivElement).querySelectorAll('.event-attachment') as NodeListOf<SfIUploader>
13716
+ for(let attachmentUploader of attachmentUploaders){
13717
+ attachmentUploader.loadMode();
13718
+ }
13704
13719
  (this._SfDetailContainer as HTMLDivElement).querySelector('.button-delete')?.addEventListener('click', async () => {
13705
13720
 
13706
13721
  await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
@@ -17627,6 +17642,7 @@ export class SfIEvents extends LitElement {
17627
17642
  var mapped = false;
17628
17643
  var extraFields = null;
17629
17644
  var previousExtraFields = null;
17645
+ console.log('mappedcompliances',mappedCompliances)
17630
17646
  for(var j = 0; j < mappedCompliances.data.mappings.mappings.length; j++) {
17631
17647
  if(mappedCompliances.data.mappings.mappings[j].id == resultCompliances.values[i].id) {
17632
17648
  if(mappedCompliances.data.mappings.mappings[j].selected) {