pace-table-lib 1.0.26 → 1.0.28

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.
@@ -8343,6 +8343,14 @@
8343
8343
  }
8344
8344
  }));
8345
8345
  }
8346
+ function getIndex(str) {
8347
+ return Number(str.split("~$~")[0]);
8348
+ }
8349
+ function getFontSize(value) {
8350
+ if (typeof value === "number") return value;
8351
+ if (typeof value === "string") return parseInt(value, 11);
8352
+ return 0;
8353
+ }
8346
8354
  var jquery$1 = { exports: {} };
8347
8355
  /*!
8348
8356
  * jQuery JavaScript Library v3.7.1
@@ -17344,7 +17352,7 @@
17344
17352
  const outsideBorder = isOutsideBorderVisible ? createBorder(Border.LineWidth, Border.LineStyle, Border.LineColor) : null;
17345
17353
  const insideVBorder = isInsideVerticalBVisible ? createBorder(Border.VerticalBorderLineWidth, Border.VerticalBorderLineStyle, Border.VerticalBorderLineColor) : null;
17346
17354
  const insideHBorder = isInsideHorizontalBVisible ? createBorder(Border.HorizontalBorderLineWidth, Border.HorizontalBorderLineStyle, Border.HorizontalBorderLineColor) : null;
17347
- const renderDataCell = (label, styles, className, childClassName, toolTip, dataBarBg) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...ToolTipVisibility ? { title: toolTip } : {}, className, style: styles, onContextMenu: styles.hasOwnProperty("oncontextmenu") ? styles.oncontextmenu : null, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: childClassName, style: { fontFamily: styles.fontFamily, textAlign: styles.justifyContent, background: dataBarBg ?? "none" }, children: label }) });
17355
+ const renderDataCell = (label, styles, className, childClassName, toolTip, dataBarBg) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...ToolTipVisibility ? { title: getCleanString(toolTip) ?? "" } : {}, className, style: styles, onContextMenu: styles.hasOwnProperty("oncontextmenu") ? styles.oncontextmenu : null, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: childClassName, style: { fontFamily: styles.fontFamily, textAlign: styles.justifyContent, background: dataBarBg ?? "none" }, children: label }) });
17348
17356
  React.useEffect(() => {
17349
17357
  const hide = () => setMenu((m) => ({ ...m, visible: false }));
17350
17358
  document.addEventListener("click", hide);
@@ -17357,20 +17365,20 @@
17357
17365
  const rowHeaderFont = React.useMemo(() => ({
17358
17366
  color: RowHeader.RowHeaderColor,
17359
17367
  fontFamily: RowHeader.RowHeaderFontFamily,
17360
- fontSize: RowHeader.RowHeaderFontSize,
17368
+ fontSize: getFontSize(RowHeader.RowHeaderFontSize),
17361
17369
  justifyContent: RowHeader.Textalign,
17362
17370
  ...getFontStyleObj(RowHeader.RowHeaderFontStyle)
17363
17371
  }), [RowHeader]);
17364
17372
  const colHeaderFont = React.useMemo(() => ({
17365
17373
  color: ColumnHeader.ColumnHeaderColor,
17366
17374
  fontFamily: ColumnHeader.ColumnHeaderFontFamily,
17367
- fontSize: ColumnHeader.ColumnHeaderFontSize,
17375
+ fontSize: getFontSize(ColumnHeader.ColumnHeaderFontSize),
17368
17376
  justifyContent: ColumnHeader.Textalign,
17369
17377
  ...getFontStyleObj(ColumnHeader.ColumnHeaderFontStyle)
17370
17378
  }), [ColumnHeader]);
17371
17379
  const dataCellFont = React.useMemo(() => ({
17372
17380
  fontFamily: DataFieldFontFamily,
17373
- fontSize: DataFieldFontSize,
17381
+ fontSize: getFontSize(DataFieldFontSize),
17374
17382
  justifyContent: Textalign,
17375
17383
  color: DataFieldColor,
17376
17384
  ...getFontStyleObj(DataFieldFontStyle)
@@ -17385,7 +17393,7 @@
17385
17393
  if (!isColHeaderVisible) {
17386
17394
  return headerAtStart && isColTotalOn ? 1 : 0;
17387
17395
  }
17388
- const base = Math.max(...dimensionMarks.map((d) => d.length));
17396
+ const base = Math.max(...dimensionMarks?.map((d) => d?.length));
17389
17397
  return base + (headerAtStart && isColTotalOn ? 1 : 0);
17390
17398
  }, [dimensionMarks, headerAtStart, isColTotalOn, isColHeaderVisible]);
17391
17399
  const fixedColCount = React.useMemo(() => {
@@ -18139,7 +18147,8 @@
18139
18147
  if (isConditionalFormatOn) return numberFormatConfig;
18140
18148
  if (!measureFormatConfigs) return numberFormatConfig;
18141
18149
  if (!givenMeasureName) return numberFormatConfig;
18142
- const formattingObj = measureFormatConfigs.find((item) => item.measureName === getCleanString(givenMeasureName));
18150
+ const mIndex = getIndex(givenMeasureName);
18151
+ const formattingObj = measureFormatConfigs?.[mIndex];
18143
18152
  return formattingObj ?? numberFormatConfig;
18144
18153
  }
18145
18154
  function getConditionalFormat(value, formatFor, level) {
@@ -18273,8 +18282,8 @@
18273
18282
  return getSparkLine(dataArr, baseStyle);
18274
18283
  }
18275
18284
  if (rawValue === void 0) return null;
18276
- const dimName = dimensionMarks[colIdxHeat]?.[fixedRowCount - 1] ?? void 0;
18277
- const formattingObj = getMeasureFormattingObj(dimName);
18285
+ const mName = measuresBySlice[rowIdxHeat]?.measureNames[colIdxHeat] ?? void 0;
18286
+ const formattingObj = getMeasureFormattingObj(mName);
18278
18287
  const conditionalFormatObj = getConditionalFormat(rawValue, CONDITIONAL_FORMAT_FOR.VALUE);
18279
18288
  const numberFormat = conditionalFormatObj?.numberFormat ?? formattingObj.numberFormat;
18280
18289
  const decimalPrecision = conditionalFormatObj?.decimalPrecision ?? formattingObj.decimalPrecision;