@annalib/anna-core 28.6.3 → 28.6.5

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.
Files changed (54) hide show
  1. package/annalib-anna-core.d.ts.map +1 -0
  2. package/esm2022/lib/anna-core-shared-lib/services/anna-filter.service.mjs +64 -1
  3. package/esm2022/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +5 -21
  4. package/fesm2022/annalib-anna-core.mjs +67 -20
  5. package/fesm2022/annalib-anna-core.mjs.map +1 -1
  6. package/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts.map +1 -0
  7. package/lib/anna-core-shared-lib/components/anna-deleted-order-icon-template/anna-deleted-order-icon-template.component.d.ts.map +1 -0
  8. package/lib/anna-core-shared-lib/components/anna-est-icon-template/anna-est-icon-template.component.d.ts.map +1 -0
  9. package/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.d.ts.map +1 -0
  10. package/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts.map +1 -0
  11. package/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts.map +1 -0
  12. package/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts.map +1 -0
  13. package/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.d.ts.map +1 -0
  14. package/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts.map +1 -0
  15. package/lib/anna-core-shared-lib/components/anna-spinner-loader/anna-spinner-loader.component.d.ts.map +1 -0
  16. package/lib/anna-core-shared-lib/constants/anna-application.constants.d.ts.map +1 -0
  17. package/lib/anna-core-shared-lib/constants/shared.constant.d.ts.map +1 -0
  18. package/lib/anna-core-shared-lib/directives/digits-only/digits-only.directive.d.ts.map +1 -0
  19. package/lib/anna-core-shared-lib/directives/fixed-rows-popup-table/fixed-rows-popup-table.directive.d.ts.map +1 -0
  20. package/lib/anna-core-shared-lib/directives/show-ellipsis-text/show-ellipsis-text.directive.d.ts.map +1 -0
  21. package/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts.map +1 -0
  22. package/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts.map +1 -0
  23. package/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts.map +1 -0
  24. package/lib/anna-core-shared-lib/models/anna-sort.model.d.ts.map +1 -0
  25. package/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts.map +1 -0
  26. package/lib/anna-core-shared-lib/pipes/annaConvertArrayToCommaSeperatedValue.pipe.d.ts.map +1 -0
  27. package/lib/anna-core-shared-lib/pipes/annaConvertZeroOrNullOrUndefined.pipe.d.ts.map +1 -0
  28. package/lib/anna-core-shared-lib/pipes/annaDateFormatter.pipe.d.ts.map +1 -0
  29. package/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts.map +1 -0
  30. package/lib/anna-core-shared-lib/pipes/annaReplaceChar.pipe.d.ts.map +1 -0
  31. package/lib/anna-core-shared-lib/pipes/annaTypeOfData.pipe.d.ts.map +1 -0
  32. package/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +2 -2
  33. package/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts.map +1 -0
  34. package/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +3 -0
  35. package/lib/anna-core-shared-lib/services/anna-filter.service.d.ts.map +1 -0
  36. package/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts.map +1 -0
  37. package/lib/anna-core-shared-lib/services/anna-generic-tooltip-html.services.d.ts.map +1 -0
  38. package/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts.map +1 -0
  39. package/lib/anna-core-shared-lib/services/anna-number-format.service.d.ts.map +1 -0
  40. package/lib/anna-core-shared-lib/services/anna-persisting-filter.service.d.ts.map +1 -0
  41. package/lib/anna-core-shared-lib/services/anna-regex-patterns.service.d.ts.map +1 -0
  42. package/lib/anna-core-shared-lib/services/anna-sort.service.d.ts.map +1 -0
  43. package/lib/anna-core-shared-lib/services/anna-spinner-loader.service.d.ts.map +1 -0
  44. package/lib/anna-core.module.d.ts.map +1 -0
  45. package/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts.map +1 -0
  46. package/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts.map +1 -0
  47. package/lib/anna-generic-table-lib/components/anna-column-filters/anna-column-checkbox-filter/anna-column-checkbox-filter.component.d.ts.map +1 -0
  48. package/lib/anna-generic-table-lib/components/anna-column-filters/anna-column-date-range-filter/anna-column-date-range-filter.component.d.ts.map +1 -0
  49. package/lib/anna-generic-table-lib/components/anna-column-filters/anna-column-slider-filter/anna-column-slider-filter.component.d.ts.map +1 -0
  50. package/lib/anna-generic-table-lib/components/anna-column-filters/anna-column-time-filter/anna-column-time-filter.component.d.ts.map +1 -0
  51. package/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts.map +1 -0
  52. package/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts.map +1 -0
  53. package/package.json +1 -1
  54. package/public-api.d.ts.map +1 -0
