@parhelia/core 0.1.12534 → 0.1.12555
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/dist/agents-view/AgentCard.d.ts +4 -6
- package/dist/agents-view/AgentCard.js +24 -143
- package/dist/agents-view/AgentCard.js.map +1 -1
- package/dist/agents-view/AgentsInbox.d.ts +1 -1
- package/dist/agents-view/AgentsInbox.js +92 -7
- package/dist/agents-view/AgentsInbox.js.map +1 -1
- package/dist/agents-view/AgentsTitlebar.js +2 -3
- package/dist/agents-view/AgentsTitlebar.js.map +1 -1
- package/dist/agents-view/AgentsView.d.ts +7 -6
- package/dist/agents-view/AgentsView.js +97 -186
- package/dist/agents-view/AgentsView.js.map +1 -1
- package/dist/agents-view/AgentsWorkspaceView.d.ts +6 -2
- package/dist/agents-view/AgentsWorkspaceView.js +113 -266
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/agents-view/ProfileAgentsGroup.d.ts +1 -2
- package/dist/agents-view/ProfileAgentsGroup.js +3 -4
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -1
- package/dist/components/ActionButton.d.ts +1 -1
- package/dist/components/ActionButton.js.map +1 -1
- package/dist/components/FilterInput.d.ts +1 -1
- package/dist/components/FilterInput.js +1 -1
- package/dist/components/FilterInput.js.map +1 -1
- package/dist/components/ui/LanguageSelector.js +4 -2
- package/dist/components/ui/LanguageSelector.js.map +1 -1
- package/dist/components/ui/PlaceholderInput.js +3 -3
- package/dist/components/ui/PlaceholderInput.js.map +1 -1
- package/dist/components/ui/PlaceholderInputTypes.js +1 -1
- package/dist/components/ui/PlaceholderInputTypes.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog.js +10 -6
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/button.d.ts +4 -4
- package/dist/components/ui/button.js +1 -4
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +1 -1
- package/dist/components/ui/context-menu.js +4 -12
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/copy-button.d.ts +1 -2
- package/dist/components/ui/copy-button.js +2 -2
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dialog.js +126 -21
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.js +3 -5
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/paste-button.d.ts +1 -2
- package/dist/components/ui/paste-button.js +2 -2
- package/dist/components/ui/paste-button.js.map +1 -1
- package/dist/components/ui/popover.js +9 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/styled-dialog-title.js +1 -1
- package/dist/components/ui/styled-dialog-title.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.js +11 -4
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/config/config.d.ts +2 -2
- package/dist/config/config.js +70 -215
- package/dist/config/config.js.map +1 -1
- package/dist/config/types/workspace.d.ts +0 -6
- package/dist/config/types.d.ts +12 -58
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ComponentInfo.d.ts +4 -0
- package/dist/editor/ComponentInfo.js +41 -0
- package/dist/editor/ComponentInfo.js.map +1 -0
- package/dist/editor/ConfirmationDialog.js +4 -20
- package/dist/editor/ConfirmationDialog.js.map +1 -1
- package/dist/editor/ContentTree.d.ts +1 -2
- package/dist/editor/ContentTree.js +32 -93
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/Editor.js +18 -72
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/FieldHistory.js +36 -84
- package/dist/editor/FieldHistory.js.map +1 -1
- package/dist/editor/FieldListField.js +9 -21
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/FieldListFieldWithFallbacks.js +2 -23
- package/dist/editor/FieldListFieldWithFallbacks.js.map +1 -1
- package/dist/editor/GlobalMenuBar.js +2 -29
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/ItemInfo.js +1 -36
- package/dist/editor/ItemInfo.js.map +1 -1
- package/dist/editor/LinkEditorDialog.js +0 -3
- package/dist/editor/LinkEditorDialog.js.map +1 -1
- package/dist/editor/MainLayout.d.ts +2 -0
- package/dist/editor/MainLayout.js +5 -4
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MigrationsView.js +5 -29
- package/dist/editor/MigrationsView.js.map +1 -1
- package/dist/editor/MobileLayout.js +12 -37
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureCropper.js +45 -54
- package/dist/editor/PictureCropper.js.map +1 -1
- package/dist/editor/PictureEditor.js +13 -12
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/QuickItemSwitcher.js +21 -21
- package/dist/editor/QuickItemSwitcher.js.map +1 -1
- package/dist/editor/SetupWizard.js +12 -52
- package/dist/editor/SetupWizard.js.map +1 -1
- package/dist/editor/Titlebar.js +2 -7
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/ai/AgentCostDisplay.d.ts +0 -1
- package/dist/editor/ai/AgentCostDisplay.js +1 -1
- package/dist/editor/ai/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/AgentDocumentList.js +14 -32
- package/dist/editor/ai/AgentDocumentList.js.map +1 -1
- package/dist/editor/ai/AgentGreeting.js +2 -3
- package/dist/editor/ai/AgentGreeting.js.map +1 -1
- package/dist/editor/ai/AgentProfileSelector.js +1 -2
- package/dist/editor/ai/AgentProfileSelector.js.map +1 -1
- package/dist/editor/ai/AgentStatusBadge.d.ts +5 -0
- package/dist/editor/ai/AgentStatusBadge.js +65 -67
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -1
- package/dist/editor/ai/AgentTerminal.d.ts +2 -14
- package/dist/editor/ai/AgentTerminal.js +482 -2350
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/AgentTerminalStatusBar.d.ts +3 -8
- package/dist/editor/ai/AgentTerminalStatusBar.js +56 -460
- package/dist/editor/ai/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/Agents.js +101 -91
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/AiResponseMessage.d.ts +1 -10
- package/dist/editor/ai/AiResponseMessage.js +23 -238
- package/dist/editor/ai/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/ContextInfoBar.d.ts +3 -2
- package/dist/editor/ai/ContextInfoBar.js +7 -64
- package/dist/editor/ai/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/GuidanceOverlay.js +11 -17
- package/dist/editor/ai/GuidanceOverlay.js.map +1 -1
- package/dist/editor/ai/HelpTerminal.d.ts +5 -0
- package/dist/editor/ai/HelpTerminal.js +166 -0
- package/dist/editor/ai/HelpTerminal.js.map +1 -0
- package/dist/editor/ai/InlineAiDialog.d.ts +1 -1
- package/dist/editor/ai/InlineAiDialog.js +192 -514
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +12 -115
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/MediaImage.js +8 -40
- package/dist/editor/ai/MediaImage.js.map +1 -1
- package/dist/editor/ai/SpawnedAgentsPanel.js +12 -10
- package/dist/editor/ai/SpawnedAgentsPanel.js.map +1 -1
- package/dist/editor/ai/ToolCallDisplay.d.ts +2 -22
- package/dist/editor/ai/ToolCallDisplay.js +147 -518
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/dialogs/AgentDialogHandler.d.ts +8 -1
- package/dist/editor/ai/dialogs/AgentDialogHandler.js +42 -379
- package/dist/editor/ai/dialogs/AgentDialogHandler.js.map +1 -1
- package/dist/editor/ai/dialogs/QuestionnaireInline.d.ts +1 -5
- package/dist/editor/ai/dialogs/QuestionnaireInline.js +60 -628
- package/dist/editor/ai/dialogs/QuestionnaireInline.js.map +1 -1
- package/dist/editor/ai/dialogs/agentDialogTypes.d.ts +0 -115
- package/dist/editor/ai/dialogs/agentDialogTypes.js +0 -2
- package/dist/editor/ai/dialogs/agentDialogTypes.js.map +1 -1
- package/dist/editor/ai/types.d.ts +1 -3
- package/dist/editor/ai/useAgentStatus.d.ts +0 -1
- package/dist/editor/ai/useAgentStatus.js +96 -79
- package/dist/editor/ai/useAgentStatus.js.map +1 -1
- package/dist/editor/ai/useInlineAiPosition.js +5 -45
- package/dist/editor/ai/useInlineAiPosition.js.map +1 -1
- package/dist/editor/client/AboutDialog.js +2 -4
- package/dist/editor/client/AboutDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.js +212 -581
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +19 -28
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/helpers.js +0 -6
- package/dist/editor/client/helpers.js.map +1 -1
- package/dist/editor/client/hooks/useEditorUrlSync.js +2 -1
- package/dist/editor/client/hooks/useEditorUrlSync.js.map +1 -1
- package/dist/editor/client/hooks/useEditorWebSocket.d.ts +0 -10
- package/dist/editor/client/hooks/useEditorWebSocket.js +14 -209
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -1
- package/dist/editor/client/hooks/useQuota.d.ts +0 -8
- package/dist/editor/client/hooks/useQuota.js.map +1 -1
- package/dist/editor/client/hooks/useSocketMessageHandler.js +7 -68
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/itemsRepository.js +6 -10
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/navigation.d.ts +21 -0
- package/dist/editor/client/navigation.js +98 -0
- package/dist/editor/client/navigation.js.map +1 -0
- package/dist/editor/client/operations.d.ts +3 -6
- package/dist/editor/client/operations.js +30 -208
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/pageModelBuilder.js +31 -4
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.d.ts +6 -0
- package/dist/editor/client/ui/EditorChrome.js +72 -55
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/client/ui/FullscreenControls.js +3 -5
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -1
- package/dist/editor/commands/commands.d.ts +1 -11
- package/dist/editor/commands/commands.js +1 -12
- package/dist/editor/commands/commands.js.map +1 -1
- package/dist/editor/commands/componentCommands.js +55 -109
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/customCommandConverter.d.ts +1 -8
- package/dist/editor/commands/customCommandConverter.js +5 -35
- package/dist/editor/commands/customCommandConverter.js.map +1 -1
- package/dist/editor/commands/handlers/agentHandler.js +1 -2
- package/dist/editor/commands/handlers/agentHandler.js.map +1 -1
- package/dist/editor/commands/handlers/uiActionHandlers.js +3 -4
- package/dist/editor/commands/handlers/uiActionHandlers.js.map +1 -1
- package/dist/editor/commands/itemCommands.d.ts +0 -3
- package/dist/editor/commands/itemCommands.js +10 -93
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/commands/undo.d.ts +15 -9
- package/dist/editor/commands/undo.js +0 -24
- package/dist/editor/commands/undo.js.map +1 -1
- package/dist/editor/context-menu/InsertMenu.js +39 -83
- package/dist/editor/context-menu/InsertMenu.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +1 -1
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +1 -1
- package/dist/editor/field-types/ReactQuill.d.ts +125 -0
- package/dist/editor/field-types/ReactQuill.js +385 -0
- package/dist/editor/field-types/ReactQuill.js.map +1 -0
- package/dist/editor/field-types/RichTextEditor.js +2 -4
- package/dist/editor/field-types/RichTextEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +3 -37
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +1 -1
- package/dist/editor/field-types/TreeListEditor.js +2 -3
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.css +5 -23
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +0 -2
- package/dist/editor/field-types/richtext/components/ReactSlate.js +4 -28
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +2 -4
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -1
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +0 -13
- package/dist/editor/field-types/richtext/contextMenuFactory.js +22 -177
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/types.d.ts +0 -2
- package/dist/editor/field-types/richtext/types.js.map +1 -1
- package/dist/editor/field-types/richtext/utils/plugins.js +0 -4
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/MediaSelector.js +1 -7
- package/dist/editor/media-selector/MediaSelector.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +35 -40
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/menubar/ActiveUsers.js +1 -1
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/GenericToolbar.js +2 -4
- package/dist/editor/menubar/GenericToolbar.js.map +1 -1
- package/dist/editor/menubar/ItemLanguageVersion.js +2 -2
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +147 -26
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/Separator.js +1 -1
- package/dist/editor/menubar/VersionSelector.js +4 -2
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.js +12 -39
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/CustomCommandsToolbar.js +36 -7
- package/dist/editor/menubar/toolbar-sections/CustomCommandsToolbar.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js +3 -3
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/HelpButton.js +0 -1
- package/dist/editor/menubar/toolbar-sections/HelpButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.d.ts +10 -6
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js +219 -500
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +1 -10
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +1 -42
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/InlineEditor.js +48 -97
- package/dist/editor/page-editor-chrome/InlineEditor.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +17 -38
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +11 -17
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -1
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +298 -283
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.js +11 -69
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/MiniMap.d.ts +4 -2
- package/dist/editor/page-viewer/MiniMap.js +28 -91
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.d.ts +1 -3
- package/dist/editor/page-viewer/PageViewer.js +19 -92
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +1 -2
- package/dist/editor/page-viewer/PageViewerFrame.js +109 -292
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/RenderingParametersSection.js +3 -2
- package/dist/editor/page-viewer/RenderingParametersSection.js.map +1 -1
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js +49 -114
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js.map +1 -1
- package/dist/editor/page-viewer/pageViewContext.d.ts +0 -1
- package/dist/editor/page-viewer/pageViewContext.js +14 -51
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/pageModel.d.ts +1 -14
- package/dist/editor/reviews/Comment.js +11 -23
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +4 -4
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentView.js +4 -19
- package/dist/editor/reviews/CommentView.js.map +1 -1
- package/dist/editor/reviews/Comments.js +72 -89
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js +177 -281
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/DecisionsMatrix.js +25 -96
- package/dist/editor/reviews/DecisionsMatrix.js.map +1 -1
- package/dist/editor/reviews/DiffView.js +14 -7
- package/dist/editor/reviews/DiffView.js.map +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js +4 -6
- package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
- package/dist/editor/reviews/MultiReviewManager.js +3 -25
- package/dist/editor/reviews/MultiReviewManager.js.map +1 -1
- package/dist/editor/reviews/PagesPanel.js +15 -31
- package/dist/editor/reviews/PagesPanel.js.map +1 -1
- package/dist/editor/reviews/PreviewInfo.js +4 -1
- package/dist/editor/reviews/PreviewInfo.js.map +1 -1
- package/dist/editor/reviews/ReviewCard.js +7 -13
- package/dist/editor/reviews/ReviewCard.js.map +1 -1
- package/dist/editor/reviews/ReviewDetail.js +2 -3
- package/dist/editor/reviews/ReviewDetail.js.map +1 -1
- package/dist/editor/reviews/ReviewsList.js +3 -7
- package/dist/editor/reviews/ReviewsList.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.js +3 -34
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -1
- package/dist/editor/reviews/SuggestionDisplayPopover.js +5 -31
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/commentAi.js +6 -21
- package/dist/editor/reviews/commentAi.js.map +1 -1
- package/dist/editor/reviews/reviewCommands.js +1 -4
- package/dist/editor/reviews/reviewCommands.js.map +1 -1
- package/dist/editor/reviews/useMultiReview.js +2 -2
- package/dist/editor/reviews/useMultiReview.js.map +1 -1
- package/dist/editor/reviews/useReviews.d.ts +2 -2
- package/dist/editor/reviews/useReviews.js +30 -12
- package/dist/editor/reviews/useReviews.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +5 -229
- package/dist/editor/services/agentService.js +39 -292
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +1 -57
- package/dist/editor/services/aiService.js +6 -79
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +3 -6
- package/dist/editor/services/contentService.js +12 -13
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +1 -50
- package/dist/editor/services/editService.js +2 -91
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/indexService.js +1 -1
- package/dist/editor/services/indexService.js.map +1 -1
- package/dist/editor/services/reviewsService.d.ts +6 -3
- package/dist/editor/services/reviewsService.js +11 -2
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/services/serviceHelper.d.ts +1 -2
- package/dist/editor/services/serviceHelper.js +20 -112
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/services/systemService.d.ts +1 -2
- package/dist/editor/services/systemService.js +0 -3
- package/dist/editor/services/systemService.js.map +1 -1
- package/dist/editor/services-server/graphQL.d.ts +29 -0
- package/dist/editor/services-server/graphQL.js +53 -0
- package/dist/editor/services-server/graphQL.js.map +1 -0
- package/dist/editor/settings/About.js +3 -317
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/AllAgentsPanel.d.ts +5 -0
- package/dist/editor/settings/AllAgentsPanel.js +139 -0
- package/dist/editor/settings/AllAgentsPanel.js.map +1 -0
- package/dist/editor/settings/LatestFeedback.d.ts +1 -0
- package/dist/editor/settings/LatestFeedback.js +136 -0
- package/dist/editor/settings/LatestFeedback.js.map +1 -0
- package/dist/editor/settings/QuotaInfo.js +4 -210
- package/dist/editor/settings/QuotaInfo.js.map +1 -1
- package/dist/editor/settings/SettingsView.js +21 -23
- package/dist/editor/settings/SettingsView.js.map +1 -1
- package/dist/editor/settings/Setup.d.ts +1 -0
- package/dist/editor/settings/Setup.js +211 -0
- package/dist/editor/settings/Setup.js.map +1 -0
- package/dist/editor/settings/Status.js +4 -5
- package/dist/editor/settings/Status.js.map +1 -1
- package/dist/editor/settings/index/useIndexStatus.js +22 -20
- package/dist/editor/settings/index/useIndexStatus.js.map +1 -1
- package/dist/editor/settings/panels/AgentsPanel.d.ts +4 -0
- package/dist/editor/settings/panels/AgentsPanel.js +121 -95
- package/dist/editor/settings/panels/AgentsPanel.js.map +1 -1
- package/dist/editor/settings/panels/DatabasePanel.d.ts +6 -0
- package/dist/editor/settings/panels/DatabasePanel.js +50 -0
- package/dist/editor/settings/panels/DatabasePanel.js.map +1 -0
- package/dist/editor/settings/panels/ModelsPanel.js +108 -329
- package/dist/editor/settings/panels/ModelsPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js +1 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js.map +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.d.ts +1 -1
- package/dist/editor/settings/panels/ProvidersPanel.js +59 -86
- package/dist/editor/settings/panels/ProvidersPanel.js.map +1 -1
- package/dist/editor/settings/panels/SearchConfigPanel.js +4 -4
- package/dist/editor/settings/panels/SearchConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/index.d.ts +2 -3
- package/dist/editor/settings/panels/index.js +2 -3
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/settings/setup-steps/AiSetupStep/EmbeddingsModelSection.d.ts +2 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/EmbeddingsModelSection.js +195 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/EmbeddingsModelSection.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/index.d.ts +2 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/index.js +21 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/index.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/provider/ProviderSection.d.ts +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/provider/ProviderSection.js +233 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/provider/ProviderSection.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersList.d.ts +15 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js +14 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.d.ts +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js +94 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/types.d.ts +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/types.js +2 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/types.js.map +1 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/utils.d.ts +5 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/utils.js +44 -0
- package/dist/editor/settings/setup-steps/AiSetupStep/utils.js.map +1 -0
- package/dist/editor/settings/setup-steps/IndexSetupStep.d.ts +2 -0
- package/dist/editor/settings/setup-steps/IndexSetupStep.js +36 -0
- package/dist/editor/settings/setup-steps/IndexSetupStep.js.map +1 -0
- package/dist/editor/settings/setup-steps/SettingsSetupStep.d.ts +2 -0
- package/dist/editor/settings/setup-steps/SettingsSetupStep.js +111 -0
- package/dist/editor/settings/setup-steps/SettingsSetupStep.js.map +1 -0
- package/dist/editor/settings/setup-steps/SetupOverview.d.ts +14 -0
- package/dist/editor/settings/setup-steps/SetupOverview.js +38 -0
- package/dist/editor/settings/setup-steps/SetupOverview.js.map +1 -0
- package/dist/editor/settings/status/coreStatusChecks.js +19 -124
- package/dist/editor/settings/status/coreStatusChecks.js.map +1 -1
- package/dist/editor/settings/status/useStartupChecks.d.ts +1 -3
- package/dist/editor/settings/status/useStartupChecks.js +5 -9
- package/dist/editor/settings/status/useStartupChecks.js.map +1 -1
- package/dist/editor/setup-wizard/steps/CompleteStep.d.ts +1 -2
- package/dist/editor/setup-wizard/steps/CompleteStep.js +1 -2
- package/dist/editor/setup-wizard/steps/CompleteStep.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +1 -2
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.d.ts +1 -8
- package/dist/editor/sidebar/ComponentTree.js +69 -216
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/Debug.d.ts +1 -0
- package/dist/editor/sidebar/Debug.js +70 -0
- package/dist/editor/sidebar/Debug.js.map +1 -0
- package/dist/editor/sidebar/EditHistory.js +46 -7
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/Favorites.js +8 -4
- package/dist/editor/sidebar/Favorites.js.map +1 -1
- package/dist/editor/sidebar/GraphQL.d.ts +2 -0
- package/dist/editor/sidebar/GraphQL.js +234 -0
- package/dist/editor/sidebar/GraphQL.js.map +1 -0
- package/dist/editor/sidebar/LeftToolbar.d.ts +1 -0
- package/dist/editor/sidebar/LeftToolbar.js +12 -0
- package/dist/editor/sidebar/LeftToolbar.js.map +1 -0
- package/dist/editor/sidebar/MainContentTree.js +3 -4
- package/dist/editor/sidebar/MainContentTree.js.map +1 -1
- package/dist/editor/sidebar/NavigationPanelItem.js +1 -1
- package/dist/editor/sidebar/NavigationPanelItem.js.map +1 -1
- package/dist/editor/sidebar/NavigationSidebar.d.ts +4 -0
- package/dist/editor/sidebar/NavigationSidebar.js +254 -0
- package/dist/editor/sidebar/NavigationSidebar.js.map +1 -0
- package/dist/editor/sidebar/OperationItem.js +6 -20
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/SidebarPanel.js +7 -30
- package/dist/editor/sidebar/SidebarPanel.js.map +1 -1
- package/dist/editor/sidebar/SidebarStack.js +0 -1
- package/dist/editor/sidebar/SidebarStack.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +12 -22
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +3 -53
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/sidebar/WorkspaceRail.d.ts +1 -0
- package/dist/editor/sidebar/WorkspaceRail.js +167 -56
- package/dist/editor/sidebar/WorkspaceRail.js.map +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js +10 -3
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js.map +1 -1
- package/dist/editor/tree-indicators/GutterColumns.d.ts +1 -3
- package/dist/editor/tree-indicators/GutterColumns.js +5 -26
- package/dist/editor/tree-indicators/GutterColumns.js.map +1 -1
- package/dist/editor/tree-indicators/GutterContext.d.ts +0 -4
- package/dist/editor/tree-indicators/GutterContext.js +0 -23
- package/dist/editor/tree-indicators/GutterContext.js.map +1 -1
- package/dist/editor/tree-indicators/GutterSelector.d.ts +5 -0
- package/dist/editor/tree-indicators/GutterSelector.js +91 -0
- package/dist/editor/tree-indicators/GutterSelector.js.map +1 -0
- package/dist/editor/tree-indicators/index.d.ts +1 -0
- package/dist/editor/tree-indicators/index.js +1 -0
- package/dist/editor/tree-indicators/index.js.map +1 -1
- package/dist/editor/tree-indicators/types.d.ts +1 -12
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js +1 -1
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js.map +1 -1
- package/dist/editor/ui/Icons.js +1 -1
- package/dist/editor/ui/Icons.js.map +1 -1
- package/dist/editor/ui/ItemNameDialogNew.d.ts +0 -2
- package/dist/editor/ui/ItemNameDialogNew.js +17 -33
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
- package/dist/editor/ui/ItemSearch.js +11 -7
- package/dist/editor/ui/ItemSearch.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.js +1 -1
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.d.ts +0 -1
- package/dist/editor/ui/SimpleTabs.js +25 -45
- package/dist/editor/ui/SimpleTabs.js.map +1 -1
- package/dist/editor/ui/Splitter.d.ts +0 -1
- package/dist/editor/ui/Splitter.js +86 -102
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/ui/TemplateSelectorDialog.js +4 -4
- package/dist/editor/ui/TemplateSelectorDialog.js.map +1 -1
- package/dist/editor/ui/TreeListSelector.d.ts +1 -6
- package/dist/editor/ui/TreeListSelector.js +2 -2
- package/dist/editor/ui/TreeListSelector.js.map +1 -1
- package/dist/editor/utils/keyboardNavigation.d.ts +20 -6
- package/dist/editor/utils/keyboardNavigation.js +139 -48
- package/dist/editor/utils/keyboardNavigation.js.map +1 -1
- package/dist/editor/utils.js +9 -19
- package/dist/editor/utils.js.map +1 -1
- package/dist/editor/views/CompareView.d.ts +1 -3
- package/dist/editor/views/CompareView.js +4 -6
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/editor/views/EditView.js +1 -1
- package/dist/editor/views/EditView.js.map +1 -1
- package/dist/editor/views/EditorSlot.js +34 -27
- package/dist/editor/views/EditorSlot.js.map +1 -1
- package/dist/editor/views/ItemEditor.js +3 -7
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/editor/views/MediaFolderEditView.js +1 -1
- package/dist/editor/views/MediaFolderEditView.js.map +1 -1
- package/dist/editor/views/ParheliaView.js +6 -5
- package/dist/editor/views/ParheliaView.js.map +1 -1
- package/dist/editor/views/SingleEditView.d.ts +1 -2
- package/dist/editor/views/SingleEditView.js +8 -10
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/editor/views/editorSlotContext.js +6 -35
- package/dist/editor/views/editorSlotContext.js.map +1 -1
- package/dist/index.d.ts +2 -14
- package/dist/index.js +0 -10
- package/dist/index.js.map +1 -1
- package/dist/licensing/LicenseContext.d.ts +3 -1
- package/dist/licensing/LicenseContext.js +55 -38
- package/dist/licensing/LicenseContext.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/services/setupWizardService.d.ts +13 -40
- package/dist/setup/services/setupWizardService.js +17 -32
- package/dist/setup/services/setupWizardService.js.map +1 -1
- package/dist/setup/wizard/steps/AddModelDialog.js +3 -12
- package/dist/setup/wizard/steps/AddModelDialog.js.map +1 -1
- package/dist/setup/wizard/steps/ImportModelDialog.js +22 -39
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/splash-screen/ModernSplashScreen.js +32 -110
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/NewPage.js +50 -33
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/OpenPage.js +6 -2
- package/dist/splash-screen/OpenPage.js.map +1 -1
- package/dist/splash-screen/ParheliaAssistantChat.js +29 -12
- package/dist/splash-screen/ParheliaAssistantChat.js.map +1 -1
- package/dist/splash-screen/ParheliaLogo.js +37 -87
- package/dist/splash-screen/ParheliaLogo.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +3 -3
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +34 -6
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/AssignAgentDialog.js +13 -1
- package/dist/task-board/components/AssignAgentDialog.js.map +1 -1
- package/dist/task-board/components/TaskAgentPanel.js +11 -1
- package/dist/task-board/components/TaskAgentPanel.js.map +1 -1
- package/dist/task-board/components/TaskAssigneePicker.js +14 -4
- package/dist/task-board/components/TaskAssigneePicker.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationCenter.js +18 -9
- package/dist/task-board/components/WizardCommunicationCenter.js.map +1 -1
- package/dist/tour/Tour.d.ts +1 -2
- package/dist/tour/Tour.js +75 -256
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/default-tour.js +96 -222
- package/dist/tour/default-tour.js.map +1 -1
- package/dist/types.d.ts +29 -63
- package/package.json +13 -17
- package/styles.css +10 -14
package/dist/config/types.d.ts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { ComponentType, ReactNode, SyntheticEvent } from "react";
|
|
2
2
|
import { EditContextType } from "../editor/client/editContext";
|
|
3
|
-
import
|
|
4
|
-
import { Command, CommandData, KeyboardCommand } from "../editor/commands/commands";
|
|
3
|
+
import { Command, CommandData } from "../editor/commands/commands";
|
|
5
4
|
import { EditorWarningProps } from "../editor/EditorWarnings";
|
|
6
5
|
import { Component, Field, FieldButton, FullItem } from "../editor/pageModel";
|
|
7
6
|
import { InsertItemCommand, ItemCommand, ItemCommandData, MoveCopyItemsCommand } from "../editor/commands/itemCommands";
|
|
8
7
|
import { User } from "../types";
|
|
9
8
|
import { ToolbarGroupConfig } from "../editor/field-types/richtext/types";
|
|
10
|
-
import type { ContentTreeIndicatorActionDefinition } from "../editor/tree-indicators/types";
|
|
11
9
|
import { WorkspaceDefinition } from "./types/workspace";
|
|
12
10
|
import { SidebarDefinition } from "./types/sidebar";
|
|
13
|
-
export type NotificationRouteContext = Record<string, unknown>;
|
|
14
|
-
export type NotificationRouteDefinition<TContext extends NotificationRouteContext = NotificationRouteContext> = {
|
|
15
|
-
parseContext: (context: unknown) => TContext | null;
|
|
16
|
-
open: (editContext: EditContextType, context: TContext) => Promise<boolean> | boolean;
|
|
17
|
-
};
|
|
18
11
|
export type RichTextEditorProfile = {
|
|
19
12
|
toolbar: {
|
|
20
13
|
groups: ToolbarGroupConfig[];
|
|
@@ -23,8 +16,6 @@ export type RichTextEditorProfile = {
|
|
|
23
16
|
export type ClientFieldButton = FieldButton & {
|
|
24
17
|
clientAction?: FieldAction;
|
|
25
18
|
visible?: VisibleFunction;
|
|
26
|
-
/** When this returns true, the field action is shown disabled (e.g. missing prerequisite value). */
|
|
27
|
-
isDisabled?: VisibleFunction;
|
|
28
19
|
componentAction?: string;
|
|
29
20
|
isPimaryAction?: boolean;
|
|
30
21
|
};
|
|
@@ -34,26 +25,6 @@ export type FieldActionProps = {
|
|
|
34
25
|
field: Field;
|
|
35
26
|
event?: SyntheticEvent | globalThis.MouseEvent;
|
|
36
27
|
};
|
|
37
|
-
export type ManualSelectorDefinition = {
|
|
38
|
-
name: string;
|
|
39
|
-
selector: string;
|
|
40
|
-
availabilitySelector?: string;
|
|
41
|
-
description: string;
|
|
42
|
-
notFoundMessage?: string;
|
|
43
|
-
location?: string;
|
|
44
|
-
isSidebarOnly?: boolean;
|
|
45
|
-
beforeAction?: string;
|
|
46
|
-
afterAction?: string;
|
|
47
|
-
};
|
|
48
|
-
export type ManualActionProps = {
|
|
49
|
-
editContext: EditContextType;
|
|
50
|
-
selectorDef: ManualSelectorDefinition;
|
|
51
|
-
duration: number;
|
|
52
|
-
runId: string;
|
|
53
|
-
elements: HTMLElement[];
|
|
54
|
-
resolveElements: (selector?: string) => HTMLElement[];
|
|
55
|
-
};
|
|
56
|
-
export type ManualAction = (props: ManualActionProps) => Promise<any> | void;
|
|
57
28
|
export type VariantFieldActionProps = FieldActionProps & {
|
|
58
29
|
variantName?: string;
|
|
59
30
|
variantData?: any;
|
|
@@ -89,7 +60,6 @@ export type PanelFactory = (editContext: EditContextType) => Panel;
|
|
|
89
60
|
export type Sidebar = {
|
|
90
61
|
panels: (Panel | PanelFactory)[];
|
|
91
62
|
title?: string;
|
|
92
|
-
icon?: ReactNode;
|
|
93
63
|
};
|
|
94
64
|
export type ToolbarFactory = (editContext: EditContextType) => ReactNode;
|
|
95
65
|
export type EditorView = {
|
|
@@ -113,6 +83,11 @@ export type EditorView = {
|
|
|
113
83
|
/** Optional default width for the sidebar in pixels. Defaults to 350. */
|
|
114
84
|
defaultSidebarWidth?: number;
|
|
115
85
|
};
|
|
86
|
+
/** @deprecated Use SidebarPanelConfig instead - this type is for sidebar panels */
|
|
87
|
+
export type ViewPanel = {
|
|
88
|
+
name: string;
|
|
89
|
+
content: ReactNode;
|
|
90
|
+
};
|
|
116
91
|
export type SidebarPanelConfig = {
|
|
117
92
|
name: string;
|
|
118
93
|
content: ReactNode;
|
|
@@ -133,6 +108,9 @@ export type MenuItemGroup = {
|
|
|
133
108
|
label?: string;
|
|
134
109
|
items: MenuItem[];
|
|
135
110
|
};
|
|
111
|
+
export type SetupConfiguration = {
|
|
112
|
+
steps: ComponentType[];
|
|
113
|
+
};
|
|
136
114
|
export interface EditorExtensions {
|
|
137
115
|
[key: string]: unknown;
|
|
138
116
|
}
|
|
@@ -200,12 +178,6 @@ export interface AgentDialogComponentRegistration {
|
|
|
200
178
|
/** React component that renders this dialog type */
|
|
201
179
|
component: ComponentType<AgentDialogComponentProps<any, any>>;
|
|
202
180
|
}
|
|
203
|
-
export type ComponentCommandProvider = (components: Component[], editContext: EditContextType) => Promise<ComponentCommand[]> | ComponentCommand[];
|
|
204
|
-
export type CommandTemplateRegistration = {
|
|
205
|
-
commandId: string;
|
|
206
|
-
optionName?: string;
|
|
207
|
-
parentPathPrefix?: string;
|
|
208
|
-
};
|
|
209
181
|
export type EditorConfiguration = {
|
|
210
182
|
extensions: EditorExtensions;
|
|
211
183
|
commands: {
|
|
@@ -213,11 +185,10 @@ export type EditorConfiguration = {
|
|
|
213
185
|
deleteItem: ItemCommand;
|
|
214
186
|
insertItem: InsertItemCommand;
|
|
215
187
|
allItemCommands: Command<ItemCommandData>[];
|
|
216
|
-
keyboardCommands: KeyboardCommand<any>[];
|
|
217
188
|
reviewcommands: Command<CommandData>[];
|
|
218
189
|
moveItems: MoveCopyItemsCommand;
|
|
219
190
|
copyItems: MoveCopyItemsCommand;
|
|
220
|
-
[key: string]: ItemCommand | ItemCommand[] | MoveCopyItemsCommand | InsertItemCommand
|
|
191
|
+
[key: string]: ItemCommand | ItemCommand[] | MoveCopyItemsCommand | InsertItemCommand;
|
|
221
192
|
};
|
|
222
193
|
events: {
|
|
223
194
|
onUnauthorized?: () => void;
|
|
@@ -251,15 +222,12 @@ export type EditorConfiguration = {
|
|
|
251
222
|
defaultWorkspace?: string;
|
|
252
223
|
/** Default sidebars to open in the Editor workspace */
|
|
253
224
|
defaultOpenSidebars?: string[];
|
|
254
|
-
/** Optional config-driven actions for manual locator buttons. */
|
|
255
|
-
manualActions?: Record<string, ManualAction>;
|
|
256
225
|
itemActionsMenu?: {
|
|
257
226
|
itemsFactory: (editContext: EditContextType) => MenuItemGroup[];
|
|
258
227
|
};
|
|
259
228
|
mainNavigation?: (MenuItem | Command<any>)[];
|
|
260
229
|
embedded?: boolean;
|
|
261
230
|
contentTree: {
|
|
262
|
-
indicatorActions?: Record<string, ContentTreeIndicatorActionDefinition>;
|
|
263
231
|
contextMenu: {
|
|
264
232
|
factory: (props: {
|
|
265
233
|
items: FullItem[];
|
|
@@ -270,8 +238,6 @@ export type EditorConfiguration = {
|
|
|
270
238
|
};
|
|
271
239
|
/** Registered agent dialog components for inline UI dialogs */
|
|
272
240
|
agentDialogs?: AgentDialogComponentRegistration[];
|
|
273
|
-
/** Notification type to navigation mapping */
|
|
274
|
-
notificationRoutes?: Record<string, NotificationRouteDefinition<any>>;
|
|
275
241
|
};
|
|
276
242
|
settings: {
|
|
277
243
|
groups: {
|
|
@@ -280,19 +246,13 @@ export type EditorConfiguration = {
|
|
|
280
246
|
panels: SettingsPanel[];
|
|
281
247
|
}[];
|
|
282
248
|
};
|
|
249
|
+
setup?: SetupConfiguration;
|
|
283
250
|
statusChecks?: StatusCheck[];
|
|
284
251
|
/** Custom commands configuration - extensible command system */
|
|
285
252
|
customCommands?: {
|
|
286
253
|
/** Registered handlers for command types (e.g., "agent") */
|
|
287
254
|
handlers: CustomCommandHandler[];
|
|
288
255
|
};
|
|
289
|
-
commandTemplates?: {
|
|
290
|
-
/** Template-folder command templates resolved client-side by insert option typeId */
|
|
291
|
-
byTypeId: Record<string, CommandTemplateRegistration>;
|
|
292
|
-
};
|
|
293
|
-
componentCommands?: {
|
|
294
|
-
providers: ComponentCommandProvider[];
|
|
295
|
-
};
|
|
296
256
|
tours: {
|
|
297
257
|
default: Tour;
|
|
298
258
|
preview: Tour;
|
|
@@ -380,9 +340,7 @@ export type TourStep = {
|
|
|
380
340
|
extendFocus?: number;
|
|
381
341
|
prepareAction?: () => Promise<void>;
|
|
382
342
|
action?: () => Promise<void>;
|
|
383
|
-
bubblePosition?: "left" | "right" | "bottom" | "top
|
|
384
|
-
/** When the bubble sits to the left/right of the focus, align it to the top or vertical center of the focus rect. */
|
|
385
|
-
bubbleVerticalAnchor?: "top" | "center";
|
|
343
|
+
bubblePosition?: "left" | "right" | "bottom" | "top-right" | "bottom-right" | "top-left";
|
|
386
344
|
flipArrow?: boolean;
|
|
387
345
|
waitForUserInput?: () => Promise<string | void>;
|
|
388
346
|
buttons?: TourButton[];
|
|
@@ -391,10 +349,6 @@ export type TourStep = {
|
|
|
391
349
|
getPointTo?: () => DOMRect | undefined;
|
|
392
350
|
pointToElement?: string;
|
|
393
351
|
skipIf?: (configuration: EditorConfiguration) => boolean;
|
|
394
|
-
/** Block page/shell scroll; optional allowSelector keeps scrolling inside that element. */
|
|
395
|
-
lockScroll?: boolean | {
|
|
396
|
-
allowSelector?: string;
|
|
397
|
-
};
|
|
398
352
|
};
|
|
399
353
|
export type GetEditorTourStepsParams = {
|
|
400
354
|
editContext: EditContextType;
|
package/dist/config/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAqdA,wCAAwC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { CopyButton } from "../components/ui/copy-button";
|
|
5
|
+
import { Section } from "./ui/Section";
|
|
6
|
+
import { useEditContext } from "./client/editContext";
|
|
7
|
+
export function ComponentInfo({ component }) {
|
|
8
|
+
if (!component)
|
|
9
|
+
return null;
|
|
10
|
+
const editContext = useEditContext();
|
|
11
|
+
const [layoutItem, setLayoutItem] = useState();
|
|
12
|
+
const [dataSourceItem, setDataSourceItem] = useState();
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (!component.layoutId) {
|
|
15
|
+
setLayoutItem(undefined);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
editContext.itemsRepository
|
|
19
|
+
.getItem({
|
|
20
|
+
id: component.layoutId,
|
|
21
|
+
language: editContext.currentItemDescriptor.language,
|
|
22
|
+
version: 0,
|
|
23
|
+
})
|
|
24
|
+
.then(setLayoutItem);
|
|
25
|
+
}, [component.layoutId]);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
async function loadDataSourceItem() {
|
|
28
|
+
if (!component?.datasourceItem) {
|
|
29
|
+
setDataSourceItem(undefined);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const item = await editContext.itemsRepository.getItem(component.datasourceItem);
|
|
33
|
+
setDataSourceItem(item);
|
|
34
|
+
}
|
|
35
|
+
loadDataSourceItem();
|
|
36
|
+
}, [component.datasourceItem]);
|
|
37
|
+
const hostingPageItem = layoutItem ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "font-bold", children: "Source:" }), _jsxs("div", { children: [layoutItem.path, " ID: ", layoutItem.id] })] })) : null;
|
|
38
|
+
const linkedComponent = component.datasourceItem ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "font-bold", children: "Source:" }), _jsxs("div", { children: [dataSourceItem?.path, " (", dataSourceItem?.id, ")"] })] })) : null;
|
|
39
|
+
return (_jsxs("div", { children: [_jsx("h2", { className: "text-l my-2 px-3 py-3 font-bold", children: component.name }), _jsx(Section, { title: "Info", children: _jsxs("div", { className: "grid grid-cols-[min-content_1fr] gap-3 bg-gray-100 text-xs", children: [_jsx("div", { className: "font-bold", children: "ID:" }), _jsxs("div", { className: "flex items-center gap-1", children: [component.id, " ", _jsx(CopyButton, { textToCopy: component.id, iconOnly: true })] }), _jsx("div", { className: "font-bold", children: "Template" }), _jsxs("div", { children: ["(", component.datasourceItem?.templateId, component.datasourceItem && (_jsx(CopyButton, { textToCopy: component.datasourceItem.templateId, iconOnly: true })), ")"] }), _jsx("div", { className: "font-bold", children: "Languages" }), _jsx("div", { children: dataSourceItem?.translations?.join(", ") }), hostingPageItem, linkedComponent] }) })] }));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=ComponentInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentInfo.js","sourceRoot":"","sources":["../../src/editor/ComponentInfo.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM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forwardRef, useImperativeHandle } from "react";
|
|
3
3
|
import { Dialog, DialogContent, DialogTitle, DialogFooter, } from "../components/ui/dialog";
|
|
4
4
|
import { Button } from "../components/ui/button";
|
|
5
5
|
import { AlertTriangle } from "lucide-react";
|
|
6
6
|
import { cn } from "../lib/utils";
|
|
7
7
|
const ConfirmationDialog = forwardRef((_props, ref) => {
|
|
8
8
|
const [visible, setVisible] = useState(false);
|
|
9
|
-
const resolvedRef = useRef(false);
|
|
10
9
|
const [props, setProps] = useState();
|
|
11
10
|
const showAccept = props?.showAccept === undefined ? true : props.showAccept;
|
|
12
11
|
useImperativeHandle(ref, () => ({
|
|
13
12
|
confirm: (props) => {
|
|
14
|
-
resolvedRef.current = false;
|
|
15
|
-
setProps(props);
|
|
16
13
|
setVisible(true);
|
|
14
|
+
setProps(props);
|
|
17
15
|
},
|
|
18
16
|
}));
|
|
19
17
|
const handleAccept = () => {
|
|
20
|
-
if (resolvedRef.current)
|
|
21
|
-
return;
|
|
22
|
-
resolvedRef.current = true;
|
|
23
18
|
props?.accept();
|
|
24
19
|
setVisible(false);
|
|
25
20
|
};
|
|
26
21
|
const handleReject = () => {
|
|
27
|
-
if (resolvedRef.current)
|
|
28
|
-
return;
|
|
29
|
-
resolvedRef.current = true;
|
|
30
22
|
if (props?.reject)
|
|
31
23
|
props.reject();
|
|
32
24
|
setVisible(false);
|
|
33
25
|
};
|
|
34
|
-
const
|
|
35
|
-
if (open) {
|
|
36
|
-
setVisible(true);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (!resolvedRef.current) {
|
|
40
|
-
resolvedRef.current = true;
|
|
41
|
-
props?.reject?.();
|
|
42
|
-
}
|
|
26
|
+
const handleCancel = () => {
|
|
43
27
|
setVisible(false);
|
|
44
28
|
};
|
|
45
29
|
const isDestructive = props?.acceptLabel === "Delete" || props?.acceptLabel === "Remove";
|
|
46
|
-
return (_jsx(Dialog, { open: visible, onOpenChange:
|
|
30
|
+
return (_jsx(Dialog, { open: visible, onOpenChange: setVisible, children: _jsx(DialogContent, { className: "gap-0 p-0 sm:max-w-[480px] max-h-[80vh] flex flex-col", "data-testid": "confirmation-dialog", children: _jsxs("div", { className: "flex flex-col pt-8 overflow-hidden", children: [_jsx("div", { className: "px-8 pb-4 overflow-y-auto max-h-[50vh]", children: _jsxs("div", { className: "flex items-start gap-4", children: [_jsx("div", { className: cn("flex size-10 shrink-0 items-center justify-center rounded-full", isDestructive ? "bg-red-50 text-red-600" : "bg-amber-50 text-amber-600"), children: props?.icon ? (props.icon) : (_jsx(AlertTriangle, { className: "size-5", strokeWidth: 2 })) }), _jsxs("div", { className: "flex flex-col gap-1 min-w-0 flex-1", children: [_jsx(DialogTitle, { className: "text-xl font-bold", children: props?.header || "Confirmation" }), _jsx("div", { className: "text-sm leading-relaxed text-muted-foreground mt-1", children: props?.message })] })] }) }), _jsxs(DialogFooter, { className: "bg-gray-50/50 mt-4 border-t px-8 py-6 sm:flex-wrap", children: [props?.showCancel && (_jsx(Button, { variant: "outline", onClick: handleCancel, className: "min-w-[100px] w-full sm:w-auto bg-white whitespace-normal break-words text-center max-w-full", children: "Cancel" })), props?.rejectLabel && (_jsx(Button, { variant: "outline", onClick: handleReject, className: "min-w-[100px] w-full sm:w-auto bg-white whitespace-normal break-words text-center max-w-full", children: props.rejectLabel })), showAccept && (_jsx(Button, { onClick: handleAccept, variant: props?.acceptLabel === "Delete" ? "destructive" : "default", className: "min-w-[100px] w-full sm:w-auto whitespace-normal break-words text-center max-w-full", children: props?.acceptLabel || "Yes" }))] })] }) }) }));
|
|
47
31
|
});
|
|
48
32
|
export default ConfirmationDialog;
|
|
49
33
|
//# sourceMappingURL=ConfirmationDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.js","sourceRoot":"","sources":["../../src/editor/ConfirmationDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.js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,KAAC,MAAM,IACL,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,KAAK,EAAE,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EACpE,SAAS,EAAC,qFAAqF,YAE9F,KAAK,EAAE,WAAW,IAAI,KAAK,GACrB,CACV,IACY,IACX,GACQ,GACT,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -10,12 +10,11 @@ type CustomTreeNode = TreeNode & {
|
|
|
10
10
|
selectable?: boolean;
|
|
11
11
|
className?: string;
|
|
12
12
|
};
|
|
13
|
-
export default function ContentTree({ isDraggable, dragEnd, expandIdPath, selectionMode,
|
|
13
|
+
export default function ContentTree({ isDraggable, dragEnd, expandIdPath, selectionMode, selectedItemIds, rootItemIds, onSelectionChange, onItemClick, filter, templateIds, className, includeEmbeddedItems, onDoubleClick, selectPagesOnly, renderNode, renderNodePrefix, onItemInserted, language, includeItemPath, scrollToSelected, disableAutoSelectOnExpand, showGrabCursorForDraggableNodes, enableDragAndDrop, enableContextMenu, hideRootNodes, database, }: {
|
|
14
14
|
isDraggable?: (item: ItemTreeNodeData) => boolean;
|
|
15
15
|
dragEnd?: () => void;
|
|
16
16
|
expandIdPath?: string;
|
|
17
17
|
selectionMode?: "single" | "multiple" | "none";
|
|
18
|
-
multiSelectRequiresModifier?: boolean;
|
|
19
18
|
rootItemIds?: string[];
|
|
20
19
|
selectedItemIds?: string[];
|
|
21
20
|
onSelectionChange?: (itemIds: ItemTreeNodeData[]) => void;
|
|
@@ -13,39 +13,12 @@ import { SquarePlus } from "lucide-react";
|
|
|
13
13
|
import { toast } from "sonner";
|
|
14
14
|
// Create a memoized version of PerfectTree
|
|
15
15
|
const MemoizedPerfectTree = memo(PerfectTree);
|
|
16
|
-
function
|
|
17
|
-
return (values ?? []).join("|");
|
|
18
|
-
}
|
|
19
|
-
function getTreeItemLabel(item, showDisplayNames, fallback = "") {
|
|
20
|
-
if (showDisplayNames && item?.displayName?.trim()) {
|
|
21
|
-
return item.displayName;
|
|
22
|
-
}
|
|
23
|
-
return item?.name || fallback;
|
|
24
|
-
}
|
|
25
|
-
function relabelTreeNodes(nodes, showDisplayNames, parent) {
|
|
26
|
-
return nodes.map((node) => {
|
|
27
|
-
const relabeledNode = {
|
|
28
|
-
...node,
|
|
29
|
-
label: getTreeItemLabel(node.data, showDisplayNames, node.label),
|
|
30
|
-
parent,
|
|
31
|
-
};
|
|
32
|
-
if (Array.isArray(node.children)) {
|
|
33
|
-
relabeledNode.children = relabelTreeNodes(node.children, showDisplayNames, relabeledNode);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
relabeledNode.children = node.children;
|
|
37
|
-
}
|
|
38
|
-
return relabeledNode;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
export default function ContentTree({ isDraggable, dragEnd, expandIdPath, selectionMode, multiSelectRequiresModifier = true, selectedItemIds, rootItemIds, onSelectionChange, onItemClick, filter, templateIds, className, includeEmbeddedItems, onDoubleClick, selectPagesOnly, renderNode, renderNodePrefix, onItemInserted, language, includeItemPath, scrollToSelected, disableAutoSelectOnExpand, showGrabCursorForDraggableNodes, enableDragAndDrop, enableContextMenu, hideRootNodes, database, }) {
|
|
16
|
+
export default function ContentTree({ isDraggable, dragEnd, expandIdPath, selectionMode, selectedItemIds, rootItemIds, onSelectionChange, onItemClick, filter, templateIds, className, includeEmbeddedItems, onDoubleClick, selectPagesOnly, renderNode, renderNodePrefix, onItemInserted, language, includeItemPath, scrollToSelected, disableAutoSelectOnExpand, showGrabCursorForDraggableNodes, enableDragAndDrop, enableContextMenu, hideRootNodes, database, }) {
|
|
42
17
|
const [treeNodes, setTreeNodes] = useState([]);
|
|
43
|
-
const [isLoadingRootNodes, setIsLoadingRootNodes] = useState(false);
|
|
44
18
|
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
45
19
|
const [expandedKeys, setExpandedKeys] = useState([]);
|
|
46
20
|
const treeContainerRef = useRef(null);
|
|
47
21
|
const editContext = useEditContext();
|
|
48
|
-
const showDisplayNames = editContext?.userInfo?.preferences?.showDisplayNames === true;
|
|
49
22
|
const nodeDictionary = useRef({});
|
|
50
23
|
const editContextRef = useEditContextRef();
|
|
51
24
|
const lastSelectedItemId = useRef(undefined);
|
|
@@ -63,7 +36,7 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
63
36
|
children = filter(children);
|
|
64
37
|
return children.map((x) => ({
|
|
65
38
|
key: x.id,
|
|
66
|
-
label:
|
|
39
|
+
label: x.displayName || x.name,
|
|
67
40
|
iconUrl: getAbsoluteIconUrl(x.icon),
|
|
68
41
|
isDraggable: isDraggable && isDraggable(x),
|
|
69
42
|
selectable: !selectPagesOnly || x.hasLayout,
|
|
@@ -75,7 +48,6 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
75
48
|
editContext,
|
|
76
49
|
filter,
|
|
77
50
|
includeEmbeddedItems,
|
|
78
|
-
showDisplayNames,
|
|
79
51
|
isDraggable,
|
|
80
52
|
language,
|
|
81
53
|
selectPagesOnly,
|
|
@@ -110,7 +82,7 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
110
82
|
return;
|
|
111
83
|
return {
|
|
112
84
|
key: item.id,
|
|
113
|
-
label:
|
|
85
|
+
label: item.name,
|
|
114
86
|
iconUrl: getAbsoluteIconUrl(item.icon),
|
|
115
87
|
isDraggable: isDraggable &&
|
|
116
88
|
isDraggable({
|
|
@@ -123,7 +95,7 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
123
95
|
data: item,
|
|
124
96
|
hasChildren: item.hasChildren,
|
|
125
97
|
};
|
|
126
|
-
}, [editContext, isDraggable, selectPagesOnly
|
|
98
|
+
}, [editContext, isDraggable, selectPagesOnly]);
|
|
127
99
|
const loadRootNodes = useCallback(async (force = false) => {
|
|
128
100
|
if (!force && treeNodes.length > 0)
|
|
129
101
|
return treeNodes;
|
|
@@ -214,7 +186,7 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
214
186
|
// (Mutating the existing object won't trigger memoized component updates)
|
|
215
187
|
const updatedNode = {
|
|
216
188
|
...customNode,
|
|
217
|
-
label:
|
|
189
|
+
label: item.name,
|
|
218
190
|
iconUrl: getAbsoluteIconUrl(item.icon),
|
|
219
191
|
isDraggable: isDraggable &&
|
|
220
192
|
isDraggable({
|
|
@@ -270,39 +242,27 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
270
242
|
doPreloadNodes,
|
|
271
243
|
isDraggable,
|
|
272
244
|
selectPagesOnly,
|
|
273
|
-
showDisplayNames,
|
|
274
245
|
]);
|
|
275
|
-
useEffect(() => {
|
|
276
|
-
setTreeNodes((prev) => {
|
|
277
|
-
if (prev.length === 0)
|
|
278
|
-
return prev;
|
|
279
|
-
return relabelTreeNodes(prev, showDisplayNames);
|
|
280
|
-
});
|
|
281
|
-
}, [showDisplayNames]);
|
|
282
246
|
// Track whether initial load has completed to avoid force-reloading on every itemsRepository reference change
|
|
283
247
|
const hasInitializedRef = useRef(false);
|
|
284
248
|
const prevLanguageRef = useRef(language);
|
|
285
|
-
const
|
|
249
|
+
const prevRootItemIdsRef = useRef(rootItemIds);
|
|
286
250
|
const prevHideRootNodesRef = useRef(hideRootNodes);
|
|
287
|
-
const prevDatabaseRef = useRef(database);
|
|
288
251
|
// Counter to track preLoadNodes calls and prevent race conditions
|
|
289
252
|
const preLoadVersionRef = useRef(0);
|
|
290
253
|
// Handle root items or language changes
|
|
291
254
|
useEffect(() => {
|
|
292
255
|
if (!editContext?.itemsRepository)
|
|
293
256
|
return;
|
|
294
|
-
const rootItemIdsSignature = getArraySignature(rootItemIds);
|
|
295
257
|
// Determine if we need a force reload (initial load or key props changed)
|
|
296
258
|
const needsForceReload = !hasInitializedRef.current ||
|
|
297
259
|
prevLanguageRef.current !== language ||
|
|
298
|
-
|
|
299
|
-
prevHideRootNodesRef.current !== hideRootNodes
|
|
300
|
-
prevDatabaseRef.current !== database;
|
|
260
|
+
prevRootItemIdsRef.current !== rootItemIds ||
|
|
261
|
+
prevHideRootNodesRef.current !== hideRootNodes;
|
|
301
262
|
// Update refs
|
|
302
263
|
prevLanguageRef.current = language;
|
|
303
|
-
|
|
264
|
+
prevRootItemIdsRef.current = rootItemIds;
|
|
304
265
|
prevHideRootNodesRef.current = hideRootNodes;
|
|
305
|
-
prevDatabaseRef.current = database;
|
|
306
266
|
if (!needsForceReload) {
|
|
307
267
|
// Skip reload - only itemsRepository reference changed, tree is already initialized
|
|
308
268
|
return;
|
|
@@ -310,16 +270,10 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
310
270
|
hasInitializedRef.current = true;
|
|
311
271
|
setIsInitialized(true);
|
|
312
272
|
const load = async () => {
|
|
313
|
-
|
|
314
|
-
try {
|
|
315
|
-
await preLoadNodes(expandedKeys || [], true);
|
|
316
|
-
}
|
|
317
|
-
finally {
|
|
318
|
-
setIsLoadingRootNodes(false);
|
|
319
|
-
}
|
|
273
|
+
await preLoadNodes(expandedKeys || [], true);
|
|
320
274
|
};
|
|
321
275
|
load();
|
|
322
|
-
}, [language, rootItemIds, hideRootNodes,
|
|
276
|
+
}, [language, rootItemIds, hideRootNodes, editContext?.itemsRepository]);
|
|
323
277
|
useEffect(() => {
|
|
324
278
|
if (!editContext?.itemsRepository)
|
|
325
279
|
return;
|
|
@@ -380,15 +334,10 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
380
334
|
setExpandedKeys(combinedKeys);
|
|
381
335
|
// Preload nodes for programmatic expansion (from expandIdPath)
|
|
382
336
|
if (isInitialized) {
|
|
383
|
-
|
|
337
|
+
preLoadNodes(combinedKeys, false);
|
|
384
338
|
}
|
|
385
339
|
}
|
|
386
|
-
|
|
387
|
-
// When expandIdPath is applied before initialization finishes, retry the
|
|
388
|
-
// preload once the root nodes are available so expanded nodes render children.
|
|
389
|
-
void preLoadNodes(expandedKeys, false);
|
|
390
|
-
}
|
|
391
|
-
}, [expandIdPath, rootItemIds, isInitialized]);
|
|
340
|
+
}, [expandIdPath, rootItemIds]);
|
|
392
341
|
useEffect(() => {
|
|
393
342
|
const newNodeDictionary = {};
|
|
394
343
|
createMap(treeNodes, newNodeDictionary);
|
|
@@ -681,26 +630,24 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
681
630
|
});
|
|
682
631
|
if (menuItems && menuItems.length > 0) {
|
|
683
632
|
clearTimeout(loadingTimer);
|
|
684
|
-
const
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
openInNewSlot: true,
|
|
694
|
-
});
|
|
695
|
-
},
|
|
633
|
+
const withOpenInNewSlot = [
|
|
634
|
+
{
|
|
635
|
+
id: "open-in-new-slot",
|
|
636
|
+
label: "Open in new slot",
|
|
637
|
+
icon: _jsx(SquarePlus, { className: "h-4 w-4" }),
|
|
638
|
+
command: async () => {
|
|
639
|
+
await editContext?.loadItem(openInNewSlotItem, {
|
|
640
|
+
openInNewSlot: true,
|
|
641
|
+
});
|
|
696
642
|
},
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
643
|
+
},
|
|
644
|
+
{ id: "sep-open-in-new-slot", separator: true },
|
|
645
|
+
...menuItems,
|
|
646
|
+
];
|
|
700
647
|
if (loadingShown)
|
|
701
|
-
editContext?.updateContextMenu(
|
|
648
|
+
editContext?.updateContextMenu(withOpenInNewSlot);
|
|
702
649
|
else
|
|
703
|
-
editContext?.showContextMenu(syntheticEvent,
|
|
650
|
+
editContext?.showContextMenu(syntheticEvent, withOpenInNewSlot);
|
|
704
651
|
}
|
|
705
652
|
}, [
|
|
706
653
|
itemCommands,
|
|
@@ -755,9 +702,7 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
755
702
|
newSelection = [nodeKey];
|
|
756
703
|
}
|
|
757
704
|
}
|
|
758
|
-
else if (selectionMode === "multiple" &&
|
|
759
|
-
(ev.ctrlKey || ev.metaKey || !multiSelectRequiresModifier)) {
|
|
760
|
-
lastSelectedItemId.current = nodeKey;
|
|
705
|
+
else if (selectionMode === "multiple" && ev.ctrlKey) {
|
|
761
706
|
newSelection = selectedKeys.includes(nodeKey)
|
|
762
707
|
? selectedKeys.filter((x) => x !== nodeKey)
|
|
763
708
|
: [...selectedKeys, nodeKey];
|
|
@@ -783,13 +728,7 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
783
728
|
onItemClick(clickedNode.data, ev);
|
|
784
729
|
}
|
|
785
730
|
}
|
|
786
|
-
}, [
|
|
787
|
-
multiSelectRequiresModifier,
|
|
788
|
-
onSelectionChange,
|
|
789
|
-
onItemClick,
|
|
790
|
-
selectionMode,
|
|
791
|
-
selectedKeys,
|
|
792
|
-
]);
|
|
731
|
+
}, [onSelectionChange, onItemClick, selectionMode, selectedKeys]);
|
|
793
732
|
// RenderNode function
|
|
794
733
|
const memoizedRenderNode = renderNode
|
|
795
734
|
? (node) => renderNode(node, (n) => nodeTemplate(n))
|
|
@@ -831,7 +770,7 @@ export default function ContentTree({ isDraggable, dragEnd, expandIdPath, select
|
|
|
831
770
|
handleDrop(parent, index, event);
|
|
832
771
|
}, [handleDrop]);
|
|
833
772
|
if (!memoizedTreeNodes.length)
|
|
834
|
-
return (_jsx("div", { className: cn(className, "relative
|
|
835
|
-
return (_jsx(_Fragment, { children: _jsx("div", { className: cn(className, "text-dark
|
|
773
|
+
return (_jsx("div", { className: cn(className, "relative"), "data-testid": "content-tree", children: _jsxs("div", { className: "absolute inset-0 flex items-center justify-center gap-2 text-xs text-gray-500", children: [_jsx(Spinner, { size: "sm" }), " Loading..."] }) }));
|
|
774
|
+
return (_jsx(_Fragment, { children: _jsx("div", { className: cn(className, "text-dark font-light"), ref: treeContainerRef, "data-parhelia-content-tree": "true", "data-testid": "content-tree", children: _jsx(MemoizedPerfectTree, { enableKeyboardSearch: true, nodes: memoizedTreeNodes, expandedKeys: expandedKeys, onToggleExpand: handleToggleExpand, renderNode: memoizedRenderNode, renderNodePrefix: renderNodePrefix, onLazyLoad: handleLazyLoad, onDoubleClick: handleDoubleClick, onSelect: handleNodeSelect, selectedKeys: selectedKeys, onContextMenu: onContextMenu, enableDragAndDrop: enableDragAndDrop, multiDragNoun: "items", onStartDrag: handleDragStart, onDragOverZone: handleDragOverZone, onDragEnd: handleDragEnd, isDragging: editContext?.dragObject !== undefined, onDrop: handleDropCallback, scrollToSelected: scrollToSelected, disableAutoSelectOnExpand: disableAutoSelectOnExpand }) }) }));
|
|
836
775
|
}
|
|
837
776
|
//# sourceMappingURL=ContentTree.js.map
|