@ai-matrx/design-system 0.49.22 → 0.49.24
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 +12 -0
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +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/host.d.cts +1 -1
- package/dist/data-table/host.d.ts +1 -1
- package/dist/data-table/index.cjs +51 -9
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +5 -3
- package/dist/data-table/index.d.ts +5 -3
- package/dist/data-table/index.js +51 -9
- 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/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/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/{layered-filters-DrGJ_nuG.d.ts → layered-filters-CKS15cIc.d.ts} +4 -2
- package/dist/{layered-filters-BltsILT3.d.cts → layered-filters-frtWJUl5.d.cts} +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.49.24
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.49.23..npm/design-system/v0.49.24 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.49.23
|
|
10
|
+
|
|
11
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
12
|
+
`git diff npm/design-system/v0.49.22..npm/design-system/v0.49.23 -- apps/shared/design-system`).
|
|
13
|
+
No source changes intended and no consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.49.22
|
|
4
16
|
|
|
5
17
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.cjs';
|
|
2
|
-
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-
|
|
2
|
+
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-frtWJUl5.cjs';
|
|
3
3
|
import '../content-transfer.cjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.js';
|
|
2
|
-
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-
|
|
2
|
+
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-CKS15cIc.js';
|
|
3
3
|
import '../content-transfer.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-frtWJUl5.cjs';
|
|
2
2
|
import '../content-transfer.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-CKS15cIc.js';
|
|
2
2
|
import '../content-transfer.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import { CopyControlProps } from './copy-types.cjs';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.cjs';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-frtWJUl5.cjs';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.cjs';
|
|
7
7
|
export { MatrxTableMenuItem, MatrxTableMenuSection } from './menu-targets.cjs';
|
|
8
8
|
import '../content-transfer.cjs';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import { CopyControlProps } from './copy-types.js';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-CKS15cIc.js';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.js';
|
|
7
7
|
export { MatrxTableMenuItem, MatrxTableMenuSection } from './menu-targets.js';
|
|
8
8
|
import '../content-transfer.js';
|
|
@@ -36974,7 +36974,7 @@ function GenericTablePagination({
|
|
|
36974
36974
|
// src/data-table/TableViewTabs.tsx
|
|
36975
36975
|
var import_react7 = require("react");
|
|
36976
36976
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
36977
|
-
function TableViewTabs({ tabs, activeId, onSelect, onAdd, onClose, onRename, related, editingId, onEditCancel, onEditDone, closable = true, addHint = "New view from the current one \xB7 double-click a tab to rename", renameable = true }) {
|
|
36977
|
+
function TableViewTabs({ tabs, activeId, onSelect, onAdd, onClose, onRename, related, editingId, onEditCancel, onEditDone, closable = true, closeLabel = "Close", addHint = "New view from the current one \xB7 double-click a tab to rename", renameable = true }) {
|
|
36978
36978
|
const [renaming, setRenaming] = (0, import_react7.useState)(null);
|
|
36979
36979
|
const [draft, setDraft] = (0, import_react7.useState)("");
|
|
36980
36980
|
const opened = (0, import_react7.useRef)(null);
|
|
@@ -37063,9 +37063,9 @@ function TableViewTabs({ tabs, activeId, onSelect, onAdd, onClose, onRename, rel
|
|
|
37063
37063
|
canClose(tab.id) && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Tooltip, { children: [
|
|
37064
37064
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { type: "button", "aria-hidden": "true", tabIndex: -1, "data-close-tab": tab.id, onClick: () => onClose(tab.id), className: "flex size-7 items-center justify-center rounded hover:bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(X, { className: "size-4" }) }) }),
|
|
37065
37065
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(TooltipContent, { children: [
|
|
37066
|
-
|
|
37067
|
-
|
|
37068
|
-
|
|
37066
|
+
closeLabel,
|
|
37067
|
+
" ",
|
|
37068
|
+
tab.label
|
|
37069
37069
|
] })
|
|
37070
37070
|
] })
|
|
37071
37071
|
] }, tab.id)) }),
|
|
@@ -54214,14 +54214,17 @@ function SavedViewsControl({
|
|
|
54214
54214
|
onReload,
|
|
54215
54215
|
presentation = "menu",
|
|
54216
54216
|
onRename,
|
|
54217
|
+
onRemove,
|
|
54217
54218
|
related
|
|
54218
54219
|
}) {
|
|
54219
54220
|
const unsavedChangesId = (0, import_react23.useId)();
|
|
54220
54221
|
const [saveOpen, setSaveOpen] = (0, import_react23.useState)(false);
|
|
54221
54222
|
const [name, setName] = (0, import_react23.useState)("");
|
|
54222
54223
|
const [saving, setSaving] = (0, import_react23.useState)(false);
|
|
54224
|
+
const [removing, setRemoving] = (0, import_react23.useState)(false);
|
|
54223
54225
|
const [actionError, setActionError] = (0, import_react23.useState)(null);
|
|
54224
54226
|
const [pendingSelect, setPendingSelect] = (0, import_react23.useState)(void 0);
|
|
54227
|
+
const [pendingRemove, setPendingRemove] = (0, import_react23.useState)(null);
|
|
54225
54228
|
const visibleError = actionError ?? error;
|
|
54226
54229
|
const select = (id) => {
|
|
54227
54230
|
if (id === activeId) return;
|
|
@@ -54270,6 +54273,25 @@ function SavedViewsControl({
|
|
|
54270
54273
|
setSaving(false);
|
|
54271
54274
|
}
|
|
54272
54275
|
};
|
|
54276
|
+
const requestRemove = (id) => {
|
|
54277
|
+
const view = views.find((candidate) => candidate.id === id);
|
|
54278
|
+
if (!view || !onRemove) return;
|
|
54279
|
+
setActionError(null);
|
|
54280
|
+
setPendingRemove({ id: view.id, name: view.name });
|
|
54281
|
+
};
|
|
54282
|
+
const remove = async () => {
|
|
54283
|
+
if (!pendingRemove || !onRemove) return;
|
|
54284
|
+
setRemoving(true);
|
|
54285
|
+
setActionError(null);
|
|
54286
|
+
try {
|
|
54287
|
+
await onRemove(pendingRemove.id);
|
|
54288
|
+
setPendingRemove(null);
|
|
54289
|
+
} catch (cause) {
|
|
54290
|
+
setActionError(cause instanceof Error ? cause.message : String(cause));
|
|
54291
|
+
} finally {
|
|
54292
|
+
setRemoving(false);
|
|
54293
|
+
}
|
|
54294
|
+
};
|
|
54273
54295
|
const activeName = activeId ? views.find((view) => view.id === activeId)?.name : void 0;
|
|
54274
54296
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex min-w-0 flex-wrap items-center gap-1", "data-matrx-table-saved-views": true, children: [
|
|
54275
54297
|
presentation === "tabs" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
@@ -54283,12 +54305,12 @@ function SavedViewsControl({
|
|
|
54283
54305
|
setActionError(null);
|
|
54284
54306
|
setSaveOpen(true);
|
|
54285
54307
|
},
|
|
54286
|
-
onClose:
|
|
54287
|
-
},
|
|
54308
|
+
onClose: requestRemove,
|
|
54288
54309
|
onRename: (id, label) => {
|
|
54289
54310
|
if (onRename) void Promise.resolve(onRename(id, label)).catch((cause) => setActionError(cause instanceof Error ? cause.message : String(cause)));
|
|
54290
54311
|
},
|
|
54291
|
-
closable:
|
|
54312
|
+
closable: Boolean(onRemove),
|
|
54313
|
+
closeLabel: "Delete saved view",
|
|
54292
54314
|
renameable: Boolean(onRename),
|
|
54293
54315
|
addHint: "Save a named view to your account",
|
|
54294
54316
|
related
|
|
@@ -54329,6 +54351,7 @@ function SavedViewsControl({
|
|
|
54329
54351
|
setSaveOpen(true);
|
|
54330
54352
|
}, children: "Save current view\u2026" }),
|
|
54331
54353
|
activeId && onUpdate ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuItem, { disabled: saving, onSelect: () => void update(), children: "Update current view" }) : null,
|
|
54354
|
+
activeId && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuItem, { disabled: saving || removing, onSelect: () => requestRemove(activeId), children: "Delete current view\u2026" }) : null,
|
|
54332
54355
|
onReload ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuItem, { disabled: saving || loading, onSelect: () => void reload(), children: "Reload views" }) : null
|
|
54333
54356
|
] })
|
|
54334
54357
|
] }),
|
|
@@ -54336,7 +54359,7 @@ function SavedViewsControl({
|
|
|
54336
54359
|
"This table view has unsaved changes. ",
|
|
54337
54360
|
presentation === "tabs" ? onUpdate ? "Use Save changes to update it." : "Use Save as view to keep it." : "Open the view menu to save or update it."
|
|
54338
54361
|
] }) : null,
|
|
54339
|
-
visibleError && !saveOpen ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorBox, { className: "basis-full break-words text-xs text-destructive", message: visibleError, operation: "Load or save a saved view", origin: "design-system/SavedViewsControl" }) : null,
|
|
54362
|
+
visibleError && !saveOpen && !pendingRemove ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorBox, { className: "basis-full break-words text-xs text-destructive", message: visibleError, operation: "Load or save a saved view", origin: "design-system/SavedViewsControl" }) : null,
|
|
54340
54363
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Dialog, { open: saveOpen, onOpenChange: setSaveOpen, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DialogContent, { children: [
|
|
54341
54364
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DialogTitle, { children: "Save current view" }) }),
|
|
54342
54365
|
visibleError ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorBox, { className: "text-sm text-destructive", message: visibleError, operation: "Save a view", origin: "design-system/SavedViewsControl" }) : null,
|
|
@@ -54350,7 +54373,7 @@ function SavedViewsControl({
|
|
|
54350
54373
|
if (!open) setPendingSelect(void 0);
|
|
54351
54374
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DialogContent, { children: [
|
|
54352
54375
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DialogTitle, { children: "Unsaved view changes" }) }),
|
|
54353
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
54376
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DialogDescription, { children: "Switching views will discard the changes you have not saved." }),
|
|
54354
54377
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DialogFooter, { children: [
|
|
54355
54378
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { type: "button", variant: "outline", onClick: () => setPendingSelect(void 0), children: "Stay on this view" }),
|
|
54356
54379
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { type: "button", onClick: () => {
|
|
@@ -54359,6 +54382,25 @@ function SavedViewsControl({
|
|
|
54359
54382
|
if (next !== void 0) onSelect(next);
|
|
54360
54383
|
}, children: "Discard changes and switch" })
|
|
54361
54384
|
] })
|
|
54385
|
+
] }) }),
|
|
54386
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Dialog, { open: pendingRemove !== null, onOpenChange: (open) => {
|
|
54387
|
+
if (!open && !removing) setPendingRemove(null);
|
|
54388
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DialogContent, { children: [
|
|
54389
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DialogTitle, { children: [
|
|
54390
|
+
"Delete ",
|
|
54391
|
+
pendingRemove ? `\u201C${pendingRemove.name}\u201D` : "saved view",
|
|
54392
|
+
"?"
|
|
54393
|
+
] }) }),
|
|
54394
|
+
actionError ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorBox, { className: "text-sm text-destructive", message: actionError, operation: "Delete a saved view", origin: "design-system/SavedViewsControl" }) : null,
|
|
54395
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DialogDescription, { children: [
|
|
54396
|
+
"This removes the saved view from your account",
|
|
54397
|
+
activeId === pendingRemove?.id && dirty ? " and discards its unsaved layout changes" : "",
|
|
54398
|
+
"."
|
|
54399
|
+
] }),
|
|
54400
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DialogFooter, { children: [
|
|
54401
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { type: "button", variant: "outline", disabled: removing, onClick: () => setPendingRemove(null), children: "Cancel" }),
|
|
54402
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { type: "button", variant: "destructive", disabled: removing, onClick: () => void remove(), children: removing ? "Deleting\u2026" : "Delete view" })
|
|
54403
|
+
] })
|
|
54362
54404
|
] }) })
|
|
54363
54405
|
] });
|
|
54364
54406
|
}
|