@annalib/anna-core 35.8.0 → 35.8.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.
@@ -570,19 +570,23 @@ class ShowEllipsisTextOnHoverDirective {
570
570
  }
571
571
  onMouseEnter() {
572
572
  const domElement = this.elementRef.nativeElement;
573
- const clone = document.createElement('span');
574
- clone.style.visibility = 'hidden';
575
- clone.style.whiteSpace = 'nowrap';
576
- clone.style.position = 'absolute';
573
+ const clone = document.createElement("span");
574
+ clone.style.visibility = "hidden";
575
+ clone.style.whiteSpace = "nowrap";
576
+ clone.style.position = "absolute";
577
577
  clone.style.font = window?.getComputedStyle(domElement)?.font;
578
578
  clone.textContent = domElement.textContent;
579
579
  document.body.appendChild(clone);
580
580
  const fullWidth = clone.offsetWidth;
581
- if (domElement.offsetWidth < domElement.scrollWidth || this.checkPositionsInDecimals(domElement) || fullWidth > domElement.offsetWidth) {
581
+ if (domElement.offsetWidth < domElement.scrollWidth ||
582
+ this.checkPositionsInDecimals(domElement) ||
583
+ fullWidth > domElement.offsetWidth) {
582
584
  domElement.title = domElement.textContent === "" ? domElement.value : domElement.textContent;
583
585
  }
584
- else if (domElement.title)
586
+ else if (domElement.title) {
585
587
  domElement.removeAttribute("title");
588
+ }
589
+ document.body.removeChild(clone);
586
590
  }
587
591
  checkPositionsInDecimals(domElement) {
588
592
  // if we don't have any children element Then we can't calculate
@@ -1843,6 +1847,8 @@ class AnnaFilterService {
1843
1847
  "bookedVal",
1844
1848
  "ModifiedCpm",
1845
1849
  "ModifiedCpp",
1850
+ "Cpm",
1851
+ "Cpp",
1846
1852
  ]);
1847
1853
  this.isFilterSortActive = {};
1848
1854
  this.resetFilterSortActiveStatus = true;
@@ -2078,7 +2084,11 @@ class AnnaFilterService {
2078
2084
  "actualImpressions",
2079
2085
  "totalAmount",
2080
2086
  "totalImps",
2081
- "totalGrp"
2087
+ "totalGrp",
2088
+ "BookedNormalizedRating",
2089
+ "BookedNormalizedImps",
2090
+ "Cpp",
2091
+ "Cpm",
2082
2092
  ];
2083
2093
  const calendarArr = [
2084
2094
  "period",
@@ -3335,9 +3345,19 @@ class AnnaFilterService {
3335
3345
  item.disableTooltipIcon = true;
3336
3346
  item.filterSortObjectKeys.forEach((key) => {
3337
3347
  const latestFilters = this.appliedFiltersArray;
3338
- if (latestFilters.length > 0 &&
3339
- item.disableTooltipIcon &&
3340
- latestFilters[latestFilters.length - 1] === key) {
3348
+ // if (
3349
+ // latestFilters.length > 0 &&
3350
+ // item.disableTooltipIcon &&
3351
+ // latestFilters[latestFilters.length - 1] === key
3352
+ // ) {
3353
+ // item.disableTooltipIcon = false;
3354
+ // }
3355
+ // Enable the tooltip icon if *any* filter is currently applied on this column
3356
+ // Earlier we were only enabling the icon when the column happened to be the **last**
3357
+ // applied filter. This caused scenarios where the icon became disabled when users
3358
+ // switched between easy-filters after applying a column filter (e.g. AIR DATE & TIME).
3359
+ // Now, as long as the column has an active filter, the icon will stay enabled.
3360
+ if (item.disableTooltipIcon && latestFilters.includes(key)) {
3341
3361
  item.disableTooltipIcon = false;
3342
3362
  }
3343
3363
  if (item.disableTooltipIcon) {
@@ -6318,7 +6338,9 @@ class AnnaNumberFormatService {
6318
6338
  const result = AnnaNumberFormatService.GetValueInUnits(Math.abs(inputValue));
6319
6339
  let value = result[0];
6320
6340
  const unit = result[1];
6321
- value = +(+value).toFixed(digitsToRoundDecimalPoint);
6341
+ const factor = 10 ** digitsToRoundDecimalPoint;
6342
+ value = Math.round(((+value) + Number.EPSILON) * factor) / factor;
6343
+ // value = +(+value).toFixed(digitsToRoundDecimalPoint);
6322
6344
  if (inputValue < 0) {
6323
6345
  value *= -1;
6324
6346
  }