pace-table-lib 1.0.57 → 1.0.59

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.
@@ -8341,7 +8341,7 @@ function calculateWidthHeightDynamically(content, fontSize, fontFamily, fixedWid
8341
8341
  document.body.appendChild(div);
8342
8342
  const height = div.getBoundingClientRect().height;
8343
8343
  div.remove();
8344
- return height + 15;
8344
+ return height;
8345
8345
  }
8346
8346
  function applyTextRelatedCss(headerArr, flag) {
8347
8347
  return headerArr.map((item) => ({
@@ -17474,15 +17474,19 @@ function StaticTable({
17474
17474
  newNonFixedColCellWidth,
17475
17475
  fixedColWidth
17476
17476
  } = useMemo(() => {
17477
- let colCellH = Table2.RowHeight;
17478
- let rowCellH = Table2.RowHeight;
17479
- let nonFixColCellW = Table2.TableWidth;
17480
- let fixedColCellW = Table2.FixHeaderWidth;
17477
+ let colCellH = Number(Table2.RowHeight);
17478
+ let rowCellH = Number(Table2.RowHeight);
17479
+ let nonFixColCellW = Number(Table2.TableWidth);
17480
+ let fixedColCellW = Number(Table2.FixHeaderWidth);
17481
17481
  if (isWrapColHeaderTextOn) {
17482
- colCellH = Number(newColCellHeight);
17482
+ if (Number(newColCellHeight) > colCellH) {
17483
+ colCellH = Number(newColCellHeight);
17484
+ }
17483
17485
  }
17484
17486
  if (isWrapRowHeaderTextOn) {
17485
- rowCellH = newRowHeight;
17487
+ if (newRowHeight > rowCellH) {
17488
+ rowCellH = newRowHeight;
17489
+ }
17486
17490
  }
17487
17491
  if (isFitTableOn) {
17488
17492
  const sharedWidth = Math.floor((tableWidth - 5) / columnCount);
@@ -19666,7 +19670,6 @@ const PivotTable = ({
19666
19670
  maxWidth: isFitTableOn ? colCellWidth : Table2.TableWidth,
19667
19671
  height: shouldWrapColumnHeader ? "auto" : colCellHeight,
19668
19672
  alignItems: shouldWrapColumnHeader ? "flex-start" : "center",
19669
- textAlign: colHeaderFont.textAlign?.toLowerCase() ?? "left",
19670
19673
  fontSize: colHeaderFont.fontSize,
19671
19674
  fontFamily: colHeaderFont.fontFamily,
19672
19675
  fontWeight: col.isSubtotal ? "bold" : colHeaderFont.fontWeight,
@@ -19696,7 +19699,16 @@ const PivotTable = ({
19696
19699
  children: collapsedCols.has(getCollapseKey(col)) ? "+" : "−"
19697
19700
  }
19698
19701
  ),
19699
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "pivot-column-header__text", children: displayLabel })
19702
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
19703
+ "span",
19704
+ {
19705
+ className: "pivot-column-header__text",
19706
+ style: {
19707
+ textAlign: colHeaderFont.textAlign?.toLowerCase() ?? "left"
19708
+ },
19709
+ children: displayLabel
19710
+ }
19711
+ )
19700
19712
  ] })
19701
19713
  },
19702
19714
  `col-${idx}`