pace-table-lib 1.0.54 → 1.0.55

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.
@@ -7897,7 +7897,7 @@
7897
7897
  const TOTAL = "Total";
7898
7898
  const MONTHS_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
7899
7899
  const MONTHS_FULL = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
7900
- const DATE_FORMATS = [
7900
+ const DATE_FORMATS$1 = [
7901
7901
  "MMM-YY",
7902
7902
  "DD-MM-YYYY",
7903
7903
  "MM-DD-YYYY",
@@ -8151,7 +8151,7 @@
8151
8151
  safeDecimalValues = Math.min(20, Math.max(0, Math.floor(safeDecimalValues)));
8152
8152
  let floatValue = Number(value);
8153
8153
  if (isNaN(floatValue)) return value;
8154
- if (DATE_FORMATS.includes(format)) {
8154
+ if (DATE_FORMATS$1.includes(format)) {
8155
8155
  if (floatValue > 2958465 || floatValue <= 0) return value;
8156
8156
  return formatDate(floatValue, format);
8157
8157
  }
@@ -18767,6 +18767,23 @@
18767
18767
  return DisplayUnits2;
18768
18768
  })(DisplayUnits || {});
18769
18769
  const NO_ENTRY_TOKENS = ["nolegendentryrow", "nocolentry"];
18770
+ const DATE_FORMATS = [
18771
+ "DD-MM-YYYY",
18772
+ "MM-DD-YYYY",
18773
+ "YYYY-MM-DD",
18774
+ "YYYY",
18775
+ "DD-MM",
18776
+ "MMM-YY",
18777
+ "MMM-YYYY",
18778
+ "YY-MMM",
18779
+ "MM-YYYY",
18780
+ "YYYY-MM",
18781
+ "MMMM-YYYY",
18782
+ "MMMM-YY",
18783
+ "DD-MMM",
18784
+ "DD-MMM-YY",
18785
+ "DD-MMM-YYYY"
18786
+ ];
18770
18787
  function hexToRgb(hex) {
18771
18788
  const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
18772
18789
  return result ? {
@@ -18814,24 +18831,10 @@
18814
18831
  }
18815
18832
  function formatCellValue(value, formatConfig) {
18816
18833
  if (value === null || value === void 0 || value === "") return "-";
18817
- const DATE_FORMATS2 = [
18818
- "DD-MM-YYYY",
18819
- "MM-DD-YYYY",
18820
- "YYYY-MM-DD",
18821
- "YYYY",
18822
- "DD-MM",
18823
- "MMM-YY",
18824
- "MMM-YYYY",
18825
- "YY-MMM",
18826
- "MM-YYYY",
18827
- "YYYY-MM",
18828
- "MMMM-YYYY",
18829
- "MMMM-YY",
18830
- "DD-MMM",
18831
- "DD-MMM-YY",
18832
- "DD-MMM-YYYY"
18833
- ];
18834
- if (formatConfig?.numberFormat && DATE_FORMATS2.includes(formatConfig.numberFormat)) {
18834
+ if (formatConfig?.numberFormat && DATE_FORMATS.includes(formatConfig.numberFormat) && (value === 0 || value === "0" || value === "" || Number(value) === 0)) {
18835
+ return "0";
18836
+ }
18837
+ if (formatConfig?.numberFormat && DATE_FORMATS.includes(formatConfig.numberFormat)) {
18835
18838
  return applyDateFormat(String(value), formatConfig.numberFormat);
18836
18839
  }
18837
18840
  const num = typeof value === "string" ? parseFloat(value) : value;
@@ -19012,7 +19015,7 @@
19012
19015
  return new Date(excelEpoch.getTime() + serial * 864e5);
19013
19016
  }
19014
19017
  function applyDateFormat(value, format) {
19015
- if (!value || !format) return value;
19018
+ if (!value || !format || format === "None") return value;
19016
19019
  const trimmed = value.trim();
19017
19020
  let d;
19018
19021
  const serialNum = Number(trimmed);
@@ -19890,6 +19893,8 @@
19890
19893
  let bg;
19891
19894
  if (DataField.DataFieldBackgroundcolor === "Row Band") {
19892
19895
  bg = bi % 2 === 0 ? dataColors.even : dataColors.odd;
19896
+ } else if (DataField.DataFieldBackgroundcolor === "Alternate Rows") {
19897
+ bg = rowIdx % 2 === 0 ? dataColors.even : dataColors.odd;
19893
19898
  } else if (DataField.DataFieldBackgroundcolor === "Column Band") {
19894
19899
  bg = cbi % 2 === 0 ? dataColors.even : dataColors.odd;
19895
19900
  } else if (DataField.DataFieldBackgroundcolor === "Single") {