sf-i-events 1.0.919 → 1.0.921
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 +1 -1
- package/sf-i-events.js +76 -9
- package/src/sf-i-events.ts +77 -10
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -850,7 +850,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
850
850
|
|
|
851
851
|
`;
|
|
852
852
|
this.AUTOSAVE_FLAG = true;
|
|
853
|
-
this.EXCLUDE_COLS_FROM_REGS = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"];
|
|
853
|
+
this.EXCLUDE_COLS_FROM_REGS = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers", "lastmodifiedby", "lastmodifiedtime"];
|
|
854
854
|
this.CHARTS_LIST_BY_MODULES = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
|
|
855
855
|
this.chartSelectedLegend = [];
|
|
856
856
|
this.selectedFilters = null;
|
|
@@ -5677,7 +5677,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5677
5677
|
return [buttonSelectAll, buttonUnselectAll];
|
|
5678
5678
|
};
|
|
5679
5679
|
this.renderRegisterEvents = (events, meta = "", searchCountryIndex = -1, searchIndex = -1, searchVal = "") => {
|
|
5680
|
-
var _a;
|
|
5680
|
+
var _a, _b;
|
|
5681
5681
|
var html = '';
|
|
5682
5682
|
this.csvDataRegisters = '';
|
|
5683
5683
|
let flagUpdateFilters = Object.keys(this.registerFilters).length == 0;
|
|
@@ -5701,6 +5701,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5701
5701
|
});
|
|
5702
5702
|
}
|
|
5703
5703
|
this.tablecols = [];
|
|
5704
|
+
let linesCount = 0;
|
|
5705
|
+
let searchFilterString = "";
|
|
5704
5706
|
if (this.selectedCountryTab >= 0) {
|
|
5705
5707
|
const index = this.selectedCountryTab;
|
|
5706
5708
|
//console.log('indexclicked', index);
|
|
@@ -5708,6 +5710,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5708
5710
|
//console.log('indexclicked', objCountry);
|
|
5709
5711
|
var html = '';
|
|
5710
5712
|
this.csvDataRegisters += '"ID",';
|
|
5713
|
+
linesCount = 0;
|
|
5711
5714
|
for (var i = 0; i < Object.keys(objCountry).length; i++) {
|
|
5712
5715
|
const statute = Object.keys(objCountry)[i];
|
|
5713
5716
|
// this.csvDataRegisters += ('\n\n"' + statute + '"\n\n');
|
|
@@ -5725,16 +5728,25 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5725
5728
|
this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
|
|
5726
5729
|
this.csvDataRegisters += ('\n');
|
|
5727
5730
|
}
|
|
5731
|
+
else {
|
|
5732
|
+
continue;
|
|
5733
|
+
}
|
|
5728
5734
|
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
5729
|
-
html += '<div class="d-flex align-
|
|
5735
|
+
html += '<div class="d-flex flex-col align-stretch left-sticky">';
|
|
5736
|
+
html += '<div class="d-flex justify-between align-end">';
|
|
5730
5737
|
html += '<div class="title-item-date">';
|
|
5731
5738
|
html += '<label part="input-label">Search In Statute</label><br />';
|
|
5739
|
+
html += '<div class="d-flex align-end">';
|
|
5732
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>';
|
|
5733
5743
|
html += '</div>';
|
|
5734
5744
|
html += '<div class="title-item-date">';
|
|
5735
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> <span>Export</span></button>';
|
|
5736
5746
|
html += '</div>';
|
|
5737
5747
|
html += '</div>';
|
|
5748
|
+
html += '<div id="filter-string" part="filter-string">Test String</div>';
|
|
5749
|
+
html += '</div>';
|
|
5738
5750
|
html += '<table>';
|
|
5739
5751
|
let tableBodyHtml = '';
|
|
5740
5752
|
for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
@@ -5757,6 +5769,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5757
5769
|
if (compliance.hide != null && compliance.hide == true) {
|
|
5758
5770
|
continue;
|
|
5759
5771
|
}
|
|
5772
|
+
linesCount++;
|
|
5760
5773
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
5761
5774
|
// html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
5762
5775
|
// html += '<table>';
|
|
@@ -5778,7 +5791,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5778
5791
|
this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
|
|
5779
5792
|
// this.csvDataRegisters += ('",');
|
|
5780
5793
|
if (flagUpdateFilters) {
|
|
5781
|
-
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
|
+
}
|
|
5782
5798
|
}
|
|
5783
5799
|
tempCount++;
|
|
5784
5800
|
}
|
|
@@ -5792,7 +5808,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5792
5808
|
entities += entity.split(';')[0].replace(/\([^)]*\)/g, "") + ',';
|
|
5793
5809
|
}
|
|
5794
5810
|
entities = entities.slice(0, entities.length - 1);
|
|
5795
|
-
tableBodyHtml += ('<td class="td-body" part="td-body-register"><
|
|
5811
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + entities + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
5796
5812
|
if (!this.tablecols.includes('entities') && !this.EXCLUDE_COLS_FROM_REGS.includes('entities')) {
|
|
5797
5813
|
this.tablecols.push('entities');
|
|
5798
5814
|
}
|
|
@@ -5810,7 +5826,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5810
5826
|
locations += location.split(';')[0].replace(/\([^)]*\)/g, "") + ',';
|
|
5811
5827
|
}
|
|
5812
5828
|
locations = locations.slice(0, locations.length - 1);
|
|
5813
|
-
tableBodyHtml += ('<td class="td-body" part="td-body-register"><
|
|
5829
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + locations + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
5814
5830
|
if (!this.tablecols.includes('locations') && !this.EXCLUDE_COLS_FROM_REGS.includes('locations')) {
|
|
5815
5831
|
this.tablecols.push('locations');
|
|
5816
5832
|
}
|
|
@@ -5831,19 +5847,30 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5831
5847
|
}
|
|
5832
5848
|
html += '<thead><tr>';
|
|
5833
5849
|
html += '<th class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important"></span></th>';
|
|
5850
|
+
searchFilterString = "";
|
|
5834
5851
|
for (let colName of this.tablecols) {
|
|
5835
5852
|
let allSelected = true;
|
|
5836
5853
|
for (let subfilterObj of Object.keys((_a = this.registerFilters[colName]) !== null && _a !== void 0 ? _a : {})) {
|
|
5837
5854
|
if (this.registerFilters[colName][subfilterObj] == false) {
|
|
5838
5855
|
allSelected = false;
|
|
5856
|
+
for (let subfilterObjVal of Object.keys((_b = this.registerFilters[colName]) !== null && _b !== void 0 ? _b : {})) {
|
|
5857
|
+
if (this.registerFilters[colName][subfilterObjVal] == true) {
|
|
5858
|
+
if (searchFilterString == "") {
|
|
5859
|
+
searchFilterString += subfilterObjVal;
|
|
5860
|
+
}
|
|
5861
|
+
else {
|
|
5862
|
+
searchFilterString += ', ' + subfilterObjVal;
|
|
5863
|
+
}
|
|
5864
|
+
}
|
|
5865
|
+
}
|
|
5839
5866
|
break;
|
|
5840
5867
|
}
|
|
5841
5868
|
}
|
|
5842
|
-
html += '<th class="td-body" part="td-body-register"><div class="d-flex align-start"><span part="' + (allSelected ? 'td-head' : 'td-head-selected') + '" style="padding-left: 0px !important">' + colName + '</span><div class="filter-button-container ml-10"><button part="' + (allSelected ? 'col-icon' : 'col-icon-selected') + '" id="filter-button-' + this.tablecols.indexOf(colName) + '" class="filter-button material-symbols-outlined">filter_list</button>';
|
|
5869
|
+
html += '<th class="td-body" part="td-body-register"><div class="d-flex align-start"><span part="' + (allSelected ? 'td-head' : 'td-head-selected') + '" style="' + (allSelected ? 'padding-left: 0px !important' : '') + '">' + colName + '</span><div class="filter-button-container ml-10"><button part="' + (allSelected ? 'col-icon' : 'col-icon-selected') + '" id="filter-button-' + this.tablecols.indexOf(colName) + '" class="filter-button material-symbols-outlined">filter_list</button>';
|
|
5843
5870
|
html += '<div id="filter-list-container-' + this.tablecols.indexOf(colName) + '" class="filter-list-container hide flex-col justify-between align-start p-10" part="filter-list-container" anchor="filter-button">';
|
|
5844
5871
|
html += `<div id="filter-label-container-${this.tablecols.indexOf(colName)}" class="filter-label-container d-flex justify-between align-center" part="filter-label-container"><div class="d-flex align-center"><input class="input-select-filter" type="checkbox" ${allSelected ? 'checked' : ''} id="input-select-filter-${this.tablecols.indexOf(colName)}-all" name="features" part="input-select-feature" value="all-${colName}"></input><label class="filter-label" part="filter-label" for="input-select-filter-${this.tablecols.indexOf(colName)}-all">All</label></div><button id="button-submit-filters-${this.tablecols.indexOf(colName)}" part="col-option-icon" class="button-submit-filters material-icons invisible">check</button></div>`;
|
|
5845
5872
|
for (let [index, filterKey] of Object.keys(this.registerFilters[colName]).entries()) {
|
|
5846
|
-
console.log('rendering filter', filterKey);
|
|
5873
|
+
// console.log('rendering filter', filterKey);
|
|
5847
5874
|
html += `<div class="filter-input-container d-flex justify-start align-start"><input class="input-select-filter" type="checkbox" ${this.registerFilters[colName][filterKey] == true ? 'checked' : ''} id="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" name="features" part="input-select-feature" value="${filterKey}"></input><label for="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" id="input-select-filter-label-${this.tablecols.indexOf(colName)}-${index}" class="input-select-filter-label" part="input-select-feature-label">${filterKey}</label></div>`;
|
|
5848
5875
|
}
|
|
5849
5876
|
html += '</div></div></th>';
|
|
@@ -5856,8 +5883,37 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5856
5883
|
// html += '</div>';
|
|
5857
5884
|
}
|
|
5858
5885
|
divRegisterList.innerHTML = html;
|
|
5859
|
-
console.log('registerFilters', flagUpdateFilters, this.registerFilters);
|
|
5886
|
+
console.log('registerFilters', flagUpdateFilters, this.registerFilters, html.indexOf('input-select-filter-0-0'));
|
|
5860
5887
|
// console.log('csvdataregisters', this.csvDataRegisters);
|
|
5888
|
+
if (this.selectedRegisterIndex >= 0) {
|
|
5889
|
+
const divFilterString = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelector('#filter-string');
|
|
5890
|
+
let filterString = "";
|
|
5891
|
+
if (searchVal != "" || searchFilterString != "") {
|
|
5892
|
+
filterString = linesCount + " result(s) when ";
|
|
5893
|
+
if (searchVal != "") {
|
|
5894
|
+
filterString += "searched by \"" + searchVal + "\"";
|
|
5895
|
+
if (searchFilterString != "") {
|
|
5896
|
+
filterString += ", filtered by \"" + searchFilterString + "\"";
|
|
5897
|
+
}
|
|
5898
|
+
}
|
|
5899
|
+
else if (searchFilterString != "") {
|
|
5900
|
+
filterString += "filtered by \"" + searchFilterString + "\"";
|
|
5901
|
+
}
|
|
5902
|
+
}
|
|
5903
|
+
if (filterString != "") {
|
|
5904
|
+
filterString += '<span class="material-symbols-outlined ml-5" id="filter-delete" part="filter-delete">delete</span>';
|
|
5905
|
+
}
|
|
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
|
+
});
|
|
5916
|
+
}
|
|
5861
5917
|
const arrButtonCountries = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelectorAll('.button-icon-country');
|
|
5862
5918
|
for (i = 0; i < arrButtonCountries.length; i++) {
|
|
5863
5919
|
const button = Util.clearListeners(arrButtonCountries[i]);
|
|
@@ -5928,6 +5984,17 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5928
5984
|
// this.renderRegisterEvents(events, meta, countryIndex, searchIndex, searchedValue);
|
|
5929
5985
|
});
|
|
5930
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
|
+
}
|
|
5931
5998
|
const arrButtonDownloadStatute = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelectorAll('.button-download-statute');
|
|
5932
5999
|
for (i = 0; i < arrButtonDownloadStatute.length; i++) {
|
|
5933
6000
|
const button = Util.clearListeners(arrButtonDownloadStatute[i]);
|
package/src/sf-i-events.ts
CHANGED
|
@@ -858,7 +858,7 @@ export class SfIEvents extends LitElement {
|
|
|
858
858
|
|
|
859
859
|
AUTOSAVE_FLAG = true;
|
|
860
860
|
|
|
861
|
-
EXCLUDE_COLS_FROM_REGS: Array<string> = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"]
|
|
861
|
+
EXCLUDE_COLS_FROM_REGS: Array<string> = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers", "lastmodifiedby", "lastmodifiedtime"]
|
|
862
862
|
|
|
863
863
|
CHARTS_LIST_BY_MODULES: { [key: string]: Array<string> } = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
|
|
864
864
|
|
|
@@ -8251,6 +8251,8 @@ export class SfIEvents extends LitElement {
|
|
|
8251
8251
|
});
|
|
8252
8252
|
}
|
|
8253
8253
|
this.tablecols = []
|
|
8254
|
+
let linesCount = 0;
|
|
8255
|
+
let searchFilterString = ""
|
|
8254
8256
|
if (this.selectedCountryTab >= 0) {
|
|
8255
8257
|
|
|
8256
8258
|
const index = this.selectedCountryTab;
|
|
@@ -8261,6 +8263,7 @@ export class SfIEvents extends LitElement {
|
|
|
8261
8263
|
|
|
8262
8264
|
var html = '';
|
|
8263
8265
|
this.csvDataRegisters += '"ID",';
|
|
8266
|
+
linesCount = 0
|
|
8264
8267
|
for (var i = 0; i < Object.keys(objCountry).length; i++) {
|
|
8265
8268
|
|
|
8266
8269
|
const statute = Object.keys(objCountry)[i];
|
|
@@ -8283,20 +8286,29 @@ export class SfIEvents extends LitElement {
|
|
|
8283
8286
|
}
|
|
8284
8287
|
this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
|
|
8285
8288
|
this.csvDataRegisters += ('\n');
|
|
8289
|
+
} else {
|
|
8290
|
+
continue;
|
|
8286
8291
|
}
|
|
8287
8292
|
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
8288
8293
|
|
|
8289
|
-
html += '<div class="d-flex align-
|
|
8294
|
+
html += '<div class="d-flex flex-col align-stretch left-sticky">';
|
|
8295
|
+
html += '<div class="d-flex justify-between align-end">'
|
|
8290
8296
|
html += '<div class="title-item-date">';
|
|
8291
8297
|
html += '<label part="input-label">Search In Statute</label><br />'
|
|
8298
|
+
html += '<div class="d-flex align-end">'
|
|
8292
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>';
|
|
8293
8302
|
html += '</div>';
|
|
8294
8303
|
html += '<div class="title-item-date">';
|
|
8295
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> <span>Export</span></button>';
|
|
8296
8305
|
html += '</div>';
|
|
8297
8306
|
html += '</div>';
|
|
8307
|
+
html += '<div id="filter-string" part="filter-string">Test String</div>'
|
|
8308
|
+
html += '</div>';
|
|
8298
8309
|
html += '<table>';
|
|
8299
8310
|
let tableBodyHtml = ''
|
|
8311
|
+
|
|
8300
8312
|
for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
8301
8313
|
|
|
8302
8314
|
const complianceId = Object.keys(objCountry[statute])[j];
|
|
@@ -8321,6 +8333,7 @@ export class SfIEvents extends LitElement {
|
|
|
8321
8333
|
if (compliance.hide != null && compliance.hide == true) {
|
|
8322
8334
|
continue;
|
|
8323
8335
|
}
|
|
8336
|
+
linesCount++
|
|
8324
8337
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
8325
8338
|
// html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
8326
8339
|
// html += '<table>';
|
|
@@ -8342,8 +8355,13 @@ export class SfIEvents extends LitElement {
|
|
|
8342
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>');
|
|
8343
8356
|
this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
|
|
8344
8357
|
// this.csvDataRegisters += ('",');
|
|
8358
|
+
|
|
8345
8359
|
if (flagUpdateFilters) {
|
|
8346
|
-
|
|
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
|
+
}
|
|
8347
8365
|
}
|
|
8348
8366
|
tempCount++;
|
|
8349
8367
|
} else {
|
|
@@ -8356,7 +8374,7 @@ export class SfIEvents extends LitElement {
|
|
|
8356
8374
|
entities += entity.split(';')[0].replace(/\([^)]*\)/g, "") + ','
|
|
8357
8375
|
}
|
|
8358
8376
|
entities = entities.slice(0, entities.length - 1)
|
|
8359
|
-
tableBodyHtml += ('<td class="td-body" part="td-body-register"><
|
|
8377
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + entities + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
8360
8378
|
if (!this.tablecols.includes('entities') && !this.EXCLUDE_COLS_FROM_REGS.includes('entities')) {
|
|
8361
8379
|
this.tablecols.push('entities')
|
|
8362
8380
|
}
|
|
@@ -8374,7 +8392,7 @@ export class SfIEvents extends LitElement {
|
|
|
8374
8392
|
locations += location.split(';')[0].replace(/\([^)]*\)/g, "") + ','
|
|
8375
8393
|
}
|
|
8376
8394
|
locations = locations.slice(0, locations.length - 1)
|
|
8377
|
-
tableBodyHtml += ('<td class="td-body" part="td-body-register"><
|
|
8395
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + locations + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
8378
8396
|
if (!this.tablecols.includes('locations') && !this.EXCLUDE_COLS_FROM_REGS.includes('locations')) {
|
|
8379
8397
|
this.tablecols.push('locations')
|
|
8380
8398
|
}
|
|
@@ -8395,21 +8413,30 @@ export class SfIEvents extends LitElement {
|
|
|
8395
8413
|
}
|
|
8396
8414
|
html += '<thead><tr>';
|
|
8397
8415
|
html += '<th class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important"></span></th>'
|
|
8398
|
-
|
|
8416
|
+
searchFilterString = ""
|
|
8399
8417
|
for (let colName of this.tablecols) {
|
|
8400
8418
|
let allSelected = true;
|
|
8401
8419
|
for (let subfilterObj of Object.keys(this.registerFilters[colName] ?? {})) {
|
|
8402
8420
|
if (this.registerFilters[colName][subfilterObj] == false) {
|
|
8403
8421
|
allSelected = false;
|
|
8422
|
+
for (let subfilterObjVal of Object.keys(this.registerFilters[colName] ?? {})) {
|
|
8423
|
+
if (this.registerFilters[colName][subfilterObjVal] == true) {
|
|
8424
|
+
if (searchFilterString == "") {
|
|
8425
|
+
searchFilterString += subfilterObjVal
|
|
8426
|
+
} else {
|
|
8427
|
+
searchFilterString += ', ' + subfilterObjVal
|
|
8428
|
+
}
|
|
8429
|
+
}
|
|
8430
|
+
}
|
|
8404
8431
|
break;
|
|
8405
8432
|
}
|
|
8406
8433
|
}
|
|
8407
8434
|
|
|
8408
|
-
html += '<th class="td-body" part="td-body-register"><div class="d-flex align-start"><span part="' + (allSelected ? 'td-head' : 'td-head-selected') + '" style="padding-left: 0px !important">' + colName + '</span><div class="filter-button-container ml-10"><button part="' + (allSelected ? 'col-icon' : 'col-icon-selected') + '" id="filter-button-' + this.tablecols.indexOf(colName) + '" class="filter-button material-symbols-outlined">filter_list</button>'
|
|
8435
|
+
html += '<th class="td-body" part="td-body-register"><div class="d-flex align-start"><span part="' + (allSelected ? 'td-head' : 'td-head-selected') + '" style="' + (allSelected ? 'padding-left: 0px !important' : '') + '">' + colName + '</span><div class="filter-button-container ml-10"><button part="' + (allSelected ? 'col-icon' : 'col-icon-selected') + '" id="filter-button-' + this.tablecols.indexOf(colName) + '" class="filter-button material-symbols-outlined">filter_list</button>'
|
|
8409
8436
|
html += '<div id="filter-list-container-' + this.tablecols.indexOf(colName) + '" class="filter-list-container hide flex-col justify-between align-start p-10" part="filter-list-container" anchor="filter-button">'
|
|
8410
8437
|
html += `<div id="filter-label-container-${this.tablecols.indexOf(colName)}" class="filter-label-container d-flex justify-between align-center" part="filter-label-container"><div class="d-flex align-center"><input class="input-select-filter" type="checkbox" ${allSelected ? 'checked' : ''} id="input-select-filter-${this.tablecols.indexOf(colName)}-all" name="features" part="input-select-feature" value="all-${colName}"></input><label class="filter-label" part="filter-label" for="input-select-filter-${this.tablecols.indexOf(colName)}-all">All</label></div><button id="button-submit-filters-${this.tablecols.indexOf(colName)}" part="col-option-icon" class="button-submit-filters material-icons invisible">check</button></div>`
|
|
8411
8438
|
for (let [index, filterKey] of Object.keys(this.registerFilters[colName]).entries()) {
|
|
8412
|
-
console.log('rendering filter', filterKey);
|
|
8439
|
+
// console.log('rendering filter', filterKey);
|
|
8413
8440
|
html += `<div class="filter-input-container d-flex justify-start align-start"><input class="input-select-filter" type="checkbox" ${this.registerFilters[colName][filterKey] == true ? 'checked' : ''} id="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" name="features" part="input-select-feature" value="${filterKey}"></input><label for="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" id="input-select-filter-label-${this.tablecols.indexOf(colName)}-${index}" class="input-select-filter-label" part="input-select-feature-label">${filterKey}</label></div>`
|
|
8414
8441
|
}
|
|
8415
8442
|
html += '</div></div></th>'
|
|
@@ -8425,9 +8452,37 @@ export class SfIEvents extends LitElement {
|
|
|
8425
8452
|
}
|
|
8426
8453
|
|
|
8427
8454
|
divRegisterList!.innerHTML = html;
|
|
8428
|
-
console.log('registerFilters', flagUpdateFilters, this.registerFilters);
|
|
8455
|
+
console.log('registerFilters', flagUpdateFilters, this.registerFilters, html.indexOf('input-select-filter-0-0'));
|
|
8429
8456
|
// console.log('csvdataregisters', this.csvDataRegisters);
|
|
8430
|
-
|
|
8457
|
+
if (this.selectedRegisterIndex >= 0) {
|
|
8458
|
+
const divFilterString = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#filter-string') as HTMLDivElement
|
|
8459
|
+
let filterString = ""
|
|
8460
|
+
if (searchVal != "" || searchFilterString != "") {
|
|
8461
|
+
filterString = linesCount + " result(s) when "
|
|
8462
|
+
if (searchVal != "") {
|
|
8463
|
+
filterString += "searched by \"" + searchVal + "\""
|
|
8464
|
+
if (searchFilterString != "") {
|
|
8465
|
+
filterString += ", filtered by \"" + searchFilterString + "\""
|
|
8466
|
+
}
|
|
8467
|
+
} else if (searchFilterString != "") {
|
|
8468
|
+
filterString += "filtered by \"" + searchFilterString + "\""
|
|
8469
|
+
}
|
|
8470
|
+
}
|
|
8471
|
+
if(filterString != "") {
|
|
8472
|
+
filterString += '<span class="material-symbols-outlined ml-5" id="filter-delete" part="filter-delete">delete</span>'
|
|
8473
|
+
}
|
|
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
|
+
})
|
|
8484
|
+
}
|
|
8485
|
+
|
|
8431
8486
|
const arrButtonCountries = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-icon-country') as NodeListOf<HTMLButtonElement>;
|
|
8432
8487
|
|
|
8433
8488
|
for (i = 0; i < arrButtonCountries.length; i++) {
|
|
@@ -8511,6 +8566,18 @@ export class SfIEvents extends LitElement {
|
|
|
8511
8566
|
|
|
8512
8567
|
})
|
|
8513
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
|
+
}
|
|
8514
8581
|
|
|
8515
8582
|
const arrButtonDownloadStatute = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-download-statute') as NodeListOf<HTMLButtonElement>;
|
|
8516
8583
|
for (i = 0; i < arrButtonDownloadStatute.length; i++) {
|