schummar-table 0.40.0 → 0.40.2

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
@@ -3429,6 +3429,16 @@ function calcItems(state) {
3429
3429
 
3430
3430
  // src/internalState/calcProps.ts
3431
3431
  var import_react24 = require("react");
3432
+
3433
+ // src/exporters/serializer.ts
3434
+ function defaultSerializer(x) {
3435
+ if (x instanceof Date || typeof x === "number" || typeof x === "string") {
3436
+ return x;
3437
+ }
3438
+ return JSON.stringify(x);
3439
+ }
3440
+
3441
+ // src/internalState/calcProps.ts
3432
3442
  var noopParentId = () => void 0;
3433
3443
  function calcProps(props) {
3434
3444
  const cache = useTableMemo();
@@ -3489,7 +3499,7 @@ function calcProps(props) {
3489
3499
  `columns.${cacheKey}.renderCell`,
3490
3500
  (_d2 = renderCell != null ? renderCell : defaults2 == null ? void 0 : defaults2.renderCell) != null ? _d2 : asString
3491
3501
  ),
3492
- exportCell: (_e2 = exportCell != null ? exportCell : defaults2 == null ? void 0 : defaults2.exportCell) != null ? _e2 : (x) => x instanceof Date || typeof x === "number" ? x : String(x),
3502
+ exportCell: (_e2 = exportCell != null ? exportCell : defaults2 == null ? void 0 : defaults2.exportCell) != null ? _e2 : defaultSerializer,
3493
3503
  sortBy: ((_f2 = sortBy != null ? sortBy : defaults2 == null ? void 0 : defaults2.sortBy) != null ? _f2 : [
3494
3504
  (v2) => typeof v2 === "number" || v2 instanceof Date ? v2 : v2 === null || v2 === void 0 ? "" : String(v2)
3495
3505
  ]).map((function_, i) => cache(`columns.${cacheKey}.sortBy.${i}`, function_)),