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.
@@ -17,3 +17,5 @@ export declare function createBorder(bWidth: number, bType: string, bColor: stri
17
17
  export declare function calculateWidthHeightDynamically(content: string, fontSize: number, fontFamily: string, fixedWidth?: number): number;
18
18
  export declare function applyTextRelatedCss(headerArr: any[], flag: boolean): any[];
19
19
  export declare function applyTextCssForCorners(headerArr: any[], flag: boolean): any[];
20
+ export declare function getIndex(str: string): number;
21
+ export declare function getFontSize(value?: number | string): number;
@@ -8324,6 +8324,14 @@ function applyTextCssForCorners(headerArr, flag) {
8324
8324
  }
8325
8325
  }));
8326
8326
  }
8327
+ function getIndex(str) {
8328
+ return Number(str.split("~$~")[0]);
8329
+ }
8330
+ function getFontSize(value) {
8331
+ if (typeof value === "number") return value;
8332
+ if (typeof value === "string") return parseInt(value, 11);
8333
+ return 0;
8334
+ }
8327
8335
  var jquery$1 = { exports: {} };
8328
8336
  /*!
8329
8337
  * jQuery JavaScript Library v3.7.1
@@ -17325,7 +17333,7 @@ function StaticTable({
17325
17333
  const outsideBorder = isOutsideBorderVisible ? createBorder(Border.LineWidth, Border.LineStyle, Border.LineColor) : null;
17326
17334
  const insideVBorder = isInsideVerticalBVisible ? createBorder(Border.VerticalBorderLineWidth, Border.VerticalBorderLineStyle, Border.VerticalBorderLineColor) : null;
17327
17335
  const insideHBorder = isInsideHorizontalBVisible ? createBorder(Border.HorizontalBorderLineWidth, Border.HorizontalBorderLineStyle, Border.HorizontalBorderLineColor) : null;
17328
- 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 }) });
17336
+ 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 }) });
17329
17337
  useEffect(() => {
17330
17338
  const hide = () => setMenu((m) => ({ ...m, visible: false }));
17331
17339
  document.addEventListener("click", hide);
@@ -17338,20 +17346,20 @@ function StaticTable({
17338
17346
  const rowHeaderFont = useMemo(() => ({
17339
17347
  color: RowHeader.RowHeaderColor,
17340
17348
  fontFamily: RowHeader.RowHeaderFontFamily,
17341
- fontSize: RowHeader.RowHeaderFontSize,
17349
+ fontSize: getFontSize(RowHeader.RowHeaderFontSize),
17342
17350
  justifyContent: RowHeader.Textalign,
17343
17351
  ...getFontStyleObj(RowHeader.RowHeaderFontStyle)
17344
17352
  }), [RowHeader]);
17345
17353
  const colHeaderFont = useMemo(() => ({
17346
17354
  color: ColumnHeader.ColumnHeaderColor,
17347
17355
  fontFamily: ColumnHeader.ColumnHeaderFontFamily,
17348
- fontSize: ColumnHeader.ColumnHeaderFontSize,
17356
+ fontSize: getFontSize(ColumnHeader.ColumnHeaderFontSize),
17349
17357
  justifyContent: ColumnHeader.Textalign,
17350
17358
  ...getFontStyleObj(ColumnHeader.ColumnHeaderFontStyle)
17351
17359
  }), [ColumnHeader]);
17352
17360
  const dataCellFont = useMemo(() => ({
17353
17361
  fontFamily: DataFieldFontFamily,
17354
- fontSize: DataFieldFontSize,
17362
+ fontSize: getFontSize(DataFieldFontSize),
17355
17363
  justifyContent: Textalign,
17356
17364
  color: DataFieldColor,
17357
17365
  ...getFontStyleObj(DataFieldFontStyle)
@@ -17366,7 +17374,7 @@ function StaticTable({
17366
17374
  if (!isColHeaderVisible) {
17367
17375
  return headerAtStart && isColTotalOn ? 1 : 0;
17368
17376
  }
17369
- const base = Math.max(...dimensionMarks.map((d) => d.length));
17377
+ const base = Math.max(...dimensionMarks?.map((d) => d?.length));
17370
17378
  return base + (headerAtStart && isColTotalOn ? 1 : 0);
17371
17379
  }, [dimensionMarks, headerAtStart, isColTotalOn, isColHeaderVisible]);
17372
17380
  const fixedColCount = useMemo(() => {
@@ -18120,7 +18128,8 @@ function StaticTable({
18120
18128
  if (isConditionalFormatOn) return numberFormatConfig;
18121
18129
  if (!measureFormatConfigs) return numberFormatConfig;
18122
18130
  if (!givenMeasureName) return numberFormatConfig;
18123
- const formattingObj = measureFormatConfigs.find((item) => item.measureName === getCleanString(givenMeasureName));
18131
+ const mIndex = getIndex(givenMeasureName);
18132
+ const formattingObj = measureFormatConfigs?.[mIndex];
18124
18133
  return formattingObj ?? numberFormatConfig;
18125
18134
  }
18126
18135
  function getConditionalFormat(value, formatFor, level) {
@@ -18254,8 +18263,8 @@ function StaticTable({
18254
18263
  return getSparkLine(dataArr, baseStyle);
18255
18264
  }
18256
18265
  if (rawValue === void 0) return null;
18257
- const dimName = dimensionMarks[colIdxHeat]?.[fixedRowCount - 1] ?? void 0;
18258
- const formattingObj = getMeasureFormattingObj(dimName);
18266
+ const mName = measuresBySlice[rowIdxHeat]?.measureNames[colIdxHeat] ?? void 0;
18267
+ const formattingObj = getMeasureFormattingObj(mName);
18259
18268
  const conditionalFormatObj = getConditionalFormat(rawValue, CONDITIONAL_FORMAT_FOR.VALUE);
18260
18269
  const numberFormat = conditionalFormatObj?.numberFormat ?? formattingObj.numberFormat;
18261
18270
  const decimalPrecision = conditionalFormatObj?.decimalPrecision ?? formattingObj.decimalPrecision;