sf-i-events 1.0.920 → 1.0.922

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.920",
4
+ "version": "1.0.922",
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
@@ -5732,17 +5732,20 @@ let SfIEvents = class SfIEvents extends LitElement {
5732
5732
  continue;
5733
5733
  }
5734
5734
  html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
5735
- html += '<div class="d-flex flex-col left-sticky">';
5736
- html += '<div class="d-flex align-end">';
5735
+ html += '<div class="d-flex flex-col align-stretch left-sticky">';
5736
+ html += '<div class="d-flex justify-between align-end" part="register-search-container">';
5737
5737
  html += '<div class="title-item-date">';
5738
5738
  html += '<label part="input-label">Search In Statute</label><br />';
5739
+ html += '<div class="d-flex align-end">';
5739
5740
  html += '<input id="stream-search-statute-' + index + '-' + i + '" class="stream-search-statute" part="input" type="text" value="' + ((searchCountryIndex == index && searchIndex == i) ? searchVal : "") + '"/>';
5741
+ html += '<button id="button-search-statute-' + index + '-' + i + '" part="button" class="button-search-statute d-flex justify-center align-center ml-10"><span class="material-symbols-outlined">search</span></button>';
5742
+ html += '</div>';
5740
5743
  html += '</div>';
5741
5744
  html += '<div class="title-item-date">';
5742
5745
  html += '<button id="button-download-statute-' + index + '-' + i + '" part="button" class="button-download-statute d-flex justify-center align-center ml-10"><span class="material-symbols-outlined">download</span>&nbsp;&nbsp;<span>Export</span></button>';
5743
5746
  html += '</div>';
5744
5747
  html += '</div>';
5745
- html += '<div id="filter-string" part="filter-string">Test String</div>';
5748
+ html += '<div id="filter-string" part="filter-string" class="d-flex align-center">Test String</div>';
5746
5749
  html += '</div>';
5747
5750
  html += '<table>';
5748
5751
  let tableBodyHtml = '';
@@ -5788,7 +5791,10 @@ let SfIEvents = class SfIEvents extends LitElement {
5788
5791
  this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
5789
5792
  // this.csvDataRegisters += ('",');
5790
5793
  if (flagUpdateFilters) {
5791
- this.registerFilters[cols[k]][data[k]] = true;
5794
+ this.registerFilters[cols[k]][data[k].toString().trim()] = true;
5795
+ if (cols[k] == "thirdlineofdefence") {
5796
+ console.log('thirdlineofdefence', data[k], this.registerFilters[cols[k]], k + 1, cols[k]);
5797
+ }
5792
5798
  }
5793
5799
  tempCount++;
5794
5800
  }
@@ -5894,7 +5900,19 @@ let SfIEvents = class SfIEvents extends LitElement {
5894
5900
  filterString += "filtered by \"" + searchFilterString + "\"";
5895
5901
  }
5896
5902
  }
5903
+ if (filterString != "") {
5904
+ filterString += '<span class="material-symbols-outlined ml-5" id="filter-delete" part="filter-delete">delete</span>';
5905
+ }
5897
5906
  divFilterString.innerHTML = filterString;
5907
+ const filterDeleteButton = divFilterString.querySelector('#filter-delete');
5908
+ filterDeleteButton === null || filterDeleteButton === void 0 ? void 0 : filterDeleteButton.addEventListener('click', () => {
5909
+ for (let col of Object.keys(this.registerFilters)) {
5910
+ for (let filterVal of Object.keys(this.registerFilters[col])) {
5911
+ this.registerFilters[col][filterVal] = true;
5912
+ }
5913
+ }
5914
+ this.processRegisterFilters(events, meta, searchCountryIndex, searchIndex, "");
5915
+ });
5898
5916
  }
5899
5917
  const arrButtonCountries = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelectorAll('.button-icon-country');
5900
5918
  for (i = 0; i < arrButtonCountries.length; i++) {
@@ -5966,6 +5984,17 @@ let SfIEvents = class SfIEvents extends LitElement {
5966
5984
  // this.renderRegisterEvents(events, meta, countryIndex, searchIndex, searchedValue);
5967
5985
  });
5968
5986
  }
5987
+ const arrButtonStatuteSearch = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelectorAll('.button-search-statute');
5988
+ for (i = 0; i < arrButtonStatuteSearch.length; i++) {
5989
+ const button = Util.clearListeners(arrButtonStatuteSearch[i]);
5990
+ button.addEventListener('click', (e) => {
5991
+ const inputId = e.currentTarget.id.replace('button-', 'stream-');
5992
+ const searchedValue = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelector(inputId).value;
5993
+ const countryIndex = e.currentTarget.id.split('-')[3];
5994
+ const searchIndex = e.currentTarget.id.split('-')[4];
5995
+ this.processRegisterFilters(events, meta, countryIndex, searchIndex, searchedValue);
5996
+ });
5997
+ }
5969
5998
  const arrButtonDownloadStatute = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelectorAll('.button-download-statute');
