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.
@@ -8359,7 +8359,7 @@
8359
8359
  document.body.appendChild(div);
8360
8360
  const height = div.getBoundingClientRect().height;
8361
8361
  div.remove();
8362
- return height + 15;
8362
+ return height;
8363
8363
  }
8364
8364
  function applyTextRelatedCss(headerArr, flag) {
8365
8365
  return headerArr.map((item) => ({
@@ -17492,15 +17492,19 @@
17492
17492
  newNonFixedColCellWidth,
17493
17493
  fixedColWidth
17494
17494
  } = React.useMemo(() => {
17495
- let colCellH = Table2.RowHeight;
17496
- let rowCellH = Table2.RowHeight;
17497
- let nonFixColCellW = Table2.TableWidth;
17498
- let fixedColCellW = Table2.FixHeaderWidth;
17495
+ let colCellH = Number(Table2.RowHeight);
17496
+ let rowCellH = Number(Table2.RowHeight);
17497
+ let nonFixColCellW = Number(Table2.TableWidth);
17498
+ let fixedColCellW = Number(Table2.FixHeaderWidth);
17499
17499
  if (isWrapColHeaderTextOn) {
17500
- colCellH = Number(newColCellHeight);
17500
+ if (Number(newColCellHeight) > colCellH) {
17501
+ colCellH = Number(newColCellHeight);
17502
+ }
17501
17503
  }
17502
17504
  if (isWrapRowHeaderTextOn) {
17503
- rowCellH = newRowHeight;
17505
+ if (newRowHeight > rowCellH) {
17506
+ rowCellH = newRowHeight;
17507
+ }
17504
17508
  }
17505
17509
  if (isFitTableOn) {
17506
17510
  const sharedWidth = Math.floor((tableWidth - 5) / columnCount);
@@ -17879,10 +17883,10 @@
17879
17883
  }
17880
17884
  }
17881
17885
  levelStyle.background = parentColorMap[parent];
17882
- const finalStyleForColumn = getFinalStyleObj(STYLE_FOR.COLUMN, levelStyle, colLabel, level);
17886
+ const finalStyleForColumn2 = getFinalStyleObj(STYLE_FOR.COLUMN, levelStyle, colLabel, level);
17883
17887
  const toolTipVal = formatValue(dimensionMarks[i][level], ToolTipNumberFormat, ToolTipDecimalPrecision);
17884
17888
  headers.push({
17885
- ...finalStyleForColumn,
17889
+ ...finalStyleForColumn2,
17886
17890
  label: colLabel,
17887
17891
  tooltip: toolTipVal,
17888
17892
  left: offsetLeft,
@@ -17947,6 +17951,7 @@
17947
17951
  }
17948
17952
  const leftForTotal = offsetLeftBase + dimensionMarks.length * newNonFixedColCellWidth;
17949
17953
  const isTotalVisibleAtLast = isRowTotalOn && !headerAtStart && isColHeaderVisible;
17954
+ const finalStyleForColumn = getFinalStyleObj(STYLE_FOR.COLUMN, levelStyle, TOTAL, totalLevels);
17950
17955
  if (isTotalVisibleAtLast) {
17951
17956
  headers.push({
17952
17957
  ...colHeaderFont,
@@ -17955,8 +17960,9 @@
17955
17960
  left: leftForTotal,
17956
17961
  top: 0,
17957
17962
  width: newNonFixedColCellWidth,
17963
+ color: finalStyleForColumn.color,
17958
17964
  height: colCellHeight * fixedRowCount,
17959
- background: getBgColorForCell(dimensionMarks.length, colColors),
17965
+ background: finalStyleForColumn.background ?? getBgColorForCell(dimensionMarks.length, colColors),
17960
17966
  fontWeight: "bold",
17961
17967
  childClassName: "col_header_data_cell_total"
17962
17968
  });
@@ -18114,10 +18120,10 @@
18114
18120
  rowLabel = formatValue(rowLabel, dFormat);
18115
18121
  }
18116
18122
  }
18117
- const finalStyleForRow = getFinalStyleObj(STYLE_FOR.ROW, baseStyleObj, rowLabel, level, parent);
18123
+ const finalStyleForRow2 = getFinalStyleObj(STYLE_FOR.ROW, baseStyleObj, rowLabel, level, parent);
18118
18124
  const tooltipValue = formatValue(marks[i][level], ToolTipNumberFormat, ToolTipDecimalPrecision);
18119
18125
  headers.push({
18120
- ...finalStyleForRow,
18126
+ ...finalStyleForRow2,
18121
18127
  label: getCleanString(rowLabel),
18122
18128
  tooltip: tooltipValue,
18123
18129
  top: offsetTop,
@@ -18130,6 +18136,7 @@
18130
18136
  }
18131
18137
  }
18132
18138
  const widthForTheTotal = isSparkLineVisible && isSlAtStart ? (fixedColCount - 1) * fixedColWidth : fixedColCount * fixedColWidth;
18139
+ const finalStyleForRow = getFinalStyleObj(STYLE_FOR.ROW, baseStyleObj, TOTAL, totalLevels);
18133
18140
  if (isColTotalOn && !headerAtStart && isRowHeaderVisible) {
18134
18141
  headers.push({
18135
18142
  ...rowHeaderFont,
@@ -18139,7 +18146,8 @@
18139
18146
  left: 0,
18140
18147
  width: widthForTheTotal,
18141
18148
  height: rowCellHeight,
18142
- background: getBgColorForCell(rowCount - 1, rowColors),
18149
+ color: finalStyleForRow.color,
18150
+ background: finalStyleForRow.background ?? getBgColorForCell(rowCount - 1, rowColors),
18143
18151
  fontWeight: "bold"
18144
18152
  });
18145
18153
  if (isSparkLineVisible && isSlAtStart && !headerAtStart) {
@@ -18379,7 +18387,7 @@
18379
18387
  return style;
18380
18388
  }
18381
18389
  case STYLE_FOR.ROW: {
18382
- const conFormatForRow = index > 0 && getConditionalFormat(label, CONDITIONAL_FORMAT_FOR.ROW, index);
18390
+ const conFormatForRow = getConditionalFormat(label, CONDITIONAL_FORMAT_FOR.ROW, index);
18383
18391
  style.background = rowHeaderBandColorMap[parentLabel];
18384
18392
  style = applyConditionalFormatting(style, conFormatForRow);
18385
18393
  return style;