sf-i-events 1.0.693 → 1.0.694
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 +2 -2
- package/sf-i-events.js +7 -6
- package/src/sf-i-events.ts +7 -6
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -439,7 +439,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
439
439
|
getComplianceStatus: (completeness: string, timeliness: string) => "scheduled" | "not-complied" | "partially-complied" | "complied";
|
|
440
440
|
numcalled: number;
|
|
441
441
|
updateStats: (event: any, partStatus: string, lateStatus: string, complianceStatus: string) => void;
|
|
442
|
-
renderCalendarGraphs: (showGraph: boolean) => string;
|
|
442
|
+
renderCalendarGraphs: (showGraph: boolean, parametersTitle: string) => string;
|
|
443
443
|
renderCalendarContainerDivStart: (index: number) => string;
|
|
444
444
|
renderCalendarContainerDivEnd: () => string;
|
|
445
445
|
renderCalendarEventSummary: () => string;
|
|
@@ -458,7 +458,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
458
458
|
renderStatusString: (partStatus: string, lateStatus: string, complianceStatus: string) => string;
|
|
459
459
|
getGraphParam: (event: any) => string;
|
|
460
460
|
renderCalendarAnnotations: (event: any) => string;
|
|
461
|
-
renderEvents: (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate
|
|
461
|
+
renderEvents: (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any, parametersTitle: string) => string;
|
|
462
462
|
renderStreamEvents: (index: number, month: number, year: number, showGraph?: boolean) => string;
|
|
463
463
|
renderThisEvents: (index: number, startDate: Date, showGraph?: boolean) => string;
|
|
464
464
|
renderRangeEvents: (firstDate: Date, count: number, eventsContainer: HTMLDivElement) => void;
|
package/sf-i-events.js
CHANGED
|
@@ -2074,10 +2074,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2074
2074
|
this.updateLocationStats(event['locationname'], partStatus, lateStatus, complianceStatus);
|
|
2075
2075
|
this.updateSubcategoryStats(event['subcategory'], partStatus, lateStatus, complianceStatus);
|
|
2076
2076
|
};
|
|
2077
|
-
this.renderCalendarGraphs = (showGraph) => {
|
|
2077
|
+
this.renderCalendarGraphs = (showGraph, parametersTitle) => {
|
|
2078
2078
|
//console.log('flowGraph', this.flowGraph);
|
|
2079
2079
|
var html = '';
|
|
2080
2080
|
html += '<div class="mb-20 stream-event-list" part="stream-event-list-charts">';
|
|
2081
|
+
html += '<div class="align-center d-flex flex-wrap mb-10 w-100-m-0" part="duration-title-container"><h4 part="duration-title">' + parametersTitle + '</h4></div>';
|
|
2081
2082
|
if (showGraph) {
|
|
2082
2083
|
html += '<div part="stream-event-chart-selection" class="mb-20">';
|
|
2083
2084
|
html += '<div part="td-head" class="mb-5">Select Chart</div>';
|
|
@@ -2480,7 +2481,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2480
2481
|
html += '<div class="d-flex"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + '</div>';
|
|
2481
2482
|
return html;
|
|
2482
2483
|
};
|
|
2483
|
-
this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null) => {
|
|
2484
|
+
this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle) => {
|
|
2484
2485
|
var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0;
|
|
2485
2486
|
var html = '';
|
|
2486
2487
|
this.selectedItemIds = [];
|
|
@@ -2494,7 +2495,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2494
2495
|
this.clearGraphData();
|
|
2495
2496
|
this.clearSelectedGraphParam();
|
|
2496
2497
|
this.clearSelectedLegend();
|
|
2497
|
-
html += this.renderCalendarGraphs(showGraph);
|
|
2498
|
+
html += this.renderCalendarGraphs(showGraph, parametersTitle);
|
|
2498
2499
|
html += this.renderCalendarContainerDivStart(index);
|
|
2499
2500
|
html += this.renderCalendarEventSummary();
|
|
2500
2501
|
// csvCols += 'Period,Status,Id,ObligationTitle,Obligation,Duedate'
|
|
@@ -2687,7 +2688,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2687
2688
|
let endDay = new Date(year, month, 1);
|
|
2688
2689
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
2689
2690
|
var period = ("0" + (month + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + new Date().getFullYear() + ' - ' + ("0" + (month + 1)).slice(-2) + "/" + ("0" + lastDay).slice(-2) + '/' + new Date().getFullYear();
|
|
2690
|
-
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period);
|
|
2691
|
+
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, "Month- " + this.monthNames[month] + " " + year);
|
|
2691
2692
|
};
|
|
2692
2693
|
this.renderThisEvents = (index, startDate, showGraph = true) => {
|
|
2693
2694
|
var firstDate = new Date();
|
|
@@ -2708,7 +2709,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2708
2709
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
2709
2710
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
2710
2711
|
var period = ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + count).slice(-2) + '/' + firstDate.getFullYear();
|
|
2711
|
-
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period);
|
|
2712
|
+
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"));
|
|
2712
2713
|
};
|
|
2713
2714
|
this.renderRangeEvents = (firstDate, count, eventsContainer) => {
|
|
2714
2715
|
var lastDate = new Date(firstDate.getTime());
|
|
@@ -2719,7 +2720,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2719
2720
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
2720
2721
|
var period = ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + firstDate.getDate()).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (lastDate.getMonth() + 1)).slice(-2) + "/" + ("0" + lastDate.getDate()).slice(-2) + '/' + lastDate.getFullYear();
|
|
2721
2722
|
//console.log('rangeperiod', period)
|
|
2722
|
-
var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate);
|
|
2723
|
+
var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
|
|
2723
2724
|
eventsContainer.querySelector('.calendar-right-data').innerHTML = html;
|
|
2724
2725
|
this.attachTimelineFilterHandlers(eventsContainer);
|
|
2725
2726
|
const radioExpander = eventsContainer.querySelector('#graph-radios-expander');
|
package/src/sf-i-events.ts
CHANGED
|
@@ -4103,13 +4103,14 @@ export class SfIEvents extends LitElement {
|
|
|
4103
4103
|
|
|
4104
4104
|
}
|
|
4105
4105
|
|
|
4106
|
-
renderCalendarGraphs = (showGraph: boolean) => {
|
|
4106
|
+
renderCalendarGraphs = (showGraph: boolean, parametersTitle: string) => {
|
|
4107
4107
|
|
|
4108
4108
|
//console.log('flowGraph', this.flowGraph);
|
|
4109
4109
|
|
|
4110
4110
|
var html = '';
|
|
4111
4111
|
|
|
4112
4112
|
html += '<div class="mb-20 stream-event-list" part="stream-event-list-charts">';
|
|
4113
|
+
html += '<div class="align-center d-flex flex-wrap mb-10 w-100-m-0" part="duration-title-container"><h4 part="duration-title">' + parametersTitle + '</h4></div>';
|
|
4113
4114
|
if(showGraph) {
|
|
4114
4115
|
html += '<div part="stream-event-chart-selection" class="mb-20">';
|
|
4115
4116
|
html += '<div part="td-head" class="mb-5">Select Chart</div>';
|
|
@@ -4607,7 +4608,7 @@ export class SfIEvents extends LitElement {
|
|
|
4607
4608
|
|
|
4608
4609
|
}
|
|
4609
4610
|
|
|
4610
|
-
renderEvents = (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any = null) => {
|
|
4611
|
+
renderEvents = (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any = null, parametersTitle: string) => {
|
|
4611
4612
|
var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0;
|
|
4612
4613
|
var html = '';
|
|
4613
4614
|
this.selectedItemIds = [];
|
|
@@ -4625,7 +4626,7 @@ export class SfIEvents extends LitElement {
|
|
|
4625
4626
|
this.clearSelectedLegend();
|
|
4626
4627
|
|
|
4627
4628
|
|
|
4628
|
-
html += this.renderCalendarGraphs(showGraph);
|
|
4629
|
+
html += this.renderCalendarGraphs(showGraph, parametersTitle);
|
|
4629
4630
|
html += this.renderCalendarContainerDivStart(index)
|
|
4630
4631
|
html += this.renderCalendarEventSummary();
|
|
4631
4632
|
|
|
@@ -4869,7 +4870,7 @@ export class SfIEvents extends LitElement {
|
|
|
4869
4870
|
endDay?.setDate(endDay.getDate() + lastDay + 1);
|
|
4870
4871
|
var period = ("0" + (month+1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + new Date().getFullYear() + ' - ' + ("0" + (month+1)).slice(-2) + "/" + ("0" + lastDay).slice(-2) + '/' + new Date().getFullYear()
|
|
4871
4872
|
|
|
4872
|
-
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period);
|
|
4873
|
+
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, "Month- " + this.monthNames[month] + " " + year);
|
|
4873
4874
|
|
|
4874
4875
|
}
|
|
4875
4876
|
|
|
@@ -4903,7 +4904,7 @@ export class SfIEvents extends LitElement {
|
|
|
4903
4904
|
|
|
4904
4905
|
var period = ("0" + (firstDate.getMonth()+1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (firstDate.getMonth()+1)).slice(-2) + "/" + ("0" + count).slice(-2) + '/' + firstDate.getFullYear()
|
|
4905
4906
|
|
|
4906
|
-
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period);
|
|
4907
|
+
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"));
|
|
4907
4908
|
|
|
4908
4909
|
}
|
|
4909
4910
|
|
|
@@ -4922,7 +4923,7 @@ export class SfIEvents extends LitElement {
|
|
|
4922
4923
|
|
|
4923
4924
|
//console.log('rangeperiod', period)
|
|
4924
4925
|
|
|
4925
|
-
var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate);
|
|
4926
|
+
var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
|
|
4926
4927
|
|
|
4927
4928
|
eventsContainer.querySelector('.calendar-right-data')!.innerHTML = html;
|
|
4928
4929
|
|