pace-table-lib 1.0.30 → 1.0.32
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.
- package/dist/components/StaticTable/StaticTableTypeDec.types.d.ts +1 -0
- package/dist/pace-table-lib.es.js +23 -10
- package/dist/pace-table-lib.es.js.map +1 -1
- package/dist/pace-table-lib.umd.js +23 -10
- package/dist/pace-table-lib.umd.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
|
@@ -8020,9 +8020,16 @@ function getSpan(arr, index, level) {
|
|
|
8020
8020
|
return span;
|
|
8021
8021
|
}
|
|
8022
8022
|
function getCleanString(dimensionMark) {
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8023
|
+
try {
|
|
8024
|
+
if (!dimensionMark) return dimensionMark;
|
|
8025
|
+
if (dimensionMark.includes("~$~")) {
|
|
8026
|
+
const parts = dimensionMark.split("~$~");
|
|
8027
|
+
return parts[1] ?? dimensionMark;
|
|
8028
|
+
}
|
|
8029
|
+
} catch (error) {
|
|
8030
|
+
console.log(error);
|
|
8031
|
+
}
|
|
8032
|
+
return dimensionMark;
|
|
8026
8033
|
}
|
|
8027
8034
|
function isFirstOccurrence(arr, index, level) {
|
|
8028
8035
|
return index === 0 || arr[index].slice(0, level + 1).join("~$~") !== arr[index - 1].slice(0, level + 1).join("~$~");
|
|
@@ -18129,17 +18136,23 @@ function StaticTable({
|
|
|
18129
18136
|
return `linear-gradient(to right, ${barColor} ${pct * 100}%, transparent ${pct * 100}%)`;
|
|
18130
18137
|
}
|
|
18131
18138
|
function getMeasureFormattingObj(givenMeasureName) {
|
|
18132
|
-
const
|
|
18139
|
+
const defaultFormat = {
|
|
18133
18140
|
numberFormat: NumberFormat,
|
|
18134
18141
|
decimalPrecision: DataFieldDecimalPrecision,
|
|
18135
18142
|
displayUnits: DisplayUnits
|
|
18136
18143
|
};
|
|
18137
|
-
if (isConditionalFormatOn) return
|
|
18138
|
-
if (!measureFormatConfigs)
|
|
18139
|
-
|
|
18140
|
-
|
|
18141
|
-
const
|
|
18142
|
-
|
|
18144
|
+
if (isConditionalFormatOn) return defaultFormat;
|
|
18145
|
+
if (!givenMeasureName || !measureFormatConfigs?.length) {
|
|
18146
|
+
return defaultFormat;
|
|
18147
|
+
}
|
|
18148
|
+
const measureIndex = getIndex(givenMeasureName);
|
|
18149
|
+
if (measureIndex == null || measureIndex < 0) {
|
|
18150
|
+
return defaultFormat;
|
|
18151
|
+
}
|
|
18152
|
+
const formattingObj = measureFormatConfigs.find(
|
|
18153
|
+
(item) => item.measureIndex === measureIndex
|
|
18154
|
+
);
|
|
18155
|
+
return formattingObj ?? defaultFormat;
|
|
18143
18156
|
}
|
|
18144
18157
|
function getConditionalFormat(value, formatFor, level) {
|
|
18145
18158
|
if (!isConditionalFormatOn) return;
|