@quillsql/react 2.16.52 → 2.16.54

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.
package/dist/index.cjs CHANGED
@@ -369,8 +369,9 @@ var init_valueFormatter = __esm({
369
369
  return _getUTCDateHelper(value, "dd MMM yyyy");
370
370
  };
371
371
  format_MMM_d_MMM_d = (value, dateRange, databaseType) => {
372
- const utcDate = (0, import_date_fns.parseISO)(value.split("T")[0]);
373
- if (!(0, import_date_fns.isValid)(utcDate)) return "Invalid date";
372
+ const input = String(value);
373
+ const utcDate = (0, import_date_fns.parseISO)(input.split("T")[0] ?? "");
374
+ if (!(0, import_date_fns.isValid)(utcDate)) return input;
374
375
  let weekStartsOn = 1;
375
376
  if (databaseType && ["mssql"].includes(databaseType)) {
376
377
  weekStartsOn = 0;
@@ -32867,7 +32868,7 @@ var format_hh_ap_pm2 = (value) => _getUTCDateHelper2(value, "hh:mm aa");
32867
32868
  var format_MMM_dd_yyyy2 = (value) => _getUTCDateHelper2(value, "dd MMM yyyy");
32868
32869
  var format_MMM_dd_MMM_dd = (value) => {
32869
32870
  const utcDate = (0, import_date_fns_tz4.utcToZonedTime)(new Date(value), "UTC");
32870
- if (!(0, import_date_fns11.isValid)(utcDate)) return "Invalid date";
32871
+ if (!(0, import_date_fns11.isValid)(utcDate)) return String(value);
32871
32872
  const monday = (0, import_date_fns11.startOfWeek)(utcDate, { weekStartsOn: 1 });
32872
32873
  const sunday = (0, import_date_fns11.endOfWeek)(utcDate, { weekStartsOn: 1 });
32873
32874
  if ((0, import_date_fns11.format)(monday, "MMM") === (0, import_date_fns11.format)(sunday, "MMM")) {
@@ -61073,16 +61074,19 @@ function normalizePivotChartForDisplay(chart) {
61073
61074
  if (!row || typeof row !== "object") {
61074
61075
  return row;
61075
61076
  }
61076
- const raw = row[pivotDisplayRowField];
61077
- if (raw === void 0 || raw === null) {
61077
+ const record = row;
61078
+ const displayValue = record[pivotDisplayRowField];
61079
+ if (displayValue === void 0 || displayValue === null) {
61078
61080
  return row;
61079
61081
  }
61080
- const asString = String(raw).trim();
61082
+ const asString = String(displayValue).trim();
61081
61083
  if (!asString || pivotDateRowMonthLabelRe.test(asString)) {
61082
61084
  return row;
61083
61085
  }
61086
+ const rawDate = record.__quillRawDate;
61087
+ const formatInput = rawDate !== void 0 && rawDate !== null && rawDate !== "" && rawDate !== 0 ? rawDate : displayValue;
61084
61088
  const formatted = quillFormat({
61085
- value: raw,
61089
+ value: formatInput,
61086
61090
  format: pivotDisplayDateFormat
61087
61091
  });
61088
61092
  if (!formatted || !String(formatted).trim()) {
package/dist/index.js CHANGED
@@ -383,8 +383,9 @@ var init_valueFormatter = __esm({
383
383
  return _getUTCDateHelper(value, "dd MMM yyyy");
384
384
  };
385
385
  format_MMM_d_MMM_d = (value, dateRange, databaseType) => {
386
- const utcDate = parseISO(value.split("T")[0]);
387
- if (!isValid(utcDate)) return "Invalid date";
386
+ const input = String(value);
387
+ const utcDate = parseISO(input.split("T")[0] ?? "");
388
+ if (!isValid(utcDate)) return input;
388
389
  let weekStartsOn = 1;
389
390
  if (databaseType && ["mssql"].includes(databaseType)) {
390
391
  weekStartsOn = 0;
@@ -32909,7 +32910,7 @@ var format_hh_ap_pm2 = (value) => _getUTCDateHelper2(value, "hh:mm aa");
32909
32910
  var format_MMM_dd_yyyy2 = (value) => _getUTCDateHelper2(value, "dd MMM yyyy");
32910
32911
  var format_MMM_dd_MMM_dd = (value) => {
32911
32912
  const utcDate = utcToZonedTime4(new Date(value), "UTC");
32912
- if (!isValid5(utcDate)) return "Invalid date";
32913
+ if (!isValid5(utcDate)) return String(value);
32913
32914
  const monday = startOfWeek5(utcDate, { weekStartsOn: 1 });
32914
32915
  const sunday = endOfWeek2(utcDate, { weekStartsOn: 1 });
32915
32916
  if (format5(monday, "MMM") === format5(sunday, "MMM")) {
@@ -61285,16 +61286,19 @@ function normalizePivotChartForDisplay(chart) {
61285
61286
  if (!row || typeof row !== "object") {
61286
61287
  return row;
61287
61288
  }
61288
- const raw = row[pivotDisplayRowField];
61289
- if (raw === void 0 || raw === null) {
61289
+ const record = row;
61290
+ const displayValue = record[pivotDisplayRowField];
61291
+ if (displayValue === void 0 || displayValue === null) {
61290
61292
  return row;
61291
61293
  }
61292
- const asString = String(raw).trim();
61294
+ const asString = String(displayValue).trim();
61293
61295
  if (!asString || pivotDateRowMonthLabelRe.test(asString)) {
61294
61296
  return row;
61295
61297
  }
61298
+ const rawDate = record.__quillRawDate;
61299
+ const formatInput = rawDate !== void 0 && rawDate !== null && rawDate !== "" && rawDate !== 0 ? rawDate : displayValue;
61296
61300
  const formatted = quillFormat({
61297
- value: raw,
61301
+ value: formatInput,
61298
61302
  format: pivotDisplayDateFormat
61299
61303
  });
61300
61304
  if (!formatted || !String(formatted).trim()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "2.16.52",
3
+ "version": "2.16.54",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {