sf-i-events 1.0.734 → 1.0.735
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.d.ts +1 -1
- package/sf-i-events.js +40 -47
- package/src/sf-i-events.ts +39 -47
- package/src/util.ts +8 -1
- package/util.d.ts +2 -0
- package/util.js +7 -1
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -441,7 +441,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
441
441
|
getApproverStringFromEvent: (event: any) => string;
|
|
442
442
|
getApproverDetailStringFromEvent: (event: any) => string;
|
|
443
443
|
renderLatestCompliance: (mmddyyyy: string, event: any) => any;
|
|
444
|
-
getCompletenessStatus: (event: any) => "
|
|
444
|
+
getCompletenessStatus: (event: any) => "not-started" | "pending-approval" | "rejected" | "approved";
|
|
445
445
|
getTimelinessStatus: (mmdd: string, event: any, completeness: string) => "late-executed" | "late-reported" | "late-approved" | "past-due-date" | "in-time";
|
|
446
446
|
getComplianceStatus: (completeness: string, timeliness: string) => "scheduled" | "not-complied" | "partially-complied" | "complied";
|
|
447
447
|
numcalled: number;
|
package/sf-i-events.js
CHANGED
|
@@ -4098,22 +4098,24 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4098
4098
|
let inputLabelFilter = eventsContainer.querySelector('#input-label-filter');
|
|
4099
4099
|
selectFilterCriteria.style.display = 'block';
|
|
4100
4100
|
inputLabelFilter.style.display = 'block';
|
|
4101
|
-
// let selectedCriteria = ""
|
|
4102
4101
|
selectFilterCriteria.innerHTML = "";
|
|
4103
4102
|
let option = new Option();
|
|
4104
4103
|
option.value = "";
|
|
4105
|
-
option.innerHTML = "
|
|
4104
|
+
option.innerHTML = "all";
|
|
4106
4105
|
selectFilterCriteria.add(option);
|
|
4107
4106
|
for (let criteria of Object.keys(this.statisticsMeta)) {
|
|
4108
|
-
// if(i == 0){
|
|
4109
|
-
// selectedCriteria = criteria
|
|
4110
|
-
// }
|
|
4111
4107
|
let option = new Option();
|
|
4112
4108
|
option.value = criteria;
|
|
4113
|
-
|
|
4109
|
+
if (criteria == "reporter" || criteria == "approver" || criteria == "functionhead") {
|
|
4110
|
+
option.innerHTML = "user:" + criteria;
|
|
4111
|
+
}
|
|
4112
|
+
else {
|
|
4113
|
+
option.innerHTML = criteria;
|
|
4114
|
+
}
|
|
4114
4115
|
selectFilterCriteria.add(option);
|
|
4115
4116
|
}
|
|
4116
|
-
|
|
4117
|
+
let selectFilterCriteriaNew = Util.clearListeners(selectFilterCriteria);
|
|
4118
|
+
selectFilterCriteriaNew.addEventListener('change', (ev) => {
|
|
4117
4119
|
let target = ev.target;
|
|
4118
4120
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria');
|
|
4119
4121
|
let selectFilterValues = eventsContainer.querySelector('#select-filter-values');
|
|
@@ -4127,16 +4129,18 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4127
4129
|
option.innerHTML = "All";
|
|
4128
4130
|
selectFilterValues.add(option);
|
|
4129
4131
|
if (this.statisticsMeta[target.value] != null) {
|
|
4132
|
+
let sortedFilters = Util.alphabeticalSort(this.statisticsMeta[target.value]);
|
|
4130
4133
|
selectFilterValues.style.display = 'block';
|
|
4131
4134
|
inputLabelCriteria.style.display = 'block';
|
|
4132
|
-
inputLabelCriteria.innerHTML =
|
|
4133
|
-
for (let filter of
|
|
4135
|
+
inputLabelCriteria.innerHTML = target.value;
|
|
4136
|
+
for (let filter of sortedFilters) {
|
|
4134
4137
|
let option = new Option();
|
|
4135
4138
|
option.value = filter.split(';')[1];
|
|
4136
|
-
option.innerHTML =
|
|
4139
|
+
option.innerHTML = filter.split(';')[0].replace(/\([^)]*\)/g, "");
|
|
4137
4140
|
selectFilterValues.add(option);
|
|
4138
4141
|
}
|
|
4139
|
-
|
|
4142
|
+
let selectFilterValuesNew = Util.clearListeners(selectFilterValues);
|
|
4143
|
+
selectFilterValuesNew.addEventListener('change', () => {
|
|
4140
4144
|
console.log('changed');
|
|
4141
4145
|
this.processDateSelectionViewer(eventsContainer);
|
|
4142
4146
|
});
|
|
@@ -4150,24 +4154,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4150
4154
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria');
|
|
4151
4155
|
selectFilterValues.style.display = 'none';
|
|
4152
4156
|
inputLabelCriteria.style.display = 'none';
|
|
4153
|
-
// inputLabelCriteria.innerHTML = selectedCriteria
|
|
4154
|
-
// selectFilterValues.innerHTML = ""
|
|
4155
|
-
// option = new Option()
|
|
4156
|
-
// option.value = "";
|
|
4157
|
-
// option.innerHTML = "All"
|
|
4158
|
-
// selectFilterValues.add(option)
|
|
4159
|
-
// if(this.statisticsMeta[selectedCriteria] != null){
|
|
4160
|
-
// for(let filter of this.statisticsMeta[selectedCriteria]){
|
|
4161
|
-
// let option = new Option()
|
|
4162
|
-
// option.value = filter.split(';')[1];
|
|
4163
|
-
// option.innerHTML = Util.titleCase(filter.split(';')[0]).replace(/\([^)]*\)/g,"")
|
|
4164
|
-
// selectFilterValues.add(option)
|
|
4165
|
-
// }
|
|
4166
|
-
// }
|
|
4167
|
-
// selectFilterValues.addEventListener('change',() => {
|
|
4168
|
-
// console.log('changed')
|
|
4169
|
-
// this.processDateSelectionViewer(eventsContainer);
|
|
4170
|
-
// })
|
|
4171
4157
|
};
|
|
4172
4158
|
this.renderSelectAllButtons = () => {
|
|
4173
4159
|
let selectAllHtml = '<div class="d-flex justify-end w-100" style="position: fixed; bottom: 70px; left: 0px;" part="button-select-all-container">';
|
|
@@ -6226,7 +6212,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6226
6212
|
// }
|
|
6227
6213
|
};
|
|
6228
6214
|
this.renderCustomViewer = () => {
|
|
6229
|
-
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m
|
|
6215
|
+
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m;
|
|
6230
6216
|
this.clearGraphData();
|
|
6231
6217
|
this.clearSelectedGraphParam();
|
|
6232
6218
|
this.clearSelectedLegend();
|
|
@@ -6260,12 +6246,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6260
6246
|
html += '</div>';
|
|
6261
6247
|
html += '<div class="d-flex w-100">';
|
|
6262
6248
|
html += '<div class="calendar-left-col desktop-only flex-col justify-start align-end">';
|
|
6263
|
-
html += '<div class="title-item-date">';
|
|
6264
|
-
html += '<label part="input-label">Start Date</label
|
|
6249
|
+
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
6250
|
+
html += '<label part="input-label">Start Date</label>';
|
|
6265
6251
|
html += '<input id="stream-start-date" part="input" type="date" />';
|
|
6266
6252
|
html += '</div>';
|
|
6267
|
-
html += '<div class="title-item-date">';
|
|
6268
|
-
html += '<label part="input-label">End Date</label
|
|
6253
|
+
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
6254
|
+
html += '<label part="input-label">End Date</label>';
|
|
6269
6255
|
html += '<input id="stream-end-date" part="input" type="date" />';
|
|
6270
6256
|
html += '</div>';
|
|
6271
6257
|
html += '<div class="title-item-date">';
|
|
@@ -6278,11 +6264,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6278
6264
|
html += '<button id="button-this-year" part="button-lg-short-secondary">This Year</button>';
|
|
6279
6265
|
html += '</div>';
|
|
6280
6266
|
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
6281
|
-
html += '<label part="input-label-filter-criteria" id="input-label-filter" class="mr-10">Filter Criteria</label
|
|
6267
|
+
html += '<label part="input-label-filter-criteria" id="input-label-filter" class="mr-10">Filter Criteria</label>';
|
|
6282
6268
|
html += '<select id="select-filter-criteria" class="mr-10"></select>';
|
|
6283
6269
|
html += '</div>';
|
|
6284
6270
|
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
6285
|
-
html += '<label part="input-label-filter-value" id="input-label-criteria" class="mr-10"></label
|
|
6271
|
+
html += '<label part="input-label-filter-value" id="input-label-criteria" class="mr-10"></label>';
|
|
6286
6272
|
html += '<select id="select-filter-values" class="mr-10"></select>';
|
|
6287
6273
|
html += '</div>';
|
|
6288
6274
|
html += '</div>';
|
|
@@ -6392,10 +6378,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6392
6378
|
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = endDate;
|
|
6393
6379
|
this.processDateSelectionViewer(this._SfCustomContainer);
|
|
6394
6380
|
});
|
|
6395
|
-
let
|
|
6396
|
-
|
|
6397
|
-
let
|
|
6398
|
-
|
|
6381
|
+
let selectFilterCriteria = this._SfCustomContainer.querySelector('#select-filter-criteria');
|
|
6382
|
+
selectFilterCriteria.style.display = 'none';
|
|
6383
|
+
let selectFilterValues = this._SfCustomContainer.querySelector('#select-filter-values');
|
|
6384
|
+
selectFilterValues.style.display = 'none';
|
|
6399
6385
|
let inputLabelFilter = this._SfCustomContainer.querySelector('#input-label-filter');
|
|
6400
6386
|
inputLabelFilter.style.display = 'none';
|
|
6401
6387
|
// for(var i = 0; i < 3; i++) {
|
|
@@ -6405,8 +6391,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6405
6391
|
// this.renderPast(target);
|
|
6406
6392
|
// })
|
|
6407
6393
|
// }
|
|
6408
|
-
|
|
6409
|
-
(_p = this._SfCustomContainer.querySelector('#button-year-to-date-mobile')) === null || _p === void 0 ? void 0 : _p.click();
|
|
6394
|
+
this._SfCustomContainer.querySelector('#button-year-to-date').click();
|
|
6410
6395
|
};
|
|
6411
6396
|
this.renderThis = (index = 1, showGraph = true) => {
|
|
6412
6397
|
var _a, _b;
|
|
@@ -12909,7 +12894,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12909
12894
|
}
|
|
12910
12895
|
}
|
|
12911
12896
|
}
|
|
12912
|
-
this.
|
|
12897
|
+
if (this.chart4 != null) {
|
|
12898
|
+
this.chart4Base64 = this.chart4.toBase64Image();
|
|
12899
|
+
}
|
|
12913
12900
|
}
|
|
12914
12901
|
},
|
|
12915
12902
|
scales: {
|
|
@@ -13085,7 +13072,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13085
13072
|
}
|
|
13086
13073
|
}
|
|
13087
13074
|
}
|
|
13088
|
-
this.
|
|
13075
|
+
if (this.chart3 != null) {
|
|
13076
|
+
this.chart3Base64 = this.chart3.toBase64Image();
|
|
13077
|
+
}
|
|
13089
13078
|
}
|
|
13090
13079
|
},
|
|
13091
13080
|
scales: {
|
|
@@ -13251,7 +13240,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13251
13240
|
}
|
|
13252
13241
|
}
|
|
13253
13242
|
}
|
|
13254
|
-
this.
|
|
13243
|
+
if (this.chart2 != null) {
|
|
13244
|
+
this.chart2Base64 = this.chart2.toBase64Image();
|
|
13245
|
+
}
|
|
13255
13246
|
}
|
|
13256
13247
|
},
|
|
13257
13248
|
scales: {
|
|
@@ -13458,8 +13449,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13458
13449
|
}
|
|
13459
13450
|
}
|
|
13460
13451
|
}
|
|
13461
|
-
this.
|
|
13462
|
-
|
|
13452
|
+
if (this.chart != null) {
|
|
13453
|
+
this.chartBase64 = this.chart.toBase64Image();
|
|
13454
|
+
}
|
|
13463
13455
|
}
|
|
13464
13456
|
},
|
|
13465
13457
|
scales: {
|
|
@@ -14117,6 +14109,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14117
14109
|
(_g = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', () => {
|
|
14118
14110
|
this.enableCustom();
|
|
14119
14111
|
this.renderTabs(this.TAB_CUSTOM);
|
|
14112
|
+
console.log('stats clicked');
|
|
14120
14113
|
if (this.myRole == this.TAB_VIEWER) {
|
|
14121
14114
|
this.renderCustomViewer();
|
|
14122
14115
|
}
|
package/src/sf-i-events.ts
CHANGED
|
@@ -6571,22 +6571,23 @@ export class SfIEvents extends LitElement {
|
|
|
6571
6571
|
let inputLabelFilter = eventsContainer.querySelector('#input-label-filter') as HTMLLabelElement
|
|
6572
6572
|
selectFilterCriteria.style.display = 'block'
|
|
6573
6573
|
inputLabelFilter.style.display = 'block'
|
|
6574
|
-
// let selectedCriteria = ""
|
|
6575
6574
|
selectFilterCriteria.innerHTML = ""
|
|
6576
6575
|
let option = new Option()
|
|
6577
6576
|
option.value = "";
|
|
6578
|
-
option.innerHTML = "
|
|
6577
|
+
option.innerHTML = "all"
|
|
6579
6578
|
selectFilterCriteria.add(option)
|
|
6580
6579
|
for(let criteria of Object.keys(this.statisticsMeta)){
|
|
6581
|
-
// if(i == 0){
|
|
6582
|
-
// selectedCriteria = criteria
|
|
6583
|
-
// }
|
|
6584
6580
|
let option = new Option()
|
|
6585
6581
|
option.value = criteria;
|
|
6586
|
-
|
|
6582
|
+
if(criteria == "reporter" || criteria == "approver" || criteria == "functionhead"){
|
|
6583
|
+
option.innerHTML = "user:" + criteria
|
|
6584
|
+
}else{
|
|
6585
|
+
option.innerHTML = criteria
|
|
6586
|
+
}
|
|
6587
6587
|
selectFilterCriteria.add(option)
|
|
6588
6588
|
}
|
|
6589
|
-
|
|
6589
|
+
let selectFilterCriteriaNew = Util.clearListeners(selectFilterCriteria)
|
|
6590
|
+
selectFilterCriteriaNew.addEventListener('change',(ev: any) => {
|
|
6590
6591
|
let target = ev.target as HTMLSelectElement
|
|
6591
6592
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria') as HTMLLabelElement
|
|
6592
6593
|
let selectFilterValues = eventsContainer.querySelector('#select-filter-values') as HTMLSelectElement
|
|
@@ -6601,16 +6602,18 @@ export class SfIEvents extends LitElement {
|
|
|
6601
6602
|
option.innerHTML = "All";
|
|
6602
6603
|
selectFilterValues.add(option)
|
|
6603
6604
|
if(this.statisticsMeta[target.value] != null){
|
|
6605
|
+
let sortedFilters = Util.alphabeticalSort(this.statisticsMeta[target.value])
|
|
6604
6606
|
selectFilterValues.style.display = 'block'
|
|
6605
6607
|
inputLabelCriteria.style.display = 'block'
|
|
6606
|
-
inputLabelCriteria.innerHTML =
|
|
6607
|
-
for(let filter of
|
|
6608
|
+
inputLabelCriteria.innerHTML = target.value
|
|
6609
|
+
for(let filter of sortedFilters){
|
|
6608
6610
|
let option = new Option()
|
|
6609
6611
|
option.value = filter.split(';')[1];
|
|
6610
|
-
option.innerHTML =
|
|
6612
|
+
option.innerHTML = filter.split(';')[0].replace(/\([^)]*\)/g,"")
|
|
6611
6613
|
selectFilterValues.add(option)
|
|
6612
6614
|
}
|
|
6613
|
-
|
|
6615
|
+
let selectFilterValuesNew = Util.clearListeners(selectFilterValues)
|
|
6616
|
+
selectFilterValuesNew.addEventListener('change',() => {
|
|
6614
6617
|
console.log('changed')
|
|
6615
6618
|
this.processDateSelectionViewer(eventsContainer);
|
|
6616
6619
|
})
|
|
@@ -6623,24 +6626,6 @@ export class SfIEvents extends LitElement {
|
|
|
6623
6626
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria') as HTMLLabelElement
|
|
6624
6627
|
selectFilterValues.style.display = 'none'
|
|
6625
6628
|
inputLabelCriteria.style.display = 'none'
|
|
6626
|
-
// inputLabelCriteria.innerHTML = selectedCriteria
|
|
6627
|
-
// selectFilterValues.innerHTML = ""
|
|
6628
|
-
// option = new Option()
|
|
6629
|
-
// option.value = "";
|
|
6630
|
-
// option.innerHTML = "All"
|
|
6631
|
-
// selectFilterValues.add(option)
|
|
6632
|
-
// if(this.statisticsMeta[selectedCriteria] != null){
|
|
6633
|
-
// for(let filter of this.statisticsMeta[selectedCriteria]){
|
|
6634
|
-
// let option = new Option()
|
|
6635
|
-
// option.value = filter.split(';')[1];
|
|
6636
|
-
// option.innerHTML = Util.titleCase(filter.split(';')[0]).replace(/\([^)]*\)/g,"")
|
|
6637
|
-
// selectFilterValues.add(option)
|
|
6638
|
-
// }
|
|
6639
|
-
// }
|
|
6640
|
-
// selectFilterValues.addEventListener('change',() => {
|
|
6641
|
-
// console.log('changed')
|
|
6642
|
-
// this.processDateSelectionViewer(eventsContainer);
|
|
6643
|
-
// })
|
|
6644
6629
|
}
|
|
6645
6630
|
renderSelectAllButtons = () => {
|
|
6646
6631
|
let selectAllHtml = '<div class="d-flex justify-end w-100" style="position: fixed; bottom: 70px; left: 0px;" part="button-select-all-container">';
|
|
@@ -9239,12 +9224,12 @@ export class SfIEvents extends LitElement {
|
|
|
9239
9224
|
html += '<div class="d-flex w-100">';
|
|
9240
9225
|
html += '<div class="calendar-left-col desktop-only flex-col justify-start align-end">';
|
|
9241
9226
|
|
|
9242
|
-
html += '<div class="title-item-date">';
|
|
9243
|
-
html += '<label part="input-label">Start Date</label
|
|
9227
|
+
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
9228
|
+
html += '<label part="input-label">Start Date</label>'
|
|
9244
9229
|
html += '<input id="stream-start-date" part="input" type="date" />'
|
|
9245
9230
|
html += '</div>';
|
|
9246
|
-
html += '<div class="title-item-date">';
|
|
9247
|
-
html += '<label part="input-label">End Date</label
|
|
9231
|
+
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
9232
|
+
html += '<label part="input-label">End Date</label>'
|
|
9248
9233
|
html += '<input id="stream-end-date" part="input" type="date" />'
|
|
9249
9234
|
html += '</div>';
|
|
9250
9235
|
html += '<div class="title-item-date">';
|
|
@@ -9257,11 +9242,11 @@ export class SfIEvents extends LitElement {
|
|
|
9257
9242
|
html += '<button id="button-this-year" part="button-lg-short-secondary">This Year</button>'
|
|
9258
9243
|
html += '</div>';
|
|
9259
9244
|
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
9260
|
-
html += '<label part="input-label-filter-criteria" id="input-label-filter" class="mr-10">Filter Criteria</label
|
|
9245
|
+
html += '<label part="input-label-filter-criteria" id="input-label-filter" class="mr-10">Filter Criteria</label>'
|
|
9261
9246
|
html += '<select id="select-filter-criteria" class="mr-10"></select>'
|
|
9262
9247
|
html += '</div>';
|
|
9263
9248
|
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
9264
|
-
html += '<label part="input-label-filter-value" id="input-label-criteria" class="mr-10"></label
|
|
9249
|
+
html += '<label part="input-label-filter-value" id="input-label-criteria" class="mr-10"></label>'
|
|
9265
9250
|
html += '<select id="select-filter-values" class="mr-10"></select>'
|
|
9266
9251
|
html += '</div>';
|
|
9267
9252
|
|
|
@@ -9400,10 +9385,10 @@ export class SfIEvents extends LitElement {
|
|
|
9400
9385
|
this.processDateSelectionViewer((this._SfCustomContainer as HTMLDivElement));
|
|
9401
9386
|
});
|
|
9402
9387
|
|
|
9403
|
-
let
|
|
9404
|
-
|
|
9405
|
-
let
|
|
9406
|
-
|
|
9388
|
+
let selectFilterCriteria = (this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-criteria') as HTMLSelectElement
|
|
9389
|
+
selectFilterCriteria.style.display = 'none'
|
|
9390
|
+
let selectFilterValues = (this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-values') as HTMLSelectElement
|
|
9391
|
+
selectFilterValues.style.display = 'none'
|
|
9407
9392
|
let inputLabelFilter = (this._SfCustomContainer as HTMLDivElement).querySelector('#input-label-filter') as HTMLLabelElement
|
|
9408
9393
|
inputLabelFilter.style.display = 'none';
|
|
9409
9394
|
// for(var i = 0; i < 3; i++) {
|
|
@@ -9413,9 +9398,8 @@ export class SfIEvents extends LitElement {
|
|
|
9413
9398
|
// this.renderPast(target);
|
|
9414
9399
|
// })
|
|
9415
9400
|
// }
|
|
9416
|
-
|
|
9417
|
-
((this._SfCustomContainer as HTMLDivElement).querySelector('#button-year-to-date') as HTMLButtonElement)
|
|
9418
|
-
((this._SfCustomContainer as HTMLDivElement).querySelector('#button-year-to-date-mobile') as HTMLButtonElement)?.click();
|
|
9401
|
+
|
|
9402
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#button-year-to-date') as HTMLButtonElement).click();
|
|
9419
9403
|
}
|
|
9420
9404
|
|
|
9421
9405
|
renderThis = (index: number = 1, showGraph: boolean = true) => {
|
|
@@ -17806,7 +17790,9 @@ export class SfIEvents extends LitElement {
|
|
|
17806
17790
|
|
|
17807
17791
|
|
|
17808
17792
|
}
|
|
17809
|
-
|
|
17793
|
+
if(this.chart4 != null){
|
|
17794
|
+
this.chart4Base64 = (this.chart4 as Chart).toBase64Image()
|
|
17795
|
+
}
|
|
17810
17796
|
}
|
|
17811
17797
|
},
|
|
17812
17798
|
scales: {
|
|
@@ -18008,7 +17994,9 @@ export class SfIEvents extends LitElement {
|
|
|
18008
17994
|
|
|
18009
17995
|
|
|
18010
17996
|
}
|
|
18011
|
-
|
|
17997
|
+
if(this.chart3 != null){
|
|
17998
|
+
this.chart3Base64 = (this.chart3 as Chart).toBase64Image();
|
|
17999
|
+
}
|
|
18012
18000
|
}
|
|
18013
18001
|
},
|
|
18014
18002
|
scales: {
|
|
@@ -18198,7 +18186,9 @@ export class SfIEvents extends LitElement {
|
|
|
18198
18186
|
}
|
|
18199
18187
|
|
|
18200
18188
|
}
|
|
18201
|
-
|
|
18189
|
+
if(this.chart2 != null){
|
|
18190
|
+
this.chart2Base64 = (this.chart2 as Chart).toBase64Image();
|
|
18191
|
+
}
|
|
18202
18192
|
}
|
|
18203
18193
|
},
|
|
18204
18194
|
scales: {
|
|
@@ -18434,8 +18424,9 @@ export class SfIEvents extends LitElement {
|
|
|
18434
18424
|
}
|
|
18435
18425
|
|
|
18436
18426
|
}
|
|
18437
|
-
|
|
18438
|
-
|
|
18427
|
+
if(this.chart != null){
|
|
18428
|
+
this.chartBase64 = (this.chart as Chart).toBase64Image();
|
|
18429
|
+
}
|
|
18439
18430
|
}
|
|
18440
18431
|
},
|
|
18441
18432
|
scales: {
|
|
@@ -19215,6 +19206,7 @@ export class SfIEvents extends LitElement {
|
|
|
19215
19206
|
(this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom')?.addEventListener('click', () => {
|
|
19216
19207
|
this.enableCustom();
|
|
19217
19208
|
this.renderTabs(this.TAB_CUSTOM);
|
|
19209
|
+
console.log('stats clicked');
|
|
19218
19210
|
if(this.myRole == this.TAB_VIEWER){
|
|
19219
19211
|
this.renderCustomViewer()
|
|
19220
19212
|
}else{
|
package/src/util.ts
CHANGED
|
@@ -438,8 +438,15 @@ function titleCase(str: string) {
|
|
|
438
438
|
return splitStr.join(' ');
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
function alphabeticalSort(arr:string[]){
|
|
442
|
+
let arrSorted = arr.sort((a,b) => {
|
|
443
|
+
return a.trim().toLowerCase().localeCompare(b.trim().toLowerCase())
|
|
444
|
+
})
|
|
445
|
+
return arrSorted
|
|
446
|
+
}
|
|
447
|
+
|
|
441
448
|
const exportFunctions = {
|
|
442
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase
|
|
449
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort
|
|
443
450
|
};
|
|
444
451
|
|
|
445
452
|
export default exportFunctions;
|
package/util.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ declare function jsonObjectToHtml(json: any): string;
|
|
|
13
13
|
declare function convertToCSV(arr: any[]): string;
|
|
14
14
|
declare function parseCsv(csv: string): any;
|
|
15
15
|
declare function titleCase(str: string): string;
|
|
16
|
+
declare function alphabeticalSort(arr: string[]): string[];
|
|
16
17
|
declare const exportFunctions: {
|
|
17
18
|
callApiPresignedDelete: typeof callApiPresignedDelete;
|
|
18
19
|
callApiPresignedGet: typeof callApiPresignedGet;
|
|
@@ -31,6 +32,7 @@ declare const exportFunctions: {
|
|
|
31
32
|
convertToCSV: typeof convertToCSV;
|
|
32
33
|
parseCsv: typeof parseCsv;
|
|
33
34
|
titleCase: typeof titleCase;
|
|
35
|
+
alphabeticalSort: typeof alphabeticalSort;
|
|
34
36
|
};
|
|
35
37
|
export default exportFunctions;
|
|
36
38
|
//# sourceMappingURL=util.d.ts.map
|
package/util.js
CHANGED
|
@@ -366,8 +366,14 @@ function titleCase(str) {
|
|
|
366
366
|
// Directly return the joined string
|
|
367
367
|
return splitStr.join(' ');
|
|
368
368
|
}
|
|
369
|
+
function alphabeticalSort(arr) {
|
|
370
|
+
let arrSorted = arr.sort((a, b) => {
|
|
371
|
+
return a.trim().toLowerCase().localeCompare(b.trim().toLowerCase());
|
|
372
|
+
});
|
|
373
|
+
return arrSorted;
|
|
374
|
+
}
|
|
369
375
|
const exportFunctions = {
|
|
370
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase
|
|
376
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort
|
|
371
377
|
};
|
|
372
378
|
export default exportFunctions;
|
|
373
379
|
//# sourceMappingURL=util.js.map
|