@@ -3119,6 +3119,69 @@ class AnnaFilterService {
3119
3119
  }
3120
3120
  });
3121
3121
  }
3122
+ checkIfUniqueValuePresentForTheHeader(header, enabledHeaders, tableData, clonedTableData) {
3123
+ header.filterSortObjectKeys.forEach((item) => {
3124
+ const dataToCheck = this.getFilterOptionsData(tableData, clonedTableData, item);
3125
+ if (item === "period") {
3126
+ const uniqStartDate = uniq(dataToCheck.map((u) => u.startDate));
3127
+ const uniqEndDate = uniq(dataToCheck.map((u) => u.endDate));
3128
+ if (uniqStartDate.length > 1 ||
3129
+ uniqEndDate.length > 1 ||
3130
+ this.isTooltipActive([item], this.annaSortService.columnSortState)) {
3131
+ enabledHeaders.push(item);
3132
+ }
3133
+ }
3134
+ else {
3135
+ const values = dataToCheck.map((u) => u[item]);
3136
+ // if last applied filter is this header, push it alos as enabledHeader
3137
+ let activeAndLastlyAppliedHeader = false;
3138
+ if (this.appliedFiltersArray.length > 0 &&
3139
+ this.appliedFiltersArray[this.appliedFiltersArray.length - 1] === item) {
3140
+ activeAndLastlyAppliedHeader = true;
3141
+ }
3142
+ if (header.filter === "CHECKBOX" && (uniq(values).length > 1 || activeAndLastlyAppliedHeader)) {
3143
+ enabledHeaders.push(item);
3144
+ }
3145
+ else if (header.filter !== "CHECKBOX" &&
3146
+ (uniq(values).filter((n) => n != null && n !== "-").length > 1 || activeAndLastlyAppliedHeader)) {
3147
+ enabledHeaders.push(item);
3148
+ }
3149
+ }
3150
+ });
3151
+ }
3152
+ disableEnableEachColumnTooltipIcon(tableHeaders, tableData, clonedTableData) {
3153
+ tableHeaders.forEach((header) => {
3154
+ header.headerInfo.forEach((item) => {
3155
+ if (item.showTooltipIcon) {
3156
+ let values = [];
3157
+ item.disableTooltipIcon = true;
3158
+ item.filterSortObjectKeys.forEach((key) => {
3159
+ const latestFilters = this.appliedFiltersArray;
3160
+ if (latestFilters.length > 0 &&
3161
+ item.disableTooltipIcon &&
3162
+ latestFilters[latestFilters.length - 1] === key) {
3163
+ item.disableTooltipIcon = false;
3164
+ }
3165
+ if (item.disableTooltipIcon) {
3166
+ if (key === "period") {
3167
+ const uniqStartDate = uniq(tableData.map((u) => u.startDate));
3168
+ const uniqEndDate = uniq(tableData.map((u) => u.endDate));
3169
+ item.disableTooltipIcon = !(uniqStartDate.length > 1 || uniqEndDate.length > 1);
3170
+ }
3171
+ else {
3172
+ values = tableData.map((u) => u[key]);
3173
+ if ((item.filter === "CHECKBOX" && uniq(values).length > 1) ||
3174
+ (item.filter !== "CHECKBOX" &&
3175
+ uniq(values).filter((n) => n != null && n !== "-").length > 1)) {
3176
+ item.disableTooltipIcon = false;
3177
+ }
3178
+ }
3179
+ }
3180
+ });
3181
+ }
3182
+ });
3183
+ });
3184
+ }
3122
3185
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AnnaFilterService, deps: [{ token: AnnaDateTimeFormatService }, { token: AnnaSortService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3123
3186
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AnnaFilterService, providedIn: "root" }); }
3124
3187
  }
@@ -4291,7 +4354,7 @@ class AnnaNonEditableGenericTableComponent {
4291
4354
  }
