ezux 1.1.13 → 1.1.18
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/README.md +58 -15
- package/dist/DeleteConfirmationModal-CukNDgtX.cjs +1 -0
- package/dist/DeleteConfirmationModal-p8XGDGIw.js +38 -0
- package/dist/EzContextMenu-BCUoEQp5.cjs +1 -0
- package/dist/EzContextMenu-srLxujt8.js +287 -0
- package/dist/EzErrorBoundary-C7a6VisX.js +74 -0
- package/dist/EzErrorBoundary-d_2g-_EK.cjs +1 -0
- package/dist/EzEventModal-C079wLjP.js +725 -0
- package/dist/EzEventModal-CAA9cAM0.cjs +1 -0
- package/dist/EzFlow-C74NbZA9.js +2545 -0
- package/dist/EzFlow-CQFeY7DL.cjs +5 -0
- package/dist/EzGroupingPanel-BVaAJaVU.js +107 -0
- package/dist/EzGroupingPanel-BwWDWEuW.cjs +1 -0
- package/dist/EzKanban-BlJWybKe.js +1575 -0
- package/dist/EzKanban-DdKODRRv.cjs +2 -0
- package/dist/EzLayout-BGnqFtvO.cjs +1 -0
- package/dist/EzLayout-CiaPLniV.js +7005 -0
- package/dist/EzProvider-AlmsYIDk.js +982 -0
- package/dist/EzProvider-L2qQMq-v.cjs +1 -0
- package/dist/EzScheduler-C1Jtvvju.js +2700 -0
- package/dist/EzScheduler-CkqTngI6.cjs +1 -0
- package/dist/EzSchedulerQuickAdd-BIC8xbSn.js +124 -0
- package/dist/EzSchedulerQuickAdd-BeNfGdWs.cjs +1 -0
- package/dist/EzSchedulerToolbar-BJwTpgas.cjs +1 -0
- package/dist/EzSchedulerToolbar-Ba4gbvUg.js +305 -0
- package/dist/EzSignature-7UHO5lSP.js +386 -0
- package/dist/EzSignature-Df7UZ-IS.cjs +1 -0
- package/dist/EzTable-CEXvJR1t.cjs +3 -0
- package/dist/EzTable-D2p1IWHc.js +4290 -0
- package/dist/EzTableEditDialog-BXnnYSSy.cjs +1 -0
- package/dist/EzTableEditDialog-Ccd5XoHm.js +84 -0
- package/dist/EzTableFooter-CtexeDAC.cjs +1 -0
- package/dist/EzTableFooter-DrLoWelo.js +35 -0
- package/dist/EzTableToolbar-BH5z9fSJ.js +160 -0
- package/dist/EzTableToolbar-DwuumvWP.cjs +1 -0
- package/dist/EzTreeView-D1G0Aomc.js +818 -0
- package/dist/EzTreeView-KMGlU4ax.cjs +1 -0
- package/dist/HighlightText-BViuwe03.cjs +1 -0
- package/dist/HighlightText-DNA2R2uf.js +56 -0
- package/dist/KanbanBoard-B7_Z5sh1.js +1697 -0
- package/dist/KanbanBoard-CyitudI1.cjs +1 -0
- package/dist/Modal-BmX1C448.cjs +1 -0
- package/dist/Modal-CrzpKyjK.js +74 -0
- package/dist/NotificationPanel-BzpDc10Q.js +54 -0
- package/dist/NotificationPanel-CFME00wq.cjs +1 -0
- package/dist/TooltipWrapper-BSAmUx9H.js +44 -0
- package/dist/TooltipWrapper-DfbFAZ1U.cjs +1 -0
- package/dist/advanced.cjs +10 -0
- package/dist/advanced.d.ts +44 -0
- package/dist/advanced.es.js +400 -0
- package/dist/avatar-BSdRHETK.cjs +1 -0
- package/dist/avatar-BvCUJ-_r.js +27 -0
- package/dist/button-BBMwzUtG.cjs +1 -0
- package/dist/button-CYyNwV8S.js +44 -0
- package/dist/calendar-DEHX32Cp.cjs +1 -0
- package/dist/calendar-DOIPGsyI.js +112 -0
- package/dist/card-CPlRZxbq.cjs +1 -0
- package/dist/card-ZUNxcdIM.js +60 -0
- package/dist/checkbox-BrCh_Iid.cjs +1 -0
- package/dist/checkbox-DRkQuB4W.js +21 -0
- package/dist/components/EzFlow/EzConnectionLine.d.ts +5 -0
- package/dist/components/EzFlow/EzFlow.examples.d.ts +5 -0
- package/dist/components/EzFlow/EzFlow.types.d.ts +260 -0
- package/dist/components/EzFlow/EzFlowBackground.d.ts +5 -0
- package/dist/components/EzFlow/EzFlowCanvas.d.ts +3 -0
- package/dist/components/EzFlow/EzFlowControls.d.ts +5 -0
- package/dist/components/EzFlow/EzFlowEdge.d.ts +5 -0
- package/dist/components/EzFlow/EzFlowHeader.d.ts +6 -0
- package/dist/components/EzFlow/EzFlowToolbox.d.ts +6 -0
- package/dist/components/EzFlow/EzWorkflow.d.ts +5 -0
- package/dist/components/EzFlow/EzWorkflowPerformance.d.ts +3 -0
- package/dist/components/EzFlow/EzWorkflowServiceAdapters.d.ts +24 -0
- package/dist/components/EzFlow/EzWorkflowValidation.d.ts +95 -0
- package/dist/components/EzFlow/index.d.ts +13 -0
- package/dist/components/EzFlow/nodes/ActionNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/ApprovalNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/DecisionNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/DelayNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/EndNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/GroupNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/LoopNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/RequestNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/StartNode.d.ts +3 -0
- package/dist/components/EzFlow/nodes/index.d.ts +9 -0
- package/dist/components/EzKanban/EzKanban.types.d.ts +808 -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 +59 -0
- package/dist/components/EzKanban/components/KanbanCard.d.ts +46 -0
- package/dist/components/EzKanban/components/KanbanColumn.d.ts +55 -0
- package/dist/components/EzKanban/components/KanbanSwimlane.d.ts +45 -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 +51 -0
- package/dist/components/EzKanban/services/KanbanService.d.ts +31 -0
- package/dist/components/EzKanban/state/kanban.store.d.ts +33 -0
- package/dist/components/EzKanban/useEzKanban.d.ts +87 -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 +48 -0
- package/dist/components/EzLayout/EzLanguageSwitcher.d.ts +4 -0
- package/dist/components/EzLayout/EzLayout.types.d.ts +261 -0
- package/dist/components/EzLayout/EzOrganizationSwitcher.d.ts +14 -0
- package/dist/components/EzLayout/EzSidebar.d.ts +24 -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 +27 -0
- package/dist/components/EzLayout/components/EzSidebarFooter.d.ts +8 -0
- package/dist/components/EzLayout/components/EzSidebarNav.d.ts +10 -0
- package/dist/components/EzLayout/components/EzSidebarNavItem.d.ts +11 -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 +23 -0
- package/dist/components/EzLayout/useEzLayout.d.ts +34 -0
- package/dist/components/EzScheduler/EzScheduler.types.d.ts +1252 -0
- package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +117 -0
- package/dist/components/EzScheduler/components/EzEventModal.d.ts +23 -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 +111 -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 +24 -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 +15 -0
- package/dist/components/EzScheduler/hooks/useSchedulerEvents.d.ts +27 -0
- package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +19 -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 +43 -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 +71 -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/useEzScheduler.d.ts +104 -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 +18 -0
- package/dist/components/EzScheduler/views/AgendaView.d.ts +28 -0
- package/dist/components/EzScheduler/views/DayWeekView.d.ts +177 -0
- package/dist/components/EzScheduler/views/MonthView.d.ts +60 -0
- package/dist/components/EzScheduler/views/TimelineView.d.ts +116 -0
- package/dist/components/EzSignature/EzSignature.d.ts +42 -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 +8 -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 +1 -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 +10 -0
- package/dist/components/EzTable/EzTableToolbar.d.ts +60 -0
- package/dist/components/EzTable/SmartCell.d.ts +7 -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/EzDraggableHeader.d.ts +10 -0
- package/dist/components/EzTable/components/EzHeaderDragPreview.d.ts +7 -0
- package/dist/components/EzTable/components/EzTableBodySection.d.ts +72 -0
- package/dist/components/EzTable/components/EzTableCell.d.ts +46 -0
- package/dist/components/EzTable/components/EzTableHeaderSection.d.ts +23 -0
- package/dist/components/EzTable/components/EzTablePaginationSection.d.ts +31 -0
- package/dist/components/EzTable/components/EzTableRow.d.ts +58 -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 +33 -0
- package/dist/components/EzTable/hooks/useTableVirtualization.d.ts +35 -0
- package/dist/components/EzTable/index.d.ts +54 -0
- package/dist/components/EzTable/renderers/index.d.ts +6 -0
- package/dist/components/EzTable/services/TableService.d.ts +29 -0
- package/dist/components/EzTable/types/EzTableColumn.types.d.ts +146 -0
- package/dist/components/EzTable/types/EzTableEdit.types.d.ts +58 -0
- package/dist/components/EzTable/types/EzTableFilter.types.d.ts +50 -0
- package/dist/components/EzTable/types/EzTableProps.d.ts +750 -0
- package/dist/components/EzTable/types/index.d.ts +4 -0
- package/dist/components/EzTable/useEzTable.d.ts +17 -0
- package/dist/components/EzTable/utils/SizingUtils.d.ts +11 -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 +364 -0
- package/dist/components/EzTreeView/EzTreeViewItem.d.ts +89 -0
- package/dist/components/EzTreeView/EzVirtualTree.d.ts +84 -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 +50 -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/EzSortableList.d.ts +12 -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 +10 -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 +13 -0
- package/dist/components/ui/calendar.d.ts +15 -0
- package/dist/components/ui/card.d.ts +10 -0
- package/dist/components/ui/checkbox.d.ts +7 -0
- package/dist/components/ui/combobox.d.ts +19 -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 +14 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/index.d.ts +27 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/label.d.ts +9 -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 +10 -0
- package/dist/components/ui/progress.d.ts +7 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +26 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/tabs.d.ts +22 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/tooltip.d.ts +10 -0
- package/dist/date-time-picker-Bs-7XzHD.cjs +1 -0
- package/dist/date-time-picker-fUzf4TnU.js +127 -0
- package/dist/dropdown-menu-BRP0tyR_.cjs +1 -0
- package/dist/dropdown-menu-B_7_K13o.js +78 -0
- package/dist/ezux.css +2 -1
- package/dist/flow.cjs +1 -0
- package/dist/flow.d.ts +2 -0
- package/dist/flow.es.js +2 -0
- package/dist/index.cjs +3 -12
- package/dist/index.d.ts +66 -6404
- package/dist/index.es.js +229 -1041
- package/dist/input-CYlvlbF7.cjs +1 -0
- package/dist/input-Cj3sQK3M.js +14 -0
- package/dist/kanban.cjs +1 -1
- package/dist/kanban.d.ts +2 -1343
- package/dist/kanban.es.js +4 -17
- package/dist/label-BGgvoZWD.cjs +1 -0
- package/dist/label-DWEV--5W.js +16 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +2 -690
- package/dist/layout.es.js +2 -20
- package/dist/lib/perfect-freehand.d.ts +221 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/mock-services.cjs +1 -0
- package/dist/mock-services.d.ts +8 -0
- package/dist/mock-services.es.js +161 -0
- package/dist/popover-D1akYj0W.js +17 -0
- package/dist/popover-wZKNvYM5.cjs +1 -0
- package/dist/scheduler.cjs +1 -1
- package/dist/scheduler.d.ts +2 -1430
- package/dist/scheduler.es.js +2 -11
- package/dist/scroll-area-BJs87d45.js +35 -0
- package/dist/scroll-area-DSkE2KB_.cjs +1 -0
- package/dist/select-D4tFaSai.js +43 -0
- package/dist/select-sVieKbLu.cjs +1 -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 +2 -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 +21 -0
- package/dist/shared/components/TooltipWrapper.d.ts +12 -0
- package/dist/shared/components/index.d.ts +9 -0
- package/dist/shared/contexts/EzProvider.d.ts +56 -0
- package/dist/shared/hooks/index.d.ts +56 -0
- package/dist/shared/hooks/useBaseComponent.d.ts +59 -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 +19 -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 +8 -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 +22 -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 +1 -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 +57 -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 +84 -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 +52 -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 +17 -0
- package/dist/shared/types/common.d.ts +373 -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/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 +121 -0
- package/dist/shared/utils/validationUtils.d.ts +16 -0
- package/dist/signature.cjs +1 -1
- package/dist/signature.d.ts +2 -410
- package/dist/signature.es.js +2 -4
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +2 -1059
- package/dist/table.es.js +2 -17
- package/dist/theme-vars.css +143 -135
- package/dist/tooltip-B1wC9m05.js +16 -0
- package/dist/tooltip-Qmzrg5u5.cjs +1 -0
- package/dist/treeview.cjs +1 -1
- package/dist/treeview.d.ts +2 -656
- package/dist/treeview.es.js +2 -954
- package/dist/useComponentState-DiSFLYju.js +57 -0
- package/dist/useComponentState-Wcz6pjd6.cjs +1 -0
- package/dist/useImperativeAPI-Dbx2hMTb.js +7 -0
- package/dist/useImperativeAPI-VrgLwXEO.cjs +1 -0
- package/dist/useInitCoreServices-CuBrviDM.js +40 -0
- package/dist/useInitCoreServices-DlALVDNx.cjs +1 -0
- package/dist/useService-CnCBGG3G.js +10 -0
- package/dist/useService-CyF782jv.cjs +1 -0
- package/dist/useServiceState-CkrJZm1D.js +21 -0
- package/dist/useServiceState-PyYQWxHi.cjs +1 -0
- package/package.json +76 -56
- package/dist/EzContextMenu-B6HBUjWv.cjs +0 -5
- package/dist/EzContextMenu-BSA_B6Pr.js +0 -3500
- package/dist/EzErrorBoundary-CEdz_hDo.cjs +0 -41
- package/dist/EzErrorBoundary-D4NBadES.js +0 -3727
- package/dist/EzEventModal-BUMp_BFi.js +0 -689
- package/dist/EzEventModal-xzHfzi0O.cjs +0 -1
- package/dist/EzGroupingPanel-BUsIYDRi.js +0 -143
- package/dist/EzGroupingPanel-D0HdSomF.cjs +0 -1
- package/dist/EzSchedulerQuickAdd-C653LTGh.js +0 -118
- package/dist/EzSchedulerQuickAdd-UnOWCpJd.cjs +0 -1
- package/dist/EzSchedulerToolbar-C-5OdRY6.cjs +0 -1
- package/dist/EzSchedulerToolbar-CO5jjDQg.js +0 -240
- package/dist/EzSignature-BaNesxwC.cjs +0 -1
- package/dist/EzSignature-D4EYwo9W.js +0 -419
- package/dist/EzTableEditDialog-Cd948V1C.js +0 -63
- package/dist/EzTableEditDialog-NiOubaMT.cjs +0 -1
- package/dist/EzTableFooter-CWjfGCjL.cjs +0 -1
- package/dist/EzTableFooter-DveD12RC.js +0 -54
- package/dist/EzTableToolbar-Bz8UWv6j.js +0 -246
- package/dist/EzTableToolbar-DHE7Bb1R.cjs +0 -1
- package/dist/HighlightText-8D6KEyBw.js +0 -68
- package/dist/HighlightText-LtZmzCle.cjs +0 -1
- package/dist/NotificationPanel-D2Y-_ahk.js +0 -68
- package/dist/NotificationPanel-zLxrtTGf.cjs +0 -1
- package/dist/TooltipWrapper-BrRTi5EJ.js +0 -2021
- package/dist/TooltipWrapper-DWts4bAI.cjs +0 -1
- package/dist/avatar-BeK0E4mn.js +0 -41
- package/dist/avatar-DZAaTK2f.cjs +0 -1
- package/dist/bell-DAz8P0BR.js +0 -14
- package/dist/bell-DOX2y38e.cjs +0 -1
- package/dist/calendar-BMZ8ddOf.cjs +0 -1
- package/dist/calendar-Dy3rVMW2.js +0 -90
- package/dist/checkbox-B0lGHUyy.cjs +0 -1
- package/dist/checkbox-boJRxICT.js +0 -46
- package/dist/chevron-down-C3s8jU6B.js +0 -5
- package/dist/chevron-down-DZVL7VHW.cjs +0 -1
- package/dist/chevron-left-BFr8XZyF.js +0 -5
- package/dist/chevron-left-HWhRo6IH.cjs +0 -1
- package/dist/circle-alert-77QqFR-z.cjs +0 -1
- package/dist/circle-alert-B2AMDd8N.js +0 -9
- package/dist/circle-x-Cv7bfIC_.js +0 -9
- package/dist/circle-x-DwVXxhXr.cjs +0 -1
- package/dist/date-time-picker-DTxHdPgQ.cjs +0 -1
- package/dist/date-time-picker-Dj2eftJI.js +0 -1636
- package/dist/download-0ZhO2XaW.cjs +0 -1
- package/dist/download-panVHmk6.js +0 -9
- package/dist/ellipsis-CuqNthAj.js +0 -9
- package/dist/ellipsis-CzlqJf-i.cjs +0 -1
- package/dist/grip-vertical-CSyDKBul.js +0 -12
- package/dist/grip-vertical-DZNBW1Dn.cjs +0 -1
- package/dist/index-B3ipEEhH.cjs +0 -2
- package/dist/index-BPPb7bcs.js +0 -3220
- package/dist/index-BQKw_Vho.js +0 -9604
- package/dist/index-C5STgBSy.js +0 -5203
- package/dist/index-C6NfgycP.js +0 -4644
- package/dist/index-D4f2ZdrG.cjs +0 -2
- package/dist/index-DUY1SqMo.cjs +0 -1
- package/dist/index-c1Zg--dt.cjs +0 -7
- package/dist/input-BgM_la4k.cjs +0 -1
- package/dist/input-jYQ5VKNR.js +0 -21
- package/dist/isBefore-C3Y_wbk3.js +0 -15
- package/dist/isBefore-Cp1ttk6q.cjs +0 -1
- package/dist/label-ClOW9UCt.js +0 -55
- package/dist/label-Dx6oDB-X.cjs +0 -1
- package/dist/layers-BA4i1fYX.js +0 -27
- package/dist/layers-xSPd-hz3.cjs +0 -1
- package/dist/popover-BJq1CKmi.cjs +0 -1
- package/dist/popover-Cmlb7w3R.js +0 -341
- package/dist/scroll-area-9fwpVNxT.js +0 -573
- package/dist/scroll-area-CwwZSSA4.cjs +0 -1
- package/dist/select-GxA46anr.cjs +0 -1
- package/dist/select-mDCun_IR.js +0 -35
- package/dist/settings-CvyjK75A.js +0 -31
- package/dist/settings-DKPknrt8.cjs +0 -1
- package/dist/sortable.esm-CsRPuXyD.cjs +0 -1
- package/dist/sortable.esm-CzMCDPet.js +0 -477
- package/dist/tooltip-B41iztKT.cjs +0 -1
- package/dist/tooltip-BCtrEe0z.js +0 -490
- package/dist/useComponentState-C87xXa5d.js +0 -64
- package/dist/useComponentState-DDgGbBXv.cjs +0 -1
- package/dist/useImperativeAPI-DXmCQvPL.js +0 -7
- package/dist/useImperativeAPI-DbZ3owSV.cjs +0 -1
- package/dist/useInitCoreServices-CwXv2p4S.cjs +0 -1
- package/dist/useInitCoreServices-D1WaWlaI.js +0 -3929
- package/dist/useService-8OoezWr8.cjs +0 -1
- package/dist/useService-BUi3uAqE.js +0 -10
- package/dist/useServiceState-BjpCjUn2.cjs +0 -1
- package/dist/useServiceState-VE-viK8b.js +0 -24
|
@@ -0,0 +1,1697 @@
|
|
|
1
|
+
import { _ as e } from "./EzProvider-AlmsYIDk.js";
|
|
2
|
+
import { t } from "./button-CYyNwV8S.js";
|
|
3
|
+
import { t as n } from "./input-Cj3sQK3M.js";
|
|
4
|
+
import { n as r, r as i, t as a } from "./avatar-BvCUJ-_r.js";
|
|
5
|
+
import { t as o } from "./label-DWEV--5W.js";
|
|
6
|
+
import { a as s, h as c, r as l, t as u } from "./dropdown-menu-B_7_K13o.js";
|
|
7
|
+
import { t as d } from "./EzScheduler-C1Jtvvju.js";
|
|
8
|
+
import { a as f, i as p, n as m, r as h, t as g } from "./select-D4tFaSai.js";
|
|
9
|
+
import { t as _ } from "./checkbox-DRkQuB4W.js";
|
|
10
|
+
import { t as v } from "./TooltipWrapper-BSAmUx9H.js";
|
|
11
|
+
import { t as y } from "./Modal-CrzpKyjK.js";
|
|
12
|
+
import { a as b, c as x, n as S, s as C, t as w } from "./card-ZUNxcdIM.js";
|
|
13
|
+
import { t as T } from "./date-time-picker-fUzf4TnU.js";
|
|
14
|
+
import * as E from "react";
|
|
15
|
+
import D, { memo as O, useCallback as k, useEffect as A, useMemo as j, useRef as M, useState as N } from "react";
|
|
16
|
+
import { cva as P } from "class-variance-authority";
|
|
17
|
+
import { Activity as F, AlertCircle as I, AlertTriangle as L, Archive as ee, Calendar as R, CheckCircle2 as z, CheckSquare as B, ChevronDown as V, ChevronRight as H, Clock as U, Edit2 as te, FileText as W, Globe as G, HelpCircle as ne, Image as re, List as ie, Loader2 as ae, Lock as K, MessageSquare as oe, MoreHorizontal as se, Paperclip as ce, PlayCircle as le, Plus as ue, RefreshCcw as de, Settings as q, ShieldAlert as fe, StopCircle as pe, Trash2 as me, Unlock as he, Users as ge, X as _e, XCircle as J } from "lucide-react";
|
|
18
|
+
import { jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
19
|
+
import { useForm as ve } from "@tanstack/react-form";
|
|
20
|
+
import { DndContext as Z, DragOverlay as ye, PointerSensor as be, useDroppable as xe, useSensor as Se, useSensors as Ce } from "@dnd-kit/core";
|
|
21
|
+
import { useVirtualizer as we } from "@tanstack/react-virtual";
|
|
22
|
+
import { addDays as Te, format as Ee, isValid as De, startOfDay as Oe } from "date-fns";
|
|
23
|
+
import { CSS as ke } from "@dnd-kit/utilities";
|
|
24
|
+
import { SortableContext as Ae, horizontalListSortingStrategy as je, useSortable as Me, verticalListSortingStrategy as Ne } from "@dnd-kit/sortable";
|
|
25
|
+
//#region src/components/ui/badge.tsx
|
|
26
|
+
var Pe = P("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
27
|
+
variants: { variant: {
|
|
28
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
29
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
30
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
31
|
+
outline: "text-foreground"
|
|
32
|
+
} },
|
|
33
|
+
defaultVariants: { variant: "default" }
|
|
34
|
+
});
|
|
35
|
+
function Fe({ className: t, variant: n, ...r }) {
|
|
36
|
+
return /* @__PURE__ */ Y("div", {
|
|
37
|
+
className: e(Pe({ variant: n }), t),
|
|
38
|
+
...r
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/ui/tabs.tsx
|
|
43
|
+
var Ie = E.createContext(void 0);
|
|
44
|
+
function Le({ className: t, defaultValue: n, value: r, onValueChange: i, children: a, ref: o, ...s }) {
|
|
45
|
+
let [c, l] = E.useState(n || ""), u = r !== void 0, d = u ? r : c, f = E.useCallback((e) => {
|
|
46
|
+
u || l(e), i?.(e);
|
|
47
|
+
}, [u, i]);
|
|
48
|
+
return /* @__PURE__ */ Y(Ie.Provider, {
|
|
49
|
+
value: {
|
|
50
|
+
value: d,
|
|
51
|
+
onValueChange: f
|
|
52
|
+
},
|
|
53
|
+
children: /* @__PURE__ */ Y("div", {
|
|
54
|
+
ref: o,
|
|
55
|
+
className: e(t),
|
|
56
|
+
...s,
|
|
57
|
+
children: a
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function Re({ className: t, ref: n, ...r }) {
|
|
62
|
+
return /* @__PURE__ */ Y("div", {
|
|
63
|
+
ref: n,
|
|
64
|
+
className: e("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", t),
|
|
65
|
+
...r
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function Q({ className: t, value: n, onClick: r, ref: i, ...a }) {
|
|
69
|
+
let o = E.useContext(Ie);
|
|
70
|
+
if (!o) throw Error("TabsTrigger must be used within Tabs");
|
|
71
|
+
return /* @__PURE__ */ Y("button", {
|
|
72
|
+
ref: i,
|
|
73
|
+
type: "button",
|
|
74
|
+
className: e("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", o.value === n && "bg-background text-foreground shadow-sm", t),
|
|
75
|
+
onClick: (e) => {
|
|
76
|
+
o.onValueChange(n), r?.(e);
|
|
77
|
+
},
|
|
78
|
+
...a
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function $({ className: t, value: n, children: r, ref: i, ...a }) {
|
|
82
|
+
let o = E.useContext(Ie);
|
|
83
|
+
if (!o) throw Error("TabsContent must be used within Tabs");
|
|
84
|
+
return o.value === n ? /* @__PURE__ */ Y("div", {
|
|
85
|
+
ref: i,
|
|
86
|
+
className: e("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", t),
|
|
87
|
+
...a,
|
|
88
|
+
children: r
|
|
89
|
+
}) : null;
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/components/EzKanban/components/CardEditorModal.tsx
|
|
93
|
+
var ze = ({ isOpen: e, onClose: i, onSave: s, onDelete: c, card: l, columns: u = [], columnId: d, customFields: v = [], currentUser: b = {
|
|
94
|
+
id: "current-user",
|
|
95
|
+
name: "Current User"
|
|
96
|
+
} }) => {
|
|
97
|
+
let { t: S } = x(), w = () => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `id-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, E = ve({
|
|
98
|
+
defaultValues: {
|
|
99
|
+
title: l?.title || "",
|
|
100
|
+
description: l?.description || "",
|
|
101
|
+
columnId: l?.columnId || d || u[0]?.id || "",
|
|
102
|
+
priority: l?.priority || "medium",
|
|
103
|
+
startDate: l?.startDate ? new Date(l.startDate) : void 0,
|
|
104
|
+
dueDate: l?.dueDate ? new Date(l.dueDate) : void 0,
|
|
105
|
+
checklists: l?.checklists || [],
|
|
106
|
+
attachments: l?.attachments || [],
|
|
107
|
+
comments: l?.comments || [],
|
|
108
|
+
coverImage: l?.coverImage || "",
|
|
109
|
+
customFieldValues: l?.customFieldValues || {},
|
|
110
|
+
subtasks: l?.subtasks || [],
|
|
111
|
+
timeTracking: l?.timeTracking || {
|
|
112
|
+
estimated: 0,
|
|
113
|
+
actual: 0
|
|
114
|
+
},
|
|
115
|
+
activity: l?.activity || [],
|
|
116
|
+
assignees: l?.assignees || [],
|
|
117
|
+
tags: l?.tags || [],
|
|
118
|
+
...l
|
|
119
|
+
},
|
|
120
|
+
onSubmit: async ({ value: e }) => {
|
|
121
|
+
s(e), i();
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
A(() => {}, [e, l]);
|
|
125
|
+
let O = () => {
|
|
126
|
+
l?.id && c && c(l.id);
|
|
127
|
+
}, [k, j] = N({}), M = () => {
|
|
128
|
+
let e = {
|
|
129
|
+
id: w(),
|
|
130
|
+
title: "Checklist",
|
|
131
|
+
items: []
|
|
132
|
+
};
|
|
133
|
+
E.pushFieldValue("checklists", e);
|
|
134
|
+
}, P = (e, t) => {
|
|
135
|
+
j((n) => ({
|
|
136
|
+
...n,
|
|
137
|
+
[e]: t
|
|
138
|
+
}));
|
|
139
|
+
}, I = (e) => {
|
|
140
|
+
let t = k[e]?.trim();
|
|
141
|
+
if (!t) return;
|
|
142
|
+
let n = (E.getFieldValue("checklists") || []).map((n) => n.id === e ? {
|
|
143
|
+
...n,
|
|
144
|
+
items: [...n.items, {
|
|
145
|
+
id: w(),
|
|
146
|
+
text: t,
|
|
147
|
+
isChecked: !1
|
|
148
|
+
}]
|
|
149
|
+
} : n);
|
|
150
|
+
E.setFieldValue("checklists", n), j((t) => ({
|
|
151
|
+
...t,
|
|
152
|
+
[e]: ""
|
|
153
|
+
}));
|
|
154
|
+
}, ee = (e, t) => {
|
|
155
|
+
let n = (E.getFieldValue("checklists") || []).map((n) => n.id === e ? {
|
|
156
|
+
...n,
|
|
157
|
+
items: n.items.map((e) => e.id === t ? {
|
|
158
|
+
...e,
|
|
159
|
+
isChecked: !e.isChecked
|
|
160
|
+
} : e)
|
|
161
|
+
} : n);
|
|
162
|
+
E.setFieldValue("checklists", n);
|
|
163
|
+
}, [R, z] = N(""), [B, V] = N(null), [H, U] = N(""), [W, G] = N(null), ne = () => {
|
|
164
|
+
if (!R.trim()) return;
|
|
165
|
+
let e = {
|
|
166
|
+
id: w(),
|
|
167
|
+
text: R,
|
|
168
|
+
authorId: b.id,
|
|
169
|
+
authorName: b.name,
|
|
170
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
171
|
+
};
|
|
172
|
+
E.pushFieldValue("comments", e), z("");
|
|
173
|
+
let t = {
|
|
174
|
+
id: w(),
|
|
175
|
+
type: "comment",
|
|
176
|
+
text: `commented "${R.slice(0, 20)}${R.length > 20 ? "..." : ""}"`,
|
|
177
|
+
userId: b.id,
|
|
178
|
+
userName: b.name,
|
|
179
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
180
|
+
};
|
|
181
|
+
E.pushFieldValue("activity", t);
|
|
182
|
+
}, ie = (e) => {
|
|
183
|
+
V(e.id), U(e.text);
|
|
184
|
+
}, K = () => {
|
|
185
|
+
if (B && H.trim()) {
|
|
186
|
+
let e = (E.getFieldValue("comments") || []).map((e) => e.id === B ? {
|
|
187
|
+
...e,
|
|
188
|
+
text: H
|
|
189
|
+
} : e);
|
|
190
|
+
E.setFieldValue("comments", e), V(null), U("");
|
|
191
|
+
}
|
|
192
|
+
}, oe = () => {
|
|
193
|
+
V(null), U("");
|
|
194
|
+
}, se = (e) => {
|
|
195
|
+
G(e);
|
|
196
|
+
}, le = () => {
|
|
197
|
+
G(null);
|
|
198
|
+
}, de = (e) => {
|
|
199
|
+
let t = E.getFieldValue("comments") || [];
|
|
200
|
+
E.setFieldValue("comments", t.filter((t) => t.id !== e)), G(null);
|
|
201
|
+
let n = {
|
|
202
|
+
id: w(),
|
|
203
|
+
type: "delete",
|
|
204
|
+
text: "deleted a comment",
|
|
205
|
+
userId: b.id,
|
|
206
|
+
userName: b.name,
|
|
207
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
208
|
+
};
|
|
209
|
+
E.pushFieldValue("activity", n);
|
|
210
|
+
}, [q, fe] = N(""), pe = () => {
|
|
211
|
+
if (!q.trim()) return;
|
|
212
|
+
let e = {
|
|
213
|
+
id: w(),
|
|
214
|
+
title: q,
|
|
215
|
+
isCompleted: !1
|
|
216
|
+
};
|
|
217
|
+
E.pushFieldValue("subtasks", e), fe("");
|
|
218
|
+
}, he = (e) => {
|
|
219
|
+
let t = (E.getFieldValue("subtasks") || []).map((t) => t.id === e ? {
|
|
220
|
+
...t,
|
|
221
|
+
isCompleted: !t.isCompleted
|
|
222
|
+
} : t);
|
|
223
|
+
E.setFieldValue("subtasks", t);
|
|
224
|
+
}, ge = (e) => {
|
|
225
|
+
let t = E.getFieldValue("subtasks") || [];
|
|
226
|
+
E.setFieldValue("subtasks", t.filter((t) => t.id !== e));
|
|
227
|
+
}, J = D.useRef(null), [Z, ye] = N(!1), [be, xe] = N(null), Se = async (e) => {
|
|
228
|
+
let t = e.target.files?.[0];
|
|
229
|
+
if (!t) return;
|
|
230
|
+
ye(!0), xe(null), await new Promise((e) => setTimeout(e, 1500));
|
|
231
|
+
let n = {
|
|
232
|
+
id: w(),
|
|
233
|
+
name: t.name,
|
|
234
|
+
url: URL.createObjectURL(t),
|
|
235
|
+
type: t.type.startsWith("image/") ? "image" : "file",
|
|
236
|
+
size: t.size,
|
|
237
|
+
uploadedAt: /* @__PURE__ */ new Date()
|
|
238
|
+
};
|
|
239
|
+
E.pushFieldValue("attachments", n), ye(!1), J.current && (J.current.value = "");
|
|
240
|
+
let r = {
|
|
241
|
+
id: w(),
|
|
242
|
+
type: "attachment",
|
|
243
|
+
text: `attached ${t.name}`,
|
|
244
|
+
userId: b.id,
|
|
245
|
+
userName: b.name,
|
|
246
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
247
|
+
};
|
|
248
|
+
E.pushFieldValue("activity", r);
|
|
249
|
+
}, Ce = (e) => {
|
|
250
|
+
let t = E.getFieldValue("attachments") || [];
|
|
251
|
+
E.setFieldValue("attachments", t.filter((t) => t.id !== e));
|
|
252
|
+
let n = {
|
|
253
|
+
id: w(),
|
|
254
|
+
type: "delete",
|
|
255
|
+
text: "removed an attachment",
|
|
256
|
+
userId: b.id,
|
|
257
|
+
userName: b.name,
|
|
258
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
259
|
+
};
|
|
260
|
+
E.pushFieldValue("activity", n);
|
|
261
|
+
}, we = !!l?.id, Te = (e) => {
|
|
262
|
+
e.preventDefault(), e.stopPropagation(), E.handleSubmit();
|
|
263
|
+
}, Ee = /* @__PURE__ */ X("div", {
|
|
264
|
+
className: "space-y-6",
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ Y("div", {
|
|
267
|
+
className: "flex items-start justify-between gap-4",
|
|
268
|
+
children: /* @__PURE__ */ X("div", {
|
|
269
|
+
className: "flex-1 space-y-4",
|
|
270
|
+
children: [/* @__PURE__ */ Y(E.Field, {
|
|
271
|
+
name: "title",
|
|
272
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
273
|
+
className: "space-y-2",
|
|
274
|
+
children: [/* @__PURE__ */ Y(o, {
|
|
275
|
+
htmlFor: "title",
|
|
276
|
+
className: "text-right",
|
|
277
|
+
children: S("common.title")
|
|
278
|
+
}), /* @__PURE__ */ Y(n, {
|
|
279
|
+
id: "title",
|
|
280
|
+
value: e.state.value,
|
|
281
|
+
onChange: (t) => e.handleChange(t.target.value),
|
|
282
|
+
placeholder: S("kanban.cardTitlePlaceholder"),
|
|
283
|
+
className: "text-lg font-semibold"
|
|
284
|
+
})]
|
|
285
|
+
})
|
|
286
|
+
}), /* @__PURE__ */ X("div", {
|
|
287
|
+
className: "flex gap-4 items-center",
|
|
288
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
289
|
+
className: "w-[200px]",
|
|
290
|
+
children: /* @__PURE__ */ Y(E.Field, {
|
|
291
|
+
name: "columnId",
|
|
292
|
+
children: (e) => /* @__PURE__ */ X(g, {
|
|
293
|
+
value: e.state.value,
|
|
294
|
+
onValueChange: (t) => e.handleChange(t),
|
|
295
|
+
children: [/* @__PURE__ */ Y(p, { children: /* @__PURE__ */ Y(f, { placeholder: "Status" }) }), /* @__PURE__ */ Y(m, { children: u.map((e) => /* @__PURE__ */ Y(h, {
|
|
296
|
+
value: e.id,
|
|
297
|
+
children: e.name
|
|
298
|
+
}, e.id)) })]
|
|
299
|
+
})
|
|
300
|
+
})
|
|
301
|
+
}), we && /* @__PURE__ */ X("span", {
|
|
302
|
+
className: "text-sm text-muted-foreground font-mono",
|
|
303
|
+
children: ["#", l?.id?.slice(0, 8)]
|
|
304
|
+
})]
|
|
305
|
+
})]
|
|
306
|
+
})
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ X("div", {
|
|
309
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
310
|
+
children: [
|
|
311
|
+
/* @__PURE__ */ Y(E.Field, {
|
|
312
|
+
name: "priority",
|
|
313
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
314
|
+
className: "space-y-2",
|
|
315
|
+
children: [/* @__PURE__ */ Y(o, { children: "Priority" }), /* @__PURE__ */ X(g, {
|
|
316
|
+
value: e.state.value,
|
|
317
|
+
onValueChange: (t) => e.handleChange(t),
|
|
318
|
+
children: [/* @__PURE__ */ Y(p, { children: /* @__PURE__ */ Y(f, { placeholder: "Priority" }) }), /* @__PURE__ */ X(m, { children: [
|
|
319
|
+
/* @__PURE__ */ Y(h, {
|
|
320
|
+
value: "low",
|
|
321
|
+
children: "Low"
|
|
322
|
+
}),
|
|
323
|
+
/* @__PURE__ */ Y(h, {
|
|
324
|
+
value: "medium",
|
|
325
|
+
children: "Medium"
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ Y(h, {
|
|
328
|
+
value: "high",
|
|
329
|
+
children: "High"
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ Y(h, {
|
|
332
|
+
value: "critical",
|
|
333
|
+
children: "Critical"
|
|
334
|
+
})
|
|
335
|
+
] })]
|
|
336
|
+
})]
|
|
337
|
+
})
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ Y(E.Field, {
|
|
340
|
+
name: "startDate",
|
|
341
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
342
|
+
className: "space-y-2",
|
|
343
|
+
children: [/* @__PURE__ */ Y(o, { children: "Start Date" }), /* @__PURE__ */ Y(T, {
|
|
344
|
+
date: e.state.value,
|
|
345
|
+
setDate: (t) => e.handleChange(t),
|
|
346
|
+
mode: "date"
|
|
347
|
+
})]
|
|
348
|
+
})
|
|
349
|
+
}),
|
|
350
|
+
/* @__PURE__ */ Y(E.Field, {
|
|
351
|
+
name: "dueDate",
|
|
352
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
353
|
+
className: "space-y-2",
|
|
354
|
+
children: [/* @__PURE__ */ Y(o, { children: "Due Date" }), /* @__PURE__ */ Y(T, {
|
|
355
|
+
date: e.state.value,
|
|
356
|
+
setDate: (t) => e.handleChange(t),
|
|
357
|
+
mode: "date"
|
|
358
|
+
})]
|
|
359
|
+
})
|
|
360
|
+
})
|
|
361
|
+
]
|
|
362
|
+
}),
|
|
363
|
+
/* @__PURE__ */ Y(E.Field, {
|
|
364
|
+
name: "description",
|
|
365
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
366
|
+
className: "space-y-2",
|
|
367
|
+
children: [/* @__PURE__ */ Y(o, { children: "Description" }), /* @__PURE__ */ Y(C, {
|
|
368
|
+
value: e.state.value || "",
|
|
369
|
+
onChange: (t) => e.handleChange(t.target.value),
|
|
370
|
+
className: "min-h-[150px]"
|
|
371
|
+
})]
|
|
372
|
+
})
|
|
373
|
+
}),
|
|
374
|
+
v.length > 0 && /* @__PURE__ */ Y("div", {
|
|
375
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 border-t pt-4",
|
|
376
|
+
children: v.map((e) => /* @__PURE__ */ Y(E.Field, {
|
|
377
|
+
name: `customFieldValues.${e.id}`,
|
|
378
|
+
children: (t) => /* @__PURE__ */ X("div", {
|
|
379
|
+
className: "space-y-2",
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ Y(o, { children: e.name }),
|
|
382
|
+
e.type === "text" && /* @__PURE__ */ Y(n, {
|
|
383
|
+
value: t.state.value || "",
|
|
384
|
+
onChange: (e) => t.handleChange(e.target.value)
|
|
385
|
+
}),
|
|
386
|
+
e.type === "number" && /* @__PURE__ */ Y(n, {
|
|
387
|
+
type: "number",
|
|
388
|
+
value: t.state.value || "",
|
|
389
|
+
onChange: (e) => t.handleChange(Number(e.target.value))
|
|
390
|
+
}),
|
|
391
|
+
e.type === "date" && /* @__PURE__ */ Y(T, {
|
|
392
|
+
date: t.state.value,
|
|
393
|
+
setDate: (e) => t.handleChange(e),
|
|
394
|
+
mode: "date"
|
|
395
|
+
}),
|
|
396
|
+
e.type === "select" && /* @__PURE__ */ X(g, {
|
|
397
|
+
value: t.state.value || "",
|
|
398
|
+
onValueChange: (e) => t.handleChange(e),
|
|
399
|
+
children: [/* @__PURE__ */ Y(p, { children: /* @__PURE__ */ Y(f, { placeholder: "Select..." }) }), /* @__PURE__ */ Y(m, { children: e.options?.map((e) => /* @__PURE__ */ Y(h, {
|
|
400
|
+
value: e,
|
|
401
|
+
children: e
|
|
402
|
+
}, e)) })]
|
|
403
|
+
}),
|
|
404
|
+
e.type === "checkbox" && /* @__PURE__ */ X("div", {
|
|
405
|
+
className: "flex items-center space-x-2",
|
|
406
|
+
children: [/* @__PURE__ */ Y(_, {
|
|
407
|
+
checked: !!t.state.value,
|
|
408
|
+
onCheckedChange: (e) => t.handleChange(!!e)
|
|
409
|
+
}), /* @__PURE__ */ Y("span", {
|
|
410
|
+
className: "text-sm font-medium",
|
|
411
|
+
children: e.name
|
|
412
|
+
})]
|
|
413
|
+
})
|
|
414
|
+
]
|
|
415
|
+
})
|
|
416
|
+
}, e.id))
|
|
417
|
+
}),
|
|
418
|
+
/* @__PURE__ */ X(Le, {
|
|
419
|
+
defaultValue: "subtasks",
|
|
420
|
+
className: "w-full",
|
|
421
|
+
children: [
|
|
422
|
+
/* @__PURE__ */ X(Re, {
|
|
423
|
+
className: "grid w-full grid-cols-5",
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ Y(Q, {
|
|
426
|
+
value: "subtasks",
|
|
427
|
+
children: "Subtasks"
|
|
428
|
+
}),
|
|
429
|
+
/* @__PURE__ */ Y(Q, {
|
|
430
|
+
value: "checklists",
|
|
431
|
+
children: "Checklists"
|
|
432
|
+
}),
|
|
433
|
+
/* @__PURE__ */ Y(Q, {
|
|
434
|
+
value: "attachments",
|
|
435
|
+
children: "Attachments"
|
|
436
|
+
}),
|
|
437
|
+
/* @__PURE__ */ Y(Q, {
|
|
438
|
+
value: "comments",
|
|
439
|
+
children: "Comments"
|
|
440
|
+
}),
|
|
441
|
+
/* @__PURE__ */ Y(Q, {
|
|
442
|
+
value: "activity",
|
|
443
|
+
children: "Activity"
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
}),
|
|
447
|
+
/* @__PURE__ */ X($, {
|
|
448
|
+
value: "subtasks",
|
|
449
|
+
className: "space-y-4 pt-4",
|
|
450
|
+
children: [/* @__PURE__ */ Y(E.Field, {
|
|
451
|
+
name: "subtasks",
|
|
452
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
453
|
+
className: "space-y-2",
|
|
454
|
+
children: [e.state.value?.map((e) => /* @__PURE__ */ X("div", {
|
|
455
|
+
className: "flex items-center gap-2 border p-3 rounded-md",
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ Y(_, {
|
|
458
|
+
checked: e.isCompleted,
|
|
459
|
+
onCheckedChange: () => he(e.id)
|
|
460
|
+
}),
|
|
461
|
+
/* @__PURE__ */ Y("span", {
|
|
462
|
+
className: e.isCompleted ? "line-through text-muted-foreground flex-1" : "flex-1",
|
|
463
|
+
children: e.title
|
|
464
|
+
}),
|
|
465
|
+
/* @__PURE__ */ Y(t, {
|
|
466
|
+
variant: "ghost",
|
|
467
|
+
size: "icon",
|
|
468
|
+
onClick: () => ge(e.id),
|
|
469
|
+
children: /* @__PURE__ */ Y(_e, { className: "w-4 h-4" })
|
|
470
|
+
})
|
|
471
|
+
]
|
|
472
|
+
}, e.id)), (!e.state.value || e.state.value.length === 0) && /* @__PURE__ */ Y("div", {
|
|
473
|
+
className: "text-center py-8 text-muted-foreground border border-dashed rounded-lg",
|
|
474
|
+
children: "No subtasks yet."
|
|
475
|
+
})]
|
|
476
|
+
})
|
|
477
|
+
}), /* @__PURE__ */ X("div", {
|
|
478
|
+
className: "flex gap-2",
|
|
479
|
+
children: [/* @__PURE__ */ Y(n, {
|
|
480
|
+
value: q,
|
|
481
|
+
onChange: (e) => fe(e.target.value),
|
|
482
|
+
placeholder: "Add a subtask...",
|
|
483
|
+
onKeyDown: (e) => e.key === "Enter" && pe()
|
|
484
|
+
}), /* @__PURE__ */ Y(t, {
|
|
485
|
+
onClick: pe,
|
|
486
|
+
disabled: !q.trim(),
|
|
487
|
+
children: "Add"
|
|
488
|
+
})]
|
|
489
|
+
})]
|
|
490
|
+
}),
|
|
491
|
+
/* @__PURE__ */ X($, {
|
|
492
|
+
value: "checklists",
|
|
493
|
+
className: "space-y-4 pt-4",
|
|
494
|
+
children: [/* @__PURE__ */ X("div", {
|
|
495
|
+
className: "flex justify-between items-center",
|
|
496
|
+
children: [/* @__PURE__ */ Y("h3", {
|
|
497
|
+
className: "font-medium",
|
|
498
|
+
children: "Checklists"
|
|
499
|
+
}), /* @__PURE__ */ X(t, {
|
|
500
|
+
size: "sm",
|
|
501
|
+
onClick: M,
|
|
502
|
+
variant: "outline",
|
|
503
|
+
children: [/* @__PURE__ */ Y(ue, { className: "w-4 h-4 mr-2" }), " Add Checklist"]
|
|
504
|
+
})]
|
|
505
|
+
}), /* @__PURE__ */ Y(E.Field, {
|
|
506
|
+
name: "checklists",
|
|
507
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
508
|
+
className: "space-y-4",
|
|
509
|
+
children: [e.state.value?.map((e) => {
|
|
510
|
+
let r = e.items.length > 0 ? Math.round(e.items.filter((e) => e.isChecked).length / e.items.length * 100) : 0;
|
|
511
|
+
return /* @__PURE__ */ X("div", {
|
|
512
|
+
className: "border rounded-md p-4 space-y-3",
|
|
513
|
+
children: [
|
|
514
|
+
/* @__PURE__ */ X("div", {
|
|
515
|
+
className: "flex justify-between items-center",
|
|
516
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
517
|
+
className: "font-medium",
|
|
518
|
+
children: e.title
|
|
519
|
+
}), /* @__PURE__ */ X("div", {
|
|
520
|
+
className: "text-xs text-muted-foreground",
|
|
521
|
+
children: [r, "%"]
|
|
522
|
+
})]
|
|
523
|
+
}),
|
|
524
|
+
/* @__PURE__ */ Y("div", {
|
|
525
|
+
className: "h-2 w-full bg-muted rounded-full overflow-hidden",
|
|
526
|
+
children: /* @__PURE__ */ Y("div", {
|
|
527
|
+
className: "h-full bg-primary transition-all",
|
|
528
|
+
style: { width: `${r}%` }
|
|
529
|
+
})
|
|
530
|
+
}),
|
|
531
|
+
/* @__PURE__ */ Y("div", {
|
|
532
|
+
className: "space-y-2",
|
|
533
|
+
children: e.items.map((t) => /* @__PURE__ */ X("div", {
|
|
534
|
+
className: "flex items-center gap-2",
|
|
535
|
+
children: [/* @__PURE__ */ Y(_, {
|
|
536
|
+
checked: t.isChecked,
|
|
537
|
+
onCheckedChange: () => ee(e.id, t.id)
|
|
538
|
+
}), /* @__PURE__ */ Y("span", {
|
|
539
|
+
className: t.isChecked ? "line-through text-muted-foreground" : "",
|
|
540
|
+
children: t.text
|
|
541
|
+
})]
|
|
542
|
+
}, t.id))
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ X("div", {
|
|
545
|
+
className: "pt-2 flex gap-2",
|
|
546
|
+
children: [/* @__PURE__ */ Y(n, {
|
|
547
|
+
placeholder: "Add an item...",
|
|
548
|
+
className: "h-8 text-sm",
|
|
549
|
+
value: k[e.id] || "",
|
|
550
|
+
onChange: (t) => P(e.id, t.target.value),
|
|
551
|
+
onKeyDown: (t) => t.key === "Enter" && I(e.id)
|
|
552
|
+
}), /* @__PURE__ */ Y(t, {
|
|
553
|
+
size: "sm",
|
|
554
|
+
onClick: () => I(e.id),
|
|
555
|
+
disabled: !k[e.id]?.trim(),
|
|
556
|
+
children: "Add"
|
|
557
|
+
})]
|
|
558
|
+
})
|
|
559
|
+
]
|
|
560
|
+
}, e.id);
|
|
561
|
+
}), (!e.state.value || e.state.value.length === 0) && /* @__PURE__ */ Y("div", {
|
|
562
|
+
className: "text-center py-8 text-muted-foreground border border-dashed rounded-lg",
|
|
563
|
+
children: "No checklists yet."
|
|
564
|
+
})]
|
|
565
|
+
})
|
|
566
|
+
})]
|
|
567
|
+
}),
|
|
568
|
+
/* @__PURE__ */ X($, {
|
|
569
|
+
value: "attachments",
|
|
570
|
+
className: "space-y-4 pt-4",
|
|
571
|
+
children: [/* @__PURE__ */ X("div", {
|
|
572
|
+
className: "flex justify-between items-center",
|
|
573
|
+
children: [
|
|
574
|
+
/* @__PURE__ */ Y("h3", {
|
|
575
|
+
className: "font-medium",
|
|
576
|
+
children: "Attachments"
|
|
577
|
+
}),
|
|
578
|
+
/* @__PURE__ */ Y("input", {
|
|
579
|
+
type: "file",
|
|
580
|
+
className: "hidden",
|
|
581
|
+
ref: J,
|
|
582
|
+
onChange: Se
|
|
583
|
+
}),
|
|
584
|
+
/* @__PURE__ */ X("div", {
|
|
585
|
+
className: "flex items-center gap-2",
|
|
586
|
+
children: [be && /* @__PURE__ */ Y("span", {
|
|
587
|
+
className: "text-xs text-red-500",
|
|
588
|
+
children: be
|
|
589
|
+
}), /* @__PURE__ */ X(t, {
|
|
590
|
+
size: "sm",
|
|
591
|
+
variant: "outline",
|
|
592
|
+
onClick: () => J.current?.click(),
|
|
593
|
+
disabled: Z,
|
|
594
|
+
children: [Z ? /* @__PURE__ */ Y(ae, { className: "w-4 h-4 mr-2 animate-spin" }) : /* @__PURE__ */ Y(ce, { className: "w-4 h-4 mr-2" }), Z ? "Uploading..." : "Upload"]
|
|
595
|
+
})]
|
|
596
|
+
})
|
|
597
|
+
]
|
|
598
|
+
}), /* @__PURE__ */ Y(E.Field, {
|
|
599
|
+
name: "attachments",
|
|
600
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
601
|
+
className: "grid grid-cols-2 gap-2",
|
|
602
|
+
children: [e.state.value?.map((e) => /* @__PURE__ */ X("div", {
|
|
603
|
+
className: "border p-2 rounded flex items-center gap-2",
|
|
604
|
+
children: [
|
|
605
|
+
/* @__PURE__ */ Y("div", {
|
|
606
|
+
className: "w-10 h-10 bg-muted flex items-center justify-center rounded",
|
|
607
|
+
children: /* @__PURE__ */ Y(re, { className: "w-5 h-5 text-muted-foreground" })
|
|
608
|
+
}),
|
|
609
|
+
/* @__PURE__ */ X("div", {
|
|
610
|
+
className: "overflow-hidden",
|
|
611
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
612
|
+
className: "truncate font-medium text-sm",
|
|
613
|
+
children: e.name
|
|
614
|
+
}), /* @__PURE__ */ Y("div", {
|
|
615
|
+
className: "text-xs text-muted-foreground",
|
|
616
|
+
children: e.type
|
|
617
|
+
})]
|
|
618
|
+
}),
|
|
619
|
+
/* @__PURE__ */ Y(t, {
|
|
620
|
+
variant: "ghost",
|
|
621
|
+
size: "icon",
|
|
622
|
+
className: "ml-auto",
|
|
623
|
+
onClick: () => Ce(e.id),
|
|
624
|
+
children: /* @__PURE__ */ Y(_e, { className: "w-4 h-4 text-muted-foreground" })
|
|
625
|
+
})
|
|
626
|
+
]
|
|
627
|
+
}, e.id)), (!e.state.value || e.state.value.length === 0) && !Z && /* @__PURE__ */ Y("div", {
|
|
628
|
+
className: "text-center py-8 text-muted-foreground border border-dashed rounded-lg",
|
|
629
|
+
children: "No attachments yet."
|
|
630
|
+
})]
|
|
631
|
+
})
|
|
632
|
+
})]
|
|
633
|
+
}),
|
|
634
|
+
/* @__PURE__ */ X($, {
|
|
635
|
+
value: "comments",
|
|
636
|
+
className: "space-y-4 pt-4",
|
|
637
|
+
children: [/* @__PURE__ */ Y(E.Field, {
|
|
638
|
+
name: "comments",
|
|
639
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
640
|
+
className: "space-y-4",
|
|
641
|
+
children: [e.state.value?.map((e) => /* @__PURE__ */ X("div", {
|
|
642
|
+
className: "flex gap-3",
|
|
643
|
+
children: [
|
|
644
|
+
/* @__PURE__ */ Y(a, {
|
|
645
|
+
className: "w-8 h-8",
|
|
646
|
+
children: /* @__PURE__ */ Y(r, { children: e.authorName[0] })
|
|
647
|
+
}),
|
|
648
|
+
/* @__PURE__ */ X("div", {
|
|
649
|
+
className: "space-y-1 w-full",
|
|
650
|
+
children: [
|
|
651
|
+
/* @__PURE__ */ X("div", {
|
|
652
|
+
className: "flex items-center gap-2",
|
|
653
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
654
|
+
className: "font-semibold text-sm",
|
|
655
|
+
children: e.authorName
|
|
656
|
+
}), /* @__PURE__ */ Y("span", {
|
|
657
|
+
className: "text-xs text-muted-foreground",
|
|
658
|
+
children: new Date(e.createdAt).toLocaleString()
|
|
659
|
+
})]
|
|
660
|
+
}),
|
|
661
|
+
B === e.id ? /* @__PURE__ */ X("div", {
|
|
662
|
+
className: "flex flex-col gap-2",
|
|
663
|
+
children: [/* @__PURE__ */ Y(C, {
|
|
664
|
+
value: H,
|
|
665
|
+
onChange: (e) => U(e.target.value),
|
|
666
|
+
onKeyDown: (e) => {
|
|
667
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) ? K() : e.key === "Escape" && oe();
|
|
668
|
+
},
|
|
669
|
+
autoFocus: !0
|
|
670
|
+
}), /* @__PURE__ */ X("div", {
|
|
671
|
+
className: "flex gap-2 justify-end",
|
|
672
|
+
children: [/* @__PURE__ */ Y(t, {
|
|
673
|
+
size: "sm",
|
|
674
|
+
variant: "ghost",
|
|
675
|
+
onClick: oe,
|
|
676
|
+
children: "Cancel"
|
|
677
|
+
}), /* @__PURE__ */ Y(t, {
|
|
678
|
+
size: "sm",
|
|
679
|
+
onClick: K,
|
|
680
|
+
children: "Save"
|
|
681
|
+
})]
|
|
682
|
+
})]
|
|
683
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
684
|
+
className: "text-sm bg-muted/50 p-2 rounded-md",
|
|
685
|
+
children: e.text
|
|
686
|
+
}),
|
|
687
|
+
W === e.id && /* @__PURE__ */ X("div", {
|
|
688
|
+
className: "flex items-center gap-2 p-2 bg-red-50 text-red-800 rounded-md text-sm mt-2",
|
|
689
|
+
children: [
|
|
690
|
+
/* @__PURE__ */ Y(L, { className: "w-4 h-4" }),
|
|
691
|
+
/* @__PURE__ */ Y("span", {
|
|
692
|
+
className: "flex-1",
|
|
693
|
+
children: "Delete this comment?"
|
|
694
|
+
}),
|
|
695
|
+
/* @__PURE__ */ Y(t, {
|
|
696
|
+
size: "sm",
|
|
697
|
+
variant: "ghost",
|
|
698
|
+
className: "h-6 px-2 hover:bg-red-100 text-red-800",
|
|
699
|
+
onClick: le,
|
|
700
|
+
children: "No"
|
|
701
|
+
}),
|
|
702
|
+
/* @__PURE__ */ Y(t, {
|
|
703
|
+
size: "sm",
|
|
704
|
+
variant: "destructive",
|
|
705
|
+
className: "h-6 px-2",
|
|
706
|
+
onClick: () => de(e.id),
|
|
707
|
+
children: "Yes"
|
|
708
|
+
})
|
|
709
|
+
]
|
|
710
|
+
})
|
|
711
|
+
]
|
|
712
|
+
}),
|
|
713
|
+
/* @__PURE__ */ X("div", {
|
|
714
|
+
className: "flex flex-col gap-1",
|
|
715
|
+
children: [/* @__PURE__ */ Y(t, {
|
|
716
|
+
variant: "ghost",
|
|
717
|
+
size: "icon",
|
|
718
|
+
className: "h-6 w-6",
|
|
719
|
+
onClick: () => ie(e),
|
|
720
|
+
disabled: !!W,
|
|
721
|
+
children: /* @__PURE__ */ Y(te, { className: "w-3 h-3 text-muted-foreground" })
|
|
722
|
+
}), /* @__PURE__ */ Y(t, {
|
|
723
|
+
variant: "ghost",
|
|
724
|
+
size: "icon",
|
|
725
|
+
className: "h-6 w-6",
|
|
726
|
+
onClick: () => se(e.id),
|
|
727
|
+
disabled: !!W,
|
|
728
|
+
children: /* @__PURE__ */ Y(me, { className: "w-3 h-3 text-muted-foreground" })
|
|
729
|
+
})]
|
|
730
|
+
})
|
|
731
|
+
]
|
|
732
|
+
}, e.id)), (!e.state.value || e.state.value.length === 0) && /* @__PURE__ */ Y("div", {
|
|
733
|
+
className: "text-center py-8 text-muted-foreground",
|
|
734
|
+
children: "No comments yet."
|
|
735
|
+
})]
|
|
736
|
+
})
|
|
737
|
+
}), /* @__PURE__ */ Y("div", {
|
|
738
|
+
className: "pt-4 border-t sticky bottom-0 bg-background",
|
|
739
|
+
children: /* @__PURE__ */ X("div", {
|
|
740
|
+
className: "flex gap-2",
|
|
741
|
+
children: [/* @__PURE__ */ Y(a, {
|
|
742
|
+
className: "w-8 h-8",
|
|
743
|
+
children: /* @__PURE__ */ Y(r, { children: b?.name?.[0] || "U" })
|
|
744
|
+
}), /* @__PURE__ */ X("div", {
|
|
745
|
+
className: "flex-1 space-y-2",
|
|
746
|
+
children: [/* @__PURE__ */ Y(C, {
|
|
747
|
+
value: R,
|
|
748
|
+
onChange: (e) => z(e.target.value),
|
|
749
|
+
placeholder: "Write a comment...",
|
|
750
|
+
rows: 2
|
|
751
|
+
}), /* @__PURE__ */ Y("div", {
|
|
752
|
+
className: "flex justify-end",
|
|
753
|
+
children: /* @__PURE__ */ Y(t, {
|
|
754
|
+
size: "sm",
|
|
755
|
+
onClick: ne,
|
|
756
|
+
disabled: !R.trim(),
|
|
757
|
+
children: "Send"
|
|
758
|
+
})
|
|
759
|
+
})]
|
|
760
|
+
})]
|
|
761
|
+
})
|
|
762
|
+
})]
|
|
763
|
+
}),
|
|
764
|
+
/* @__PURE__ */ Y($, {
|
|
765
|
+
value: "activity",
|
|
766
|
+
className: "space-y-4 pt-4",
|
|
767
|
+
children: /* @__PURE__ */ Y(E.Field, {
|
|
768
|
+
name: "activity",
|
|
769
|
+
children: (e) => /* @__PURE__ */ X("div", {
|
|
770
|
+
className: "space-y-4",
|
|
771
|
+
children: [e.state.value?.map((e) => /* @__PURE__ */ X("div", {
|
|
772
|
+
className: "flex gap-3 text-sm",
|
|
773
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
774
|
+
className: "mt-1",
|
|
775
|
+
children: /* @__PURE__ */ Y(F, { className: "w-4 h-4 text-muted-foreground" })
|
|
776
|
+
}), /* @__PURE__ */ X("div", { children: [
|
|
777
|
+
/* @__PURE__ */ Y("span", {
|
|
778
|
+
className: "font-semibold",
|
|
779
|
+
children: e.userName
|
|
780
|
+
}),
|
|
781
|
+
" ",
|
|
782
|
+
/* @__PURE__ */ Y("span", {
|
|
783
|
+
className: "text-muted-foreground",
|
|
784
|
+
children: e.text
|
|
785
|
+
}),
|
|
786
|
+
/* @__PURE__ */ Y("div", {
|
|
787
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
788
|
+
children: new Date(e.createdAt).toLocaleString()
|
|
789
|
+
})
|
|
790
|
+
] })]
|
|
791
|
+
}, e.id)), (!e.state.value || e.state.value.length === 0) && /* @__PURE__ */ Y("div", {
|
|
792
|
+
className: "text-center py-8 text-muted-foreground",
|
|
793
|
+
children: "No activity yet."
|
|
794
|
+
})]
|
|
795
|
+
})
|
|
796
|
+
})
|
|
797
|
+
})
|
|
798
|
+
]
|
|
799
|
+
})
|
|
800
|
+
]
|
|
801
|
+
});
|
|
802
|
+
return /* @__PURE__ */ X(y, {
|
|
803
|
+
isOpen: e,
|
|
804
|
+
onClose: i,
|
|
805
|
+
title: we ? "Edit Card" : "New Card",
|
|
806
|
+
className: "sm:max-w-[800px] h-[85vh] flex flex-col",
|
|
807
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
808
|
+
className: "flex-1 overflow-y-auto pr-2",
|
|
809
|
+
children: Ee
|
|
810
|
+
}), /* @__PURE__ */ X("div", {
|
|
811
|
+
className: "flex justify-between pt-4 border-t mt-4",
|
|
812
|
+
children: [we && /* @__PURE__ */ Y(t, {
|
|
813
|
+
variant: "destructive",
|
|
814
|
+
onClick: O,
|
|
815
|
+
children: "Delete Card"
|
|
816
|
+
}), /* @__PURE__ */ X("div", {
|
|
817
|
+
className: "flex gap-2 ml-auto",
|
|
818
|
+
children: [/* @__PURE__ */ Y(t, {
|
|
819
|
+
variant: "outline",
|
|
820
|
+
onClick: i,
|
|
821
|
+
children: "Cancel"
|
|
822
|
+
}), /* @__PURE__ */ Y(t, {
|
|
823
|
+
onClick: (e) => Te(e),
|
|
824
|
+
children: "Save"
|
|
825
|
+
})]
|
|
826
|
+
})]
|
|
827
|
+
})]
|
|
828
|
+
});
|
|
829
|
+
}, Be = {
|
|
830
|
+
Active: {
|
|
831
|
+
color: "emerald",
|
|
832
|
+
label: "Active",
|
|
833
|
+
icon: z
|
|
834
|
+
},
|
|
835
|
+
Verified: {
|
|
836
|
+
color: "emerald",
|
|
837
|
+
label: "Verified",
|
|
838
|
+
icon: z
|
|
839
|
+
},
|
|
840
|
+
Approved: {
|
|
841
|
+
color: "emerald",
|
|
842
|
+
label: "Approved",
|
|
843
|
+
icon: z
|
|
844
|
+
},
|
|
845
|
+
Published: {
|
|
846
|
+
color: "teal",
|
|
847
|
+
label: "Published",
|
|
848
|
+
icon: z
|
|
849
|
+
},
|
|
850
|
+
Resolved: {
|
|
851
|
+
color: "teal",
|
|
852
|
+
label: "Resolved",
|
|
853
|
+
icon: z
|
|
854
|
+
},
|
|
855
|
+
Completed: {
|
|
856
|
+
color: "indigo",
|
|
857
|
+
label: "Completed",
|
|
858
|
+
icon: z
|
|
859
|
+
},
|
|
860
|
+
"In Progress": {
|
|
861
|
+
color: "sky",
|
|
862
|
+
label: "In Progress",
|
|
863
|
+
icon: le
|
|
864
|
+
},
|
|
865
|
+
Open: {
|
|
866
|
+
color: "sky",
|
|
867
|
+
label: "Open",
|
|
868
|
+
icon: he
|
|
869
|
+
},
|
|
870
|
+
Pending: {
|
|
871
|
+
color: "amber",
|
|
872
|
+
label: "Pending",
|
|
873
|
+
icon: U
|
|
874
|
+
},
|
|
875
|
+
"Under Review": {
|
|
876
|
+
color: "amber",
|
|
877
|
+
label: "Under Review",
|
|
878
|
+
icon: W
|
|
879
|
+
},
|
|
880
|
+
Scheduled: {
|
|
881
|
+
color: "orange",
|
|
882
|
+
label: "Scheduled",
|
|
883
|
+
icon: U
|
|
884
|
+
},
|
|
885
|
+
Returned: {
|
|
886
|
+
color: "orange",
|
|
887
|
+
label: "Returned",
|
|
888
|
+
icon: de
|
|
889
|
+
},
|
|
890
|
+
Rejected: {
|
|
891
|
+
color: "red",
|
|
892
|
+
label: "Rejected",
|
|
893
|
+
icon: J
|
|
894
|
+
},
|
|
895
|
+
Disapproved: {
|
|
896
|
+
color: "red",
|
|
897
|
+
label: "Disapproved",
|
|
898
|
+
icon: J
|
|
899
|
+
},
|
|
900
|
+
Unresolved: {
|
|
901
|
+
color: "red",
|
|
902
|
+
label: "Unresolved",
|
|
903
|
+
icon: I
|
|
904
|
+
},
|
|
905
|
+
Expired: {
|
|
906
|
+
color: "red",
|
|
907
|
+
label: "Expired",
|
|
908
|
+
icon: pe
|
|
909
|
+
},
|
|
910
|
+
Cancelled: {
|
|
911
|
+
color: "rose",
|
|
912
|
+
label: "Cancelled",
|
|
913
|
+
icon: J
|
|
914
|
+
},
|
|
915
|
+
Unverified: {
|
|
916
|
+
color: "rose",
|
|
917
|
+
label: "Unverified",
|
|
918
|
+
icon: ne
|
|
919
|
+
},
|
|
920
|
+
Inactive: {
|
|
921
|
+
color: "slate",
|
|
922
|
+
label: "Inactive",
|
|
923
|
+
icon: J
|
|
924
|
+
},
|
|
925
|
+
"On Leave": {
|
|
926
|
+
color: "blue",
|
|
927
|
+
label: "On Leave",
|
|
928
|
+
icon: U
|
|
929
|
+
},
|
|
930
|
+
Archived: {
|
|
931
|
+
color: "gray",
|
|
932
|
+
label: "Archived",
|
|
933
|
+
icon: ee
|
|
934
|
+
},
|
|
935
|
+
Draft: {
|
|
936
|
+
color: "gray",
|
|
937
|
+
label: "Draft",
|
|
938
|
+
icon: W
|
|
939
|
+
},
|
|
940
|
+
Closed: {
|
|
941
|
+
color: "gray",
|
|
942
|
+
label: "Closed",
|
|
943
|
+
icon: K
|
|
944
|
+
},
|
|
945
|
+
Public: {
|
|
946
|
+
color: "blue",
|
|
947
|
+
label: "Public",
|
|
948
|
+
icon: G
|
|
949
|
+
},
|
|
950
|
+
Private: {
|
|
951
|
+
color: "slate",
|
|
952
|
+
label: "Private",
|
|
953
|
+
icon: K
|
|
954
|
+
},
|
|
955
|
+
Restricted: {
|
|
956
|
+
color: "amber",
|
|
957
|
+
label: "Restricted",
|
|
958
|
+
icon: fe
|
|
959
|
+
},
|
|
960
|
+
Internal: {
|
|
961
|
+
color: "indigo",
|
|
962
|
+
label: "Internal",
|
|
963
|
+
icon: ge
|
|
964
|
+
},
|
|
965
|
+
External: {
|
|
966
|
+
color: "blue",
|
|
967
|
+
label: "External",
|
|
968
|
+
icon: G
|
|
969
|
+
},
|
|
970
|
+
System: {
|
|
971
|
+
color: "violet",
|
|
972
|
+
label: "System",
|
|
973
|
+
icon: q
|
|
974
|
+
},
|
|
975
|
+
Default: {
|
|
976
|
+
color: "gray",
|
|
977
|
+
label: "Default",
|
|
978
|
+
icon: ne
|
|
979
|
+
}
|
|
980
|
+
}, Ve = {
|
|
981
|
+
none: "none",
|
|
982
|
+
low: "0 0 10px -5px",
|
|
983
|
+
medium: "0 0 20px -8px",
|
|
984
|
+
high: "0 0 30px -4px"
|
|
985
|
+
}, He = O(({ status: t, className: n, showDot: r = !1, showIcon: i = !1, iconPosition: a = "left", hideLabel: o = !1, showTooltip: s = !0, variant: c = "solid", customWidth: l, customHeight: u, customFontSize: d = "11px", customBgColor: f, customTextColor: p, showBorder: m = !1, borderThickness: h = "1px", customBorderColor: g, glowIntensity: _ = "medium" }) => {
|
|
986
|
+
let v = Be[t] || Be.Default, y = v.color, b = v.icon, x = y === "gray" || y === "slate";
|
|
987
|
+
return /* @__PURE__ */ X("div", {
|
|
988
|
+
style: {
|
|
989
|
+
width: l || void 0,
|
|
990
|
+
height: u || void 0,
|
|
991
|
+
fontSize: d,
|
|
992
|
+
backgroundColor: f || void 0,
|
|
993
|
+
color: p || void 0,
|
|
994
|
+
borderWidth: m ? h : "0px",
|
|
995
|
+
borderColor: g || (m ? "currentColor" : "transparent"),
|
|
996
|
+
borderStyle: m ? "solid" : "none",
|
|
997
|
+
boxShadow: _ !== "none" && !f ? `${Ve[_]} var(--tw-shadow-color)` : void 0
|
|
998
|
+
},
|
|
999
|
+
title: s ? v.label : void 0,
|
|
1000
|
+
className: e("inline-flex items-center justify-center gap-2 transition-all duration-300 rounded-full font-bold", o ? "p-1.5 w-[28px] h-[28px]" : "px-3 py-1", !l && !o && "min-w-[120px]", !u && !o && "min-h-[28px]", !f && (c === "solid" ? `bg-${y}-100` : "bg-transparent"), !p && `text-${y}-950`, !f && `dark:bg-${y}-300`, !p && (x ? "dark:text-white dark:bg-gray-800" : "dark:text-black"), `shadow-${y}-500/40`, s && "cursor-help", n),
|
|
1001
|
+
children: [
|
|
1002
|
+
a === "left" && i && /* @__PURE__ */ Y(b, { className: e("shrink-0 stroke-[3px]", o ? "w-4 h-4" : "w-3.5 h-3.5") }),
|
|
1003
|
+
r && !i && !o && /* @__PURE__ */ Y("span", { className: e("w-1.5 h-1.5 rounded-full flex-shrink-0", `bg-${y}-700`, x ? "dark:bg-white" : "dark:bg-black/70") }),
|
|
1004
|
+
!o && /* @__PURE__ */ Y("span", {
|
|
1005
|
+
className: "uppercase tracking-widest font-black leading-none",
|
|
1006
|
+
children: v.label
|
|
1007
|
+
}),
|
|
1008
|
+
a === "right" && i && /* @__PURE__ */ Y(b, { className: e("shrink-0 stroke-[3px]", o ? "w-4 h-4" : "w-3.5 h-3.5") })
|
|
1009
|
+
]
|
|
1010
|
+
});
|
|
1011
|
+
});
|
|
1012
|
+
He.displayName = "StatusBadge";
|
|
1013
|
+
//#endregion
|
|
1014
|
+
//#region src/shared/utils/dateUtils.ts
|
|
1015
|
+
var Ue = {
|
|
1016
|
+
formatDate: (e, t = "PP") => {
|
|
1017
|
+
if (!e) return "";
|
|
1018
|
+
let n = new Date(e);
|
|
1019
|
+
return De(n) ? Ee(n, t) : "";
|
|
1020
|
+
},
|
|
1021
|
+
formatDateTime: (e, t = "PP p") => {
|
|
1022
|
+
if (!e) return "";
|
|
1023
|
+
let n = new Date(e);
|
|
1024
|
+
return De(n) ? Ee(n, t) : "";
|
|
1025
|
+
},
|
|
1026
|
+
isValidDate: (e) => De(new Date(e))
|
|
1027
|
+
}, We = ({ card: t, onClick: n, onDoubleClick: o, isDragging: s, isHighlighted: c, enableTooltip: l, tooltipTemplate: u, customFields: d, slots: f, slotProps: p, className: m, dir: h }) => {
|
|
1028
|
+
let g = h === "rtl", { attributes: _, listeners: y, setNodeRef: b, transform: x, transition: S, isDragging: C } = Me({
|
|
1029
|
+
id: t.id,
|
|
1030
|
+
data: {
|
|
1031
|
+
type: "card",
|
|
1032
|
+
card: t
|
|
1033
|
+
}
|
|
1034
|
+
}), T = s || C, E = {
|
|
1035
|
+
transform: ke.Translate.toString(x),
|
|
1036
|
+
transition: S
|
|
1037
|
+
}, D = {
|
|
1038
|
+
low: "Pending",
|
|
1039
|
+
medium: "In Progress",
|
|
1040
|
+
high: "Active",
|
|
1041
|
+
critical: "Inactive"
|
|
1042
|
+
}, O = t.checklists?.reduce((e, t) => e + t.items.length, 0) || 0, k = t.checklists?.reduce((e, t) => e + t.items.filter((e) => e.isChecked).length, 0) || 0, A = t.subtasks?.length || 0, j = t.subtasks?.filter((e) => e.isCompleted).length || 0, M = /* @__PURE__ */ X("div", {
|
|
1043
|
+
className: "p-0 space-y-2",
|
|
1044
|
+
children: [
|
|
1045
|
+
t.coverImage && /* @__PURE__ */ Y("div", {
|
|
1046
|
+
className: "h-32 w-full overflow-hidden rounded-t-lg",
|
|
1047
|
+
children: /* @__PURE__ */ Y("img", {
|
|
1048
|
+
src: t.coverImage,
|
|
1049
|
+
alt: "Cover",
|
|
1050
|
+
className: "w-full h-full object-cover"
|
|
1051
|
+
})
|
|
1052
|
+
}),
|
|
1053
|
+
/* @__PURE__ */ X("div", {
|
|
1054
|
+
className: e("p-3 space-y-2", t.coverImage ? "pt-1" : ""),
|
|
1055
|
+
children: [
|
|
1056
|
+
/* @__PURE__ */ X("div", {
|
|
1057
|
+
className: "flex items-start justify-between gap-2",
|
|
1058
|
+
children: [/* @__PURE__ */ Y("h4", {
|
|
1059
|
+
className: "font-medium text-sm line-clamp-2 flex-1",
|
|
1060
|
+
children: t.title
|
|
1061
|
+
}), t.priority && /* @__PURE__ */ Y(He, {
|
|
1062
|
+
status: D[t.priority] || "Pending",
|
|
1063
|
+
className: "shrink-0"
|
|
1064
|
+
})]
|
|
1065
|
+
}),
|
|
1066
|
+
t.description && /* @__PURE__ */ Y("p", {
|
|
1067
|
+
className: "text-xs text-muted-foreground line-clamp-2",
|
|
1068
|
+
children: t.description
|
|
1069
|
+
}),
|
|
1070
|
+
t.tags && t.tags.length > 0 && /* @__PURE__ */ Y("div", {
|
|
1071
|
+
className: "flex flex-wrap gap-1",
|
|
1072
|
+
children: t.tags.map((e) => /* @__PURE__ */ Y(Fe, {
|
|
1073
|
+
variant: "secondary",
|
|
1074
|
+
className: "text-xs px-2 py-0",
|
|
1075
|
+
style: {
|
|
1076
|
+
backgroundColor: e.color,
|
|
1077
|
+
color: "#fff"
|
|
1078
|
+
},
|
|
1079
|
+
children: e.name
|
|
1080
|
+
}, e.id))
|
|
1081
|
+
}),
|
|
1082
|
+
(O > 0 || t.attachments && t.attachments.length > 0 || t.comments && t.comments.length > 0 || A > 0 || t.timeTracking) && /* @__PURE__ */ X("div", {
|
|
1083
|
+
className: "flex items-center gap-3 text-muted-foreground pt-1 flex-wrap",
|
|
1084
|
+
children: [
|
|
1085
|
+
t.attachments && t.attachments.length > 0 && /* @__PURE__ */ X("div", {
|
|
1086
|
+
className: "flex items-center gap-1 text-xs",
|
|
1087
|
+
children: [/* @__PURE__ */ Y(ce, { className: "w-3 h-3" }), /* @__PURE__ */ Y("span", { children: t.attachments.length })]
|
|
1088
|
+
}),
|
|
1089
|
+
t.comments && t.comments.length > 0 && /* @__PURE__ */ X("div", {
|
|
1090
|
+
className: "flex items-center gap-1 text-xs",
|
|
1091
|
+
children: [/* @__PURE__ */ Y(oe, { className: "w-3 h-3" }), /* @__PURE__ */ Y("span", { children: t.comments.length })]
|
|
1092
|
+
}),
|
|
1093
|
+
O > 0 && /* @__PURE__ */ X("div", {
|
|
1094
|
+
className: "flex items-center gap-1 text-xs",
|
|
1095
|
+
children: [/* @__PURE__ */ Y(B, { className: "w-3 h-3" }), /* @__PURE__ */ X("span", { children: [
|
|
1096
|
+
k,
|
|
1097
|
+
"/",
|
|
1098
|
+
O
|
|
1099
|
+
] })]
|
|
1100
|
+
}),
|
|
1101
|
+
A > 0 && /* @__PURE__ */ X("div", {
|
|
1102
|
+
className: "flex items-center gap-1 text-xs",
|
|
1103
|
+
children: [/* @__PURE__ */ Y(ie, { className: "w-3 h-3" }), /* @__PURE__ */ X("span", { children: [
|
|
1104
|
+
j,
|
|
1105
|
+
"/",
|
|
1106
|
+
A
|
|
1107
|
+
] })]
|
|
1108
|
+
}),
|
|
1109
|
+
t.timeTracking && (t.timeTracking.estimated > 0 || t.timeTracking.actual > 0) && /* @__PURE__ */ X("div", {
|
|
1110
|
+
className: "flex items-center gap-1 text-xs",
|
|
1111
|
+
title: `Estimated: ${t.timeTracking.estimated}h, Actual: ${t.timeTracking.actual}h`,
|
|
1112
|
+
children: [/* @__PURE__ */ Y(U, { className: "w-3 h-3" }), /* @__PURE__ */ X("span", { children: [
|
|
1113
|
+
t.timeTracking.actual,
|
|
1114
|
+
"h / ",
|
|
1115
|
+
t.timeTracking.estimated,
|
|
1116
|
+
"h"
|
|
1117
|
+
] })]
|
|
1118
|
+
})
|
|
1119
|
+
]
|
|
1120
|
+
}),
|
|
1121
|
+
/* @__PURE__ */ X("div", {
|
|
1122
|
+
className: "flex items-center justify-between pt-1",
|
|
1123
|
+
children: [t.assignees && t.assignees.length > 0 && /* @__PURE__ */ X("div", {
|
|
1124
|
+
className: "flex -space-x-2",
|
|
1125
|
+
children: [t.assignees.slice(0, 3).map((e) => /* @__PURE__ */ Y(a, {
|
|
1126
|
+
className: "w-6 h-6 border-2 border-background",
|
|
1127
|
+
children: e.avatarUrl ? /* @__PURE__ */ Y(i, {
|
|
1128
|
+
src: e.avatarUrl,
|
|
1129
|
+
alt: e.name
|
|
1130
|
+
}) : /* @__PURE__ */ Y(r, {
|
|
1131
|
+
className: "text-xs",
|
|
1132
|
+
children: e.name.substring(0, 2).toUpperCase()
|
|
1133
|
+
})
|
|
1134
|
+
}, e.id)), t.assignees.length > 3 && /* @__PURE__ */ Y("div", {
|
|
1135
|
+
className: "w-6 h-6 rounded-full bg-muted border-2 border-background flex items-center justify-center",
|
|
1136
|
+
children: /* @__PURE__ */ X("span", {
|
|
1137
|
+
className: "text-xs",
|
|
1138
|
+
children: ["+", t.assignees.length - 3]
|
|
1139
|
+
})
|
|
1140
|
+
})]
|
|
1141
|
+
}), t.dueDate && /* @__PURE__ */ X("div", {
|
|
1142
|
+
className: e("flex items-center gap-1 text-xs text-muted-foreground", g ? "mr-auto" : "ml-auto"),
|
|
1143
|
+
children: [/* @__PURE__ */ Y(R, { className: "w-3 h-3" }), /* @__PURE__ */ Y("span", { children: Ue.formatDate(t.dueDate) })]
|
|
1144
|
+
})]
|
|
1145
|
+
})
|
|
1146
|
+
]
|
|
1147
|
+
}),
|
|
1148
|
+
d && d.length > 0 && t.customFieldValues && /* @__PURE__ */ Y("div", {
|
|
1149
|
+
className: "px-3 pb-3 gap-1 flex flex-wrap",
|
|
1150
|
+
children: d.map((e) => {
|
|
1151
|
+
let n = t.customFieldValues?.[e.id];
|
|
1152
|
+
return n == null || n === "" ? null : /* @__PURE__ */ X("div", {
|
|
1153
|
+
className: "text-xs bg-muted px-1.5 py-0.5 rounded flex items-center gap-1 max-w-full truncate",
|
|
1154
|
+
children: [/* @__PURE__ */ X("span", {
|
|
1155
|
+
className: "text-muted-foreground opacity-70",
|
|
1156
|
+
children: [e.name, ":"]
|
|
1157
|
+
}), /* @__PURE__ */ Y("span", {
|
|
1158
|
+
className: "font-medium truncate",
|
|
1159
|
+
children: e.type === "date" ? Ue.formatDate(n) : String(n)
|
|
1160
|
+
})]
|
|
1161
|
+
}, e.id);
|
|
1162
|
+
})
|
|
1163
|
+
})
|
|
1164
|
+
]
|
|
1165
|
+
}), N = f?.cardContent, P = N ? /* @__PURE__ */ Y(N, {
|
|
1166
|
+
card: t,
|
|
1167
|
+
...p?.cardContent
|
|
1168
|
+
}) : M, F = /* @__PURE__ */ Y(w, {
|
|
1169
|
+
ref: b,
|
|
1170
|
+
style: E,
|
|
1171
|
+
..._,
|
|
1172
|
+
...y,
|
|
1173
|
+
onClick: () => n?.(t),
|
|
1174
|
+
onDoubleClick: () => o?.(t),
|
|
1175
|
+
id: t.id,
|
|
1176
|
+
"data-card-id": t.id,
|
|
1177
|
+
className: e("cursor-pointer transition-all hover:shadow-md overflow-hidden", T && "opacity-50 ring-2 ring-primary/50", c && "ring-2 ring-primary bg-primary/5 transition-colors duration-300", m),
|
|
1178
|
+
children: P
|
|
1179
|
+
}), I = f?.card;
|
|
1180
|
+
return I ? /* @__PURE__ */ Y(I, {
|
|
1181
|
+
card: t,
|
|
1182
|
+
defaultContent: F,
|
|
1183
|
+
...p?.card
|
|
1184
|
+
}) : /* @__PURE__ */ Y(v, {
|
|
1185
|
+
enabled: l,
|
|
1186
|
+
content: u ? u(t) : null,
|
|
1187
|
+
children: F
|
|
1188
|
+
});
|
|
1189
|
+
};
|
|
1190
|
+
We.displayName = "KanbanCard";
|
|
1191
|
+
var Ge = O(We), Ke = ({ cards: e, estimateSize: t = 120, overscan: n = 5 }) => {
|
|
1192
|
+
let r = M(null), i = we({
|
|
1193
|
+
count: e.length,
|
|
1194
|
+
getScrollElement: () => r.current,
|
|
1195
|
+
estimateSize: () => t,
|
|
1196
|
+
overscan: n
|
|
1197
|
+
});
|
|
1198
|
+
return {
|
|
1199
|
+
parentRef: r,
|
|
1200
|
+
virtualizer: i,
|
|
1201
|
+
virtualItems: i.getVirtualItems(),
|
|
1202
|
+
totalSize: i.getTotalSize()
|
|
1203
|
+
};
|
|
1204
|
+
}, qe = ({ column: n, cards: r, onCardClick: i, onCardDoubleClick: a, onCardDragStart: o, onAddCard: d, onToggleCollapse: f, onDeleteColumn: p, onUpdateColumn: m, onColumnClick: h, selectedColumnId: g, draggedCardId: _, highlightedCardId: v, isDropTarget: y, customFields: C, className: T, dir: E, slots: O, slotProps: k }) => {
|
|
1205
|
+
let A = E === "rtl", { t: j } = x(), [M, N] = D.useState(!1), P = O?.card || Ge, [F, I] = D.useState(n.name), L = D.useRef(null);
|
|
1206
|
+
D.useEffect(() => {
|
|
1207
|
+
M && L.current && (L.current.focus(), L.current.select());
|
|
1208
|
+
}, [M]);
|
|
1209
|
+
let ee = () => {
|
|
1210
|
+
F.trim() && F !== n.name ? m?.(n.id, { name: F }) : I(n.name), N(!1);
|
|
1211
|
+
}, R = (e) => {
|
|
1212
|
+
e.key === "Enter" ? ee() : e.key === "Escape" && (I(n.name), N(!1));
|
|
1213
|
+
}, z = n.wipLimit && r.length > n.wipLimit, B = n.wipLimit && r.length === n.wipLimit, { setNodeRef: U, attributes: te, listeners: W, transform: G, transition: ne, isDragging: re } = Me({
|
|
1214
|
+
id: n.id,
|
|
1215
|
+
data: {
|
|
1216
|
+
type: "column",
|
|
1217
|
+
column: n
|
|
1218
|
+
}
|
|
1219
|
+
});
|
|
1220
|
+
return /* @__PURE__ */ X(w, {
|
|
1221
|
+
ref: U,
|
|
1222
|
+
style: {
|
|
1223
|
+
transform: ke.Translate.toString(G),
|
|
1224
|
+
transition: ne
|
|
1225
|
+
},
|
|
1226
|
+
className: e("flex flex-col w-80 shrink-0 transition-all duration-200", g === n.id ? "ring-2 ring-primary border-primary" : "", re ? "opacity-50" : "", y ? "ring-2 ring-primary/70 border-primary/50 bg-primary/5" : "", T),
|
|
1227
|
+
onClick: () => h?.(n.id),
|
|
1228
|
+
children: [/* @__PURE__ */ X(b, {
|
|
1229
|
+
className: "pb-3",
|
|
1230
|
+
onDoubleClick: () => N(!0),
|
|
1231
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1232
|
+
className: "flex items-center justify-between",
|
|
1233
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1234
|
+
className: "flex items-center gap-2 flex-1",
|
|
1235
|
+
children: [
|
|
1236
|
+
/* @__PURE__ */ Y("div", {
|
|
1237
|
+
...te,
|
|
1238
|
+
...W,
|
|
1239
|
+
className: "cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded text-muted-foreground/50 hover:text-primary transition-colors",
|
|
1240
|
+
children: /* @__PURE__ */ Y(se, { className: "h-4 w-4" })
|
|
1241
|
+
}),
|
|
1242
|
+
/* @__PURE__ */ Y(t, {
|
|
1243
|
+
variant: "ghost",
|
|
1244
|
+
size: "sm",
|
|
1245
|
+
className: "h-6 w-6 p-0",
|
|
1246
|
+
onClick: () => f?.(n.id),
|
|
1247
|
+
children: n.isCollapsed ? A ? /* @__PURE__ */ Y(H, { className: "h-4 w-4 rotate-180" }) : /* @__PURE__ */ Y(H, { className: "h-4 w-4" }) : /* @__PURE__ */ Y(V, { className: "h-4 w-4" })
|
|
1248
|
+
}),
|
|
1249
|
+
/* @__PURE__ */ X("div", {
|
|
1250
|
+
className: "flex items-center gap-2 flex-1 min-w-0",
|
|
1251
|
+
children: [M ? /* @__PURE__ */ Y("input", {
|
|
1252
|
+
ref: L,
|
|
1253
|
+
value: F,
|
|
1254
|
+
onChange: (e) => I(e.target.value),
|
|
1255
|
+
onBlur: ee,
|
|
1256
|
+
onKeyDown: R,
|
|
1257
|
+
className: "h-6 w-full text-sm font-semibold border rounded px-1 bg-background",
|
|
1258
|
+
onClick: (e) => e.stopPropagation()
|
|
1259
|
+
}) : /* @__PURE__ */ Y("h3", {
|
|
1260
|
+
className: "font-semibold text-sm truncate",
|
|
1261
|
+
title: n.name,
|
|
1262
|
+
children: n.name
|
|
1263
|
+
}), /* @__PURE__ */ X("span", {
|
|
1264
|
+
className: "text-xs text-muted-foreground",
|
|
1265
|
+
children: [
|
|
1266
|
+
r.length,
|
|
1267
|
+
" ",
|
|
1268
|
+
j("items")
|
|
1269
|
+
]
|
|
1270
|
+
})]
|
|
1271
|
+
})
|
|
1272
|
+
]
|
|
1273
|
+
}), /* @__PURE__ */ X("div", {
|
|
1274
|
+
className: "flex items-center gap-1",
|
|
1275
|
+
children: [/* @__PURE__ */ X(u, { children: [/* @__PURE__ */ Y(c, {
|
|
1276
|
+
asChild: !0,
|
|
1277
|
+
children: /* @__PURE__ */ Y(t, {
|
|
1278
|
+
variant: "ghost",
|
|
1279
|
+
size: "sm",
|
|
1280
|
+
className: "h-6 w-6 p-0",
|
|
1281
|
+
children: /* @__PURE__ */ Y(se, { className: "h-4 w-4" })
|
|
1282
|
+
})
|
|
1283
|
+
}), /* @__PURE__ */ Y(l, {
|
|
1284
|
+
align: "end",
|
|
1285
|
+
children: /* @__PURE__ */ X(s, {
|
|
1286
|
+
className: "text-red-600 focus:text-red-600 focus:bg-red-50",
|
|
1287
|
+
onClick: () => p?.(n.id),
|
|
1288
|
+
children: [/* @__PURE__ */ Y(me, { className: "h-4 w-4 me-2" }), j("delete_column") || "Delete Column"]
|
|
1289
|
+
})
|
|
1290
|
+
})] }), /* @__PURE__ */ Y(t, {
|
|
1291
|
+
variant: "ghost",
|
|
1292
|
+
size: "sm",
|
|
1293
|
+
className: "h-6 w-6 p-0",
|
|
1294
|
+
onClick: () => d?.(n.id),
|
|
1295
|
+
children: /* @__PURE__ */ Y(ue, { className: "h-4 w-4" })
|
|
1296
|
+
})]
|
|
1297
|
+
})]
|
|
1298
|
+
}), n.wipLimit && /* @__PURE__ */ Y("div", {
|
|
1299
|
+
className: "mt-2",
|
|
1300
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1301
|
+
className: "h-1 w-full bg-muted rounded-full overflow-hidden",
|
|
1302
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1303
|
+
className: e("h-full transition-all", z ? "bg-red-500" : B ? "bg-yellow-500" : "bg-green-500"),
|
|
1304
|
+
style: { width: `${Math.min(r.length / n.wipLimit * 100, 100)}%` }
|
|
1305
|
+
})
|
|
1306
|
+
})
|
|
1307
|
+
})]
|
|
1308
|
+
}), !n.isCollapsed && (() => {
|
|
1309
|
+
let t = r.sort((e, t) => e.position - t.position);
|
|
1310
|
+
if (t.length > 50) {
|
|
1311
|
+
let { parentRef: e, virtualItems: n, totalSize: r } = Ke({
|
|
1312
|
+
cards: t,
|
|
1313
|
+
estimateSize: 120,
|
|
1314
|
+
overscan: 5
|
|
1315
|
+
});
|
|
1316
|
+
return /* @__PURE__ */ X(S, {
|
|
1317
|
+
ref: e,
|
|
1318
|
+
className: "flex-1 overflow-y-auto max-h-[calc(100vh-200px)]",
|
|
1319
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1320
|
+
style: {
|
|
1321
|
+
height: `${r}px`,
|
|
1322
|
+
position: "relative"
|
|
1323
|
+
},
|
|
1324
|
+
children: n.map((e) => {
|
|
1325
|
+
let n = t[e.index];
|
|
1326
|
+
return /* @__PURE__ */ Y("div", {
|
|
1327
|
+
style: {
|
|
1328
|
+
position: "absolute",
|
|
1329
|
+
top: 0,
|
|
1330
|
+
left: 0,
|
|
1331
|
+
width: "100%",
|
|
1332
|
+
transform: `translateY(${e.start}px)`,
|
|
1333
|
+
paddingBottom: "8px"
|
|
1334
|
+
},
|
|
1335
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1336
|
+
style: {
|
|
1337
|
+
position: "absolute",
|
|
1338
|
+
top: 0,
|
|
1339
|
+
left: 0,
|
|
1340
|
+
width: "100%",
|
|
1341
|
+
transform: `translateY(${e.start}px)`,
|
|
1342
|
+
paddingBottom: "8px"
|
|
1343
|
+
},
|
|
1344
|
+
children: /* @__PURE__ */ Y(P, {
|
|
1345
|
+
card: n,
|
|
1346
|
+
onClick: i,
|
|
1347
|
+
onDoubleClick: a,
|
|
1348
|
+
onDragStart: o,
|
|
1349
|
+
isDragging: _ === n.id,
|
|
1350
|
+
isHighlighted: v === n.id,
|
|
1351
|
+
customFields: C,
|
|
1352
|
+
dir: E,
|
|
1353
|
+
...k?.card
|
|
1354
|
+
})
|
|
1355
|
+
}, n.id)
|
|
1356
|
+
}, n.id);
|
|
1357
|
+
})
|
|
1358
|
+
}), t.length === 0 && /* @__PURE__ */ Y("div", {
|
|
1359
|
+
className: "text-center py-8 text-sm text-muted-foreground",
|
|
1360
|
+
children: j("no_cards")
|
|
1361
|
+
})]
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
return /* @__PURE__ */ X(S, {
|
|
1365
|
+
className: "flex-1 overflow-y-auto max-h-[calc(100vh-200px)] space-y-2",
|
|
1366
|
+
children: [/* @__PURE__ */ Y(Ae, {
|
|
1367
|
+
items: r.map((e) => e.id),
|
|
1368
|
+
strategy: Ne,
|
|
1369
|
+
children: t.map((e) => /* @__PURE__ */ Y(P, {
|
|
1370
|
+
card: e,
|
|
1371
|
+
onClick: i,
|
|
1372
|
+
onDoubleClick: a,
|
|
1373
|
+
onDragStart: o,
|
|
1374
|
+
isDragging: _ === e.id,
|
|
1375
|
+
isHighlighted: v === e.id,
|
|
1376
|
+
customFields: C,
|
|
1377
|
+
dir: E,
|
|
1378
|
+
...k?.card
|
|
1379
|
+
}, e.id))
|
|
1380
|
+
}), r.length === 0 && /* @__PURE__ */ Y("div", {
|
|
1381
|
+
className: e("flex h-32 items-center justify-center rounded-lg border border-dashed text-sm transition-all duration-150", y ? "border-primary/60 bg-primary/5 text-primary/70" : "text-muted-foreground"),
|
|
1382
|
+
children: y ? "✦ Drop here" : j("no_cards")
|
|
1383
|
+
})]
|
|
1384
|
+
});
|
|
1385
|
+
})()]
|
|
1386
|
+
});
|
|
1387
|
+
}, Je = ({ swimlaneId: t, columnId: n, children: r, className: i }) => {
|
|
1388
|
+
let { isOver: a, setNodeRef: o } = xe({
|
|
1389
|
+
id: `swimlane-cell-${t}-${n}`,
|
|
1390
|
+
data: {
|
|
1391
|
+
type: "swimlane-cell",
|
|
1392
|
+
swimlaneId: t,
|
|
1393
|
+
columnId: n
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
return /* @__PURE__ */ Y("div", {
|
|
1397
|
+
ref: o,
|
|
1398
|
+
className: e(i, a && "bg-primary/5 transition-colors"),
|
|
1399
|
+
children: r
|
|
1400
|
+
});
|
|
1401
|
+
}, Ye = ({ swimlane: n, columns: r, cards: i, onCardClick: a, onCardDoubleClick: o, onCardDragStart: s, onCardDragEnd: c, onToggleCollapse: l, draggedCardId: u, highlightedCardId: d, customFields: f, className: p, dir: m, slots: h, slotProps: g }) => {
|
|
1402
|
+
let _ = m === "rtl", { t: v } = x(), y = h?.card || Ge;
|
|
1403
|
+
return /* @__PURE__ */ X("div", {
|
|
1404
|
+
className: e("flex flex-col border rounded-lg bg-card text-card-foreground shadow-sm mb-4", p),
|
|
1405
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1406
|
+
className: "flex items-center gap-2 p-3 border-b bg-muted/30",
|
|
1407
|
+
children: [
|
|
1408
|
+
/* @__PURE__ */ Y(t, {
|
|
1409
|
+
variant: "ghost",
|
|
1410
|
+
size: "sm",
|
|
1411
|
+
className: "h-6 w-6 p-0",
|
|
1412
|
+
onClick: () => l?.(n.id),
|
|
1413
|
+
children: n.isCollapsed ? _ ? /* @__PURE__ */ Y(H, { className: "h-4 w-4 rotate-180" }) : /* @__PURE__ */ Y(H, { className: "h-4 w-4" }) : /* @__PURE__ */ Y(V, { className: "h-4 w-4" })
|
|
1414
|
+
}),
|
|
1415
|
+
/* @__PURE__ */ Y("h3", {
|
|
1416
|
+
className: "font-semibold text-sm",
|
|
1417
|
+
children: n.name
|
|
1418
|
+
}),
|
|
1419
|
+
/* @__PURE__ */ X("span", {
|
|
1420
|
+
className: "text-xs text-muted-foreground",
|
|
1421
|
+
children: [
|
|
1422
|
+
"(",
|
|
1423
|
+
i.length,
|
|
1424
|
+
" ",
|
|
1425
|
+
v("items"),
|
|
1426
|
+
")"
|
|
1427
|
+
]
|
|
1428
|
+
})
|
|
1429
|
+
]
|
|
1430
|
+
}), !n.isCollapsed && /* @__PURE__ */ Y("div", {
|
|
1431
|
+
className: e("flex divide-x", _ && "divide-x-reverse"),
|
|
1432
|
+
children: r.map((e) => {
|
|
1433
|
+
let t = i.filter((t) => t.columnId === e.id);
|
|
1434
|
+
return /* @__PURE__ */ Y(Je, {
|
|
1435
|
+
swimlaneId: n.id,
|
|
1436
|
+
columnId: e.id,
|
|
1437
|
+
className: "flex-1 min-w-[280px] p-2 min-h-[100px]",
|
|
1438
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1439
|
+
className: "space-y-2",
|
|
1440
|
+
children: t.map((e) => /* @__PURE__ */ Y(y, {
|
|
1441
|
+
card: e,
|
|
1442
|
+
onClick: a,
|
|
1443
|
+
onDoubleClick: o,
|
|
1444
|
+
onDragStart: s,
|
|
1445
|
+
onDragEnd: c,
|
|
1446
|
+
isDragging: u === e.id,
|
|
1447
|
+
isHighlighted: d === e.id,
|
|
1448
|
+
customFields: f,
|
|
1449
|
+
dir: m,
|
|
1450
|
+
...g?.card
|
|
1451
|
+
}, e.id))
|
|
1452
|
+
})
|
|
1453
|
+
}, e.id);
|
|
1454
|
+
})
|
|
1455
|
+
})]
|
|
1456
|
+
});
|
|
1457
|
+
}, Xe = (e, t) => t.find((t) => t.id === e.columnId)?.color || "hsl(var(--primary))", Ze = ({ cards: e, columns: t, swimlanes: n, onCardUpdate: r, onCardClick: i, onCardCreate: a, className: o, dir: s }) => {
|
|
1458
|
+
let c = j(() => {
|
|
1459
|
+
let r = [];
|
|
1460
|
+
return n && n.length > 0 ? (r = n.sort((e, t) => e.position - t.position).map((e) => ({
|
|
1461
|
+
id: e.id,
|
|
1462
|
+
name: e.name,
|
|
1463
|
+
color: e.color
|
|
1464
|
+
})), e.some((e) => !e.swimlaneId) && r.push({
|
|
1465
|
+
id: "uncategorized",
|
|
1466
|
+
name: "Uncategorized",
|
|
1467
|
+
color: "hsl(var(--muted-foreground))"
|
|
1468
|
+
}), r) : t.sort((e, t) => e.position - t.position).map((e) => ({
|
|
1469
|
+
id: e.id,
|
|
1470
|
+
name: e.name,
|
|
1471
|
+
color: e.color
|
|
1472
|
+
}));
|
|
1473
|
+
}, [
|
|
1474
|
+
n,
|
|
1475
|
+
t,
|
|
1476
|
+
e
|
|
1477
|
+
]), l = j(() => e.map((e) => {
|
|
1478
|
+
let r = n && n.length > 0 ? e.swimlaneId || "uncategorized" : e.columnId || "uncategorized", i = e.startDate ? new Date(e.startDate) : e.dueDate ? Oe(new Date(e.dueDate)) : Oe(/* @__PURE__ */ new Date()), a = e.dueDate ? new Date(e.dueDate) : Te(i, 1), o = t.find((t) => t.id === e.columnId);
|
|
1479
|
+
return {
|
|
1480
|
+
id: e.id,
|
|
1481
|
+
title: e.title,
|
|
1482
|
+
start: i,
|
|
1483
|
+
end: a,
|
|
1484
|
+
resourceId: r || "uncategorized",
|
|
1485
|
+
description: e.description,
|
|
1486
|
+
color: Xe(e, t),
|
|
1487
|
+
status: o?.name,
|
|
1488
|
+
originalCard: e
|
|
1489
|
+
};
|
|
1490
|
+
}), [
|
|
1491
|
+
e,
|
|
1492
|
+
n,
|
|
1493
|
+
t
|
|
1494
|
+
]), u = k((e) => {
|
|
1495
|
+
let i = e.originalCard;
|
|
1496
|
+
if (!i) return;
|
|
1497
|
+
let a = {
|
|
1498
|
+
...i,
|
|
1499
|
+
startDate: e.start,
|
|
1500
|
+
dueDate: e.end,
|
|
1501
|
+
...n && n.length > 0 ? { swimlaneId: e.resourceId } : { columnId: e.resourceId || i.columnId || t[0]?.id || "" }
|
|
1502
|
+
};
|
|
1503
|
+
r?.(a, "move");
|
|
1504
|
+
}, [
|
|
1505
|
+
r,
|
|
1506
|
+
n,
|
|
1507
|
+
t
|
|
1508
|
+
]), f = k((e) => {
|
|
1509
|
+
let r = n && n.length > 0, i = {
|
|
1510
|
+
title: e.title || "New Card",
|
|
1511
|
+
startDate: e.start,
|
|
1512
|
+
dueDate: e.end,
|
|
1513
|
+
columnId: !r && e.resourceId ? e.resourceId : t[0]?.id || "",
|
|
1514
|
+
swimlaneId: r && e.resourceId ? e.resourceId : void 0,
|
|
1515
|
+
description: e.description || "",
|
|
1516
|
+
priority: "medium"
|
|
1517
|
+
};
|
|
1518
|
+
a?.(i);
|
|
1519
|
+
}, [
|
|
1520
|
+
n,
|
|
1521
|
+
t,
|
|
1522
|
+
a
|
|
1523
|
+
]), p = k((e) => {
|
|
1524
|
+
let t = e.originalCard;
|
|
1525
|
+
t && i?.(t);
|
|
1526
|
+
}, [i]);
|
|
1527
|
+
return /* @__PURE__ */ Y("div", {
|
|
1528
|
+
className: o,
|
|
1529
|
+
style: {
|
|
1530
|
+
height: "100%",
|
|
1531
|
+
minHeight: "600px"
|
|
1532
|
+
},
|
|
1533
|
+
children: /* @__PURE__ */ Y(d, {
|
|
1534
|
+
events: l,
|
|
1535
|
+
resources: c,
|
|
1536
|
+
selectedDate: /* @__PURE__ */ new Date(),
|
|
1537
|
+
view: "TimelineMonth",
|
|
1538
|
+
views: ["TimelineWeek", "TimelineMonth"],
|
|
1539
|
+
onEventChange: u,
|
|
1540
|
+
onEventCreate: f,
|
|
1541
|
+
onEventClick: p,
|
|
1542
|
+
showHeaderBar: !0,
|
|
1543
|
+
showResourceHeaders: !0,
|
|
1544
|
+
dir: s
|
|
1545
|
+
})
|
|
1546
|
+
});
|
|
1547
|
+
}, Qe = ({ board: n, onCardClick: r, onCardDoubleClick: i, onCardDragStart: a, onCardDragEnd: o, onCardDrop: s, onAddCard: c, onToggleColumnCollapse: l, onToggleSwimlaneCollapse: u, onAddColumn: d, onDeleteColumn: f, onUpdateColumn: p, onColumnClick: m, onCreateCard: h, selectedColumnId: g, draggedCardId: _, filteredCards: v, slots: y, slotProps: b, className: S, view: C = "standard", dir: w }) => {
|
|
1548
|
+
let T = v || n.cards, { t: E } = x(), [D, O] = N(null), [k, A] = N(null);
|
|
1549
|
+
return C === "timeline" ? /* @__PURE__ */ Y(Ze, {
|
|
1550
|
+
cards: T,
|
|
1551
|
+
columns: n.columns,
|
|
1552
|
+
swimlanes: n.swimlanes,
|
|
1553
|
+
onCardUpdate: s ? async (e, t) => {
|
|
1554
|
+
t === "move" && s(e.columnId, e.swimlaneId);
|
|
1555
|
+
} : void 0,
|
|
1556
|
+
onCardClick: r,
|
|
1557
|
+
onCardCreate: h,
|
|
1558
|
+
className: S,
|
|
1559
|
+
dir: w
|
|
1560
|
+
}) : /* @__PURE__ */ X(Z, {
|
|
1561
|
+
sensors: Ce(Se(be, { activationConstraint: { distance: 5 } })),
|
|
1562
|
+
onDragStart: (e) => {
|
|
1563
|
+
let { active: t } = e;
|
|
1564
|
+
t.data.current?.type === "card" && (O(t.data.current.card), a?.(t.data.current.card));
|
|
1565
|
+
},
|
|
1566
|
+
onDragOver: (e) => {
|
|
1567
|
+
let { over: t } = e;
|
|
1568
|
+
if (!t) {
|
|
1569
|
+
A(null);
|
|
1570
|
+
return;
|
|
1571
|
+
}
|
|
1572
|
+
t.data.current?.type === "column" ? A(t.data.current.column.id) : t.data.current?.type === "card" ? A(t.data.current.card.columnId) : t.data.current?.type === "swimlane-cell" ? A(t.data.current.columnId) : A(null);
|
|
1573
|
+
},
|
|
1574
|
+
onDragEnd: (e) => {
|
|
1575
|
+
let { active: t, over: r } = e;
|
|
1576
|
+
if (O(null), A(null), !r) {
|
|
1577
|
+
o?.();
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
if (t.data.current?.type === "card") {
|
|
1581
|
+
let e, t, i;
|
|
1582
|
+
if (r.data.current?.type === "column") e = r.data.current.column.id, t = void 0;
|
|
1583
|
+
else if (r.data.current?.type === "swimlane-cell") e = r.data.current.columnId, i = r.data.current.swimlaneId;
|
|
1584
|
+
else if (r.data.current?.type === "card") {
|
|
1585
|
+
let a = r.data.current.card;
|
|
1586
|
+
e = a.columnId, i = a.swimlaneId;
|
|
1587
|
+
let o = n.cards.filter((t) => t.columnId === e);
|
|
1588
|
+
i && (o = o.filter((e) => e.swimlaneId === i)), o.sort((e, t) => (e.position ?? 0) - (t.position ?? 0));
|
|
1589
|
+
let s = o.findIndex((e) => e.id === a.id);
|
|
1590
|
+
t = s >= 0 ? s : void 0;
|
|
1591
|
+
}
|
|
1592
|
+
e ? s?.(e, i, t) : o?.();
|
|
1593
|
+
} else t.data.current?.type === "column" && r.data.current?.type, o?.();
|
|
1594
|
+
},
|
|
1595
|
+
children: [C === "swimlane" ? !n.swimlanes || n.swimlanes.length === 0 ? null : /* @__PURE__ */ Y("div", {
|
|
1596
|
+
className: e("flex flex-col p-4 overflow-y-auto h-full", S),
|
|
1597
|
+
children: /* @__PURE__ */ X(Ae, {
|
|
1598
|
+
items: T.map((e) => e.id),
|
|
1599
|
+
children: [n.swimlanes.sort((e, t) => e.position - t.position).map((e) => {
|
|
1600
|
+
let t = T.filter((t) => t.swimlaneId === e.id);
|
|
1601
|
+
return /* @__PURE__ */ Y(Ye, {
|
|
1602
|
+
swimlane: e,
|
|
1603
|
+
columns: n.columns.sort((e, t) => e.position - t.position),
|
|
1604
|
+
cards: t,
|
|
1605
|
+
onCardClick: r,
|
|
1606
|
+
onCardDoubleClick: i,
|
|
1607
|
+
onCardDragStart: a,
|
|
1608
|
+
onCardDragEnd: o,
|
|
1609
|
+
onDrop: s,
|
|
1610
|
+
onToggleCollapse: u,
|
|
1611
|
+
draggedCardId: _,
|
|
1612
|
+
customFields: n.customFields,
|
|
1613
|
+
slots: y,
|
|
1614
|
+
slotProps: b,
|
|
1615
|
+
dir: w
|
|
1616
|
+
}, e.id);
|
|
1617
|
+
}), T.some((e) => !e.swimlaneId) && /* @__PURE__ */ Y(Ye, {
|
|
1618
|
+
swimlane: {
|
|
1619
|
+
id: "uncategorized",
|
|
1620
|
+
name: E("uncategorized"),
|
|
1621
|
+
type: "custom",
|
|
1622
|
+
position: 9999,
|
|
1623
|
+
isCollapsed: !1
|
|
1624
|
+
},
|
|
1625
|
+
columns: n.columns.sort((e, t) => e.position - t.position),
|
|
1626
|
+
cards: T.filter((e) => !e.swimlaneId),
|
|
1627
|
+
onCardClick: r,
|
|
1628
|
+
onCardDoubleClick: i,
|
|
1629
|
+
onCardDragStart: a,
|
|
1630
|
+
onCardDragEnd: o,
|
|
1631
|
+
onDrop: s,
|
|
1632
|
+
onToggleCollapse: () => {},
|
|
1633
|
+
draggedCardId: _,
|
|
1634
|
+
customFields: n.customFields,
|
|
1635
|
+
slots: y,
|
|
1636
|
+
slotProps: b,
|
|
1637
|
+
dir: w
|
|
1638
|
+
})]
|
|
1639
|
+
})
|
|
1640
|
+
}) : /* @__PURE__ */ X("div", {
|
|
1641
|
+
className: e("flex gap-4 overflow-x-auto p-4", S),
|
|
1642
|
+
children: [/* @__PURE__ */ Y(Ae, {
|
|
1643
|
+
items: n.columns.map((e) => e.id),
|
|
1644
|
+
strategy: je,
|
|
1645
|
+
children: n.columns.sort((e, t) => e.position - t.position).map((e) => /* @__PURE__ */ Y(qe, {
|
|
1646
|
+
column: e,
|
|
1647
|
+
cards: T.filter((t) => t.columnId === e.id),
|
|
1648
|
+
onCardClick: r,
|
|
1649
|
+
onCardDoubleClick: i,
|
|
1650
|
+
onCardDragStart: a,
|
|
1651
|
+
onCardDragEnd: o,
|
|
1652
|
+
onDrop: s,
|
|
1653
|
+
onAddCard: c,
|
|
1654
|
+
onToggleCollapse: l,
|
|
1655
|
+
onDeleteColumn: f,
|
|
1656
|
+
onUpdateColumn: p,
|
|
1657
|
+
onColumnClick: m,
|
|
1658
|
+
selectedColumnId: g,
|
|
1659
|
+
draggedCardId: _,
|
|
1660
|
+
isDropTarget: k === e.id,
|
|
1661
|
+
customFields: n.customFields,
|
|
1662
|
+
slots: y,
|
|
1663
|
+
slotProps: b,
|
|
1664
|
+
dir: w
|
|
1665
|
+
}, e.id))
|
|
1666
|
+
}), d && /* @__PURE__ */ Y("div", {
|
|
1667
|
+
className: "w-80 shrink-0",
|
|
1668
|
+
children: /* @__PURE__ */ X(t, {
|
|
1669
|
+
variant: "outline",
|
|
1670
|
+
className: "w-full h-12 border-dashed",
|
|
1671
|
+
onClick: d,
|
|
1672
|
+
children: [/* @__PURE__ */ Y(ue, { className: "me-2 h-4 w-4" }), E("add_column") || "Add Column"]
|
|
1673
|
+
})
|
|
1674
|
+
})]
|
|
1675
|
+
}), /* @__PURE__ */ Y(ye, {
|
|
1676
|
+
dropAnimation: {
|
|
1677
|
+
duration: 200,
|
|
1678
|
+
easing: "ease"
|
|
1679
|
+
},
|
|
1680
|
+
children: D ? /* @__PURE__ */ Y("div", {
|
|
1681
|
+
className: "rotate-2 opacity-90 shadow-2xl ring-2 ring-primary/60 rounded-lg pointer-events-none w-72",
|
|
1682
|
+
children: /* @__PURE__ */ X("div", {
|
|
1683
|
+
className: "bg-card border border-border rounded-lg p-3 space-y-1",
|
|
1684
|
+
children: [/* @__PURE__ */ Y("p", {
|
|
1685
|
+
className: "font-medium text-sm",
|
|
1686
|
+
children: D.title
|
|
1687
|
+
}), D.description && /* @__PURE__ */ Y("p", {
|
|
1688
|
+
className: "text-xs text-muted-foreground line-clamp-2",
|
|
1689
|
+
children: D.description
|
|
1690
|
+
})]
|
|
1691
|
+
})
|
|
1692
|
+
}) : null
|
|
1693
|
+
})]
|
|
1694
|
+
});
|
|
1695
|
+
};
|
|
1696
|
+
//#endregion
|
|
1697
|
+
export { Ge as a, Le as c, Q as d, Fe as f, qe as i, $ as l, Ze as n, He as o, Pe as p, Ye as r, ze as s, Qe as t, Re as u };
|