pace-table-lib 1.0.56 → 1.0.58

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);
@@ -17861,10 +17865,10 @@ function StaticTable({
17861
17865
  }
17862
17866
  }
17863
17867
  levelStyle.background = parentColorMap[parent];
17864
- const finalStyleForColumn = getFinalStyleObj(STYLE_FOR.COLUMN, levelStyle, colLabel, level);
17868
+ const finalStyleForColumn2 = getFinalStyleObj(STYLE_FOR.COLUMN, levelStyle, colLabel, level);
17865
17869
  const toolTipVal = formatValue(dimensionMarks[i][level], ToolTipNumberFormat, ToolTipDecimalPrecision);
17866
17870
  headers.push({
17867
- ...finalStyleForColumn,
17871
+ ...finalStyleForColumn2,
17868
17872
  label: colLabel,
17869
17873
  tooltip: toolTipVal,
17870
17874
  left: offsetLeft,
@@ -17929,6 +17933,7 @@ function StaticTable({
17929
17933
  }
17930
17934
  const leftForTotal = offsetLeftBase + dimensionMarks.length * newNonFixedColCellWidth;
17931
17935
  const isTotalVisibleAtLast = isRowTotalOn && !headerAtStart && isColHeaderVisible;
17936
+ const finalStyleForColumn = getFinalStyleObj(STYLE_FOR.COLUMN, levelStyle, TOTAL, totalLevels);
17932
17937
  if (isTotalVisibleAtLast) {
17933
17938
  headers.push({
17934
17939
  ...colHeaderFont,
@@ -17937,8 +17942,9 @@ function StaticTable({
17937
17942
  left: leftForTotal,
17938
17943
  top: 0,
17939
17944
  width: newNonFixedColCellWidth,
17945
+ color: finalStyleForColumn.color,
17940
17946
  height: colCellHeight * fixedRowCount,
17941
- background: getBgColorForCell(dimensionMarks.length, colColors),
17947
+ background: finalStyleForColumn.background ?? getBgColorForCell(dimensionMarks.length, colColors),
17942
17948
  fontWeight: "bold",
17943
17949
  childClassName: "col_header_data_cell_total"
17944
17950
  });
@@ -18096,10 +18102,10 @@ function StaticTable({
18096
18102
  rowLabel = formatValue(rowLabel, dFormat);
18097
18103
  }
18098
18104
  }
18099
- const finalStyleForRow = getFinalStyleObj(STYLE_FOR.ROW, baseStyleObj, rowLabel, level, parent);
18105
+ const finalStyleForRow2 = getFinalStyleObj(STYLE_FOR.ROW, baseStyleObj, rowLabel, level, parent);
18100
18106
  const tooltipValue = formatValue(marks[i][level], ToolTipNumberFormat, ToolTipDecimalPrecision);
18101
18107
  headers.push({
18102
- ...finalStyleForRow,
18108
+ ...finalStyleForRow2,
18103
18109
  label: getCleanString(rowLabel),
18104
18110
  tooltip: tooltipValue,
18105
18111
  top: offsetTop,
@@ -18112,6 +18118,7 @@ function StaticTable({
18112
18118
  }
18113
18119
  }
18114
18120
  const widthForTheTotal = isSparkLineVisible && isSlAtStart ? (fixedColCount - 1) * fixedColWidth : fixedColCount * fixedColWidth;
18121
+ const finalStyleForRow = getFinalStyleObj(STYLE_FOR.ROW, baseStyleObj, TOTAL, totalLevels);
18115
18122
  if (isColTotalOn && !headerAtStart && isRowHeaderVisible) {
18116
18123
  headers.push({
18117
18124
  ...rowHeaderFont,
@@ -18121,7 +18128,8 @@ function StaticTable({
18121
18128
  left: 0,
18122
18129
  width: widthForTheTotal,
18123
18130
  height: rowCellHeight,
18124
- background: getBgColorForCell(rowCount - 1, rowColors),
18131
+ color: finalStyleForRow.color,
18132
+ background: finalStyleForRow.background ?? getBgColorForCell(rowCount - 1, rowColors),
18125
18133
  fontWeight: "bold"
18126
18134
  });
18127
18135
  if (isSparkLineVisible && isSlAtStart && !headerAtStart) {
@@ -18361,7 +18369,7 @@ function StaticTable({
18361
18369
  return style;
18362
18370
  }
18363
18371
  case STYLE_FOR.ROW: {
18364
- const conFormatForRow = index > 0 && getConditionalFormat(label, CONDITIONAL_FORMAT_FOR.ROW, index);
18372
+ const conFormatForRow = getConditionalFormat(label, CONDITIONAL_FORMAT_FOR.ROW, index);
18365
18373
  style.background = rowHeaderBandColorMap[parentLabel];
18366
18374
  style = applyConditionalFormatting(style, conFormatForRow);
18367
18375
  return style;