pace-table-lib 1.0.51 → 1.0.53

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.
@@ -9,7 +9,7 @@ export declare function getHeatmapColor(value: number, minValue: number, maxValu
9
9
  export declare function parseRowPath(rowPath: string): string[];
10
10
  /** Returns the last non-subtotal segment as the display label */
11
11
  export declare function getDisplayName(segments: string[]): string;
12
- export declare function getRowDisplayName(segments: string[]): string;
12
+ export declare function getRowDisplayName(segments: string[], measureValue: string): string;
13
13
  /** Formats a raw numeric value according to MeasureFormatObj config */
14
14
  export declare function formatCellValue(value: string | number, formatConfig?: MeasureFormatObj): string;
15
15
  /** Resolves the background color for a data cell or row header based on style config */
@@ -18769,11 +18769,11 @@ function getHeatmapColor(value, minValue, maxValue, minColor, maxColor) {
18769
18769
  function parseRowPath(rowPath) {
18770
18770
  return rowPath.split("`")?.filter(Boolean);
18771
18771
  }
18772
- function getRowDisplayName(segments) {
18772
+ function getRowDisplayName(segments, measureValue) {
18773
18773
  for (let i = segments.length - 1; i >= 0; i--) {
18774
18774
  const seg = segments[i];
18775
18775
  if (seg && seg !== "!subtotal") {
18776
- if (NO_ENTRY_TOKENS.includes(seg.toLowerCase())) return "value";
18776
+ if (NO_ENTRY_TOKENS.includes(seg.toLowerCase())) return measureValue;
18777
18777
  if (seg.includes("~$~")) {
18778
18778
  return seg.split("~$~")[1]?.trim() ?? seg;
18779
18779
  }
@@ -19037,6 +19037,7 @@ const PivotTable = ({
19037
19037
  const isSlAtStart = SparkLine?.Position === "Start";
19038
19038
  const isRowHeaderVisible = !RowHeader?.HideRowHeader;
19039
19039
  const isColHeaderVisible = !ColumnHeader?.HideColumnHeader;
19040
+ const measureValue = Table2.colOrRowHeaderName;
19040
19041
  const isConditionalFormatOn = Table2.ConditionalformattingOnOff;
19041
19042
  const conditionalFormatArr = Table2.Conditionalformatting;
19042
19043
  const conditionalFormatsByType = useMemo(() => {
@@ -19061,9 +19062,9 @@ const PivotTable = ({
19061
19062
  const getMeasureFormattingObj = useCallback(
19062
19063
  (measureInfo) => {
19063
19064
  const defaultFormat = {
19064
- numberFormat: DataField.NumberFormat ?? "Comma Separated",
19065
- decimalPrecision: DataField.DataFieldDecimalPrecision ?? 2,
19066
- displayUnits: DataField.DisplayUnits ?? "None"
19065
+ numberFormat: DataField.NumberFormat,
19066
+ decimalPrecision: DataField.DataFieldDecimalPrecision,
19067
+ displayUnits: DataField.DisplayUnits
19067
19068
  };
19068
19069
  if (measureInfo.measureIndex === -1 || !measureInfo.measureName) {
19069
19070
  return defaultFormat;
@@ -19082,7 +19083,7 @@ const PivotTable = ({
19082
19083
  const isNoEntry = NO_ENTRY_TOKENS.some(
19083
19084
  (t) => rowPath.toLowerCase().includes(t)
19084
19085
  );
19085
- const segments = isNoEntry ? ["value"] : parseRowPath(rowPath);
19086
+ const segments = isNoEntry ? [measureValue] : parseRowPath(rowPath);
19086
19087
  const isSubtotal = segments.includes("!subtotal");
19087
19088
  const nonSubSegs = segments?.filter((s) => s !== "!subtotal");
19088
19089
  const lastSeg = nonSubSegs[nonSubSegs.length - 1] ?? "";
@@ -19098,7 +19099,7 @@ const PivotTable = ({
19098
19099
  rowPath,
19099
19100
  segments,
19100
19101
  depth: 0,
19101
- name: isNoEntry ? "value" : getRowDisplayName(segments),
19102
+ name: isNoEntry ? measureValue : getRowDisplayName(segments, measureValue),
19102
19103
  measureIndex,
19103
19104
  measureName,
19104
19105
  isSubtotal,
@@ -19760,7 +19761,10 @@ const PivotTable = ({
19760
19761
  "span",
19761
19762
  {
19762
19763
  className: "pivot-row-header__text",
19763
- style: { textDecoration: rowHeaderFont.textDecoration },
19764
+ style: {
19765
+ textDecoration: rowHeaderFont.textDecoration,
19766
+ paddingRight: "5%"
19767
+ },
19764
19768
  children: displayLabel
19765
19769
  }
19766
19770
  )
@@ -19839,9 +19843,9 @@ const PivotTable = ({
19839
19843
  );
19840
19844
  const measureInfo = getMeasureNameFromCol(col);
19841
19845
  const measureFmt = col.isSubtotal ? {
19842
- numberFormat: DataField.NumberFormat ?? "Comma Separated",
19843
- decimalPrecision: DataField.measureDataFieldDecimalPrecision ?? 2,
19844
- displayUnits: DataField.DisplayUnits ?? "None"
19846
+ numberFormat: DataField.NumberFormat,
19847
+ decimalPrecision: DataField.measureDataFieldDecimalPrecision,
19848
+ displayUnits: DataField.DisplayUnits
19845
19849
  } : getMeasureFormattingObj(measureInfo);
19846
19850
  const resolvedFormat = {
19847
19851
  measureIndex: activeFormat?.measureIndex ?? 0,