@annalib/anna-core 35.5.0 → 35.5.2
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(
|
|
574
|
-
clone.style.visibility =
|
|
575
|
-
clone.style.whiteSpace =
|
|
576
|
-
clone.style.position =
|
|
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 ||
|
|
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
|
|
@@ -1656,13 +1660,13 @@ class AnnaSortService {
|
|
|
1656
1660
|
"flightEndDate",
|
|
1657
1661
|
"date",
|
|
1658
1662
|
"GeneratedOn",
|
|
1659
|
-
"AirDate"
|
|
1663
|
+
"AirDate",
|
|
1660
1664
|
]);
|
|
1661
1665
|
}
|
|
1662
1666
|
sortDataForComponentOtherThanLurAndCsrPage(isAsc, data, key) {
|
|
1663
1667
|
let param1;
|
|
1664
1668
|
let param2;
|
|
1665
|
-
let dataToBeSorted =
|
|
1669
|
+
let dataToBeSorted = data;
|
|
1666
1670
|
if (this.dateSet.has(key)) {
|
|
1667
1671
|
dataToBeSorted.sort((a, b) => this.annaDateTimeFormatService.compareDate(a[key], b[key], isAsc));
|
|
1668
1672
|
}
|
|
@@ -1787,17 +1791,17 @@ class AnnaSortService {
|
|
|
1787
1791
|
applySorting(key, tempSortOrder, tableData, isLurAndCsrComponent) {
|
|
1788
1792
|
let sortedTableData = tableData;
|
|
1789
1793
|
if (tempSortOrder === "ASC") {
|
|
1790
|
-
sortedTableData =
|
|
1794
|
+
sortedTableData = isLurAndCsrComponent
|
|
1791
1795
|
? this.sortEnterEditLurAndCsrPage(true, tableData, key)
|
|
1792
|
-
: this.sortDataForComponentOtherThanLurAndCsrPage(true, tableData, key)
|
|
1796
|
+
: this.sortDataForComponentOtherThanLurAndCsrPage(true, tableData, key);
|
|
1793
1797
|
}
|
|
1794
1798
|
else if (tempSortOrder === "DESC") {
|
|
1795
|
-
sortedTableData =
|
|
1799
|
+
sortedTableData = isLurAndCsrComponent
|
|
1796
1800
|
? this.sortEnterEditLurAndCsrPage(false, tableData, key)
|
|
1797
|
-
: this.sortDataForComponentOtherThanLurAndCsrPage(false, tableData, key)
|
|
1801
|
+
: this.sortDataForComponentOtherThanLurAndCsrPage(false, tableData, key);
|
|
1798
1802
|
}
|
|
1799
1803
|
else if (tempSortOrder === "DEFAULT") {
|
|
1800
|
-
sortedTableData =
|
|
1804
|
+
sortedTableData = this.noSortingAppliedData;
|
|
1801
1805
|
}
|
|
1802
1806
|
return sortedTableData;
|
|
1803
1807
|
}
|
|
@@ -6313,7 +6317,9 @@ class AnnaNumberFormatService {
|
|
|
6313
6317
|
const result = AnnaNumberFormatService.GetValueInUnits(Math.abs(inputValue));
|
|
6314
6318
|
let value = result[0];
|
|
6315
6319
|
const unit = result[1];
|
|
6316
|
-
|
|
6320
|
+
const factor = 10 ** digitsToRoundDecimalPoint;
|
|
6321
|
+
value = Math.round(((+value) + Number.EPSILON) * factor) / factor;
|
|
6322
|
+
// value = +(+value).toFixed(digitsToRoundDecimalPoint);
|
|
6317
6323
|
if (inputValue < 0) {
|
|
6318
6324
|
value *= -1;
|
|
6319
6325
|
}
|