sf-i-events 1.0.831 → 1.0.833
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 +12 -2
- package/package.json +1 -1
- package/sf-i-events.js +16 -16
- package/src/sf-i-events.ts +15 -15
package/dev/index.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import {SfISubSelect} from 'https://esm.run/sf-i-sub-select@1.0.83/sf-i-sub-select.js';
|
|
23
23
|
import {SfIForm} from 'https://esm.run/sf-i-form@1.0.184/sf-i-form.js';
|
|
24
24
|
import {SfIElasticText} from 'https://esm.run/sf-i-elastic-text@1.0.17/sf-i-elastic-text.js';
|
|
25
|
-
import {SfIUploader} from 'https://esm.run/sf-i-uploader@1.0.
|
|
25
|
+
import {SfIUploader} from 'https://esm.run/sf-i-uploader@1.0.110/sf-i-uploader.js';
|
|
26
26
|
import {SfIMultitextarea} from 'https://esm.run/sf-i-multitextarea@1.0.23/sf-i-multitextarea.js';
|
|
27
27
|
import {SfIReporting} from 'https://esm.run/sf-i-reporting@1.0.73/sf-i-reporting.js';
|
|
28
28
|
import {SfIBricks} from 'https://esm.run/sf-i-bricks@1.0.8/sf-i-bricks.js';
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
// import {SfIForm} from 'https://unpkg.com/sf-i-form@1.0.184/sf-i-form.js?module';
|
|
39
39
|
// import {SfIEvents} from 'https://unpkg.com/sf-i-events@1.0.423/sf-i-events.js?module';
|
|
40
40
|
// import {SfIElasticText} from 'https://unpkg.com/sf-i-elastic-text@1.0.7/sf-i-elastic-text.js?module';
|
|
41
|
-
// import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.
|
|
41
|
+
// import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.110/sf-i-uploader.js?module';
|
|
42
42
|
// import {SfRandomText} from 'https://unpkg.com/sf-random-text@1.0.2/sf-random-text.js?module';
|
|
43
43
|
// import {SfNewFeature} from 'https://unpkg.com/sf-new-feature@1.0.1/sf-new-feature.js?module';
|
|
44
44
|
|
|
@@ -769,6 +769,16 @@
|
|
|
769
769
|
</div>
|
|
770
770
|
|
|
771
771
|
</sf-i-events>
|
|
772
|
+
<!-- <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="solid" username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="reporter" showregisterexport="false" features="["notices"]" 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="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
773
|
+
|
|
774
|
+
<div slot="uploader">
|
|
775
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
776
|
+
</div>
|
|
777
|
+
<div slot="reporting">
|
|
778
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
779
|
+
</div>
|
|
780
|
+
|
|
781
|
+
</sf-i-events> -->
|
|
772
782
|
<!-- <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
783
|
|
|
774
784
|
</sf-i-events> -->
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -9725,9 +9725,9 @@ 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'];
|
|
9729
9729
|
const statuteFields = ['jurisdiction', 'country', 'state', 'category', 'subcategory', 'statute'];
|
|
9730
|
-
const complianceFields = ['specificity', 'reference', 'obligation', 'penalty', 'authority', 'frequency', 'subfrequency', 'obligationtype', 'duedate', 'applicability', 'form', 'additionalurls', 'adhocquestion', 'adhocquestionschedule', 'adhocinstances', 'uploadguidance'];
|
|
9730
|
+
const complianceFields = ['specificity', 'reference', 'obligation', 'penalty', 'authority', 'frequency', 'subfrequency', 'obligationtype', 'duedate', 'applicability', 'form', 'additionalurls', 'adhocquestion', 'adhocquestionschedule', 'adhocinstances', 'uploadguidance', 'attachment'];
|
|
9731
9731
|
const grcFields = ['internalcontrols', 'firstlineofdefence', 'secondlineofdefence', 'thirdlineofdefence', 'risk', 'riskarea'];
|
|
9732
9732
|
let listReportingContainers = eventsContainer.querySelectorAll('.list-reporting-container');
|
|
9733
9733
|
for (let tempReportingContainer of listReportingContainers) {
|
|
@@ -9777,16 +9777,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9777
9777
|
if (!this.getEventPreviewFields().includes(basicFields[i])) {
|
|
9778
9778
|
if (!this.getEventHideFields().includes(basicFields[i])) {
|
|
9779
9779
|
console.log('basicFields', event[basicFields[i]] + "");
|
|
9780
|
-
if (basicFields[i]
|
|
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) {
|
|
9780
|
+
if ((event[basicFields[i]] + "").indexOf("[") >= 0) {
|
|
9790
9781
|
html += '<div class="m-20">';
|
|
9791
9782
|
html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
|
|
9792
9783
|
html += this.getEventTexts(basicFields[i], JSON.parse(event[basicFields[i]]), event).replace(/ *\([^)]*\) */g, "").trim();
|
|
@@ -9883,6 +9874,15 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9883
9874
|
}
|
|
9884
9875
|
html += '</div>';
|
|
9885
9876
|
}
|
|
9877
|
+
else if (complianceFields[i] == 'attachment') {
|
|
9878
|
+
if (event[complianceFields[i]] != null && event[complianceFields[i]].length > 0) {
|
|
9879
|
+
let attachment = JSON.parse(event[complianceFields[i]] + "");
|
|
9880
|
+
html += '<div class="m-20">';
|
|
9881
|
+
html += '<div part="detail-head"><strong>' + complianceFields[i] + '</strong></div>';
|
|
9882
|
+
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" displaydetail="yes"></sf-i-uploader>`;
|
|
9883
|
+
html += '</div>';
|
|
9884
|
+
}
|
|
9885
|
+
}
|
|
9886
9886
|
else {
|
|
9887
9887
|
html += '<div class="m-20">';
|
|
9888
9888
|
html += '<div part="detail-head"><strong>' + complianceFields[i] + '</strong></div>';
|
|
@@ -10025,10 +10025,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10025
10025
|
}
|
|
10026
10026
|
this._SfDetailContainer.innerHTML = html;
|
|
10027
10027
|
this._SfDetailContainer.style.display = 'block';
|
|
10028
|
-
let attachmentUploaders = this._SfDetailContainer.querySelectorAll('.event-attachment')
|
|
10029
|
-
for
|
|
10030
|
-
|
|
10031
|
-
}
|
|
10028
|
+
// let attachmentUploaders = (this._SfDetailContainer as HTMLDivElement).querySelectorAll('.event-attachment') as NodeListOf<SfIUploader>
|
|
10029
|
+
// for(let attachmentUploader of attachmentUploaders){
|
|
10030
|
+
// attachmentUploader.loadMode();
|
|
10031
|
+
// }
|
|
10032
10032
|
(_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
|
|
10033
10033
|
await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
|
|
10034
10034
|
this.setSuccess('Deleted successfully!');
|
package/src/sf-i-events.ts
CHANGED
|
@@ -13342,9 +13342,9 @@ 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'];
|
|
13346
13346
|
const statuteFields = ['jurisdiction', 'country', 'state', 'category', 'subcategory', 'statute'];
|
|
13347
|
-
const complianceFields = ['specificity', 'reference', 'obligation', 'penalty', 'authority', 'frequency', 'subfrequency', 'obligationtype', 'duedate', 'applicability', 'form', 'additionalurls', 'adhocquestion', 'adhocquestionschedule', 'adhocinstances', 'uploadguidance'];
|
|
13347
|
+
const complianceFields = ['specificity', 'reference', 'obligation', 'penalty', 'authority', 'frequency', 'subfrequency', 'obligationtype', 'duedate', 'applicability', 'form', 'additionalurls', 'adhocquestion', 'adhocquestionschedule', 'adhocinstances', 'uploadguidance', 'attachment'];
|
|
13348
13348
|
const grcFields = ['internalcontrols', 'firstlineofdefence', 'secondlineofdefence', 'thirdlineofdefence', 'risk', 'riskarea'];
|
|
13349
13349
|
|
|
13350
13350
|
let listReportingContainers = eventsContainer.querySelectorAll('.list-reporting-container') as NodeListOf<HTMLDivElement>
|
|
@@ -13406,15 +13406,7 @@ export class SfIEvents extends LitElement {
|
|
|
13406
13406
|
if(!this.getEventHideFields().includes(basicFields[i])) {
|
|
13407
13407
|
|
|
13408
13408
|
console.log('basicFields', event[basicFields[i]] + "");
|
|
13409
|
-
if(basicFields[i]
|
|
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) {
|
|
13409
|
+
if((event[basicFields[i]] + "").indexOf("[") >= 0) {
|
|
13418
13410
|
html += '<div class="m-20">';
|
|
13419
13411
|
html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
|
|
13420
13412
|
html += this.getEventTexts(basicFields[i], JSON.parse(event[basicFields[i]]), event).replace(/ *\([^)]*\) */g, "").trim();
|
|
@@ -13531,6 +13523,14 @@ export class SfIEvents extends LitElement {
|
|
|
13531
13523
|
}
|
|
13532
13524
|
html += '</div>';
|
|
13533
13525
|
|
|
13526
|
+
} else if(complianceFields[i] == 'attachment'){
|
|
13527
|
+
if(event[complianceFields[i]] != null && event[complianceFields[i]].length > 0) {
|
|
13528
|
+
let attachment = JSON.parse(event[complianceFields[i]] + "");
|
|
13529
|
+
html += '<div class="m-20">';
|
|
13530
|
+
html += '<div part="detail-head"><strong>'+complianceFields[i]+'</strong></div>'
|
|
13531
|
+
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" displaydetail="yes"></sf-i-uploader>`
|
|
13532
|
+
html += '</div>';
|
|
13533
|
+
}
|
|
13534
13534
|
} else {
|
|
13535
13535
|
|
|
13536
13536
|
html += '<div class="m-20">';
|
|
@@ -13712,10 +13712,10 @@ export class SfIEvents extends LitElement {
|
|
|
13712
13712
|
|
|
13713
13713
|
(this._SfDetailContainer as HTMLDivElement).innerHTML = html;
|
|
13714
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
|
-
|
|
13718
|
-
}
|
|
13715
|
+
// let attachmentUploaders = (this._SfDetailContainer as HTMLDivElement).querySelectorAll('.event-attachment') as NodeListOf<SfIUploader>
|
|
13716
|
+
// for(let attachmentUploader of attachmentUploaders){
|
|
13717
|
+
// attachmentUploader.loadMode();
|
|
13718
|
+
// }
|
|
13719
13719
|
(this._SfDetailContainer as HTMLDivElement).querySelector('.button-delete')?.addEventListener('click', async () => {
|
|
13720
13720
|
|
|
13721
13721
|
await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
|