@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
|
@@ -1624,14 +1624,21 @@ function MatrxCopyMenuSession(props) {
|
|
|
1624
1624
|
))
|
|
1625
1625
|
throw new Error("Sheet rows must be JSON objects.");
|
|
1626
1626
|
const rows = value;
|
|
1627
|
-
const
|
|
1627
|
+
const suppliedColumns = props.export.sheetColumns?.();
|
|
1628
|
+
const columns = suppliedColumns ?? [...new Set(rows.flatMap((row) => Object.keys(row)))].map((id) => ({ id, label: id }));
|
|
1629
|
+
const ids = /* @__PURE__ */ new Set();
|
|
1630
|
+
for (const column of columns) {
|
|
1631
|
+
if (!column.id || !column.label || ids.has(column.id)) throw new Error("Sheet columns require unique nonempty ids and labels.");
|
|
1632
|
+
ids.add(column.id);
|
|
1633
|
+
}
|
|
1634
|
+
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.");
|
|
1628
1635
|
return {
|
|
1629
1636
|
kind: "rows",
|
|
1630
1637
|
rows,
|
|
1631
|
-
columns:
|
|
1632
|
-
id:
|
|
1633
|
-
label:
|
|
1634
|
-
path: `/${
|
|
1638
|
+
columns: columns.map((column) => ({
|
|
1639
|
+
id: column.id,
|
|
1640
|
+
label: column.label,
|
|
1641
|
+
path: `/${column.id.replace(/~/g, "~0").replace(/\//g, "~1")}`,
|
|
1635
1642
|
visible: true
|
|
1636
1643
|
}))
|
|
1637
1644
|
};
|
|
@@ -2257,7 +2264,7 @@ function MatrxUuidCell({
|
|
|
2257
2264
|
}
|
|
2258
2265
|
return /* @__PURE__ */ jsx15("span", { className: "min-w-0 truncate font-mono text-xs text-muted-foreground tabular-nums select-all", children: display });
|
|
2259
2266
|
})();
|
|
2260
|
-
return /* @__PURE__ */ jsxs9(
|
|
2267
|
+
return /* @__PURE__ */ jsx15(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs9(
|
|
2261
2268
|
"span",
|
|
2262
2269
|
{
|
|
2263
2270
|
"data-matrx-cell-control": true,
|
|
@@ -2267,51 +2274,64 @@ function MatrxUuidCell({
|
|
|
2267
2274
|
),
|
|
2268
2275
|
onClick: stop,
|
|
2269
2276
|
children: [
|
|
2270
|
-
/* @__PURE__ */
|
|
2277
|
+
/* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
2271
2278
|
/* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15("span", { className: "inline-flex min-w-0 max-w-full items-center", children: idNode }) }),
|
|
2272
2279
|
/* @__PURE__ */ jsx15(TooltipContent, { side: "top", className: "max-w-sm break-all font-mono", children: forbidden ? `No access \xB7 ${tip}` : tip })
|
|
2273
|
-
] })
|
|
2274
|
-
/* @__PURE__ */
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
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
|
-
|
|
2280
|
+
] }),
|
|
2281
|
+
/* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
2282
|
+
/* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
2283
|
+
"button",
|
|
2284
|
+
{
|
|
2285
|
+
type: "button",
|
|
2286
|
+
onClick: onCopy,
|
|
2287
|
+
"aria-label": copied ? "Copied" : `Copy ${label ?? "id"}`,
|
|
2288
|
+
className: cn(
|
|
2289
|
+
"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
|
|
2290
|
+
copied && "text-primary"
|
|
2291
|
+
),
|
|
2292
|
+
children: copied ? /* @__PURE__ */ jsx15(Check, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx15(Copy, { className: "h-3 w-3" })
|
|
2293
|
+
}
|
|
2294
|
+
) }),
|
|
2295
|
+
/* @__PURE__ */ jsx15(TooltipContent, { side: "top", children: copied ? "Copied" : `Copy ${label ?? "id"}: ${value}` })
|
|
2296
|
+
] }),
|
|
2297
|
+
canPeek ? /* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
2298
|
+
/* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
2299
|
+
"button",
|
|
2300
|
+
{
|
|
2301
|
+
type: "button",
|
|
2302
|
+
onClick: (e) => {
|
|
2303
|
+
stop(e);
|
|
2304
|
+
setPeekOpen(true);
|
|
2305
|
+
},
|
|
2306
|
+
"aria-label": `Quick look at ${label ?? "record"}`,
|
|
2307
|
+
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",
|
|
2308
|
+
children: /* @__PURE__ */ jsx15(Lightbulb, { className: "h-3 w-3" })
|
|
2309
|
+
}
|
|
2310
|
+
) }),
|
|
2311
|
+
/* @__PURE__ */ jsxs9(TooltipContent, { side: "top", children: [
|
|
2312
|
+
"Quick look at ",
|
|
2313
|
+
label ?? "record"
|
|
2314
|
+
] })
|
|
2315
|
+
] }) : null,
|
|
2316
|
+
onOpen && resolvedHref && !forbidden ? /* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
2317
|
+
/* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
2318
|
+
"a",
|
|
2319
|
+
{
|
|
2320
|
+
href: resolvedHref,
|
|
2321
|
+
target: "_blank",
|
|
2322
|
+
rel: "noopener noreferrer",
|
|
2323
|
+
onClick: stop,
|
|
2324
|
+
"aria-label": `Open ${label ?? "record"} in a new tab`,
|
|
2325
|
+
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",
|
|
2326
|
+
children: /* @__PURE__ */ jsx15(ExternalLink, { className: "h-3 w-3" })
|
|
2327
|
+
}
|
|
2328
|
+
) }),
|
|
2329
|
+
/* @__PURE__ */ jsxs9(TooltipContent, { side: "top", children: [
|
|
2330
|
+
"Open ",
|
|
2331
|
+
label ?? "record",
|
|
2332
|
+
" in a new tab"
|
|
2333
|
+
] })
|
|
2334
|
+
] }) : null,
|
|
2315
2335
|
trailing,
|
|
2316
2336
|
notice,
|
|
2317
2337
|
canPeek && peekOpen && ResourcePeek ? /* @__PURE__ */ jsx15(
|
|
@@ -2325,7 +2345,7 @@ function MatrxUuidCell({
|
|
|
2325
2345
|
) : null
|
|
2326
2346
|
]
|
|
2327
2347
|
}
|
|
2328
|
-
);
|
|
2348
|
+
) });
|
|
2329
2349
|
}
|
|
2330
2350
|
|
|
2331
2351
|
// src/data-table/entity.ts
|