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 +11 -1
- package/package.json +1 -1
- package/sf-i-events.js +22 -5
- package/src/sf-i-events.ts +21 -5
package/dev/index.html
CHANGED
|
@@ -759,9 +759,19 @@
|
|
|
759
759
|
</div>
|
|
760
760
|
|
|
761
761
|
</sf-i-events> -->
|
|
762
|
-
<sf-i-events projectid="
|
|
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="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" 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"}]" eventpreviewfields="["obligationtitle"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
763
763
|
|
|
764
|
+
<div slot="uploader">
|
|
765
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" 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="{"India":{"Punjab":["Punjab Warehouse"],"Gujarat":["RO & Unit I","Unit II"]}}" 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
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 (
|
|
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="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '"')}" 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) {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -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(
|
|
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="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{"key":attachment.key,"ext":attachment.ext}]).replace(/"/g,'"')}" 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) {
|