@annalib/anna-core 1.2.8 → 1.2.9
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/esm2020/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.mjs +5 -5
- package/esm2020/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +1 -1
- package/esm2020/lib/anna-core-shared-lib/services/anna-filter.service.mjs +1 -187
- package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +3 -39
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.mjs +5 -5
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +1 -1
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-filter.service.mjs +1 -187
- package/esm2020/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +3 -39
- package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +35 -220
- package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -1
- package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +2 -38
- package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -1
- package/fesm2015/annalib-anna-core.mjs +36 -257
- package/fesm2015/annalib-anna-core.mjs.map +1 -1
- package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +35 -220
- package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -1
- package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +2 -38
- package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -1
- package/fesm2020/annalib-anna-core.mjs +36 -257
- package/fesm2020/annalib-anna-core.mjs.map +1 -1
- package/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.d.ts +3 -2
- package/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +4 -0
- package/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +0 -12
- package/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +2 -3
- package/package.json +1 -1
- package/src/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.d.ts +3 -2
- package/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +4 -0
- package/src/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +0 -12
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +2 -3
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component, ChangeDetectionStrategy, Input, Pipe, Directive, HostListener, EventEmitter, Output, NgModule, Injectable } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { memoize, min, max,
|
|
5
|
+
import { memoize, min, max, uniq, cloneDeep, isEqual, map, sortBy } from 'lodash-es';
|
|
6
6
|
import moment from 'moment';
|
|
7
7
|
import { Subject } from 'rxjs';
|
|
8
8
|
|
|
@@ -149,16 +149,16 @@ class AnnaIconColumnComponent {
|
|
|
149
149
|
constructor() {
|
|
150
150
|
this.PfpIconActiveColor = "#9B1B93";
|
|
151
151
|
this.PfpIconDisableColor = "rgba(189,189,189,0.5)";
|
|
152
|
-
this.
|
|
152
|
+
this.onColumnIconClicked = new EventEmitter();
|
|
153
153
|
}
|
|
154
154
|
ngOnInit() {
|
|
155
155
|
}
|
|
156
156
|
svgIconClicked(rowData, key) {
|
|
157
|
-
this.
|
|
157
|
+
this.onColumnIconClicked.emit({ data: rowData, key: key });
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
AnnaIconColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaIconColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
161
|
-
AnnaIconColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaIconColumnComponent, selector: "anna-core-anna-icon-column", inputs: { componentName: "componentName", objectKey: "objectKey", dataObject: "dataObject" }, outputs: {
|
|
161
|
+
AnnaIconColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaIconColumnComponent, selector: "anna-core-anna-icon-column", inputs: { componentName: "componentName", objectKey: "objectKey", dataObject: "dataObject" }, outputs: { onColumnIconClicked: "onColumnIconClicked" }, ngImport: i0, template: "<ng-container *ngIf=\"componentName == 'ORDER_LISTING_INFLIGHT'\">\n <span\n *ngIf=\"dataObject.payForPerformance && objectKey == 'payForPerformance'\"\n class=\"cursor-not-allowed\"\n (click)=\"$event.stopPropagation()\"\n >\n <anna-pay-for-performance-icon-template\n [color]=\"PfpIconActiveColor\"\n [width]=\"'15px'\"\n [height]=\"'15px'\"\n >\n </anna-pay-for-performance-icon-template>\n </span>\n <span\n *ngIf=\"dataObject.orderStatus != 'LIVE' && !dataObject.payForPerformance && objectKey == 'payForPerformance'\"\n (click)=\"svgIconClicked(dataObject,'payForPerformance')\"\n >\n <anna-pay-for-performance-icon-template\n [color]=\"PfpIconDisableColor\"\n [width]=\"'15px'\"\n [height]=\"'15px'\"\n >\n </anna-pay-for-performance-icon-template>\n </span>\n\n <anna-live-icon-template *ngIf=\"dataObject.orderStatus == 'LIVE' && objectKey == 'orderStatus' \"></anna-live-icon-template>\n</ng-container>\n<ng-container *ngIf=\"componentName == 'ORDER_LISTING_COMPLETED'\">\n <span *ngIf=\"dataObject.payForPerformance && objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\n <anna-pay-for-performance-icon-template\n [color]=\"PfpIconActiveColor\"\n [width]=\"'20px'\"\n [height]=\"'20px'\"\n >\n </anna-pay-for-performance-icon-template>\n </span>\n</ng-container>\n<ng-container *ngIf=\"objectKey == 'bizRuleStatus'\">\n <anna-rejected-icon-template *ngIf=\"dataObject.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\n <anna-notify-icon-template *ngIf=\"dataObject.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\n <anna-buyer-approval-icon-template *ngIf=\"dataObject.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\n</ng-container>\n", styles: [""], components: [{ type: AnnaPayForPerformanceIconTemplateComponent, selector: "anna-pay-for-performance-icon-template", inputs: ["color", "width", "height"] }, { type: AnnaLiveIconTemplateComponent, selector: "anna-live-icon-template" }, { type: AnnaRejectedIconTemplateComponent, selector: "anna-rejected-icon-template" }, { type: AnnaNotifyIconTemplateComponent, selector: "anna-notify-icon-template" }, { type: AnnaBuyerApprovalIconTemplateComponent, selector: "anna-buyer-approval-icon-template" }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
162
162
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaIconColumnComponent, decorators: [{
|
|
163
163
|
type: Component,
|
|
164
164
|
args: [{ selector: 'anna-core-anna-icon-column', template: "<ng-container *ngIf=\"componentName == 'ORDER_LISTING_INFLIGHT'\">\n <span\n *ngIf=\"dataObject.payForPerformance && objectKey == 'payForPerformance'\"\n class=\"cursor-not-allowed\"\n (click)=\"$event.stopPropagation()\"\n >\n <anna-pay-for-performance-icon-template\n [color]=\"PfpIconActiveColor\"\n [width]=\"'15px'\"\n [height]=\"'15px'\"\n >\n </anna-pay-for-performance-icon-template>\n </span>\n <span\n *ngIf=\"dataObject.orderStatus != 'LIVE' && !dataObject.payForPerformance && objectKey == 'payForPerformance'\"\n (click)=\"svgIconClicked(dataObject,'payForPerformance')\"\n >\n <anna-pay-for-performance-icon-template\n [color]=\"PfpIconDisableColor\"\n [width]=\"'15px'\"\n [height]=\"'15px'\"\n >\n </anna-pay-for-performance-icon-template>\n </span>\n\n <anna-live-icon-template *ngIf=\"dataObject.orderStatus == 'LIVE' && objectKey == 'orderStatus' \"></anna-live-icon-template>\n</ng-container>\n<ng-container *ngIf=\"componentName == 'ORDER_LISTING_COMPLETED'\">\n <span *ngIf=\"dataObject.payForPerformance && objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\n <anna-pay-for-performance-icon-template\n [color]=\"PfpIconActiveColor\"\n [width]=\"'20px'\"\n [height]=\"'20px'\"\n >\n </anna-pay-for-performance-icon-template>\n </span>\n</ng-container>\n<ng-container *ngIf=\"objectKey == 'bizRuleStatus'\">\n <anna-rejected-icon-template *ngIf=\"dataObject.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\n <anna-notify-icon-template *ngIf=\"dataObject.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\n <anna-buyer-approval-icon-template *ngIf=\"dataObject.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\n</ng-container>\n", styles: [""] }]
|
|
@@ -168,7 +168,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
168
168
|
type: Input
|
|
169
169
|
}], dataObject: [{
|
|
170
170
|
type: Input
|
|
171
|
-
}],
|
|
171
|
+
}], onColumnIconClicked: [{
|
|
172
172
|
type: Output
|
|
173
173
|
}] } });
|
|
174
174
|
|
|
@@ -534,36 +534,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
534
534
|
}]
|
|
535
535
|
}], ctorParameters: function () { return []; } });
|
|
536
536
|
|
|
537
|
-
class TooltipModel {
|
|
538
|
-
constructor(obj, id) {
|
|
539
|
-
this.label = obj ? obj.toString() : null;
|
|
540
|
-
this.value = obj;
|
|
541
|
-
this.isSelected = false;
|
|
542
|
-
this.id = id;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
class tooltipModelForColumnLevelFiltering {
|
|
546
|
-
constructor(data) {
|
|
547
|
-
this.data = data;
|
|
548
|
-
this.isSelected = true;
|
|
549
|
-
this.isHidden = false;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
class radioButtonModel {
|
|
553
|
-
constructor(key, value, sort, filter) {
|
|
554
|
-
this.key = key;
|
|
555
|
-
this.label = value;
|
|
556
|
-
this.isSortRequired = sort;
|
|
557
|
-
this.isFilterRequired = filter;
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
var AllSelectedStatus;
|
|
561
|
-
(function (AllSelectedStatus) {
|
|
562
|
-
AllSelectedStatus[AllSelectedStatus["none"] = 0] = "none";
|
|
563
|
-
AllSelectedStatus[AllSelectedStatus["allSelected"] = 1] = "allSelected";
|
|
564
|
-
AllSelectedStatus[AllSelectedStatus["fewSelected"] = 2] = "fewSelected";
|
|
565
|
-
})(AllSelectedStatus || (AllSelectedStatus = {}));
|
|
566
|
-
|
|
567
537
|
// Angular import statements
|
|
568
538
|
// Third party import statements
|
|
569
539
|
// User defined import statements
|
|
@@ -807,42 +777,6 @@ class AnnaFilterService {
|
|
|
807
777
|
this.annaSortService.columnSortState.set(this.selectedRadio, "DEFAULT");
|
|
808
778
|
}
|
|
809
779
|
}
|
|
810
|
-
populateSliderTooltip(completeData, filteredData) {
|
|
811
|
-
let minValue;
|
|
812
|
-
let maxValue;
|
|
813
|
-
if (this.appliedFiltersArray.length > 0 &&
|
|
814
|
-
this.appliedFiltersArray[this.appliedFiltersArray.length - 1] === this.selectedRadio) {
|
|
815
|
-
let subsetData;
|
|
816
|
-
let subfilterApplied = false;
|
|
817
|
-
//applying all filterexcept the current filter
|
|
818
|
-
if (this.selectedRadio === "postedAdu" && this.tooltipSelectedMap.has("isAudRequired")) {
|
|
819
|
-
this.tooltipSelectedMap.delete("isAudRequired");
|
|
820
|
-
subfilterApplied = true;
|
|
821
|
-
}
|
|
822
|
-
subsetData = this.filterData(completeData, this.selectedRadio);
|
|
823
|
-
//need to find min and max value for
|
|
824
|
-
minValue = this.returnMaxAndMinValue(subsetData, this.selectedRadio, true);
|
|
825
|
-
maxValue = this.returnMaxAndMinValue(subsetData, this.selectedRadio, false);
|
|
826
|
-
if (this.selectedRadio === "postedAdu" && subfilterApplied) {
|
|
827
|
-
this.tooltipSelectedMap.set("isAudRequired", [false]);
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
else {
|
|
831
|
-
minValue = this.returnMaxAndMinValue(filteredData, this.selectedRadio, true);
|
|
832
|
-
maxValue = this.returnMaxAndMinValue(filteredData, this.selectedRadio, false);
|
|
833
|
-
}
|
|
834
|
-
this.ngxSliderObj = this.setOptionValues(minValue, maxValue);
|
|
835
|
-
if (this.translateFunc === "normal") {
|
|
836
|
-
this.ngxSliderObj.translate = this.normalTranslateFunction;
|
|
837
|
-
}
|
|
838
|
-
else if (this.translateFunc === "percent") {
|
|
839
|
-
this.ngxSliderObj.translate = this.percentTranslateFunction;
|
|
840
|
-
}
|
|
841
|
-
else if (this.translateFunc === "currency") {
|
|
842
|
-
this.ngxSliderObj.translate = this.currencyTranslateFunction;
|
|
843
|
-
}
|
|
844
|
-
return this.ngxSliderObj;
|
|
845
|
-
}
|
|
846
780
|
setOptionValues(minValue, maxValue) {
|
|
847
781
|
return {
|
|
848
782
|
floor: minValue,
|
|
@@ -851,121 +785,6 @@ class AnnaFilterService {
|
|
|
851
785
|
translate: this.normalTranslateFunction
|
|
852
786
|
};
|
|
853
787
|
}
|
|
854
|
-
populateTooltip(selectedColumnName, completeData, filteredData) {
|
|
855
|
-
let tooltipData;
|
|
856
|
-
if (this.appliedFiltersArray.length === 0) {
|
|
857
|
-
tooltipData = this.populateTooltipDataBasedOnSelectedRadio([selectedColumnName], completeData);
|
|
858
|
-
tooltipData.forEach((item) => (item.isHidden = false));
|
|
859
|
-
}
|
|
860
|
-
else if (selectedColumnName === this.appliedFiltersArray[this.appliedFiltersArray.length - 1]) {
|
|
861
|
-
let subsetData = this.filterData(completeData, selectedColumnName); //filter the data without applying the latest filter
|
|
862
|
-
tooltipData = this.showHideFilterCheckbox(subsetData, selectedColumnName);
|
|
863
|
-
}
|
|
864
|
-
else {
|
|
865
|
-
//if it is not the latest filter
|
|
866
|
-
//then filtered Data will be used
|
|
867
|
-
//create the option data
|
|
868
|
-
if (!this.tooltipMap.has(selectedColumnName)) {
|
|
869
|
-
this.populateTooltipDataBasedOnSelectedRadio([selectedColumnName], completeData);
|
|
870
|
-
}
|
|
871
|
-
tooltipData = this.showHideFilterCheckbox(filteredData, selectedColumnName);
|
|
872
|
-
}
|
|
873
|
-
return tooltipData;
|
|
874
|
-
}
|
|
875
|
-
populateTooltipDataBasedOnSelectedRadio(value, originalData) {
|
|
876
|
-
//if the initial tooltip data is already present fetch from the map
|
|
877
|
-
if (this.tooltipMap.has(value[0])) {
|
|
878
|
-
return this.tooltipMap.get(value[0]);
|
|
879
|
-
}
|
|
880
|
-
else {
|
|
881
|
-
//get the unique values from the column and save it in the map
|
|
882
|
-
this.selectedRadio = value[0];
|
|
883
|
-
const data = sortBy(originalData.map((u) => u[this.selectedRadio])).filter((n) => n !== null); //sorting the data in alphabetical order
|
|
884
|
-
const dataSet = new Set(data); //created a set from the data
|
|
885
|
-
const toolTipdata = [...dataSet].map((x) => new tooltipModelForColumnLevelFiltering(x));
|
|
886
|
-
this.tooltipMap.set(value[0], toolTipdata); //setting the key value pair in the tooltipMap
|
|
887
|
-
this.tooltipSelectedMap.set(value[0], map(toolTipdata, "data")); //setting the key value pair in tooltipSelectedMap
|
|
888
|
-
return toolTipdata;
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
showHideFilterCheckbox(arr, selectedColumnName) {
|
|
892
|
-
let currentSubsetData = uniq(arr.map((u) => u[selectedColumnName]));
|
|
893
|
-
//get the initial tooltip Data
|
|
894
|
-
let tooltipData = this.tooltipMap.get(selectedColumnName);
|
|
895
|
-
//show or hide the value
|
|
896
|
-
tooltipData.forEach((value) => {
|
|
897
|
-
//if the element is not present then hide the element
|
|
898
|
-
let elementToFindIndex = currentSubsetData.findIndex((n) => n === value.data);
|
|
899
|
-
if (elementToFindIndex === -1) {
|
|
900
|
-
value.isHidden = true;
|
|
901
|
-
}
|
|
902
|
-
else {
|
|
903
|
-
//show the element
|
|
904
|
-
value.isHidden = false;
|
|
905
|
-
}
|
|
906
|
-
});
|
|
907
|
-
return tooltipData;
|
|
908
|
-
}
|
|
909
|
-
isAllOptionsSelected() {
|
|
910
|
-
let allSelected;
|
|
911
|
-
let totalOptionsCount = this.tooltipMap.get(this.selectedRadio).filter((x) => !x.isHidden).length;
|
|
912
|
-
let selectedOptionsCount = this.tooltipMap.get(this.selectedRadio).filter((x) => !x.isHidden && x.isSelected).length;
|
|
913
|
-
if (selectedOptionsCount === 0) {
|
|
914
|
-
allSelected = AllSelectedStatus.none;
|
|
915
|
-
}
|
|
916
|
-
else if (selectedOptionsCount > 0 && selectedOptionsCount < totalOptionsCount) {
|
|
917
|
-
allSelected = AllSelectedStatus.fewSelected;
|
|
918
|
-
}
|
|
919
|
-
else {
|
|
920
|
-
allSelected = AllSelectedStatus.allSelected;
|
|
921
|
-
}
|
|
922
|
-
return allSelected;
|
|
923
|
-
}
|
|
924
|
-
populateDatePickerTooltipWithData(completeData, filteredData) {
|
|
925
|
-
let enabledDates;
|
|
926
|
-
//some filter is applied and the latest filter is the date filter
|
|
927
|
-
if (this.appliedFiltersArray.length > 0 &&
|
|
928
|
-
this.appliedFiltersArray[this.appliedFiltersArray.length - 1] === this.selectedRadio) {
|
|
929
|
-
let subsetData;
|
|
930
|
-
//applying all filterexcept thec current filter
|
|
931
|
-
if (this.selectedRadio === "period") {
|
|
932
|
-
subsetData = this.filterData(completeData, "period");
|
|
933
|
-
let minStartDate = this.returnMinAndMaxDate(subsetData, "startDate");
|
|
934
|
-
let maxEndDate = this.returnMinAndMaxDate(subsetData, "endDate");
|
|
935
|
-
enabledDates = { minStartDate: minStartDate[0], maxEndDate: maxEndDate[1] };
|
|
936
|
-
}
|
|
937
|
-
else if (this.selectedRadio === "AirDate" || this.selectedRadio === "flightStartDate" ||
|
|
938
|
-
this.selectedRadio === "flightEndDate" || this.selectedRadio == "date") {
|
|
939
|
-
subsetData = this.filterData(completeData, this.selectedRadio);
|
|
940
|
-
let minAndMaxDate = this.returnMinAndMaxDate(subsetData, this.selectedRadio);
|
|
941
|
-
enabledDates = { minStartDate: minAndMaxDate[0], maxEndDate: minAndMaxDate[1] };
|
|
942
|
-
}
|
|
943
|
-
else {
|
|
944
|
-
subsetData = this.filterData(completeData, this.selectedRadio);
|
|
945
|
-
//need to find min and max date for start and end date
|
|
946
|
-
//enabledDates is an arr of minDate and maxDate
|
|
947
|
-
enabledDates = this.returnMinAndMaxDate(subsetData, this.selectedRadio);
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
else {
|
|
951
|
-
if (this.selectedRadio === "period") {
|
|
952
|
-
let minStartDate = this.returnMinAndMaxDate(filteredData, "startDate");
|
|
953
|
-
let maxEndDate = this.returnMinAndMaxDate(filteredData, "endDate");
|
|
954
|
-
enabledDates = { minStartDate: minStartDate[0], maxEndDate: maxEndDate[1] };
|
|
955
|
-
}
|
|
956
|
-
else if (this.selectedRadio === "AirDate" || this.selectedRadio === "flightStartDate" ||
|
|
957
|
-
this.selectedRadio === "flightEndDate" || this.selectedRadio == "date") {
|
|
958
|
-
let minAndMaxDate = this.returnMinAndMaxDate(filteredData, this.selectedRadio);
|
|
959
|
-
enabledDates = { minStartDate: minAndMaxDate[0], maxEndDate: minAndMaxDate[1] };
|
|
960
|
-
}
|
|
961
|
-
else {
|
|
962
|
-
//need to find min and max date for start and end date.
|
|
963
|
-
// enabledDates is an arr of minDate and maxDate
|
|
964
|
-
enabledDates = this.returnMinAndMaxDate(filteredData, this.selectedRadio);
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
return enabledDates;
|
|
968
|
-
}
|
|
969
788
|
findUniqueDatesWithData(data) {
|
|
970
789
|
let uniqueDates = uniq(data.map((u) => u["date"]));
|
|
971
790
|
let uniqueDatesInNgbDateFormat = [];
|
|
@@ -974,33 +793,6 @@ class AnnaFilterService {
|
|
|
974
793
|
});
|
|
975
794
|
return uniqueDatesInNgbDateFormat;
|
|
976
795
|
}
|
|
977
|
-
isCheckboxSelected(selectedData) {
|
|
978
|
-
selectedData.isSelected = !selectedData.isSelected;
|
|
979
|
-
let allSelected = this.isAllOptionsSelected();
|
|
980
|
-
return allSelected;
|
|
981
|
-
}
|
|
982
|
-
allOptionsClicked(status) {
|
|
983
|
-
let header = this.selectedRadio;
|
|
984
|
-
if (status === 1) {
|
|
985
|
-
this.tooltipMap.get(header).forEach((item) => {
|
|
986
|
-
if (!item.isHidden) {
|
|
987
|
-
item.isSelected = true;
|
|
988
|
-
}
|
|
989
|
-
});
|
|
990
|
-
this.tooltipSelectedMap.set(header, this.tooltipMap
|
|
991
|
-
.get(header)
|
|
992
|
-
.filter((x) => x.isSelected)
|
|
993
|
-
.map((x) => x.data));
|
|
994
|
-
}
|
|
995
|
-
else {
|
|
996
|
-
this.tooltipMap.get(header).forEach((item) => {
|
|
997
|
-
if (!item.isHidden) {
|
|
998
|
-
item.isSelected = false;
|
|
999
|
-
}
|
|
1000
|
-
});
|
|
1001
|
-
this.tooltipSelectedMap.delete(header);
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
796
|
reOrderAppliedFiltersArray(isHierarchialUserFiltered, date) {
|
|
1005
797
|
let isFiltered = true;
|
|
1006
798
|
isFiltered = this.checkIfDataIsFiltered(isFiltered, isHierarchialUserFiltered, date);
|
|
@@ -1132,13 +924,6 @@ class AnnaFilterService {
|
|
|
1132
924
|
if (!selectedData.includeTimeRange) {
|
|
1133
925
|
return false;
|
|
1134
926
|
}
|
|
1135
|
-
// objTime = this.dateTimeFormatService.formatToTwelveHrs(objTime, true);
|
|
1136
|
-
// objTime = this.dateTimeFormatService.convertTotwentyFourHrsFormat(
|
|
1137
|
-
// objTime[0] + ":" + objTime[1] + " " + objTime[2],
|
|
1138
|
-
// true
|
|
1139
|
-
// );
|
|
1140
|
-
// objTime = objTime[0] + ":" + objTime[1] + ":00";
|
|
1141
|
-
// objTime = moment(objTime, format);
|
|
1142
927
|
let momentTime = moment(objTime, format);
|
|
1143
928
|
let isObjTimeSameAsSelectedFromTime = momentTime.isSame(selectedFromTime);
|
|
1144
929
|
let isObjTimeSameAsSelectedToTime = momentTime.isSame(selectedToTime);
|
|
@@ -1341,6 +1126,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
1341
1126
|
|
|
1342
1127
|
;
|
|
1343
1128
|
|
|
1129
|
+
class TooltipModel {
|
|
1130
|
+
constructor(obj, id) {
|
|
1131
|
+
this.label = obj ? obj.toString() : null;
|
|
1132
|
+
this.value = obj;
|
|
1133
|
+
this.isSelected = false;
|
|
1134
|
+
this.id = id;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
class tooltipModelForColumnLevelFiltering {
|
|
1138
|
+
constructor(data) {
|
|
1139
|
+
this.data = data;
|
|
1140
|
+
this.isSelected = true;
|
|
1141
|
+
this.isHidden = false;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
class radioButtonModel {
|
|
1145
|
+
constructor(key, value, sort, filter) {
|
|
1146
|
+
this.key = key;
|
|
1147
|
+
this.label = value;
|
|
1148
|
+
this.isSortRequired = sort;
|
|
1149
|
+
this.isFilterRequired = filter;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
var AllSelectedStatus;
|
|
1153
|
+
(function (AllSelectedStatus) {
|
|
1154
|
+
AllSelectedStatus[AllSelectedStatus["none"] = 0] = "none";
|
|
1155
|
+
AllSelectedStatus[AllSelectedStatus["allSelected"] = 1] = "allSelected";
|
|
1156
|
+
AllSelectedStatus[AllSelectedStatus["fewSelected"] = 2] = "fewSelected";
|
|
1157
|
+
})(AllSelectedStatus || (AllSelectedStatus = {}));
|
|
1158
|
+
|
|
1344
1159
|
class Constants {
|
|
1345
1160
|
}
|
|
1346
1161
|
Constants.SUCCESS_STRING = "success";
|