@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,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../support/utils.js";
|
|
3
|
+
import { useDroppable } from "@dnd-kit/core";
|
|
4
|
+
import { SortableContext, verticalListSortingStrategy, } from "@dnd-kit/sortable";
|
|
5
|
+
import { ChevronLeft, ChevronRight, Plus, } from "lucide-react";
|
|
6
|
+
import { motion } from "motion/react";
|
|
7
|
+
import { SortableKanbanCard } from "./KanbanCard.js";
|
|
8
|
+
export function KanbanColumn({ column, items, isCollapsed, onToggleCollapse, allowColumnCollapse = true, showItemCount = true, onAddCard, renderCard, renderColumnHeader, onCardClick, allowDragAndDrop = true, emptyPlaceholder, columnWidth = 320, columnClassName, }) {
|
|
9
|
+
const { setNodeRef, isOver } = useDroppable({
|
|
10
|
+
id: column.id,
|
|
11
|
+
data: {
|
|
12
|
+
type: "Column",
|
|
13
|
+
columnId: column.id,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
const Icon = column.icon;
|
|
17
|
+
const toggleCollapse = () => onToggleCollapse(column.id);
|
|
18
|
+
// Collapsed View
|
|
19
|
+
if (isCollapsed) {
|
|
20
|
+
return (_jsxs(motion.div, { layout: true, initial: { width: 48, opacity: 0.8 }, animate: { width: 48, opacity: 1 }, exit: { width: 0, opacity: 0 }, transition: { duration: 0.25, ease: "easeInOut" }, ref: setNodeRef, onClick: toggleCollapse, role: "region", "aria-label": `${column.title} column (collapsed)`, className: cn("shrink-0 h-full flex flex-col items-center py-3 select-none rounded-xl border transition-colors cursor-pointer group relative overflow-hidden", isOver
|
|
21
|
+
? "bg-dashboard-primary/10 border-dashboard-primary/70 ring-1 ring-dashboard-primary/30"
|
|
22
|
+
: "bg-dashboard-card/60 hover:bg-dashboard-secondary border-dashboard-border", columnClassName), children: [allowColumnCollapse && (_jsx("button", { type: "button", "aria-label": `Expand ${column.title} column`, onClick: (e) => {
|
|
23
|
+
e.stopPropagation();
|
|
24
|
+
toggleCollapse();
|
|
25
|
+
}, className: "w-7 h-7 rounded-lg flex items-center justify-center text-dashboard-muted-foreground hover:text-dashboard-foreground hover:bg-dashboard-card transition-colors mb-4 cursor-pointer", children: _jsx(ChevronRight, { className: "w-3.5 h-3.5" }) })), Icon && (_jsx("div", { className: "mb-3 text-dashboard-muted-foreground group-hover:text-dashboard-foreground transition-colors", children: _jsx(Icon, { className: "w-4 h-4" }) })), _jsx("div", { className: "flex-1 flex items-center justify-center py-2 overflow-hidden", children: _jsx("span", { className: "[writing-mode:vertical-rl] rotate-180 text-xs font-semibold tracking-wider text-dashboard-foreground/80 group-hover:text-dashboard-foreground whitespace-nowrap transition-colors", children: column.title }) }), showItemCount && (_jsx("span", { className: "mt-auto px-1.5 py-0.5 rounded-full text-[10px] font-bold bg-dashboard-secondary text-dashboard-muted-foreground border border-dashboard-border shrink-0", children: items.length }))] }));
|
|
26
|
+
}
|
|
27
|
+
// Expanded View
|
|
28
|
+
return (_jsxs(motion.div, { layout: true, initial: { width: columnWidth, opacity: 0.8 }, animate: { width: columnWidth, opacity: 1 }, exit: { width: 0, opacity: 0 }, transition: { duration: 0.25, ease: "easeInOut" }, className: cn("shrink-0 h-full flex flex-col rounded-xl border border-dashboard-border bg-dashboard-card/40 overflow-hidden", isOver && "ring-1 ring-dashboard-primary/40 border-dashboard-primary/50", columnClassName), style: { width: typeof columnWidth === "number" ? `${columnWidth}px` : columnWidth }, children: [renderColumnHeader ? (renderColumnHeader(column, isCollapsed, toggleCollapse, items.length)) : (_jsxs("div", { className: "px-3.5 py-3 border-b border-dashboard-border bg-dashboard-card flex items-center justify-between gap-2 shrink-0", children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [Icon && (_jsx("div", { className: "text-dashboard-primary shrink-0", children: _jsx(Icon, { className: "w-4 h-4" }) })), _jsx("h3", { className: "text-xs font-semibold text-dashboard-foreground truncate", children: column.title }), showItemCount && (_jsxs("span", { className: "inline-flex items-center px-1.5 py-0.2 rounded-full text-[10px] font-semibold bg-dashboard-secondary text-dashboard-muted-foreground border border-dashboard-border shrink-0", children: [items.length, column.limit ? ` / ${column.limit}` : ""] }))] }), _jsxs("div", { className: "flex items-center gap-1 shrink-0", children: [column.headerAction, onAddCard && (_jsx("button", { type: "button", "aria-label": `Add item to ${column.title}`, onClick: () => onAddCard(column.id), className: "w-6 h-6 rounded-md flex items-center justify-center text-dashboard-muted-foreground hover:text-dashboard-foreground hover:bg-dashboard-secondary transition-colors cursor-pointer", children: _jsx(Plus, { className: "w-3.5 h-3.5" }) })), allowColumnCollapse && (_jsx("button", { type: "button", "aria-label": `Collapse ${column.title} column`, onClick: toggleCollapse, className: "w-6 h-6 rounded-md flex items-center justify-center text-dashboard-muted-foreground hover:text-dashboard-foreground hover:bg-dashboard-secondary transition-colors cursor-pointer", children: _jsx(ChevronLeft, { className: "w-3.5 h-3.5" }) }))] })] })), _jsxs("div", { ref: setNodeRef, className: cn("flex-1 overflow-y-auto p-3 space-y-2.5 transition-colors", isOver && "bg-dashboard-secondary/30"), children: [_jsx(SortableContext, { items: items.map((item) => item.id.toString()), strategy: verticalListSortingStrategy, children: items.map((item) => (_jsx(SortableKanbanCard, { item: item, renderCard: renderCard, onCardClick: onCardClick, allowDragAndDrop: allowDragAndDrop }, item.id))) }), items.length === 0 && (_jsx("div", { className: "h-28 flex flex-col items-center justify-center rounded-lg border border-dashed border-dashboard-border/80 text-dashboard-muted-foreground/60 p-4 text-center", children: emptyPlaceholder ? (emptyPlaceholder(column)) : (_jsx("span", { className: "text-[11px] select-none", children: allowDragAndDrop ? "Drop cards here" : "No items" })) })), onAddCard && (_jsxs("button", { type: "button", onClick: () => onAddCard(column.id), className: "w-full py-2 px-2.5 rounded-lg border border-transparent hover:border-dashboard-border hover:bg-dashboard-secondary text-dashboard-muted-foreground hover:text-dashboard-foreground text-xs font-medium flex items-center justify-center gap-1.5 transition-all cursor-pointer mt-2", children: [_jsx(Plus, { className: "w-3.5 h-3.5" }), _jsx("span", { children: "Add card" })] }))] })] }));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=KanbanColumn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KanbanColumn.js","sourceRoot":"","sources":["../../../../src/components/layout/kanban/KanbanColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACH,eAAe,EACf,2BAA2B,GAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,WAAW,EACX,YAAY,EACZ,IAAI,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAyBlD,MAAM,UAAU,YAAY,CAA8C,EACtE,MAAM,EACN,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,mBAAmB,GAAG,IAAI,EAC1B,aAAa,GAAG,IAAI,EACpB,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,gBAAgB,GAAG,IAAI,EACvB,gBAAgB,EAChB,WAAW,GAAG,GAAG,EACjB,eAAe,GACQ;IACvB,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC;QACxC,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,MAAM,CAAC,EAAE;SACtB;KACJ,CAAC,CAAC;IAEH,MAAM,IAAI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gBAAgB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,UAAU,GAC/C,CACV,GACC,CACT,EAGA,SAAS,IAAI,CACV,kBACI,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EACnC,SAAS,EAAC,oRAAoR,aAE9R,KAAC,IAAI,IAAC,SAAS,EAAC,aAAa,GAAG,EAChC,sCAAqB,IAChB,CACZ,IACC,IACG,CAChB,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface KanbanToolbarProps {
|
|
3
|
+
totalItems: number;
|
|
4
|
+
columnsCount: number;
|
|
5
|
+
allCollapsed: boolean;
|
|
6
|
+
onToggleCollapseAll: () => void;
|
|
7
|
+
allowCollapseAll?: boolean;
|
|
8
|
+
toolbarExtra?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function KanbanToolbar({ totalItems, columnsCount, allCollapsed, onToggleCollapseAll, allowCollapseAll, toolbarExtra, className, }: KanbanToolbarProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../support/utils.js";
|
|
3
|
+
import { FoldHorizontal, UnfoldHorizontal, } from "lucide-react";
|
|
4
|
+
export function KanbanToolbar({ totalItems, columnsCount, allCollapsed, onToggleCollapseAll, allowCollapseAll = true, toolbarExtra, className, }) {
|
|
5
|
+
if (!allowCollapseAll && !toolbarExtra) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
return (_jsxs("div", { className: cn("flex items-center justify-between gap-3 px-4 py-2 border-b border-dashboard-border bg-dashboard-card/50 text-xs text-dashboard-muted-foreground shrink-0", className), children: [_jsxs("div", { className: "flex items-center gap-3", children: [allowCollapseAll && (_jsx("button", { type: "button", onClick: onToggleCollapseAll, "aria-label": allCollapsed ? "Expand all columns" : "Collapse all columns", className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-dashboard-card hover:bg-dashboard-secondary text-dashboard-muted-foreground hover:text-dashboard-foreground border border-dashboard-border transition-colors text-xs font-medium cursor-pointer shadow-2xs", children: allCollapsed ? (_jsxs(_Fragment, { children: [_jsx(UnfoldHorizontal, { className: "w-3.5 h-3.5 text-dashboard-primary" }), _jsx("span", { children: "Expand All" })] })) : (_jsxs(_Fragment, { children: [_jsx(FoldHorizontal, { className: "w-3.5 h-3.5 text-dashboard-primary" }), _jsx("span", { children: "Collapse All" })] })) })), _jsxs("span", { className: "text-[11px] text-dashboard-muted-foreground", children: [_jsx("span", { className: "font-semibold text-dashboard-foreground", children: totalItems }), " ", totalItems === 1 ? "item" : "items", " across", " ", _jsx("span", { className: "font-semibold text-dashboard-foreground", children: columnsCount }), " ", "columns"] })] }), toolbarExtra && (_jsx("div", { className: "flex items-center gap-2", children: toolbarExtra }))] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=KanbanToolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KanbanToolbar.js","sourceRoot":"","sources":["../../../../src/components/layout/kanban/KanbanToolbar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAGH,cAAc,EACd,gBAAgB,GACnB,MAAM,cAAc,CAAC;AAatB,MAAM,UAAU,aAAa,CAAC,EAC1B,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,GAAG,IAAI,EACvB,YAAY,EACZ,SAAS,GACQ;IACjB,IAAI,CAAC,gBAAgB,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,eACI,SAAS,EAAE,EAAE,CACT,0JAA0J,EAC1J,SAAS,CACZ,aAED,eAAK,SAAS,EAAC,yBAAyB,aACnC,gBAAgB,IAAI,CACjB,iBACI,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,mBAAmB,gBAChB,YAAY,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,EACxE,SAAS,EAAC,uQAAuQ,YAEhR,YAAY,CAAC,CAAC,CAAC,CACZ,8BACI,KAAC,gBAAgB,IAAC,SAAS,EAAC,oCAAoC,GAAG,EACnE,wCAAuB,IACxB,CACN,CAAC,CAAC,CAAC,CACA,8BACI,KAAC,cAAc,IAAC,SAAS,EAAC,oCAAoC,GAAG,EACjE,0CAAyB,IAC1B,CACN,GACI,CACZ,EAED,gBAAM,SAAS,EAAC,6CAA6C,aACzD,eAAM,SAAS,EAAC,yCAAyC,YAAE,UAAU,GAAQ,EAAC,GAAG,EAChF,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,aAAS,GAAG,EAChD,eAAM,SAAS,EAAC,yCAAyC,YAAE,YAAY,GAAQ,EAAC,GAAG,eAEhF,IACL,EAEL,YAAY,IAAI,CACb,cAAK,SAAS,EAAC,yBAAyB,YACnC,YAAY,GACX,CACT,IACC,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./KanbanCard.js";
|
|
3
|
+
export * from "./KanbanColumn.js";
|
|
4
|
+
export * from "./KanbanToolbar.js";
|
|
5
|
+
export * from "./FeatureLayoutKanban.js";
|
|
6
|
+
export { FeatureLayoutKanban as KanbanBoard } from "./FeatureLayoutKanban.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/kanban/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,mBAAmB,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { StatusBadgeVariant } from "../../../index";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export interface KanbanColumnDef<TItem = any> {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
badgeVariant?: StatusBadgeVariant;
|
|
7
|
+
icon?: React.ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
limit?: number;
|
|
11
|
+
headerAction?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export interface KanbanItemMoveEvent<TItem = any> {
|
|
14
|
+
itemId: string | number;
|
|
15
|
+
item: TItem;
|
|
16
|
+
sourceColumnId: string;
|
|
17
|
+
targetColumnId: string;
|
|
18
|
+
oldIndex: number;
|
|
19
|
+
newIndex: number;
|
|
20
|
+
}
|
|
21
|
+
export interface FeatureLayoutKanbanProps<TItem extends {
|
|
22
|
+
id: string | number;
|
|
23
|
+
} = any> {
|
|
24
|
+
/** The dataset of items to display on the board */
|
|
25
|
+
items: TItem[];
|
|
26
|
+
/** Explicit column definitions */
|
|
27
|
+
columns: KanbanColumnDef<TItem>[];
|
|
28
|
+
/** Extract the column ID for an item (e.g. item => item.status). Defaults to item.status */
|
|
29
|
+
getItemColumnId?: (item: TItem) => string;
|
|
30
|
+
/** Callback invoked when an item moves across columns or within a column */
|
|
31
|
+
onItemMove?: (event: KanbanItemMoveEvent<TItem>) => void;
|
|
32
|
+
/** Simple callback when an item's status / column changes via drag-and-drop */
|
|
33
|
+
onItemStatusChange?: (itemId: string | number, newColumnId: string, item: TItem) => void;
|
|
34
|
+
/** Custom renderer for an item card */
|
|
35
|
+
renderCard?: (item: TItem, isDragging?: boolean) => React.ReactNode;
|
|
36
|
+
/** Custom column header renderer */
|
|
37
|
+
renderColumnHeader?: (column: KanbanColumnDef<TItem>, isCollapsed: boolean, toggleCollapse: () => void, itemCount: number) => React.ReactNode;
|
|
38
|
+
/** Click handler when a card is clicked */
|
|
39
|
+
onCardClick?: (item: TItem) => void;
|
|
40
|
+
/** Callback when user clicks "+ Add" in a column */
|
|
41
|
+
onAddCard?: (columnId: string) => void;
|
|
42
|
+
/** FLAG PROP: Enable / disable individual column collapse/expand. Default: true */
|
|
43
|
+
allowColumnCollapse?: boolean;
|
|
44
|
+
/** FLAG PROP: Enable / disable button for horizontally collapse/expand all columns. Default: true */
|
|
45
|
+
allowCollapseAll?: boolean;
|
|
46
|
+
/** FLAG PROP: Show or hide item count badge on column headers. Default: true */
|
|
47
|
+
showItemCount?: boolean;
|
|
48
|
+
/** FLAG PROP: Enable or disable drag-and-drop. Default: true */
|
|
49
|
+
allowDragAndDrop?: boolean;
|
|
50
|
+
/** Controlled collapsed column IDs */
|
|
51
|
+
collapsedColumns?: string[];
|
|
52
|
+
/** Callback when collapsed columns change */
|
|
53
|
+
onCollapsedColumnsChange?: (collapsedIds: string[]) => void;
|
|
54
|
+
/** Loading state */
|
|
55
|
+
isLoading?: boolean;
|
|
56
|
+
/** Optional empty placeholder for a column */
|
|
57
|
+
emptyPlaceholder?: (column: KanbanColumnDef<TItem>) => React.ReactNode;
|
|
58
|
+
/** Extra content to render in the Kanban top toolbar */
|
|
59
|
+
toolbarExtra?: React.ReactNode;
|
|
60
|
+
/** Optional footer (e.g. pagination controls) rendered at the bottom of the Kanban board */
|
|
61
|
+
footer?: React.ReactNode;
|
|
62
|
+
/** Class name overrides */
|
|
63
|
+
className?: string;
|
|
64
|
+
columnsContainerClassName?: string;
|
|
65
|
+
columnClassName?: string;
|
|
66
|
+
columnWidth?: number | string;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/layout/kanban/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
2
|
+
declare function Popover({ ...props }: PopoverPrimitive.Root.Props): import("react").JSX.Element;
|
|
3
|
+
declare function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
4
|
+
declare function PopoverPortal({ ...props }: PopoverPrimitive.Portal.Props): import("react").JSX.Element;
|
|
5
|
+
declare function PopoverPositioner({ className, ...props }: PopoverPrimitive.Positioner.Props): import("react").JSX.Element;
|
|
6
|
+
declare function PopoverContent({ className, align, side, sideOffset, ...props }: PopoverPrimitive.Popup.Props & {
|
|
7
|
+
align?: any;
|
|
8
|
+
side?: any;
|
|
9
|
+
sideOffset?: number;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export { Popover, PopoverContent, PopoverPortal, PopoverPositioner, PopoverTrigger, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../support/utils.js";
|
|
3
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
4
|
+
function Popover({ ...props }) {
|
|
5
|
+
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
6
|
+
}
|
|
7
|
+
function PopoverTrigger({ ...props }) {
|
|
8
|
+
return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
9
|
+
}
|
|
10
|
+
function PopoverPortal({ ...props }) {
|
|
11
|
+
return _jsx(PopoverPrimitive.Portal, { "data-slot": "popover-portal", ...props });
|
|
12
|
+
}
|
|
13
|
+
function PopoverPositioner({ className, ...props }) {
|
|
14
|
+
return (_jsx(PopoverPrimitive.Positioner, { "data-slot": "popover-positioner", className: cn("z-[99999]", className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
function PopoverContent({ className, align = "center", side = "bottom", sideOffset = 4, ...props }) {
|
|
17
|
+
return (_jsx(PopoverPortal, { children: _jsx(PopoverPositioner, { align: align, side: side, sideOffset: sideOffset, children: _jsx(PopoverPrimitive.Popup, { "data-slot": "popover-content", className: cn("z-[99999] w-auto rounded-xl bg-dashboard-card p-2 text-dashboard-foreground shadow-2xl border border-dashboard-border backdrop-blur-md outline-none duration-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", className), ...props }) }) }));
|
|
18
|
+
}
|
|
19
|
+
export { Popover, PopoverContent, PopoverPortal, PopoverPositioner, PopoverTrigger, };
|
|
20
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAErE,SAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAA+B;IACtD,OAAO,KAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,KAAK,KAAK,GAAI,CAAC;AACpE,CAAC;AAED,SAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAkC;IAChE,OAAO,KAAC,gBAAgB,CAAC,OAAO,iBAAW,iBAAiB,KAAK,KAAK,GAAI,CAAC;AAC/E,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAiC;IAC9D,OAAO,KAAC,gBAAgB,CAAC,MAAM,iBAAW,gBAAgB,KAAK,KAAK,GAAI,CAAC;AAC7E,CAAC;AAED,SAAS,iBAAiB,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACwB;IAChC,OAAO,CACH,KAAC,gBAAgB,CAAC,UAAU,iBACd,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,KACjC,KAAK,GACX,CACL,CAAC;AACN,CAAC;AAED,SAAS,cAAc,CAAC,EACpB,SAAS,EACT,KAAK,GAAG,QAAQ,EAChB,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,CAAC,EACd,GAAG,KAAK,EAKX;IACG,OAAO,CACH,KAAC,aAAa,cACV,KAAC,iBAAiB,IACd,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,YAEtB,KAAC,gBAAgB,CAAC,KAAK,iBACT,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CACT,uVAAuV,EACvV,SAAS,CACZ,KACG,KAAK,GACX,GACc,GACR,CACnB,CAAC;AACN,CAAC;AAED,OAAO,EACH,OAAO,EACP,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,cAAc,GACjB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../support/utils.js";
|
|
3
|
+
import { ArrowLeft } from "lucide-react";
|
|
4
|
+
export function FlowGraphHeader({ show = true, backButton, title, badge, actions = [], children, className, }) {
|
|
5
|
+
if (!show)
|
|
6
|
+
return null;
|
|
7
|
+
const showBackButton = backButton?.show !== false && !!backButton?.onClick;
|
|
8
|
+
return (_jsxs("div", { className: cn("absolute top-4 left-4 z-10 flex items-center gap-4", className), children: [showBackButton && (_jsx("button", { type: "button", onClick: backButton.onClick, "aria-label": "Go back", className: "flex items-center justify-center w-10 h-10 rounded-full bg-dashboard-card border border-dashboard-border shadow-lg hover:bg-dashboard-secondary transition-colors text-dashboard-muted-foreground hover:text-dashboard-foreground cursor-pointer", children: _jsx(ArrowLeft, { size: 18 }) })), (title || badge) && (_jsxs("div", { className: "bg-dashboard-card/95 backdrop-blur-md border border-dashboard-border shadow-md px-4 py-2 rounded-2xl flex items-center gap-3", children: [title && (_jsx("span", { className: "font-bold text-dashboard-foreground text-sm", children: title })), badge && (_jsx("span", { className: "text-xs text-dashboard-muted-foreground", children: badge }))] })), actions.map((action) => (_jsxs("button", { onClick: action.onClick, className: cn("flex items-center justify-center gap-1.5 h-9 px-4 rounded-2xl bg-dashboard-card/95 backdrop-blur-md border border-dashboard-border shadow-md hover:bg-dashboard-secondary transition-all text-dashboard-foreground text-xs font-semibold cursor-pointer", action.className), children: [action.icon, _jsx("span", { children: action.label })] }, action.id))), children] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=FlowGraphHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowGraphHeader.js","sourceRoot":"","sources":["../../../src/components/react-flow/FlowGraphHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,MAAM,UAAU,eAAe,CAAC,EAC5B,IAAI,GAAG,IAAI,EACX,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,GAAG,EAAE,EACZ,QAAQ,EACR,SAAS,GACW;IACpB,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,cAAc,GAAG,UAAU,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC;IAE3E,OAAO,CACH,eACI,SAAS,EAAE,EAAE,CACT,oDAAoD,EACpD,SAAS,CACZ,aAEA,cAAc,IAAI,CACf,iBACI,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,UAAU,CAAC,OAAO,gBAChB,SAAS,EACpB,SAAS,EAAC,kPAAkP,YAE5P,KAAC,SAAS,IAAC,IAAI,EAAE,EAAE,GAAI,GAClB,CACZ,EAEA,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,CACjB,eAAK,SAAS,EAAC,8HAA8H,aACxI,KAAK,IAAI,CACN,eAAM,SAAS,EAAC,6CAA6C,YACxD,KAAK,GACH,CACV,EACA,KAAK,IAAI,CACN,eAAM,SAAS,EAAC,yCAAyC,YACpD,KAAK,GACH,CACV,IACC,CACT,EAEA,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACrB,kBAEI,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,SAAS,EAAE,EAAE,CACT,yPAAyP,EACzP,MAAM,CAAC,SAAS,CACnB,aAEA,MAAM,CAAC,IAAI,EACZ,yBAAO,MAAM,CAAC,KAAK,GAAQ,KARtB,MAAM,CAAC,EAAE,CAST,CACZ,CAAC,EAED,QAAQ,IACP,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, } from "../../index.js";
|
|
3
|
+
import { useLanguage } from "@gostack-framework/react";
|
|
4
|
+
import { EdgeLabelRenderer, getBezierPath, useReactFlow, } from "@xyflow/react";
|
|
5
|
+
import { Unlink } from "lucide-react";
|
|
6
|
+
import { useContext, useState } from "react";
|
|
7
|
+
import { FlowEventsContext } from "./ReactFlowCanvas.js";
|
|
8
|
+
export function GlowEdge({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style = {}, markerEnd, data, }) {
|
|
9
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
10
|
+
const [isConfirmOpen, setIsConfirmOpen] = useState(false);
|
|
11
|
+
const [buttonPos, setButtonPos] = useState(null);
|
|
12
|
+
const { screenToFlowPosition } = useReactFlow();
|
|
13
|
+
const events = useContext(FlowEventsContext);
|
|
14
|
+
const edgeData = data;
|
|
15
|
+
const { t } = useLanguage("shared");
|
|
16
|
+
const defaultTooltip = edgeData?.isClassificationLink
|
|
17
|
+
? t("deleteClassification", "Delete Classification")
|
|
18
|
+
: edgeData?.isTeamLink
|
|
19
|
+
? t("unlinkTeam", "Unlink Team")
|
|
20
|
+
: t("unlinkConnection", "Unlink Connection");
|
|
21
|
+
const tooltipText = edgeData?.tooltip || defaultTooltip;
|
|
22
|
+
const defaultConfirmTitle = edgeData?.isClassificationLink
|
|
23
|
+
? t("deleteClassification", "Delete Classification")
|
|
24
|
+
: t("unlinkTeamAssignment", "Unlink Team Assignment");
|
|
25
|
+
const confirmTitle = edgeData?.confirmTitle || defaultConfirmTitle;
|
|
26
|
+
const defaultConfirmDescription = edgeData?.isClassificationLink
|
|
27
|
+
? t("deleteClassificationConfirm", "Are you sure you want to delete this classification? This will permanently delete the classification and all its children. This action cannot be undone.")
|
|
28
|
+
: t("unlinkTeamConfirm", "Are you sure you want to remove this team assignment?");
|
|
29
|
+
const confirmDescription = edgeData?.confirmDescription || defaultConfirmDescription;
|
|
30
|
+
const defaultConfirmText = edgeData?.isClassificationLink
|
|
31
|
+
? t("delete", "Delete")
|
|
32
|
+
: t("unlink", "Unlink");
|
|
33
|
+
const confirmText = edgeData?.confirmText || defaultConfirmText;
|
|
34
|
+
const defaultCancelText = t("cancel", "Cancel");
|
|
35
|
+
const cancelText = edgeData?.cancelText || defaultCancelText;
|
|
36
|
+
const [edgePath, labelX, labelY] = getBezierPath({
|
|
37
|
+
sourceX,
|
|
38
|
+
sourceY,
|
|
39
|
+
sourcePosition,
|
|
40
|
+
targetX,
|
|
41
|
+
targetY,
|
|
42
|
+
targetPosition,
|
|
43
|
+
});
|
|
44
|
+
const handleMouseEnter = (event) => {
|
|
45
|
+
if (isConfirmOpen)
|
|
46
|
+
return;
|
|
47
|
+
const flowPos = screenToFlowPosition({
|
|
48
|
+
x: event.clientX,
|
|
49
|
+
y: event.clientY,
|
|
50
|
+
});
|
|
51
|
+
setButtonPos(flowPos);
|
|
52
|
+
setIsHovered(true);
|
|
53
|
+
};
|
|
54
|
+
const handleMouseLeave = () => {
|
|
55
|
+
if (isConfirmOpen)
|
|
56
|
+
return;
|
|
57
|
+
setIsHovered(false);
|
|
58
|
+
};
|
|
59
|
+
const onUnlink = (event) => {
|
|
60
|
+
event.stopPropagation();
|
|
61
|
+
if (edgeData?.isTeamLink || edgeData?.isClassificationLink) {
|
|
62
|
+
setIsConfirmOpen(true);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
if (events?.onEdgesChange) {
|
|
66
|
+
events.onEdgesChange([{ id, type: "remove" }]);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const posX = buttonPos?.x ?? labelX;
|
|
71
|
+
const posY = buttonPos?.y ?? labelY;
|
|
72
|
+
return (_jsxs(_Fragment, { children: [isHovered && (_jsx("path", { d: edgePath, fill: "none", stroke: style.stroke || "var(--color-dashboard-primary)", strokeWidth: (Number(style.strokeWidth) || 2) + 6, className: "transition-opacity duration-300 opacity-40 animate-pulse", style: {
|
|
73
|
+
filter: `drop-shadow(0 0 6px ${style.stroke || "var(--color-dashboard-primary)"})`,
|
|
74
|
+
} })), _jsx("path", { id: id, d: edgePath, fill: "none", stroke: style.stroke || "var(--color-dashboard-primary)", strokeWidth: isHovered
|
|
75
|
+
? (Number(style.strokeWidth) || 2) + 1
|
|
76
|
+
: style.strokeWidth || 2, className: "transition-opacity duration-300", style: {
|
|
77
|
+
...style,
|
|
78
|
+
opacity: isHovered ? 1 : 0.7,
|
|
79
|
+
strokeDasharray: isHovered ? "5" : "none",
|
|
80
|
+
animation: isHovered
|
|
81
|
+
? "react-flow__dashdelay 0.6s linear infinite"
|
|
82
|
+
: "none",
|
|
83
|
+
}, markerEnd: markerEnd }), _jsx("path", { d: edgePath, fill: "none", stroke: "transparent", strokeWidth: 16, className: "cursor-pointer", onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }), isHovered && (_jsx(EdgeLabelRenderer, { children: _jsxs("div", { style: {
|
|
84
|
+
position: "absolute",
|
|
85
|
+
transform: `translate(-50%, -50%) translate(${posX}px, ${posY}px)`,
|
|
86
|
+
pointerEvents: "all",
|
|
87
|
+
}, className: "nodrag nopan flex flex-col items-center gap-1.5 z-50 animate-in fade-in zoom-in-95 duration-150", onMouseEnter: () => setIsHovered(true), onMouseLeave: handleMouseLeave, children: [_jsx("div", { className: "bg-dashboard-card text-dashboard-foreground text-[11px] font-semibold px-2.5 py-1 rounded-xl border border-dashboard-border shadow-xl whitespace-nowrap leading-tight text-center pointer-events-none", children: tooltipText }), _jsx("button", { type: "button", onClick: onUnlink, className: "w-5 h-5 rounded-full bg-dashboard-destructive hover:bg-dashboard-destructive/90 text-white flex items-center justify-center shadow-lg border border-dashboard-border transition-all duration-200 hover:scale-110 active:scale-95 cursor-pointer", title: tooltipText, "aria-label": tooltipText, children: _jsx(Unlink, { className: "size-2.5 stroke-[2.5]" }) })] }) })), (edgeData?.isTeamLink || edgeData?.isClassificationLink) && (_jsx(Dialog, { open: isConfirmOpen, onOpenChange: setIsConfirmOpen, children: _jsxs(DialogContent, { className: "sm:max-w-md bg-dashboard-background border-dashboard-border text-dashboard-foreground", children: [_jsx(DialogHeader, { className: "pb-4 border-b border-dashboard-border", children: _jsx(DialogTitle, { className: "text-dashboard-foreground", children: confirmTitle }) }), _jsx("div", { className: "py-4 text-sm text-dashboard-muted-foreground", children: confirmDescription }), _jsxs(DialogFooter, { className: "pt-4 border-t border-dashboard-border gap-2", children: [_jsx(Button, { variant: "outline", onClick: () => setIsConfirmOpen(false), children: cancelText }), _jsx(Button, { onClick: () => {
|
|
88
|
+
setIsConfirmOpen(false);
|
|
89
|
+
setIsHovered(false); // Reset hover state
|
|
90
|
+
if (edgeData.isTeamLink &&
|
|
91
|
+
edgeData.onUnlink) {
|
|
92
|
+
edgeData.onUnlink();
|
|
93
|
+
}
|
|
94
|
+
else if (edgeData.isClassificationLink &&
|
|
95
|
+
edgeData.onDelete) {
|
|
96
|
+
edgeData.onDelete();
|
|
97
|
+
}
|
|
98
|
+
}, className: "bg-dashboard-destructive hover:bg-dashboard-destructive/90 text-white border-0", children: confirmText })] })] }) }))] }));
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=GlowEdge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlowEdge.js","sourceRoot":"","sources":["../../../src/components/react-flow/GlowEdge.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,MAAM,EACN,MAAM,EACN,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACH,iBAAiB,EACjB,aAAa,EACb,YAAY,GAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,UAAU,QAAQ,CAAC,EACrB,EAAE,EACF,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,KAAK,GAAG,EAAE,EACV,SAAS,EACT,IAAI,GACI;IACR,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CACtC,IAAI,CACP,CAAC;IAEF,MAAM,EAAE,oBAAoB,EAAE,GAAG,YAAY,EAAE,CAAC;IAChD,MAAM,MAAM,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,IAAW,CAAC;IAE7B,MAAM,EAAE,CAAC,EAAE,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEpC,MAAM,cAAc,GAAG,QAAQ,EAAE,oBAAoB;QACjD,CAAC,CAAC,CAAC,CAAC,sBAAsB,E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from "@xyflow/react";
|
|
2
|
+
import "@xyflow/react/dist/style.css";
|
|
3
|
+
import type { RelationshipFlowProps } from "./types";
|
|
4
|
+
export declare const FlowEventsContext: import("react").Context<{
|
|
5
|
+
onEdgesChange?: OnEdgesChange;
|
|
6
|
+
} | null>;
|
|
7
|
+
export declare function ReactFlowCanvas(props: Omit<RelationshipFlowProps, "header" | "className">): import("react").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../support/utils.js";
|
|
3
|
+
import { Background, Controls, MiniMap, ReactFlow, ReactFlowProvider, useReactFlow, } from "@xyflow/react";
|
|
4
|
+
import "@xyflow/react/dist/style.css";
|
|
5
|
+
import { createContext, useEffect } from "react";
|
|
6
|
+
import { GlowEdge } from "./GlowEdge.js";
|
|
7
|
+
export const FlowEventsContext = createContext(null);
|
|
8
|
+
const edgeTypes = {
|
|
9
|
+
glow: GlowEdge,
|
|
10
|
+
};
|
|
11
|
+
const DEFAULT_UI = {
|
|
12
|
+
showBackground: true,
|
|
13
|
+
showControls: true,
|
|
14
|
+
showMiniMap: true,
|
|
15
|
+
fitView: true,
|
|
16
|
+
background: {
|
|
17
|
+
color: "var(--color-dashboard-border)",
|
|
18
|
+
gap: 24,
|
|
19
|
+
size: 2,
|
|
20
|
+
},
|
|
21
|
+
controlsClassName: "bg-dashboard-card border border-dashboard-border rounded-lg overflow-hidden",
|
|
22
|
+
miniMapClassName: "bg-dashboard-card border border-dashboard-border rounded-lg overflow-hidden",
|
|
23
|
+
nodeColor: "var(--color-dashboard-primary)",
|
|
24
|
+
maskColor: "var(--color-dashboard-background)",
|
|
25
|
+
};
|
|
26
|
+
function ReactFlowCanvasInner({ nodes, edges, onNodesChange, onEdgesChange, onConnect, nodeTypes, ui, canvasClassName, children, renderNodes, }) {
|
|
27
|
+
const config = { ...DEFAULT_UI, ...ui };
|
|
28
|
+
const renderedNodes = renderNodes ? renderNodes(nodes) : nodes;
|
|
29
|
+
const { fitView } = useReactFlow();
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const handleFit = () => {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
fitView({ duration: 400, padding: 0.2 });
|
|
34
|
+
}, 100);
|
|
35
|
+
};
|
|
36
|
+
window.addEventListener("reactflow-fitview", handleFit);
|
|
37
|
+
return () => window.removeEventListener("reactflow-fitview", handleFit);
|
|
38
|
+
}, [fitView]);
|
|
39
|
+
return (_jsx(FlowEventsContext.Provider, { value: { onEdgesChange }, children: _jsxs(ReactFlow, { nodes: renderedNodes, edges: edges, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, onConnect: onConnect, nodeTypes: nodeTypes, edgeTypes: edgeTypes, fitView: config.fitView, className: cn("bg-dashboard-background", canvasClassName), children: [config.showBackground && (_jsx(Background, { color: config.background?.color, gap: config.background?.gap, size: config.background?.size })), config.showControls && (_jsx(Controls, { className: config.controlsClassName })), config.showMiniMap && (_jsx(MiniMap, { nodeColor: config.nodeColor, maskColor: config.maskColor, className: config.miniMapClassName })), children] }) }));
|
|
40
|
+
}
|
|
41
|
+
export function ReactFlowCanvas(props) {
|
|
42
|
+
return (_jsx(ReactFlowProvider, { children: _jsx(ReactFlowCanvasInner, { ...props }) }));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=ReactFlowCanvas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactFlowCanvas.js","sourceRoot":"","sources":["../../../src/components/react-flow/ReactFlowCanvas.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EACH,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,YAAY,GAEf,MAAM,eAAe,CAAC;AACvB,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;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C,mBAAmB,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACH,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,aAAa,EAAE,YAChD,MAAC,SAAS,IACN,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,eAAe,CAAC,aAExD,MAAM,CAAC,cAAc,IAAI,CACtB,KAAC,UAAU,IACP,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,EAC/B,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,EAC3B,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,GAC/B,CACL,EACA,MAAM,CAAC,YAAY,IAAI,CACpB,KAAC,QAAQ,IAAC,SAAS,EAAE,MAAM,CAAC,iBAAiB,GAAI,CACpD,EACA,MAAM,CAAC,WAAW,IAAI,CACnB,KAAC,OAAO,IACJ,SAAS,EAAE,MAAM,CAAC,SAAS,EAC3B,SAAS,EAAE,MAAM,CAAC,SAAS,EAC3B,SAAS,EAAE,MAAM,CAAC,gBAAgB,GACpC,CACL,EACA,QAAQ,IACD,GACa,CAChC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,eAAe,CAC3B,KAA0D;IAE1D,OAAO,CACH,KAAC,iBAAiB,cACd,KAAC,oBAAoB,OAAK,KAAK,GAAI,GACnB,CACvB,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { RelationshipFlowProps } from "./types";
|
|
2
|
+
export declare function RelationshipFlow({ nodes, edges, onNodesChange, onEdgesChange, onConnect, nodeTypes, ui, header, className, canvasClassName, children, renderNodes, orientation, }: RelationshipFlowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../support/utils.js";
|
|
3
|
+
import { FlowGraphHeader } from "./FlowGraphHeader.js";
|
|
4
|
+
import { ReactFlowCanvas } from "./ReactFlowCanvas.js";
|
|
5
|
+
import { FlowOrientationContext } from "./types.js";
|
|
6
|
+
export function RelationshipFlow({ nodes, edges, onNodesChange, onEdgesChange, onConnect, nodeTypes, ui, header, className, canvasClassName, children, renderNodes, orientation = "horizontal", }) {
|
|
7
|
+
return (_jsx(FlowOrientationContext.Provider, { value: orientation, children: _jsxs("div", { className: cn("h-full flex flex-col bg-dashboard-background relative overflow-hidden", className), children: [header && _jsx(FlowGraphHeader, { ...header }), _jsx("div", { className: "flex-1 w-full h-full", children: _jsx(ReactFlowCanvas, { nodes: nodes, edges: edges, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, onConnect: onConnect, nodeTypes: nodeTypes, ui: ui, canvasClassName: canvasClassName, renderNodes: renderNodes, children: children }) })] }) }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=RelationshipFlow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelationshipFlow.js","sourceRoot":"","sources":["../../../src/components/react-flow/RelationshipFlow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAGjD,MAAM,UAAU,gBAAgB,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,EACT,EAAE,EACF,MAAM,EACN,SAAS,EACT,eAAe,EACf,QAAQ,EACR,WAAW,EACX,WAAW,GAAG,YAAY,GACN;IACpB,OAAO,CACH,KAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,YAC/C,eACI,SAAS,EAAE,EAAE,CACT,uEAAuE,EACvE,SAAS,CACZ,aAEA,MAAM,IAAI,KAAC,eAAe,OAAK,MAAM,GAAI,EAE1C,cAAK,SAAS,EAAC,sBAAsB,YACjC,KAAC,eAAe,IACZ,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,EAAE,EACN,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,YAEvB,QAAQ,GACK,GAChB,IACJ,GACwB,CACrC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import type { RelationshipFlowProps } from "./types";
|
|
3
|
+
export interface TreeFlowLayoutProps {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
subtitle?: ReactNode;
|
|
6
|
+
tabs?: {
|
|
7
|
+
id: string;
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
}[];
|
|
11
|
+
activeTab?: string;
|
|
12
|
+
onTabChange?: (tabId: string) => void;
|
|
13
|
+
viewMode: "tree" | "flow";
|
|
14
|
+
onViewModeChange: (viewMode: "tree" | "flow") => void;
|
|
15
|
+
isDataLoading?: boolean;
|
|
16
|
+
treePanelTitle?: ReactNode;
|
|
17
|
+
addBtnLabel?: string;
|
|
18
|
+
onAddRoot?: () => void;
|
|
19
|
+
searchQuery?: string;
|
|
20
|
+
onSearchChange?: (val: string) => void;
|
|
21
|
+
onFilterToggle?: () => void;
|
|
22
|
+
isFilterActive?: boolean;
|
|
23
|
+
filterSidebar?: ReactNode;
|
|
24
|
+
flowProps: Omit<RelationshipFlowProps, "className">;
|
|
25
|
+
treeContent: ReactNode;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare function TreeFlowLayout({ title, subtitle, tabs, activeTab, onTabChange, viewMode, onViewModeChange, isDataLoading, treePanelTitle, addBtnLabel, onAddRoot, searchQuery, onSearchChange, onFilterToggle, isFilterActive, filterSidebar, flowProps, treeContent, children, }: TreeFlowLayoutProps): import("react").JSX.Element;
|
|
29
|
+
export default TreeFlowLayout;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Plus, SlidersHorizontal } from "lucide-react";
|
|
3
|
+
import { Button } from "../button.js";
|
|
4
|
+
import { FeatureLayout } from "../layout/FeatureLayout.js";
|
|
5
|
+
import { ThemedText } from "../ThemedText.js";
|
|
6
|
+
import { RelationshipFlow } from "./RelationshipFlow.js";
|
|
7
|
+
export function TreeFlowLayout({ title, subtitle, tabs, activeTab, onTabChange, viewMode, onViewModeChange, isDataLoading = false, treePanelTitle, addBtnLabel = "Add Item", onAddRoot, searchQuery, onSearchChange, onFilterToggle, isFilterActive, filterSidebar, flowProps, treeContent, children, }) {
|
|
8
|
+
return (_jsxs(FeatureLayout, { children: [_jsxs(FeatureLayout.Header, { children: [_jsx("div", { id: "catalog-tabs-container", className: "flex-1 min-w-0", children: tabs && tabs.length > 0 && activeTab && onTabChange && (_jsx(FeatureLayout.Tabs, { tabs: tabs.map((tab) => ({
|
|
9
|
+
id: tab.id,
|
|
10
|
+
label: (_jsxs("span", { className: "flex items-center gap-2", children: [tab.icon, tab.label] })),
|
|
11
|
+
})), activeTab: activeTab, onChange: onTabChange })) }), _jsx("div", { id: "catalog-search-filters", className: "flex items-center gap-2 shrink-0", children: _jsxs(FeatureLayout.Toolbar, { className: "shrink-0 flex items-center gap-2.5", children: [onSearchChange && (_jsx(FeatureLayout.Search, { value: searchQuery || "", onChange: onSearchChange, placeholder: "Search..." })), onFilterToggle && (_jsx(FeatureLayout.IconButton, { icon: SlidersHorizontal, onClick: onFilterToggle, active: isFilterActive })), _jsx(FeatureLayout.ViewToggle, { id: "classification-view-toggle", view: viewMode, onChange: (mode) => onViewModeChange(mode === "tree" ? "tree" : "flow"), options: ["tree", "flow"] }), viewMode === "tree" && onAddRoot && (_jsx(FeatureLayout.CreateButton, { id: "catalog-new-service-btn", icon: Plus, onClick: onAddRoot, children: _jsx(ThemedText, { variant: "body", children: addBtnLabel }) }))] }) })] }), _jsxs(FeatureLayout.Body, { children: [_jsx(FeatureLayout.Content, { children: _jsx("div", { className: "h-full flex flex-col min-h-0 overflow-hidden", children: viewMode === "tree" ? (_jsx("div", { id: "catalog-list-table", className: "flex-1 flex flex-col min-h-0 overflow-hidden animate-in fade-in duration-300", children: _jsxs("section", { className: "flex flex-col flex-1 min-h-0 bg-dashboard-card border border-dashboard-border rounded-[24px] shadow-sm p-5", children: [_jsxs("div", { className: "flex items-center justify-between mb-4 flex-none border-b border-dashboard-border pb-3", children: [_jsx("h2", { className: "text-sm font-bold text-dashboard-foreground flex items-center gap-2", children: treePanelTitle || "Hierarchy Tree" }), onAddRoot && (_jsxs(Button, { onClick: onAddRoot, className: "bg-transparent hover:bg-dashboard-primary/95 text-dashboard-foreground hover:text-dashboard-background rounded-full px-4 text-xs font-semibold flex items-center gap-1.5 cursor-pointer h-9 shrink-0 shadow-sm", children: [_jsx(Plus, { className: "w-3.5 h-3.5" }), addBtnLabel] }))] }), _jsx("div", { className: "flex-1 overflow-y-auto pr-1", children: isDataLoading ? (_jsxs("div", { className: "p-10 text-sm text-center text-dashboard-muted-foreground flex flex-col items-center justify-center h-full", children: [_jsx("div", { className: "w-8 h-8 border-4 border-dashboard-primary/30 border-t-dashboard-primary rounded-full animate-spin mb-4" }), "Loading items..."] })) : (treeContent) })] }) })) : (_jsx("div", { className: "flex-1 w-full bg-dashboard-card border border-dashboard-border rounded-[24px] overflow-hidden shadow-sm relative min-h-0 animate-in fade-in duration-300", children: isDataLoading ? (_jsxs("div", { className: "w-full h-full flex flex-col items-center justify-center text-sm text-dashboard-muted-foreground", children: [_jsx("div", { className: "w-8 h-8 border-4 border-dashboard-primary/30 border-t-dashboard-primary rounded-full animate-spin mb-4" }), "Loading diagram..."] })) : (_jsx(RelationshipFlow, { ...flowProps, className: "h-full w-full" })) })) }) }), filterSidebar] }), children] }));
|
|
12
|
+
}
|
|
13
|
+
export default TreeFlowLayout;
|
|
14
|
+
//# sourceMappingURL=TreeFlowLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeFlowLayout.js","sourceRoot":"","sources":["../../../src/components/react-flow/TreeFlowLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAoCtD,MAAM,UAAU,cAAc,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,aAAa,GAAG,KAAK,EACrB,cAAc,EACd,WAAW,GAAG,UAAU,EACxB,SAAS,EACT,WAAW,EACX,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,EACb,SAAS,EACT,WAAW,EACX,QAAQ,GACU;IAClB,OAAO,CACH,MAAC,aAAa,eACV,MAAC,aAAa,CAAC,MAAM,eACjB,cAAK,EAAE,EAAC,wBAAwB,EAAC,SAAS,EAAC,gBAAgB,YACtD,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS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IACmB,GACtB,IACa,EAEvB,MAAC,aAAa,CAAC,IAAI,eACf,KAAC,aAAa,CAAC,OAAO,cAClB,cAAK,SAAS,EAAC,8CAA8C,YACxD,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CACnB,cACI,EAAE,EAAC,oBAAoB,EACvB,SAAS,EAAC,8EAA8E,YAExF,mBAAS,SAAS,EAAC,4GAA4G,aAC3H,eAAK,SAAS,EAAC,wFAAwF,aACnG,aAAI,SAAS,EAAC,qEAAqE,YAC9E,cAAc,IAAI,gBAAgB,GAClC,EACJ,SAAS,IAAI,CACV,MAAC,MAAM,IACH,OAAO,EAAE,SAAS,EAClB,SAAS,EAAC,gNAAgN,aAE1N,KAAC,IAAI,IAAC,SAAS,EAAC,aAAa,GAAG,EAC/B,WAAW,IACP,CACZ,IACC,EACN,cAAK,SAAS,EAAC,6BAA6B,YACvC,aAAa,CAAC,CAAC,CAAC,CACb,eAAK,SAAS,EAAC,2GAA2G,aACtH,cAAK,SAAS,EAAC,wGAAwG,GAAG,wBAExH,CACT,CAAC,CAAC,CAAC,CACA,WAAW,CACd,GACC,IACA,GACR,CACT,CAAC,CAAC,CAAC,CACA,cAAK,SAAS,EAAC,0JAA0J,YACpK,aAAa,CAAC,CAAC,CAAC,CACb,eAAK,SAAS,EAAC,iGAAiG,aAC5G,cAAK,SAAS,EAAC,wGAAwG,GAAG,0BAExH,CACT,CAAC,CAAC,CAAC,CACA,KAAC,gBAAgB,OACT,SAAS,EACb,SAAS,EAAC,eAAe,GAC3B,CACL,GACC,CACT,GACC,GACc,EAEvB,aAAa,IACG,EACpB,QAAQ,IACG,CACnB,CAAC;AACN,CAAC;AACD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Edge } from "@xyflow/react";
|
|
2
|
+
export interface StyledEdgeOptions {
|
|
3
|
+
animated?: boolean;
|
|
4
|
+
strokeColor?: string;
|
|
5
|
+
strokeWidth?: number;
|
|
6
|
+
data?: any;
|
|
7
|
+
}
|
|
8
|
+
export declare function createStyledEdge(id: string, source: string, target: string, options?: StyledEdgeOptions): Edge;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MarkerType } from "@xyflow/react";
|
|
2
|
+
export function createStyledEdge(id, source, target, options = {}) {
|
|
3
|
+
const { animated = true, strokeColor = "var(--color-dashboard-primary)", strokeWidth = 2, data, } = options;
|
|
4
|
+
return {
|
|
5
|
+
id,
|
|
6
|
+
source,
|
|
7
|
+
target,
|
|
8
|
+
type: "glow",
|
|
9
|
+
animated,
|
|
10
|
+
style: {
|
|
11
|
+
stroke: strokeColor,
|
|
12
|
+
strokeWidth,
|
|
13
|
+
},
|
|
14
|
+
markerEnd: {
|
|
15
|
+
type: MarkerType.ArrowClosed,
|
|
16
|
+
color: strokeColor,
|
|
17
|
+
},
|
|
18
|
+
data,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=edges.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edges.js","sourceRoot":"","sources":["../../../src/components/react-flow/edges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,MAAM,eAAe,CAAC;AASjD,MAAM,UAAU,gBAAgB,CAC5B,EAAU,EACV,MAAc,EACd,MAAc,EACd,UAA6B,EAAE;IAE/B,MAAM,EACF,QAAQ,GAAG,IAAI,EACf,WAAW,GAAG,gCAAgC,EAC9C,WAAW,GAAG,CAAC,EACf,IAAI,GACP,GAAG,OAAO,CAAC;IAEZ,OAAO;QACH,EAAE;QACF,MAAM;QACN,MAAM;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ;QACR,KAAK,EAAE;YACH,MAAM,EAAE,WAAW;YACnB,WAAW;SACd;QACD,SAAS,EAAE;YACP,IAAI,EAAE,UAAU,CAAC,WAAW;YAC5B,KAAK,EAAE,WAAW;SACrB;QACD,IAAI;KACP,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./layout";
|
|
3
|
+
export * from "./edges";
|
|
4
|
+
export * from "./useFlowGraph";
|
|
5
|
+
export * from "./useFlowGraphSync";
|
|
6
|
+
export * from "./ReactFlowCanvas";
|
|
7
|
+
export * from "./FlowGraphHeader";
|
|
8
|
+
export * from "./RelationshipFlow";
|
|
9
|
+
export * from "./TreeFlowLayout";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./layout.js";
|
|
3
|
+
export * from "./edges.js";
|
|
4
|
+
export * from "./useFlowGraph.js";
|
|
5
|
+
export * from "./useFlowGraphSync.js";
|
|
6
|
+
export * from "./ReactFlowCanvas.js";
|
|
7
|
+
export * from "./FlowGraphHeader.js";
|
|
8
|
+
export * from "./RelationshipFlow.js";
|
|
9
|
+
export * from "./TreeFlowLayout.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/react-flow/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function computeVerticalPositions(count, { anchorX, centerY, spacing }) {
|
|
2
|
+
if (count <= 0)
|
|
3
|
+
return [];
|
|
4
|
+
const totalHeight = (count - 1) * spacing;
|
|
5
|
+
const startY = centerY - totalHeight / 2;
|
|
6
|
+
return Array.from({ length: count }, (_, index) => ({
|
|
7
|
+
x: anchorX,
|
|
8
|
+
y: startY + index * spacing,
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/components/react-flow/layout.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CACpC,KAAa,EACb,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAyB;IAEpD,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAE1B,MAAM,WAAW,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC1C,MAAM,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,CAAC,CAAC;IAEzC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAChD,CAAC,EAAE,OAAO;QACV,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO;KAC9B,CAAC,CAAC,CAAC;AACR,CAAC"}
|