5970
5999
  for (i = 0; i < arrButtonDownloadStatute.length; i++) {
5971
6000
  const button = Util.clearListeners(arrButtonDownloadStatute[i]);
@@ -8291,17 +8291,20 @@ export class SfIEvents extends LitElement {
8291
8291
  }
8292
8292
  html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
8293
8293
 
8294
- html += '<div class="d-flex flex-col left-sticky">';
8295
- html += '<div class="d-flex align-end">'
8294
+ html += '<div class="d-flex flex-col align-stretch left-sticky">';
8295
+ html += '<div class="d-flex justify-between align-end" part="register-search-container">'
8296
8296
  html += '<div class="title-item-date">';
8297
8297
  html += '<label part="input-label">Search In Statute</label><br />'
8298
+ html += '<div class="d-flex align-end">'
8298
8299
  html += '<input id="stream-search-statute-' + index + '-' + i + '" class="stream-search-statute" part="input" type="text" value="' + ((searchCountryIndex == index && searchIndex == i) ? searchVal : "") + '"/>'
8300
+ html += '<button id="button-search-statute-' + index + '-' + i + '" part="button" class="button-search-statute d-flex justify-center align-center ml-10"><span class="material-symbols-outlined">search</span></button>';
8301
+ html += '</div>';
8299
8302
  html += '</div>';
8300
8303
  html += '<div class="title-item-date">';
8301
8304
  html += '<button id="button-download-statute-' + index + '-' + i + '" part="button" class="button-download-statute d-flex justify-center align-center ml-10"><span class="material-symbols-outlined">download</span>&nbsp;&nbsp;<span>Export</span></button>';
8302
8305
  html += '</div>';
8303
8306
  html += '</div>';
8304
- html += '<div id="filter-string" part="filter-string">Test String</div>'
8307
+ html += '<div id="filter-string" part="filter-string" class="d-flex align-center">Test String</div>'
8305
8308
  html += '</div>';
8306
8309
  html += '<table>';
8307
8310
  let tableBodyHtml = ''
@@ -8352,8 +8355,13 @@ export class SfIEvents extends LitElement {
8352
8355
  tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + data[k] + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
8353
8356
  this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
8354
8357
  // this.csvDataRegisters += ('",');
8358
+
8355
8359
  if (flagUpdateFilters) {
8356
- this.registerFilters[cols[k]][data[k]] = true;
8360
+
8361
+ this.registerFilters[cols[k]][data[k].toString().trim()] = true;
8362
+ if (cols[k] == "thirdlineofdefence") {
8363
+ console.log('thirdlineofdefence', data[k], this.registerFilters[cols[k]], k + 1, cols[k])
8364
+ }
8357
8365
  }
8358
8366
  tempCount++;
8359
8367
  } else {
@@ -8460,8 +8468,21 @@ export class SfIEvents extends LitElement {
8460
8468
  filterString += "filtered by \"" + searchFilterString + "\""
8461
8469
  }
8462
8470
  }
8471
+ if(filterString != "") {
8472
+ filterString += '<span class="material-symbols-outlined ml-5" id="filter-delete" part="filter-delete">delete</span>'
8473
+ }
8463
8474
  divFilterString.innerHTML = filterString
8475
+ const filterDeleteButton = divFilterString.querySelector('#filter-delete') as HTMLSpanElement;
8476
+ filterDeleteButton?.addEventListener('click', () => {
8477
+ for(let col of Object.keys(this.registerFilters)){
8478
+ for(let filterVal of Object.keys(this.registerFilters[col])){
8479
+ this.registerFilters[col][filterVal] = true;
8480
+ }
8481
+ }
8482
+ this.processRegisterFilters(events, meta, searchCountryIndex, searchIndex, "");
8483
+ })
8464
8484
  }
8485
+
8465
8486
  const arrButtonCountries = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-icon-country') as NodeListOf<HTMLButtonElement>;
8466
8487
 
8467
8488
  for (i = 0; i < arrButtonCountries.length; i++) {
@@ -8545,6 +8566,18 @@ export class SfIEvents extends LitElement {
8545
8566
 
8546
8567
  })
8547
8568
  }
8569
+ const arrButtonStatuteSearch = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-search-statute') as NodeListOf<HTMLButtonElement>;
8570
+ for (i = 0; i < arrButtonStatuteSearch.length; i++) {
8571
+ const button = Util.clearListeners(arrButtonStatuteSearch[i]);
8572
+ button.addEventListener('click', (e: any) => {
8573
+ const inputId = e.currentTarget.id.replace('button-','stream-')
8574
+ const searchedValue = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector(inputId).value;
8575
+ const countryIndex = e.currentTarget.id.split('-')[3];
8576
+ const searchIndex = e.currentTarget.id.split('-')[4];
8577
+ this.processRegisterFilters(events, meta, countryIndex, searchIndex, searchedValue);
8578
+
8579
+ })
8580
+ }
8548
8581
 
8549
8582
  const arrButtonDownloadStatute = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-download-statute') as NodeListOf<HTMLButtonElement>;
8550
8583
  for (i = 0; i < arrButtonDownloadStatute.length; i++) {