@gostack-framework/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +5 -0
- package/dist/activity/index.d.ts +2 -0
- package/dist/activity/index.js +3 -0
- package/dist/activity/index.js.map +1 -0
- package/dist/clickup/common/InlineNameTab.d.ts +11 -0
- package/dist/clickup/common/InlineNameTab.js +50 -0
- package/dist/clickup/common/InlineNameTab.js.map +1 -0
- package/dist/clickup/common/TaskAssigneeAvatar.d.ts +14 -0
- package/dist/clickup/common/TaskAssigneeAvatar.js +32 -0
- package/dist/clickup/common/TaskAssigneeAvatar.js.map +1 -0
- package/dist/clickup/common/TaskBreadcrumb.d.ts +11 -0
- package/dist/clickup/common/TaskBreadcrumb.js +11 -0
- package/dist/clickup/common/TaskBreadcrumb.js.map +1 -0
- package/dist/clickup/common/TaskCheck.d.ts +10 -0
- package/dist/clickup/common/TaskCheck.js +17 -0
- package/dist/clickup/common/TaskCheck.js.map +1 -0
- package/dist/clickup/common/TaskContextMenu.d.ts +10 -0
- package/dist/clickup/common/TaskContextMenu.js +22 -0
- package/dist/clickup/common/TaskContextMenu.js.map +1 -0
- package/dist/clickup/common/TaskIcon.d.ts +29 -0
- package/dist/clickup/common/TaskIcon.js +30 -0
- package/dist/clickup/common/TaskIcon.js.map +1 -0
- package/dist/clickup/common/TaskPriorityBadge.d.ts +11 -0
- package/dist/clickup/common/TaskPriorityBadge.js +11 -0
- package/dist/clickup/common/TaskPriorityBadge.js.map +1 -0
- package/dist/clickup/common/TaskRowActionMenu.d.ts +6 -0
- package/dist/clickup/common/TaskRowActionMenu.js +10 -0
- package/dist/clickup/common/TaskRowActionMenu.js.map +1 -0
- package/dist/clickup/common/TaskStatusPill.d.ts +12 -0
- package/dist/clickup/common/TaskStatusPill.js +24 -0
- package/dist/clickup/common/TaskStatusPill.js.map +1 -0
- package/dist/clickup/common/WorkspaceButton.d.ts +3 -0
- package/dist/clickup/common/WorkspaceButton.js +8 -0
- package/dist/clickup/common/WorkspaceButton.js.map +1 -0
- package/dist/clickup/common/WorkspaceHeader.d.ts +9 -0
- package/dist/clickup/common/WorkspaceHeader.js +7 -0
- package/dist/clickup/common/WorkspaceHeader.js.map +1 -0
- package/dist/clickup/common/WorkspaceMenus.d.ts +17 -0
- package/dist/clickup/common/WorkspaceMenus.js +15 -0
- package/dist/clickup/common/WorkspaceMenus.js.map +1 -0
- package/dist/clickup/common/WorkspaceMessage.d.ts +7 -0
- package/dist/clickup/common/WorkspaceMessage.js +6 -0
- package/dist/clickup/common/WorkspaceMessage.js.map +1 -0
- package/dist/clickup/common/WorkspaceMetricStrip.d.ts +10 -0
- package/dist/clickup/common/WorkspaceMetricStrip.js +6 -0
- package/dist/clickup/common/WorkspaceMetricStrip.js.map +1 -0
- package/dist/clickup/common/WorkspacePanel.d.ts +7 -0
- package/dist/clickup/common/WorkspacePanel.js +7 -0
- package/dist/clickup/common/WorkspacePanel.js.map +1 -0
- package/dist/clickup/common/WorkspaceSelect.d.ts +5 -0
- package/dist/clickup/common/WorkspaceSelect.js +64 -0
- package/dist/clickup/common/WorkspaceSelect.js.map +1 -0
- package/dist/clickup/common/WorkspaceTable.d.ts +16 -0
- package/dist/clickup/common/WorkspaceTable.js +7 -0
- package/dist/clickup/common/WorkspaceTable.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpCommentComposer.d.ts +9 -0
- package/dist/clickup/dialogs/ClickUpCommentComposer.js +35 -0
- package/dist/clickup/dialogs/ClickUpCommentComposer.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskActions.d.ts +8 -0
- package/dist/clickup/dialogs/ClickUpTaskActions.js +10 -0
- package/dist/clickup/dialogs/ClickUpTaskActions.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskAssignee.d.ts +7 -0
- package/dist/clickup/dialogs/ClickUpTaskAssignee.js +12 -0
- package/dist/clickup/dialogs/ClickUpTaskAssignee.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskDescription.d.ts +12 -0
- package/dist/clickup/dialogs/ClickUpTaskDescription.js +12 -0
- package/dist/clickup/dialogs/ClickUpTaskDescription.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskDialog.d.ts +27 -0
- package/dist/clickup/dialogs/ClickUpTaskDialog.js +35 -0
- package/dist/clickup/dialogs/ClickUpTaskDialog.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskDiscussion.d.ts +11 -0
- package/dist/clickup/dialogs/ClickUpTaskDiscussion.js +29 -0
- package/dist/clickup/dialogs/ClickUpTaskDiscussion.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskMain.d.ts +24 -0
- package/dist/clickup/dialogs/ClickUpTaskMain.js +26 -0
- package/dist/clickup/dialogs/ClickUpTaskMain.js.map +1 -0
- package/dist/clickup/dialogs/ClickUpTaskProperties.d.ts +17 -0
- package/dist/clickup/dialogs/ClickUpTaskProperties.js +26 -0
- package/dist/clickup/dialogs/ClickUpTaskProperties.js.map +1 -0
- package/dist/clickup/elements/TaskCalendarCell.d.ts +14 -0
- package/dist/clickup/elements/TaskCalendarCell.js +19 -0
- package/dist/clickup/elements/TaskCalendarCell.js.map +1 -0
- package/dist/clickup/elements/TaskCard.d.ts +16 -0
- package/dist/clickup/elements/TaskCard.js +51 -0
- package/dist/clickup/elements/TaskCard.js.map +1 -0
- package/dist/clickup/elements/TaskGroup.d.ts +24 -0
- package/dist/clickup/elements/TaskGroup.js +50 -0
- package/dist/clickup/elements/TaskGroup.js.map +1 -0
- package/dist/clickup/elements/TaskRow.d.ts +19 -0
- package/dist/clickup/elements/TaskRow.js +60 -0
- package/dist/clickup/elements/TaskRow.js.map +1 -0
- package/dist/clickup/elements/TaskTableHead.d.ts +1 -0
- package/dist/clickup/elements/TaskTableHead.js +15 -0
- package/dist/clickup/elements/TaskTableHead.js.map +1 -0
- package/dist/clickup/elements/TaskTimelineRow.d.ts +12 -0
- package/dist/clickup/elements/TaskTimelineRow.js +16 -0
- package/dist/clickup/elements/TaskTimelineRow.js.map +1 -0
- package/dist/clickup/index.d.ts +41 -0
- package/dist/clickup/index.js +48 -0
- package/dist/clickup/index.js.map +1 -0
- package/dist/clickup/task-ui.css +864 -0
- package/dist/clickup/toolbar/TaskToolbar.d.ts +20 -0
- package/dist/clickup/toolbar/TaskToolbar.js +16 -0
- package/dist/clickup/toolbar/TaskToolbar.js.map +1 -0
- package/dist/clickup/toolbar/TaskViewPicker.d.ts +8 -0
- package/dist/clickup/toolbar/TaskViewPicker.js +48 -0
- package/dist/clickup/toolbar/TaskViewPicker.js.map +1 -0
- package/dist/clickup/toolbar/TaskViewSwitcher.d.ts +21 -0
- package/dist/clickup/toolbar/TaskViewSwitcher.js +55 -0
- package/dist/clickup/toolbar/TaskViewSwitcher.js.map +1 -0
- package/dist/clickup/types.d.ts +66 -0
- package/dist/clickup/types.js +2 -0
- package/dist/clickup/types.js.map +1 -0
- package/dist/clickup/views/TaskBoardView.d.ts +21 -0
- package/dist/clickup/views/TaskBoardView.js +75 -0
- package/dist/clickup/views/TaskBoardView.js.map +1 -0
- package/dist/clickup/views/TaskCalendarView.d.ts +12 -0
- package/dist/clickup/views/TaskCalendarView.js +197 -0
- package/dist/clickup/views/TaskCalendarView.js.map +1 -0
- package/dist/clickup/views/TaskGanttView.d.ts +12 -0
- package/dist/clickup/views/TaskGanttView.js +64 -0
- package/dist/clickup/views/TaskGanttView.js.map +1 -0
- package/dist/clickup/views/TaskListView.d.ts +22 -0
- package/dist/clickup/views/TaskListView.js +17 -0
- package/dist/clickup/views/TaskListView.js.map +1 -0
- package/dist/clickup/views/TaskTableView.d.ts +21 -0
- package/dist/clickup/views/TaskTableView.js +50 -0
- package/dist/clickup/views/TaskTableView.js.map +1 -0
- package/dist/components/ActivityFeed.d.ts +48 -0
- package/dist/components/ActivityFeed.js +60 -0
- package/dist/components/ActivityFeed.js.map +1 -0
- package/dist/components/AudioPlayer.d.ts +8 -0
- package/dist/components/AudioPlayer.js +96 -0
- package/dist/components/AudioPlayer.js.map +1 -0
- package/dist/components/BulkActionBar.d.ts +10 -0
- package/dist/components/BulkActionBar.js +10 -0
- package/dist/components/BulkActionBar.js.map +1 -0
- package/dist/components/Carousel.d.ts +8 -0
- package/dist/components/Carousel.js +38 -0
- package/dist/components/Carousel.js.map +1 -0
- package/dist/components/ChatBot.d.ts +6 -0
- package/dist/components/ChatBot.js +52 -0
- package/dist/components/ChatBot.js.map +1 -0
- package/dist/components/CheckboxCustom.d.ts +9 -0
- package/dist/components/CheckboxCustom.js +42 -0
- package/dist/components/CheckboxCustom.js.map +1 -0
- package/dist/components/ClickUpTaskModal.d.ts +36 -0
- package/dist/components/ClickUpTaskModal.js +180 -0
- package/dist/components/ClickUpTaskModal.js.map +1 -0
- package/dist/components/ConditionBuilder.d.ts +28 -0
- package/dist/components/ConditionBuilder.js +63 -0
- package/dist/components/ConditionBuilder.js.map +1 -0
- package/dist/components/ConfirmDialog.d.ts +21 -0
- package/dist/components/ConfirmDialog.js +51 -0
- package/dist/components/ConfirmDialog.js.map +1 -0
- package/dist/components/DataCard.d.ts +43 -0
- package/dist/components/DataCard.js +30 -0
- package/dist/components/DataCard.js.map +1 -0
- package/dist/components/DataTable.d.ts +107 -0
- package/dist/components/DataTable.js +153 -0
- package/dist/components/DataTable.js.map +1 -0
- package/dist/components/DatePicker.d.ts +16 -0
- package/dist/components/DatePicker.js +184 -0
- package/dist/components/DatePicker.js.map +1 -0
- package/dist/components/EmptyState.d.ts +26 -0
- package/dist/components/EmptyState.js +37 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/Error.d.ts +12 -0
- package/dist/components/Error.js +41 -0
- package/dist/components/Error.js.map +1 -0
- package/dist/components/ErrorState.d.ts +10 -0
- package/dist/components/ErrorState.js +53 -0
- package/dist/components/ErrorState.js.map +1 -0
- package/dist/components/FileAttachmentChip.d.ts +10 -0
- package/dist/components/FileAttachmentChip.js +21 -0
- package/dist/components/FileAttachmentChip.js.map +1 -0
- package/dist/components/FilterConditionChip.d.ts +10 -0
- package/dist/components/FilterConditionChip.js +11 -0
- package/dist/components/FilterConditionChip.js.map +1 -0
- package/dist/components/GalleryCarouselDialog.d.ts +14 -0
- package/dist/components/GalleryCarouselDialog.js +167 -0
- package/dist/components/GalleryCarouselDialog.js.map +1 -0
- package/dist/components/HierarchicalSelectionMenu.d.ts +21 -0
- package/dist/components/HierarchicalSelectionMenu.js +168 -0
- package/dist/components/HierarchicalSelectionMenu.js.map +1 -0
- package/dist/components/InfiniteSelect.d.ts +44 -0
- package/dist/components/InfiniteSelect.js +121 -0
- package/dist/components/InfiniteSelect.js.map +1 -0
- package/dist/components/LoadingState.d.ts +28 -0
- package/dist/components/LoadingState.js +24 -0
- package/dist/components/LoadingState.js.map +1 -0
- package/dist/components/LucidIconRender.d.ts +9 -0
- package/dist/components/LucidIconRender.js +7 -0
- package/dist/components/LucidIconRender.js.map +1 -0
- package/dist/components/MasterDetailLayout.d.ts +67 -0
- package/dist/components/MasterDetailLayout.js +79 -0
- package/dist/components/MasterDetailLayout.js.map +1 -0
- package/dist/components/PinnedAttributeRow.d.ts +12 -0
- package/dist/components/PinnedAttributeRow.js +11 -0
- package/dist/components/PinnedAttributeRow.js.map +1 -0
- package/dist/components/PopUp.d.ts +11 -0
- package/dist/components/PopUp.js +83 -0
- package/dist/components/PopUp.js.map +1 -0
- package/dist/components/PrioritySignal.d.ts +10 -0
- package/dist/components/PrioritySignal.js +54 -0
- package/dist/components/PrioritySignal.js.map +1 -0
- package/dist/components/RichTextEditor.d.ts +7 -0
- package/dist/components/RichTextEditor.js +252 -0
- package/dist/components/RichTextEditor.js.map +1 -0
- package/dist/components/SLACountdown.d.ts +15 -0
- package/dist/components/SLACountdown.js +26 -0
- package/dist/components/SLACountdown.js.map +1 -0
- package/dist/components/StatusBadge.d.ts +14 -0
- package/dist/components/StatusBadge.js +55 -0
- package/dist/components/StatusBadge.js.map +1 -0
- package/dist/components/StatusCards.d.ts +12 -0
- package/dist/components/StatusCards.js +12 -0
- package/dist/components/StatusCards.js.map +1 -0
- package/dist/components/StatusProgressBar.d.ts +18 -0
- package/dist/components/StatusProgressBar.js +50 -0
- package/dist/components/StatusProgressBar.js.map +1 -0
- package/dist/components/TableActions.d.ts +26 -0
- package/dist/components/TableActions.js +49 -0
- package/dist/components/TableActions.js.map +1 -0
- package/dist/components/TaskDetailsModal.d.ts +3 -0
- package/dist/components/TaskDetailsModal.js +8 -0
- package/dist/components/TaskDetailsModal.js.map +1 -0
- package/dist/components/ThemedText.d.ts +24 -0
- package/dist/components/ThemedText.js +103 -0
- package/dist/components/ThemedText.js.map +1 -0
- package/dist/components/TicketWorkspaceLayout.d.ts +11 -0
- package/dist/components/TicketWorkspaceLayout.js +7 -0
- package/dist/components/TicketWorkspaceLayout.js.map +1 -0
- package/dist/components/TimePicker.d.ts +15 -0
- package/dist/components/TimePicker.js +96 -0
- package/dist/components/TimePicker.js.map +1 -0
- package/dist/components/Tooltip.d.ts +19 -0
- package/dist/components/Tooltip.js +75 -0
- package/dist/components/Tooltip.js.map +1 -0
- package/dist/components/TreeView.d.ts +33 -0
- package/dist/components/TreeView.js +55 -0
- package/dist/components/TreeView.js.map +1 -0
- package/dist/components/accordion.d.ts +6 -0
- package/dist/components/accordion.js +18 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/avatar.d.ts +11 -0
- package/dist/components/avatar.js +23 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +44 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.d.ts +15 -0
- package/dist/components/button.js +47 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.d.ts +11 -0
- package/dist/components/card.js +25 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/context menu core/context-menu.d.ts +28 -0
- package/dist/components/context menu core/context-menu.js +91 -0
- package/dist/components/context menu core/context-menu.js.map +1 -0
- package/dist/components/context menu core/contextMenuAdvanced.d.ts +46 -0
- package/dist/components/context menu core/contextMenuAdvanced.js +34 -0
- package/dist/components/context menu core/contextMenuAdvanced.js.map +1 -0
- package/dist/components/dialog.d.ts +18 -0
- package/dist/components/dialog.js +42 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +29 -0
- package/dist/components/dropdown-menu.js +51 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/filter/AdvancedFilters.d.ts +14 -0
- package/dist/components/filter/AdvancedFilters.js +220 -0
- package/dist/components/filter/AdvancedFilters.js.map +1 -0
- package/dist/components/filter/Filter.d.ts +48 -0
- package/dist/components/filter/Filter.js +153 -0
- package/dist/components/filter/Filter.js.map +1 -0
- package/dist/components/filter/FilterButton.d.ts +10 -0
- package/dist/components/filter/FilterButton.js +9 -0
- package/dist/components/filter/FilterButton.js.map +1 -0
- package/dist/components/filter/NormalFilters.d.ts +14 -0
- package/dist/components/filter/NormalFilters.js +40 -0
- package/dist/components/filter/NormalFilters.js.map +1 -0
- package/dist/components/filter/index.d.ts +5 -0
- package/dist/components/filter/index.js +6 -0
- package/dist/components/filter/index.js.map +1 -0
- package/dist/components/filter/types.d.ts +32 -0
- package/dist/components/filter/types.js +2 -0
- package/dist/components/filter/types.js.map +1 -0
- package/dist/components/form-error.d.ts +42 -0
- package/dist/components/form-error.js +103 -0
- package/dist/components/form-error.js.map +1 -0
- package/dist/components/icons.d.ts +19 -0
- package/dist/components/icons.js +21 -0
- package/dist/components/icons.js.map +1 -0
- package/dist/components/image.d.ts +12 -0
- package/dist/components/image.js +18 -0
- package/dist/components/image.js.map +1 -0
- package/dist/components/index.d.ts +59 -0
- package/dist/components/index.js +60 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/input.d.ts +22 -0
- package/dist/components/input.js +102 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +7 -0
- package/dist/components/label.js +8 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/layout/FeatureLayout.d.ts +131 -0
- package/dist/components/layout/FeatureLayout.js +113 -0
- package/dist/components/layout/FeatureLayout.js.map +1 -0
- package/dist/components/layout/FeatureLayoutExportButton.d.ts +10 -0
- package/dist/components/layout/FeatureLayoutExportButton.js +21 -0
- package/dist/components/layout/FeatureLayoutExportButton.js.map +1 -0
- package/dist/components/layout/FeatureLayoutTabs.d.ts +36 -0
- package/dist/components/layout/FeatureLayoutTabs.js +192 -0
- package/dist/components/layout/FeatureLayoutTabs.js.map +1 -0
- package/dist/components/layout/kanban/FeatureLayoutKanban.d.ts +6 -0
- package/dist/components/layout/kanban/FeatureLayoutKanban.js +195 -0
- package/dist/components/layout/kanban/FeatureLayoutKanban.js.map +1 -0
- package/dist/components/layout/kanban/KanbanCard.d.ts +12 -0
- package/dist/components/layout/kanban/KanbanCard.js +43 -0
- package/dist/components/layout/kanban/KanbanCard.js.map +1 -0
- package/dist/components/layout/kanban/KanbanColumn.d.ts +23 -0
- package/dist/components/layout/kanban/KanbanColumn.js +30 -0
- package/dist/components/layout/kanban/KanbanColumn.js.map +1 -0
- package/dist/components/layout/kanban/KanbanToolbar.d.ts +11 -0
- package/dist/components/layout/kanban/KanbanToolbar.js +10 -0
- package/dist/components/layout/kanban/KanbanToolbar.js.map +1 -0
- package/dist/components/layout/kanban/index.d.ts +6 -0
- package/dist/components/layout/kanban/index.js +7 -0
- package/dist/components/layout/kanban/index.js.map +1 -0
- package/dist/components/layout/kanban/types.d.ts +67 -0
- package/dist/components/layout/kanban/types.js +2 -0
- package/dist/components/layout/kanban/types.js.map +1 -0
- package/dist/components/popover.d.ts +11 -0
- package/dist/components/popover.js +20 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/react-flow/FlowGraphHeader.d.ts +2 -0
- package/dist/components/react-flow/FlowGraphHeader.js +10 -0
- package/dist/components/react-flow/FlowGraphHeader.js.map +1 -0
- package/dist/components/react-flow/GlowEdge.d.ts +3 -0
- package/dist/components/react-flow/GlowEdge.js +100 -0
- package/dist/components/react-flow/GlowEdge.js.map +1 -0
- package/dist/components/react-flow/ReactFlowCanvas.d.ts +7 -0
- package/dist/components/react-flow/ReactFlowCanvas.js +44 -0
- package/dist/components/react-flow/ReactFlowCanvas.js.map +1 -0
- package/dist/components/react-flow/RelationshipFlow.d.ts +2 -0
- package/dist/components/react-flow/RelationshipFlow.js +9 -0
- package/dist/components/react-flow/RelationshipFlow.js.map +1 -0
- package/dist/components/react-flow/TreeFlowLayout.d.ts +29 -0
- package/dist/components/react-flow/TreeFlowLayout.js +14 -0
- package/dist/components/react-flow/TreeFlowLayout.js.map +1 -0
- package/dist/components/react-flow/edges.d.ts +8 -0
- package/dist/components/react-flow/edges.js +21 -0
- package/dist/components/react-flow/edges.js.map +1 -0
- package/dist/components/react-flow/index.d.ts +9 -0
- package/dist/components/react-flow/index.js +10 -0
- package/dist/components/react-flow/index.js.map +1 -0
- package/dist/components/react-flow/layout.d.ts +5 -0
- package/dist/components/react-flow/layout.js +11 -0
- package/dist/components/react-flow/layout.js.map +1 -0
- package/dist/components/react-flow/types.d.ts +82 -0
- package/dist/components/react-flow/types.js +6 -0
- package/dist/components/react-flow/types.js.map +1 -0
- package/dist/components/react-flow/useFlowGraph.d.ts +3 -0
- package/dist/components/react-flow/useFlowGraph.js +22 -0
- package/dist/components/react-flow/useFlowGraph.js.map +1 -0
- package/dist/components/react-flow/useFlowGraphSync.d.ts +4 -0
- package/dist/components/react-flow/useFlowGraphSync.js +43 -0
- package/dist/components/react-flow/useFlowGraphSync.js.map +1 -0
- package/dist/components/select.d.ts +23 -0
- package/dist/components/select.js +109 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/sonner.d.ts +4 -0
- package/dist/components/sonner.js +29 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/stepper.d.ts +12 -0
- package/dist/components/stepper.js +22 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.js +16 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +52 -0
- package/dist/components/table.js +112 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +10 -0
- package/dist/components/tabs.js +29 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +17 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/condition-builder/index.d.ts +2 -0
- package/dist/condition-builder/index.js +3 -0
- package/dist/condition-builder/index.js.map +1 -0
- package/dist/context-menu/index.d.ts +2 -0
- package/dist/context-menu/index.js +3 -0
- package/dist/context-menu/index.js.map +1 -0
- package/dist/dropdown/SearchDropdown.d.ts +19 -0
- package/dist/dropdown/SearchDropdown.js +27 -0
- package/dist/dropdown/SearchDropdown.js.map +1 -0
- package/dist/dropdown/index.d.ts +2 -0
- package/dist/dropdown/index.js +3 -0
- package/dist/dropdown/index.js.map +1 -0
- package/dist/editor.d.ts +1 -0
- package/dist/editor.js +2 -0
- package/dist/editor.js.map +1 -0
- package/dist/feedback/index.d.ts +6 -0
- package/dist/feedback/index.js +7 -0
- package/dist/feedback/index.js.map +1 -0
- package/dist/flow.d.ts +1 -0
- package/dist/flow.js +2 -0
- package/dist/flow.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useContextMenuActions.d.ts +16 -0
- package/dist/hooks/useContextMenuActions.js +35 -0
- package/dist/hooks/useContextMenuActions.js.map +1 -0
- package/dist/hooks/useFeatureLayout.d.ts +14 -0
- package/dist/hooks/useFeatureLayout.js +21 -0
- package/dist/hooks/useFeatureLayout.js.map +1 -0
- package/dist/hooks/useTableActions.d.ts +46 -0
- package/dist/hooks/useTableActions.js +71 -0
- package/dist/hooks/useTableActions.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations.d.ts +42 -0
- package/dist/integrations.js +9 -0
- package/dist/integrations.js.map +1 -0
- package/dist/itsm/index.d.ts +7 -0
- package/dist/itsm/index.js +8 -0
- package/dist/itsm/index.js.map +1 -0
- package/dist/locales/ar.json +149 -0
- package/dist/locales/en.json +149 -0
- package/dist/primitives/index.d.ts +11 -0
- package/dist/primitives/index.js +12 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/progress.d.ts +7 -0
- package/dist/progress.js +20 -0
- package/dist/progress.js.map +1 -0
- package/dist/select/index.d.ts +3 -0
- package/dist/select/index.js +4 -0
- package/dist/select/index.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/support/api.d.ts +8 -0
- package/dist/support/api.js +2 -0
- package/dist/support/api.js.map +1 -0
- package/dist/support/types/file.types.d.ts +12 -0
- package/dist/support/types/file.types.js +2 -0
- package/dist/support/types/file.types.js.map +1 -0
- package/dist/support/types/gallery.types.d.ts +22 -0
- package/dist/support/types/gallery.types.js +2 -0
- package/dist/support/types/gallery.types.js.map +1 -0
- package/dist/support/types/governorates.types.d.ts +12 -0
- package/dist/support/types/governorates.types.js +2 -0
- package/dist/support/types/governorates.types.js.map +1 -0
- package/dist/support/types/grade.types.d.ts +7 -0
- package/dist/support/types/grade.types.js +2 -0
- package/dist/support/types/grade.types.js.map +1 -0
- package/dist/support/types/index.d.ts +13 -0
- package/dist/support/types/index.js +14 -0
- package/dist/support/types/index.js.map +1 -0
- package/dist/support/types/metadata.types.d.ts +61 -0
- package/dist/support/types/metadata.types.js +3 -0
- package/dist/support/types/metadata.types.js.map +1 -0
- package/dist/support/types/table.types.d.ts +33 -0
- package/dist/support/types/table.types.js +2 -0
- package/dist/support/types/table.types.js.map +1 -0
- package/dist/support/types/viewCard.types.d.ts +78 -0
- package/dist/support/types/viewCard.types.js +3 -0
- package/dist/support/types/viewCard.types.js.map +1 -0
- package/dist/support/utils/fileUtils.d.ts +1 -0
- package/dist/support/utils/fileUtils.js +2 -0
- package/dist/support/utils/fileUtils.js.map +1 -0
- package/dist/support/utils.d.ts +5 -0
- package/dist/support/utils.js +4 -0
- package/dist/support/utils.js.map +1 -0
- package/dist/table/index.d.ts +6 -0
- package/dist/table/index.js +7 -0
- package/dist/table/index.js.map +1 -0
- package/dist/tasks.d.ts +3 -0
- package/dist/tasks.js +4 -0
- package/dist/tasks.js.map +1 -0
- package/dist/tours/TourContext.d.ts +33 -0
- package/dist/tours/TourContext.js +98 -0
- package/dist/tours/TourContext.js.map +1 -0
- package/dist/tours/TourOverlay.d.ts +7 -0
- package/dist/tours/TourOverlay.js +129 -0
- package/dist/tours/TourOverlay.js.map +1 -0
- package/dist/tours.d.ts +2 -0
- package/dist/tours.js +3 -0
- package/dist/tours.js.map +1 -0
- package/dist/types.d.ts +91 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/typography/index.d.ts +4 -0
- package/dist/typography/index.js +5 -0
- package/dist/typography/index.js.map +1 -0
- package/dist/typography/typography.adapter.d.ts +18 -0
- package/dist/typography/typography.adapter.js +113 -0
- package/dist/typography/typography.adapter.js.map +1 -0
- package/dist/typography/typography.constants.d.ts +56 -0
- package/dist/typography/typography.constants.js +649 -0
- package/dist/typography/typography.constants.js.map +1 -0
- package/dist/typography/typography.types.d.ts +62 -0
- package/dist/typography/typography.types.js +6 -0
- package/dist/typography/typography.types.js.map +1 -0
- package/dist/typography/useTypography.d.ts +25 -0
- package/dist/typography/useTypography.js +158 -0
- package/dist/typography/useTypography.js.map +1 -0
- package/dist/ui/accordion.d.ts +7 -0
- package/dist/ui/accordion.js +18 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/avatar.d.ts +11 -0
- package/dist/ui/avatar.js +23 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.js +33 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/button.js +41 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/card.js +25 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/dialog.d.ts +17 -0
- package/dist/ui/dialog.js +37 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +25 -0
- package/dist/ui/dropdown-menu.js +51 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/index.d.ts +15 -0
- package/dist/ui/index.js +16 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.js +7 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/popover.d.ts +10 -0
- package/dist/ui/popover.js +26 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/select.d.ts +15 -0
- package/dist/ui/select.js +38 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/switch.d.ts +6 -0
- package/dist/ui/switch.js +8 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.js +28 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +11 -0
- package/dist/ui/tabs.js +29 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.js +7 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/tooltip.js +17 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/workspace/index.d.ts +2 -0
- package/dist/workspace/index.js +3 -0
- package/dist/workspace/index.js.map +1 -0
- package/package.json +61 -4
- package/src/activity/index.ts +2 -0
- package/src/clickup/common/InlineNameTab.tsx +122 -0
- package/src/clickup/common/TaskAssigneeAvatar.tsx +127 -0
- package/src/clickup/common/TaskBreadcrumb.tsx +91 -0
- package/src/clickup/common/TaskCheck.tsx +51 -0
- package/src/clickup/common/TaskContextMenu.tsx +42 -0
- package/src/clickup/common/TaskIcon.tsx +145 -0
- package/src/clickup/common/TaskPriorityBadge.tsx +52 -0
- package/src/clickup/common/TaskRowActionMenu.tsx +43 -0
- package/src/clickup/common/TaskStatusPill.tsx +73 -0
- package/src/clickup/common/WorkspaceButton.tsx +22 -0
- package/src/clickup/common/WorkspaceHeader.tsx +41 -0
- package/src/clickup/common/WorkspaceMenus.tsx +92 -0
- package/src/clickup/common/WorkspaceMessage.tsx +39 -0
- package/src/clickup/common/WorkspaceMetricStrip.tsx +49 -0
- package/src/clickup/common/WorkspacePanel.tsx +27 -0
- package/src/clickup/common/WorkspaceSelect.tsx +173 -0
- package/src/clickup/common/WorkspaceTable.tsx +78 -0
- package/src/clickup/dialogs/ClickUpCommentComposer.tsx +93 -0
- package/src/clickup/dialogs/ClickUpTaskActions.tsx +73 -0
- package/src/clickup/dialogs/ClickUpTaskAssignee.tsx +86 -0
- package/src/clickup/dialogs/ClickUpTaskDescription.tsx +67 -0
- package/src/clickup/dialogs/ClickUpTaskDialog.tsx +187 -0
- package/src/clickup/dialogs/ClickUpTaskDiscussion.tsx +136 -0
- package/src/clickup/dialogs/ClickUpTaskMain.tsx +156 -0
- package/src/clickup/dialogs/ClickUpTaskProperties.tsx +214 -0
- package/src/clickup/elements/TaskCalendarCell.tsx +91 -0
- package/src/clickup/elements/TaskCard.tsx +154 -0
- package/src/clickup/elements/TaskGroup.tsx +208 -0
- package/src/clickup/elements/TaskRow.tsx +172 -0
- package/src/clickup/elements/TaskTableHead.tsx +29 -0
- package/src/clickup/elements/TaskTimelineRow.tsx +77 -0
- package/src/clickup/index.ts +63 -0
- package/src/clickup/task-ui.css +864 -0
- package/src/clickup/toolbar/TaskToolbar.tsx +130 -0
- package/src/clickup/toolbar/TaskViewPicker.tsx +148 -0
- package/src/clickup/toolbar/TaskViewSwitcher.tsx +129 -0
- package/src/clickup/types.ts +79 -0
- package/src/clickup/views/TaskBoardView.tsx +259 -0
- package/src/clickup/views/TaskCalendarView.tsx +410 -0
- package/src/clickup/views/TaskGanttView.tsx +178 -0
- package/src/clickup/views/TaskListView.tsx +95 -0
- package/src/clickup/views/TaskTableView.tsx +192 -0
- package/src/components/ActivityFeed.tsx +440 -0
- package/src/components/AudioPlayer.tsx +179 -0
- package/src/components/BulkActionBar.tsx +72 -0
- package/src/components/Carousel.tsx +107 -0
- package/src/components/ChatBot.tsx +205 -0
- package/src/components/CheckboxCustom.tsx +106 -0
- package/src/components/ClickUpTaskModal.tsx +661 -0
- package/src/components/ConditionBuilder.tsx +322 -0
- package/src/components/ConfirmDialog.tsx +157 -0
- package/src/components/DataCard.tsx +203 -0
- package/src/components/DataTable.tsx +609 -0
- package/src/components/DatePicker.tsx +397 -0
- package/src/components/EmptyState.tsx +105 -0
- package/src/components/Error.tsx +248 -0
- package/src/components/ErrorState.tsx +199 -0
- package/src/components/FileAttachmentChip.tsx +84 -0
- package/src/components/FilterConditionChip.tsx +56 -0
- package/src/components/GalleryCarouselDialog.tsx +439 -0
- package/src/components/HierarchicalSelectionMenu.tsx +432 -0
- package/src/components/InfiniteSelect.tsx +397 -0
- package/src/components/LoadingState.tsx +105 -0
- package/src/components/LucidIconRender.tsx +25 -0
- package/src/components/MasterDetailLayout.tsx +442 -0
- package/src/components/PinnedAttributeRow.tsx +70 -0
- package/src/components/PopUp.tsx +309 -0
- package/src/components/PrioritySignal.tsx +131 -0
- package/src/components/RichTextEditor.tsx +433 -0
- package/src/components/SLACountdown.tsx +133 -0
- package/src/components/StatusBadge.tsx +119 -0
- package/src/components/StatusCards.tsx +78 -0
- package/src/components/StatusProgressBar.tsx +158 -0
- package/src/components/TableActions.tsx +182 -0
- package/src/components/TaskDetailsModal.tsx +7 -0
- package/src/components/ThemedText.tsx +181 -0
- package/src/components/TicketWorkspaceLayout.tsx +63 -0
- package/src/components/TimePicker.tsx +283 -0
- package/src/components/Tooltip.tsx +128 -0
- package/src/components/TreeView.tsx +297 -0
- package/src/components/accordion.tsx +78 -0
- package/src/components/avatar.tsx +107 -0
- package/src/components/badge.tsx +72 -0
- package/src/components/button.tsx +93 -0
- package/src/components/card.tsx +103 -0
- package/src/components/context menu core/context-menu.tsx +304 -0
- package/src/components/context menu core/contextMenuAdvanced.tsx +130 -0
- package/src/components/dialog.tsx +186 -0
- package/src/components/dropdown-menu.tsx +274 -0
- package/src/components/filter/AdvancedFilters.tsx +834 -0
- package/src/components/filter/Filter.tsx +233 -0
- package/src/components/filter/FilterButton.tsx +38 -0
- package/src/components/filter/NormalFilters.tsx +109 -0
- package/src/components/filter/index.ts +5 -0
- package/src/components/filter/types.ts +36 -0
- package/src/components/form-error.tsx +172 -0
- package/src/components/icons.tsx +468 -0
- package/src/components/image.tsx +85 -0
- package/src/components/index.ts +59 -0
- package/src/components/input.tsx +260 -0
- package/src/components/label.tsx +27 -0
- package/src/components/layout/FeatureLayout.tsx +739 -0
- package/src/components/layout/FeatureLayoutExportButton.tsx +93 -0
- package/src/components/layout/FeatureLayoutTabs.tsx +413 -0
- package/src/components/layout/kanban/FeatureLayoutKanban.tsx +386 -0
- package/src/components/layout/kanban/KanbanCard.tsx +132 -0
- package/src/components/layout/kanban/KanbanColumn.tsx +241 -0
- package/src/components/layout/kanban/KanbanToolbar.tsx +77 -0
- package/src/components/layout/kanban/index.ts +6 -0
- package/src/components/layout/kanban/types.ts +96 -0
- package/src/components/popover.tsx +66 -0
- package/src/components/react-flow/FlowGraphHeader.tsx +68 -0
- package/src/components/react-flow/GlowEdge.tsx +238 -0
- package/src/components/react-flow/ReactFlowCanvas.tsx +112 -0
- package/src/components/react-flow/RelationshipFlow.tsx +50 -0
- package/src/components/react-flow/TreeFlowLayout.tsx +187 -0
- package/src/components/react-flow/edges.ts +39 -0
- package/src/components/react-flow/index.ts +9 -0
- package/src/components/react-flow/layout.ts +16 -0
- package/src/components/react-flow/types.ts +103 -0
- package/src/components/react-flow/useFlowGraph.ts +36 -0
- package/src/components/react-flow/useFlowGraphSync.ts +67 -0
- package/src/components/select.tsx +386 -0
- package/src/components/sonner.tsx +58 -0
- package/src/components/stepper.tsx +97 -0
- package/src/components/switch.tsx +46 -0
- package/src/components/table.tsx +577 -0
- package/src/components/tabs.tsx +81 -0
- package/src/components/textarea.tsx +67 -0
- package/src/condition-builder/index.ts +2 -0
- package/src/context-menu/index.ts +2 -0
- package/src/dropdown/SearchDropdown.tsx +145 -0
- package/src/dropdown/index.ts +2 -0
- package/src/editor.ts +1 -0
- package/src/feedback/index.ts +6 -0
- package/src/flow.ts +1 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useContextMenuActions.ts +69 -0
- package/src/hooks/useFeatureLayout.ts +44 -0
- package/src/hooks/useTableActions.ts +146 -0
- package/src/index.ts +27 -0
- package/src/integrations.tsx +11 -0
- package/src/itsm/index.ts +7 -0
- package/src/locales/ar.json +149 -0
- package/src/locales/en.json +149 -0
- package/src/primitives/index.ts +11 -0
- package/src/progress.tsx +87 -0
- package/src/select/index.ts +3 -0
- package/src/support/api.ts +1 -0
- package/src/support/types/file.types.ts +13 -0
- package/src/support/types/gallery.types.ts +22 -0
- package/src/support/types/governorates.types.ts +13 -0
- package/src/support/types/grade.types.ts +7 -0
- package/src/support/types/index.ts +14 -0
- package/src/support/types/metadata.types.ts +93 -0
- package/src/support/types/table.types.ts +45 -0
- package/src/support/types/viewCard.types.ts +100 -0
- package/src/support/utils/fileUtils.ts +1 -0
- package/src/support/utils.ts +3 -0
- package/src/table/index.ts +6 -0
- package/src/tasks.ts +3 -0
- package/src/tours/TourContext.tsx +142 -0
- package/src/tours/TourOverlay.tsx +281 -0
- package/src/tours.ts +2 -0
- package/src/types.ts +138 -0
- package/src/typography/index.ts +4 -0
- package/src/typography/typography.adapter.ts +131 -0
- package/src/typography/typography.constants.ts +700 -0
- package/src/typography/typography.types.ts +156 -0
- package/src/typography/useTypography.ts +211 -0
- package/src/ui/accordion.tsx +66 -0
- package/src/ui/avatar.tsx +106 -0
- package/src/ui/badge.tsx +58 -0
- package/src/ui/button.tsx +69 -0
- package/src/ui/card.tsx +97 -0
- package/src/ui/dialog.tsx +165 -0
- package/src/ui/dropdown-menu.tsx +262 -0
- package/src/ui/index.ts +15 -0
- package/src/ui/input.tsx +22 -0
- package/src/ui/popover.tsx +86 -0
- package/src/ui/select.tsx +193 -0
- package/src/ui/switch.tsx +32 -0
- package/src/ui/table.tsx +119 -0
- package/src/ui/tabs.tsx +89 -0
- package/src/ui/textarea.tsx +21 -0
- package/src/ui/tooltip.tsx +54 -0
- package/src/workspace/index.ts +2 -0
- package/styles.css +532 -0
- package/README.md +0 -3
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { useTranslation } from "react-i18next";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { ChevronRight, PanelLeftClose } from "lucide-react";
|
|
4
|
+
import { TaskIcon } from "../common/TaskIcon";
|
|
5
|
+
import "../task-ui.css";
|
|
6
|
+
import { cn } from "../../support/utils";
|
|
7
|
+
import {
|
|
8
|
+
ClickUpTask,
|
|
9
|
+
ClickUpStatus,
|
|
10
|
+
ClickUpPhase,
|
|
11
|
+
ClickUpUser,
|
|
12
|
+
} from "../types";
|
|
13
|
+
import { TaskStatusPill } from "../common/TaskStatusPill";
|
|
14
|
+
import { TaskCard } from "../elements/TaskCard";
|
|
15
|
+
import { ThemedText } from "../../components/ThemedText";
|
|
16
|
+
import {
|
|
17
|
+
WorkspaceActionMenu,
|
|
18
|
+
WorkspaceContextMenu,
|
|
19
|
+
} from "../common/WorkspaceMenus";
|
|
20
|
+
|
|
21
|
+
export interface TaskBoardViewProps {
|
|
22
|
+
tasks: ClickUpTask[];
|
|
23
|
+
statuses: ClickUpStatus[];
|
|
24
|
+
phases?: ClickUpPhase[];
|
|
25
|
+
users?: ClickUpUser[];
|
|
26
|
+
canEdit?: boolean;
|
|
27
|
+
collapsedGroupIds?: Record<string, boolean>;
|
|
28
|
+
onToggleGroup?: (statusId: string) => void;
|
|
29
|
+
onTaskMove?: (taskId: string, targetStatusId: string) => void;
|
|
30
|
+
onTaskClick?: (task: ClickUpTask) => void;
|
|
31
|
+
onToggleComplete?: (task: ClickUpTask, checked: boolean) => void;
|
|
32
|
+
onAddTask?: (statusId: string) => void;
|
|
33
|
+
onStatusAction?: (status: ClickUpStatus) => void;
|
|
34
|
+
onAddStatus?: () => void;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const TaskBoardView: React.FC<TaskBoardViewProps> = ({
|
|
39
|
+
tasks,
|
|
40
|
+
statuses,
|
|
41
|
+
phases = [],
|
|
42
|
+
users = [],
|
|
43
|
+
canEdit = true,
|
|
44
|
+
collapsedGroupIds,
|
|
45
|
+
onToggleGroup,
|
|
46
|
+
onTaskMove,
|
|
47
|
+
onTaskClick,
|
|
48
|
+
onToggleComplete,
|
|
49
|
+
onAddTask,
|
|
50
|
+
onStatusAction,
|
|
51
|
+
onAddStatus,
|
|
52
|
+
className,
|
|
53
|
+
}) => {
|
|
54
|
+
const { t: tr } = useTranslation("designSystem");
|
|
55
|
+
const [dragOverStatusId, setDragOverStatusId] = useState<string | null>(null);
|
|
56
|
+
|
|
57
|
+
const phaseMap = React.useMemo(() => {
|
|
58
|
+
const map = new Map<string, ClickUpPhase>();
|
|
59
|
+
phases.forEach((p) => map.set(p.id, p));
|
|
60
|
+
return map;
|
|
61
|
+
}, [phases]);
|
|
62
|
+
|
|
63
|
+
const userMap = React.useMemo(() => {
|
|
64
|
+
const map = new Map<string, ClickUpUser>();
|
|
65
|
+
users.forEach((u) => map.set(u.id, u));
|
|
66
|
+
return map;
|
|
67
|
+
}, [users]);
|
|
68
|
+
|
|
69
|
+
const handleDragOver = (e: React.DragEvent, statusId: string) => {
|
|
70
|
+
if (!canEdit) return;
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
if (dragOverStatusId !== statusId) {
|
|
73
|
+
setDragOverStatusId(statusId);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const handleDragLeave = (e: React.DragEvent, statusId: string) => {
|
|
78
|
+
if (dragOverStatusId === statusId) {
|
|
79
|
+
setDragOverStatusId(null);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const handleDrop = (e: React.DragEvent, statusId: string) => {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
setDragOverStatusId(null);
|
|
86
|
+
if (!canEdit || !onTaskMove) return;
|
|
87
|
+
|
|
88
|
+
const taskId = e.dataTransfer.getData("text/plain");
|
|
89
|
+
if (taskId) {
|
|
90
|
+
onTaskMove(taskId, statusId);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div className={cn("cu-task-board", className)}>
|
|
96
|
+
{statuses.map((status) => {
|
|
97
|
+
const columnTasks = tasks.filter((t) => t.status_id === status.id);
|
|
98
|
+
const isCollapsed = Boolean(collapsedGroupIds?.[status.id]);
|
|
99
|
+
const isDragOver = dragOverStatusId === status.id;
|
|
100
|
+
const statusActions = onStatusAction
|
|
101
|
+
? [
|
|
102
|
+
{
|
|
103
|
+
id: "configure",
|
|
104
|
+
label: tr("clickup.Configure_status", { status: status.label }),
|
|
105
|
+
disabled: !canEdit,
|
|
106
|
+
onSelect: () => onStatusAction(status),
|
|
107
|
+
},
|
|
108
|
+
]
|
|
109
|
+
: [];
|
|
110
|
+
|
|
111
|
+
if (isCollapsed) {
|
|
112
|
+
return (
|
|
113
|
+
<section
|
|
114
|
+
key={status.id}
|
|
115
|
+
onClick={() => onToggleGroup?.(status.id)}
|
|
116
|
+
onDragOver={(e) => handleDragOver(e, status.id)}
|
|
117
|
+
onDragLeave={(e) => handleDragLeave(e, status.id)}
|
|
118
|
+
onDrop={(e) => handleDrop(e, status.id)}
|
|
119
|
+
className={cn(
|
|
120
|
+
"w-10 min-w-10 h-[520px] rounded-xl border border-dashboard-border bg-dashboard-secondary/40 hover:bg-dashboard-secondary/80 transition-all p-2 flex flex-col items-center justify-between cursor-pointer select-none group shrink-0",
|
|
121
|
+
isDragOver &&
|
|
122
|
+
"ring-2 ring-dashboard-primary border-dashboard-primary bg-dashboard-card",
|
|
123
|
+
)}
|
|
124
|
+
title={`${status.label} (${columnTasks.length})`}
|
|
125
|
+
aria-label={`Expand ${status.label} column`}
|
|
126
|
+
>
|
|
127
|
+
<div className="flex flex-col items-center gap-2 pt-1">
|
|
128
|
+
<ChevronRight className="size-3.5 text-dashboard-muted-foreground group-hover:text-dashboard-foreground rtl:rotate-180 transition-transform" />
|
|
129
|
+
<span
|
|
130
|
+
className="size-2 rounded-full shrink-0"
|
|
131
|
+
style={{ backgroundColor: status.color }}
|
|
132
|
+
/>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div className="[writing-mode:vertical-rl] rotate-180 text-xs font-semibold text-dashboard-muted-foreground group-hover:text-dashboard-foreground tracking-wide whitespace-nowrap overflow-hidden text-ellipsis max-h-[340px]">
|
|
136
|
+
{status.label}
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div className="size-5 rounded-full bg-dashboard-secondary border border-dashboard-border flex items-center justify-center text-[10px] font-bold text-dashboard-foreground pb-0.5">
|
|
140
|
+
{columnTasks.length}
|
|
141
|
+
</div>
|
|
142
|
+
</section>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<section
|
|
148
|
+
key={status.id}
|
|
149
|
+
onDragOver={(e) => handleDragOver(e, status.id)}
|
|
150
|
+
onDragLeave={(e) => handleDragLeave(e, status.id)}
|
|
151
|
+
onDrop={(e) => handleDrop(e, status.id)}
|
|
152
|
+
className={cn(
|
|
153
|
+
"cu-task-board-column border transition-colors",
|
|
154
|
+
"bg-dashboard-secondary/30 border-dashboard-border",
|
|
155
|
+
isDragOver &&
|
|
156
|
+
"ring-2 ring-dashboard-primary border-dashboard-primary bg-dashboard-card",
|
|
157
|
+
)}
|
|
158
|
+
>
|
|
159
|
+
{/* Column Header */}
|
|
160
|
+
<WorkspaceContextMenu actions={statusActions}>
|
|
161
|
+
<div className="cu-task-board-head">
|
|
162
|
+
<div className="flex items-center gap-2">
|
|
163
|
+
<TaskStatusPill status={status} size="sm" />
|
|
164
|
+
<ThemedText
|
|
165
|
+
variant="caption"
|
|
166
|
+
as="span"
|
|
167
|
+
className="text-dashboard-muted-foreground text-[10px] leading-[15px] font-normal"
|
|
168
|
+
>
|
|
169
|
+
{columnTasks.length}
|
|
170
|
+
</ThemedText>
|
|
171
|
+
</div>
|
|
172
|
+
<div className="ms-auto flex items-center gap-1">
|
|
173
|
+
{onToggleGroup && (
|
|
174
|
+
<button
|
|
175
|
+
type="button"
|
|
176
|
+
onClick={() => onToggleGroup(status.id)}
|
|
177
|
+
className="p-1 rounded text-dashboard-muted-foreground hover:text-dashboard-foreground hover:bg-dashboard-secondary transition-colors cursor-pointer"
|
|
178
|
+
title={tr("clickup.Collapse_column", {
|
|
179
|
+
defaultValue: "Collapse column",
|
|
180
|
+
})}
|
|
181
|
+
aria-label={`${tr("clickup.Collapse_column", { defaultValue: "Collapse" })} ${status.label}`}
|
|
182
|
+
>
|
|
183
|
+
<PanelLeftClose className="size-3.5" />
|
|
184
|
+
</button>
|
|
185
|
+
)}
|
|
186
|
+
{onStatusAction && (
|
|
187
|
+
<WorkspaceActionMenu
|
|
188
|
+
label={tr("clickup.Configure_status", {
|
|
189
|
+
status: status.label,
|
|
190
|
+
})}
|
|
191
|
+
actions={statusActions}
|
|
192
|
+
className="cu-task-icon-button"
|
|
193
|
+
/>
|
|
194
|
+
)}
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
</WorkspaceContextMenu>
|
|
198
|
+
{/* Task Cards */}
|
|
199
|
+
<div className="cu-task-board-cards">
|
|
200
|
+
{columnTasks.map((task) => (
|
|
201
|
+
<TaskCard
|
|
202
|
+
key={task.id}
|
|
203
|
+
task={task}
|
|
204
|
+
phase={
|
|
205
|
+
task.phase_id ? phaseMap.get(task.phase_id) : undefined
|
|
206
|
+
}
|
|
207
|
+
assignee={
|
|
208
|
+
task.assignee_id ? userMap.get(task.assignee_id) : undefined
|
|
209
|
+
}
|
|
210
|
+
canEdit={canEdit}
|
|
211
|
+
draggable={canEdit}
|
|
212
|
+
onClick={onTaskClick}
|
|
213
|
+
onToggleComplete={onToggleComplete}
|
|
214
|
+
/>
|
|
215
|
+
))}
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
{/* Quick Add Button */}
|
|
219
|
+
{canEdit && onAddTask && (
|
|
220
|
+
<button
|
|
221
|
+
type="button"
|
|
222
|
+
onClick={() => onAddTask(status.id)}
|
|
223
|
+
className="cu-task-board-add hover:bg-dashboard-secondary"
|
|
224
|
+
>
|
|
225
|
+
<TaskIcon name="plus" className="size-[13px]" />
|
|
226
|
+
<ThemedText
|
|
227
|
+
as="span"
|
|
228
|
+
variant="body"
|
|
229
|
+
className="text-[11px] leading-[16.5px] font-normal text-inherit"
|
|
230
|
+
>
|
|
231
|
+
{tr("clickup.Add_task")}
|
|
232
|
+
</ThemedText>
|
|
233
|
+
</button>
|
|
234
|
+
)}
|
|
235
|
+
</section>
|
|
236
|
+
);
|
|
237
|
+
})}
|
|
238
|
+
{onAddStatus && (
|
|
239
|
+
<button
|
|
240
|
+
type="button"
|
|
241
|
+
disabled={!canEdit}
|
|
242
|
+
onClick={onAddStatus}
|
|
243
|
+
className="cu-task-add-group inline-flex items-center gap-2 hover:bg-dashboard-secondary"
|
|
244
|
+
>
|
|
245
|
+
<TaskIcon name="plus" className="size-[13px]" />
|
|
246
|
+
<ThemedText
|
|
247
|
+
as="span"
|
|
248
|
+
variant="body"
|
|
249
|
+
className="text-[12px] font-normal text-inherit"
|
|
250
|
+
>
|
|
251
|
+
{tr("clickup.Add_group")}
|
|
252
|
+
</ThemedText>
|
|
253
|
+
</button>
|
|
254
|
+
)}
|
|
255
|
+
</div>
|
|
256
|
+
);
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export default TaskBoardView;
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { useTranslation } from "react-i18next";
|
|
2
|
+
import React, { useMemo, useState } from "react";
|
|
3
|
+
import { cn } from "../../support/utils";
|
|
4
|
+
import { ClickUpTask } from "../types";
|
|
5
|
+
import { Button } from "../../components/button";
|
|
6
|
+
import { ThemedText } from "../../components/ThemedText";
|
|
7
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
8
|
+
import "../task-ui.css";
|
|
9
|
+
|
|
10
|
+
export interface TaskCalendarViewProps {
|
|
11
|
+
tasks: ClickUpTask[];
|
|
12
|
+
initialDate?: Date;
|
|
13
|
+
onTaskClick?: (task: ClickUpTask) => void;
|
|
14
|
+
onDayClick?: (dateIso: string) => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function parseToMidnight(val?: string | null): Date | null {
|
|
19
|
+
if (!val) return null;
|
|
20
|
+
const s = String(val).trim();
|
|
21
|
+
if (s.length >= 10 && s[4] === "-" && s[7] === "-") {
|
|
22
|
+
const y = parseInt(s.slice(0, 4), 10);
|
|
23
|
+
const m = parseInt(s.slice(5, 7), 10) - 1;
|
|
24
|
+
const d = parseInt(s.slice(8, 10), 10);
|
|
25
|
+
return new Date(y, m, d, 0, 0, 0, 0);
|
|
26
|
+
}
|
|
27
|
+
const parsed = new Date(s);
|
|
28
|
+
if (!isNaN(parsed.getTime())) {
|
|
29
|
+
return new Date(
|
|
30
|
+
parsed.getFullYear(),
|
|
31
|
+
parsed.getMonth(),
|
|
32
|
+
parsed.getDate(),
|
|
33
|
+
0,
|
|
34
|
+
0,
|
|
35
|
+
0,
|
|
36
|
+
0,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const TaskCalendarView: React.FC<TaskCalendarViewProps> = ({
|
|
43
|
+
tasks,
|
|
44
|
+
initialDate,
|
|
45
|
+
onTaskClick,
|
|
46
|
+
onDayClick,
|
|
47
|
+
className,
|
|
48
|
+
}) => {
|
|
49
|
+
const { t: tr, i18n } = useTranslation("designSystem");
|
|
50
|
+
const [currentDate, setCurrentDate] = useState(
|
|
51
|
+
() => initialDate || new Date(),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const year = currentDate.getFullYear();
|
|
55
|
+
const month = currentDate.getMonth();
|
|
56
|
+
|
|
57
|
+
const handlePrevMonth = () => {
|
|
58
|
+
setCurrentDate(
|
|
59
|
+
(prev) => new Date(prev.getFullYear(), prev.getMonth() - 1, 1),
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const handleNextMonth = () => {
|
|
64
|
+
setCurrentDate(
|
|
65
|
+
(prev) => new Date(prev.getFullYear(), prev.getMonth() + 1, 1),
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const handleToday = () => {
|
|
70
|
+
setCurrentDate(new Date());
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const monthLabel = new Intl.DateTimeFormat(i18n.language, {
|
|
74
|
+
month: "long",
|
|
75
|
+
year: "numeric",
|
|
76
|
+
}).format(new Date(year, month, 1));
|
|
77
|
+
|
|
78
|
+
const todayStr = useMemo(() => {
|
|
79
|
+
const now = new Date();
|
|
80
|
+
const y = now.getFullYear();
|
|
81
|
+
const m = String(now.getMonth() + 1).padStart(2, "0");
|
|
82
|
+
const d = String(now.getDate()).padStart(2, "0");
|
|
83
|
+
return `${y}-${m}-${d}`;
|
|
84
|
+
}, []);
|
|
85
|
+
|
|
86
|
+
// Compute weeks (Monday to Sunday)
|
|
87
|
+
const calendarWeeks = useMemo(() => {
|
|
88
|
+
const firstDay = new Date(year, month, 1);
|
|
89
|
+
// Monday as index 0: (day + 6) % 7
|
|
90
|
+
const startDayOfWeek = (firstDay.getDay() + 6) % 7;
|
|
91
|
+
const startDate = new Date(year, month, 1 - startDayOfWeek);
|
|
92
|
+
const lastDayOfMonth = new Date(year, month + 1, 0).getDate();
|
|
93
|
+
const totalDaysNeeded = startDayOfWeek + lastDayOfMonth;
|
|
94
|
+
const totalCells = Math.ceil(totalDaysNeeded / 7) * 7;
|
|
95
|
+
|
|
96
|
+
const weeks: {
|
|
97
|
+
date: Date;
|
|
98
|
+
dayNumber: number;
|
|
99
|
+
month: number;
|
|
100
|
+
year: number;
|
|
101
|
+
dateIso: string;
|
|
102
|
+
isCurrentMonth: boolean;
|
|
103
|
+
isToday: boolean;
|
|
104
|
+
}[][] = [];
|
|
105
|
+
|
|
106
|
+
const iter = new Date(
|
|
107
|
+
startDate.getFullYear(),
|
|
108
|
+
startDate.getMonth(),
|
|
109
|
+
startDate.getDate(),
|
|
110
|
+
0,
|
|
111
|
+
0,
|
|
112
|
+
0,
|
|
113
|
+
0,
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
for (let w = 0; w < totalCells / 7; w++) {
|
|
117
|
+
const weekRow = [];
|
|
118
|
+
for (let d = 0; d < 7; d++) {
|
|
119
|
+
const y = iter.getFullYear();
|
|
120
|
+
const m = iter.getMonth();
|
|
121
|
+
const dayNum = iter.getDate();
|
|
122
|
+
const mStr = String(m + 1).padStart(2, "0");
|
|
123
|
+
const dStr = String(dayNum).padStart(2, "0");
|
|
124
|
+
const dateIso = `${y}-${mStr}-${dStr}`;
|
|
125
|
+
|
|
126
|
+
weekRow.push({
|
|
127
|
+
date: new Date(iter.getTime()),
|
|
128
|
+
dayNumber: dayNum,
|
|
129
|
+
month: m,
|
|
130
|
+
year: y,
|
|
131
|
+
dateIso,
|
|
132
|
+
isCurrentMonth: m === month,
|
|
133
|
+
isToday: dateIso === todayStr,
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
iter.setDate(iter.getDate() + 1);
|
|
137
|
+
}
|
|
138
|
+
weeks.push(weekRow);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return weeks;
|
|
142
|
+
}, [year, month, todayStr]);
|
|
143
|
+
|
|
144
|
+
const weekDayNames = useMemo(() => {
|
|
145
|
+
// Array of Mon, Tue, Wed, Thu, Fri, Sat, Sun
|
|
146
|
+
return Array.from({ length: 7 }, (_, i) => {
|
|
147
|
+
// 2026-01-05 is a Monday
|
|
148
|
+
return new Intl.DateTimeFormat(i18n.language, {
|
|
149
|
+
weekday: "short",
|
|
150
|
+
}).format(new Date(2026, 0, 5 + i));
|
|
151
|
+
});
|
|
152
|
+
}, [i18n.language]);
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<div className={cn("cu-task-calendar flex flex-col w-full", className)}>
|
|
156
|
+
{/* Calendar Navigation */}
|
|
157
|
+
<div className="cu-task-calendar-nav flex items-center justify-between gap-3 mb-3">
|
|
158
|
+
<ThemedText
|
|
159
|
+
variant="title"
|
|
160
|
+
as="h2"
|
|
161
|
+
className="text-base font-semibold text-dashboard-foreground"
|
|
162
|
+
>
|
|
163
|
+
{monthLabel}
|
|
164
|
+
</ThemedText>
|
|
165
|
+
|
|
166
|
+
<div className="flex items-center gap-1.5">
|
|
167
|
+
<Button
|
|
168
|
+
variant="outline"
|
|
169
|
+
size="xs"
|
|
170
|
+
onClick={handlePrevMonth}
|
|
171
|
+
aria-label={tr("clickup.Previous_month", {
|
|
172
|
+
defaultValue: "Previous month",
|
|
173
|
+
})}
|
|
174
|
+
className="p-1 h-7 w-7 rounded-md border-dashboard-border hover:bg-dashboard-secondary cursor-pointer"
|
|
175
|
+
>
|
|
176
|
+
<ChevronLeft className="size-3.5 rtl:rotate-180" />
|
|
177
|
+
</Button>
|
|
178
|
+
|
|
179
|
+
<Button
|
|
180
|
+
variant="outline"
|
|
181
|
+
size="xs"
|
|
182
|
+
onClick={handleNextMonth}
|
|
183
|
+
aria-label={tr("clickup.Next_month", {
|
|
184
|
+
defaultValue: "Next month",
|
|
185
|
+
})}
|
|
186
|
+
className="p-1 h-7 w-7 rounded-md border-dashboard-border hover:bg-dashboard-secondary cursor-pointer"
|
|
187
|
+
>
|
|
188
|
+
<ChevronRight className="size-3.5 rtl:rotate-180" />
|
|
189
|
+
</Button>
|
|
190
|
+
|
|
191
|
+
<Button
|
|
192
|
+
variant="ghost"
|
|
193
|
+
size="xs"
|
|
194
|
+
onClick={handleToday}
|
|
195
|
+
aria-label="Jump to current month"
|
|
196
|
+
className="text-xs text-dashboard-muted-foreground hover:text-dashboard-foreground hover:bg-dashboard-secondary px-2.5 h-7 rounded-md cursor-pointer"
|
|
197
|
+
>
|
|
198
|
+
<ThemedText as="span" variant="caption" className="text-inherit">
|
|
199
|
+
{tr("clickup.Today", { defaultValue: "Today" })}
|
|
200
|
+
</ThemedText>
|
|
201
|
+
</Button>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
{/* Calendar Grid Frame */}
|
|
206
|
+
<div className="rounded-xl border border-dashboard-border bg-dashboard-card overflow-x-auto min-w-[640px] shadow-2xs">
|
|
207
|
+
{/* Weekday Header */}
|
|
208
|
+
<div className="grid grid-cols-7 border-b border-dashboard-border bg-dashboard-secondary/40 divide-x divide-dashboard-border">
|
|
209
|
+
{weekDayNames.map((day) => (
|
|
210
|
+
<ThemedText
|
|
211
|
+
as="div"
|
|
212
|
+
variant="caption"
|
|
213
|
+
key={day}
|
|
214
|
+
className="py-2 text-center text-xs font-semibold text-dashboard-muted-foreground"
|
|
215
|
+
>
|
|
216
|
+
{day}
|
|
217
|
+
</ThemedText>
|
|
218
|
+
))}
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
{/* Week Rows */}
|
|
222
|
+
<div className="flex flex-col divide-y divide-dashboard-border">
|
|
223
|
+
{calendarWeeks.map((weekDaysList, weekIdx) => {
|
|
224
|
+
const weekStartMs = weekDaysList[0].date.getTime();
|
|
225
|
+
const weekEndMs = weekDaysList[6].date.getTime();
|
|
226
|
+
|
|
227
|
+
// Filter tasks overlapping this week
|
|
228
|
+
const weekTasks = tasks.filter((t) => {
|
|
229
|
+
const sDate = parseToMidnight(
|
|
230
|
+
t.start_date || (t as any).startDate,
|
|
231
|
+
);
|
|
232
|
+
const dDate = parseToMidnight(
|
|
233
|
+
t.due_date || (t as any).dueDate || (t as any).endDate,
|
|
234
|
+
);
|
|
235
|
+
if (!sDate && !dDate) return false;
|
|
236
|
+
|
|
237
|
+
const sMs = sDate ? sDate.getTime() : dDate!.getTime();
|
|
238
|
+
const dMs = dDate ? dDate.getTime() : sMs;
|
|
239
|
+
const minMs = Math.min(sMs, dMs);
|
|
240
|
+
const maxMs = Math.max(sMs, dMs);
|
|
241
|
+
|
|
242
|
+
return maxMs >= weekStartMs && minMs <= weekEndMs;
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
// Map tasks to columns in this week
|
|
246
|
+
const taskSpanMap: Record<
|
|
247
|
+
string,
|
|
248
|
+
{ startCol: number; endCol: number; colSpan: number }
|
|
249
|
+
> = {};
|
|
250
|
+
|
|
251
|
+
const sortedWeekTasks = weekTasks
|
|
252
|
+
.map((task) => {
|
|
253
|
+
const sDate = parseToMidnight(
|
|
254
|
+
task.start_date || (task as any).startDate,
|
|
255
|
+
);
|
|
256
|
+
const dDate = parseToMidnight(
|
|
257
|
+
task.due_date ||
|
|
258
|
+
(task as any).dueDate ||
|
|
259
|
+
(task as any).endDate,
|
|
260
|
+
);
|
|
261
|
+
const sMs = sDate ? sDate.getTime() : dDate!.getTime();
|
|
262
|
+
const dMs = dDate ? dDate.getTime() : sMs;
|
|
263
|
+
const minMs = Math.min(sMs, dMs);
|
|
264
|
+
const maxMs = Math.max(sMs, dMs);
|
|
265
|
+
|
|
266
|
+
let startCol = 0;
|
|
267
|
+
let endCol = 6;
|
|
268
|
+
|
|
269
|
+
weekDaysList.forEach((cell, colIdx) => {
|
|
270
|
+
const cellTime = cell.date.getTime();
|
|
271
|
+
if (cellTime === minMs) startCol = colIdx;
|
|
272
|
+
if (cellTime === maxMs) endCol = colIdx;
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
if (minMs < weekStartMs) startCol = 0;
|
|
276
|
+
if (maxMs > weekEndMs) endCol = 6;
|
|
277
|
+
|
|
278
|
+
const colSpan = Math.max(1, endCol - startCol + 1);
|
|
279
|
+
taskSpanMap[task.id] = { startCol, endCol, colSpan };
|
|
280
|
+
|
|
281
|
+
return { task, startCol, endCol, colSpan };
|
|
282
|
+
})
|
|
283
|
+
.sort(
|
|
284
|
+
(a, b) => a.startCol - b.startCol || b.colSpan - a.colSpan,
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
// Compute vertical non-overlapping tracks
|
|
288
|
+
const taskTrackMap: Record<string, number> = {};
|
|
289
|
+
const trackEndCols: number[] = [];
|
|
290
|
+
|
|
291
|
+
sortedWeekTasks.forEach(({ task, startCol, endCol }) => {
|
|
292
|
+
let assignedTrack = -1;
|
|
293
|
+
for (let t = 0; t < trackEndCols.length; t++) {
|
|
294
|
+
if (trackEndCols[t] < startCol) {
|
|
295
|
+
assignedTrack = t;
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (assignedTrack === -1) {
|
|
300
|
+
assignedTrack = trackEndCols.length;
|
|
301
|
+
trackEndCols.push(endCol);
|
|
302
|
+
} else {
|
|
303
|
+
trackEndCols[assignedTrack] = endCol;
|
|
304
|
+
}
|
|
305
|
+
taskTrackMap[task.id] = assignedTrack;
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
const totalTracks = Math.max(1, trackEndCols.length);
|
|
309
|
+
const rowMinHeight = Math.max(112, 34 + totalTracks * 28);
|
|
310
|
+
|
|
311
|
+
return (
|
|
312
|
+
<div
|
|
313
|
+
key={weekIdx}
|
|
314
|
+
style={{ minHeight: `${rowMinHeight}px` }}
|
|
315
|
+
className="relative grid grid-cols-7 divide-x divide-dashboard-border flex-1"
|
|
316
|
+
>
|
|
317
|
+
{/* 7 Day Cell Dropzones */}
|
|
318
|
+
{weekDaysList.map((cell) => (
|
|
319
|
+
<div
|
|
320
|
+
key={cell.dateIso}
|
|
321
|
+
onClick={() => onDayClick?.(cell.dateIso)}
|
|
322
|
+
className={cn(
|
|
323
|
+
"p-2 flex flex-col hover:bg-dashboard-secondary/20 transition-colors relative cursor-pointer select-none group",
|
|
324
|
+
!cell.isCurrentMonth &&
|
|
325
|
+
"bg-dashboard-secondary/10 opacity-50",
|
|
326
|
+
cell.isToday && "bg-dashboard-primary/5",
|
|
327
|
+
)}
|
|
328
|
+
>
|
|
329
|
+
<div className="flex items-center justify-between w-full mb-1 shrink-0">
|
|
330
|
+
<span
|
|
331
|
+
className={cn(
|
|
332
|
+
"text-[11px] font-medium leading-none px-1",
|
|
333
|
+
cell.isToday
|
|
334
|
+
? "bg-dashboard-primary text-white size-5 rounded-full flex items-center justify-center font-bold"
|
|
335
|
+
: cell.isCurrentMonth
|
|
336
|
+
? "text-dashboard-foreground"
|
|
337
|
+
: "text-dashboard-muted-foreground/60",
|
|
338
|
+
)}
|
|
339
|
+
>
|
|
340
|
+
{cell.dayNumber}
|
|
341
|
+
</span>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
))}
|
|
345
|
+
|
|
346
|
+
{/* Spanning Linked Task Bars Layer */}
|
|
347
|
+
{weekTasks.map((task) => {
|
|
348
|
+
const { startCol, colSpan } = taskSpanMap[task.id] || {
|
|
349
|
+
startCol: 0,
|
|
350
|
+
endCol: 0,
|
|
351
|
+
colSpan: 1,
|
|
352
|
+
};
|
|
353
|
+
const trackIdx = taskTrackMap[task.id] ?? 0;
|
|
354
|
+
const isCompleted =
|
|
355
|
+
task.completed ||
|
|
356
|
+
task.status?.category === "done" ||
|
|
357
|
+
task.status_id === "completed";
|
|
358
|
+
const statusColor =
|
|
359
|
+
task.status?.color || "var(--color-dashboard-primary)";
|
|
360
|
+
|
|
361
|
+
const leftPercent = (startCol / 7) * 100;
|
|
362
|
+
const widthPercent = (colSpan / 7) * 100;
|
|
363
|
+
|
|
364
|
+
return (
|
|
365
|
+
<div
|
|
366
|
+
key={task.id}
|
|
367
|
+
onClick={(e) => {
|
|
368
|
+
e.stopPropagation();
|
|
369
|
+
onTaskClick?.(task);
|
|
370
|
+
}}
|
|
371
|
+
style={{
|
|
372
|
+
left: `calc(${leftPercent}% + 4px)`,
|
|
373
|
+
width: `calc(${widthPercent}% - 8px)`,
|
|
374
|
+
top: `${28 + trackIdx * 26}px`,
|
|
375
|
+
}}
|
|
376
|
+
className={cn(
|
|
377
|
+
"absolute z-10 h-[22px] rounded-md text-xs border px-2 flex items-center justify-between cursor-pointer select-none transition-all shadow-2xs hover:shadow-md hover:border-dashboard-primary hover:z-20 group/task",
|
|
378
|
+
isCompleted
|
|
379
|
+
? "line-through opacity-70 bg-dashboard-secondary/60 text-dashboard-muted-foreground border-dashboard-border"
|
|
380
|
+
: "bg-dashboard-card text-dashboard-foreground border-dashboard-border hover:bg-dashboard-secondary/80",
|
|
381
|
+
)}
|
|
382
|
+
title={`${task.name || task.title} (${colSpan > 1 ? `${colSpan} days` : "1 day"})`}
|
|
383
|
+
>
|
|
384
|
+
<div className="flex items-center gap-1.5 min-w-0 flex-1 overflow-hidden">
|
|
385
|
+
<span
|
|
386
|
+
className="size-1.5 rounded-full shrink-0"
|
|
387
|
+
style={{ backgroundColor: statusColor }}
|
|
388
|
+
/>
|
|
389
|
+
<span className="truncate text-dashboard-foreground font-medium text-[11px] leading-tight">
|
|
390
|
+
{task.name || task.title}
|
|
391
|
+
</span>
|
|
392
|
+
</div>
|
|
393
|
+
{colSpan > 1 && (
|
|
394
|
+
<span className="text-[10px] text-dashboard-muted-foreground shrink-0 ms-1 opacity-80 font-normal">
|
|
395
|
+
{colSpan}d
|
|
396
|
+
</span>
|
|
397
|
+
)}
|
|
398
|
+
</div>
|
|
399
|
+
);
|
|
400
|
+
})}
|
|
401
|
+
</div>
|
|
402
|
+
);
|
|
403
|
+
})}
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
);
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export default TaskCalendarView;
|