@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.
@@ -43,10 +43,25 @@ class AnnaFilterSearchedTextPipe {
43
43
  if (!searchText)
44
44
  return items;
45
45
  searchText = searchText.toString().toLowerCase();
46
- //if keyName is undefined every key will be considered for filtering.
47
- if (!keyName)
48
- return items.filter((item) => Object.values(item).filter((n) => n ? n.toString().toLowerCase().includes(searchText) : false).length > 0);
49
- return items.filter((item) => item[keyName].toString().toLowerCase().startsWith(searchText));
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", "Other changes");
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");