pace-table-lib 1.0.31 → 1.0.33
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 +22 -11
- package/dist/pace-table-lib.es.js.map +1 -1
- package/dist/pace-table-lib.umd.js +22 -11
- package/dist/pace-table-lib.umd.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
|
@@ -8344,9 +8344,14 @@ function getIndex(str) {
|
|
|
8344
8344
|
return Number(str.split("~$~")[0]);
|
|
8345
8345
|
}
|
|
8346
8346
|
function getFontSize(value) {
|
|
8347
|
-
if (typeof value === "number"
|
|
8348
|
-
|
|
8349
|
-
|
|
8347
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
8348
|
+
return value;
|
|
8349
|
+
}
|
|
8350
|
+
if (typeof value === "string") {
|
|
8351
|
+
const parsed = Number.parseFloat(value);
|
|
8352
|
+
return Number.isFinite(parsed) ? parsed : 10;
|
|
8353
|
+
}
|
|
8354
|
+
return 10;
|
|
8350
8355
|
}
|
|
8351
8356
|
var jquery$1 = { exports: {} };
|
|
8352
8357
|
/*!
|
|
@@ -18136,17 +18141,23 @@ function StaticTable({
|
|
|
18136
18141
|
return `linear-gradient(to right, ${barColor} ${pct * 100}%, transparent ${pct * 100}%)`;
|
|
18137
18142
|
}
|
|
18138
18143
|
function getMeasureFormattingObj(givenMeasureName) {
|
|
18139
|
-
const
|
|
18144
|
+
const defaultFormat = {
|
|
18140
18145
|
numberFormat: NumberFormat,
|
|
18141
18146
|
decimalPrecision: DataFieldDecimalPrecision,
|
|
18142
18147
|
displayUnits: DisplayUnits
|
|
18143
18148
|
};
|
|
18144
|
-
if (isConditionalFormatOn) return
|
|
18145
|
-
if (!measureFormatConfigs)
|
|
18146
|
-
|
|
18147
|
-
|
|
18148
|
-
const
|
|
18149
|
-
|
|
18149
|
+
if (isConditionalFormatOn) return defaultFormat;
|
|
18150
|
+
if (!givenMeasureName || !measureFormatConfigs?.length) {
|
|
18151
|
+
return defaultFormat;
|
|
18152
|
+
}
|
|
18153
|
+
const measureIndex = getIndex(givenMeasureName);
|
|
18154
|
+
if (measureIndex == null || measureIndex < 0) {
|
|
18155
|
+
return defaultFormat;
|
|
18156
|
+
}
|
|
18157
|
+
const formattingObj = measureFormatConfigs.find(
|
|
18158
|
+
(item) => item.measureIndex === measureIndex
|
|
18159
|
+
);
|
|
18160
|
+
return formattingObj ?? defaultFormat;
|
|
18150
18161
|
}
|
|
18151
18162
|
function getConditionalFormat(value, formatFor, level) {
|
|
18152
18163
|
if (!isConditionalFormatOn) return;
|
|
@@ -18279,7 +18290,7 @@ function StaticTable({
|
|
|
18279
18290
|
return getSparkLine(dataArr, baseStyle);
|
|
18280
18291
|
}
|
|
18281
18292
|
if (rawValue === void 0) return null;
|
|
18282
|
-
const mName = measuresBySlice[rowIdxHeat]?.measureNames[colIdxHeat]
|
|
18293
|
+
const mName = measuresBySlice?.[rowIdxHeat]?.measureNames?.[colIdxHeat];
|
|
18283
18294
|
const formattingObj = getMeasureFormattingObj(mName);
|
|
18284
18295
|
const conditionalFormatObj = getConditionalFormat(rawValue, CONDITIONAL_FORMAT_FOR.VALUE);
|
|
18285
18296
|
const numberFormat = conditionalFormatObj?.numberFormat ?? formattingObj.numberFormat;
|