@annalib/anna-core 3.2.0 → 3.2.1
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/pipes/annaFilterSearchedText.pipe.mjs +20 -5
- package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +5 -3
- package/fesm2015/annalib-anna-core.mjs +23 -6
- package/fesm2015/annalib-anna-core.mjs.map +1 -1
- package/fesm2020/annalib-anna-core.mjs +23 -6
- package/fesm2020/annalib-anna-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -43,10 +43,25 @@ class AnnaFilterSearchedTextPipe {
|
|
|
43
43
|
if (!searchText)
|
|
44
44
|
return items;
|
|
45
45
|
searchText = searchText.toString().toLowerCase();
|
|
46
|
-
//if keyName is
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
// if keyName is an array then loop through all the keynames
|
|
47
|
+
if (typeof (keyName) == 'object') {
|
|
48
|
+
let isFoundAtleastOnce = false;
|
|
49
|
+
let isFound;
|
|
50
|
+
for (const key of keyName) {
|
|
51
|
+
isFound = items.filter((item) => item[key].toString().toLowerCase().includes(searchText));
|
|
52
|
+
if (isFound.length) {
|
|
53
|
+
isFoundAtleastOnce = true;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return isFoundAtleastOnce ? isFound : [];
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
//if keyName is undefined every key will be considered for filtering.
|
|
61
|
+
if (!keyName)
|
|
62
|
+
return items.filter((item) => Object.values(item).filter((n) => n ? n.toString().toLowerCase().includes(searchText) : false).length > 0);
|
|
63
|
+
return items.filter((item) => item[keyName].toString().toLowerCase().startsWith(searchText));
|
|
64
|
+
}
|
|
50
65
|
}
|
|
51
66
|
}
|
|
52
67
|
AnnaFilterSearchedTextPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFilterSearchedTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
@@ -1695,7 +1710,6 @@ class AnnaNonEditableGenericTableComponent {
|
|
|
1695
1710
|
ngOnInit() {
|
|
1696
1711
|
}
|
|
1697
1712
|
ngOnChanges(changes) {
|
|
1698
|
-
console.log(changes['tableData']);
|
|
1699
1713
|
if (this.showSkeletonLoading) {
|
|
1700
1714
|
this.tableData = this.numberOfSkeletonColumns;
|
|
1701
1715
|
this.renderedData = this.numberOfSkeletonColumns;
|
|
@@ -1758,7 +1772,10 @@ class AnnaNonEditableGenericTableComponent {
|
|
|
1758
1772
|
this.tooltipRadioTextMap.set("startEndTimeMulti", "Time");
|
|
1759
1773
|
this.tooltipRadioTextMap.set("bookedValue", "Booked");
|
|
1760
1774
|
this.tooltipRadioTextMap.set("bookedSpots", "Spots");
|
|
1761
|
-
this.tooltipRadioTextMap.set("userChanges", "
|
|
1775
|
+
this.tooltipRadioTextMap.set("userChanges", "User Changes");
|
|
1776
|
+
this.tooltipRadioTextMap.set("buyerChanges", "Buyer Changes");
|
|
1777
|
+
this.tooltipRadioTextMap.set("userMG", "User MG");
|
|
1778
|
+
this.tooltipRadioTextMap.set("userADUs", "User ADUs");
|
|
1762
1779
|
this.tooltipRadioTextMap.set("inventoryCode", "Inventory Code");
|
|
1763
1780
|
this.tooltipRadioTextMap.set("program", "Program");
|
|
1764
1781
|
this.tooltipRadioTextMap.set("agency", "Agency");
|