@ai-matrx/design-system 0.49.23 → 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 +6 -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.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-LwqRKKni.d.ts → layered-filters-CKS15cIc.d.ts} +3 -1
- package/dist/{layered-filters-DZNCPJsU.d.cts → layered-filters-frtWJUl5.d.cts} +3 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as MatrxDataTableRead, k as ColumnMarker, M as MatrxColumnDef } from '../layered-filters-
|
|
4
|
-
export { A as AnyOfColumnSearch, l as CellEditType, m as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, n as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, o as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, p as MatrxDataTableDetailConfig, q as MatrxDataTableEditConfig, r as MatrxDataTableEmptyState, s as MatrxDataTableExpandedDetailConfig, t as MatrxDataTableFacetsConfig, u as MatrxDataTableFilterUi, v as MatrxDataTableGroupingConfig, w as MatrxDataTableHierarchyConfig, x as MatrxDataTableHierarchyMove, y as MatrxDataTableMobileCardControls, z as MatrxDataTableMultiExpandedDetailConfig, B as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, D as MatrxDataTableReadStatus, E as MatrxDataTableSelectionConfig, F as MatrxDataTableSingleExpandedDetailConfig, G as MatrxDataTableSourceProcessing, H as MatrxDataTableSpreadsheetConfig, I as MatrxDataTableStyleConfig, J as MatrxDataTableSummaryConfig, K as MatrxDataTableSummaryContext, N as MatrxDataTableSummaryMetric, O as MatrxDataTableToolbar, P as MatrxDataTableUrlStateConfig, Q as MatrxDataTableVirtualizeConfig, R as MatrxDataTableWindowConfig, U as MatrxTablePagination, V as NumberFilterOp, W as SavedTableViewTab, X as SortDirection, S as SortState, Y as SpreadsheetSelection, Z as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, _ as TableSearchRole, $ as TableSearchScope, a0 as TableViewQuery, a1 as TableViewTab, a2 as TableViewTabs, a3 as TableViewTabsProps, a4 as TableViewTabsStore, a5 as TextFilterMode, a6 as ToolbarFacet, a7 as inferTableSearchRole, a8 as rankTableSearchRows, a9 as resolveTableSearchScopes } from '../layered-filters-
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as MatrxDataTableRead, k as ColumnMarker, M as MatrxColumnDef } from '../layered-filters-frtWJUl5.cjs';
|
|
4
|
+
export { A as AnyOfColumnSearch, l as CellEditType, m as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, n as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, o as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, p as MatrxDataTableDetailConfig, q as MatrxDataTableEditConfig, r as MatrxDataTableEmptyState, s as MatrxDataTableExpandedDetailConfig, t as MatrxDataTableFacetsConfig, u as MatrxDataTableFilterUi, v as MatrxDataTableGroupingConfig, w as MatrxDataTableHierarchyConfig, x as MatrxDataTableHierarchyMove, y as MatrxDataTableMobileCardControls, z as MatrxDataTableMultiExpandedDetailConfig, B as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, D as MatrxDataTableReadStatus, E as MatrxDataTableSelectionConfig, F as MatrxDataTableSingleExpandedDetailConfig, G as MatrxDataTableSourceProcessing, H as MatrxDataTableSpreadsheetConfig, I as MatrxDataTableStyleConfig, J as MatrxDataTableSummaryConfig, K as MatrxDataTableSummaryContext, N as MatrxDataTableSummaryMetric, O as MatrxDataTableToolbar, P as MatrxDataTableUrlStateConfig, Q as MatrxDataTableVirtualizeConfig, R as MatrxDataTableWindowConfig, U as MatrxTablePagination, V as NumberFilterOp, W as SavedTableViewTab, X as SortDirection, S as SortState, Y as SpreadsheetSelection, Z as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, _ as TableSearchRole, $ as TableSearchScope, a0 as TableViewQuery, a1 as TableViewTab, a2 as TableViewTabs, a3 as TableViewTabsProps, a4 as TableViewTabsStore, a5 as TextFilterMode, a6 as ToolbarFacet, a7 as inferTableSearchRole, a8 as rankTableSearchRows, a9 as resolveTableSearchScopes } from '../layered-filters-frtWJUl5.cjs';
|
|
5
5
|
import { TableReadFailureProps, TableStaleNoticeProps } from './host.cjs';
|
|
6
6
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableContextMenuBoundaryProps, TableDoors, TableEntityRefProps, TableLinkProps, TableMenuIconProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.cjs';
|
|
7
7
|
import { CopyControlProps } from './copy-types.cjs';
|
|
@@ -85,10 +85,12 @@ interface SavedViewsControlProps {
|
|
|
85
85
|
/** Tabs and the menu are two presentations of the same durable views. */
|
|
86
86
|
presentation?: "menu" | "tabs";
|
|
87
87
|
onRename?: (id: string, name: string) => void | Promise<void>;
|
|
88
|
+
/** Archives one durable view after confirmation; the host also resets an active view on success. */
|
|
89
|
+
onRemove?: (id: string) => void | Promise<void>;
|
|
88
90
|
related?: ReactNode;
|
|
89
91
|
}
|
|
90
92
|
/** Shared named-view chooser. Persistence, authorization and validation stay host-side. */
|
|
91
|
-
declare function SavedViewsControl({ views, activeId, loading, error, dirty, onSelect, onSaveNew, onUpdate, onReload, presentation, onRename, related, }: SavedViewsControlProps): React.JSX.Element;
|
|
93
|
+
declare function SavedViewsControl({ views, activeId, loading, error, dirty, onSelect, onSaveNew, onUpdate, onReload, presentation, onRename, onRemove, related, }: SavedViewsControlProps): React.JSX.Element;
|
|
92
94
|
|
|
93
95
|
/** Defensive decoder for persisted JSON. Invalid snapshots are ignored by adapters. */
|
|
94
96
|
declare function parseTableViewSnapshot(raw: unknown): TableViewSnapshot | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as MatrxDataTableRead, k as ColumnMarker, M as MatrxColumnDef } from '../layered-filters-
|
|
4
|
-
export { A as AnyOfColumnSearch, l as CellEditType, m as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, n as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, o as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, p as MatrxDataTableDetailConfig, q as MatrxDataTableEditConfig, r as MatrxDataTableEmptyState, s as MatrxDataTableExpandedDetailConfig, t as MatrxDataTableFacetsConfig, u as MatrxDataTableFilterUi, v as MatrxDataTableGroupingConfig, w as MatrxDataTableHierarchyConfig, x as MatrxDataTableHierarchyMove, y as MatrxDataTableMobileCardControls, z as MatrxDataTableMultiExpandedDetailConfig, B as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, D as MatrxDataTableReadStatus, E as MatrxDataTableSelectionConfig, F as MatrxDataTableSingleExpandedDetailConfig, G as MatrxDataTableSourceProcessing, H as MatrxDataTableSpreadsheetConfig, I as MatrxDataTableStyleConfig, J as MatrxDataTableSummaryConfig, K as MatrxDataTableSummaryContext, N as MatrxDataTableSummaryMetric, O as MatrxDataTableToolbar, P as MatrxDataTableUrlStateConfig, Q as MatrxDataTableVirtualizeConfig, R as MatrxDataTableWindowConfig, U as MatrxTablePagination, V as NumberFilterOp, W as SavedTableViewTab, X as SortDirection, S as SortState, Y as SpreadsheetSelection, Z as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, _ as TableSearchRole, $ as TableSearchScope, a0 as TableViewQuery, a1 as TableViewTab, a2 as TableViewTabs, a3 as TableViewTabsProps, a4 as TableViewTabsStore, a5 as TextFilterMode, a6 as ToolbarFacet, a7 as inferTableSearchRole, a8 as rankTableSearchRows, a9 as resolveTableSearchScopes } from '../layered-filters-
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as MatrxDataTableRead, k as ColumnMarker, M as MatrxColumnDef } from '../layered-filters-CKS15cIc.js';
|
|
4
|
+
export { A as AnyOfColumnSearch, l as CellEditType, m as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, n as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, o as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, p as MatrxDataTableDetailConfig, q as MatrxDataTableEditConfig, r as MatrxDataTableEmptyState, s as MatrxDataTableExpandedDetailConfig, t as MatrxDataTableFacetsConfig, u as MatrxDataTableFilterUi, v as MatrxDataTableGroupingConfig, w as MatrxDataTableHierarchyConfig, x as MatrxDataTableHierarchyMove, y as MatrxDataTableMobileCardControls, z as MatrxDataTableMultiExpandedDetailConfig, B as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, D as MatrxDataTableReadStatus, E as MatrxDataTableSelectionConfig, F as MatrxDataTableSingleExpandedDetailConfig, G as MatrxDataTableSourceProcessing, H as MatrxDataTableSpreadsheetConfig, I as MatrxDataTableStyleConfig, J as MatrxDataTableSummaryConfig, K as MatrxDataTableSummaryContext, N as MatrxDataTableSummaryMetric, O as MatrxDataTableToolbar, P as MatrxDataTableUrlStateConfig, Q as MatrxDataTableVirtualizeConfig, R as MatrxDataTableWindowConfig, U as MatrxTablePagination, V as NumberFilterOp, W as SavedTableViewTab, X as SortDirection, S as SortState, Y as SpreadsheetSelection, Z as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, _ as TableSearchRole, $ as TableSearchScope, a0 as TableViewQuery, a1 as TableViewTab, a2 as TableViewTabs, a3 as TableViewTabsProps, a4 as TableViewTabsStore, a5 as TextFilterMode, a6 as ToolbarFacet, a7 as inferTableSearchRole, a8 as rankTableSearchRows, a9 as resolveTableSearchScopes } from '../layered-filters-CKS15cIc.js';
|
|
5
5
|
import { TableReadFailureProps, TableStaleNoticeProps } from './host.js';
|
|
6
6
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableContextMenuBoundaryProps, TableDoors, TableEntityRefProps, TableLinkProps, TableMenuIconProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.js';
|
|
7
7
|
import { CopyControlProps } from './copy-types.js';
|
|
@@ -85,10 +85,12 @@ interface SavedViewsControlProps {
|
|
|
85
85
|
/** Tabs and the menu are two presentations of the same durable views. */
|
|
86
86
|
presentation?: "menu" | "tabs";
|
|
87
87
|
onRename?: (id: string, name: string) => void | Promise<void>;
|
|
88
|
+
/** Archives one durable view after confirmation; the host also resets an active view on success. */
|
|
89
|
+
onRemove?: (id: string) => void | Promise<void>;
|
|
88
90
|
related?: ReactNode;
|
|
89
91
|
}
|
|
90
92
|
/** Shared named-view chooser. Persistence, authorization and validation stay host-side. */
|
|
91
|
-
declare function SavedViewsControl({ views, activeId, loading, error, dirty, onSelect, onSaveNew, onUpdate, onReload, presentation, onRename, related, }: SavedViewsControlProps): React.JSX.Element;
|
|
93
|
+
declare function SavedViewsControl({ views, activeId, loading, error, dirty, onSelect, onSaveNew, onUpdate, onReload, presentation, onRename, onRemove, related, }: SavedViewsControlProps): React.JSX.Element;
|
|
92
94
|
|
|
93
95
|
/** Defensive decoder for persisted JSON. Invalid snapshots are ignored by adapters. */
|
|
94
96
|
declare function parseTableViewSnapshot(raw: unknown): TableViewSnapshot | null;
|
package/dist/data-table/index.js
CHANGED
|
@@ -36840,7 +36840,7 @@ function GenericTablePagination({
|
|
|
36840
36840
|
// src/data-table/TableViewTabs.tsx
|
|
36841
36841
|
import { useEffect as useEffect6, useRef as useRef6, useState as useState8 } from "react";
|
|
36842
36842
|
import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
36843
|
-
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 }) {
|
|
36843
|
+
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 }) {
|
|
36844
36844
|
const [renaming, setRenaming] = useState8(null);
|
|
36845
36845
|
const [draft, setDraft] = useState8("");
|
|
36846
36846
|
const opened = useRef6(null);
|
|
@@ -36929,9 +36929,9 @@ function TableViewTabs({ tabs, activeId, onSelect, onAdd, onClose, onRename, rel
|
|
|
36929
36929
|
canClose(tab.id) && /* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
36930
36930
|
/* @__PURE__ */ jsx24(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx24("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__ */ jsx24(X, { className: "size-4" }) }) }),
|
|
36931
36931
|
/* @__PURE__ */ jsxs16(TooltipContent, { children: [
|
|
36932
|
-
|
|
36933
|
-
|
|
36934
|
-
|
|
36932
|
+
closeLabel,
|
|
36933
|
+
" ",
|
|
36934
|
+
tab.label
|
|
36935
36935
|
] })
|
|
36936
36936
|
] })
|
|
36937
36937
|
] }, tab.id)) }),
|
|
@@ -54172,14 +54172,17 @@ function SavedViewsControl({
|
|
|
54172
54172
|
onReload,
|
|
54173
54173
|
presentation = "menu",
|
|
54174
54174
|
onRename,
|
|
54175
|
+
onRemove,
|
|
54175
54176
|
related
|
|
54176
54177
|
}) {
|
|
54177
54178
|
const unsavedChangesId = useId4();
|
|
54178
54179
|
const [saveOpen, setSaveOpen] = useState27(false);
|
|
54179
54180
|
const [name, setName] = useState27("");
|
|
54180
54181
|
const [saving, setSaving] = useState27(false);
|
|
54182
|
+
const [removing, setRemoving] = useState27(false);
|
|
54181
54183
|
const [actionError, setActionError] = useState27(null);
|
|
54182
54184
|
const [pendingSelect, setPendingSelect] = useState27(void 0);
|
|
54185
|
+
const [pendingRemove, setPendingRemove] = useState27(null);
|
|
54183
54186
|
const visibleError = actionError ?? error;
|
|
54184
54187
|
const select = (id) => {
|
|
54185
54188
|
if (id === activeId) return;
|
|
@@ -54228,6 +54231,25 @@ function SavedViewsControl({
|
|
|
54228
54231
|
setSaving(false);
|
|
54229
54232
|
}
|
|
54230
54233
|
};
|
|
54234
|
+
const requestRemove = (id) => {
|
|
54235
|
+
const view = views.find((candidate) => candidate.id === id);
|
|
54236
|
+
if (!view || !onRemove) return;
|
|
54237
|
+
setActionError(null);
|
|
54238
|
+
setPendingRemove({ id: view.id, name: view.name });
|
|
54239
|
+
};
|
|
54240
|
+
const remove = async () => {
|
|
54241
|
+
if (!pendingRemove || !onRemove) return;
|
|
54242
|
+
setRemoving(true);
|
|
54243
|
+
setActionError(null);
|
|
54244
|
+
try {
|
|
54245
|
+
await onRemove(pendingRemove.id);
|
|
54246
|
+
setPendingRemove(null);
|
|
54247
|
+
} catch (cause) {
|
|
54248
|
+
setActionError(cause instanceof Error ? cause.message : String(cause));
|
|
54249
|
+
} finally {
|
|
54250
|
+
setRemoving(false);
|
|
54251
|
+
}
|
|
54252
|
+
};
|
|
54231
54253
|
const activeName = activeId ? views.find((view) => view.id === activeId)?.name : void 0;
|
|
54232
54254
|
return /* @__PURE__ */ jsxs42("div", { className: "flex min-w-0 flex-wrap items-center gap-1", "data-matrx-table-saved-views": true, children: [
|
|
54233
54255
|
presentation === "tabs" ? /* @__PURE__ */ jsxs42(Fragment13, { children: [
|
|
@@ -54241,12 +54263,12 @@ function SavedViewsControl({
|
|
|
54241
54263
|
setActionError(null);
|
|
54242
54264
|
setSaveOpen(true);
|
|
54243
54265
|
},
|
|
54244
|
-
onClose:
|
|
54245
|
-
},
|
|
54266
|
+
onClose: requestRemove,
|
|
54246
54267
|
onRename: (id, label) => {
|
|
54247
54268
|
if (onRename) void Promise.resolve(onRename(id, label)).catch((cause) => setActionError(cause instanceof Error ? cause.message : String(cause)));
|
|
54248
54269
|
},
|
|
54249
|
-
closable:
|
|
54270
|
+
closable: Boolean(onRemove),
|
|
54271
|
+
closeLabel: "Delete saved view",
|
|
54250
54272
|
renameable: Boolean(onRename),
|
|
54251
54273
|
addHint: "Save a named view to your account",
|
|
54252
54274
|
related
|
|
@@ -54287,6 +54309,7 @@ function SavedViewsControl({
|
|
|
54287
54309
|
setSaveOpen(true);
|
|
54288
54310
|
}, children: "Save current view\u2026" }),
|
|
54289
54311
|
activeId && onUpdate ? /* @__PURE__ */ jsx53(DropdownMenuItem, { disabled: saving, onSelect: () => void update(), children: "Update current view" }) : null,
|
|
54312
|
+
activeId && onRemove ? /* @__PURE__ */ jsx53(DropdownMenuItem, { disabled: saving || removing, onSelect: () => requestRemove(activeId), children: "Delete current view\u2026" }) : null,
|
|
54290
54313
|
onReload ? /* @__PURE__ */ jsx53(DropdownMenuItem, { disabled: saving || loading, onSelect: () => void reload(), children: "Reload views" }) : null
|
|
54291
54314
|
] })
|
|
54292
54315
|
] }),
|
|
@@ -54294,7 +54317,7 @@ function SavedViewsControl({
|
|
|
54294
54317
|
"This table view has unsaved changes. ",
|
|
54295
54318
|
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."
|
|
54296
54319
|
] }) : null,
|
|
54297
|
-
visibleError && !saveOpen ? /* @__PURE__ */ jsx53(ErrorBox, { className: "basis-full break-words text-xs text-destructive", message: visibleError, operation: "Load or save a saved view", origin: "design-system/SavedViewsControl" }) : null,
|
|
54320
|
+
visibleError && !saveOpen && !pendingRemove ? /* @__PURE__ */ jsx53(ErrorBox, { className: "basis-full break-words text-xs text-destructive", message: visibleError, operation: "Load or save a saved view", origin: "design-system/SavedViewsControl" }) : null,
|
|
54298
54321
|
/* @__PURE__ */ jsx53(Dialog, { open: saveOpen, onOpenChange: setSaveOpen, children: /* @__PURE__ */ jsxs42(DialogContent, { children: [
|
|
54299
54322
|
/* @__PURE__ */ jsx53(DialogHeader, { children: /* @__PURE__ */ jsx53(DialogTitle, { children: "Save current view" }) }),
|
|
54300
54323
|
visibleError ? /* @__PURE__ */ jsx53(ErrorBox, { className: "text-sm text-destructive", message: visibleError, operation: "Save a view", origin: "design-system/SavedViewsControl" }) : null,
|
|
@@ -54308,7 +54331,7 @@ function SavedViewsControl({
|
|
|
54308
54331
|
if (!open) setPendingSelect(void 0);
|
|
54309
54332
|
}, children: /* @__PURE__ */ jsxs42(DialogContent, { children: [
|
|
54310
54333
|
/* @__PURE__ */ jsx53(DialogHeader, { children: /* @__PURE__ */ jsx53(DialogTitle, { children: "Unsaved view changes" }) }),
|
|
54311
|
-
/* @__PURE__ */ jsx53(
|
|
54334
|
+
/* @__PURE__ */ jsx53(DialogDescription, { children: "Switching views will discard the changes you have not saved." }),
|
|
54312
54335
|
/* @__PURE__ */ jsxs42(DialogFooter, { children: [
|
|
54313
54336
|
/* @__PURE__ */ jsx53(Button, { type: "button", variant: "outline", onClick: () => setPendingSelect(void 0), children: "Stay on this view" }),
|
|
54314
54337
|
/* @__PURE__ */ jsx53(Button, { type: "button", onClick: () => {
|
|
@@ -54317,6 +54340,25 @@ function SavedViewsControl({
|
|
|
54317
54340
|
if (next !== void 0) onSelect(next);
|
|
54318
54341
|
}, children: "Discard changes and switch" })
|
|
54319
54342
|
] })
|
|
54343
|
+
] }) }),
|
|
54344
|
+
/* @__PURE__ */ jsx53(Dialog, { open: pendingRemove !== null, onOpenChange: (open) => {
|
|
54345
|
+
if (!open && !removing) setPendingRemove(null);
|
|
54346
|
+
}, children: /* @__PURE__ */ jsxs42(DialogContent, { children: [
|
|
54347
|
+
/* @__PURE__ */ jsx53(DialogHeader, { children: /* @__PURE__ */ jsxs42(DialogTitle, { children: [
|
|
54348
|
+
"Delete ",
|
|
54349
|
+
pendingRemove ? `\u201C${pendingRemove.name}\u201D` : "saved view",
|
|
54350
|
+
"?"
|
|
54351
|
+
] }) }),
|
|
54352
|
+
actionError ? /* @__PURE__ */ jsx53(ErrorBox, { className: "text-sm text-destructive", message: actionError, operation: "Delete a saved view", origin: "design-system/SavedViewsControl" }) : null,
|
|
54353
|
+
/* @__PURE__ */ jsxs42(DialogDescription, { children: [
|
|
54354
|
+
"This removes the saved view from your account",
|
|
54355
|
+
activeId === pendingRemove?.id && dirty ? " and discards its unsaved layout changes" : "",
|
|
54356
|
+
"."
|
|
54357
|
+
] }),
|
|
54358
|
+
/* @__PURE__ */ jsxs42(DialogFooter, { children: [
|
|
54359
|
+
/* @__PURE__ */ jsx53(Button, { type: "button", variant: "outline", disabled: removing, onClick: () => setPendingRemove(null), children: "Cancel" }),
|
|
54360
|
+
/* @__PURE__ */ jsx53(Button, { type: "button", variant: "destructive", disabled: removing, onClick: () => void remove(), children: removing ? "Deleting\u2026" : "Delete view" })
|
|
54361
|
+
] })
|
|
54320
54362
|
] }) })
|
|
54321
54363
|
] });
|
|
54322
54364
|
}
|