ezux 1.0.0
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/LICENSE +21 -0
- package/README.md +56 -0
- package/dist/EzEventModal-DtpvYwGr.js +684 -0
- package/dist/EzGroupingPanel-CFwKUrF_.js +59 -0
- package/dist/EzTableEditDialog-BIk_mNpI.js +60 -0
- package/dist/components/EzKanban/EzKanban.types.d.ts +789 -0
- package/dist/components/EzKanban/components/CardEditorModal.d.ts +23 -0
- package/dist/components/EzKanban/components/EzKanbanErrorFallback.d.ts +1 -0
- package/dist/components/EzKanban/components/FilterPopover.d.ts +10 -0
- package/dist/components/EzKanban/components/KanbanBoard.d.ts +62 -0
- package/dist/components/EzKanban/components/KanbanCard.d.ts +38 -0
- package/dist/components/EzKanban/components/KanbanColumn.d.ts +55 -0
- package/dist/components/EzKanban/components/KanbanSwimlane.d.ts +46 -0
- package/dist/components/EzKanban/components/KanbanToolbar.d.ts +41 -0
- package/dist/components/EzKanban/exports.d.ts +4 -0
- package/dist/components/EzKanban/hooks/useKanbanCards.d.ts +36 -0
- package/dist/components/EzKanban/hooks/useKanbanColumns.d.ts +27 -0
- package/dist/components/EzKanban/hooks/useKanbanDragDrop.d.ts +31 -0
- package/dist/components/EzKanban/hooks/useKanbanFilters.d.ts +23 -0
- package/dist/components/EzKanban/hooks/useKanbanState.d.ts +79 -0
- package/dist/components/EzKanban/hooks/useKanbanSwimlanes.d.ts +27 -0
- package/dist/components/EzKanban/hooks/useKanbanVirtualization.d.ts +16 -0
- package/dist/components/EzKanban/index.d.ts +45 -0
- package/dist/components/EzKanban/services/KanbanService.d.ts +30 -0
- package/dist/components/EzKanban/state/kanban.store.d.ts +33 -0
- package/dist/components/EzKanban/useEzKanban.d.ts +162 -0
- package/dist/components/EzKanban/views/KanbanTimelineView.d.ts +15 -0
- package/dist/components/EzLayout/Authentication/AuthSlider.d.ts +13 -0
- package/dist/components/EzLayout/Authentication/InputPassword.d.ts +7 -0
- package/dist/components/EzLayout/Authentication/SignInForm.d.ts +21 -0
- package/dist/components/EzLayout/Authentication/SignUpForm.d.ts +20 -0
- package/dist/components/EzLayout/EzHeader.d.ts +33 -0
- package/dist/components/EzLayout/EzLanguageSwitcher.d.ts +4 -0
- package/dist/components/EzLayout/EzLayout.types.d.ts +223 -0
- package/dist/components/EzLayout/EzSidebar.d.ts +14 -0
- package/dist/components/EzLayout/EzThemeColorChanger.d.ts +9 -0
- package/dist/components/EzLayout/EzThemeSwitcher.d.ts +8 -0
- package/dist/components/EzLayout/EzUserProfile.d.ts +23 -0
- package/dist/components/EzLayout/components/MainContent.d.ts +13 -0
- package/dist/components/EzLayout/hooks/useLayoutImperative.d.ts +17 -0
- package/dist/components/EzLayout/hooks/useLayoutState.d.ts +25 -0
- package/dist/components/EzLayout/index.d.ts +19 -0
- package/dist/components/EzLayout/useEzLayout.d.ts +26 -0
- package/dist/components/EzScheduler/EzScheduler.types.d.ts +1658 -0
- package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +117 -0
- package/dist/components/EzScheduler/components/EzEventModal.d.ts +17 -0
- package/dist/components/EzScheduler/components/EzOverlapAlert.d.ts +12 -0
- package/dist/components/EzScheduler/components/EzQuickInfoPopup.d.ts +22 -0
- package/dist/components/EzScheduler/components/EzResourceSidebar.d.ts +33 -0
- package/dist/components/EzScheduler/components/EzSchedulerContent.d.ts +123 -0
- package/dist/components/EzScheduler/components/EzSchedulerQuickAdd.d.ts +17 -0
- package/dist/components/EzScheduler/components/RecurrenceEditor.d.ts +7 -0
- package/dist/components/EzScheduler/components/SchedulerLoadingSpinner.d.ts +2 -0
- package/dist/components/EzScheduler/components/dnd/DraggableEvent.d.ts +21 -0
- package/dist/components/EzScheduler/components/dnd/DroppableSlot.d.ts +19 -0
- package/dist/components/EzScheduler/hooks/useRecurrence.d.ts +2 -0
- package/dist/components/EzScheduler/hooks/useSchedulerEventHandlers.d.ts +11 -0
- package/dist/components/EzScheduler/hooks/useSchedulerEvents.d.ts +26 -0
- package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +15 -0
- package/dist/components/EzScheduler/hooks/useSchedulerNavigation.d.ts +9 -0
- package/dist/components/EzScheduler/hooks/useSchedulerResources.d.ts +10 -0
- package/dist/components/EzScheduler/hooks/useSchedulerState.d.ts +14 -0
- package/dist/components/EzScheduler/hooks/useSchedulerVirtualization.d.ts +9 -0
- package/dist/components/EzScheduler/index.d.ts +41 -0
- package/dist/components/EzScheduler/models/EventSettings.d.ts +11 -0
- package/dist/components/EzScheduler/models/View.d.ts +49 -0
- package/dist/components/EzScheduler/models/index.d.ts +2 -0
- package/dist/components/EzScheduler/services/AttendeeService.d.ts +15 -0
- package/dist/components/EzScheduler/services/AuditService.d.ts +15 -0
- package/dist/components/EzScheduler/services/CollisionDetectionService.d.ts +19 -0
- package/dist/components/EzScheduler/services/DragAndDropService.d.ts +16 -0
- package/dist/components/EzScheduler/services/HistoryService.d.ts +31 -0
- package/dist/components/EzScheduler/services/ICalendarImportService.d.ts +16 -0
- package/dist/components/EzScheduler/services/PrintService.d.ts +7 -0
- package/dist/components/EzScheduler/services/RecurrenceEngine.d.ts +7 -0
- package/dist/components/EzScheduler/services/ReminderService.d.ts +17 -0
- package/dist/components/EzScheduler/services/SchedulerService.d.ts +69 -0
- package/dist/components/EzScheduler/services/SearchService.d.ts +11 -0
- package/dist/components/EzScheduler/services/SecurityService.d.ts +25 -0
- package/dist/components/EzScheduler/services/TimezoneService.d.ts +20 -0
- package/dist/components/EzScheduler/services/VirtualScrollingService.d.ts +34 -0
- package/dist/components/EzScheduler/state/scheduler.store.d.ts +27 -0
- package/dist/components/EzScheduler/templates/CellTemplate.d.ts +42 -0
- package/dist/components/EzScheduler/templates/EditorTemplate.d.ts +32 -0
- package/dist/components/EzScheduler/templates/HeaderTemplate.d.ts +36 -0
- package/dist/components/EzScheduler/tests/phase1_rendering.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase2_events.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase3_templates.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase4_export.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase5_advanced.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase6_security.spec.d.ts +1 -0
- package/dist/components/EzScheduler/tests/phase7_regression.spec.d.ts +1 -0
- package/dist/components/EzScheduler/useEzScheduler.d.ts +152 -0
- package/dist/components/EzScheduler/utils/createDragConstraint.d.ts +7 -0
- package/dist/components/EzScheduler/utils/getWeekNumber.d.ts +8 -0
- package/dist/components/EzScheduler/utils/sanitizeHtml.d.ts +17 -0
- package/dist/components/EzScheduler/views/AgendaView.d.ts +33 -0
- package/dist/components/EzScheduler/views/DayWeekView.d.ts +182 -0
- package/dist/components/EzScheduler/views/MonthView.d.ts +65 -0
- package/dist/components/EzScheduler/views/TimelineView.d.ts +121 -0
- package/dist/components/EzSignature/EzSignature.d.ts +42 -0
- package/dist/components/EzSignature/EzSignature.test.d.ts +1 -0
- package/dist/components/EzSignature/EzSignature.types.d.ts +132 -0
- package/dist/components/EzSignature/index.d.ts +2 -0
- package/dist/components/EzTable/EzColumnMenu.d.ts +7 -0
- package/dist/components/EzTable/EzDateFilterTree.d.ts +7 -0
- package/dist/components/EzTable/EzExcelFilter.d.ts +6 -0
- package/dist/components/EzTable/EzFilterBuilder.d.ts +12 -0
- package/dist/components/EzTable/EzGroupingPanel.d.ts +9 -0
- package/dist/components/EzTable/EzHeaderContextMenu.d.ts +8 -0
- package/dist/components/EzTable/EzPagination.d.ts +19 -0
- package/dist/components/EzTable/EzTable.types.d.ts +1481 -0
- package/dist/components/EzTable/EzTableEditDialog.d.ts +15 -0
- package/dist/components/EzTable/EzTableFooter.d.ts +10 -0
- package/dist/components/EzTable/EzTableOverlays.d.ts +11 -0
- package/dist/components/EzTable/EzTableStatusBar.d.ts +6 -0
- package/dist/components/EzTable/EzTableToolbar.d.ts +58 -0
- package/dist/components/EzTable/SmartCell.d.ts +7 -0
- package/dist/components/EzTable/__tests__/EzTableDX.test.d.ts +0 -0
- package/dist/components/EzTable/__tests__/EzTableEnterprise.test.d.ts +1 -0
- package/dist/components/EzTable/__tests__/useEzTable.test.d.ts +1 -0
- package/dist/components/EzTable/components/AdvancedColumnFilter.d.ts +16 -0
- package/dist/components/EzTable/components/BooleanFilterSection.d.ts +7 -0
- package/dist/components/EzTable/components/DraggableHeader.d.ts +10 -0
- package/dist/components/EzTable/components/EzTableBodySection.d.ts +70 -0
- package/dist/components/EzTable/components/EzTableCell.d.ts +46 -0
- package/dist/components/EzTable/components/EzTableHeaderSection.d.ts +22 -0
- package/dist/components/EzTable/components/EzTablePaginationSection.d.ts +31 -0
- package/dist/components/EzTable/components/EzTableRow.d.ts +56 -0
- package/dist/components/EzTable/components/FilterActionButtons.d.ts +16 -0
- package/dist/components/EzTable/components/FilterRuleSelect.d.ts +26 -0
- package/dist/components/EzTable/components/SelectAllCheckbox.d.ts +21 -0
- package/dist/components/EzTable/components/SelectFilterSection.d.ts +18 -0
- package/dist/components/EzTable/components/VirtualizedFilterList.d.ts +21 -0
- package/dist/components/EzTable/constants/filterOptions.d.ts +47 -0
- package/dist/components/EzTable/context/EzTableContext.d.ts +10 -0
- package/dist/components/EzTable/context/TableConfigContext.d.ts +13 -0
- package/dist/components/EzTable/context/TableStore.d.ts +17 -0
- package/dist/components/EzTable/filterUtils.d.ts +5 -0
- package/dist/components/EzTable/hooks/useAutoFit.d.ts +4 -0
- package/dist/components/EzTable/hooks/useCellEventHandlers.d.ts +16 -0
- package/dist/components/EzTable/hooks/useColumnSizeVars.d.ts +6 -0
- package/dist/components/EzTable/hooks/useContainerResize.d.ts +11 -0
- package/dist/components/EzTable/hooks/useDialogStateInitialization.d.ts +8 -0
- package/dist/components/EzTable/hooks/useFilterSelection.d.ts +12 -0
- package/dist/components/EzTable/hooks/useTableFiltering.d.ts +23 -0
- package/dist/components/EzTable/hooks/useTableHistory.d.ts +87 -0
- package/dist/components/EzTable/hooks/useTableImperative.d.ts +42 -0
- package/dist/components/EzTable/hooks/useTableSelection.d.ts +32 -0
- package/dist/components/EzTable/hooks/useTableState.d.ts +31 -0
- package/dist/components/EzTable/hooks/useTableVirtualization.d.ts +33 -0
- package/dist/components/EzTable/index.d.ts +50 -0
- package/dist/components/EzTable/renderers/index.d.ts +6 -0
- package/dist/components/EzTable/services/TableService.d.ts +26 -0
- package/dist/components/EzTable/useEzTable.d.ts +17 -0
- package/dist/components/EzTable/utils/TextMeasurer.d.ts +1 -0
- package/dist/components/EzTable/utils/TruncatedTooltip.d.ts +7 -0
- package/dist/components/EzTable/utils/columnTypeDetector.d.ts +5 -0
- package/dist/components/EzTable/utils/filterTypeGuards.d.ts +3 -0
- package/dist/components/EzTable/utils/index.d.ts +1 -0
- package/dist/components/EzTreeView/EzTreeView.types.d.ts +395 -0
- package/dist/components/EzTreeView/EzTreeViewItem.d.ts +77 -0
- package/dist/components/EzTreeView/EzVirtualTree.d.ts +72 -0
- package/dist/components/EzTreeView/components/EzTreeViewLoadingSpinner.d.ts +2 -0
- package/dist/components/EzTreeView/hooks/useTreeDragDrop.d.ts +31 -0
- package/dist/components/EzTreeView/hooks/useTreeExpansion.d.ts +21 -0
- package/dist/components/EzTreeView/hooks/useTreeImperative.d.ts +28 -0
- package/dist/components/EzTreeView/hooks/useTreeSelection.d.ts +31 -0
- package/dist/components/EzTreeView/hooks/useTreeState.d.ts +21 -0
- package/dist/components/EzTreeView/hooks/useTreeVirtualization.d.ts +18 -0
- package/dist/components/EzTreeView/index.d.ts +40 -0
- package/dist/components/EzTreeView/services/TreeService.d.ts +11 -0
- package/dist/components/EzTreeView/useEzTreeView.d.ts +62 -0
- package/dist/components/EzTreeView/utils/treeUtils.d.ts +17 -0
- package/dist/components/shared/components/EzErrorBoundary.d.ts +18 -0
- package/dist/components/shared/components/EzLayoutErrorFallback.d.ts +2 -0
- package/dist/components/shared/components/EzLoadingSpinner.d.ts +8 -0
- package/dist/components/shared/components/EzSchedulerErrorFallback.d.ts +2 -0
- package/dist/components/shared/components/EzTableErrorFallback.d.ts +2 -0
- package/dist/components/shared/components/EzTreeViewErrorFallback.d.ts +2 -0
- package/dist/components/ui/avatar.d.ts +5 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/breadcrumb.d.ts +19 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/calendar.d.ts +15 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/checkbox.d.ts +7 -0
- package/dist/components/ui/command.d.ts +78 -0
- package/dist/components/ui/context-menu.d.ts +27 -0
- package/dist/components/ui/date-time-picker.d.ts +13 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/index.d.ts +26 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/modal.d.ts +9 -0
- package/dist/components/ui/password-input.d.ts +5 -0
- package/dist/components/ui/popover.d.ts +4 -0
- package/dist/components/ui/progress.d.ts +7 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +24 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/tabs.d.ts +14 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/ezux.es.js +149 -0
- package/dist/ezux.umd.js +68 -0
- package/dist/index-DBwoXp4n.js +30656 -0
- package/dist/index.d.ts +70 -0
- package/dist/lib/perfect-freehand.d.ts +221 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/shared/components/AnimatedText.d.ts +44 -0
- package/dist/shared/components/BaseCell.d.ts +14 -0
- package/dist/shared/components/BooleanRenderer.d.ts +34 -0
- package/dist/shared/components/ChartRenderer.d.ts +19 -0
- package/dist/shared/components/DeleteConfirmationModal.d.ts +11 -0
- package/dist/shared/components/EzContextMenu.d.ts +12 -0
- package/dist/shared/components/EzNotificationDropdown.d.ts +1 -0
- package/dist/shared/components/HighlightText.d.ts +4 -0
- package/dist/shared/components/Modal.d.ts +13 -0
- package/dist/shared/components/NotificationPanel.d.ts +2 -0
- package/dist/shared/components/PrimitiveRenderer.d.ts +39 -0
- package/dist/shared/components/SearchableSelect.d.ts +13 -0
- package/dist/shared/components/SelectRenderer.d.ts +33 -0
- package/dist/shared/components/StatusBadge.d.ts +12 -0
- package/dist/shared/components/TooltipWrapper.d.ts +12 -0
- package/dist/shared/components/index.d.ts +9 -0
- package/dist/shared/hooks/index.d.ts +56 -0
- package/dist/shared/hooks/useBaseComponent.d.ts +60 -0
- package/dist/shared/hooks/useComponentImperativeAPI.d.ts +11 -0
- package/dist/shared/hooks/useComponentState.d.ts +39 -0
- package/dist/shared/hooks/useCurrentTime.d.ts +6 -0
- package/dist/shared/hooks/useDataChangeEvents.d.ts +53 -0
- package/dist/shared/hooks/useDebounce.d.ts +10 -0
- package/dist/shared/hooks/useDeleteConfirmation.d.ts +9 -0
- package/dist/shared/hooks/useDialogState.d.ts +21 -0
- package/dist/shared/hooks/useDndHandlers.d.ts +17 -0
- package/dist/shared/hooks/useEditing.d.ts +107 -0
- package/dist/shared/hooks/useEventHandlers.d.ts +61 -0
- package/dist/shared/hooks/useEzTheme.d.ts +22 -0
- package/dist/shared/hooks/useFieldValidation.d.ts +24 -0
- package/dist/shared/hooks/useHistory.d.ts +13 -0
- package/dist/shared/hooks/useI18n.d.ts +9 -0
- package/dist/shared/hooks/useImperativeAPI.d.ts +8 -0
- package/dist/shared/hooks/useInitCoreServices.d.ts +5 -0
- package/dist/shared/hooks/useKeyboardNavigation.d.ts +36 -0
- package/dist/shared/hooks/useKeyboardShortcuts.d.ts +14 -0
- package/dist/shared/hooks/useLifecycleEvents.d.ts +22 -0
- package/dist/shared/hooks/useLoadingState.d.ts +17 -0
- package/dist/shared/hooks/useMediaQuery.d.ts +6 -0
- package/dist/shared/hooks/useNotificationService.d.ts +8 -0
- package/dist/shared/hooks/usePerformanceMonitor.d.ts +15 -0
- package/dist/shared/hooks/useRowSelectionEvents.d.ts +44 -0
- package/dist/shared/hooks/useSelection.d.ts +73 -0
- package/dist/shared/hooks/useService.d.ts +12 -0
- package/dist/shared/hooks/useServiceState.d.ts +12 -0
- package/dist/shared/hooks/useStateChangeEvents.d.ts +61 -0
- package/dist/shared/hooks/useTheme.d.ts +13 -0
- package/dist/shared/hooks/useVirtualization.d.ts +85 -0
- package/dist/shared/services/BaseService.d.ts +56 -0
- package/dist/shared/services/ContextMenuService.d.ts +58 -0
- package/dist/shared/services/ExportService.d.ts +35 -0
- package/dist/shared/services/FocusManagerService.d.ts +33 -0
- package/dist/shared/services/HierarchyService.d.ts +43 -0
- package/dist/shared/services/I18nService.d.ts +65 -0
- package/dist/shared/services/LayoutService.d.ts +80 -0
- package/dist/shared/services/NotificationService.d.ts +44 -0
- package/dist/shared/services/PersistenceService.d.ts +69 -0
- package/dist/shared/services/ServiceRegistry.d.ts +51 -0
- package/dist/shared/services/ThemeService.d.ts +49 -0
- package/dist/shared/services/VirtualizationService.d.ts +51 -0
- package/dist/shared/state/store.d.ts +10 -0
- package/dist/shared/themes.d.ts +25 -0
- package/dist/shared/types/BaseProps.d.ts +18 -0
- package/dist/shared/types/common.d.ts +292 -0
- package/dist/shared/types/commonTypes.d.ts +101 -0
- package/dist/shared/types/index.d.ts +2 -0
- package/dist/shared/utils/canvasUtils.d.ts +16 -0
- package/dist/shared/utils/commonUtils.d.ts +28 -0
- package/dist/shared/utils/csvUtils.d.ts +7 -0
- package/dist/shared/utils/dateUtils.d.ts +5 -0
- package/dist/shared/utils/dndUtils.d.ts +16 -0
- package/dist/shared/utils/ezStyleUtils.d.ts +64 -0
- package/dist/shared/utils/formatUtils.d.ts +20 -0
- package/dist/shared/utils/imperativeApiUtils.d.ts +36 -0
- package/dist/shared/utils/index.d.ts +11 -0
- package/dist/shared/utils/renderUtils.d.ts +6 -0
- package/dist/shared/utils/serviceUtils.d.ts +10 -0
- package/dist/shared/utils/styleUtils.d.ts +66 -0
- package/dist/shared/utils/validationUtils.d.ts +16 -0
- package/package.json +101 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { j as e, c } from "./index-DBwoXp4n.js";
|
|
2
|
+
import u from "react";
|
|
3
|
+
import { useDroppable as x } from "@dnd-kit/core";
|
|
4
|
+
import { Layers as p, ChevronRight as b, X as h } from "lucide-react";
|
|
5
|
+
const v = ({
|
|
6
|
+
grouping: t,
|
|
7
|
+
onGroupingChange: o,
|
|
8
|
+
columns: a
|
|
9
|
+
}) => {
|
|
10
|
+
const { setNodeRef: n, isOver: d } = x({
|
|
11
|
+
id: "grouping-panel"
|
|
12
|
+
}), l = (r) => {
|
|
13
|
+
o(t.filter((s) => s !== r));
|
|
14
|
+
}, m = (r) => a.find((i) => i.id === r)?.columnDef.header || r;
|
|
15
|
+
return /* @__PURE__ */ e.jsxs(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
ref: n,
|
|
19
|
+
className: c(
|
|
20
|
+
"flex items-center gap-2 p-2 min-h-[40px] border rounded-md transition-all duration-200",
|
|
21
|
+
"bg-muted/40 border-dashed border-border",
|
|
22
|
+
d && "bg-blue-50 dark:bg-blue-900/20 border-blue-400 ring-1 ring-blue-400"
|
|
23
|
+
),
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground mr-2", children: [
|
|
26
|
+
/* @__PURE__ */ e.jsx(p, { className: "w-4 h-4" }),
|
|
27
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium uppercase tracking-wider", children: "Group By" })
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
30
|
+
t.length === 0 && !d && /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground/70 italic", children: "Drag columns here to group" }),
|
|
31
|
+
t.map((r, s) => /* @__PURE__ */ e.jsxs(u.Fragment, { children: [
|
|
32
|
+
s > 0 && /* @__PURE__ */ e.jsx("div", { className: "flex items-center text-muted-foreground", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4" }) }),
|
|
33
|
+
/* @__PURE__ */ e.jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: "flex items-center gap-1.5 px-2 py-1 bg-card border border-border rounded-md shadow-sm animate-in fade-in zoom-in duration-200",
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium text-foreground", children: m(r) }),
|
|
39
|
+
/* @__PURE__ */ e.jsx(
|
|
40
|
+
"button",
|
|
41
|
+
{
|
|
42
|
+
onClick: () => l(r),
|
|
43
|
+
className: "p-0.5 hover:bg-muted rounded transition-colors",
|
|
44
|
+
children: /* @__PURE__ */ e.jsx(h, { className: "w-3 h-3 text-muted-foreground hover:text-destructive" })
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] }, r)),
|
|
51
|
+
d && /* @__PURE__ */ e.jsx("div", { className: "px-2 py-1 border border-blue-400 border-dashed bg-blue-50/50 dark:bg-blue-900/20 rounded-md text-sm text-blue-500 animate-pulse", children: "Drop to Group" })
|
|
52
|
+
] })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
v as EzGroupingPanel
|
|
59
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { j as e, L as j, I as b, B as x } from "./index-DBwoXp4n.js";
|
|
2
|
+
import { useState as v, useEffect as y } from "react";
|
|
3
|
+
const k = ({
|
|
4
|
+
open: r,
|
|
5
|
+
onClose: n,
|
|
6
|
+
onSave: f,
|
|
7
|
+
columns: l,
|
|
8
|
+
initialData: d,
|
|
9
|
+
isNew: t,
|
|
10
|
+
onFormRender: c
|
|
11
|
+
}) => {
|
|
12
|
+
const [o, m] = v({});
|
|
13
|
+
if (y(() => {
|
|
14
|
+
r && (m(d || {}), c?.({
|
|
15
|
+
form: { data: d || {}, columns: l },
|
|
16
|
+
mode: t ? "Add" : "Edit"
|
|
17
|
+
}));
|
|
18
|
+
}, [r, d, l, t, c]), !r) return null;
|
|
19
|
+
const h = () => {
|
|
20
|
+
f(o), n();
|
|
21
|
+
}, g = (s, a) => {
|
|
22
|
+
m((i) => ({ ...i, [s]: a }));
|
|
23
|
+
}, u = l.filter((s) => s.accessorKey && s.meta?.isEditable !== !1 && s.id !== "actions" && s.id !== "select");
|
|
24
|
+
return /* @__PURE__ */ e.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm animate-in fade-in-0", children: /* @__PURE__ */ e.jsxs(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: "bg-background w-full max-w-lg rounded-lg border shadow-lg p-6 space-y-6 animate-in zoom-in-95 slide-in-from-bottom-2",
|
|
28
|
+
role: "dialog",
|
|
29
|
+
"aria-modal": "true",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col space-y-1.5 text-center sm:text-left", children: [
|
|
32
|
+
/* @__PURE__ */ e.jsx("h2", { className: "text-lg font-semibold leading-none tracking-tight", children: t ? "Add New Record" : "Edit Record" }),
|
|
33
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: t ? "Enter details for the new record." : "Make changes to the record below." })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ e.jsx("div", { className: "grid gap-4 py-4 max-h-[60vh] overflow-y-auto pr-2", children: u.map((s) => {
|
|
36
|
+
const a = s.accessorKey, i = o[a] ?? "";
|
|
37
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [
|
|
38
|
+
/* @__PURE__ */ e.jsx(j, { htmlFor: a, className: "text-right", children: typeof s.header == "string" ? s.header : a }),
|
|
39
|
+
/* @__PURE__ */ e.jsx(
|
|
40
|
+
b,
|
|
41
|
+
{
|
|
42
|
+
id: a,
|
|
43
|
+
value: i,
|
|
44
|
+
onChange: (p) => g(a, p.target.value),
|
|
45
|
+
className: "col-span-3"
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] }, a);
|
|
49
|
+
}) }),
|
|
50
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", children: [
|
|
51
|
+
/* @__PURE__ */ e.jsx(x, { variant: "outline", onClick: n, children: "Cancel" }),
|
|
52
|
+
/* @__PURE__ */ e.jsx(x, { onClick: h, children: "Save Changes" })
|
|
53
|
+
] })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
) });
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
k as EzTableEditDialog
|
|
60
|
+
};
|