@parhelia/core 0.3.12831 → 0.4.12796
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.js +2 -2
- package/dist/agents-view/AgentCard.js.map +1 -1
- package/dist/agents-view/AgentsView.js +4 -2
- package/dist/agents-view/AgentsView.js.map +1 -1
- package/dist/agents-view/AgentsWorkspaceView.js +8 -1
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/agents-view/DateAgentsGroup.js +1 -1
- package/dist/agents-view/DateAgentsGroup.js.map +1 -1
- package/dist/components/ui/checkbox.js +3 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +9 -1
- package/dist/components/ui/context-menu.js +59 -12
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/select.js +16 -2
- package/dist/components/ui/select.js.map +1 -1
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.js +66 -10
- package/dist/config/config.js.map +1 -1
- package/dist/config/types/sidebar.d.ts +8 -0
- package/dist/config/types/workspace.d.ts +8 -0
- package/dist/config/types.d.ts +24 -0
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ContextMenu.js +59 -6
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/Editor.js +9 -2
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/EditorWarning.d.ts +3 -1
- package/dist/editor/EditorWarning.js +24 -7
- package/dist/editor/EditorWarning.js.map +1 -1
- package/dist/editor/FieldList.js +1 -1
- package/dist/editor/FieldList.js.map +1 -1
- package/dist/editor/GlobalMenuBar.js +8 -6
- package/dist/editor/GlobalMenuBar.js.map +1 -1
- package/dist/editor/LinkEditorDialog.d.ts +2 -0
- package/dist/editor/LinkEditorDialog.js +6 -1
- package/dist/editor/LinkEditorDialog.js.map +1 -1
- package/dist/editor/ai/AgentSharingSection.d.ts +1 -1
- package/dist/editor/ai/AgentSharingSection.js +7 -0
- package/dist/editor/ai/AgentSharingSection.js.map +1 -1
- package/dist/editor/ai/Agents.js +7 -7
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/InlineAiDialog.d.ts +7 -1
- package/dist/editor/ai/InlineAiDialog.js +27 -7
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +63 -1
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/terminal/activeReasoningModel.d.ts +9 -0
- package/dist/editor/ai/terminal/activeReasoningModel.js +20 -0
- package/dist/editor/ai/terminal/activeReasoningModel.js.map +1 -0
- package/dist/editor/ai/terminal/agentDurations.d.ts +27 -0
- package/dist/editor/ai/terminal/agentDurations.js +89 -0
- package/dist/editor/ai/terminal/agentDurations.js.map +1 -0
- package/dist/editor/ai/terminal/agentStartRequest.d.ts +1 -0
- package/dist/editor/ai/terminal/agentStartRequest.js +1 -0
- package/dist/editor/ai/terminal/agentStartRequest.js.map +1 -1
- package/dist/editor/ai/terminal/agentTurnTiming.d.ts +33 -0
- package/dist/editor/ai/terminal/agentTurnTiming.js +103 -0
- package/dist/editor/ai/terminal/agentTurnTiming.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentCostDisplay.d.ts +3 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js +16 -25
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentGreeting.js +4 -1
- package/dist/editor/ai/terminal/components/AgentGreeting.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.d.ts +5 -1
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js +7 -2
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.d.ts +10 -0
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.js +12 -0
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentProfileSwitcher.js +1 -1
- package/dist/editor/ai/terminal/components/AgentProfileSwitcher.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptActionButtons.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js +1 -1
- package/dist/editor/ai/terminal/components/AgentPromptInputArea.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsContent.d.ts +5 -1
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js +2 -2
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.d.ts +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js +17 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +69 -8
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentThinkingIndicator.d.ts +21 -1
- package/dist/editor/ai/terminal/components/AgentThinkingIndicator.js +15 -4
- package/dist/editor/ai/terminal/components/AgentThinkingIndicator.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.d.ts +3 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +84 -58
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ApprovalCard.js +72 -10
- package/dist/editor/ai/terminal/components/ApprovalCard.js.map +1 -1
- package/dist/editor/ai/terminal/components/InitialThinkingSplash.js +2 -2
- package/dist/editor/ai/terminal/components/InitialThinkingSplash.js.map +1 -1
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js +2 -2
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.d.ts +15 -0
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +52 -0
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -0
- package/dist/editor/ai/terminal/components/ToolCallDisplay.d.ts +3 -1
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +35 -57
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/agentThinkingStyles.d.ts +26 -1
- package/dist/editor/ai/terminal/components/agentThinkingStyles.js +26 -1
- package/dist/editor/ai/terminal/components/agentThinkingStyles.js.map +1 -1
- package/dist/editor/ai/terminal/components/approvalActions.d.ts +1 -0
- package/dist/editor/ai/terminal/components/approvalActions.js +5 -2
- package/dist/editor/ai/terminal/components/approvalActions.js.map +1 -1
- package/dist/editor/ai/terminal/components/useApprovalActions.d.ts +4 -4
- package/dist/editor/ai/terminal/components/useApprovalActions.js +5 -2
- package/dist/editor/ai/terminal/components/useApprovalActions.js.map +1 -1
- package/dist/editor/ai/terminal/reasoningEffortLevels.d.ts +8 -0
- package/dist/editor/ai/terminal/reasoningEffortLevels.js +54 -0
- package/dist/editor/ai/terminal/reasoningEffortLevels.js.map +1 -0
- package/dist/editor/ai/terminal/requestUsage.d.ts +3 -0
- package/dist/editor/ai/terminal/requestUsage.js +22 -0
- package/dist/editor/ai/terminal/requestUsage.js.map +1 -0
- package/dist/editor/ai/terminal/types.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentProfileSelection.d.ts +10 -0
- package/dist/editor/ai/terminal/useAgentProfileSelection.js +10 -2
- package/dist/editor/ai/terminal/useAgentProfileSelection.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.js +10 -0
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSettingsCommands.d.ts +9 -0
- package/dist/editor/ai/terminal/useAgentSettingsCommands.js +63 -6
- package/dist/editor/ai/terminal/useAgentSettingsCommands.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsPanel.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js +8 -0
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSkillActions.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSkillActions.js +1 -0
- package/dist/editor/ai/terminal/useAgentSkillActions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js +6 -1
- package/dist/editor/ai/terminal/useAgentSubmitHandlers.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.d.ts +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +21 -4
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalControls.d.ts +4 -0
- package/dist/editor/ai/terminal/useAgentTerminalControls.js +5 -1
- package/dist/editor/ai/terminal/useAgentTerminalControls.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageEditorDialog.d.ts +6 -0
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js +202 -64
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.js +733 -722
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/SandboxWelcomeOverlay.d.ts +4 -1
- package/dist/editor/client/SandboxWelcomeOverlay.js +6 -5
- package/dist/editor/client/SandboxWelcomeOverlay.js.map +1 -1
- package/dist/editor/client/SessionsDialog.d.ts +2 -0
- package/dist/editor/client/SessionsDialog.js +27 -0
- package/dist/editor/client/SessionsDialog.js.map +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +4 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/ui/DevModeIndicator.js +6 -4
- package/dist/editor/client/ui/DevModeIndicator.js.map +1 -1
- package/dist/editor/commands/componentCommands.js +1 -2
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/editor-warnings/ItemLocked.js +1 -1
- package/dist/editor/editor-warnings/ItemLocked.js.map +1 -1
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js +1 -1
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js.map +1 -1
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js +1 -1
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js.map +1 -1
- package/dist/editor/editor-warnings/NoWriteAccess.js +1 -1
- package/dist/editor/editor-warnings/NoWriteAccess.js.map +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js +15 -4
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +6 -1
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/RichTextEditor.js +5 -5
- package/dist/editor/field-types/RichTextEditor.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +6 -1
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/TreeListEditor.js +3 -3
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/fieldTypes.d.ts +2 -0
- package/dist/editor/itemContextMenuGroups.d.ts +16 -0
- package/dist/editor/itemContextMenuGroups.js +48 -0
- package/dist/editor/itemContextMenuGroups.js.map +1 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js +1 -1
- package/dist/editor/menubar/ActiveUsers.js +4 -1
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/OpenPublishedPageButton.d.ts +1 -0
- package/dist/editor/menubar/OpenPublishedPageButton.js +22 -0
- package/dist/editor/menubar/OpenPublishedPageButton.js.map +1 -0
- package/dist/editor/menubar/WorkflowButton.js +77 -22
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/PreviewModeControl.js +1 -1
- package/dist/editor/menubar/toolbar-sections/PreviewModeControl.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +8 -4
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +36 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +4 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.d.ts +19 -0
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.js +14 -0
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +3 -0
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +18 -0
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +20 -8
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.js +8 -7
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +10 -0
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/PreviewModeNotice.d.ts +7 -0
- package/dist/editor/page-viewer/PreviewModeNotice.js +19 -0
- package/dist/editor/page-viewer/PreviewModeNotice.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +5 -1
- package/dist/editor/page-viewer/pageViewContext.js +59 -2
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/page-viewer/previewEditAttempt.d.ts +31 -0
- package/dist/editor/page-viewer/previewEditAttempt.js +68 -0
- package/dist/editor/page-viewer/previewEditAttempt.js.map +1 -0
- package/dist/editor/pageModel.d.ts +1 -0
- package/dist/editor/services/agentService.d.ts +67 -0
- package/dist/editor/services/agentService.js +2 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +7 -0
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +9 -0
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +13 -0
- package/dist/editor/services/editService.js +8 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/migrationService.d.ts +31 -0
- package/dist/editor/services/migrationService.js +22 -0
- package/dist/editor/services/migrationService.js.map +1 -0
- package/dist/editor/services/publicSiteService.d.ts +40 -0
- package/dist/editor/services/publicSiteService.js +5 -0
- package/dist/editor/services/publicSiteService.js.map +1 -0
- package/dist/editor/settings/About.js +71 -32
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/MigrationJournalCard.d.ts +12 -0
- package/dist/editor/settings/MigrationJournalCard.js +114 -0
- package/dist/editor/settings/MigrationJournalCard.js.map +1 -0
- package/dist/editor/settings/QuotaUserPicker.js +1 -1
- package/dist/editor/settings/SettingsView.js +18 -5
- package/dist/editor/settings/SettingsView.js.map +1 -1
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js +1 -0
- package/dist/editor/settings/panels/AgentProfileConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/ModelConfigPanel.js +2 -0
- package/dist/editor/settings/panels/ModelConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/PublicSiteEntryDialog.d.ts +8 -0
- package/dist/editor/settings/panels/PublicSiteEntryDialog.js +113 -0
- package/dist/editor/settings/panels/PublicSiteEntryDialog.js.map +1 -0
- package/dist/editor/settings/panels/PublicSitesPanel.d.ts +1 -0
- package/dist/editor/settings/panels/PublicSitesPanel.js +153 -0
- package/dist/editor/settings/panels/PublicSitesPanel.js.map +1 -0
- package/dist/editor/settings/panels/StatusPanel.js +2 -1
- package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
- package/dist/editor/settings/panels/UserPreferencesPanel.js +4 -4
- package/dist/editor/settings/panels/UserPreferencesPanel.js.map +1 -1
- package/dist/editor/settings/panels/index.d.ts +1 -0
- package/dist/editor/settings/panels/index.js +1 -0
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/settings/panels/publicSiteHelpers.d.ts +6 -0
- package/dist/editor/settings/panels/publicSiteHelpers.js +30 -0
- package/dist/editor/settings/panels/publicSiteHelpers.js.map +1 -0
- package/dist/editor/settings/status/coreStatusChecks.js +4 -0
- package/dist/editor/settings/status/coreStatusChecks.js.map +1 -1
- package/dist/editor/sidebar/OperationDetailsContent.d.ts +14 -0
- package/dist/editor/sidebar/OperationDetailsContent.js +521 -0
- package/dist/editor/sidebar/OperationDetailsContent.js.map +1 -0
- package/dist/editor/sidebar/OperationItem.js +9 -77
- package/dist/editor/sidebar/OperationItem.js.map +1 -1
- package/dist/editor/sidebar/Sessions.d.ts +3 -1
- package/dist/editor/sidebar/Sessions.js +2 -1
- package/dist/editor/sidebar/Sessions.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +22 -7
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/ui/PerfectTree.js +14 -7
- package/dist/editor/ui/PerfectTree.js.map +1 -1
- package/dist/editor/ui/PublishDialog.d.ts +7 -2
- package/dist/editor/ui/PublishDialog.js +67 -33
- package/dist/editor/ui/PublishDialog.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.js +31 -20
- package/dist/editor/ui/PublishItemDialog.js.map +1 -1
- package/dist/editor/ui/PublishReadinessSummary.d.ts +12 -0
- package/dist/editor/ui/PublishReadinessSummary.js +34 -0
- package/dist/editor/ui/PublishReadinessSummary.js.map +1 -0
- package/dist/editor/ui/TemplateSelectorDialog.js +27 -1
- package/dist/editor/ui/TemplateSelectorDialog.js.map +1 -1
- package/dist/editor/ui/publishReadiness.d.ts +85 -0
- package/dist/editor/ui/publishReadiness.js +251 -0
- package/dist/editor/ui/publishReadiness.js.map +1 -0
- package/dist/editor/ui/usePublishingItem.d.ts +8 -0
- package/dist/editor/ui/usePublishingItem.js +47 -0
- package/dist/editor/ui/usePublishingItem.js.map +1 -0
- package/dist/editor/utils/linkDisplay.d.ts +12 -0
- package/dist/editor/utils/linkDisplay.js +23 -0
- package/dist/editor/utils/linkDisplay.js.map +1 -0
- package/dist/editor/views/ItemEditor.js +44 -27
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/viewportClip.d.ts +18 -0
- package/dist/lib/viewportClip.js +22 -0
- package/dist/lib/viewportClip.js.map +1 -0
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/wizard/steps/ImportModelDialog.js +238 -176
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/task-board/components/ProjectSettingsDialog.js +4 -1
- package/dist/task-board/components/ProjectSettingsDialog.js.map +1 -1
- package/dist/tour/Tour.d.ts +10 -2
- package/dist/tour/Tour.js +136 -31
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/default-tour.js +5 -16
- package/dist/tour/default-tour.js.map +1 -1
- package/dist/tour/preview-tour.js +1 -1
- package/dist/tour/preview-tour.js.map +1 -1
- package/dist/tour/sandbox-tour.js +4 -3
- package/dist/tour/sandbox-tour.js.map +1 -1
- package/dist/tour/tour-utils.d.ts +6 -0
- package/dist/tour/tour-utils.js +10 -0
- package/dist/tour/tour-utils.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/package.json +1 -1
- package/styles.css +6 -1
|
@@ -740,8 +740,11 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
740
740
|
// moved into useWorkbox
|
|
741
741
|
// Initialize tour state from URL parameter to survive navigation/remounts
|
|
742
742
|
// Memoize to avoid triggering Router state updates during render
|
|
743
|
-
const tourRestoredFromUrl = useMemo(() =>
|
|
744
|
-
searchParams.get("tour")
|
|
743
|
+
const tourRestoredFromUrl = useMemo(() => {
|
|
744
|
+
const tour = searchParams.get("tour");
|
|
745
|
+
return (Boolean(configuration.activeTour) &&
|
|
746
|
+
(tour === "active" || tour === configuration.activeTour));
|
|
747
|
+
}, [configuration.activeTour, searchParams]);
|
|
745
748
|
const [isTourActive, setIsTourActive] = useState(tourRestoredFromUrl);
|
|
746
749
|
// Track if tour was restored from URL to skip prepareAction on initial render
|
|
747
750
|
const tourRestoredRef = useRef(tourRestoredFromUrl);
|
|
@@ -1400,7 +1403,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
1400
1403
|
// Persist tour state to URL so it survives navigation/remounts
|
|
1401
1404
|
// Use history.replaceState instead of router.replace to avoid triggering React navigation
|
|
1402
1405
|
const params = new URLSearchParams(window.location.search);
|
|
1403
|
-
params.set("tour",
|
|
1406
|
+
params.set("tour", configuration.activeTour);
|
|
1404
1407
|
const newUrl = `${window.location.pathname}?${params.toString()}`;
|
|
1405
1408
|
window.history.replaceState(getCurrentHistoryState(), "", newUrl);
|
|
1406
1409
|
}, [configuration.activeTour, setIsTourActive]);
|
|
@@ -1876,42 +1879,30 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
1876
1879
|
};
|
|
1877
1880
|
}, []);
|
|
1878
1881
|
const media = useMediaSelector();
|
|
1882
|
+
const canStartTour = useMemo(() => searchParams.get("noTour") === null &&
|
|
1883
|
+
startupChecks.state === "complete" &&
|
|
1884
|
+
!startupChecks.hasBlockingIssues &&
|
|
1885
|
+
!(viewName === "settings" && searchParams.get("ccpanel") === "status") &&
|
|
1886
|
+
Boolean(configuration.activeTour), [
|
|
1887
|
+
configuration.activeTour,
|
|
1888
|
+
searchParams,
|
|
1889
|
+
startupChecks.hasBlockingIssues,
|
|
1890
|
+
startupChecks.state,
|
|
1891
|
+
viewName,
|
|
1892
|
+
]);
|
|
1893
|
+
const sandboxTourShown = configuration.activeTour === "sandbox" &&
|
|
1894
|
+
Boolean(localStorageService.getString("editor.tourShown.sandbox"));
|
|
1879
1895
|
useEffect(() => {
|
|
1880
|
-
|
|
1881
|
-
if (searchParams.get("noTour") !== null) {
|
|
1882
|
-
return;
|
|
1883
|
-
}
|
|
1884
|
-
// Don't start tour when there are setup errors (user is or will be on system status page)
|
|
1885
|
-
if (startupChecks.state === "complete" && startupChecks.hasBlockingIssues) {
|
|
1886
|
-
return;
|
|
1887
|
-
}
|
|
1888
|
-
// Don't start tour when already on settings system status page
|
|
1889
|
-
if (viewName === "settings" && searchParams.get("ccpanel") === "status") {
|
|
1890
|
-
return;
|
|
1891
|
-
}
|
|
1892
|
-
// Wait for startup checks so we know whether we'll redirect to status
|
|
1893
|
-
if (startupChecks.state !== "complete") {
|
|
1896
|
+
if (!canStartTour || showSandboxWelcome)
|
|
1894
1897
|
return;
|
|
1895
|
-
}
|
|
1896
1898
|
const tour = configuration.activeTour;
|
|
1897
|
-
if (!tour) {
|
|
1898
|
-
return;
|
|
1899
|
-
}
|
|
1900
1899
|
const key = tour === "default" ? "editor.tourShown" : "editor.tourShown." + tour;
|
|
1901
1900
|
const tourShown = localStorageService.getString(key);
|
|
1902
1901
|
if (!tourShown) {
|
|
1903
1902
|
startTour();
|
|
1904
1903
|
localStorageService.setString(key, "true");
|
|
1905
1904
|
}
|
|
1906
|
-
}, [
|
|
1907
|
-
user,
|
|
1908
|
-
startupChecks.state,
|
|
1909
|
-
startupChecks.hasBlockingIssues,
|
|
1910
|
-
viewName,
|
|
1911
|
-
searchParams,
|
|
1912
|
-
configuration.activeTour,
|
|
1913
|
-
startTour,
|
|
1914
|
-
]);
|
|
1905
|
+
}, [canStartTour, configuration.activeTour, showSandboxWelcome, startTour]);
|
|
1915
1906
|
// WebSocket initialization is performed after messageHandler is defined
|
|
1916
1907
|
// Defer URL sync until loadItem is defined below
|
|
1917
1908
|
// Mark end of initial load phase
|
|
@@ -4864,732 +4855,747 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
4864
4855
|
};
|
|
4865
4856
|
}
|
|
4866
4857
|
const factoriesRef = globalThis.__editorContextFactoriesRef;
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
dragEnd: () => {
|
|
4981
|
-
dragObjectRef.current = undefined;
|
|
4982
|
-
setDragObject(undefined);
|
|
4983
|
-
},
|
|
4984
|
-
droppedInPlaceholder: async (placeholderKey, index, spotPositionElement, spotPositionAnchor, insertOption, spotPosition, color) => {
|
|
4985
|
-
const droppedDragObject = dragObjectRef.current;
|
|
4986
|
-
if ((!droppedDragObject && !insertOption) || !page) {
|
|
4987
|
-
return { committed: false };
|
|
4988
|
-
}
|
|
4989
|
-
dragObjectRef.current = undefined;
|
|
4990
|
-
setDragObject(undefined);
|
|
4991
|
-
const placeholderKeyComponents = placeholderKey.split("_");
|
|
4992
|
-
const parentId = placeholderKeyComponents.length === 1
|
|
4993
|
-
? undefined
|
|
4994
|
-
: placeholderKeyComponents[1];
|
|
4995
|
-
// Selection is left alone at drop. The server response's focus id
|
|
4996
|
-
// selects the moved/added component (executeEditOperation); selecting
|
|
4997
|
-
// the drop target's parent here made the single-selection frame
|
|
4998
|
-
// FLIP-animate component -> parent -> component around every drop.
|
|
4999
|
-
let op;
|
|
5000
|
-
// A placeholder is rendered from this page model, so its insertion
|
|
5001
|
-
// must target the same item. The shell-level descriptor can briefly
|
|
5002
|
-
// lag while slots or a newly created page settle; using it here could
|
|
5003
|
-
// either discard a valid click or write the component to another page.
|
|
5004
|
-
const dropTargetDescriptor = page.item.descriptor;
|
|
5005
|
-
let insertionSequence;
|
|
5006
|
-
if ((spotPosition || spotPositionElement) && spotPositionAnchor) {
|
|
5007
|
-
insertionSequence = ++insertingSequenceRef.current;
|
|
5008
|
-
setInserting({
|
|
5009
|
-
position: spotPosition,
|
|
5010
|
-
positionElement: spotPositionElement,
|
|
5011
|
-
positionAnchor: spotPositionAnchor,
|
|
5012
|
-
color,
|
|
5013
|
-
});
|
|
5014
|
-
}
|
|
5015
|
-
let operationPromise;
|
|
5016
|
-
if (insertOption) {
|
|
5017
|
-
// Clear any selected component type for insertion once the component
|
|
5018
|
-
// has been dropped into a placeholder. This ensures that insert mode
|
|
5019
|
-
// can exit cleanly and the editor header updates from "Add Component"
|
|
5020
|
-
// to the actual component name after the operation completes.
|
|
5021
|
-
setSelectedForInsertion("");
|
|
5022
|
-
operationPromise = operations.addComponent(insertOption.typeId, placeholderKey, index, dropTargetDescriptor, { showIndicator: false });
|
|
5023
|
-
}
|
|
5024
|
-
else if (droppedDragObject?.type == "template") {
|
|
5025
|
-
operationPromise = operations.addComponent(droppedDragObject.typeId, placeholderKey, index, dropTargetDescriptor, { showIndicator: false });
|
|
5026
|
-
}
|
|
5027
|
-
else if (droppedDragObject?.type == "component" ||
|
|
5028
|
-
(droppedDragObject?.type == "items" && droppedDragObject.items)) {
|
|
5029
|
-
const parentComponent = parentId && page ? getComponentById(parentId, page) : null;
|
|
5030
|
-
if (droppedDragObject.type == "items" && droppedDragObject.items) {
|
|
5031
|
-
op = {
|
|
5032
|
-
type: "link-component",
|
|
5033
|
-
mainItem: page.item.descriptor,
|
|
5034
|
-
parent: parentId && {
|
|
5035
|
-
id: parentId,
|
|
5036
|
-
language: page.item.descriptor.language,
|
|
5037
|
-
version: page.item.descriptor.version,
|
|
5038
|
-
name: parentComponent?.name,
|
|
5039
|
-
},
|
|
5040
|
-
placeholderKey,
|
|
5041
|
-
placeholderIndex: index,
|
|
5042
|
-
date: new Date().toISOString(),
|
|
5043
|
-
id: uuid(),
|
|
5044
|
-
linkedComponentItem: droppedDragObject.items[0],
|
|
5045
|
-
title: "Link component",
|
|
5046
|
-
};
|
|
4858
|
+
/**
|
|
4859
|
+
* Workspaces shown in the rail: not hidden, allowed by the server's workspace list (when provided) and,
|
|
4860
|
+
* for workspaces with a dynamic `visible` callback, visible for the given (complete) context.
|
|
4861
|
+
*/
|
|
4862
|
+
const filterVisibleWorkspaces = (context) => (context.configuration.editor.workspaces ?? [])
|
|
4863
|
+
.filter((w) => {
|
|
4864
|
+
if (w.hidden)
|
|
4865
|
+
return false;
|
|
4866
|
+
if (w.visible && !w.visible(context))
|
|
4867
|
+
return false;
|
|
4868
|
+
// Filter by workspace settings from Sitecore (if provided)
|
|
4869
|
+
const serverWorkspaces = context.userInfo?.workspaces;
|
|
4870
|
+
if (serverWorkspaces && serverWorkspaces.length > 0) {
|
|
4871
|
+
return serverWorkspaces.some((ws) => ws.id === w.id);
|
|
4872
|
+
}
|
|
4873
|
+
return true;
|
|
4874
|
+
})
|
|
4875
|
+
.sort((a, b) => (a.sortOrder ?? 100) - (b.sortOrder ?? 100));
|
|
4876
|
+
const editContext = useMemo(() => {
|
|
4877
|
+
// Typed as the context (for contextual parameter types) plus the runtime-only extras the literal carries.
|
|
4878
|
+
const editContextValue = {
|
|
4879
|
+
operations: operationsContext.ops,
|
|
4880
|
+
itemsRepository,
|
|
4881
|
+
configuration,
|
|
4882
|
+
updateUrl,
|
|
4883
|
+
openSplashScreen: () => {
|
|
4884
|
+
const currentParams = new URLSearchParams(window.location.search);
|
|
4885
|
+
const isAlreadyOnHome = workspaceId === "home" &&
|
|
4886
|
+
(!currentParams.get("workspace") ||
|
|
4887
|
+
currentParams.get("workspace") === "home");
|
|
4888
|
+
if (isAlreadyOnHome) {
|
|
4889
|
+
// Already on home workspace, no need to navigate - this prevents reloading the tour
|
|
4890
|
+
return;
|
|
4891
|
+
}
|
|
4892
|
+
// Ensure we actually land on the home workspace (not just change the URL).
|
|
4893
|
+
// This is especially important when called from the tour, where the current workspace
|
|
4894
|
+
// might be the editor and URL-only navigation would get "corrected" back.
|
|
4895
|
+
try {
|
|
4896
|
+
switchWorkspace("home", {
|
|
4897
|
+
skipConfirmation: true,
|
|
4898
|
+
skipNavigationHistory: true,
|
|
4899
|
+
});
|
|
4900
|
+
}
|
|
4901
|
+
catch { }
|
|
4902
|
+
const preservedParams = new URLSearchParams();
|
|
4903
|
+
if (currentParams.get("fullscreen") === "true") {
|
|
4904
|
+
preservedParams.set("fullscreen", "true");
|
|
4905
|
+
}
|
|
4906
|
+
// Preserve tour state so the tour survives navigation
|
|
4907
|
+
const currentTour = currentParams.get("tour");
|
|
4908
|
+
if (currentTour) {
|
|
4909
|
+
preservedParams.set("tour", currentTour);
|
|
4910
|
+
}
|
|
4911
|
+
const queryString = preservedParams.toString();
|
|
4912
|
+
// Use the current Next.js pathname so this works correctly with or without
|
|
4913
|
+
// a configured basePath (e.g. basePath="/parhelia" in the static export).
|
|
4914
|
+
// Avoid hard-coding "/parhelia" here because Next will automatically
|
|
4915
|
+
// prepend the basePath when navigating.
|
|
4916
|
+
const basePath = pathname || "/";
|
|
4917
|
+
const newUrl = queryString ? `${basePath}?${queryString}` : basePath;
|
|
4918
|
+
router.push(newUrl, { scroll: false });
|
|
4919
|
+
},
|
|
4920
|
+
item: item || page?.item,
|
|
4921
|
+
itemLanguages,
|
|
4922
|
+
itemVersions,
|
|
4923
|
+
isLoadingVersions,
|
|
4924
|
+
loadItemVersions,
|
|
4925
|
+
sessionId: sessionId,
|
|
4926
|
+
readonly: isReadOnly,
|
|
4927
|
+
getSelection: () => selectionRef.current,
|
|
4928
|
+
select: (ids) => {
|
|
4929
|
+
// Re-selecting the same components is a no-op: without this bail a
|
|
4930
|
+
// fresh array identity re-renders every selection consumer.
|
|
4931
|
+
const current = selectionRef.current;
|
|
4932
|
+
if (ids.length === current.length &&
|
|
4933
|
+
ids.every((id, index) => id === current[index])) {
|
|
4934
|
+
perfTraceStep("shell:setSelection-bailed (unchanged)", { ids });
|
|
4935
|
+
return;
|
|
4936
|
+
}
|
|
4937
|
+
perfTraceStep("shell:setSelection-state-update", { ids });
|
|
4938
|
+
setSelection(ids);
|
|
4939
|
+
},
|
|
4940
|
+
selectWithoutAutoScroll,
|
|
4941
|
+
consumeNextSelectionAutoScrollSuppression,
|
|
4942
|
+
consumeNextFocusedFieldAutoScrollSuppression,
|
|
4943
|
+
contentTreeSelection,
|
|
4944
|
+
setContentTreeSelection,
|
|
4945
|
+
selectedForInsertion,
|
|
4946
|
+
setSelectedForInsertion,
|
|
4947
|
+
dragObject,
|
|
4948
|
+
getDragObject: () => dragObjectRef.current,
|
|
4949
|
+
clipboard,
|
|
4950
|
+
setClipboard,
|
|
4951
|
+
workboxItems,
|
|
4952
|
+
isWorkboxLoading,
|
|
4953
|
+
refreshWorkbox,
|
|
4954
|
+
requestRefresh,
|
|
4955
|
+
refreshCompletedFlag,
|
|
4956
|
+
openCreatePageDialog: () => {
|
|
4957
|
+
const current = new URLSearchParams(searchParams.toString());
|
|
4958
|
+
current.delete("version");
|
|
4959
|
+
current.delete("itemid");
|
|
4960
|
+
current.delete("workspace"); // Clear workspace
|
|
4961
|
+
current.set("create", "1");
|
|
4962
|
+
const newUrl = `${pathname}?${current.toString()}`;
|
|
4963
|
+
const oldUrl = `${pathname}?${searchParams.toString()}`;
|
|
4964
|
+
router.push(newUrl, { scroll: false });
|
|
4965
|
+
},
|
|
4966
|
+
selectMedia: media.selectMedia,
|
|
4967
|
+
showToast: (message) => {
|
|
4968
|
+
// Ensure only strings are passed to toast to prevent accidental JSON display
|
|
4969
|
+
if (typeof message === "string") {
|
|
4970
|
+
toast(message);
|
|
5047
4971
|
}
|
|
5048
4972
|
else {
|
|
5049
|
-
|
|
5050
|
-
|
|
4973
|
+
console.warn("showToast called with non-string value:", message);
|
|
4974
|
+
toast("An operation occurred");
|
|
4975
|
+
}
|
|
4976
|
+
},
|
|
4977
|
+
scrollIntoView,
|
|
4978
|
+
setScrollIntoView,
|
|
4979
|
+
focusedField,
|
|
4980
|
+
setFocusedField: setFocusedFieldWithLock,
|
|
4981
|
+
getComponentCommands: async (components, providerContext) => {
|
|
4982
|
+
return await getComponentCommands(components, editContext, providerContext);
|
|
4983
|
+
},
|
|
4984
|
+
dragStart: (nextDragObject) => {
|
|
4985
|
+
// A drag supersedes any unresolved scroll request (e.g. a comment
|
|
4986
|
+
// target still waiting for geometry). Left pending, it would replay
|
|
4987
|
+
// against the post-drop refresh and yank the canvas to a stale spot.
|
|
4988
|
+
setScrollIntoView(undefined);
|
|
4989
|
+
dragObjectRef.current = nextDragObject;
|
|
4990
|
+
setDragObject(nextDragObject);
|
|
4991
|
+
},
|
|
4992
|
+
dragEnd: () => {
|
|
4993
|
+
dragObjectRef.current = undefined;
|
|
4994
|
+
setDragObject(undefined);
|
|
4995
|
+
},
|
|
4996
|
+
droppedInPlaceholder: async (placeholderKey, index, spotPositionElement, spotPositionAnchor, insertOption, spotPosition, color) => {
|
|
4997
|
+
const droppedDragObject = dragObjectRef.current;
|
|
4998
|
+
if ((!droppedDragObject && !insertOption) || !page) {
|
|
4999
|
+
return { committed: false };
|
|
5000
|
+
}
|
|
5001
|
+
dragObjectRef.current = undefined;
|
|
5002
|
+
setDragObject(undefined);
|
|
5003
|
+
const placeholderKeyComponents = placeholderKey.split("_");
|
|
5004
|
+
const parentId = placeholderKeyComponents.length === 1
|
|
5005
|
+
? undefined
|
|
5006
|
+
: placeholderKeyComponents[1];
|
|
5007
|
+
// Selection is left alone at drop. The server response's focus id
|
|
5008
|
+
// selects the moved/added component (executeEditOperation); selecting
|
|
5009
|
+
// the drop target's parent here made the single-selection frame
|
|
5010
|
+
// FLIP-animate component -> parent -> component around every drop.
|
|
5011
|
+
let op;
|
|
5012
|
+
// A placeholder is rendered from this page model, so its insertion
|
|
5013
|
+
// must target the same item. The shell-level descriptor can briefly
|
|
5014
|
+
// lag while slots or a newly created page settle; using it here could
|
|
5015
|
+
// either discard a valid click or write the component to another page.
|
|
5016
|
+
const dropTargetDescriptor = page.item.descriptor;
|
|
5017
|
+
let insertionSequence;
|
|
5018
|
+
if ((spotPosition || spotPositionElement) && spotPositionAnchor) {
|
|
5019
|
+
insertionSequence = ++insertingSequenceRef.current;
|
|
5020
|
+
setInserting({
|
|
5021
|
+
position: spotPosition,
|
|
5022
|
+
positionElement: spotPositionElement,
|
|
5023
|
+
positionAnchor: spotPositionAnchor,
|
|
5024
|
+
color,
|
|
5025
|
+
});
|
|
5026
|
+
}
|
|
5027
|
+
let operationPromise;
|
|
5028
|
+
if (insertOption) {
|
|
5029
|
+
// Clear any selected component type for insertion once the component
|
|
5030
|
+
// has been dropped into a placeholder. This ensures that insert mode
|
|
5031
|
+
// can exit cleanly and the editor header updates from "Add Component"
|
|
5032
|
+
// to the actual component name after the operation completes.
|
|
5033
|
+
setSelectedForInsertion("");
|
|
5034
|
+
operationPromise = operations.addComponent(insertOption.typeId, placeholderKey, index, dropTargetDescriptor, { showIndicator: false });
|
|
5035
|
+
}
|
|
5036
|
+
else if (droppedDragObject?.type == "template") {
|
|
5037
|
+
operationPromise = operations.addComponent(droppedDragObject.typeId, placeholderKey, index, dropTargetDescriptor, { showIndicator: false });
|
|
5038
|
+
}
|
|
5039
|
+
else if (droppedDragObject?.type == "component" ||
|
|
5040
|
+
(droppedDragObject?.type == "items" && droppedDragObject.items)) {
|
|
5041
|
+
const parentComponent = parentId && page ? getComponentById(parentId, page) : null;
|
|
5042
|
+
if (droppedDragObject.type == "items" && droppedDragObject.items) {
|
|
5051
5043
|
op = {
|
|
5052
|
-
type: "
|
|
5044
|
+
type: "link-component",
|
|
5053
5045
|
mainItem: page.item.descriptor,
|
|
5054
5046
|
parent: parentId && {
|
|
5055
5047
|
id: parentId,
|
|
5056
5048
|
language: page.item.descriptor.language,
|
|
5057
5049
|
version: page.item.descriptor.version,
|
|
5050
|
+
name: parentComponent?.name,
|
|
5058
5051
|
},
|
|
5059
5052
|
placeholderKey,
|
|
5060
5053
|
placeholderIndex: index,
|
|
5061
|
-
componentIds,
|
|
5062
5054
|
date: new Date().toISOString(),
|
|
5063
5055
|
id: uuid(),
|
|
5064
|
-
|
|
5056
|
+
linkedComponentItem: droppedDragObject.items[0],
|
|
5057
|
+
title: "Link component",
|
|
5065
5058
|
};
|
|
5066
5059
|
}
|
|
5060
|
+
else {
|
|
5061
|
+
const componentIds = droppedDragObject.components?.map((c) => c.id) ?? [];
|
|
5062
|
+
if (componentIds.length > 0) {
|
|
5063
|
+
op = {
|
|
5064
|
+
type: "move-component",
|
|
5065
|
+
mainItem: page.item.descriptor,
|
|
5066
|
+
parent: parentId && {
|
|
5067
|
+
id: parentId,
|
|
5068
|
+
language: page.item.descriptor.language,
|
|
5069
|
+
version: page.item.descriptor.version,
|
|
5070
|
+
},
|
|
5071
|
+
placeholderKey,
|
|
5072
|
+
placeholderIndex: index,
|
|
5073
|
+
componentIds,
|
|
5074
|
+
date: new Date().toISOString(),
|
|
5075
|
+
id: uuid(),
|
|
5076
|
+
title: "Move component",
|
|
5077
|
+
};
|
|
5078
|
+
}
|
|
5079
|
+
}
|
|
5067
5080
|
}
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
insertingSequenceRef.current === insertionSequence) {
|
|
5074
|
-
setInserting(undefined);
|
|
5075
|
-
}
|
|
5076
|
-
return { committed: false };
|
|
5077
|
-
}
|
|
5078
|
-
let operationFailed = false;
|
|
5079
|
-
try {
|
|
5080
|
-
// executeOp resolves (instead of throwing) with a failed status when
|
|
5081
|
-
// the server rejects the operation — no refresh follows then.
|
|
5082
|
-
const result = (await operationPromise);
|
|
5083
|
-
operationFailed = result?.executionStatus === "failed";
|
|
5084
|
-
}
|
|
5085
|
-
catch (err) {
|
|
5086
|
-
operationFailed = true;
|
|
5087
|
-
console.error("Failed to drop component in placeholder", err);
|
|
5088
|
-
}
|
|
5089
|
-
finally {
|
|
5090
|
-
if (insertionSequence !== undefined &&
|
|
5091
|
-
insertingSequenceRef.current === insertionSequence) {
|
|
5092
|
-
if (operationFailed) {
|
|
5081
|
+
if (op)
|
|
5082
|
+
operationPromise = operations.executeEditOperation(op);
|
|
5083
|
+
if (!operationPromise) {
|
|
5084
|
+
if (insertionSequence !== undefined &&
|
|
5085
|
+
insertingSequenceRef.current === insertionSequence) {
|
|
5093
5086
|
setInserting(undefined);
|
|
5094
5087
|
}
|
|
5095
|
-
|
|
5096
|
-
// The server accepted the drop; the canvas has not repainted
|
|
5097
|
-
// yet. Hold the indicator until the refresh lands so it stops
|
|
5098
|
-
// when the component actually appears, not seconds earlier.
|
|
5099
|
-
holdInsertingUntilCanvasRefresh(insertionSequence);
|
|
5100
|
-
}
|
|
5088
|
+
return { committed: false };
|
|
5101
5089
|
}
|
|
5102
|
-
|
|
5103
|
-
return { committed: !operationFailed };
|
|
5104
|
-
},
|
|
5105
|
-
page,
|
|
5106
|
-
triggerFieldAction: async (fieldDescriptor, actionButton, parameters, event) => {
|
|
5107
|
-
const field = await itemsRepository.getField(fieldDescriptor);
|
|
5108
|
-
if (!field)
|
|
5109
|
-
return;
|
|
5110
|
-
const op = {
|
|
5111
|
-
field: fieldDescriptor,
|
|
5112
|
-
// actionButton,
|
|
5113
|
-
label: actionButton.label,
|
|
5114
|
-
state: "running",
|
|
5115
|
-
};
|
|
5116
|
-
const fieldItem = fieldDescriptor.item;
|
|
5117
|
-
if ("clientAction" in actionButton) {
|
|
5118
|
-
await actionButton.clientAction({
|
|
5119
|
-
field,
|
|
5120
|
-
editContext,
|
|
5121
|
-
event,
|
|
5122
|
-
//dialogContext,
|
|
5123
|
-
});
|
|
5124
|
-
}
|
|
5125
|
-
if (actionButton.action) {
|
|
5126
|
-
setActiveFieldActions((prevFieldActions) => {
|
|
5127
|
-
const isSameField = (x) => x.field.fieldId == fieldDescriptor.fieldId &&
|
|
5128
|
-
x.field.item.id == fieldItem.id &&
|
|
5129
|
-
x.field.item.language == fieldItem.language &&
|
|
5130
|
-
x.field.item.version == fieldItem.version;
|
|
5131
|
-
const existing = prevFieldActions.find(isSameField);
|
|
5132
|
-
// Preserve any existing state/message (e.g., an early websocket error)
|
|
5133
|
-
// to avoid overwriting it with a stale "running" state
|
|
5134
|
-
const mergedOp = existing
|
|
5135
|
-
? {
|
|
5136
|
-
...op,
|
|
5137
|
-
state: existing.state,
|
|
5138
|
-
message: existing.message,
|
|
5139
|
-
label: existing.label ?? op.label,
|
|
5140
|
-
}
|
|
5141
|
-
: op;
|
|
5142
|
-
return [
|
|
5143
|
-
...prevFieldActions.filter((x) => !isSameField(x)),
|
|
5144
|
-
mergedOp,
|
|
5145
|
-
];
|
|
5146
|
-
});
|
|
5090
|
+
let operationFailed = false;
|
|
5147
5091
|
try {
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5092
|
+
// executeOp resolves (instead of throwing) with a failed status when
|
|
5093
|
+
// the server rejects the operation — no refresh follows then.
|
|
5094
|
+
const result = (await operationPromise);
|
|
5095
|
+
operationFailed = result?.executionStatus === "failed";
|
|
5096
|
+
}
|
|
5097
|
+
catch (err) {
|
|
5098
|
+
operationFailed = true;
|
|
5099
|
+
console.error("Failed to drop component in placeholder", err);
|
|
5100
|
+
}
|
|
5101
|
+
finally {
|
|
5102
|
+
if (insertionSequence !== undefined &&
|
|
5103
|
+
insertingSequenceRef.current === insertionSequence) {
|
|
5104
|
+
if (operationFailed) {
|
|
5105
|
+
setInserting(undefined);
|
|
5155
5106
|
}
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
...prevFieldActions,
|
|
5162
|
-
]);
|
|
5107
|
+
else {
|
|
5108
|
+
// The server accepted the drop; the canvas has not repainted
|
|
5109
|
+
// yet. Hold the indicator until the refresh lands so it stops
|
|
5110
|
+
// when the component actually appears, not seconds earlier.
|
|
5111
|
+
holdInsertingUntilCanvasRefresh(insertionSequence);
|
|
5163
5112
|
}
|
|
5113
|
+
}
|
|
5114
|
+
}
|
|
5115
|
+
return { committed: !operationFailed };
|
|
5116
|
+
},
|
|
5117
|
+
page,
|
|
5118
|
+
triggerFieldAction: async (fieldDescriptor, actionButton, parameters, event) => {
|
|
5119
|
+
const field = await itemsRepository.getField(fieldDescriptor);
|
|
5120
|
+
if (!field)
|
|
5121
|
+
return;
|
|
5122
|
+
const op = {
|
|
5123
|
+
field: fieldDescriptor,
|
|
5124
|
+
// actionButton,
|
|
5125
|
+
label: actionButton.label,
|
|
5126
|
+
state: "running",
|
|
5127
|
+
};
|
|
5128
|
+
const fieldItem = fieldDescriptor.item;
|
|
5129
|
+
if ("clientAction" in actionButton) {
|
|
5130
|
+
await actionButton.clientAction({
|
|
5131
|
+
field,
|
|
5132
|
+
editContext,
|
|
5133
|
+
event,
|
|
5134
|
+
//dialogContext,
|
|
5164
5135
|
});
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5136
|
+
}
|
|
5137
|
+
if (actionButton.action) {
|
|
5138
|
+
setActiveFieldActions((prevFieldActions) => {
|
|
5139
|
+
const isSameField = (x) => x.field.fieldId == fieldDescriptor.fieldId &&
|
|
5140
|
+
x.field.item.id == fieldItem.id &&
|
|
5141
|
+
x.field.item.language == fieldItem.language &&
|
|
5142
|
+
x.field.item.version == fieldItem.version;
|
|
5143
|
+
const existing = prevFieldActions.find(isSameField);
|
|
5144
|
+
// Preserve any existing state/message (e.g., an early websocket error)
|
|
5145
|
+
// to avoid overwriting it with a stale "running" state
|
|
5146
|
+
const mergedOp = existing
|
|
5147
|
+
? {
|
|
5148
|
+
...op,
|
|
5149
|
+
state: existing.state,
|
|
5150
|
+
message: existing.message,
|
|
5151
|
+
label: existing.label ?? op.label,
|
|
5152
|
+
}
|
|
5153
|
+
: op;
|
|
5154
|
+
return [
|
|
5155
|
+
...prevFieldActions.filter((x) => !isSameField(x)),
|
|
5156
|
+
mergedOp,
|
|
5157
|
+
];
|
|
5158
|
+
});
|
|
5159
|
+
try {
|
|
5160
|
+
await executeFieldServerAction(fieldDescriptor.item, fieldDescriptor.fieldId, item.descriptor, actionButton.action, editContext.sessionId, selectedRange?.text || "", parameters || {}, (data) => {
|
|
5161
|
+
// Update progress message if available
|
|
5162
|
+
if (data?.responseText) {
|
|
5163
|
+
op.message = data.responseText;
|
|
5164
|
+
setActiveFieldActions((prevFieldActions) => [
|
|
5165
|
+
...prevFieldActions,
|
|
5166
|
+
]);
|
|
5167
|
+
}
|
|
5168
|
+
// Handle error state from the server response
|
|
5169
|
+
if (data?.state === "Error" || data?.state === "failed") {
|
|
5170
|
+
op.state = "error";
|
|
5171
|
+
op.message = data.errorMessage || "Field action failed";
|
|
5172
|
+
setActiveFieldActions((prevFieldActions) => [
|
|
5173
|
+
...prevFieldActions,
|
|
5174
|
+
]);
|
|
5175
|
+
}
|
|
5176
|
+
});
|
|
5177
|
+
itemsRepository.refreshItems([fieldDescriptor.item]);
|
|
5178
|
+
// Only mark as success if no websocket error has been reported
|
|
5179
|
+
if (op.state === "running") {
|
|
5180
|
+
op.state = "success";
|
|
5181
|
+
// Auto-dismiss successful actions after a brief delay
|
|
5182
|
+
setTimeout(() => {
|
|
5183
|
+
setActiveFieldActions((prevFieldActions) => prevFieldActions.filter((x) => !(x.field.fieldId === fieldDescriptor.fieldId &&
|
|
5184
|
+
x.field.item.id === fieldDescriptor.item.id &&
|
|
5185
|
+
x.field.item.language ===
|
|
5186
|
+
fieldDescriptor.item.language &&
|
|
5187
|
+
x.field.item.version === fieldDescriptor.item.version &&
|
|
5188
|
+
x.state === "success")));
|
|
5189
|
+
}, 500);
|
|
5190
|
+
}
|
|
5191
|
+
else if (op.state === "error") {
|
|
5192
|
+
// Auto-dismiss error after a longer delay (matching the catch block)
|
|
5193
|
+
setTimeout(() => {
|
|
5194
|
+
setActiveFieldActions((prevFieldActions) => prevFieldActions.filter((x) => !(x.field.fieldId === fieldDescriptor.fieldId &&
|
|
5195
|
+
x.field.item.id === fieldDescriptor.item.id &&
|
|
5196
|
+
x.field.item.language ===
|
|
5197
|
+
fieldDescriptor.item.language &&
|
|
5198
|
+
x.field.item.version === fieldDescriptor.item.version)));
|
|
5199
|
+
}, 3000);
|
|
5200
|
+
}
|
|
5201
|
+
requestRefresh("immediate");
|
|
5178
5202
|
}
|
|
5179
|
-
|
|
5180
|
-
|
|
5203
|
+
catch (error) {
|
|
5204
|
+
console.error("Field action failed", error);
|
|
5205
|
+
// Mark as failed and show error message
|
|
5206
|
+
op.state = "error";
|
|
5207
|
+
op.message =
|
|
5208
|
+
error instanceof Error ? error.message : "Field action failed";
|
|
5209
|
+
// Update the field action state to show error
|
|
5210
|
+
setActiveFieldActions((prevFieldActions) => {
|
|
5211
|
+
const isSameField = (x) => x.field.fieldId == fieldDescriptor.fieldId &&
|
|
5212
|
+
x.field.item.id == fieldItem.id &&
|
|
5213
|
+
x.field.item.language == fieldItem.language &&
|
|
5214
|
+
x.field.item.version == fieldItem.version;
|
|
5215
|
+
return [...prevFieldActions.filter((x) => !isSameField(x)), op];
|
|
5216
|
+
});
|
|
5217
|
+
// Auto-dismiss error after a longer delay
|
|
5181
5218
|
setTimeout(() => {
|
|
5182
5219
|
setActiveFieldActions((prevFieldActions) => prevFieldActions.filter((x) => !(x.field.fieldId === fieldDescriptor.fieldId &&
|
|
5183
5220
|
x.field.item.id === fieldDescriptor.item.id &&
|
|
5184
|
-
x.field.item.language ===
|
|
5185
|
-
fieldDescriptor.item.language &&
|
|
5221
|
+
x.field.item.language === fieldDescriptor.item.language &&
|
|
5186
5222
|
x.field.item.version === fieldDescriptor.item.version)));
|
|
5187
5223
|
}, 3000);
|
|
5188
5224
|
}
|
|
5189
|
-
requestRefresh("immediate");
|
|
5190
5225
|
}
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5226
|
+
},
|
|
5227
|
+
dismissFieldAction: (fieldDescriptor) => {
|
|
5228
|
+
setActiveFieldActions((prevFieldActions) => prevFieldActions.filter((x) => !(x.field.fieldId === fieldDescriptor.fieldId &&
|
|
5229
|
+
x.field.item.id === fieldDescriptor.item.id &&
|
|
5230
|
+
x.field.item.language === fieldDescriptor.item.language &&
|
|
5231
|
+
x.field.item.version === fieldDescriptor.item.version)));
|
|
5232
|
+
},
|
|
5233
|
+
addFieldAction: (action) => {
|
|
5234
|
+
setActiveFieldActions((prev) => {
|
|
5235
|
+
const isSameField = (x) => x.field.fieldId === action.field.fieldId &&
|
|
5236
|
+
x.field.item.id === action.field.item.id &&
|
|
5237
|
+
x.field.item.language === action.field.item.language &&
|
|
5238
|
+
x.field.item.version === action.field.item.version;
|
|
5239
|
+
return [...prev.filter((x) => !isSameField(x)), action];
|
|
5240
|
+
});
|
|
5241
|
+
},
|
|
5242
|
+
updateFieldAction: (fieldDescriptor, updates) => {
|
|
5243
|
+
setActiveFieldActions((prev) => prev.map((x) => x.field.fieldId === fieldDescriptor.fieldId &&
|
|
5244
|
+
x.field.item.id === fieldDescriptor.item.id &&
|
|
5245
|
+
x.field.item.language === fieldDescriptor.item.language &&
|
|
5246
|
+
x.field.item.version === fieldDescriptor.item.version
|
|
5247
|
+
? { ...x, ...updates }
|
|
5248
|
+
: x));
|
|
5249
|
+
},
|
|
5250
|
+
activeFieldActions,
|
|
5251
|
+
showContextMenu: (event, items, options) => {
|
|
5252
|
+
contextMenuRef.current?.show(event, items);
|
|
5253
|
+
setContextMenuSource(options?.source);
|
|
5254
|
+
setCurrentOverlay("context-menu");
|
|
5255
|
+
},
|
|
5256
|
+
updateContextMenu: (items) => {
|
|
5257
|
+
contextMenuRef.current?.update(items);
|
|
5258
|
+
},
|
|
5259
|
+
showFieldEditorPopup: (fields, sections, ev) => {
|
|
5260
|
+
setCurrentOverlay("fields");
|
|
5261
|
+
fieldEditorPopupRef.current?.show(fields, sections, ev);
|
|
5262
|
+
},
|
|
5263
|
+
inserting,
|
|
5264
|
+
removingComponentIds,
|
|
5265
|
+
validating,
|
|
5266
|
+
validationResult,
|
|
5267
|
+
loadItem,
|
|
5268
|
+
editHistory: editHistory,
|
|
5269
|
+
historyMode,
|
|
5270
|
+
setHistoryMode,
|
|
5271
|
+
showOnlyMyChanges,
|
|
5272
|
+
setShowOnlyMyChanges,
|
|
5273
|
+
filterByCurrentLanguage,
|
|
5274
|
+
setFilterByCurrentLanguage,
|
|
5275
|
+
historySearchQuery,
|
|
5276
|
+
setHistorySearchQuery,
|
|
5277
|
+
refreshHistory,
|
|
5278
|
+
isRefreshing,
|
|
5279
|
+
isHistoryLoading,
|
|
5280
|
+
canLoadMoreHistory,
|
|
5281
|
+
isHistoryLoadingMore,
|
|
5282
|
+
loadMoreHistory,
|
|
5283
|
+
activeSessions,
|
|
5284
|
+
remoteCarets,
|
|
5285
|
+
unlockField: async () => {
|
|
5286
|
+
setLockedField(undefined); // Clear client-side lock state
|
|
5287
|
+
await releaseFieldLocks(sessionId);
|
|
5288
|
+
},
|
|
5289
|
+
isCommandDisabled: ({ command, data, }) => {
|
|
5290
|
+
const props = {
|
|
5291
|
+
editContext,
|
|
5292
|
+
pathname,
|
|
5293
|
+
router,
|
|
5294
|
+
searchParams,
|
|
5295
|
+
data,
|
|
5296
|
+
openDialog,
|
|
5297
|
+
};
|
|
5298
|
+
return command.disabled(props);
|
|
5299
|
+
},
|
|
5300
|
+
executeCommand,
|
|
5301
|
+
// Workspace state
|
|
5302
|
+
workspace: currentWorkspace,
|
|
5303
|
+
// Filled in below: a workspace's dynamic `visible` callback receives the finished context object.
|
|
5304
|
+
// Evaluating it inside this literal would read `editContext` before its initialization.
|
|
5305
|
+
visibleWorkspaces: [],
|
|
5306
|
+
workspaceId,
|
|
5307
|
+
previousWorkspaceId,
|
|
5308
|
+
switchWorkspace,
|
|
5309
|
+
// Sidebar state
|
|
5310
|
+
availableSidebars: getSidebarsForWorkspace(workspaceId),
|
|
5311
|
+
openSidebars,
|
|
5312
|
+
pinnedSidebars,
|
|
5313
|
+
lockedSidebars,
|
|
5314
|
+
sidebarStacks,
|
|
5315
|
+
toggleSidebar,
|
|
5316
|
+
openSidebar,
|
|
5317
|
+
toggleSidebarPin,
|
|
5318
|
+
toggleSidebarLock,
|
|
5319
|
+
stackSidebar,
|
|
5320
|
+
moveSidebarToColumn,
|
|
5321
|
+
unstackSidebar,
|
|
5322
|
+
reorderSidebarInStack,
|
|
5323
|
+
reorderPinnedSidebars,
|
|
5324
|
+
reorderOpenSidebars,
|
|
5325
|
+
getResolvedSidebar,
|
|
5326
|
+
compareMode,
|
|
5327
|
+
setCompareMode,
|
|
5328
|
+
fullscreen,
|
|
5329
|
+
setFullscreen,
|
|
5330
|
+
componentDesignerComponent,
|
|
5331
|
+
setComponentDesignerComponent,
|
|
5332
|
+
componentDesignerRendering,
|
|
5333
|
+
setComponentDesignerRendering,
|
|
5334
|
+
insertMode,
|
|
5335
|
+
setInsertMode,
|
|
5336
|
+
currentOverlay,
|
|
5337
|
+
contextMenuSource,
|
|
5338
|
+
setCurrentOverlay,
|
|
5339
|
+
lockedField,
|
|
5340
|
+
timings,
|
|
5341
|
+
setTimings,
|
|
5342
|
+
selectedRange,
|
|
5343
|
+
setSelectedRange,
|
|
5344
|
+
replaceSelectedText,
|
|
5345
|
+
insertTextAtCursor,
|
|
5346
|
+
confirm: (props) => {
|
|
5347
|
+
confirmationDialogRef.current?.confirm(props);
|
|
5348
|
+
},
|
|
5349
|
+
showMessageDialog: (props) => {
|
|
5350
|
+
confirmationDialogRef.current?.confirm({
|
|
5351
|
+
header: props.header,
|
|
5352
|
+
message: props.message,
|
|
5353
|
+
accept: () => { },
|
|
5354
|
+
acceptLabel: "Ok",
|
|
5355
|
+
});
|
|
5356
|
+
},
|
|
5357
|
+
showInfoToast,
|
|
5358
|
+
showErrorToast,
|
|
5359
|
+
browseHistory,
|
|
5360
|
+
setCenterPanelView,
|
|
5361
|
+
handleKeyDown,
|
|
5362
|
+
startTour,
|
|
5363
|
+
addSocketMessageListener,
|
|
5364
|
+
sendSocketMessage,
|
|
5365
|
+
socketConnectionVersion,
|
|
5366
|
+
socketDiagnostics,
|
|
5367
|
+
currentItemDescriptor,
|
|
5368
|
+
editorSlots,
|
|
5369
|
+
activeSlotId,
|
|
5370
|
+
slotContexts,
|
|
5371
|
+
registerSlotContext,
|
|
5372
|
+
unregisterSlotContext,
|
|
5373
|
+
getActiveSlotContext,
|
|
5374
|
+
getActiveSlotId,
|
|
5375
|
+
getFieldModificationStoreForSlot,
|
|
5376
|
+
closeEditorSlot,
|
|
5377
|
+
setActiveSlot,
|
|
5378
|
+
revision,
|
|
5379
|
+
fullReloadToken,
|
|
5380
|
+
notifyPageModelReady,
|
|
5381
|
+
pageModelReadyToken,
|
|
5382
|
+
selectedComment,
|
|
5383
|
+
setSelectedComment,
|
|
5384
|
+
selectedSuggestedEdit,
|
|
5385
|
+
setSelectedSuggestedEdit,
|
|
5386
|
+
comments,
|
|
5387
|
+
commentsLoaded,
|
|
5388
|
+
availableCommentTags,
|
|
5389
|
+
loadComments,
|
|
5390
|
+
loadSuggestedEdits,
|
|
5391
|
+
setComments,
|
|
5392
|
+
showComments,
|
|
5393
|
+
setShowComments,
|
|
5394
|
+
showResolvedComments,
|
|
5395
|
+
setShowResolvedComments,
|
|
5396
|
+
addComment: async (options) => {
|
|
5397
|
+
const descriptor = item?.descriptor;
|
|
5398
|
+
if (!descriptor)
|
|
5399
|
+
return;
|
|
5400
|
+
// Only keep a single empty draft comment at a time. Clicking
|
|
5401
|
+
// "add comment" again while an unsaved draft already exists should
|
|
5402
|
+
// focus that draft instead of stacking up more empty inputs.
|
|
5403
|
+
const existingDraft = comments.find((c) => c.isNew);
|
|
5404
|
+
if (existingDraft) {
|
|
5405
|
+
await activateCommentsModeForWriting("comment-add");
|
|
5406
|
+
setSelectedComment(existingDraft);
|
|
5407
|
+
setSelectedSuggestedEdit(undefined);
|
|
5408
|
+
return;
|
|
5212
5409
|
}
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
const
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
updateContextMenu: (items) => {
|
|
5245
|
-
contextMenuRef.current?.update(items);
|
|
5246
|
-
},
|
|
5247
|
-
showFieldEditorPopup: (fields, sections, ev) => {
|
|
5248
|
-
setCurrentOverlay("fields");
|
|
5249
|
-
fieldEditorPopupRef.current?.show(fields, sections, ev);
|
|
5250
|
-
},
|
|
5251
|
-
inserting,
|
|
5252
|
-
removingComponentIds,
|
|
5253
|
-
validating,
|
|
5254
|
-
validationResult,
|
|
5255
|
-
loadItem,
|
|
5256
|
-
editHistory: editHistory,
|
|
5257
|
-
historyMode,
|
|
5258
|
-
setHistoryMode,
|
|
5259
|
-
showOnlyMyChanges,
|
|
5260
|
-
setShowOnlyMyChanges,
|
|
5261
|
-
filterByCurrentLanguage,
|
|
5262
|
-
setFilterByCurrentLanguage,
|
|
5263
|
-
historySearchQuery,
|
|
5264
|
-
setHistorySearchQuery,
|
|
5265
|
-
refreshHistory,
|
|
5266
|
-
isRefreshing,
|
|
5267
|
-
isHistoryLoading,
|
|
5268
|
-
canLoadMoreHistory,
|
|
5269
|
-
isHistoryLoadingMore,
|
|
5270
|
-
loadMoreHistory,
|
|
5271
|
-
activeSessions,
|
|
5272
|
-
remoteCarets,
|
|
5273
|
-
unlockField: async () => {
|
|
5274
|
-
setLockedField(undefined); // Clear client-side lock state
|
|
5275
|
-
await releaseFieldLocks(sessionId);
|
|
5276
|
-
},
|
|
5277
|
-
isCommandDisabled: ({ command, data, }) => {
|
|
5278
|
-
const props = {
|
|
5279
|
-
editContext,
|
|
5280
|
-
pathname,
|
|
5281
|
-
router,
|
|
5282
|
-
searchParams,
|
|
5283
|
-
data,
|
|
5284
|
-
openDialog,
|
|
5285
|
-
};
|
|
5286
|
-
return command.disabled(props);
|
|
5287
|
-
},
|
|
5288
|
-
executeCommand,
|
|
5289
|
-
// Workspace state
|
|
5290
|
-
workspace: currentWorkspace,
|
|
5291
|
-
visibleWorkspaces: (configuration.editor.workspaces ?? [])
|
|
5292
|
-
.filter((w) => {
|
|
5293
|
-
if (w.hidden)
|
|
5294
|
-
return false;
|
|
5295
|
-
if (w.visible && !w.visible(editContext))
|
|
5296
|
-
return false;
|
|
5297
|
-
// Filter by workspace settings from Sitecore (if provided)
|
|
5298
|
-
if (userInfo.workspaces && userInfo.workspaces.length > 0) {
|
|
5299
|
-
return userInfo.workspaces.some((ws) => ws.id === w.id);
|
|
5300
|
-
}
|
|
5301
|
-
return true;
|
|
5302
|
-
})
|
|
5303
|
-
.sort((a, b) => (a.sortOrder ?? 100) - (b.sortOrder ?? 100)),
|
|
5304
|
-
workspaceId,
|
|
5305
|
-
previousWorkspaceId,
|
|
5306
|
-
switchWorkspace,
|
|
5307
|
-
// Sidebar state
|
|
5308
|
-
availableSidebars: getSidebarsForWorkspace(workspaceId),
|
|
5309
|
-
openSidebars,
|
|
5310
|
-
pinnedSidebars,
|
|
5311
|
-
lockedSidebars,
|
|
5312
|
-
sidebarStacks,
|
|
5313
|
-
toggleSidebar,
|
|
5314
|
-
openSidebar,
|
|
5315
|
-
toggleSidebarPin,
|
|
5316
|
-
toggleSidebarLock,
|
|
5317
|
-
stackSidebar,
|
|
5318
|
-
moveSidebarToColumn,
|
|
5319
|
-
unstackSidebar,
|
|
5320
|
-
reorderSidebarInStack,
|
|
5321
|
-
reorderPinnedSidebars,
|
|
5322
|
-
reorderOpenSidebars,
|
|
5323
|
-
getResolvedSidebar,
|
|
5324
|
-
compareMode,
|
|
5325
|
-
setCompareMode,
|
|
5326
|
-
fullscreen,
|
|
5327
|
-
setFullscreen,
|
|
5328
|
-
componentDesignerComponent,
|
|
5329
|
-
setComponentDesignerComponent,
|
|
5330
|
-
componentDesignerRendering,
|
|
5331
|
-
setComponentDesignerRendering,
|
|
5332
|
-
insertMode,
|
|
5333
|
-
setInsertMode,
|
|
5334
|
-
currentOverlay,
|
|
5335
|
-
contextMenuSource,
|
|
5336
|
-
setCurrentOverlay,
|
|
5337
|
-
lockedField,
|
|
5338
|
-
timings,
|
|
5339
|
-
setTimings,
|
|
5340
|
-
selectedRange,
|
|
5341
|
-
setSelectedRange,
|
|
5342
|
-
replaceSelectedText,
|
|
5343
|
-
insertTextAtCursor,
|
|
5344
|
-
confirm: (props) => {
|
|
5345
|
-
confirmationDialogRef.current?.confirm(props);
|
|
5346
|
-
},
|
|
5347
|
-
showMessageDialog: (props) => {
|
|
5348
|
-
confirmationDialogRef.current?.confirm({
|
|
5349
|
-
header: props.header,
|
|
5350
|
-
message: props.message,
|
|
5351
|
-
accept: () => { },
|
|
5352
|
-
acceptLabel: "Ok",
|
|
5353
|
-
});
|
|
5354
|
-
},
|
|
5355
|
-
showInfoToast,
|
|
5356
|
-
showErrorToast,
|
|
5357
|
-
browseHistory,
|
|
5358
|
-
setCenterPanelView,
|
|
5359
|
-
handleKeyDown,
|
|
5360
|
-
startTour,
|
|
5361
|
-
addSocketMessageListener,
|
|
5362
|
-
sendSocketMessage,
|
|
5363
|
-
socketConnectionVersion,
|
|
5364
|
-
socketDiagnostics,
|
|
5365
|
-
currentItemDescriptor,
|
|
5366
|
-
editorSlots,
|
|
5367
|
-
activeSlotId,
|
|
5368
|
-
slotContexts,
|
|
5369
|
-
registerSlotContext,
|
|
5370
|
-
unregisterSlotContext,
|
|
5371
|
-
getActiveSlotContext,
|
|
5372
|
-
getActiveSlotId,
|
|
5373
|
-
getFieldModificationStoreForSlot,
|
|
5374
|
-
closeEditorSlot,
|
|
5375
|
-
setActiveSlot,
|
|
5376
|
-
revision,
|
|
5377
|
-
fullReloadToken,
|
|
5378
|
-
notifyPageModelReady,
|
|
5379
|
-
pageModelReadyToken,
|
|
5380
|
-
selectedComment,
|
|
5381
|
-
setSelectedComment,
|
|
5382
|
-
selectedSuggestedEdit,
|
|
5383
|
-
setSelectedSuggestedEdit,
|
|
5384
|
-
comments,
|
|
5385
|
-
commentsLoaded,
|
|
5386
|
-
availableCommentTags,
|
|
5387
|
-
loadComments,
|
|
5388
|
-
loadSuggestedEdits,
|
|
5389
|
-
setComments,
|
|
5390
|
-
showComments,
|
|
5391
|
-
setShowComments,
|
|
5392
|
-
showResolvedComments,
|
|
5393
|
-
setShowResolvedComments,
|
|
5394
|
-
addComment: async (options) => {
|
|
5395
|
-
const descriptor = item?.descriptor;
|
|
5396
|
-
if (!descriptor)
|
|
5397
|
-
return;
|
|
5398
|
-
// Only keep a single empty draft comment at a time. Clicking
|
|
5399
|
-
// "add comment" again while an unsaved draft already exists should
|
|
5400
|
-
// focus that draft instead of stacking up more empty inputs.
|
|
5401
|
-
const existingDraft = comments.find((c) => c.isNew);
|
|
5402
|
-
if (existingDraft) {
|
|
5410
|
+
// Snapshot selection context up-front so switching views doesn't change what we comment on.
|
|
5411
|
+
const hintedFieldSnapshot = options?.field;
|
|
5412
|
+
const focusedFieldSnapshot = focusedFieldRef.current;
|
|
5413
|
+
const selectedRangeCandidate = isUsableTextSelectionRange(selectedRange)
|
|
5414
|
+
? selectedRange
|
|
5415
|
+
: lastTextSelectionRangeRef.current;
|
|
5416
|
+
const selectedRangeSnapshot = !hintedFieldSnapshot ||
|
|
5417
|
+
selectionRangeMatchesField(selectedRangeCandidate, hintedFieldSnapshot)
|
|
5418
|
+
? selectedRangeCandidate
|
|
5419
|
+
: undefined;
|
|
5420
|
+
const selectedRangeFieldSnapshot = isUsableTextSelectionRange(selectedRangeSnapshot)
|
|
5421
|
+
? {
|
|
5422
|
+
fieldId: selectedRangeSnapshot.fieldId,
|
|
5423
|
+
item: {
|
|
5424
|
+
id: selectedRangeSnapshot.itemId,
|
|
5425
|
+
language: selectedRangeSnapshot.language || descriptor.language,
|
|
5426
|
+
version: typeof selectedRangeSnapshot.version === "number"
|
|
5427
|
+
? selectedRangeSnapshot.version
|
|
5428
|
+
: descriptor.version,
|
|
5429
|
+
},
|
|
5430
|
+
}
|
|
5431
|
+
: undefined;
|
|
5432
|
+
const commentFieldSnapshot = selectedRangeFieldSnapshot ??
|
|
5433
|
+
hintedFieldSnapshot ??
|
|
5434
|
+
focusedFieldSnapshot;
|
|
5435
|
+
const itemId = commentFieldSnapshot?.item.id ||
|
|
5436
|
+
(selection.length > 0 ? selection[0] : undefined) ||
|
|
5437
|
+
descriptor.id;
|
|
5438
|
+
if (!itemId)
|
|
5439
|
+
return;
|
|
5440
|
+
// Ensure the promoted comments surface is active when adding a comment.
|
|
5403
5441
|
await activateCommentsModeForWriting("comment-add");
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
const commentFieldSnapshot = selectedRangeFieldSnapshot ??
|
|
5431
|
-
hintedFieldSnapshot ??
|
|
5432
|
-
focusedFieldSnapshot;
|
|
5433
|
-
const itemId = commentFieldSnapshot?.item.id ||
|
|
5434
|
-
(selection.length > 0 ? selection[0] : undefined) ||
|
|
5435
|
-
descriptor.id;
|
|
5436
|
-
if (!itemId)
|
|
5437
|
-
return;
|
|
5438
|
-
// Ensure the promoted comments surface is active when adding a comment.
|
|
5439
|
-
await activateCommentsModeForWriting("comment-add");
|
|
5440
|
-
const language = commentFieldSnapshot?.item.language || descriptor.language;
|
|
5441
|
-
const version = typeof commentFieldSnapshot?.item.version === "number"
|
|
5442
|
-
? commentFieldSnapshot.item.version
|
|
5443
|
-
: descriptor.version;
|
|
5444
|
-
const getFieldName = async () => {
|
|
5445
|
-
if (!commentFieldSnapshot)
|
|
5446
|
-
return "";
|
|
5447
|
-
const field = await itemsRepository.getField(commentFieldSnapshot);
|
|
5448
|
-
return field?.name;
|
|
5449
|
-
};
|
|
5450
|
-
const getItemName = async () => {
|
|
5451
|
-
const item = await itemsRepository.getItem({
|
|
5452
|
-
id: itemId,
|
|
5442
|
+
const language = commentFieldSnapshot?.item.language || descriptor.language;
|
|
5443
|
+
const version = typeof commentFieldSnapshot?.item.version === "number"
|
|
5444
|
+
? commentFieldSnapshot.item.version
|
|
5445
|
+
: descriptor.version;
|
|
5446
|
+
const getFieldName = async () => {
|
|
5447
|
+
if (!commentFieldSnapshot)
|
|
5448
|
+
return "";
|
|
5449
|
+
const field = await itemsRepository.getField(commentFieldSnapshot);
|
|
5450
|
+
return field?.name;
|
|
5451
|
+
};
|
|
5452
|
+
const getItemName = async () => {
|
|
5453
|
+
const item = await itemsRepository.getItem({
|
|
5454
|
+
id: itemId,
|
|
5455
|
+
language,
|
|
5456
|
+
version,
|
|
5457
|
+
});
|
|
5458
|
+
return item?.name;
|
|
5459
|
+
};
|
|
5460
|
+
const newComment = {
|
|
5461
|
+
id: uuid(),
|
|
5462
|
+
isNew: true,
|
|
5463
|
+
itemId,
|
|
5464
|
+
itemName: await getItemName(),
|
|
5465
|
+
fieldId: commentFieldSnapshot?.fieldId,
|
|
5466
|
+
fieldName: await getFieldName(),
|
|
5467
|
+
mainItemId: descriptor.id,
|
|
5453
5468
|
language,
|
|
5454
5469
|
version,
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
}
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
getContextFactory: (name) => {
|
|
5585
|
-
try {
|
|
5586
|
-
return factoriesRef.map.get(name);
|
|
5587
|
-
}
|
|
5588
|
-
catch {
|
|
5589
|
-
return undefined;
|
|
5590
|
-
}
|
|
5591
|
-
},
|
|
5592
|
-
}), [
|
|
5470
|
+
position: 0,
|
|
5471
|
+
rangeStart: isUsableTextSelectionRange(selectedRangeSnapshot)
|
|
5472
|
+
? selectedRangeSnapshot.startOffset
|
|
5473
|
+
: 0,
|
|
5474
|
+
rangeEnd: isUsableTextSelectionRange(selectedRangeSnapshot)
|
|
5475
|
+
? selectedRangeSnapshot.endOffset
|
|
5476
|
+
: 0,
|
|
5477
|
+
author: user?.name,
|
|
5478
|
+
authorDisplayName: user?.fullName,
|
|
5479
|
+
created: new Date().toISOString(),
|
|
5480
|
+
};
|
|
5481
|
+
if (selectedRangeSnapshot?.clientRect) {
|
|
5482
|
+
newComment[COMMENT_TRANSIENT_SELECTION_RECT] =
|
|
5483
|
+
selectedRangeSnapshot.clientRect;
|
|
5484
|
+
}
|
|
5485
|
+
if (selectedRangeSnapshot?.elementKey) {
|
|
5486
|
+
newComment[COMMENT_TRANSIENT_ELEMENT_KEY] =
|
|
5487
|
+
selectedRangeSnapshot.elementKey;
|
|
5488
|
+
}
|
|
5489
|
+
setComments([newComment, ...comments]);
|
|
5490
|
+
setSelectedComment(newComment);
|
|
5491
|
+
setSelectedSuggestedEdit(undefined);
|
|
5492
|
+
lastTextSelectionRangeRef.current = undefined;
|
|
5493
|
+
},
|
|
5494
|
+
mode,
|
|
5495
|
+
changeMode,
|
|
5496
|
+
setMode,
|
|
5497
|
+
registerModeChangeParticipant,
|
|
5498
|
+
modeTransitionRevision,
|
|
5499
|
+
previewDate,
|
|
5500
|
+
setPreviewDate,
|
|
5501
|
+
layoutMode,
|
|
5502
|
+
setLayoutMode,
|
|
5503
|
+
user,
|
|
5504
|
+
reviews,
|
|
5505
|
+
statusMessage,
|
|
5506
|
+
setStatusMessage,
|
|
5507
|
+
suggestedEdits,
|
|
5508
|
+
setSuggestedEdits,
|
|
5509
|
+
getCurrentSuggestedEdits,
|
|
5510
|
+
suggestionVariantSelection,
|
|
5511
|
+
setSuggestionVariantSelection,
|
|
5512
|
+
showSuggestedEdits,
|
|
5513
|
+
setShowSuggestedEdits,
|
|
5514
|
+
showSuggestedEditsDiff,
|
|
5515
|
+
setShowSuggestedEditsDiff,
|
|
5516
|
+
showVersionDiffHighlighting,
|
|
5517
|
+
setShowVersionDiffHighlighting,
|
|
5518
|
+
enableCompletions,
|
|
5519
|
+
setEnableCompletions,
|
|
5520
|
+
showComponentNavigator,
|
|
5521
|
+
setShowComponentNavigator: handleSetShowComponentNavigator,
|
|
5522
|
+
isComponentNavigatorOpenForSlot,
|
|
5523
|
+
setComponentNavigatorOpenForSlot,
|
|
5524
|
+
showAgentsPanel,
|
|
5525
|
+
setShowAgentsPanel: handleSetShowAgentsPanel,
|
|
5526
|
+
waitForSurfaceSettled: settleRegistry.waitForSurfaceSettled,
|
|
5527
|
+
notifySurfaceSettled: settleRegistry.notifySettled,
|
|
5528
|
+
isEditorFormHiddenForSlot,
|
|
5529
|
+
setEditorFormHiddenForSlot,
|
|
5530
|
+
editorFormHintSeen,
|
|
5531
|
+
markEditorFormHintSeen,
|
|
5532
|
+
editorFormHintVisible,
|
|
5533
|
+
showEditorFormHint,
|
|
5534
|
+
dismissEditorFormHint,
|
|
5535
|
+
editorFormToggleButtonRef,
|
|
5536
|
+
showMinimap: effectiveShowMinimap,
|
|
5537
|
+
setShowMinimap: handleSetShowMinimap,
|
|
5538
|
+
showHelpTerminal,
|
|
5539
|
+
setShowHelpTerminal: handleSetShowHelpTerminal,
|
|
5540
|
+
toggleHelpTerminal,
|
|
5541
|
+
helpTerminalInitialPrompt,
|
|
5542
|
+
helpTerminalProfileName,
|
|
5543
|
+
helpTerminalActiveTab,
|
|
5544
|
+
setHelpTerminalActiveTab,
|
|
5545
|
+
selectedHelpSectionId,
|
|
5546
|
+
setSelectedHelpSectionId,
|
|
5547
|
+
showAgentsWorkspaceEditor,
|
|
5548
|
+
setShowAgentsWorkspaceEditor: handleSetShowAgentsWorkspaceEditor,
|
|
5549
|
+
selectedAgentsWorkspaceAgentId,
|
|
5550
|
+
setSelectedAgentsWorkspaceAgentId,
|
|
5551
|
+
activeEditorTab,
|
|
5552
|
+
setActiveEditorTab,
|
|
5553
|
+
showLayoutComponents,
|
|
5554
|
+
setShowLayoutComponents: handleSetShowLayoutComponents,
|
|
5555
|
+
quotaInfo,
|
|
5556
|
+
isQuotaExceeded: isQuotaExceeded(),
|
|
5557
|
+
getQuotaWarningMessage,
|
|
5558
|
+
isMobile,
|
|
5559
|
+
mobileEditorPanelOpen,
|
|
5560
|
+
setMobileEditorPanelOpen: handleSetMobileEditorPanelOpen,
|
|
5561
|
+
openDialog,
|
|
5562
|
+
webSocketMessages,
|
|
5563
|
+
clearWebSocketMessages: () => setWebSocketMessages([]),
|
|
5564
|
+
userInfo: userInfo,
|
|
5565
|
+
parheliaSettings: effectiveParheliaSettings,
|
|
5566
|
+
setUserPreferences,
|
|
5567
|
+
currentWizardId,
|
|
5568
|
+
setCurrentWizardId,
|
|
5569
|
+
favorites,
|
|
5570
|
+
loadFavorites,
|
|
5571
|
+
refreshFavorites,
|
|
5572
|
+
isQuickSwitcherVisible: quickSwitcherVisible,
|
|
5573
|
+
// Context factory registry methods
|
|
5574
|
+
registerContextFactory: (name, factory) => {
|
|
5575
|
+
try {
|
|
5576
|
+
factoriesRef.map.set(name, factory);
|
|
5577
|
+
}
|
|
5578
|
+
catch { }
|
|
5579
|
+
},
|
|
5580
|
+
unregisterContextFactory: (name) => {
|
|
5581
|
+
try {
|
|
5582
|
+
factoriesRef.map.delete(name);
|
|
5583
|
+
}
|
|
5584
|
+
catch { }
|
|
5585
|
+
},
|
|
5586
|
+
getContextFactory: (name) => {
|
|
5587
|
+
try {
|
|
5588
|
+
return factoriesRef.map.get(name);
|
|
5589
|
+
}
|
|
5590
|
+
catch {
|
|
5591
|
+
return undefined;
|
|
5592
|
+
}
|
|
5593
|
+
},
|
|
5594
|
+
};
|
|
5595
|
+
editContextValue.visibleWorkspaces =
|
|
5596
|
+
filterVisibleWorkspaces(editContextValue);
|
|
5597
|
+
return editContextValue;
|
|
5598
|
+
}, [
|
|
5593
5599
|
operationsContext.ops,
|
|
5594
5600
|
itemsRepository,
|
|
5595
5601
|
configuration,
|
|
@@ -6034,7 +6040,12 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
6034
6040
|
? `${window.location.pathname}?${queryString}`
|
|
6035
6041
|
: window.location.pathname;
|
|
6036
6042
|
window.history.replaceState(getCurrentHistoryState(), "", newUrl);
|
|
6037
|
-
}, configuration: configuration, restoredFromUrl: tourRestoredRef.current })), showSandboxWelcome && (_jsx(SandboxWelcomeOverlay, { userName: userInfo.user.fullName, onDismiss: dismissSandboxWelcome
|
|
6043
|
+
}, configuration: configuration, restoredFromUrl: tourRestoredRef.current })), showSandboxWelcome && (_jsx(SandboxWelcomeOverlay, { userName: userInfo.user.fullName, onDismiss: dismissSandboxWelcome, onReplayTour: sandboxTourShown
|
|
6044
|
+
? () => {
|
|
6045
|
+
dismissSandboxWelcome();
|
|
6046
|
+
startTour();
|
|
6047
|
+
}
|
|
6048
|
+
: undefined, replayEnabled: canStartTour })), _jsx(FeatureGate, { feature: LicenseFeatures.AI, children: _jsx(GuidanceOverlay, {}) }), _jsx(FeatureGate, { feature: LicenseFeatures.AI, children: _jsx(AgentDialogHandler, {}) })] }));
|
|
6038
6049
|
const showRefreshSpinner = editContext.isRefreshing && !activePageViewContext.iframeSupportsRefresh;
|
|
6039
6050
|
return (_jsx(LicenseProvider, { initialLicenseStatus: initialLicenseStatus, initialStatusLoaded: initialLicenseStatusLoaded, children: _jsx("div", { className: `editor h-full w-full`, children: _jsx(OperationsContextProvider, { value: operationsContext.context, children: _jsx(FieldsEditContextProvider, { value: fieldsEditContext, children: _jsx(EditContextProvider, { value: editContext, children: _jsxs(SelectionContextProvider, { value: selectionContextValue, children: [_jsx(DevModeIndicator, {}), startupChecks.state === "loading" && _jsx(EditorLoadingOverlay, {}), showRefreshSpinner && (_jsx("div", { className: "text-neutral-grey-50 pointer-events-none fixed right-0 bottom-0 flex h-24 w-24 items-center justify-center opacity-50 select-none", children: _jsx(Spinner, {}) })), (currentWorkspace.id === "agents" ||
|
|
6040
6051
|
currentWorkspace.id === "taskboard" ||
|