pace-table-lib 1.0.54 → 1.0.55
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.
|
@@ -7878,7 +7878,7 @@ var STYLE_FOR = /* @__PURE__ */ ((STYLE_FOR2) => {
|
|
|
7878
7878
|
const TOTAL = "Total";
|
|
7879
7879
|
const MONTHS_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
7880
7880
|
const MONTHS_FULL = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
7881
|
-
const DATE_FORMATS = [
|
|
7881
|
+
const DATE_FORMATS$1 = [
|
|
7882
7882
|
"MMM-YY",
|
|
7883
7883
|
"DD-MM-YYYY",
|
|
7884
7884
|
"MM-DD-YYYY",
|
|
@@ -8132,7 +8132,7 @@ function formatValue(value, format, decimalValues = 2, displayUnit = DISPLAY_UNI
|
|
|
8132
8132
|
safeDecimalValues = Math.min(20, Math.max(0, Math.floor(safeDecimalValues)));
|
|
8133
8133
|
let floatValue = Number(value);
|
|
8134
8134
|
if (isNaN(floatValue)) return value;
|
|
8135
|
-
if (DATE_FORMATS.includes(format)) {
|
|
8135
|
+
if (DATE_FORMATS$1.includes(format)) {
|
|
8136
8136
|
if (floatValue > 2958465 || floatValue <= 0) return value;
|
|
8137
8137
|
return formatDate(floatValue, format);
|
|
8138
8138
|
}
|
|
@@ -18748,6 +18748,23 @@ var DisplayUnits = /* @__PURE__ */ ((DisplayUnits2) => {
|
|
|
18748
18748
|
return DisplayUnits2;
|
|
18749
18749
|
})(DisplayUnits || {});
|
|
18750
18750
|
const NO_ENTRY_TOKENS = ["nolegendentryrow", "nocolentry"];
|
|
18751
|
+
const DATE_FORMATS = [
|
|
18752
|
+
"DD-MM-YYYY",
|
|
18753
|
+
"MM-DD-YYYY",
|
|
18754
|
+
"YYYY-MM-DD",
|
|
18755
|
+
"YYYY",
|
|
18756
|
+
"DD-MM",
|
|
18757
|
+
"MMM-YY",
|
|
18758
|
+
"MMM-YYYY",
|
|
18759
|
+
"YY-MMM",
|
|
18760
|
+
"MM-YYYY",
|
|
18761
|
+
"YYYY-MM",
|
|
18762
|
+
"MMMM-YYYY",
|
|
18763
|
+
"MMMM-YY",
|
|
18764
|
+
"DD-MMM",
|
|
18765
|
+
"DD-MMM-YY",
|
|
18766
|
+
"DD-MMM-YYYY"
|
|
18767
|
+
];
|
|
18751
18768
|
function hexToRgb(hex) {
|
|
18752
18769
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
18753
18770
|
return result ? {
|
|
@@ -18795,24 +18812,10 @@ function getRowDisplayName(segments, measureValue) {
|
|
|
18795
18812
|
}
|
|
18796
18813
|
function formatCellValue(value, formatConfig) {
|
|
18797
18814
|
if (value === null || value === void 0 || value === "") return "-";
|
|
18798
|
-
|
|
18799
|
-
"
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
"YYYY",
|
|
18803
|
-
"DD-MM",
|
|
18804
|
-
"MMM-YY",
|
|
18805
|
-
"MMM-YYYY",
|
|
18806
|
-
"YY-MMM",
|
|
18807
|
-
"MM-YYYY",
|
|
18808
|
-
"YYYY-MM",
|
|
18809
|
-
"MMMM-YYYY",
|
|
18810
|
-
"MMMM-YY",
|
|
18811
|
-
"DD-MMM",
|
|
18812
|
-
"DD-MMM-YY",
|
|
18813
|
-
"DD-MMM-YYYY"
|
|
18814
|
-
];
|
|
18815
|
-
if (formatConfig?.numberFormat && DATE_FORMATS2.includes(formatConfig.numberFormat)) {
|
|
18815
|
+
if (formatConfig?.numberFormat && DATE_FORMATS.includes(formatConfig.numberFormat) && (value === 0 || value === "0" || value === "" || Number(value) === 0)) {
|
|
18816
|
+
return "0";
|
|
18817
|
+
}
|
|
18818
|
+
if (formatConfig?.numberFormat && DATE_FORMATS.includes(formatConfig.numberFormat)) {
|
|
18816
18819
|
return applyDateFormat(String(value), formatConfig.numberFormat);
|
|
18817
18820
|
}
|
|
18818
18821
|
const num = typeof value === "string" ? parseFloat(value) : value;
|
|
@@ -18993,7 +18996,7 @@ function excelSerialToDate(serial) {
|
|
|
18993
18996
|
return new Date(excelEpoch.getTime() + serial * 864e5);
|
|
18994
18997
|
}
|
|
18995
18998
|
function applyDateFormat(value, format) {
|
|
18996
|
-
if (!value || !format) return value;
|
|
18999
|
+
if (!value || !format || format === "None") return value;
|
|
18997
19000
|
const trimmed = value.trim();
|
|
18998
19001
|
let d;
|
|
18999
19002
|
const serialNum = Number(trimmed);
|
|
@@ -19871,6 +19874,8 @@ const PivotTable = ({
|
|
|
19871
19874
|
let bg;
|
|
19872
19875
|
if (DataField.DataFieldBackgroundcolor === "Row Band") {
|
|
19873
19876
|
bg = bi % 2 === 0 ? dataColors.even : dataColors.odd;
|
|
19877
|
+
} else if (DataField.DataFieldBackgroundcolor === "Alternate Rows") {
|
|
19878
|
+
bg = rowIdx % 2 === 0 ? dataColors.even : dataColors.odd;
|
|
19874
19879
|
} else if (DataField.DataFieldBackgroundcolor === "Column Band") {
|
|
19875
19880
|
bg = cbi % 2 === 0 ? dataColors.even : dataColors.odd;
|
|
19876
19881
|
} else if (DataField.DataFieldBackgroundcolor === "Single") {
|