@ai-matrx/design-system 0.20.2 → 0.20.5

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.
@@ -3160,6 +3160,32 @@ function isUuidValue(value) {
3160
3160
  return typeof value === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
3161
3161
  }
3162
3162
 
3163
+ // src/data-table/filter-engine.ts
3164
+ function stringifyCellValue(value) {
3165
+ if (value == null) return "";
3166
+ if (typeof value === "string") return value;
3167
+ if (typeof value === "number" || typeof value === "boolean") {
3168
+ return String(value);
3169
+ }
3170
+ if (value instanceof Date) return value.toISOString();
3171
+ try {
3172
+ return JSON.stringify(value);
3173
+ } catch {
3174
+ return String(value);
3175
+ }
3176
+ }
3177
+
3178
+ // src/data-table/display-value.ts
3179
+ function formatTableDisplayValue(value) {
3180
+ if (typeof value === "number") return value.toLocaleString(void 0, { maximumFractionDigits: 12 });
3181
+ if (value instanceof Date) return value.toLocaleString();
3182
+ if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(value) && !Number.isNaN(Date.parse(value))) {
3183
+ return new Date(value).toLocaleString();
3184
+ }
3185
+ if (typeof value === "boolean") return value ? "Yes" : "No";
3186
+ return stringifyCellValue(value) || "\u2014";
3187
+ }
3188
+
3163
3189
  // src/data-table/DataRowInspector.tsx
3164
3190
  import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
3165
3191
  var noFieldToken = () => null;
@@ -3232,7 +3258,7 @@ function DataRowInspector({
3232
3258
  key
3233
3259
  );
3234
3260
  }
3235
- const formatted = formatValue(value);
3261
+ const formatted = value !== null && typeof value === "object" && !(value instanceof Date) ? formatValue(value) : formatTableDisplayValue(value);
3236
3262
  const multiline = formatted.includes("\n") || formatted.length > 80;
3237
3263
  return /* @__PURE__ */ jsxs10(
3238
3264
  "div",