sf-i-events 1.0.782 → 1.0.783

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 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="false" features="[]" eventfielddependencies="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]" eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
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="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]" eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" 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="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" extract="yes" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.782",
4
+ "version": "1.0.783",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
package/sf-i-events.js CHANGED
@@ -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
- let tempRegisters = await this.fetchRegisters("", "", selectedCountry, selectedStatute);
4862
- events[selectedCountry][selectedStatute] = tempRegisters[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
 
@@ -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
- let tempRegisters = await this.fetchRegisters("","",selectedCountry,selectedStatute);
7445
- events[selectedCountry][selectedStatute] = tempRegisters[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`