@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,238 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Dialog,
|
|
4
|
+
DialogContent,
|
|
5
|
+
DialogFooter,
|
|
6
|
+
DialogHeader,
|
|
7
|
+
DialogTitle,
|
|
8
|
+
} from "../../index";
|
|
9
|
+
import { useLanguage } from "@gostack-framework/react";
|
|
10
|
+
import {
|
|
11
|
+
EdgeLabelRenderer,
|
|
12
|
+
getBezierPath,
|
|
13
|
+
useReactFlow,
|
|
14
|
+
type EdgeProps,
|
|
15
|
+
} from "@xyflow/react";
|
|
16
|
+
import { Unlink } from "lucide-react";
|
|
17
|
+
import React, { useContext, useState } from "react";
|
|
18
|
+
import { FlowEventsContext } from "./ReactFlowCanvas";
|
|
19
|
+
|
|
20
|
+
export function GlowEdge({
|
|
21
|
+
id,
|
|
22
|
+
sourceX,
|
|
23
|
+
sourceY,
|
|
24
|
+
targetX,
|
|
25
|
+
targetY,
|
|
26
|
+
sourcePosition,
|
|
27
|
+
targetPosition,
|
|
28
|
+
style = {},
|
|
29
|
+
markerEnd,
|
|
30
|
+
data,
|
|
31
|
+
}: EdgeProps) {
|
|
32
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
33
|
+
const [isConfirmOpen, setIsConfirmOpen] = useState(false);
|
|
34
|
+
const [buttonPos, setButtonPos] = useState<{ x: number; y: number } | null>(
|
|
35
|
+
null,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const { screenToFlowPosition } = useReactFlow();
|
|
39
|
+
const events = useContext(FlowEventsContext);
|
|
40
|
+
const edgeData = data as any;
|
|
41
|
+
|
|
42
|
+
const { t } = useLanguage("shared");
|
|
43
|
+
|
|
44
|
+
const defaultTooltip = edgeData?.isClassificationLink
|
|
45
|
+
? t("deleteClassification", "Delete Classification")
|
|
46
|
+
: edgeData?.isTeamLink
|
|
47
|
+
? t("unlinkTeam", "Unlink Team")
|
|
48
|
+
: t("unlinkConnection", "Unlink Connection");
|
|
49
|
+
const tooltipText = edgeData?.tooltip || defaultTooltip;
|
|
50
|
+
|
|
51
|
+
const defaultConfirmTitle = edgeData?.isClassificationLink
|
|
52
|
+
? t("deleteClassification", "Delete Classification")
|
|
53
|
+
: t("unlinkTeamAssignment", "Unlink Team Assignment");
|
|
54
|
+
const confirmTitle = edgeData?.confirmTitle || defaultConfirmTitle;
|
|
55
|
+
|
|
56
|
+
const defaultConfirmDescription = edgeData?.isClassificationLink
|
|
57
|
+
? t(
|
|
58
|
+
"deleteClassificationConfirm",
|
|
59
|
+
"Are you sure you want to delete this classification? This will permanently delete the classification and all its children. This action cannot be undone.",
|
|
60
|
+
)
|
|
61
|
+
: t(
|
|
62
|
+
"unlinkTeamConfirm",
|
|
63
|
+
"Are you sure you want to remove this team assignment?",
|
|
64
|
+
);
|
|
65
|
+
const confirmDescription =
|
|
66
|
+
edgeData?.confirmDescription || defaultConfirmDescription;
|
|
67
|
+
|
|
68
|
+
const defaultConfirmText = edgeData?.isClassificationLink
|
|
69
|
+
? t("delete", "Delete")
|
|
70
|
+
: t("unlink", "Unlink");
|
|
71
|
+
const confirmText = edgeData?.confirmText || defaultConfirmText;
|
|
72
|
+
|
|
73
|
+
const defaultCancelText = t("cancel", "Cancel");
|
|
74
|
+
const cancelText = edgeData?.cancelText || defaultCancelText;
|
|
75
|
+
|
|
76
|
+
const [edgePath, labelX, labelY] = getBezierPath({
|
|
77
|
+
sourceX,
|
|
78
|
+
sourceY,
|
|
79
|
+
sourcePosition,
|
|
80
|
+
targetX,
|
|
81
|
+
targetY,
|
|
82
|
+
targetPosition,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const handleMouseEnter = (event: React.MouseEvent) => {
|
|
86
|
+
if (isConfirmOpen) return;
|
|
87
|
+
const flowPos = screenToFlowPosition({
|
|
88
|
+
x: event.clientX,
|
|
89
|
+
y: event.clientY,
|
|
90
|
+
});
|
|
91
|
+
setButtonPos(flowPos);
|
|
92
|
+
setIsHovered(true);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const handleMouseLeave = () => {
|
|
96
|
+
if (isConfirmOpen) return;
|
|
97
|
+
setIsHovered(false);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const onUnlink = (event: React.MouseEvent) => {
|
|
101
|
+
event.stopPropagation();
|
|
102
|
+
if (edgeData?.isTeamLink || edgeData?.isClassificationLink) {
|
|
103
|
+
setIsConfirmOpen(true);
|
|
104
|
+
} else {
|
|
105
|
+
if (events?.onEdgesChange) {
|
|
106
|
+
events.onEdgesChange([{ id, type: "remove" }]);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const posX = buttonPos?.x ?? labelX;
|
|
112
|
+
const posY = buttonPos?.y ?? labelY;
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<>
|
|
116
|
+
{/* Glowing trace background under the main path on hover */}
|
|
117
|
+
{isHovered && (
|
|
118
|
+
<path
|
|
119
|
+
d={edgePath}
|
|
120
|
+
fill="none"
|
|
121
|
+
stroke={style.stroke || "var(--color-dashboard-primary)"}
|
|
122
|
+
strokeWidth={(Number(style.strokeWidth) || 2) + 6}
|
|
123
|
+
className="transition-opacity duration-300 opacity-40 animate-pulse"
|
|
124
|
+
style={{
|
|
125
|
+
filter: `drop-shadow(0 0 6px ${style.stroke || "var(--color-dashboard-primary)"})`,
|
|
126
|
+
}}
|
|
127
|
+
/>
|
|
128
|
+
)}
|
|
129
|
+
|
|
130
|
+
{/* Main visible path */}
|
|
131
|
+
<path
|
|
132
|
+
id={id}
|
|
133
|
+
d={edgePath}
|
|
134
|
+
fill="none"
|
|
135
|
+
stroke={style.stroke || "var(--color-dashboard-primary)"}
|
|
136
|
+
strokeWidth={
|
|
137
|
+
isHovered
|
|
138
|
+
? (Number(style.strokeWidth) || 2) + 1
|
|
139
|
+
: style.strokeWidth || 2
|
|
140
|
+
}
|
|
141
|
+
className="transition-opacity duration-300"
|
|
142
|
+
style={{
|
|
143
|
+
...style,
|
|
144
|
+
opacity: isHovered ? 1 : 0.7,
|
|
145
|
+
strokeDasharray: isHovered ? "5" : "none",
|
|
146
|
+
animation: isHovered
|
|
147
|
+
? "react-flow__dashdelay 0.6s linear infinite"
|
|
148
|
+
: "none",
|
|
149
|
+
}}
|
|
150
|
+
markerEnd={markerEnd}
|
|
151
|
+
/>
|
|
152
|
+
|
|
153
|
+
{/* Invisible thick path to capture hover/mouse events easily */}
|
|
154
|
+
<path
|
|
155
|
+
d={edgePath}
|
|
156
|
+
fill="none"
|
|
157
|
+
stroke="transparent"
|
|
158
|
+
strokeWidth={16}
|
|
159
|
+
className="cursor-pointer"
|
|
160
|
+
onMouseEnter={handleMouseEnter}
|
|
161
|
+
onMouseLeave={handleMouseLeave}
|
|
162
|
+
/>
|
|
163
|
+
|
|
164
|
+
{/* Hover-spawned Unlink Button positioned at entry point */}
|
|
165
|
+
{isHovered && (
|
|
166
|
+
<EdgeLabelRenderer>
|
|
167
|
+
<div
|
|
168
|
+
style={{
|
|
169
|
+
position: "absolute",
|
|
170
|
+
transform: `translate(-50%, -50%) translate(${posX}px, ${posY}px)`,
|
|
171
|
+
pointerEvents: "all",
|
|
172
|
+
}}
|
|
173
|
+
className="nodrag nopan flex flex-col items-center gap-1.5 z-50 animate-in fade-in zoom-in-95 duration-150"
|
|
174
|
+
onMouseEnter={() => setIsHovered(true)}
|
|
175
|
+
onMouseLeave={handleMouseLeave}
|
|
176
|
+
>
|
|
177
|
+
<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">
|
|
178
|
+
{tooltipText}
|
|
179
|
+
</div>
|
|
180
|
+
<button
|
|
181
|
+
type="button"
|
|
182
|
+
onClick={onUnlink}
|
|
183
|
+
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"
|
|
184
|
+
title={tooltipText}
|
|
185
|
+
aria-label={tooltipText}
|
|
186
|
+
>
|
|
187
|
+
<Unlink className="size-2.5 stroke-[2.5]" />
|
|
188
|
+
</button>
|
|
189
|
+
</div>
|
|
190
|
+
</EdgeLabelRenderer>
|
|
191
|
+
)}
|
|
192
|
+
|
|
193
|
+
{/* Confirmation Dialog */}
|
|
194
|
+
{(edgeData?.isTeamLink || edgeData?.isClassificationLink) && (
|
|
195
|
+
<Dialog open={isConfirmOpen} onOpenChange={setIsConfirmOpen}>
|
|
196
|
+
<DialogContent className="sm:max-w-md bg-dashboard-background border-dashboard-border text-dashboard-foreground">
|
|
197
|
+
<DialogHeader className="pb-4 border-b border-dashboard-border">
|
|
198
|
+
<DialogTitle className="text-dashboard-foreground">
|
|
199
|
+
{confirmTitle}
|
|
200
|
+
</DialogTitle>
|
|
201
|
+
</DialogHeader>
|
|
202
|
+
<div className="py-4 text-sm text-dashboard-muted-foreground">
|
|
203
|
+
{confirmDescription}
|
|
204
|
+
</div>
|
|
205
|
+
<DialogFooter className="pt-4 border-t border-dashboard-border gap-2">
|
|
206
|
+
<Button
|
|
207
|
+
variant="outline"
|
|
208
|
+
onClick={() => setIsConfirmOpen(false)}
|
|
209
|
+
>
|
|
210
|
+
{cancelText}
|
|
211
|
+
</Button>
|
|
212
|
+
<Button
|
|
213
|
+
onClick={() => {
|
|
214
|
+
setIsConfirmOpen(false);
|
|
215
|
+
setIsHovered(false); // Reset hover state
|
|
216
|
+
if (
|
|
217
|
+
edgeData.isTeamLink &&
|
|
218
|
+
edgeData.onUnlink
|
|
219
|
+
) {
|
|
220
|
+
edgeData.onUnlink();
|
|
221
|
+
} else if (
|
|
222
|
+
edgeData.isClassificationLink &&
|
|
223
|
+
edgeData.onDelete
|
|
224
|
+
) {
|
|
225
|
+
edgeData.onDelete();
|
|
226
|
+
}
|
|
227
|
+
}}
|
|
228
|
+
className="bg-dashboard-destructive hover:bg-dashboard-destructive/90 text-white border-0"
|
|
229
|
+
>
|
|
230
|
+
{confirmText}
|
|
231
|
+
</Button>
|
|
232
|
+
</DialogFooter>
|
|
233
|
+
</DialogContent>
|
|
234
|
+
</Dialog>
|
|
235
|
+
)}
|
|
236
|
+
</>
|
|
237
|
+
);
|
|
238
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { cn } from "../../support/utils";
|
|
2
|
+
import {
|
|
3
|
+
Background,
|
|
4
|
+
Controls,
|
|
5
|
+
MiniMap,
|
|
6
|
+
ReactFlow,
|
|
7
|
+
ReactFlowProvider,
|
|
8
|
+
useReactFlow,
|
|
9
|
+
type OnEdgesChange,
|
|
10
|
+
} from "@xyflow/react";
|
|
11
|
+
import "@xyflow/react/dist/style.css";
|
|
12
|
+
import { createContext, useEffect } from "react";
|
|
13
|
+
import { GlowEdge } from "./GlowEdge";
|
|
14
|
+
import type { RelationshipFlowProps } from "./types";
|
|
15
|
+
|
|
16
|
+
export const FlowEventsContext = createContext<{
|
|
17
|
+
onEdgesChange?: OnEdgesChange;
|
|
18
|
+
} | null>(null);
|
|
19
|
+
|
|
20
|
+
const edgeTypes = {
|
|
21
|
+
glow: GlowEdge,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const DEFAULT_UI = {
|
|
25
|
+
showBackground: true,
|
|
26
|
+
showControls: true,
|
|
27
|
+
showMiniMap: true,
|
|
28
|
+
fitView: true,
|
|
29
|
+
background: {
|
|
30
|
+
color: "var(--color-dashboard-border)",
|
|
31
|
+
gap: 24,
|
|
32
|
+
size: 2,
|
|
33
|
+
},
|
|
34
|
+
controlsClassName:
|
|
35
|
+
"bg-dashboard-card border border-dashboard-border rounded-lg overflow-hidden",
|
|
36
|
+
miniMapClassName:
|
|
37
|
+
"bg-dashboard-card border border-dashboard-border rounded-lg overflow-hidden",
|
|
38
|
+
nodeColor: "var(--color-dashboard-primary)",
|
|
39
|
+
maskColor: "var(--color-dashboard-background)",
|
|
40
|
+
} as const;
|
|
41
|
+
|
|
42
|
+
function ReactFlowCanvasInner({
|
|
43
|
+
nodes,
|
|
44
|
+
edges,
|
|
45
|
+
onNodesChange,
|
|
46
|
+
onEdgesChange,
|
|
47
|
+
onConnect,
|
|
48
|
+
nodeTypes,
|
|
49
|
+
ui,
|
|
50
|
+
canvasClassName,
|
|
51
|
+
children,
|
|
52
|
+
renderNodes,
|
|
53
|
+
}: Omit<RelationshipFlowProps, "header" | "className">) {
|
|
54
|
+
const config = { ...DEFAULT_UI, ...ui };
|
|
55
|
+
const renderedNodes = renderNodes ? renderNodes(nodes) : nodes;
|
|
56
|
+
const { fitView } = useReactFlow();
|
|
57
|
+
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
const handleFit = () => {
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
fitView({ duration: 400, padding: 0.2 });
|
|
62
|
+
}, 100);
|
|
63
|
+
};
|
|
64
|
+
window.addEventListener("reactflow-fitview", handleFit);
|
|
65
|
+
return () => window.removeEventListener("reactflow-fitview", handleFit);
|
|
66
|
+
}, [fitView]);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<FlowEventsContext.Provider value={{ onEdgesChange }}>
|
|
70
|
+
<ReactFlow
|
|
71
|
+
nodes={renderedNodes}
|
|
72
|
+
edges={edges}
|
|
73
|
+
onNodesChange={onNodesChange}
|
|
74
|
+
onEdgesChange={onEdgesChange}
|
|
75
|
+
onConnect={onConnect}
|
|
76
|
+
nodeTypes={nodeTypes}
|
|
77
|
+
edgeTypes={edgeTypes}
|
|
78
|
+
fitView={config.fitView}
|
|
79
|
+
className={cn("bg-dashboard-background", canvasClassName)}
|
|
80
|
+
>
|
|
81
|
+
{config.showBackground && (
|
|
82
|
+
<Background
|
|
83
|
+
color={config.background?.color}
|
|
84
|
+
gap={config.background?.gap}
|
|
85
|
+
size={config.background?.size}
|
|
86
|
+
/>
|
|
87
|
+
)}
|
|
88
|
+
{config.showControls && (
|
|
89
|
+
<Controls className={config.controlsClassName} />
|
|
90
|
+
)}
|
|
91
|
+
{config.showMiniMap && (
|
|
92
|
+
<MiniMap
|
|
93
|
+
nodeColor={config.nodeColor}
|
|
94
|
+
maskColor={config.maskColor}
|
|
95
|
+
className={config.miniMapClassName}
|
|
96
|
+
/>
|
|
97
|
+
)}
|
|
98
|
+
{children}
|
|
99
|
+
</ReactFlow>
|
|
100
|
+
</FlowEventsContext.Provider>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ReactFlowCanvas(
|
|
105
|
+
props: Omit<RelationshipFlowProps, "header" | "className">,
|
|
106
|
+
) {
|
|
107
|
+
return (
|
|
108
|
+
<ReactFlowProvider>
|
|
109
|
+
<ReactFlowCanvasInner {...props} />
|
|
110
|
+
</ReactFlowProvider>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cn } from "../../support/utils";
|
|
2
|
+
import { FlowGraphHeader } from "./FlowGraphHeader";
|
|
3
|
+
import { ReactFlowCanvas } from "./ReactFlowCanvas";
|
|
4
|
+
import { FlowOrientationContext } from "./types";
|
|
5
|
+
import type { RelationshipFlowProps } from "./types";
|
|
6
|
+
|
|
7
|
+
export function RelationshipFlow({
|
|
8
|
+
nodes,
|
|
9
|
+
edges,
|
|
10
|
+
onNodesChange,
|
|
11
|
+
onEdgesChange,
|
|
12
|
+
onConnect,
|
|
13
|
+
nodeTypes,
|
|
14
|
+
ui,
|
|
15
|
+
header,
|
|
16
|
+
className,
|
|
17
|
+
canvasClassName,
|
|
18
|
+
children,
|
|
19
|
+
renderNodes,
|
|
20
|
+
orientation = "horizontal",
|
|
21
|
+
}: RelationshipFlowProps) {
|
|
22
|
+
return (
|
|
23
|
+
<FlowOrientationContext.Provider value={orientation}>
|
|
24
|
+
<div
|
|
25
|
+
className={cn(
|
|
26
|
+
"h-full flex flex-col bg-dashboard-background relative overflow-hidden",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
>
|
|
30
|
+
{header && <FlowGraphHeader {...header} />}
|
|
31
|
+
|
|
32
|
+
<div className="flex-1 w-full h-full">
|
|
33
|
+
<ReactFlowCanvas
|
|
34
|
+
nodes={nodes}
|
|
35
|
+
edges={edges}
|
|
36
|
+
onNodesChange={onNodesChange}
|
|
37
|
+
onEdgesChange={onEdgesChange}
|
|
38
|
+
onConnect={onConnect}
|
|
39
|
+
nodeTypes={nodeTypes}
|
|
40
|
+
ui={ui}
|
|
41
|
+
canvasClassName={canvasClassName}
|
|
42
|
+
renderNodes={renderNodes}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</ReactFlowCanvas>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</FlowOrientationContext.Provider>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Plus, SlidersHorizontal } from "lucide-react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { Button } from "../button";
|
|
4
|
+
import { FeatureLayout } from "../layout/FeatureLayout";
|
|
5
|
+
import { ThemedText } from "../ThemedText";
|
|
6
|
+
import { RelationshipFlow } from "./RelationshipFlow";
|
|
7
|
+
import type { RelationshipFlowProps } from "./types";
|
|
8
|
+
|
|
9
|
+
export interface TreeFlowLayoutProps {
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
subtitle?: ReactNode;
|
|
12
|
+
tabs?: {
|
|
13
|
+
id: string;
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
}[];
|
|
17
|
+
activeTab?: string;
|
|
18
|
+
onTabChange?: (tabId: string) => void;
|
|
19
|
+
viewMode: "tree" | "flow";
|
|
20
|
+
onViewModeChange: (viewMode: "tree" | "flow") => void;
|
|
21
|
+
isDataLoading?: boolean;
|
|
22
|
+
treePanelTitle?: ReactNode;
|
|
23
|
+
addBtnLabel?: string;
|
|
24
|
+
onAddRoot?: () => void;
|
|
25
|
+
|
|
26
|
+
searchQuery?: string;
|
|
27
|
+
onSearchChange?: (val: string) => void;
|
|
28
|
+
onFilterToggle?: () => void;
|
|
29
|
+
isFilterActive?: boolean;
|
|
30
|
+
filterSidebar?: ReactNode;
|
|
31
|
+
|
|
32
|
+
// Flow/Diagram Props
|
|
33
|
+
flowProps: Omit<RelationshipFlowProps, "className">;
|
|
34
|
+
|
|
35
|
+
// Custom Tree View Component/Content
|
|
36
|
+
treeContent: ReactNode;
|
|
37
|
+
|
|
38
|
+
// Any extra modals/dialogs
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function TreeFlowLayout({
|
|
43
|
+
title,
|
|
44
|
+
subtitle,
|
|
45
|
+
tabs,
|
|
46
|
+
activeTab,
|
|
47
|
+
onTabChange,
|
|
48
|
+
viewMode,
|
|
49
|
+
onViewModeChange,
|
|
50
|
+
isDataLoading = false,
|
|
51
|
+
treePanelTitle,
|
|
52
|
+
addBtnLabel = "Add Item",
|
|
53
|
+
onAddRoot,
|
|
54
|
+
searchQuery,
|
|
55
|
+
onSearchChange,
|
|
56
|
+
onFilterToggle,
|
|
57
|
+
isFilterActive,
|
|
58
|
+
filterSidebar,
|
|
59
|
+
flowProps,
|
|
60
|
+
treeContent,
|
|
61
|
+
children,
|
|
62
|
+
}: TreeFlowLayoutProps) {
|
|
63
|
+
return (
|
|
64
|
+
<FeatureLayout>
|
|
65
|
+
<FeatureLayout.Header>
|
|
66
|
+
<div id="catalog-tabs-container" className="flex-1 min-w-0">
|
|
67
|
+
{tabs && tabs.length > 0 && activeTab && onTabChange && (
|
|
68
|
+
<FeatureLayout.Tabs
|
|
69
|
+
tabs={tabs.map((tab) => ({
|
|
70
|
+
id: tab.id,
|
|
71
|
+
label: (
|
|
72
|
+
<span className="flex items-center gap-2">
|
|
73
|
+
{tab.icon}
|
|
74
|
+
{tab.label}
|
|
75
|
+
</span>
|
|
76
|
+
),
|
|
77
|
+
}))}
|
|
78
|
+
activeTab={activeTab}
|
|
79
|
+
onChange={onTabChange}
|
|
80
|
+
/>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div
|
|
85
|
+
id="catalog-search-filters"
|
|
86
|
+
className="flex items-center gap-2 shrink-0"
|
|
87
|
+
>
|
|
88
|
+
<FeatureLayout.Toolbar className="shrink-0 flex items-center gap-2.5">
|
|
89
|
+
{onSearchChange && (
|
|
90
|
+
<FeatureLayout.Search
|
|
91
|
+
value={searchQuery || ""}
|
|
92
|
+
onChange={onSearchChange}
|
|
93
|
+
placeholder="Search..."
|
|
94
|
+
/>
|
|
95
|
+
)}
|
|
96
|
+
{onFilterToggle && (
|
|
97
|
+
<FeatureLayout.IconButton
|
|
98
|
+
icon={SlidersHorizontal}
|
|
99
|
+
onClick={onFilterToggle}
|
|
100
|
+
active={isFilterActive}
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
103
|
+
<FeatureLayout.ViewToggle
|
|
104
|
+
id="classification-view-toggle"
|
|
105
|
+
view={viewMode}
|
|
106
|
+
onChange={(mode) =>
|
|
107
|
+
onViewModeChange(
|
|
108
|
+
mode === "tree" ? "tree" : "flow",
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
options={["tree", "flow"]}
|
|
112
|
+
/>
|
|
113
|
+
{viewMode === "tree" && onAddRoot && (
|
|
114
|
+
<FeatureLayout.CreateButton
|
|
115
|
+
id="catalog-new-service-btn"
|
|
116
|
+
icon={Plus}
|
|
117
|
+
onClick={onAddRoot}
|
|
118
|
+
>
|
|
119
|
+
<ThemedText variant="body">
|
|
120
|
+
{addBtnLabel}
|
|
121
|
+
</ThemedText>
|
|
122
|
+
</FeatureLayout.CreateButton>
|
|
123
|
+
)}
|
|
124
|
+
</FeatureLayout.Toolbar>
|
|
125
|
+
</div>
|
|
126
|
+
</FeatureLayout.Header>
|
|
127
|
+
|
|
128
|
+
<FeatureLayout.Body>
|
|
129
|
+
<FeatureLayout.Content>
|
|
130
|
+
<div className="h-full flex flex-col min-h-0 overflow-hidden">
|
|
131
|
+
{viewMode === "tree" ? (
|
|
132
|
+
<div
|
|
133
|
+
id="catalog-list-table"
|
|
134
|
+
className="flex-1 flex flex-col min-h-0 overflow-hidden animate-in fade-in duration-300"
|
|
135
|
+
>
|
|
136
|
+
<section className="flex flex-col flex-1 min-h-0 bg-dashboard-card border border-dashboard-border rounded-[24px] shadow-sm p-5">
|
|
137
|
+
<div className="flex items-center justify-between mb-4 flex-none border-b border-dashboard-border pb-3">
|
|
138
|
+
<h2 className="text-sm font-bold text-dashboard-foreground flex items-center gap-2">
|
|
139
|
+
{treePanelTitle || "Hierarchy Tree"}
|
|
140
|
+
</h2>
|
|
141
|
+
{onAddRoot && (
|
|
142
|
+
<Button
|
|
143
|
+
onClick={onAddRoot}
|
|
144
|
+
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"
|
|
145
|
+
>
|
|
146
|
+
<Plus className="w-3.5 h-3.5" />
|
|
147
|
+
{addBtnLabel}
|
|
148
|
+
</Button>
|
|
149
|
+
)}
|
|
150
|
+
</div>
|
|
151
|
+
<div className="flex-1 overflow-y-auto pr-1">
|
|
152
|
+
{isDataLoading ? (
|
|
153
|
+
<div className="p-10 text-sm text-center text-dashboard-muted-foreground flex flex-col items-center justify-center h-full">
|
|
154
|
+
<div className="w-8 h-8 border-4 border-dashboard-primary/30 border-t-dashboard-primary rounded-full animate-spin mb-4" />
|
|
155
|
+
Loading items...
|
|
156
|
+
</div>
|
|
157
|
+
) : (
|
|
158
|
+
treeContent
|
|
159
|
+
)}
|
|
160
|
+
</div>
|
|
161
|
+
</section>
|
|
162
|
+
</div>
|
|
163
|
+
) : (
|
|
164
|
+
<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">
|
|
165
|
+
{isDataLoading ? (
|
|
166
|
+
<div className="w-full h-full flex flex-col items-center justify-center text-sm text-dashboard-muted-foreground">
|
|
167
|
+
<div className="w-8 h-8 border-4 border-dashboard-primary/30 border-t-dashboard-primary rounded-full animate-spin mb-4" />
|
|
168
|
+
Loading diagram...
|
|
169
|
+
</div>
|
|
170
|
+
) : (
|
|
171
|
+
<RelationshipFlow
|
|
172
|
+
{...flowProps}
|
|
173
|
+
className="h-full w-full"
|
|
174
|
+
/>
|
|
175
|
+
)}
|
|
176
|
+
</div>
|
|
177
|
+
)}
|
|
178
|
+
</div>
|
|
179
|
+
</FeatureLayout.Content>
|
|
180
|
+
|
|
181
|
+
{filterSidebar}
|
|
182
|
+
</FeatureLayout.Body>
|
|
183
|
+
{children}
|
|
184
|
+
</FeatureLayout>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
export default TreeFlowLayout;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Edge, MarkerType } from "@xyflow/react";
|
|
2
|
+
|
|
3
|
+
export interface StyledEdgeOptions {
|
|
4
|
+
animated?: boolean;
|
|
5
|
+
strokeColor?: string;
|
|
6
|
+
strokeWidth?: number;
|
|
7
|
+
data?: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function createStyledEdge(
|
|
11
|
+
id: string,
|
|
12
|
+
source: string,
|
|
13
|
+
target: string,
|
|
14
|
+
options: StyledEdgeOptions = {},
|
|
15
|
+
): Edge {
|
|
16
|
+
const {
|
|
17
|
+
animated = true,
|
|
18
|
+
strokeColor = "var(--color-dashboard-primary)",
|
|
19
|
+
strokeWidth = 2,
|
|
20
|
+
data,
|
|
21
|
+
} = options;
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
id,
|
|
25
|
+
source,
|
|
26
|
+
target,
|
|
27
|
+
type: "glow",
|
|
28
|
+
animated,
|
|
29
|
+
style: {
|
|
30
|
+
stroke: strokeColor,
|
|
31
|
+
strokeWidth,
|
|
32
|
+
},
|
|
33
|
+
markerEnd: {
|
|
34
|
+
type: MarkerType.ArrowClosed,
|
|
35
|
+
color: strokeColor,
|
|
36
|
+
},
|
|
37
|
+
data,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -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,16 @@
|
|
|
1
|
+
import type { FlowGraphLayoutConfig } from "./types";
|
|
2
|
+
|
|
3
|
+
export function computeVerticalPositions(
|
|
4
|
+
count: number,
|
|
5
|
+
{ anchorX, centerY, spacing }: FlowGraphLayoutConfig,
|
|
6
|
+
): { x: number; y: number }[] {
|
|
7
|
+
if (count <= 0) return [];
|
|
8
|
+
|
|
9
|
+
const totalHeight = (count - 1) * spacing;
|
|
10
|
+
const startY = centerY - totalHeight / 2;
|
|
11
|
+
|
|
12
|
+
return Array.from({ length: count }, (_, index) => ({
|
|
13
|
+
x: anchorX,
|
|
14
|
+
y: startY + index * spacing,
|
|
15
|
+
}));
|
|
16
|
+
}
|