sf-i-events 1.0.782 → 1.0.784
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 +1 -1
- package/package.json +1 -1
- package/sf-i-events.js +16 -6
- package/src/sf-i-events.ts +16 -9
package/dev/index.html
CHANGED
|
@@ -638,7 +638,7 @@
|
|
|
638
638
|
</div>
|
|
639
639
|
|
|
640
640
|
</sf-i-events> -->
|
|
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="Ankur Singhal" userprofileid="010834e8-108e-4a87-b58d-f5b429f184be" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" countryid="4ab8901c-4407-4c4d-a2c7-df1a690aa0a3" myrole="viewer" showregisterexport="
|
|
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="Ankur Singhal" userprofileid="010834e8-108e-4a87-b58d-f5b429f184be" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" countryid="4ab8901c-4407-4c4d-a2c7-df1a690aa0a3" myrole="viewer" showregisterexport="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="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
642
642
|
|
|
643
643
|
<div slot="uploader">
|
|
644
644
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -1231,7 +1231,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1231
1231
|
this.lastupdated = "";
|
|
1232
1232
|
this.changedOnboardingItemIds = [];
|
|
1233
1233
|
this.selectedCountryIndex = 0;
|
|
1234
|
-
this.selectedRegisterIndex =
|
|
1234
|
+
this.selectedRegisterIndex = -1;
|
|
1235
1235
|
this.selectallblock = "100";
|
|
1236
1236
|
this.isSelectedLegend = (value) => {
|
|
1237
1237
|
return this.chartSelectedLegend.includes(value);
|
|
@@ -4789,7 +4789,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4789
4789
|
for (var i = 0; i < Object.keys(objCountry).length; i++) {
|
|
4790
4790
|
const statute = Object.keys(objCountry)[i];
|
|
4791
4791
|
// this.csvDataRegisters += ('\n\n"' + statute + '"\n\n');
|
|
4792
|
-
html += ('<h3 part="register-section-title-' + (i !=
|
|
4792
|
+
html += ('<h3 part="register-section-title-' + (i != this.selectedRegisterIndex ? 'not-selected' : 'selected') + '" class="left-sticky register-statute" id="register-statute-' + i + '">' + statute + '</h3>');
|
|
4793
4793
|
// html += '<div class="w-100p scroll-x '+(i != 0 ? 'hide' : '')+'" id="register-body-'+i+'" >';
|
|
4794
4794
|
// html += '<table>';
|
|
4795
4795
|
if (i == this.selectedRegisterIndex && meta == "") {
|
|
@@ -4809,7 +4809,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4809
4809
|
const data = JSON.parse(compliance.data);
|
|
4810
4810
|
const cols = JSON.parse(compliance.cols);
|
|
4811
4811
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
4812
|
-
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '"
|
|
4812
|
+
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
4813
4813
|
html += '<table>';
|
|
4814
4814
|
html += '<tr>';
|
|
4815
4815
|
html += ('<td class="td-body left-sticky" part="td-body-register"><button part="button-icon" id="button-icon-country-' + index + '-' + i + '-' + j + '" class="button-icon-country"><span class="material-symbols-outlined">open_in_new</span></button></td>');
|
|
@@ -4858,8 +4858,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4858
4858
|
this.selectedRegisterIndex = index;
|
|
4859
4859
|
let selectedCountry = Object.keys(events)[this.selectedCountryTab];
|
|
4860
4860
|
let selectedStatute = Object.keys(events[selectedCountry])[index];
|
|
4861
|
-
|
|
4862
|
-
events[selectedCountry][selectedStatute]
|
|
4861
|
+
console.log('registerevents', Object.keys(events[selectedCountry][selectedStatute]).length);
|
|
4862
|
+
if (Object.keys(events[selectedCountry][selectedStatute]).length == 0) {
|
|
4863
|
+
let tempRegisters = await this.fetchRegisters("", "", selectedCountry, selectedStatute);
|
|
4864
|
+
events[selectedCountry][selectedStatute] = tempRegisters[selectedCountry][selectedStatute];
|
|
4865
|
+
}
|
|
4863
4866
|
this.renderRegisterEvents(events);
|
|
4864
4867
|
// const divBodys = ((this._SfRegisterContainer.querySelector('.calendar-right-data') as HTMLDivElement).querySelectorAll('.register-body-'+ index) as NodeListOf<HTMLDivElement>);
|
|
4865
4868
|
// for(let divBody of divBodys){
|
|
@@ -4873,6 +4876,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4873
4876
|
// }
|
|
4874
4877
|
});
|
|
4875
4878
|
}
|
|
4879
|
+
const registerStatute = this._SfRegisterContainer.querySelector('.calendar-right-data').querySelector('#register-statute-' + this.selectedRegisterIndex);
|
|
4880
|
+
if (registerStatute != null) {
|
|
4881
|
+
registerStatute.scrollIntoView();
|
|
4882
|
+
}
|
|
4876
4883
|
}
|
|
4877
4884
|
else {
|
|
4878
4885
|
const index = 0;
|
|
@@ -6606,7 +6613,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6606
6613
|
this.renderRegisterEvents(events);
|
|
6607
6614
|
}
|
|
6608
6615
|
});
|
|
6609
|
-
(_b = this._SfRegisterContainer.querySelector('#button-download')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', () => {
|
|
6616
|
+
(_b = this._SfRegisterContainer.querySelector('#button-download')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
|
|
6617
|
+
let tempEvents = await this.fetchRegisters("", "all", "", "");
|
|
6618
|
+
this.renderRegisterEvents(tempEvents, "all");
|
|
6610
6619
|
const ts = new Date();
|
|
6611
6620
|
console.log(this.csvDataRegisters);
|
|
6612
6621
|
const blob = new Blob([this.csvDataRegisters], { type: 'text/csv' });
|
|
@@ -19402,6 +19411,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19402
19411
|
super.connectedCallback();
|
|
19403
19412
|
}
|
|
19404
19413
|
render() {
|
|
19414
|
+
console.log('rendering', this.mode);
|
|
19405
19415
|
if (this.mode == "rcmnotifications") {
|
|
19406
19416
|
return html `
|
|
19407
19417
|
|
package/src/sf-i-events.ts
CHANGED
|
@@ -1638,7 +1638,7 @@ export class SfIEvents extends LitElement {
|
|
|
1638
1638
|
|
|
1639
1639
|
selectedCountryIndex: number = 0;
|
|
1640
1640
|
|
|
1641
|
-
selectedRegisterIndex: number =
|
|
1641
|
+
selectedRegisterIndex: number = -1;
|
|
1642
1642
|
|
|
1643
1643
|
@property()
|
|
1644
1644
|
selectallblock: string = "100";
|
|
@@ -7356,7 +7356,7 @@ export class SfIEvents extends LitElement {
|
|
|
7356
7356
|
|
|
7357
7357
|
// this.csvDataRegisters += ('\n\n"' + statute + '"\n\n');
|
|
7358
7358
|
|
|
7359
|
-
html += ('<h3 part="register-section-title-'+(i !=
|
|
7359
|
+
html += ('<h3 part="register-section-title-'+(i != this.selectedRegisterIndex ? 'not-selected' : 'selected')+'" class="left-sticky register-statute" id="register-statute-'+i+'">'+statute+'</h3>');
|
|
7360
7360
|
// html += '<div class="w-100p scroll-x '+(i != 0 ? 'hide' : '')+'" id="register-body-'+i+'" >';
|
|
7361
7361
|
// html += '<table>';
|
|
7362
7362
|
|
|
@@ -7378,7 +7378,7 @@ export class SfIEvents extends LitElement {
|
|
|
7378
7378
|
const data = JSON.parse(compliance.data);
|
|
7379
7379
|
const cols = JSON.parse(compliance.cols);
|
|
7380
7380
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
7381
|
-
html += '<div class="w-100p scroll-x '+(i != this.selectedRegisterIndex ? 'hide' : '')+' register-body-'+i+'"
|
|
7381
|
+
html += '<div class="w-100p scroll-x '+(i != this.selectedRegisterIndex ? 'hide' : '')+' register-body-'+i+'">';
|
|
7382
7382
|
html += '<table>';
|
|
7383
7383
|
html += '<tr>';
|
|
7384
7384
|
html += ('<td class="td-body left-sticky" part="td-body-register"><button part="button-icon" id="button-icon-country-'+index+'-'+i+'-'+j+'" class="button-icon-country"><span class="material-symbols-outlined">open_in_new</span></button></td>');
|
|
@@ -7441,8 +7441,11 @@ export class SfIEvents extends LitElement {
|
|
|
7441
7441
|
this.selectedRegisterIndex = index;
|
|
7442
7442
|
let selectedCountry = Object.keys(events)[this.selectedCountryTab]
|
|
7443
7443
|
let selectedStatute = Object.keys(events[selectedCountry])[index]
|
|
7444
|
-
|
|
7445
|
-
events[selectedCountry][selectedStatute]
|
|
7444
|
+
console.log('registerevents', Object.keys(events[selectedCountry][selectedStatute]).length)
|
|
7445
|
+
if(Object.keys(events[selectedCountry][selectedStatute]).length == 0){
|
|
7446
|
+
let tempRegisters = await this.fetchRegisters("","",selectedCountry,selectedStatute);
|
|
7447
|
+
events[selectedCountry][selectedStatute] = tempRegisters[selectedCountry][selectedStatute]
|
|
7448
|
+
}
|
|
7446
7449
|
this.renderRegisterEvents(events);
|
|
7447
7450
|
// const divBodys = ((this._SfRegisterContainer.querySelector('.calendar-right-data') as HTMLDivElement).querySelectorAll('.register-body-'+ index) as NodeListOf<HTMLDivElement>);
|
|
7448
7451
|
// for(let divBody of divBodys){
|
|
@@ -7458,7 +7461,10 @@ export class SfIEvents extends LitElement {
|
|
|
7458
7461
|
});
|
|
7459
7462
|
|
|
7460
7463
|
}
|
|
7461
|
-
|
|
7464
|
+
const registerStatute = (this._SfRegisterContainer.querySelector('.calendar-right-data') as HTMLDivElement).querySelector('#register-statute-' + this.selectedRegisterIndex) as HTMLDivElement;
|
|
7465
|
+
if(registerStatute != null){
|
|
7466
|
+
registerStatute.scrollIntoView();
|
|
7467
|
+
}
|
|
7462
7468
|
} else {
|
|
7463
7469
|
const index = 0;
|
|
7464
7470
|
this.selectedCountryTab = index
|
|
@@ -9599,8 +9605,9 @@ export class SfIEvents extends LitElement {
|
|
|
9599
9605
|
}
|
|
9600
9606
|
});
|
|
9601
9607
|
|
|
9602
|
-
(this._SfRegisterContainer as HTMLDivElement).querySelector('#button-download')?.addEventListener('click', () => {
|
|
9603
|
-
|
|
9608
|
+
(this._SfRegisterContainer as HTMLDivElement).querySelector('#button-download')?.addEventListener('click', async() => {
|
|
9609
|
+
let tempEvents = await this.fetchRegisters("","all","","")
|
|
9610
|
+
this.renderRegisterEvents(tempEvents,"all");
|
|
9604
9611
|
const ts = new Date();
|
|
9605
9612
|
console.log(this.csvDataRegisters);
|
|
9606
9613
|
const blob = new Blob([this.csvDataRegisters], { type: 'text/csv' });
|
|
@@ -25702,7 +25709,7 @@ export class SfIEvents extends LitElement {
|
|
|
25702
25709
|
}
|
|
25703
25710
|
|
|
25704
25711
|
override render() {
|
|
25705
|
-
|
|
25712
|
+
console.log('rendering', this.mode);
|
|
25706
25713
|
if(this.mode == "rcmnotifications") {
|
|
25707
25714
|
|
|
25708
25715
|
return html`
|