@parhelia/core 0.1.12554 → 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 +98 -187
- 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 -4
- package/dist/config/config.js +70 -250
- package/dist/config/config.js.map +1 -1
- package/dist/config/types/workspace.d.ts +0 -6
- package/dist/config/types.d.ts +12 -63
- 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 +22 -87
- 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/ImageEditor.js +2 -5
- package/dist/editor/ImageEditor.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 +8 -65
- 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 +15 -17
- 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 +483 -2377
- 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 +113 -150
- 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 +1 -2
- package/dist/editor/ai/useAgentStatus.js +99 -86
- 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.d.ts +1 -4
- package/dist/editor/client/EditorShell.js +230 -730
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +19 -33
- 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/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/DevModeIndicator.js +2 -2
- package/dist/editor/client/ui/DevModeIndicator.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/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 +5 -13
- 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 +24 -181
- 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/field-types/textContextMenuFactory.js +2 -3
- package/dist/editor/field-types/textContextMenuFactory.js.map +1 -1
- package/dist/editor/media-selector/AiImageSearchPrompt.js +2 -4
- package/dist/editor/media-selector/AiImageSearchPrompt.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 +38 -16
- 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 +220 -597
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +2 -13
- 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 +301 -301
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.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 +115 -348
- package/dist/editor/page-viewer/PageViewerFrame.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 +12 -26
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +5 -7
- 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 -25
- 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 -52
- package/dist/editor/services/editService.js +2 -94
- 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/api.d.ts +2 -1
- package/dist/editor/services-server/api.js +6 -11
- package/dist/editor/services-server/api.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 +23 -25
- 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 +6 -7
- 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/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 -22
- 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/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 +7 -21
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/SidebarPanel.d.ts +1 -3
- package/dist/editor/sidebar/SidebarPanel.js +12 -44
- package/dist/editor/sidebar/SidebarPanel.js.map +1 -1
- package/dist/editor/sidebar/SidebarStack.d.ts +1 -2
- package/dist/editor/sidebar/SidebarStack.js +3 -4
- 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/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 +140 -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 +5 -7
- 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 -16
- package/dist/index.js +0 -11
- package/dist/index.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 -112
- 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/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 +15 -19
- package/styles.css +10 -14
|
@@ -8,10 +8,7 @@ import { useDebouncedCallback } from "use-debounce";
|
|
|
8
8
|
import { createOrUpdateSuggestedEdit } from "../services/suggestedEditsService";
|
|
9
9
|
import { decode } from "html-entities";
|
|
10
10
|
import { GUID_REGEX_EXACT, getItemDescriptor } from "../utils";
|
|
11
|
-
import { copyItemsNeedsTerminalCompletion, waitForEditOperationTerminal, } from "./waitForEditOperationTerminal";
|
|
12
11
|
import { ExternalChangesWarningContent, TreeOperationConfirmContent, UndoDifferentItemContent, } from "./OperationDialogContent";
|
|
13
|
-
/** When true, the delete dialog shows "permanently delete (bypass recycle bin)". */
|
|
14
|
-
const ENABLE_HARD_DELETE_IN_DELETE_DIALOG = false;
|
|
15
12
|
// Track pending suggested edit save requests to prevent race conditions
|
|
16
13
|
const pendingSuggestedEditSaves = new Map();
|
|
17
14
|
// Track pending suggested edits to prevent creating duplicates before server response
|
|
@@ -44,10 +41,6 @@ export function getOperationsContext(state, ui) {
|
|
|
44
41
|
const [executingEditOperations, setExecutingEditOperations] = useState([]);
|
|
45
42
|
const lastOp = useRef(undefined);
|
|
46
43
|
const undoing = useRef(false);
|
|
47
|
-
// Track operation IDs that were successfully undone/redone but whose React state update
|
|
48
|
-
// hasn't been rendered yet. Cleared on each render (when stateRef.current is up-to-date).
|
|
49
|
-
const recentlyUndoneIds = useRef(new Set());
|
|
50
|
-
const recentlyRedoneIds = useRef(new Set());
|
|
51
44
|
// Cache for field items (template field definitions) - these are static and don't change during editing
|
|
52
45
|
// This prevents refetching on every keystroke since itemsRepository always refetches version 0
|
|
53
46
|
const fieldItemsCache = useRef(new Map());
|
|
@@ -55,10 +48,6 @@ export function getOperationsContext(state, ui) {
|
|
|
55
48
|
// Update ref synchronously during render (not via useEffect) to avoid stale state issues
|
|
56
49
|
// This ensures stateRef.current always has the latest state when undo/redo is called
|
|
57
50
|
stateRef.current = state;
|
|
58
|
-
// The render means React has processed pending state updates, so the editHistory in
|
|
59
|
-
// stateRef is now authoritative. Clear the recently-processed tracking sets.
|
|
60
|
-
recentlyUndoneIds.current.clear();
|
|
61
|
-
recentlyRedoneIds.current.clear();
|
|
62
51
|
// Extract values to avoid state object reference issues
|
|
63
52
|
const itemsRepository = stateRef.current.itemsRepository;
|
|
64
53
|
// Debounced version of createOrUpdateSuggestedEdit to prevent excessive API calls
|
|
@@ -125,22 +114,6 @@ export function getOperationsContext(state, ui) {
|
|
|
125
114
|
const result = await executeOp(op);
|
|
126
115
|
return result;
|
|
127
116
|
}, [executeOp]);
|
|
128
|
-
const updateRenderingParameters = useCallback(async (componentId, parameters) => {
|
|
129
|
-
const pageItem = stateRef.current.page?.item?.descriptor;
|
|
130
|
-
if (!pageItem) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
const op = {
|
|
134
|
-
type: "update-rendering-parameters",
|
|
135
|
-
componentId,
|
|
136
|
-
parameters,
|
|
137
|
-
mainItem: pageItem,
|
|
138
|
-
date: new Date().toISOString(),
|
|
139
|
-
id: uuid(),
|
|
140
|
-
title: "Update rendering parameters",
|
|
141
|
-
};
|
|
142
|
-
await executeOp(op, { refresh: "immediate" });
|
|
143
|
-
}, [executeOp]);
|
|
144
117
|
const handleResult = (result, options) => {
|
|
145
118
|
if (handleErrorResult(result, ui, stateRef.current)) {
|
|
146
119
|
return;
|
|
@@ -266,28 +239,12 @@ export function getOperationsContext(state, ui) {
|
|
|
266
239
|
title: "Rename item",
|
|
267
240
|
});
|
|
268
241
|
stateRef.current.requestRefresh("immediate");
|
|
269
|
-
// Only properties changed (name
|
|
270
|
-
//
|
|
271
|
-
|
|
272
|
-
const currentLoadedItem = stateRef.current.item;
|
|
273
|
-
const descriptorsToRefresh = [item];
|
|
274
|
-
if (currentLoadedItem &&
|
|
275
|
-
currentLoadedItem.id === item.id &&
|
|
276
|
-
currentLoadedItem.language === item.language) {
|
|
277
|
-
descriptorsToRefresh.push(currentLoadedItem.descriptor);
|
|
278
|
-
}
|
|
279
|
-
// Await the refresh to ensure cache is updated and events are fired before returning.
|
|
280
|
-
await itemsRepository.refreshItems(descriptorsToRefresh, {
|
|
242
|
+
// Only properties changed (name), not children
|
|
243
|
+
// Await the refresh to ensure cache is updated and events are fired before returning
|
|
244
|
+
await itemsRepository.refreshItems([item], {
|
|
281
245
|
properties: true,
|
|
282
246
|
children: false,
|
|
283
247
|
});
|
|
284
|
-
// If the renamed item is currently loaded, force a descriptor reload so
|
|
285
|
-
// UI panels (e.g. Item Info) don't remain one rename behind.
|
|
286
|
-
if (currentLoadedItem &&
|
|
287
|
-
currentLoadedItem.id === item.id &&
|
|
288
|
-
currentLoadedItem.language === item.language) {
|
|
289
|
-
await stateRef.current.loadItem(currentLoadedItem.descriptor);
|
|
290
|
-
}
|
|
291
248
|
}, [itemsRepository, executeOp]);
|
|
292
249
|
const lastEditField = useRef(undefined);
|
|
293
250
|
const editField = useCallback(async ({ field, value, rawValue, refresh = "immediate", }) => {
|
|
@@ -494,9 +451,6 @@ export function getOperationsContext(state, ui) {
|
|
|
494
451
|
// This ensures the UI only changes when the operation truly completes
|
|
495
452
|
handleResult(result, { refresh: "immediate" });
|
|
496
453
|
if (result.type === "success") {
|
|
497
|
-
for (const op of ops) {
|
|
498
|
-
recentlyUndoneIds.current.add(op.id);
|
|
499
|
-
}
|
|
500
454
|
// Check if any operations are executing in background (long-running undo)
|
|
501
455
|
const executingOps = result.data.filter((x) => x.executionStatus === "executing");
|
|
502
456
|
if (executingOps.length > 0) {
|
|
@@ -540,21 +494,12 @@ export function getOperationsContext(state, ui) {
|
|
|
540
494
|
}
|
|
541
495
|
else {
|
|
542
496
|
ui.showErrorToast({ summary: result.summary, details: result.details });
|
|
543
|
-
// Refresh history so toolbar state matches server (fixes inconsistent UI under load)
|
|
544
|
-
stateRef.current.refreshHistory?.(stateRef.current.historyMode, stateRef.current.showOnlyMyChanges);
|
|
545
497
|
return false;
|
|
546
498
|
}
|
|
547
499
|
}, [ui, itemsRepository]);
|
|
548
500
|
const undoOperations = useCallback(async (operationIds) => {
|
|
549
|
-
if (!operationIds.length)
|
|
501
|
+
if (undoing.current || !operationIds.length) {
|
|
550
502
|
return false;
|
|
551
|
-
if (undoing.current) {
|
|
552
|
-
const deadline = Date.now() + 5000;
|
|
553
|
-
while (undoing.current && Date.now() < deadline) {
|
|
554
|
-
await new Promise((r) => setTimeout(r, 50));
|
|
555
|
-
}
|
|
556
|
-
if (undoing.current)
|
|
557
|
-
return false;
|
|
558
503
|
}
|
|
559
504
|
undoing.current = true;
|
|
560
505
|
try {
|
|
@@ -580,12 +525,7 @@ export function getOperationsContext(state, ui) {
|
|
|
580
525
|
}, [executeUndoOperation]);
|
|
581
526
|
const undo = useCallback(async (operationId) => {
|
|
582
527
|
if (undoing.current) {
|
|
583
|
-
|
|
584
|
-
while (undoing.current && Date.now() < deadline) {
|
|
585
|
-
await new Promise((r) => setTimeout(r, 50));
|
|
586
|
-
}
|
|
587
|
-
if (undoing.current)
|
|
588
|
-
return false;
|
|
528
|
+
return false;
|
|
589
529
|
}
|
|
590
530
|
undoing.current = true;
|
|
591
531
|
try {
|
|
@@ -593,27 +533,11 @@ export function getOperationsContext(state, ui) {
|
|
|
593
533
|
const filterBySession = stateRef.current.showOnlyMyChanges;
|
|
594
534
|
const historyMode = stateRef.current.historyMode;
|
|
595
535
|
let ops;
|
|
596
|
-
// If
|
|
597
|
-
//
|
|
598
|
-
// and fall through to the general selection logic below.
|
|
599
|
-
if (operationId && recentlyUndoneIds.current.has(operationId)) {
|
|
600
|
-
operationId = undefined;
|
|
601
|
-
}
|
|
602
|
-
// If a specific operationId is provided (from the UI), always honor it so the UI and
|
|
603
|
-
// server stay in sync under load. Use the op from history if present (for confirmations),
|
|
604
|
-
// otherwise call the API with just the id (server is source of truth).
|
|
536
|
+
// If a specific operationId is provided, use that operation directly
|
|
537
|
+
// This ensures we undo the exact operation the UI showed, avoiding stale state issues
|
|
605
538
|
if (operationId) {
|
|
606
539
|
const targetOp = stateRef.current.editHistory.find((x) => x.id === operationId && x.canUndo);
|
|
607
|
-
|
|
608
|
-
ops = [targetOp];
|
|
609
|
-
}
|
|
610
|
-
else {
|
|
611
|
-
// Not in local state (e.g. history refreshed under load). Call API with this id
|
|
612
|
-
// so we don't silently do nothing; server will accept or return an error.
|
|
613
|
-
ops = [
|
|
614
|
-
{ id: operationId, type: "unknown" },
|
|
615
|
-
];
|
|
616
|
-
}
|
|
540
|
+
ops = targetOp ? [targetOp] : [];
|
|
617
541
|
}
|
|
618
542
|
else {
|
|
619
543
|
// Select undoable operations respecting showOnlyMyChanges and historyMode filters
|
|
@@ -621,8 +545,6 @@ export function getOperationsContext(state, ui) {
|
|
|
621
545
|
.filter((x) => {
|
|
622
546
|
if (!x.canUndo)
|
|
623
547
|
return false;
|
|
624
|
-
if (recentlyUndoneIds.current.has(x.id))
|
|
625
|
-
return false;
|
|
626
548
|
// Session filter (showOnlyMyChanges)
|
|
627
549
|
if (filterBySession &&
|
|
628
550
|
x.sessionId !== stateRef.current.sessionId) {
|
|
@@ -658,10 +580,6 @@ export function getOperationsContext(state, ui) {
|
|
|
658
580
|
undoing.current = false;
|
|
659
581
|
return false;
|
|
660
582
|
}
|
|
661
|
-
// When we only have an id (op not in local history), skip confirmations and call API
|
|
662
|
-
if (firstOp.type === "unknown") {
|
|
663
|
-
return await executeUndoOperation(ops);
|
|
664
|
-
}
|
|
665
583
|
// Check if this is a cross-session operation and show warning first
|
|
666
584
|
const isCrossSession = firstOp.sessionId !== stateRef.current.sessionId;
|
|
667
585
|
if (isCrossSession) {
|
|
@@ -822,7 +740,6 @@ export function getOperationsContext(state, ui) {
|
|
|
822
740
|
// which merges server responses + websocket updates while enforcing scope filtering.
|
|
823
741
|
handleResult(result, { refresh: "immediate" });
|
|
824
742
|
if (result.type === "success") {
|
|
825
|
-
recentlyRedoneIds.current.add(op.id);
|
|
826
743
|
// Check if the operation is executing in background (long-running redo)
|
|
827
744
|
const executingOps = result.data.filter((x) => x.executionStatus === "executing");
|
|
828
745
|
if (executingOps.length > 0) {
|
|
@@ -852,19 +769,12 @@ export function getOperationsContext(state, ui) {
|
|
|
852
769
|
}
|
|
853
770
|
else {
|
|
854
771
|
ui.showErrorToast({ summary: result.summary, details: result.details });
|
|
855
|
-
stateRef.current.refreshHistory?.(stateRef.current.historyMode, stateRef.current.showOnlyMyChanges);
|
|
856
772
|
return false;
|
|
857
773
|
}
|
|
858
774
|
}, [ui, itemsRepository]);
|
|
859
775
|
const redo = useCallback(async (operationId) => {
|
|
860
|
-
if (undoing.current)
|
|
861
|
-
|
|
862
|
-
while (undoing.current && Date.now() < deadline) {
|
|
863
|
-
await new Promise((r) => setTimeout(r, 50));
|
|
864
|
-
}
|
|
865
|
-
if (undoing.current)
|
|
866
|
-
return false;
|
|
867
|
-
}
|
|
776
|
+
if (undoing.current)
|
|
777
|
+
return false;
|
|
868
778
|
undoing.current = true;
|
|
869
779
|
try {
|
|
870
780
|
const currentItem = stateRef.current.item?.descriptor;
|
|
@@ -873,28 +783,16 @@ export function getOperationsContext(state, ui) {
|
|
|
873
783
|
const filterBySession = stateRef.current.showOnlyMyChanges;
|
|
874
784
|
const historyMode = stateRef.current.historyMode;
|
|
875
785
|
let op;
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
}
|
|
879
|
-
// If a specific operationId is provided (from the UI), always honor it so the UI and
|
|
880
|
-
// server stay in sync under load. Use the op from history if present (for confirmations),
|
|
881
|
-
// otherwise call the API with just the id (server is source of truth).
|
|
786
|
+
// If a specific operationId is provided, use that operation directly
|
|
787
|
+
// This ensures we redo the exact operation the UI showed, avoiding stale state issues
|
|
882
788
|
if (operationId) {
|
|
883
789
|
op = stateRef.current.editHistory.find((x) => x.id === operationId && x.canRedo);
|
|
884
|
-
if (!op) {
|
|
885
|
-
op = {
|
|
886
|
-
id: operationId,
|
|
887
|
-
type: "unknown",
|
|
888
|
-
};
|
|
889
|
-
}
|
|
890
790
|
}
|
|
891
791
|
else {
|
|
892
792
|
// Select redoable operations respecting showOnlyMyChanges and historyMode filters
|
|
893
793
|
op = [...stateRef.current.editHistory].reverse().find((x) => {
|
|
894
794
|
if (!x.canRedo)
|
|
895
795
|
return false;
|
|
896
|
-
if (recentlyRedoneIds.current.has(x.id))
|
|
897
|
-
return false;
|
|
898
796
|
// Session filter (showOnlyMyChanges)
|
|
899
797
|
if (filterBySession && x.sessionId !== stateRef.current.sessionId) {
|
|
900
798
|
return false;
|
|
@@ -921,10 +819,6 @@ export function getOperationsContext(state, ui) {
|
|
|
921
819
|
}
|
|
922
820
|
if (!op)
|
|
923
821
|
return false;
|
|
924
|
-
// When we only have an id (op not in local history), skip confirmations and call API
|
|
925
|
-
if (op.type === "unknown") {
|
|
926
|
-
return await executeRedoOperation(op);
|
|
927
|
-
}
|
|
928
822
|
// Check if this is a cross-session operation and show warning first
|
|
929
823
|
const isCrossSession = op.sessionId !== stateRef.current.sessionId;
|
|
930
824
|
if (isCrossSession) {
|
|
@@ -1060,36 +954,19 @@ export function getOperationsContext(state, ui) {
|
|
|
1060
954
|
// Show confirmation dialog (with reference warning if applicable)
|
|
1061
955
|
const result = await new Promise((resolve) => {
|
|
1062
956
|
const undoCheckboxId = `delete-enable-undo-${Date.now()}`;
|
|
1063
|
-
const
|
|
1064
|
-
const deleteOptions = (_jsxs("div", { className: "mt-4 space-y-3", children: [ENABLE_HARD_DELETE_IN_DELETE_DIALOG ? (_jsx("div", { className: "rounded-md border border-red-200 bg-red-50/60 p-3", children: _jsxs("label", { className: "flex cursor-pointer items-start gap-2", children: [_jsx("input", { type: "checkbox", id: hardDeleteCheckboxId, "data-testid": "delete-hard-delete-checkbox", defaultChecked: options?.hardDelete ?? false, className: "mt-0.5 h-4 w-4 rounded border-gray-300" }), _jsxs("span", { className: "space-y-1", children: [_jsx("span", { className: "block text-sm font-medium text-red-900", children: "Permanently delete (bypass recycle bin)" }), _jsx("span", { className: "block text-xs text-red-800", children: "This skips the recycle bin. Items can only be restored if undo is enabled for this operation." })] })] }) })) : null, _jsxs("label", { className: "flex cursor-pointer items-center gap-2", children: [_jsx("input", { type: "checkbox", id: undoCheckboxId, "data-testid": "delete-enable-undo-checkbox", defaultChecked: options?.canUndo ?? true, className: "h-4 w-4 rounded border-gray-300" }), _jsx("span", { className: "text-sm", children: "Enable undo (serializes complete content)" })] })] }));
|
|
957
|
+
const undoCheckbox = (_jsx("div", { className: "mt-4", children: _jsxs("label", { className: "flex cursor-pointer items-center gap-2", children: [_jsx("input", { type: "checkbox", id: undoCheckboxId, defaultChecked: true, className: "h-4 w-4 rounded border-gray-300" }), _jsx("span", { className: "text-sm", children: "Enable undo (serializes complete content)" })] }) }));
|
|
1065
958
|
const getEnableUndo = () => {
|
|
1066
959
|
const checkbox = document.getElementById(undoCheckboxId);
|
|
1067
|
-
return checkbox?.checked ??
|
|
1068
|
-
};
|
|
1069
|
-
const getHardDelete = () => {
|
|
1070
|
-
if (!ENABLE_HARD_DELETE_IN_DELETE_DIALOG)
|
|
1071
|
-
return false;
|
|
1072
|
-
const checkbox = document.getElementById(hardDeleteCheckboxId);
|
|
1073
|
-
return checkbox?.checked ?? options?.hardDelete ?? false;
|
|
960
|
+
return checkbox?.checked ?? true;
|
|
1074
961
|
};
|
|
1075
962
|
if (hasReferences) {
|
|
1076
963
|
ui.confirmationDialogRef.current?.confirm({
|
|
1077
964
|
header: "Delete Items with References",
|
|
1078
|
-
message: (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { children: "You are about to delete the following items which are referenced by other content:" }), _jsx(DeleteItemsWarning, { references: references }), _jsx("p", { className: "text-muted-foreground mt-4 text-sm", children: "Deleting these items may break links in your content. Are you sure you want to proceed?" }),
|
|
965
|
+
message: (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { children: "You are about to delete the following items which are referenced by other content:" }), _jsx(DeleteItemsWarning, { references: references }), _jsx("p", { className: "text-muted-foreground mt-4 text-sm", children: "Deleting these items may break links in your content. Are you sure you want to proceed?" }), undoCheckbox] })),
|
|
1079
966
|
acceptLabel: "Delete Anyway",
|
|
1080
967
|
rejectLabel: "Cancel",
|
|
1081
|
-
accept: () => resolve({
|
|
1082
|
-
|
|
1083
|
-
enableUndo: getEnableUndo(),
|
|
1084
|
-
hardDelete: getHardDelete(),
|
|
1085
|
-
}),
|
|
1086
|
-
reject: () => resolve({
|
|
1087
|
-
confirmed: false,
|
|
1088
|
-
enableUndo: options?.canUndo ?? true,
|
|
1089
|
-
hardDelete: ENABLE_HARD_DELETE_IN_DELETE_DIALOG
|
|
1090
|
-
? (options?.hardDelete ?? false)
|
|
1091
|
-
: false,
|
|
1092
|
-
}),
|
|
968
|
+
accept: () => resolve({ confirmed: true, enableUndo: getEnableUndo() }),
|
|
969
|
+
reject: () => resolve({ confirmed: false, enableUndo: true }),
|
|
1093
970
|
showCancel: false,
|
|
1094
971
|
});
|
|
1095
972
|
}
|
|
@@ -1097,21 +974,11 @@ export function getOperationsContext(state, ui) {
|
|
|
1097
974
|
// No references - use simple confirmation
|
|
1098
975
|
ui.confirmationDialogRef.current?.confirm({
|
|
1099
976
|
header: "Delete Items",
|
|
1100
|
-
message: (_jsxs("div", { children: [_jsxs("p", { children: ["Are you sure you want to delete",
|
|
977
|
+
message: (_jsxs("div", { children: [_jsxs("p", { children: ["Are you sure you want to delete ", items.length === 1 ? "this item" : `these ${items.length} items`, "?"] }), undoCheckbox] })),
|
|
1101
978
|
acceptLabel: "Delete",
|
|
1102
979
|
rejectLabel: "Cancel",
|
|
1103
|
-
accept: () => resolve({
|
|
1104
|
-
|
|
1105
|
-
enableUndo: getEnableUndo(),
|
|
1106
|
-
hardDelete: getHardDelete(),
|
|
1107
|
-
}),
|
|
1108
|
-
reject: () => resolve({
|
|
1109
|
-
confirmed: false,
|
|
1110
|
-
enableUndo: options?.canUndo ?? true,
|
|
1111
|
-
hardDelete: ENABLE_HARD_DELETE_IN_DELETE_DIALOG
|
|
1112
|
-
? (options?.hardDelete ?? false)
|
|
1113
|
-
: false,
|
|
1114
|
-
}),
|
|
980
|
+
accept: () => resolve({ confirmed: true, enableUndo: getEnableUndo() }),
|
|
981
|
+
reject: () => resolve({ confirmed: false, enableUndo: true }),
|
|
1115
982
|
showCancel: false,
|
|
1116
983
|
});
|
|
1117
984
|
}
|
|
@@ -1119,7 +986,6 @@ export function getOperationsContext(state, ui) {
|
|
|
1119
986
|
if (!result.confirmed)
|
|
1120
987
|
return;
|
|
1121
988
|
const canUndoValue = result.enableUndo;
|
|
1122
|
-
const hardDeleteValue = result.hardDelete;
|
|
1123
989
|
const op = {
|
|
1124
990
|
type: "delete-items",
|
|
1125
991
|
items: items.map(getItemDescriptor),
|
|
@@ -1127,9 +993,8 @@ export function getOperationsContext(state, ui) {
|
|
|
1127
993
|
getItemDescriptor(items[0]),
|
|
1128
994
|
date: new Date().toISOString(),
|
|
1129
995
|
id: uuid(),
|
|
1130
|
-
title:
|
|
996
|
+
title: `Delete ${itemNames}`,
|
|
1131
997
|
canUndo: canUndoValue,
|
|
1132
|
-
hardDelete: hardDeleteValue,
|
|
1133
998
|
};
|
|
1134
999
|
const returnedOp = await executeOp(op);
|
|
1135
1000
|
itemsRepository.onItemsDeleted(itemsToDelete.map((x) => ({
|
|
@@ -1137,7 +1002,6 @@ export function getOperationsContext(state, ui) {
|
|
|
1137
1002
|
parentId: x.parentId,
|
|
1138
1003
|
})));
|
|
1139
1004
|
stateRef.current.requestRefresh("immediate");
|
|
1140
|
-
return true;
|
|
1141
1005
|
}, [itemsRepository, executeOp, ui]);
|
|
1142
1006
|
const moveItems = useCallback(async (items, target, index) => {
|
|
1143
1007
|
// Use generic edit endpoint for long-running operation support
|
|
@@ -1213,17 +1077,9 @@ export function getOperationsContext(state, ui) {
|
|
|
1213
1077
|
id: uuid(),
|
|
1214
1078
|
title: `Copying ${items.length} item(s)...`,
|
|
1215
1079
|
};
|
|
1216
|
-
|
|
1217
|
-
if (copyItemsNeedsTerminalCompletion(copyResult)) {
|
|
1218
|
-
try {
|
|
1219
|
-
const terminal = await waitForEditOperationTerminal(copyResult.id, 120_000);
|
|
1220
|
-
copyResult = { ...copyResult, ...terminal };
|
|
1221
|
-
}
|
|
1222
|
-
catch {
|
|
1223
|
-
return [];
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1080
|
+
const result = await executeOp(op);
|
|
1226
1081
|
// Return created item descriptors from the operation result
|
|
1082
|
+
const copyResult = result;
|
|
1227
1083
|
if (copyResult?.createdItemIds) {
|
|
1228
1084
|
return copyResult.createdItemIds.map((id) => ({
|
|
1229
1085
|
id,
|
|
@@ -1247,29 +1103,17 @@ export function getOperationsContext(state, ui) {
|
|
|
1247
1103
|
title: `Duplicating item...`,
|
|
1248
1104
|
name, // Pass the user-provided name to the backend
|
|
1249
1105
|
};
|
|
1250
|
-
|
|
1251
|
-
if (
|
|
1252
|
-
try {
|
|
1253
|
-
const terminal = await waitForEditOperationTerminal(copyResult.id, 120_000);
|
|
1254
|
-
copyResult = { ...copyResult, ...terminal };
|
|
1255
|
-
}
|
|
1256
|
-
catch (e) {
|
|
1257
|
-
ui.showErrorToast({
|
|
1258
|
-
summary: "Duplicate failed",
|
|
1259
|
-
details: e?.message || "Operation timed out",
|
|
1260
|
-
});
|
|
1261
|
-
return;
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
if (copyResult.errorMessage) {
|
|
1106
|
+
const result = await executeOp(op);
|
|
1107
|
+
if (result.errorMessage) {
|
|
1265
1108
|
ui.showErrorToast({
|
|
1266
1109
|
summary: "Duplicate failed",
|
|
1267
|
-
details:
|
|
1110
|
+
details: result.errorMessage,
|
|
1268
1111
|
});
|
|
1269
1112
|
return;
|
|
1270
1113
|
}
|
|
1271
1114
|
itemsRepository.refreshItems([target]);
|
|
1272
1115
|
// Return created item descriptor from the operation result
|
|
1116
|
+
const copyResult = result;
|
|
1273
1117
|
if (copyResult?.createdItemIds?.length > 0) {
|
|
1274
1118
|
return {
|
|
1275
1119
|
id: copyResult.createdItemIds[0],
|
|
@@ -1279,12 +1123,6 @@ export function getOperationsContext(state, ui) {
|
|
|
1279
1123
|
}
|
|
1280
1124
|
return undefined;
|
|
1281
1125
|
}, [executeOp, itemsRepository, ui]);
|
|
1282
|
-
const publishItem = useCallback(async (operation) => {
|
|
1283
|
-
const result = (await executeOp(operation, {
|
|
1284
|
-
refresh: "immediate",
|
|
1285
|
-
}));
|
|
1286
|
-
return result;
|
|
1287
|
-
}, [executeOp]);
|
|
1288
1126
|
const onFieldBlur = useCallback(() => {
|
|
1289
1127
|
// Reset the last operation to force creation of a new operation
|
|
1290
1128
|
// when the user returns to edit any field after losing focus
|
|
@@ -1300,7 +1138,6 @@ export function getOperationsContext(state, ui) {
|
|
|
1300
1138
|
unlockItems: unlockItemsAndRefresh,
|
|
1301
1139
|
executeWorkflowCommand: executeWorkflowCommandAndRefresh,
|
|
1302
1140
|
editField,
|
|
1303
|
-
updateRenderingParameters,
|
|
1304
1141
|
undo,
|
|
1305
1142
|
undoOperations,
|
|
1306
1143
|
redo,
|
|
@@ -1310,7 +1147,6 @@ export function getOperationsContext(state, ui) {
|
|
|
1310
1147
|
createItem,
|
|
1311
1148
|
createVersion,
|
|
1312
1149
|
removeVersion,
|
|
1313
|
-
publishItem,
|
|
1314
1150
|
duplicateComponents,
|
|
1315
1151
|
undoing: undoing.current,
|
|
1316
1152
|
moveItems,
|
|
@@ -1324,7 +1160,6 @@ export function getOperationsContext(state, ui) {
|
|
|
1324
1160
|
unlockItemsAndRefresh,
|
|
1325
1161
|
executeWorkflowCommandAndRefresh,
|
|
1326
1162
|
editField,
|
|
1327
|
-
updateRenderingParameters,
|
|
1328
1163
|
undo,
|
|
1329
1164
|
undoOperations,
|
|
1330
1165
|
redo,
|
|
@@ -1334,7 +1169,6 @@ export function getOperationsContext(state, ui) {
|
|
|
1334
1169
|
createItem,
|
|
1335
1170
|
createVersion,
|
|
1336
1171
|
removeVersion,
|
|
1337
|
-
publishItem,
|
|
1338
1172
|
duplicateComponents,
|
|
1339
1173
|
moveItems,
|
|
1340
1174
|
mode,
|
|
@@ -1396,12 +1230,8 @@ async function getOrMergeSuggestedEditOp(field, rawValue, value, state) {
|
|
|
1396
1230
|
pendingEdit.updatedBy = state.user?.name || "unknown";
|
|
1397
1231
|
return pendingEdit;
|
|
1398
1232
|
}
|
|
1399
|
-
const matchingSuggestions = state.suggestedEdits.filter((edit) => edit.mainItemId === page.item.descriptor.id &&
|
|
1400
|
-
edit.mainItemLanguage === page.item.descriptor.language &&
|
|
1401
|
-
edit.itemId === item.id &&
|
|
1402
|
-
edit.fieldId === field.fieldId);
|
|
1403
1233
|
// Attempt to find an existing suggested edit by the same user for this field.
|
|
1404
|
-
const existing =
|
|
1234
|
+
const existing = state.suggestedEdits.find((edit) => edit.mainItemId === page.item.descriptor.id &&
|
|
1405
1235
|
edit.mainItemLanguage === page.item.descriptor.language &&
|
|
1406
1236
|
edit.mainItemVersion === page.item.descriptor.version &&
|
|
1407
1237
|
edit.itemId === item.id &&
|
|
@@ -1413,10 +1243,8 @@ async function getOrMergeSuggestedEditOp(field, rawValue, value, state) {
|
|
|
1413
1243
|
existing.newValue = newVal || "";
|
|
1414
1244
|
existing.updated = new Date().toISOString();
|
|
1415
1245
|
existing.updatedBy = state.user?.name || "unknown";
|
|
1416
|
-
const nextSuggestedEdits = [...state.suggestedEdits];
|
|
1417
|
-
state.suggestedEdits = nextSuggestedEdits;
|
|
1418
1246
|
// Optionally, you might update the comments or other fields.
|
|
1419
|
-
state.setSuggestedEdits(
|
|
1247
|
+
state.setSuggestedEdits([...state.suggestedEdits]);
|
|
1420
1248
|
return existing;
|
|
1421
1249
|
}
|
|
1422
1250
|
else {
|
|
@@ -1434,18 +1262,12 @@ async function getOrMergeSuggestedEditOp(field, rawValue, value, state) {
|
|
|
1434
1262
|
fieldId: field.fieldId,
|
|
1435
1263
|
oldValue: fieldItem.rawValue || "",
|
|
1436
1264
|
newValue: newVal || "",
|
|
1437
|
-
author: state.user?.name || "unknown",
|
|
1438
1265
|
status: "pending",
|
|
1439
|
-
updatedBy: state.user?.name || "unknown",
|
|
1440
|
-
created: new Date().toISOString(),
|
|
1441
|
-
updated: new Date().toISOString(),
|
|
1442
1266
|
type: "FieldValue",
|
|
1443
1267
|
};
|
|
1444
1268
|
// Add to pending edits to prevent race conditions
|
|
1445
1269
|
pendingSuggestedEdits.set(fieldKey, newEdit);
|
|
1446
|
-
|
|
1447
|
-
state.suggestedEdits = nextSuggestedEdits;
|
|
1448
|
-
state.setSuggestedEdits(nextSuggestedEdits);
|
|
1270
|
+
state.setSuggestedEdits([...state.suggestedEdits, newEdit]);
|
|
1449
1271
|
return newEdit;
|
|
1450
1272
|
}
|
|
1451
1273
|
}
|