@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 });
@@ -1693,7 +1708,6 @@ class AnnaNonEditableGenericTableComponent {
1693
1708
  ngOnInit() {
1694
1709
  }
1695
1710
  ngOnChanges(changes) {
1696
- console.log(changes['tableData']);
1697
1711
  if (this.showSkeletonLoading) {
1698
1712
  this.tableData = this.numberOfSkeletonColumns;
1699
1713
  this.renderedData = this.numberOfSkeletonColumns;
@@ -1756,7 +1770,10 @@ class AnnaNonEditableGenericTableComponent {
1756
1770
  this.tooltipRadioTextMap.set("startEndTimeMulti", "Time");
1757
1771
  this.tooltipRadioTextMap.set("bookedValue", "Booked");
1758
1772
  this.tooltipRadioTextMap.set("bookedSpots", "Spots");
1759
- this.tooltipRadioTextMap.set("userChanges", "Other changes");
1773
+ this.tooltipRadioTextMap.set("userChanges", "User Changes");
1774
+ this.tooltipRadioTextMap.set("buyerChanges", "Buyer Changes");
1775
+ this.tooltipRadioTextMap.set("userMG", "User MG");
1776
+ this.tooltipRadioTextMap.set("userADUs", "User ADUs");
1760
1777
  this.tooltipRadioTextMap.set("inventoryCode", "Inventory Code");
1761
1778
  this.tooltipRadioTextMap.set("program", "Program");
1762
1779
  this.tooltipRadioTextMap.set("agency", "Agency");