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.
@@ -8363,9 +8363,14 @@
8363
8363
  return Number(str.split("~$~")[0]);
8364
8364
  }
8365
8365
  function getFontSize(value) {
8366
- if (typeof value === "number") return value;
8367
- if (typeof value === "string") return parseInt(value, 11);
8368
- return 0;
8366
+ if (typeof value === "number" && Number.isFinite(value)) {
8367
+ return value;
8368
+ }
8369
+ if (typeof value === "string") {
8370
+ const parsed = Number.parseFloat(value);
8371
+ return Number.isFinite(parsed) ? parsed : 10;
8372
+ }
8373
+ return 10;
8369
8374
  }
8370
8375
  var jquery$1 = { exports: {} };
8371
8376
  /*!
@@ -18155,17 +18160,23 @@
18155
18160
  return `linear-gradient(to right, ${barColor} ${pct * 100}%, transparent ${pct * 100}%)`;
18156
18161
  }
18157
18162
  function getMeasureFormattingObj(givenMeasureName) {
18158
- const numberFormatConfig = {
18163
+ const defaultFormat = {
18159
18164
  numberFormat: NumberFormat,
18160
18165
  decimalPrecision: DataFieldDecimalPrecision,
18161
18166
  displayUnits: DisplayUnits
18162
18167
  };
18163
- if (isConditionalFormatOn) return numberFormatConfig;
18164
- if (!measureFormatConfigs) return numberFormatConfig;
18165
- if (!givenMeasureName) return numberFormatConfig;
18166
- const mIndex = getIndex(givenMeasureName);
18167
- const formattingObj = measureFormatConfigs?.[mIndex];
18168
- return formattingObj ?? numberFormatConfig;
18168
+ if (isConditionalFormatOn) return defaultFormat;
18169
+ if (!givenMeasureName || !measureFormatConfigs?.length) {
18170
+ return defaultFormat;
18171
+ }
18172
+ const measureIndex = getIndex(givenMeasureName);
18173
+ if (measureIndex == null || measureIndex < 0) {
18174
+ return defaultFormat;
18175
+ }
18176
+ const formattingObj = measureFormatConfigs.find(
18177
+ (item) => item.measureIndex === measureIndex
18178
+ );
18179
+ return formattingObj ?? defaultFormat;
18169
18180
  }
18170
18181
  function getConditionalFormat(value, formatFor, level) {
18171
18182
  if (!isConditionalFormatOn) return;
@@ -18298,7 +18309,7 @@
18298
18309
  return getSparkLine(dataArr, baseStyle);
18299
18310
  }
18300
18311
  if (rawValue === void 0) return null;
18301
- const mName = measuresBySlice[rowIdxHeat]?.measureNames[colIdxHeat] ?? void 0;
18312
+ const mName = measuresBySlice?.[rowIdxHeat]?.measureNames?.[colIdxHeat];
18302
18313
  const formattingObj = getMeasureFormattingObj(mName);
18303
18314
  const conditionalFormatObj = getConditionalFormat(rawValue, CONDITIONAL_FORMAT_FOR.VALUE);
18304
18315
  const numberFormat = conditionalFormatObj?.numberFormat ?? formattingObj.numberFormat;