sf-i-events 1.0.670 → 1.0.672
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 +107 -24
- package/src/sf-i-events.ts +117 -30
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -5325,8 +5325,46 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5325
5325
|
// this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + ((new Date()).getFullYear() + ""));
|
|
5326
5326
|
});
|
|
5327
5327
|
}
|
|
5328
|
-
if (showGraph)
|
|
5329
|
-
|
|
5328
|
+
if (showGraph) {
|
|
5329
|
+
switch (this.flowGraph) {
|
|
5330
|
+
case this.FLOW_GRAPH_COMPLETENESS:
|
|
5331
|
+
this.renderCompletenessGraph(this._SfThisContainer);
|
|
5332
|
+
break;
|
|
5333
|
+
case this.FLOW_GRAPH_TIMELINESS:
|
|
5334
|
+
this.renderTimelinessGraph(this._SfThisContainer);
|
|
5335
|
+
break;
|
|
5336
|
+
case this.FLOW_GRAPH_COMPLIANCE:
|
|
5337
|
+
this.renderComplianceGraph(this._SfThisContainer);
|
|
5338
|
+
break;
|
|
5339
|
+
case this.FLOW_GRAPH_RISKAREAS:
|
|
5340
|
+
this.renderRiskGraph(this._SfThisContainer);
|
|
5341
|
+
break;
|
|
5342
|
+
case this.FLOW_GRAPH_RISKSEVERITY:
|
|
5343
|
+
this.renderRiskSeverityGraph(this._SfThisContainer);
|
|
5344
|
+
break;
|
|
5345
|
+
case this.FLOW_GRAPH_LOCATION:
|
|
5346
|
+
this.renderLocationGraph(this._SfThisContainer);
|
|
5347
|
+
break;
|
|
5348
|
+
case this.FLOW_GRAPH_FUNCTION:
|
|
5349
|
+
this.renderFunctionGraph(this._SfThisContainer);
|
|
5350
|
+
break;
|
|
5351
|
+
case this.FLOW_GRAPH_OBLIGATIONTYPE:
|
|
5352
|
+
this.renderObligationTypeGraph(this._SfThisContainer);
|
|
5353
|
+
break;
|
|
5354
|
+
case this.FLOW_GRAPH_JURISDICTION:
|
|
5355
|
+
this.renderJurisdictionGraph(this._SfThisContainer);
|
|
5356
|
+
break;
|
|
5357
|
+
case this.FLOW_GRAPH_FREQUENCY:
|
|
5358
|
+
this.renderFrequencyGraph(this._SfThisContainer);
|
|
5359
|
+
break;
|
|
5360
|
+
case this.FLOW_GRAPH_SUBCATEGORY:
|
|
5361
|
+
this.renderSubcategoryGraph(this._SfThisContainer);
|
|
5362
|
+
break;
|
|
5363
|
+
default:
|
|
5364
|
+
this.renderCompletenessGraph(this._SfThisContainer);
|
|
5365
|
+
break;
|
|
5366
|
+
}
|
|
5367
|
+
}
|
|
5330
5368
|
};
|
|
5331
5369
|
this.renderStream = (index = 0, showGraph = true) => {
|
|
5332
5370
|
//console.log('flowgraph renderStream', this.flowGraph);
|
|
@@ -5556,8 +5594,46 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5556
5594
|
// this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + ((new Date()).getFullYear() + ""));
|
|
5557
5595
|
});
|
|
5558
5596
|
}
|
|
5559
|
-
if (showGraph)
|
|
5560
|
-
|
|
5597
|
+
if (showGraph) {
|
|
5598
|
+
switch (this.flowGraph) {
|
|
5599
|
+
case this.FLOW_GRAPH_COMPLETENESS:
|
|
5600
|
+
this.renderCompletenessGraph(this._SfStreamContainer);
|
|
5601
|
+
break;
|
|
5602
|
+
case this.FLOW_GRAPH_TIMELINESS:
|
|
5603
|
+
this.renderTimelinessGraph(this._SfStreamContainer);
|
|
5604
|
+
break;
|
|
5605
|
+
case this.FLOW_GRAPH_COMPLIANCE:
|
|
5606
|
+
this.renderComplianceGraph(this._SfStreamContainer);
|
|
5607
|
+
break;
|
|
5608
|
+
case this.FLOW_GRAPH_RISKAREAS:
|
|
5609
|
+
this.renderRiskGraph(this._SfStreamContainer);
|
|
5610
|
+
break;
|
|
5611
|
+
case this.FLOW_GRAPH_RISKSEVERITY:
|
|
5612
|
+
this.renderRiskSeverityGraph(this._SfStreamContainer);
|
|
5613
|
+
break;
|
|
5614
|
+
case this.FLOW_GRAPH_LOCATION:
|
|
5615
|
+
this.renderLocationGraph(this._SfStreamContainer);
|
|
5616
|
+
break;
|
|
5617
|
+
case this.FLOW_GRAPH_FUNCTION:
|
|
5618
|
+
this.renderFunctionGraph(this._SfStreamContainer);
|
|
5619
|
+
break;
|
|
5620
|
+
case this.FLOW_GRAPH_OBLIGATIONTYPE:
|
|
5621
|
+
this.renderObligationTypeGraph(this._SfStreamContainer);
|
|
5622
|
+
break;
|
|
5623
|
+
case this.FLOW_GRAPH_JURISDICTION:
|
|
5624
|
+
this.renderJurisdictionGraph(this._SfStreamContainer);
|
|
5625
|
+
break;
|
|
5626
|
+
case this.FLOW_GRAPH_FREQUENCY:
|
|
5627
|
+
this.renderFrequencyGraph(this._SfStreamContainer);
|
|
5628
|
+
break;
|
|
5629
|
+
case this.FLOW_GRAPH_SUBCATEGORY:
|
|
5630
|
+
this.renderSubcategoryGraph(this._SfStreamContainer);
|
|
5631
|
+
break;
|
|
5632
|
+
default:
|
|
5633
|
+
this.renderCompletenessGraph(this._SfStreamContainer);
|
|
5634
|
+
break;
|
|
5635
|
+
}
|
|
5636
|
+
}
|
|
5561
5637
|
};
|
|
5562
5638
|
this.attachTimelineFilterHandlers = (divContainer) => {
|
|
5563
5639
|
const divs = divContainer.querySelectorAll('.chip');
|
|
@@ -5607,7 +5683,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5607
5683
|
}
|
|
5608
5684
|
};
|
|
5609
5685
|
this.clearGraphData = () => {
|
|
5610
|
-
|
|
5686
|
+
console.log('this.chart2 clearing graph data');
|
|
5611
5687
|
this.chart = null;
|
|
5612
5688
|
this.chart2 = null;
|
|
5613
5689
|
this.chart3 = null;
|
|
@@ -10224,25 +10300,30 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10224
10300
|
a2.click();
|
|
10225
10301
|
}
|
|
10226
10302
|
if (radioImage.checked) {
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10303
|
+
const a = document.createElement('a');
|
|
10304
|
+
a.setAttribute('href', this.chartBase64);
|
|
10305
|
+
a.setAttribute('download', 'download_' + new Date().getTime() + '.png');
|
|
10306
|
+
a.click();
|
|
10307
|
+
console.log('this.chart2', (this.chart2Base64));
|
|
10308
|
+
if (this.chart2Base64 != null) {
|
|
10309
|
+
console.log('this.chart2 download', this.chart2Base64);
|
|
10310
|
+
const a2 = document.createElement('a');
|
|
10311
|
+
a2.setAttribute('href', this.chart2Base64);
|
|
10312
|
+
a2.setAttribute('download', 'download_completeness_' + new Date().getTime() + '.png');
|
|
10313
|
+
a2.click();
|
|
10314
|
+
}
|
|
10315
|
+
if (this.chart3Base64 != null) {
|
|
10316
|
+
const a3 = document.createElement('a');
|
|
10317
|
+
a3.setAttribute('href', this.chart3Base64);
|
|
10318
|
+
a3.setAttribute('download', 'download_timeliness_' + new Date().getTime() + '.png');
|
|
10319
|
+
a3.click();
|
|
10320
|
+
}
|
|
10321
|
+
if (this.chart4Base64 != null) {
|
|
10322
|
+
const a4 = document.createElement('a');
|
|
10323
|
+
a4.setAttribute('href', this.chart4Base64);
|
|
10324
|
+
a4.setAttribute('download', 'download_compliance_' + new Date().getTime() + '.png');
|
|
10325
|
+
a4.click();
|
|
10326
|
+
}
|
|
10246
10327
|
}
|
|
10247
10328
|
if (radioStats.checked) {
|
|
10248
10329
|
const ts = new Date().getTime();
|
|
@@ -10898,6 +10979,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10898
10979
|
}
|
|
10899
10980
|
}
|
|
10900
10981
|
}
|
|
10982
|
+
this.chart4Base64 = this.chart4.toBase64Image();
|
|
10901
10983
|
}
|
|
10902
10984
|
},
|
|
10903
10985
|
scales: {
|
|
@@ -11332,6 +11414,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11332
11414
|
});
|
|
11333
11415
|
//console.log('canvas parent node', this.chart2.canvas.parentNode);
|
|
11334
11416
|
this.chart2.canvas.parentNode.style.height = (parseInt(data.labels.length) * 90 + 40) + 'px';
|
|
11417
|
+
console.log('this.chart2 rendered', this.chart2);
|
|
11335
11418
|
};
|
|
11336
11419
|
this.renderChart = (ctx, type, data, title) => {
|
|
11337
11420
|
//console.log('rendering chart', this.chart);
|
package/src/sf-i-events.ts
CHANGED
|
@@ -4587,10 +4587,11 @@ export class SfIEvents extends LitElement {
|
|
|
4587
4587
|
this.eventsInWindow = [];
|
|
4588
4588
|
|
|
4589
4589
|
var lastDay = iLast;
|
|
4590
|
-
|
|
4590
|
+
|
|
4591
4591
|
this.clearGraphData();
|
|
4592
4592
|
this.clearSelectedGraphParam();
|
|
4593
4593
|
this.clearSelectedLegend();
|
|
4594
|
+
|
|
4594
4595
|
|
|
4595
4596
|
html += this.renderCalendarGraphs(showGraph);
|
|
4596
4597
|
html += this.renderCalendarContainerDivStart(index)
|
|
@@ -7868,7 +7869,7 @@ export class SfIEvents extends LitElement {
|
|
|
7868
7869
|
}
|
|
7869
7870
|
|
|
7870
7871
|
renderThis = (index: number = 1, showGraph: boolean = true) => {
|
|
7871
|
-
|
|
7872
|
+
|
|
7872
7873
|
this.clearGraphData();
|
|
7873
7874
|
this.clearSelectedGraphParam();
|
|
7874
7875
|
this.clearSelectedLegend();
|
|
@@ -8189,7 +8190,48 @@ export class SfIEvents extends LitElement {
|
|
|
8189
8190
|
}
|
|
8190
8191
|
|
|
8191
8192
|
|
|
8192
|
-
if(showGraph)
|
|
8193
|
+
if(showGraph) {
|
|
8194
|
+
switch (this.flowGraph) {
|
|
8195
|
+
case this.FLOW_GRAPH_COMPLETENESS:
|
|
8196
|
+
this.renderCompletenessGraph((this._SfThisContainer as HTMLDivElement));
|
|
8197
|
+
break;
|
|
8198
|
+
case this.FLOW_GRAPH_TIMELINESS:
|
|
8199
|
+
this.renderTimelinessGraph((this._SfThisContainer as HTMLDivElement));
|
|
8200
|
+
break;
|
|
8201
|
+
case this.FLOW_GRAPH_COMPLIANCE:
|
|
8202
|
+
this.renderComplianceGraph((this._SfThisContainer as HTMLDivElement));
|
|
8203
|
+
break;
|
|
8204
|
+
case this.FLOW_GRAPH_RISKAREAS:
|
|
8205
|
+
this.renderRiskGraph((this._SfThisContainer as HTMLDivElement));
|
|
8206
|
+
break;
|
|
8207
|
+
case this.FLOW_GRAPH_RISKSEVERITY:
|
|
8208
|
+
this.renderRiskSeverityGraph((this._SfThisContainer as HTMLDivElement));
|
|
8209
|
+
break;
|
|
8210
|
+
case this.FLOW_GRAPH_LOCATION:
|
|
8211
|
+
this.renderLocationGraph((this._SfThisContainer as HTMLDivElement));
|
|
8212
|
+
break;
|
|
8213
|
+
case this.FLOW_GRAPH_FUNCTION:
|
|
8214
|
+
this.renderFunctionGraph((this._SfThisContainer as HTMLDivElement));
|
|
8215
|
+
break;
|
|
8216
|
+
case this.FLOW_GRAPH_OBLIGATIONTYPE:
|
|
8217
|
+
this.renderObligationTypeGraph((this._SfThisContainer as HTMLDivElement));
|
|
8218
|
+
break;
|
|
8219
|
+
case this.FLOW_GRAPH_JURISDICTION:
|
|
8220
|
+
this.renderJurisdictionGraph((this._SfThisContainer as HTMLDivElement));
|
|
8221
|
+
break;
|
|
8222
|
+
case this.FLOW_GRAPH_FREQUENCY:
|
|
8223
|
+
this.renderFrequencyGraph((this._SfThisContainer as HTMLDivElement));
|
|
8224
|
+
break;
|
|
8225
|
+
case this.FLOW_GRAPH_SUBCATEGORY:
|
|
8226
|
+
this.renderSubcategoryGraph((this._SfThisContainer as HTMLDivElement));
|
|
8227
|
+
break;
|
|
8228
|
+
|
|
8229
|
+
default:
|
|
8230
|
+
this.renderCompletenessGraph((this._SfThisContainer as HTMLDivElement));
|
|
8231
|
+
break;
|
|
8232
|
+
}
|
|
8233
|
+
|
|
8234
|
+
}
|
|
8193
8235
|
|
|
8194
8236
|
}
|
|
8195
8237
|
|
|
@@ -8197,10 +8239,11 @@ export class SfIEvents extends LitElement {
|
|
|
8197
8239
|
//console.log('flowgraph renderStream', this.flowGraph);
|
|
8198
8240
|
|
|
8199
8241
|
this.streamIndex = index;
|
|
8200
|
-
|
|
8242
|
+
|
|
8201
8243
|
this.clearGraphData();
|
|
8202
8244
|
this.clearSelectedGraphParam();
|
|
8203
8245
|
this.clearSelectedLegend();
|
|
8246
|
+
|
|
8204
8247
|
|
|
8205
8248
|
var startDate = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
|
|
8206
8249
|
|
|
@@ -8519,7 +8562,48 @@ export class SfIEvents extends LitElement {
|
|
|
8519
8562
|
|
|
8520
8563
|
}
|
|
8521
8564
|
|
|
8522
|
-
if(showGraph)
|
|
8565
|
+
if(showGraph) {
|
|
8566
|
+
|
|
8567
|
+
switch (this.flowGraph) {
|
|
8568
|
+
case this.FLOW_GRAPH_COMPLETENESS:
|
|
8569
|
+
this.renderCompletenessGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8570
|
+
break;
|
|
8571
|
+
case this.FLOW_GRAPH_TIMELINESS:
|
|
8572
|
+
this.renderTimelinessGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8573
|
+
break;
|
|
8574
|
+
case this.FLOW_GRAPH_COMPLIANCE:
|
|
8575
|
+
this.renderComplianceGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8576
|
+
break;
|
|
8577
|
+
case this.FLOW_GRAPH_RISKAREAS:
|
|
8578
|
+
this.renderRiskGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8579
|
+
break;
|
|
8580
|
+
case this.FLOW_GRAPH_RISKSEVERITY:
|
|
8581
|
+
this.renderRiskSeverityGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8582
|
+
break;
|
|
8583
|
+
case this.FLOW_GRAPH_LOCATION:
|
|
8584
|
+
this.renderLocationGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8585
|
+
break;
|
|
8586
|
+
case this.FLOW_GRAPH_FUNCTION:
|
|
8587
|
+
this.renderFunctionGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8588
|
+
break;
|
|
8589
|
+
case this.FLOW_GRAPH_OBLIGATIONTYPE:
|
|
8590
|
+
this.renderObligationTypeGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8591
|
+
break;
|
|
8592
|
+
case this.FLOW_GRAPH_JURISDICTION:
|
|
8593
|
+
this.renderJurisdictionGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8594
|
+
break;
|
|
8595
|
+
case this.FLOW_GRAPH_FREQUENCY:
|
|
8596
|
+
this.renderFrequencyGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8597
|
+
break;
|
|
8598
|
+
case this.FLOW_GRAPH_SUBCATEGORY:
|
|
8599
|
+
this.renderSubcategoryGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8600
|
+
break;
|
|
8601
|
+
|
|
8602
|
+
default:
|
|
8603
|
+
this.renderCompletenessGraph((this._SfStreamContainer as HTMLDivElement));
|
|
8604
|
+
break;
|
|
8605
|
+
}
|
|
8606
|
+
}
|
|
8523
8607
|
|
|
8524
8608
|
}
|
|
8525
8609
|
|
|
@@ -8588,7 +8672,7 @@ export class SfIEvents extends LitElement {
|
|
|
8588
8672
|
}
|
|
8589
8673
|
|
|
8590
8674
|
clearGraphData = () => {
|
|
8591
|
-
|
|
8675
|
+
console.log('this.chart2 clearing graph data');
|
|
8592
8676
|
this.chart = null;
|
|
8593
8677
|
this.chart2 = null;
|
|
8594
8678
|
this.chart3 = null;
|
|
@@ -14743,7 +14827,7 @@ export class SfIEvents extends LitElement {
|
|
|
14743
14827
|
});
|
|
14744
14828
|
|
|
14745
14829
|
container.querySelector('#button-download-stats')?.addEventListener('click', async () => {
|
|
14746
|
-
await this.fetchAndYearlyRenderUserCalendar_2(this.sdate, this.edate,"", "no")
|
|
14830
|
+
await this.fetchAndYearlyRenderUserCalendar_2(this.sdate, this.edate,"", "no");
|
|
14747
14831
|
const radioCsv = (container.querySelector('#radio-csv') as HTMLInputElement);
|
|
14748
14832
|
const radioImage = (container.querySelector('#radio-image') as HTMLInputElement);
|
|
14749
14833
|
const radioStats = (container.querySelector('#radio-stats') as HTMLInputElement);
|
|
@@ -14767,29 +14851,32 @@ export class SfIEvents extends LitElement {
|
|
|
14767
14851
|
}
|
|
14768
14852
|
|
|
14769
14853
|
if(radioImage.checked) {
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
}
|
|
14854
|
+
const a = document.createElement('a')
|
|
14855
|
+
a.setAttribute('href', this.chartBase64)
|
|
14856
|
+
a.setAttribute('download', 'download_'+new Date().getTime()+'.png');
|
|
14857
|
+
a.click()
|
|
14858
|
+
console.log('this.chart2', (this.chart2Base64));
|
|
14859
|
+
if(this.chart2Base64 != null) {
|
|
14860
|
+
console.log('this.chart2 download', this.chart2Base64);
|
|
14861
|
+
const a2 = document.createElement('a')
|
|
14862
|
+
a2.setAttribute('href', this.chart2Base64)
|
|
14863
|
+
a2.setAttribute('download', 'download_completeness_'+new Date().getTime()+'.png');
|
|
14864
|
+
a2.click()
|
|
14865
|
+
}
|
|
14783
14866
|
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
}, 1000)
|
|
14791
|
-
|
|
14867
|
+
if(this.chart3Base64 != null) {
|
|
14868
|
+
const a3 = document.createElement('a')
|
|
14869
|
+
a3.setAttribute('href', this.chart3Base64)
|
|
14870
|
+
a3.setAttribute('download', 'download_timeliness_'+new Date().getTime()+'.png');
|
|
14871
|
+
a3.click()
|
|
14872
|
+
}
|
|
14792
14873
|
|
|
14874
|
+
if(this.chart4Base64 != null) {
|
|
14875
|
+
const a4 = document.createElement('a')
|
|
14876
|
+
a4.setAttribute('href', this.chart4Base64)
|
|
14877
|
+
a4.setAttribute('download', 'download_compliance_'+new Date().getTime()+'.png');
|
|
14878
|
+
a4.click()
|
|
14879
|
+
}
|
|
14793
14880
|
}
|
|
14794
14881
|
|
|
14795
14882
|
if(radioStats.checked) {
|
|
@@ -15592,7 +15679,7 @@ export class SfIEvents extends LitElement {
|
|
|
15592
15679
|
|
|
15593
15680
|
|
|
15594
15681
|
}
|
|
15595
|
-
|
|
15682
|
+
this.chart4Base64 = (this.chart4 as Chart).toBase64Image()
|
|
15596
15683
|
}
|
|
15597
15684
|
},
|
|
15598
15685
|
scales: {
|
|
@@ -16079,7 +16166,7 @@ export class SfIEvents extends LitElement {
|
|
|
16079
16166
|
|
|
16080
16167
|
//console.log('canvas parent node', this.chart2.canvas.parentNode);
|
|
16081
16168
|
this.chart2.canvas.parentNode.style.height = (parseInt(data.labels.length)*90 + 40) + 'px';
|
|
16082
|
-
|
|
16169
|
+
console.log('this.chart2 rendered', (this.chart2 as Chart));
|
|
16083
16170
|
}
|
|
16084
16171
|
|
|
16085
16172
|
renderChart = (ctx: any, type: any, data: any, title: string) => {
|