4292
4355
  else {
4293
4356
  this.setInitialRowsForTable();
4294
- this.disableEnableEachColumnTooltipIcon();
4357
+ this.annaFilterService.disableEnableEachColumnTooltipIcon(this.tableHeaders, this.tableData, this.clonedTableData);
4295
4358
  this.tableColumns = this.tableHeaders.filter((x) => x.visible).map((x) => x.headerInfo[0].objectKey);
4296
4359
  if ((this.tableData && this.tableData.length === 0) ||
4297
4360
  (this.tableData.length === 2 && this.checkIfAllTheElementsAreZero())) {
@@ -4726,22 +4789,6 @@ class AnnaNonEditableGenericTableComponent {
4726
4789
  this.tooltipRadioTextMap.set("SellerProgInvCode", "Seller Pgm (Inv Code)");
4727
4790
  this.tooltipRadioTextMap.set("SellerProgramName", "Seller Program");
4728
4791
  this.tooltipRadioTextMap.set("buyerProgramName", "Buyer Program");
4729
- this.tooltipRadioTextMap.set("stationOrderId", "Stn Order #");
4730
- this.tooltipRadioTextMap.set("bookedDps", "Booked Dps");
4731
- this.tooltipRadioTextMap.set("totalBookedGrp", "Total Booked Grp");
4732
- this.tooltipRadioTextMap.set("totalBookedImps", "Total Booked Imps");
4733
- this.tooltipRadioTextMap.set("bookedGrpToDate", "Booked GRP To-Date");
4734
- this.tooltipRadioTextMap.set("bookedImpsToDate", "Booked IMPS To-Date");
4735
- this.tooltipRadioTextMap.set("goalGrpToDate", "Goal GRP To-Date");
4736
- this.tooltipRadioTextMap.set("goalImpsToDate", "Goal IMPS To-Date");
4737
- this.tooltipRadioTextMap.set("postedGrpToDate", "Posted GRP To-Date");
4738
- this.tooltipRadioTextMap.set("postedImpsToDate", "Posted IMPS To-Date");
4739
- this.tooltipRadioTextMap.set("udGrpToDate", "UD GRP To-Date");
4740
- this.tooltipRadioTextMap.set("udImpsToDate", "UD IMPS To-Date");
4741
- this.tooltipRadioTextMap.set("odGrpToDate", "OD GRP To-Date");
4742
- this.tooltipRadioTextMap.set("odImpsToDate", "OD IMPS To-Date");
4743
- this.tooltipRadioTextMap.set("scheduledADUs", "Scheduled ADUs");
4744
- this.tooltipRadioTextMap.set("postedADUs", "Posted ADUs");
4745
4792
  }
4746
4793
  selectOrUnselectCheckbox(rowData, columnKeys, isCheckboxSelected) {
4747
4794
  rowData[columnKeys] = !rowData[columnKeys];
@@ -4787,7 +4834,7 @@ class AnnaNonEditableGenericTableComponent {
4787
4834
  }
4788
4835
  else {
4789
4836
  const enabledHeaders = [];
4790
- this.checkIfUniqueValuePresentForTheHeader(header, enabledHeaders);
4837
+ this.annaFilterService.checkIfUniqueValuePresentForTheHeader(header, enabledHeaders, this.tableData, this.clonedTableData);
4791
4838
  this.openTooltip(tooltip, enabledHeaders, header);
4792
4839
  if (window.innerWidth < 1500 &&
4793
4840
  window.innerHeight < 768 &&
@@ -5080,14 +5127,14 @@ class AnnaNonEditableGenericTableComponent {
5080
5127
  this.tableData = tableData;
5081
5128
  this.setScrollToInitialPosition();
5082
5129
  this.setInitialRowsForTable();
5083
- this.disableEnableEachColumnTooltipIcon();
5130
+ this.annaFilterService.disableEnableEachColumnTooltipIcon(this.tableHeaders, this.tableData, this.clonedTableData);
5084
5131
  this.filterAppliedToTable.emit(tableData);
5085
5132
  this.closeTooltip();
5086
5133
  }
5087
5134
  sortingApplied(tableData) {
5088
5135
  this.tableData = tableData;
5089
5136
  this.setInitialRowsForTable();
5090
- this.disableEnableEachColumnTooltipIcon();
5137
+ this.annaFilterService.disableEnableEachColumnTooltipIcon(this.tableHeaders, this.tableData, this.clonedTableData);
5091
5138
  this.sortingAppliedToTable.emit(tableData);
5092
5139
  this.closeTooltip();
5093
5140
  }