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 +11 -1
- package/package.json +1 -1
- package/sf-i-events.js +11 -2
- package/src/sf-i-events.ts +10 -2
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'];
|
|
@@ -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 (
|
|
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="["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>`;
|
|
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) {
|
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'];
|
|
@@ -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(
|
|
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="["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>`
|
|
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) {
|