@ai-matrx/design-system 0.18.4 → 0.18.6
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 +19 -0
- package/dist/content-transfer.cjs +12 -5
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.d.cts +4 -0
- package/dist/content-transfer.d.ts +4 -0
- package/dist/content-transfer.js +12 -5
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.cjs +53 -0
- package/dist/data-table/copy-helpers.cjs.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +13 -2
- package/dist/data-table/copy-helpers.d.ts +13 -2
- package/dist/data-table/copy-helpers.js +55 -0
- package/dist/data-table/copy-helpers.js.map +1 -1
- package/dist/data-table/copy-types.cjs.map +1 -1
- package/dist/data-table/copy-types.d.cts +5 -0
- package/dist/data-table/copy-types.d.ts +5 -0
- package/dist/data-table/data-row-inspector.cjs +70 -50
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +70 -50
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +70 -50
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +70 -50
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/index.cjs +621 -422
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +2 -2
- package/dist/data-table/index.d.ts +2 -2
- package/dist/data-table/index.js +623 -422
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/pagination.cjs +148 -90
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +143 -85
- package/dist/data-table/pagination.js.map +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/uuid-cell.cjs +58 -45
- package/dist/data-table/uuid-cell.cjs.map +1 -1
- package/dist/data-table/uuid-cell.js +58 -45
- package/dist/data-table/uuid-cell.js.map +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/{types-Bx9SfdJM.d.cts → types-0CNCWvdK.d.cts} +2 -2
- package/dist/{types-DyByb6tW.d.ts → types-cH8oLqUx.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -1631,14 +1631,21 @@ function MatrxCopyMenuSession(props) {
|
|
|
1631
1631
|
))
|
|
1632
1632
|
throw new Error("Sheet rows must be JSON objects.");
|
|
1633
1633
|
const rows = value;
|
|
1634
|
-
const
|
|
1634
|
+
const suppliedColumns = props.export.sheetColumns?.();
|
|
1635
|
+
const columns = suppliedColumns ?? [...new Set(rows.flatMap((row) => Object.keys(row)))].map((id) => ({ id, label: id }));
|
|
1636
|
+
const ids = /* @__PURE__ */ new Set();
|
|
1637
|
+
for (const column of columns) {
|
|
1638
|
+
if (!column.id || !column.label || ids.has(column.id)) throw new Error("Sheet columns require unique nonempty ids and labels.");
|
|
1639
|
+
ids.add(column.id);
|
|
1640
|
+
}
|
|
1641
|
+
for (const row of rows) for (const key of Object.keys(row)) if (!ids.has(key)) throw new Error("Table data contains a field outside its declared columns.");
|
|
1635
1642
|
return {
|
|
1636
1643
|
kind: "rows",
|
|
1637
1644
|
rows,
|
|
1638
|
-
columns:
|
|
1639
|
-
id:
|
|
1640
|
-
label:
|
|
1641
|
-
path: `/${
|
|
1645
|
+
columns: columns.map((column) => ({
|
|
1646
|
+
id: column.id,
|
|
1647
|
+
label: column.label,
|
|
1648
|
+
path: `/${column.id.replace(/~/g, "~0").replace(/\//g, "~1")}`,
|
|
1642
1649
|
visible: true
|
|
1643
1650
|
}))
|
|
1644
1651
|
};
|
|
@@ -2260,7 +2267,7 @@ function MatrxUuidCell({
|
|
|
2260
2267
|
}
|
|
2261
2268
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 truncate font-mono text-xs text-muted-foreground tabular-nums select-all", children: display });
|
|
2262
2269
|
})();
|
|
2263
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2264
2271
|
"span",
|
|
2265
2272
|
{
|
|
2266
2273
|
"data-matrx-cell-control": true,
|
|
@@ -2270,51 +2277,64 @@ function MatrxUuidCell({
|
|
|
2270
2277
|
),
|
|
2271
2278
|
onClick: stop,
|
|
2272
2279
|
children: [
|
|
2273
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
|
2280
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
2274
2281
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "inline-flex min-w-0 max-w-full items-center", children: idNode }) }),
|
|
2275
2282
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipContent, { side: "top", className: "max-w-sm break-all font-mono", children: forbidden ? `No access \xB7 ${tip}` : tip })
|
|
2276
|
-
] })
|
|
2277
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
{
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2283
|
+
] }),
|
|
2284
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
2285
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2286
|
+
"button",
|
|
2287
|
+
{
|
|
2288
|
+
type: "button",
|
|
2289
|
+
onClick: onCopy,
|
|
2290
|
+
"aria-label": copied ? "Copied" : `Copy ${label ?? "id"}`,
|
|
2291
|
+
className: cn(
|
|
2292
|
+
"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
|
|
2293
|
+
copied && "text-primary"
|
|
2294
|
+
),
|
|
2295
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Check, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Copy, { className: "h-3 w-3" })
|
|
2296
|
+
}
|
|
2297
|
+
) }),
|
|
2298
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipContent, { side: "top", children: copied ? "Copied" : `Copy ${label ?? "id"}: ${value}` })
|
|
2299
|
+
] }),
|
|
2300
|
+
canPeek ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
2301
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2302
|
+
"button",
|
|
2303
|
+
{
|
|
2304
|
+
type: "button",
|
|
2305
|
+
onClick: (e) => {
|
|
2306
|
+
stop(e);
|
|
2307
|
+
setPeekOpen(true);
|
|
2308
|
+
},
|
|
2309
|
+
"aria-label": `Quick look at ${label ?? "record"}`,
|
|
2310
|
+
className: "inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
|
|
2311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Lightbulb, { className: "h-3 w-3" })
|
|
2312
|
+
}
|
|
2313
|
+
) }),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(TooltipContent, { side: "top", children: [
|
|
2315
|
+
"Quick look at ",
|
|
2316
|
+
label ?? "record"
|
|
2317
|
+
] })
|
|
2318
|
+
] }) : null,
|
|
2319
|
+
onOpen && resolvedHref && !forbidden ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
2320
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2321
|
+
"a",
|
|
2322
|
+
{
|
|
2323
|
+
href: resolvedHref,
|
|
2324
|
+
target: "_blank",
|
|
2325
|
+
rel: "noopener noreferrer",
|
|
2326
|
+
onClick: stop,
|
|
2327
|
+
"aria-label": `Open ${label ?? "record"} in a new tab`,
|
|
2328
|
+
className: "inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
|
|
2329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ExternalLink, { className: "h-3 w-3" })
|
|
2330
|
+
}
|
|
2331
|
+
) }),
|
|
2332
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(TooltipContent, { side: "top", children: [
|
|
2333
|
+
"Open ",
|
|
2334
|
+
label ?? "record",
|
|
2335
|
+
" in a new tab"
|
|
2336
|
+
] })
|
|
2337
|
+
] }) : null,
|
|
2318
2338
|
trailing,
|
|
2319
2339
|
notice,
|
|
2320
2340
|
canPeek && peekOpen && ResourcePeek ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
@@ -2328,7 +2348,7 @@ function MatrxUuidCell({
|
|
|
2328
2348
|
) : null
|
|
2329
2349
|
]
|
|
2330
2350
|
}
|
|
2331
|
-
);
|
|
2351
|
+
) });
|
|
2332
2352
|
}
|
|
2333
2353
|
|
|
2334
2354
|
// src/data-table/entity.ts
|