sf-i-events 1.0.768 → 1.0.769
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 +8 -1
- package/package.json +1 -1
- package/sf-i-events.d.ts +1 -1
- package/sf-i-events.js +20 -13
- package/src/sf-i-events.ts +20 -14
package/dev/index.html
CHANGED
|
@@ -628,8 +628,15 @@
|
|
|
628
628
|
</style>
|
|
629
629
|
</head>
|
|
630
630
|
<body>
|
|
631
|
-
<sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global"
|
|
631
|
+
<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="58c90fb5-9d1d-46bc-9b1a-2cf3e353eed0" 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">
|
|
632
632
|
|
|
633
|
+
<div slot="uploader">
|
|
634
|
+
<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>
|
|
635
|
+
</div>
|
|
636
|
+
<div slot="reporting">
|
|
637
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
638
|
+
</div>
|
|
639
|
+
|
|
633
640
|
</sf-i-events>
|
|
634
641
|
<!-- <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="Chief Compliance Officer" userprofileid="5fe96caa-1a44-4a2d-921a-920d29433eca" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="functionhead" 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">
|
|
635
642
|
|
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -714,7 +714,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
714
714
|
uploadReportsReviewsBulk: (bulkBody: any) => Promise<void>;
|
|
715
715
|
uploadReviewsBulk: (bulkBody: any) => Promise<void>;
|
|
716
716
|
uploadReport: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues?: string, reportformatschema?: string, module?: string) => Promise<void>;
|
|
717
|
-
uploadReportsBulk: (bulkBody: any) => Promise<void>;
|
|
717
|
+
uploadReportsBulk: (bulkBody: any, showSuccess?: boolean) => Promise<void>;
|
|
718
718
|
uploadMapping: () => Promise<void>;
|
|
719
719
|
uploadEvents: () => Promise<void>;
|
|
720
720
|
uploadReprogramTrigger: (eventid: string, timestamp: string) => Promise<void>;
|
package/sf-i-events.js
CHANGED
|
@@ -3497,7 +3497,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3497
3497
|
// await this.uploadReportsBulk(bulkBody);
|
|
3498
3498
|
// await this.fetchBulkReportingData();
|
|
3499
3499
|
if (bulkBody.length > 0) {
|
|
3500
|
-
await this.uploadReportsBulk(bulkBody);
|
|
3500
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
3501
3501
|
}
|
|
3502
3502
|
if (bulkBodyReview.length > 0) {
|
|
3503
3503
|
await this.uploadReportsReviewsBulk(bulkBodyReview);
|
|
@@ -7422,7 +7422,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7422
7422
|
//console.log('dateresult', dateResult);
|
|
7423
7423
|
this.currentColumnIndex = target + "";
|
|
7424
7424
|
if (dateResult != null) {
|
|
7425
|
-
await this.
|
|
7425
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
|
|
7426
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
7426
7427
|
}
|
|
7427
7428
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7428
7429
|
this.renderStream(target);
|
|
@@ -7432,7 +7433,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7432
7433
|
const dateResult = this.calculateStartAndEndDateOfStream(target);
|
|
7433
7434
|
const monthResult = this.calculateMonthFromIndex(target);
|
|
7434
7435
|
if (dateResult != null) {
|
|
7435
|
-
await this.
|
|
7436
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
|
|
7437
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
7436
7438
|
}
|
|
7437
7439
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7438
7440
|
this.currentColumnIndex = target + "";
|
|
@@ -8803,7 +8805,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8803
8805
|
// await this.uploadReportsBulk(bulkBody);
|
|
8804
8806
|
// await this.fetchBulkReportingData();
|
|
8805
8807
|
if (bulkBody.length > 0) {
|
|
8806
|
-
await this.uploadReportsBulk(bulkBody);
|
|
8808
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
8807
8809
|
}
|
|
8808
8810
|
if (bulkBodyReview.length > 0) {
|
|
8809
8811
|
await this.uploadReportsReviewsBulk(bulkBodyReview);
|
|
@@ -9909,7 +9911,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9909
9911
|
// this.clearMessages();
|
|
9910
9912
|
}
|
|
9911
9913
|
if (bulkBody.length > 0) {
|
|
9912
|
-
await this.uploadReportsBulk(bulkBody);
|
|
9914
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
9913
9915
|
}
|
|
9914
9916
|
// await this.fetchBulkReportingData();
|
|
9915
9917
|
if (bulkBodyReview.length > 0) {
|
|
@@ -15330,7 +15332,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15330
15332
|
const dateResult = this.calculateStartAndEndDateOfStream(idx);
|
|
15331
15333
|
const monthResult = this.calculateMonthFromIndex(idx);
|
|
15332
15334
|
if (dateResult != null) {
|
|
15333
|
-
await this.
|
|
15335
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
|
|
15336
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
15334
15337
|
}
|
|
15335
15338
|
this.renderStream(idx);
|
|
15336
15339
|
});
|
|
@@ -16326,16 +16329,20 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16326
16329
|
this.setError(jsonRespose.error);
|
|
16327
16330
|
}
|
|
16328
16331
|
};
|
|
16329
|
-
this.uploadReportsBulk = async (bulkBody) => {
|
|
16332
|
+
this.uploadReportsBulk = async (bulkBody, showSuccess = true) => {
|
|
16330
16333
|
let url = "https://" + this.apiId + "/uploadreportsbulk1";
|
|
16331
16334
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
16332
16335
|
const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
|
|
16333
|
-
|
|
16336
|
+
if (showSuccess) {
|
|
16337
|
+
this._SfLoader.innerHTML = '';
|
|
16338
|
+
}
|
|
16334
16339
|
if (xhr.status == 200) {
|
|
16335
|
-
|
|
16336
|
-
|
|
16337
|
-
|
|
16338
|
-
|
|
16340
|
+
if (showSuccess) {
|
|
16341
|
+
this.setSuccess("Bulk upload initiated. Processing will occur in the background, and you'll receive an email notification once it's complete.");
|
|
16342
|
+
setTimeout(() => {
|
|
16343
|
+
this.clearMessages();
|
|
16344
|
+
}, 10000);
|
|
16345
|
+
}
|
|
16339
16346
|
}
|
|
16340
16347
|
else {
|
|
16341
16348
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
@@ -17606,7 +17613,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17606
17613
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
17607
17614
|
this.lastupdated = new Date().toLocaleDateString('en-IN') + " - " + new Date().toLocaleTimeString('en-IN');
|
|
17608
17615
|
console.log('rendering appropriate string', list);
|
|
17609
|
-
this.renderAppropriateStream(startDate, endDate,
|
|
17616
|
+
this.renderAppropriateStream(startDate, endDate, true);
|
|
17610
17617
|
this.fetchBulkReportingData();
|
|
17611
17618
|
// if(this.selectedFeatures.indexOf('notices') >= 0){
|
|
17612
17619
|
// this.fetchAndRenderNotices(startDate, endDate);
|
package/src/sf-i-events.ts
CHANGED
|
@@ -5862,7 +5862,7 @@ export class SfIEvents extends LitElement {
|
|
|
5862
5862
|
|
|
5863
5863
|
// await this.fetchBulkReportingData();
|
|
5864
5864
|
if(bulkBody.length > 0){
|
|
5865
|
-
await this.uploadReportsBulk(bulkBody);
|
|
5865
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
5866
5866
|
}
|
|
5867
5867
|
|
|
5868
5868
|
if(bulkBodyReview.length > 0){
|
|
@@ -10623,7 +10623,8 @@ export class SfIEvents extends LitElement {
|
|
|
10623
10623
|
//console.log('dateresult', dateResult);
|
|
10624
10624
|
this.currentColumnIndex = target + "";
|
|
10625
10625
|
if(dateResult != null) {
|
|
10626
|
-
await this.
|
|
10626
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
10627
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
10627
10628
|
}
|
|
10628
10629
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
10629
10630
|
this.renderStream(target);
|
|
@@ -10636,7 +10637,8 @@ export class SfIEvents extends LitElement {
|
|
|
10636
10637
|
const dateResult = this.calculateStartAndEndDateOfStream(target);
|
|
10637
10638
|
const monthResult = this.calculateMonthFromIndex(target);
|
|
10638
10639
|
if(dateResult != null) {
|
|
10639
|
-
await this.
|
|
10640
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
10641
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
10640
10642
|
}
|
|
10641
10643
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
10642
10644
|
this.currentColumnIndex = target + "";
|
|
@@ -12362,7 +12364,7 @@ export class SfIEvents extends LitElement {
|
|
|
12362
12364
|
// await this.uploadReportsBulk(bulkBody);
|
|
12363
12365
|
// await this.fetchBulkReportingData();
|
|
12364
12366
|
if(bulkBody.length > 0){
|
|
12365
|
-
await this.uploadReportsBulk(bulkBody);
|
|
12367
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
12366
12368
|
}
|
|
12367
12369
|
|
|
12368
12370
|
if(bulkBodyReview.length > 0){
|
|
@@ -13651,7 +13653,7 @@ export class SfIEvents extends LitElement {
|
|
|
13651
13653
|
}
|
|
13652
13654
|
|
|
13653
13655
|
if(bulkBody.length > 0){
|
|
13654
|
-
await this.uploadReportsBulk(bulkBody);
|
|
13656
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
13655
13657
|
}
|
|
13656
13658
|
// await this.fetchBulkReportingData();
|
|
13657
13659
|
if(bulkBodyReview.length > 0){
|
|
@@ -20563,7 +20565,8 @@ export class SfIEvents extends LitElement {
|
|
|
20563
20565
|
const dateResult = this.calculateStartAndEndDateOfStream(idx);
|
|
20564
20566
|
const monthResult = this.calculateMonthFromIndex(idx);
|
|
20565
20567
|
if(dateResult != null) {
|
|
20566
|
-
await this.
|
|
20568
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
20569
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
20567
20570
|
}
|
|
20568
20571
|
this.renderStream(idx);
|
|
20569
20572
|
});
|
|
@@ -21804,18 +21807,21 @@ export class SfIEvents extends LitElement {
|
|
|
21804
21807
|
}
|
|
21805
21808
|
}
|
|
21806
21809
|
|
|
21807
|
-
uploadReportsBulk = async (bulkBody: any) => {
|
|
21810
|
+
uploadReportsBulk = async (bulkBody: any, showSuccess: boolean = true) => {
|
|
21808
21811
|
let url = "https://"+this.apiId+"/uploadreportsbulk1"
|
|
21809
21812
|
|
|
21810
21813
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
21811
21814
|
const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
|
|
21812
|
-
|
|
21815
|
+
if(showSuccess){
|
|
21816
|
+
this._SfLoader.innerHTML = '';
|
|
21817
|
+
}
|
|
21813
21818
|
if(xhr.status == 200) {
|
|
21814
|
-
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
+
if(showSuccess){
|
|
21820
|
+
this.setSuccess("Bulk upload initiated. Processing will occur in the background, and you'll receive an email notification once it's complete.");
|
|
21821
|
+
setTimeout(() => {
|
|
21822
|
+
this.clearMessages()
|
|
21823
|
+
}, 10000);
|
|
21824
|
+
}
|
|
21819
21825
|
|
|
21820
21826
|
} else {
|
|
21821
21827
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
@@ -23607,7 +23613,7 @@ export class SfIEvents extends LitElement {
|
|
|
23607
23613
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
23608
23614
|
this.lastupdated = new Date().toLocaleDateString('en-IN') + " - " + new Date().toLocaleTimeString('en-IN')
|
|
23609
23615
|
console.log('rendering appropriate string', list);
|
|
23610
|
-
this.renderAppropriateStream(startDate, endDate,
|
|
23616
|
+
this.renderAppropriateStream(startDate, endDate, true);
|
|
23611
23617
|
this.fetchBulkReportingData();
|
|
23612
23618
|
// if(this.selectedFeatures.indexOf('notices') >= 0){
|
|
23613
23619
|
// this.fetchAndRenderNotices(startDate, endDate);
|