@nccirtu/tablefy 0.7.4 → 0.7.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/dist/columns/confirm/types.d.ts +2 -0
- package/dist/confirm/types.d.ts +2 -0
- package/dist/index.esm.js +5 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/confirm/types.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Badge } from '@/components/ui/badge';
|
|
|
12
12
|
import { Checkbox } from '@/components/ui/checkbox';
|
|
13
13
|
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip';
|
|
14
14
|
import { Progress } from '@/components/ui/progress';
|
|
15
|
-
import {
|
|
15
|
+
import { AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction } from '@/components/ui/alert-dialog';
|
|
16
16
|
|
|
17
17
|
function DataTableHeader({ title, description, actions = [], search, searchValue = "", onSearchChange, table, selectedCount = 0, enableColumnVisibility = false, columnVisibilityLabel = "Spalten", className, }) {
|
|
18
18
|
const normalActions = actions.filter((a) => !a.bulk && !a.hidden);
|
|
@@ -1750,7 +1750,10 @@ function ConfirmProvider({ children }) {
|
|
|
1750
1750
|
setQueue((q) => q.slice(1));
|
|
1751
1751
|
}
|
|
1752
1752
|
};
|
|
1753
|
-
|
|
1753
|
+
const { title, description, confirmLabel, cancelLabel, variant, icon, image, } = currentRequest?.options || {};
|
|
1754
|
+
return (jsxs(Fragment, { children: [children, jsx(AlertDialog, { open: !!currentRequest, onOpenChange: (open) => !open && handleCancel(), children: jsxs(AlertDialogContent, { className: "max-w-md", children: [jsxs(AlertDialogHeader, { children: [image && (jsx("div", { className: "mb-4 flex justify-center", children: jsx("img", { src: image, alt: "Confirmation", className: "h-24 w-24 object-contain" }) })), icon && !image && (jsx("div", { className: "mb-4 flex justify-center text-6xl", children: icon })), jsx(AlertDialogTitle, { className: "text-center", children: title || "Bestätigung erforderlich" }), description && (jsx(AlertDialogDescription, { className: "text-center", children: description }))] }), jsxs(AlertDialogFooter, { className: "sm:justify-center", children: [jsx(AlertDialogCancel, { onClick: handleCancel, children: cancelLabel || "Abbrechen" }), jsx(AlertDialogAction, { onClick: handleConfirm, className: variant === "destructive"
|
|
1755
|
+
? "bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
1756
|
+
: "", children: confirmLabel || "Bestätigen" })] })] }) })] }));
|
|
1754
1757
|
}
|
|
1755
1758
|
|
|
1756
1759
|
export { AvatarGroupColumn, BadgeColumn, ButtonColumn, CheckboxColumn, ConfirmProvider, DataTable, DataTableSchema, DateColumn, DropdownColumn, EmptyStateBuilder, EnumColumn, IconColumn, ImageColumn, InputColumn, LinkColumn, NumberColumn, ProgressColumn, SelectColumn, TableSchema, AvatarGroupColumn as avatarGroupColumn, BadgeColumn as badgeColumn, ButtonColumn as buttonColumn, CheckboxColumn as checkboxColumn, confirm, DateColumn as dateColumn, DropdownColumn as dropdownColumn, EnumColumn as enumColumn, IconColumn as iconColumn, InputColumn as inputColumn };
|