sf-i-events 1.0.750 → 1.0.751

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.
@@ -1617,7 +1617,7 @@ export class SfIEvents extends LitElement {
1617
1617
  features: string = "[]"
1618
1618
 
1619
1619
  getFeatures = () => {
1620
- return JSON.parse(this.features)
1620
+ return ['compliances',...JSON.parse(this.features)]
1621
1621
  }
1622
1622
 
1623
1623
  selectedFeatures: string[] = this.getFeatures()
@@ -2642,6 +2642,14 @@ export class SfIEvents extends LitElement {
2642
2642
  overflow-x: auto;
2643
2643
  }
2644
2644
 
2645
+ .filter-list-container{
2646
+ position: absolute;
2647
+ right: 5px;
2648
+ background-color: white;
2649
+ border: solid 1px #888;
2650
+ border-radius: 5px
2651
+ }
2652
+
2645
2653
  @media (orientation: landscape) {
2646
2654
 
2647
2655
  .lb {
@@ -3769,9 +3777,9 @@ export class SfIEvents extends LitElement {
3769
3777
  } else {
3770
3778
  arrData[name]++;
3771
3779
  }
3772
- if(name.toLowerCase().indexOf('na - corp sec') >= 0) {
3773
- console.log('arrData[corpsec]', name, arrData[name]);
3774
- }
3780
+ // if(name.toLowerCase().indexOf('na - corp sec') >= 0) {
3781
+ // console.log('arrData[corpsec]', name, arrData[name]);
3782
+ // }
3775
3783
  }
3776
3784
 
3777
3785
  for(var i = 0; i < arr.length; i++) {
@@ -4085,8 +4093,6 @@ export class SfIEvents extends LitElement {
4085
4093
 
4086
4094
  getCompletenessStatus = (event: any) => {
4087
4095
 
4088
- console.log('completeness status',event);
4089
-
4090
4096
  if(event.comments == null || event.comments.length === 0) {
4091
4097
  return "not-started";
4092
4098
  } else {
@@ -4221,14 +4227,17 @@ export class SfIEvents extends LitElement {
4221
4227
  var html = '';
4222
4228
 
4223
4229
  html += '<div class="mb-20 stream-event-list" part="stream-event-list-charts">';
4224
- html += '<div class="align-center d-flex flex-wrap align-center justify-between mb-10 w-100-m-0" part="duration-title-container"><h4 part="duration-title">' + parametersTitle + '</h4>'
4230
+ html += '<div class="align-center d-flex flex-wrap align-start justify-between mb-10 w-100-m-0" part="duration-title-container"><h4 part="duration-title" class="m-0">' + parametersTitle + '</h4>'
4225
4231
  if(this.getFeatures().length > 0){
4226
- // html += '<div class="filter-button-container"><buttton part="button-icon" id="filter-button" class="material-icons">filter_list</button></div>'
4227
- html += '<div class="filter-button-container">'
4232
+ html += '<div class="filter-button-container"><button part="button-icon" id="filter-button" class="material-icons">filter_list</button>'
4233
+ html += '<div id="filter-list-container" class="filter-list-container hide flex-col justify-center align-start p-10" part="filter-list-container" anchor="filter-button">'
4234
+ html += `<div class="filter-input-container d-flex"><input class="input-select-feature-all" type="checkbox" ${this.selectedFeatures.length >= (this.getFeatures().length) ? 'checked' : ''} id="input-select-feature-all" part="input-select-feature" name="all"></input><label for="input-select-feature-all" class="input-select-feature-label" part="input-sellect-feature-label">all</label></div>`
4235
+ // html += `<div class="filter-input-container d-flex"><input class="input-select-feature-compliances" type="checkbox" ${this.selectedFeatures.indexOf('compliances') >= 0 ? 'checked' : ''} id="input-select-feature-compliances" part="input-select-feature" name="compliances"></input><label for="input-select-feature-compliances" class="input-select-feature-label" part="input-sellect-feature-label">compliances</label></div>`
4228
4236
  for(let [index,feature] of this.getFeatures().entries()){
4229
- html += `<input class="ml-10 input-select-feature" type="checkbox" ${this.selectedFeatures.indexOf(feature) >= 0 ? 'checked' : ''} id="input-select-feature-${index}" part="input-select-feature" name="${feature}"></input><label for="input-select-feature-${index}" class="input-select-feature-label" part="input-sellect-feature-label">${feature}</label>`
4237
+ console.log('rendering features', feature, this.selectedFeatures);
4238
+ html += `<div class="filter-input-container d-flex"><input class="input-select-feature" type="checkbox" ${this.selectedFeatures.indexOf(feature) >= 0 ? 'checked' : ''} id="input-select-feature-${index}" part="input-select-feature" name="${feature}"></input><label for="input-select-feature-${index}" class="input-select-feature-label" part="input-sellect-feature-label">${feature}</label></div>`
4230
4239
  }
4231
- html += '</div>'
4240
+ html += '</div></div>'
4232
4241
  }
4233
4242
  html += '<button id="button-refresh" part="button-duration-title" class="align-center d-flex justify-center"><h4 part="duration-title">' + parametersTitle + '</h4><span part="duration-title-icon" class="material-icons ml-10">refresh</span></button></div>';
4234
4243
  html += '<div class="align-center d-flex flex-wrap align-center mb-10 w-100-m-0" part="last-update-title-container"><h6 part="last-update-title" class="align-center d-flex"><span class="material-symbols-outlined">update</span>&nbsp;&nbsp;Last Updated on ' + this.lastupdated + '</h6></div>';
@@ -4456,11 +4465,11 @@ export class SfIEvents extends LitElement {
4456
4465
  for(var i = 0; i < arrTriggers.length; i++) {
4457
4466
  const targetDates = arrTriggers[i].targetDates;
4458
4467
  for(var j = 0; j < targetDates.length; j++) {
4459
- console.log('comparing', targetDates[j], ddmm);
4468
+ // console.log('comparing', targetDates[j], ddmm);
4460
4469
  if(targetDates[j].indexOf(ddmm) >= 0) {
4461
4470
  remarks = arrTriggers[i].remarks;
4462
4471
  occurrenceDate = arrTriggers[i].occurrenceDate;
4463
- console.log('remarks', mmdd)
4472
+ // console.log('remarks', mmdd)
4464
4473
  }
4465
4474
  }
4466
4475
  }
@@ -6044,25 +6053,49 @@ export class SfIEvents extends LitElement {
6044
6053
  }
6045
6054
  this.renderButtonRefresh(eventsContainer);
6046
6055
  this.attachTimelineFilterHandlers(eventsContainer);
6047
- const selectFeatures = eventsContainer.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
6048
- for(let selectFeature of selectFeatures){
6049
- selectFeature.addEventListener('click',(ev: any) => {
6050
- let target = ev.target;
6051
- let id = target.id;
6052
- let index = id.split('-')[3];
6053
- let selectedFeature = this.getFeatures()[index]
6054
- if(target.checked){
6055
- if(this.selectedFeatures.indexOf(selectedFeature) < 0){
6056
- this.selectedFeatures.push(selectedFeature)
6057
- }
6058
- }else{
6059
- if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
6060
- this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
6056
+ const filterButton = eventsContainer.querySelector('#filter-button') as HTMLButtonElement
6057
+ filterButton?.addEventListener('click',() => {
6058
+ const filterList = eventsContainer.querySelector('#filter-list-container') as HTMLDivElement
6059
+ filterList.style.display = (filterList.style.display != 'block' ? 'block' : 'none')
6060
+ const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
6061
+ for(let selectFeature of selectFeatures){
6062
+ selectFeature.addEventListener('click',(ev: any) => {
6063
+ let target = ev.target;
6064
+ let id = target.id;
6065
+ let index = id.split('-')[3];
6066
+ let selectedFeature = this.getFeatures()[index]
6067
+ if(target.checked){
6068
+ if(this.selectedFeatures.indexOf(selectedFeature) < 0){
6069
+ this.selectedFeatures.push(selectedFeature)
6070
+ }
6071
+ }else{
6072
+ if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
6073
+ this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
6074
+ }
6061
6075
  }
6062
- }
6063
- this.processDateSelection(eventsContainer)
6064
- })
6065
- }
6076
+ this.processDateSelection(eventsContainer)
6077
+ })
6078
+ }
6079
+ })
6080
+ // const selectFeatures = eventsContainer.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
6081
+ // for(let selectFeature of selectFeatures){
6082
+ // selectFeature.addEventListener('click',(ev: any) => {
6083
+ // let target = ev.target;
6084
+ // let id = target.id;
6085
+ // let index = id.split('-')[3];
6086
+ // let selectedFeature = this.getFeatures()[index]
6087
+ // if(target.checked){
6088
+ // if(this.selectedFeatures.indexOf(selectedFeature) < 0){
6089
+ // this.selectedFeatures.push(selectedFeature)
6090
+ // }
6091
+ // }else{
6092
+ // if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
6093
+ // this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
6094
+ // }
6095
+ // }
6096
+ // this.processDateSelection(eventsContainer)
6097
+ // })
6098
+ // }
6066
6099
  const radioExpander = eventsContainer.querySelector('#graph-radios-expander') as HTMLButtonElement;
6067
6100
  radioExpander?.addEventListener('click', (e: any) => {
6068
6101
 
@@ -9720,29 +9753,66 @@ export class SfIEvents extends LitElement {
9720
9753
 
9721
9754
  (this._SfThisContainer as HTMLDivElement).innerHTML = html;
9722
9755
  this.renderButtonRefresh((this._SfThisContainer as HTMLDivElement));
9723
- const selectFeatures = (this._SfThisContainer as HTMLDivElement).querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
9724
- for(let selectFeature of selectFeatures){
9725
- selectFeature.addEventListener('click',async (ev: any) => {
9756
+ const filterButton = (this._SfThisContainer as HTMLDivElement).querySelector('#filter-button') as HTMLButtonElement
9757
+ filterButton?.addEventListener('click',() => {
9758
+ const filterList = (this._SfThisContainer as HTMLDivElement).querySelector('#filter-list-container') as HTMLDivElement
9759
+ filterList.style.display = (filterList.style.display != 'block' ? 'block' : 'none')
9760
+ const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
9761
+ selectFeatureAll.addEventListener('click',async(ev: any) => {
9726
9762
  let target = ev.target;
9727
- let id = target.id;
9728
- let i = id.split('-')[3];
9729
- let selectedFeature = this.getFeatures()[i]
9730
9763
  if(target.checked){
9731
- if(this.selectedFeatures.indexOf(selectedFeature) < 0){
9732
- this.selectedFeatures.push(selectedFeature)
9764
+ for(let feature of this.getFeatures()){
9765
+ if(this.selectedFeatures.indexOf(feature) < 0){
9766
+ this.selectedFeatures.push(feature);
9767
+ }
9733
9768
  }
9734
9769
  }else{
9735
- if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
9736
- this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
9737
- }
9770
+ this.selectedFeatures = []
9738
9771
  }
9739
- this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
9772
+ const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
9773
+ for(let selectFeature of selectFeatures){
9774
+ let id = selectFeature.id;
9775
+ let i = id.split('-')[3];
9776
+ let selectedFeature = this.getFeatures()[parseInt(i)]
9777
+ selectFeature.checked = this.selectedFeatures.indexOf(selectedFeature) >= 0
9778
+ }
9779
+ const dateResult = this.calculateStartAndEndDateOfStream(index);
9780
+ console.log('dateresult', dateResult, index);
9781
+ console.log('selectedfeatures', this.selectedFeatures);
9740
9782
  this.currentColumnIndex = index + "";
9741
- const dateResult = this.calculateStartAndEndDateOfThis(index);
9742
- await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
9743
- this.renderThis(index);
9783
+ if(dateResult != null) {
9784
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
9785
+ }
9786
+ this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
9787
+ this.renderStream(index);
9744
9788
  })
9745
- }
9789
+ const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
9790
+ for(let selectFeature of selectFeatures){
9791
+ selectFeature.addEventListener('click',async (ev: any) => {
9792
+ let target = ev.target;
9793
+ let id = target.id;
9794
+ let i = id.split('-')[3];
9795
+ let selectedFeature = this.getFeatures()[i]
9796
+ if(target.checked){
9797
+ if(this.selectedFeatures.indexOf(selectedFeature) < 0){
9798
+ this.selectedFeatures.push(selectedFeature)
9799
+ }
9800
+ }else{
9801
+ if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
9802
+ this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
9803
+ }
9804
+ }
9805
+ const dateResult = this.calculateStartAndEndDateOfStream(index);
9806
+ this.currentColumnIndex = index + "";
9807
+ if(dateResult != null) {
9808
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
9809
+ }
9810
+ this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
9811
+ this.renderStream(index);
9812
+
9813
+ })
9814
+ }
9815
+ })
9746
9816
  const radioExpander = (this._SfThisContainer as HTMLDivElement).querySelector('#graph-radios-expander') as HTMLButtonElement;
9747
9817
  radioExpander?.addEventListener('click', (e: any) => {
9748
9818
 
@@ -10182,36 +10252,71 @@ export class SfIEvents extends LitElement {
10182
10252
  (this._SfStreamContainer as HTMLDivElement).innerHTML = html;
10183
10253
  this.renderButtonRefresh((this._SfStreamContainer as HTMLDivElement));
10184
10254
  this.attachTimelineFilterHandlers((this._SfStreamContainer as HTMLDivElement));
10185
-
10186
- const selectFeatures = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
10187
- for(let selectFeature of selectFeatures){
10188
- selectFeature.addEventListener('click',async (ev: any) => {
10255
+ const filterButton = (this._SfStreamContainer as HTMLDivElement).querySelector('#filter-button') as HTMLButtonElement
10256
+ filterButton?.addEventListener('click',() => {
10257
+ const filterList = (this._SfStreamContainer as HTMLDivElement).querySelector('#filter-list-container') as HTMLDivElement
10258
+ filterList.style.display = (filterList.style.display != 'block' ? 'block' : 'none')
10259
+ const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
10260
+ selectFeatureAll.addEventListener('click',async(ev: any) => {
10189
10261
  let target = ev.target;
10190
- let id = target.id;
10191
- let i = id.split('-')[3];
10192
- let selectedFeature = this.getFeatures()[i]
10193
10262
  if(target.checked){
10194
- if(this.selectedFeatures.indexOf(selectedFeature) < 0){
10195
- this.selectedFeatures.push(selectedFeature)
10263
+ for(let feature of this.getFeatures()){
10264
+ if(this.selectedFeatures.indexOf(feature) < 0){
10265
+ this.selectedFeatures.push(feature);
10266
+ }
10196
10267
  }
10197
10268
  }else{
10198
- if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
10199
- this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
10200
- }
10269
+ this.selectedFeatures = []
10270
+ }
10271
+ const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
10272
+ for(let selectFeature of selectFeatures){
10273
+ let id = selectFeature.id;
10274
+ let i = id.split('-')[3];
10275
+ let selectedFeature = this.getFeatures()[parseInt(i)]
10276
+ selectFeature.checked = this.selectedFeatures.indexOf(selectedFeature) >= 0
10201
10277
  }
10202
10278
  const dateResult = this.calculateStartAndEndDateOfStream(index);
10203
10279
  const monthResult = this.calculateMonthFromIndex(index);
10204
10280
  console.log('monthResult', monthResult);
10205
- console.log('dateresult', dateResult);
10281
+ console.log('dateresult', dateResult, index);
10282
+ console.log('selectedfeatures', this.selectedFeatures);
10206
10283
  this.currentColumnIndex = index + "";
10207
10284
  if(dateResult != null) {
10208
- await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10285
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","no",("0" + monthResult).slice(-2));
10209
10286
  }
10210
10287
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10211
10288
  this.renderStream(index);
10212
10289
  })
10213
- }
10214
-
10290
+ const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
10291
+ for(let selectFeature of selectFeatures){
10292
+ selectFeature.addEventListener('click',async (ev: any) => {
10293
+ let target = ev.target;
10294
+ let id = target.id;
10295
+ let i = id.split('-')[3];
10296
+ let selectedFeature = this.getFeatures()[i]
10297
+ if(target.checked){
10298
+ if(this.selectedFeatures.indexOf(selectedFeature) < 0){
10299
+ this.selectedFeatures.push(selectedFeature)
10300
+ }
10301
+ }else{
10302
+ if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
10303
+ this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
10304
+ }
10305
+ }
10306
+ const dateResult = this.calculateStartAndEndDateOfStream(index);
10307
+ const monthResult = this.calculateMonthFromIndex(index);
10308
+ this.currentColumnIndex = index + "";
10309
+ console.log('rendering feature', monthResult, dateResult);
10310
+ if(dateResult != null) {
10311
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","no",("0" + monthResult).slice(-2));
10312
+ }
10313
+ this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10314
+ this.renderStream(index);
10315
+
10316
+ })
10317
+ }
10318
+ })
10319
+
10215
10320
  const radioExpander = (this._SfStreamContainer as HTMLDivElement).querySelector('#graph-radios-expander') as HTMLButtonElement;
10216
10321
  radioExpander?.addEventListener('click', (e: any) => {
10217
10322
 
@@ -10526,7 +10631,7 @@ export class SfIEvents extends LitElement {
10526
10631
  }
10527
10632
 
10528
10633
  if(showGraph) {
10529
-
10634
+ console.log('showing graph', showGraph)
10530
10635
  switch (this.flowGraph) {
10531
10636
  case this.FLOW_GRAPH_COMPLETENESS:
10532
10637
  this.renderCompletenessGraph((this._SfStreamContainer as HTMLDivElement));
@@ -23187,6 +23292,15 @@ export class SfIEvents extends LitElement {
23187
23292
 
23188
23293
  }
23189
23294
 
23295
+ renderWithFeatures = async(startDate: string = "", endDate: string = "", searchString: string = "", list: string = "yes", month: string = "00") => {
23296
+ this.events = []
23297
+ console.log('rendering and fetching', startDate, endDate, searchString, list, month)
23298
+ if(this.selectedFeatures.indexOf('compliances') >= 0){
23299
+ this.fetchAndYearlyRenderUserCalendar_2(startDate, endDate, searchString, list, month)
23300
+ }else if(this.selectedFeatures.indexOf('notices') >= 0){
23301
+ this.fetchAndRenderNotices(startDate, endDate, searchString, list, month);
23302
+ }
23303
+ }
23190
23304
  fetchAndYearlyRenderUserCalendar_2 = async(startDate: string = "", endDate: string = "", searchString: string = "", list: string = "yes", month: string = "00") => {
23191
23305
 
23192
23306
  let path = "", view = "";
@@ -23239,6 +23353,7 @@ export class SfIEvents extends LitElement {
23239
23353
  this.events = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
23240
23354
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
23241
23355
  this.lastupdated = new Date().toLocaleDateString('en-IN') + " - " + new Date().toLocaleTimeString('en-IN')
23356
+ console.log('rendering appropriate string', list);
23242
23357
  this.renderAppropriateStream(startDate, endDate, list == "no");
23243
23358
  this.fetchBulkReportingData();
23244
23359
  if(this.selectedFeatures.indexOf('notices') >= 0){
@@ -24955,7 +25070,7 @@ export class SfIEvents extends LitElement {
24955
25070
  if(tempRole != "") {
24956
25071
  this._SfRoleTabContainer.innerHTML = '';
24957
25072
  }
24958
-
25073
+ this.selectedFeatures = this.getFeatures()
24959
25074
  //console.log('stream received', this.stream, this.TAB_STREAM, this.TAB_YEAR);
24960
25075
 
24961
25076
  if(this.stream == this.TAB_YEAR) {