@ai-matrx/design-system 0.20.1 → 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.
- package/CHANGELOG.md +20 -0
- package/dist/content-transfer.cjs +7 -2
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.js +7 -2
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/data-row-inspector.cjs +34 -3
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +34 -3
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +34 -3
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +34 -3
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/index.cjs +41 -35
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +41 -35
- package/dist/data-table/index.js.map +1 -1
- package/dist/styles.css +1 -19
- package/package.json +1 -1
|
@@ -1250,9 +1250,14 @@ function PaletteGlyph({ format, ai = false, file = false, kind }) {
|
|
|
1250
1250
|
/* @__PURE__ */ jsx13("path", { d: "M6 3h8l4 4v14H6z" }),
|
|
1251
1251
|
/* @__PURE__ */ jsx13("path", { d: "M14 3v5h5M9 13h6M9 17h6" })
|
|
1252
1252
|
] });
|
|
1253
|
-
const path = format === "json" ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1253
|
+
const path = format === "json" || format === "table-data" ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1254
1254
|
/* @__PURE__ */ jsx13("path", { d: "M9 4C7 4 7 7 5 7v3c2 0 2 1 2 2s0 2-2 2v3c2 0 2 3 4 3" }),
|
|
1255
1255
|
/* @__PURE__ */ jsx13("path", { d: "M15 4c2 0 2 3 4 3v3c-2 0-2 1-2 2s0 2 2 2v3c-2 0-2 3-4 3" })
|
|
1256
|
+
] }) : format === "table-schema" ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1257
|
+
/* @__PURE__ */ jsx13("rect", { x: "8", y: "3", width: "8", height: "5", rx: "1" }),
|
|
1258
|
+
/* @__PURE__ */ jsx13("rect", { x: "2", y: "16", width: "8", height: "5", rx: "1" }),
|
|
1259
|
+
/* @__PURE__ */ jsx13("rect", { x: "14", y: "16", width: "8", height: "5", rx: "1" }),
|
|
1260
|
+
/* @__PURE__ */ jsx13("path", { d: "M12 8v4M6 16v-4h12v4" })
|
|
1256
1261
|
] }) : format === "compact-json" ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1257
1262
|
/* @__PURE__ */ jsx13("path", { d: "m14 10 7-7" }),
|
|
1258
1263
|
/* @__PURE__ */ jsx13("path", { d: "M20 10h-6V4" }),
|
|
@@ -1711,7 +1716,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
|
|
|
1711
1716
|
closePalette();
|
|
1712
1717
|
onClick();
|
|
1713
1718
|
}, children: [
|
|
1714
|
-
Icon2 ? /* @__PURE__ */ jsx13(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx13(PaletteGlyph, {
|
|
1719
|
+
Icon2 ? /* @__PURE__ */ jsx13(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx13(PaletteGlyph, { format: id, ai: Boolean(options.ai), file: options.file || Boolean(options.custom && id !== "table-data" && id !== "table-schema") }),
|
|
1715
1720
|
/* @__PURE__ */ jsxs7("span", { children: [
|
|
1716
1721
|
label2,
|
|
1717
1722
|
presentation?.hint ? /* @__PURE__ */ jsx13("small", { className: "matrx-alchemy-menu-hint", children: presentation.hint }) : null
|
|
@@ -3180,6 +3185,32 @@ function isUuidValue(value) {
|
|
|
3180
3185
|
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);
|
|
3181
3186
|
}
|
|
3182
3187
|
|
|
3188
|
+
// src/data-table/filter-engine.ts
|
|
3189
|
+
function stringifyCellValue(value) {
|
|
3190
|
+
if (value == null) return "";
|
|
3191
|
+
if (typeof value === "string") return value;
|
|
3192
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
3193
|
+
return String(value);
|
|
3194
|
+
}
|
|
3195
|
+
if (value instanceof Date) return value.toISOString();
|
|
3196
|
+
try {
|
|
3197
|
+
return JSON.stringify(value);
|
|
3198
|
+
} catch {
|
|
3199
|
+
return String(value);
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
// src/data-table/display-value.ts
|
|
3204
|
+
function formatTableDisplayValue(value) {
|
|
3205
|
+
if (typeof value === "number") return value.toLocaleString(void 0, { maximumFractionDigits: 12 });
|
|
3206
|
+
if (value instanceof Date) return value.toLocaleString();
|
|
3207
|
+
if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(value) && !Number.isNaN(Date.parse(value))) {
|
|
3208
|
+
return new Date(value).toLocaleString();
|
|
3209
|
+
}
|
|
3210
|
+
if (typeof value === "boolean") return value ? "Yes" : "No";
|
|
3211
|
+
return stringifyCellValue(value) || "\u2014";
|
|
3212
|
+
}
|
|
3213
|
+
|
|
3183
3214
|
// src/data-table/DataRowInspector.tsx
|
|
3184
3215
|
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3185
3216
|
var noFieldToken = () => null;
|
|
@@ -3252,7 +3283,7 @@ function DataRowInspector({
|
|
|
3252
3283
|
key
|
|
3253
3284
|
);
|
|
3254
3285
|
}
|
|
3255
|
-
const formatted = formatValue(value);
|
|
3286
|
+
const formatted = value !== null && typeof value === "object" && !(value instanceof Date) ? formatValue(value) : formatTableDisplayValue(value);
|
|
3256
3287
|
const multiline = formatted.includes("\n") || formatted.length > 80;
|
|
3257
3288
|
return /* @__PURE__ */ jsxs11(
|
|
3258
3289
|
"div",
|