@parhelia/core 0.1.10745
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/LICENSE +8 -0
- package/README.md +34 -0
- package/dev.css +3 -0
- package/dist/agents-view/AgentCard.d.ts +12 -0
- package/dist/agents-view/AgentCard.js +30 -0
- package/dist/agents-view/AgentCard.js.map +1 -0
- package/dist/agents-view/AgentsView.d.ts +5 -0
- package/dist/agents-view/AgentsView.js +255 -0
- package/dist/agents-view/AgentsView.js.map +1 -0
- package/dist/agents-view/ProfileAgentsGroup.d.ts +17 -0
- package/dist/agents-view/ProfileAgentsGroup.js +13 -0
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -0
- package/dist/client-components/api.d.ts +1 -0
- package/dist/client-components/api.js +4 -0
- package/dist/client-components/api.js.map +1 -0
- package/dist/client-components/index.d.ts +17 -0
- package/dist/client-components/index.js +18 -0
- package/dist/client-components/index.js.map +1 -0
- package/dist/components/ActionButton.d.ts +14 -0
- package/dist/components/ActionButton.js +6 -0
- package/dist/components/ActionButton.js.map +1 -0
- package/dist/components/Error.d.ts +9 -0
- package/dist/components/Error.js +24 -0
- package/dist/components/Error.js.map +1 -0
- package/dist/components/FilterInput.d.ts +22 -0
- package/dist/components/FilterInput.js +29 -0
- package/dist/components/FilterInput.js.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/CardConnector.d.ts +4 -0
- package/dist/components/ui/CardConnector.js +6 -0
- package/dist/components/ui/CardConnector.js.map +1 -0
- package/dist/components/ui/LanguageSelector.d.ts +8 -0
- package/dist/components/ui/LanguageSelector.js +47 -0
- package/dist/components/ui/LanguageSelector.js.map +1 -0
- package/dist/components/ui/PlaceholderInput.d.ts +41 -0
- package/dist/components/ui/PlaceholderInput.js +160 -0
- package/dist/components/ui/PlaceholderInput.js.map +1 -0
- package/dist/components/ui/PlaceholderInputTypes.d.ts +41 -0
- package/dist/components/ui/PlaceholderInputTypes.js +48 -0
- package/dist/components/ui/PlaceholderInputTypes.js.map +1 -0
- package/dist/components/ui/PlaceholderItemSelector.d.ts +7 -0
- package/dist/components/ui/PlaceholderItemSelector.js +154 -0
- package/dist/components/ui/PlaceholderItemSelector.js.map +1 -0
- package/dist/components/ui/alert.d.ts +7 -0
- package/dist/components/ui/alert.js +21 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +23 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +33 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +7 -0
- package/dist/components/ui/calendar.js +58 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +19 -0
- package/dist/components/ui/card.js +78 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +10 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/command.js +35 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +53 -0
- package/dist/components/ui/context-menu.js +290 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/copy-button.d.ts +10 -0
- package/dist/components/ui/copy-button.js +61 -0
- package/dist/components/ui/copy-button.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/dialog.js +37 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.js +52 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +9 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +26 -0
- package/dist/components/ui/menubar.js +55 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/paste-button.d.ts +14 -0
- package/dist/components/ui/paste-button.js +114 -0
- package/dist/components/ui/paste-button.js.map +1 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +66 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +7 -0
- package/dist/components/ui/progress.js +9 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/select.js +34 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/sonner.js +16 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +17 -0
- package/dist/components/ui/tabs.js +27 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +11 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.js +18 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/upload-button.d.ts +15 -0
- package/dist/components/ui/upload-button.js +56 -0
- package/dist/components/ui/upload-button.js.map +1 -0
- package/dist/config/config.d.ts +24 -0
- package/dist/config/config.js +1087 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/types.d.ts +249 -0
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -0
- package/dist/editor/AspectRatioSelector.d.ts +13 -0
- package/dist/editor/AspectRatioSelector.js +71 -0
- package/dist/editor/AspectRatioSelector.js.map +1 -0
- 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.d.ts +19 -0
- package/dist/editor/ConfirmationDialog.js +31 -0
- package/dist/editor/ConfirmationDialog.js.map +1 -0
- package/dist/editor/ContentTree.d.ts +39 -0
- package/dist/editor/ContentTree.js +586 -0
- package/dist/editor/ContentTree.js.map +1 -0
- package/dist/editor/ContextMenu.d.ts +15 -0
- package/dist/editor/ContextMenu.js +239 -0
- package/dist/editor/ContextMenu.js.map +1 -0
- package/dist/editor/Editor.d.ts +12 -0
- package/dist/editor/Editor.js +59 -0
- package/dist/editor/Editor.js.map +1 -0
- package/dist/editor/EditorWarning.d.ts +5 -0
- package/dist/editor/EditorWarning.js +12 -0
- package/dist/editor/EditorWarning.js.map +1 -0
- package/dist/editor/EditorWarnings.d.ts +9 -0
- package/dist/editor/EditorWarnings.js +19 -0
- package/dist/editor/EditorWarnings.js.map +1 -0
- package/dist/editor/FieldActionsOverlay.d.ts +18 -0
- package/dist/editor/FieldActionsOverlay.js +201 -0
- package/dist/editor/FieldActionsOverlay.js.map +1 -0
- package/dist/editor/FieldEditorPopup.d.ts +10 -0
- package/dist/editor/FieldEditorPopup.js +23 -0
- package/dist/editor/FieldEditorPopup.js.map +1 -0
- package/dist/editor/FieldHistory.d.ts +7 -0
- package/dist/editor/FieldHistory.js +42 -0
- package/dist/editor/FieldHistory.js.map +1 -0
- package/dist/editor/FieldList.d.ts +19 -0
- package/dist/editor/FieldList.js +90 -0
- package/dist/editor/FieldList.js.map +1 -0
- package/dist/editor/FieldListField.d.ts +16 -0
- package/dist/editor/FieldListField.js +231 -0
- package/dist/editor/FieldListField.js.map +1 -0
- package/dist/editor/FieldListFieldWithFallbacks.d.ts +11 -0
- package/dist/editor/FieldListFieldWithFallbacks.js +120 -0
- package/dist/editor/FieldListFieldWithFallbacks.js.map +1 -0
- package/dist/editor/FloatingToolbar.d.ts +7 -0
- package/dist/editor/FloatingToolbar.js +91 -0
- package/dist/editor/FloatingToolbar.js.map +1 -0
- package/dist/editor/ImageEditButton.d.ts +27 -0
- package/dist/editor/ImageEditButton.js +22 -0
- package/dist/editor/ImageEditButton.js.map +1 -0
- package/dist/editor/ImageEditor.d.ts +5 -0
- package/dist/editor/ImageEditor.js +76 -0
- package/dist/editor/ImageEditor.js.map +1 -0
- package/dist/editor/ItemInfo.d.ts +4 -0
- package/dist/editor/ItemInfo.js +36 -0
- package/dist/editor/ItemInfo.js.map +1 -0
- package/dist/editor/LinkEditorDialog.d.ts +18 -0
- package/dist/editor/LinkEditorDialog.js +101 -0
- package/dist/editor/LinkEditorDialog.js.map +1 -0
- package/dist/editor/MainLayout.d.ts +12 -0
- package/dist/editor/MainLayout.js +55 -0
- package/dist/editor/MainLayout.js.map +1 -0
- package/dist/editor/MobileLayout.d.ts +2 -0
- package/dist/editor/MobileLayout.js +34 -0
- package/dist/editor/MobileLayout.js.map +1 -0
- package/dist/editor/NewEditorClient.d.ts +5 -0
- package/dist/editor/NewEditorClient.js +7 -0
- package/dist/editor/NewEditorClient.js.map +1 -0
- package/dist/editor/PictureCropper.d.ts +6 -0
- package/dist/editor/PictureCropper.js +722 -0
- package/dist/editor/PictureCropper.js.map +1 -0
- package/dist/editor/PictureEditor.d.ts +9 -0
- package/dist/editor/PictureEditor.js +180 -0
- package/dist/editor/PictureEditor.js.map +1 -0
- package/dist/editor/PictureEditorDialog.d.ts +8 -0
- package/dist/editor/PictureEditorDialog.js +195 -0
- package/dist/editor/PictureEditorDialog.js.map +1 -0
- package/dist/editor/QuickItemSwitcher.d.ts +9 -0
- package/dist/editor/QuickItemSwitcher.js +78 -0
- package/dist/editor/QuickItemSwitcher.js.map +1 -0
- package/dist/editor/ScrollingContentTree.d.ts +10 -0
- package/dist/editor/ScrollingContentTree.js +54 -0
- package/dist/editor/ScrollingContentTree.js.map +1 -0
- package/dist/editor/Titlebar.d.ts +1 -0
- package/dist/editor/Titlebar.js +46 -0
- package/dist/editor/Titlebar.js.map +1 -0
- package/dist/editor/ai/AgentCostDisplay.d.ts +32 -0
- package/dist/editor/ai/AgentCostDisplay.js +93 -0
- package/dist/editor/ai/AgentCostDisplay.js.map +1 -0
- package/dist/editor/ai/AgentHistory.d.ts +11 -0
- package/dist/editor/ai/AgentHistory.js +12 -0
- package/dist/editor/ai/AgentHistory.js.map +1 -0
- package/dist/editor/ai/AgentProfilesOverview.d.ts +9 -0
- package/dist/editor/ai/AgentProfilesOverview.js +16 -0
- package/dist/editor/ai/AgentProfilesOverview.js.map +1 -0
- package/dist/editor/ai/AgentStatusBadge.d.ts +26 -0
- package/dist/editor/ai/AgentStatusBadge.js +126 -0
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -0
- package/dist/editor/ai/AgentTerminal.d.ts +14 -0
- package/dist/editor/ai/AgentTerminal.js +2634 -0
- package/dist/editor/ai/AgentTerminal.js.map +1 -0
- package/dist/editor/ai/Agents.d.ts +4 -0
- package/dist/editor/ai/Agents.js +813 -0
- package/dist/editor/ai/Agents.js.map +1 -0
- package/dist/editor/ai/AiResponseMessage.d.ts +18 -0
- package/dist/editor/ai/AiResponseMessage.js +684 -0
- package/dist/editor/ai/AiResponseMessage.js.map +1 -0
- package/dist/editor/ai/ContextInfoBar.d.ts +11 -0
- package/dist/editor/ai/ContextInfoBar.js +355 -0
- package/dist/editor/ai/ContextInfoBar.js.map +1 -0
- package/dist/editor/ai/DancingDots.d.ts +1 -0
- package/dist/editor/ai/DancingDots.js +6 -0
- package/dist/editor/ai/DancingDots.js.map +1 -0
- package/dist/editor/ai/MediaImage.d.ts +6 -0
- package/dist/editor/ai/MediaImage.js +38 -0
- package/dist/editor/ai/MediaImage.js.map +1 -0
- package/dist/editor/ai/ToolCallDisplay.d.ts +45 -0
- package/dist/editor/ai/ToolCallDisplay.js +292 -0
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -0
- package/dist/editor/ai/aiPageModel.d.ts +24 -0
- package/dist/editor/ai/aiPageModel.js +97 -0
- package/dist/editor/ai/aiPageModel.js.map +1 -0
- package/dist/editor/ai/editorAiContext.d.ts +10 -0
- package/dist/editor/ai/editorAiContext.js +10 -0
- package/dist/editor/ai/editorAiContext.js.map +1 -0
- package/dist/editor/ai/types.d.ts +30 -0
- package/dist/editor/ai/types.js +2 -0
- package/dist/editor/ai/types.js.map +1 -0
- package/dist/editor/ai/useAgentStatus.d.ts +14 -0
- package/dist/editor/ai/useAgentStatus.js +203 -0
- package/dist/editor/ai/useAgentStatus.js.map +1 -0
- package/dist/editor/client/AboutDialog.d.ts +2 -0
- package/dist/editor/client/AboutDialog.js +23 -0
- package/dist/editor/client/AboutDialog.js.map +1 -0
- package/dist/editor/client/EditorShell.d.ts +37 -0
- package/dist/editor/client/EditorShell.js +2388 -0
- package/dist/editor/client/EditorShell.js.map +1 -0
- package/dist/editor/client/GenericDialog.d.ts +10 -0
- package/dist/editor/client/GenericDialog.js +25 -0
- package/dist/editor/client/GenericDialog.js.map +1 -0
- package/dist/editor/client/editContext.d.ts +260 -0
- package/dist/editor/client/editContext.js +29 -0
- package/dist/editor/client/editContext.js.map +1 -0
- package/dist/editor/client/fieldModificationStore.d.ts +25 -0
- package/dist/editor/client/fieldModificationStore.js +184 -0
- package/dist/editor/client/fieldModificationStore.js.map +1 -0
- package/dist/editor/client/helpers.d.ts +12 -0
- package/dist/editor/client/helpers.js +29 -0
- package/dist/editor/client/helpers.js.map +1 -0
- package/dist/editor/client/hooks/useEditorUrlSync.d.ts +18 -0
- package/dist/editor/client/hooks/useEditorUrlSync.js +56 -0
- package/dist/editor/client/hooks/useEditorUrlSync.js.map +1 -0
- package/dist/editor/client/hooks/useEditorWebSocket.d.ts +11 -0
- package/dist/editor/client/hooks/useEditorWebSocket.js +86 -0
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.d.ts +1 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.js +12 -0
- package/dist/editor/client/hooks/useGlobalEditorKeyDown.js.map +1 -0
- package/dist/editor/client/hooks/useMediaQuery.d.ts +1 -0
- package/dist/editor/client/hooks/useMediaQuery.js +19 -0
- package/dist/editor/client/hooks/useMediaQuery.js.map +1 -0
- package/dist/editor/client/hooks/useMediaSelector.d.ts +12 -0
- package/dist/editor/client/hooks/useMediaSelector.js +30 -0
- package/dist/editor/client/hooks/useMediaSelector.js.map +1 -0
- package/dist/editor/client/hooks/useQuota.d.ts +29 -0
- package/dist/editor/client/hooks/useQuota.js +53 -0
- package/dist/editor/client/hooks/useQuota.js.map +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +35 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +234 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -0
- package/dist/editor/client/hooks/useWorkbox.d.ts +9 -0
- package/dist/editor/client/hooks/useWorkbox.js +52 -0
- package/dist/editor/client/hooks/useWorkbox.js.map +1 -0
- package/dist/editor/client/itemsRepository.d.ts +38 -0
- package/dist/editor/client/itemsRepository.js +468 -0
- package/dist/editor/client/itemsRepository.js.map +1 -0
- package/dist/editor/client/operations.d.ts +69 -0
- package/dist/editor/client/operations.js +627 -0
- package/dist/editor/client/operations.js.map +1 -0
- package/dist/editor/client/pageModelBuilder.d.ts +6 -0
- package/dist/editor/client/pageModelBuilder.js +155 -0
- package/dist/editor/client/pageModelBuilder.js.map +1 -0
- package/dist/editor/client/ui/EditorChrome.d.ts +12 -0
- package/dist/editor/client/ui/EditorChrome.js +30 -0
- package/dist/editor/client/ui/EditorChrome.js.map +1 -0
- package/dist/editor/client/ui/FullscreenControls.d.ts +7 -0
- package/dist/editor/client/ui/FullscreenControls.js +21 -0
- package/dist/editor/client/ui/FullscreenControls.js.map +1 -0
- package/dist/editor/commands/agentCommands.d.ts +9 -0
- package/dist/editor/commands/agentCommands.js +30 -0
- package/dist/editor/commands/agentCommands.js.map +1 -0
- package/dist/editor/commands/commands.d.ts +19 -0
- package/dist/editor/commands/commands.js +2 -0
- package/dist/editor/commands/commands.js.map +1 -0
- package/dist/editor/commands/componentCommands.d.ts +12 -0
- package/dist/editor/commands/componentCommands.js +378 -0
- package/dist/editor/commands/componentCommands.js.map +1 -0
- package/dist/editor/commands/createVersionCommand.d.ts +4 -0
- package/dist/editor/commands/createVersionCommand.js +24 -0
- package/dist/editor/commands/createVersionCommand.js.map +1 -0
- package/dist/editor/commands/deleteVersionCommand.d.ts +4 -0
- package/dist/editor/commands/deleteVersionCommand.js +53 -0
- package/dist/editor/commands/deleteVersionCommand.js.map +1 -0
- package/dist/editor/commands/itemCommands.d.ts +29 -0
- package/dist/editor/commands/itemCommands.js +428 -0
- package/dist/editor/commands/itemCommands.js.map +1 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.d.ts +8 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js +91 -0
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js.map +1 -0
- package/dist/editor/commands/undo.d.ts +15 -0
- package/dist/editor/commands/undo.js +29 -0
- package/dist/editor/commands/undo.js.map +1 -0
- package/dist/editor/componentTreeHelper.d.ts +18 -0
- package/dist/editor/componentTreeHelper.js +123 -0
- package/dist/editor/componentTreeHelper.js.map +1 -0
- package/dist/editor/context-menu/CopyMoveMenu.d.ts +7 -0
- package/dist/editor/context-menu/CopyMoveMenu.js +58 -0
- package/dist/editor/context-menu/CopyMoveMenu.js.map +1 -0
- package/dist/editor/context-menu/InsertMenu.d.ts +9 -0
- package/dist/editor/context-menu/InsertMenu.js +229 -0
- package/dist/editor/context-menu/InsertMenu.js.map +1 -0
- package/dist/editor/control-center/About.d.ts +1 -0
- package/dist/editor/control-center/About.js +8 -0
- package/dist/editor/control-center/About.js.map +1 -0
- package/dist/editor/control-center/AllAgentsPanel.d.ts +5 -0
- package/dist/editor/control-center/AllAgentsPanel.js +126 -0
- package/dist/editor/control-center/AllAgentsPanel.js.map +1 -0
- package/dist/editor/control-center/ControlCenterMenu.d.ts +1 -0
- package/dist/editor/control-center/ControlCenterMenu.js +66 -0
- package/dist/editor/control-center/ControlCenterMenu.js.map +1 -0
- package/dist/editor/control-center/IndexOverview.d.ts +1 -0
- package/dist/editor/control-center/IndexOverview.js +323 -0
- package/dist/editor/control-center/IndexOverview.js.map +1 -0
- package/dist/editor/control-center/Info.d.ts +1 -0
- package/dist/editor/control-center/Info.js +10 -0
- package/dist/editor/control-center/Info.js.map +1 -0
- package/dist/editor/control-center/LatestFeedback.d.ts +1 -0
- package/dist/editor/control-center/LatestFeedback.js +136 -0
- package/dist/editor/control-center/LatestFeedback.js.map +1 -0
- package/dist/editor/control-center/QuotaInfo.d.ts +1 -0
- package/dist/editor/control-center/QuotaInfo.js +102 -0
- package/dist/editor/control-center/QuotaInfo.js.map +1 -0
- package/dist/editor/control-center/Setup.d.ts +1 -0
- package/dist/editor/control-center/Setup.js +18 -0
- package/dist/editor/control-center/Setup.js.map +1 -0
- package/dist/editor/control-center/Status.d.ts +1 -0
- package/dist/editor/control-center/Status.js +79 -0
- package/dist/editor/control-center/Status.js.map +1 -0
- package/dist/editor/control-center/WebSocketMessages.d.ts +1 -0
- package/dist/editor/control-center/WebSocketMessages.js +71 -0
- package/dist/editor/control-center/WebSocketMessages.js.map +1 -0
- package/dist/editor/control-center/parhelia-setup/Overview.d.ts +1 -0
- package/dist/editor/control-center/parhelia-setup/Overview.js +91 -0
- package/dist/editor/control-center/parhelia-setup/Overview.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.js +195 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/EmbeddingsModelSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.js +22 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/index.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.js +233 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/provider/ProviderSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.d.ts +15 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js +14 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersList.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js +94 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/required-containers/RequiredContainersSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.js +367 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.d.ts +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.js +2 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/types.js.map +1 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.d.ts +4 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.js +25 -0
- package/dist/editor/control-center/setup-steps/AiSetupStep/utils.js.map +1 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.js +46 -0
- package/dist/editor/control-center/setup-steps/DbSetupStep.js.map +1 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.js +36 -0
- package/dist/editor/control-center/setup-steps/IndexSetupStep.js.map +1 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.d.ts +2 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.js +107 -0
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.js.map +1 -0
- package/dist/editor/editor-warnings/ItemLocked.d.ts +2 -0
- package/dist/editor/editor-warnings/ItemLocked.js +38 -0
- package/dist/editor/editor-warnings/ItemLocked.js.map +1 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js +14 -0
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js +14 -0
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/NoWriteAccess.d.ts +2 -0
- package/dist/editor/editor-warnings/NoWriteAccess.js +14 -0
- package/dist/editor/editor-warnings/NoWriteAccess.js.map +1 -0
- package/dist/editor/editor-warnings/ValidationErrors.d.ts +2 -0
- package/dist/editor/editor-warnings/ValidationErrors.js +28 -0
- package/dist/editor/editor-warnings/ValidationErrors.js.map +1 -0
- package/dist/editor/field-types/AttachmentEditor.d.ts +9 -0
- package/dist/editor/field-types/AttachmentEditor.js +73 -0
- package/dist/editor/field-types/AttachmentEditor.js.map +1 -0
- package/dist/editor/field-types/CheckboxEditor.d.ts +5 -0
- package/dist/editor/field-types/CheckboxEditor.js +30 -0
- package/dist/editor/field-types/CheckboxEditor.js.map +1 -0
- package/dist/editor/field-types/DateFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/DateFieldEditor.js +93 -0
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -0
- package/dist/editor/field-types/DateTimeFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/DateTimeFieldEditor.js +151 -0
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -0
- package/dist/editor/field-types/DropLinkEditor.d.ts +5 -0
- package/dist/editor/field-types/DropLinkEditor.js +42 -0
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -0
- package/dist/editor/field-types/DropListEditor.d.ts +5 -0
- package/dist/editor/field-types/DropListEditor.js +46 -0
- package/dist/editor/field-types/DropListEditor.js.map +1 -0
- package/dist/editor/field-types/ImageFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/ImageFieldEditor.js +34 -0
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.js +120 -0
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -0
- package/dist/editor/field-types/LinkFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/LinkFieldEditor.js +62 -0
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -0
- package/dist/editor/field-types/MultiLineText.d.ts +7 -0
- package/dist/editor/field-types/MultiLineText.js +48 -0
- package/dist/editor/field-types/MultiLineText.js.map +1 -0
- package/dist/editor/field-types/NameValueListEditor.d.ts +7 -0
- package/dist/editor/field-types/NameValueListEditor.js +101 -0
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -0
- package/dist/editor/field-types/PictureFieldEditor.d.ts +5 -0
- package/dist/editor/field-types/PictureFieldEditor.js +58 -0
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -0
- package/dist/editor/field-types/RawEditor.d.ts +6 -0
- package/dist/editor/field-types/RawEditor.js +31 -0
- package/dist/editor/field-types/RawEditor.js.map +1 -0
- 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.d.ts +7 -0
- package/dist/editor/field-types/RichTextEditor.js +21 -0
- package/dist/editor/field-types/RichTextEditor.js.map +1 -0
- package/dist/editor/field-types/RichTextEditorComponent.d.ts +8 -0
- package/dist/editor/field-types/RichTextEditorComponent.js +74 -0
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -0
- package/dist/editor/field-types/SingleLineText.d.ts +7 -0
- package/dist/editor/field-types/SingleLineText.js +113 -0
- package/dist/editor/field-types/SingleLineText.js.map +1 -0
- package/dist/editor/field-types/TreeListEditor.d.ts +5 -0
- package/dist/editor/field-types/TreeListEditor.js +316 -0
- package/dist/editor/field-types/TreeListEditor.js.map +1 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.d.ts +11 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.js +83 -0
- package/dist/editor/field-types/richtext/components/EditorDropdown.js.map +1 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +5 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.js +607 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.d.ts +18 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js +71 -0
- package/dist/editor/field-types/richtext/components/SimpleDropdown.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.d.ts +5 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +359 -0
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.d.ts +16 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js +181 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js.map +1 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.d.ts +9 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js +14 -0
- package/dist/editor/field-types/richtext/components/SimpleToolbarButton.js.map +1 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.d.ts +3 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.js +6 -0
- package/dist/editor/field-types/richtext/components/ToolbarButton.js.map +1 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.d.ts +19 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js +17 -0
- package/dist/editor/field-types/richtext/config/pluginFactory.js.map +1 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +4 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js +201 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.d.ts +68 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js +214 -0
- package/dist/editor/field-types/richtext/hooks/useProfileCache.js.map +1 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.d.ts +25 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js +64 -0
- package/dist/editor/field-types/richtext/hooks/useRichTextProfile.js.map +1 -0
- package/dist/editor/field-types/richtext/index.d.ts +6 -0
- package/dist/editor/field-types/richtext/index.js +7 -0
- package/dist/editor/field-types/richtext/index.js.map +1 -0
- package/dist/editor/field-types/richtext/types.d.ts +288 -0
- package/dist/editor/field-types/richtext/types.js +107 -0
- package/dist/editor/field-types/richtext/types.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/conversion.d.ts +7 -0
- package/dist/editor/field-types/richtext/utils/conversion.js +762 -0
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/plugins.d.ts +170 -0
- package/dist/editor/field-types/richtext/utils/plugins.js +490 -0
- package/dist/editor/field-types/richtext/utils/plugins.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.d.ts +38 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.js +386 -0
- package/dist/editor/field-types/richtext/utils/profileMapper.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.d.ts +37 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.js +119 -0
- package/dist/editor/field-types/richtext/utils/profileServiceCache.js.map +1 -0
- package/dist/editor/fieldTypes.d.ts +129 -0
- package/dist/editor/fieldTypes.js +2 -0
- package/dist/editor/fieldTypes.js.map +1 -0
- package/dist/editor/hooks/useEditorSettings.d.ts +17 -0
- package/dist/editor/hooks/useEditorSettings.js +61 -0
- package/dist/editor/hooks/useEditorSettings.js.map +1 -0
- package/dist/editor/media-selector/AiImageSearch.d.ts +4 -0
- package/dist/editor/media-selector/AiImageSearch.js +164 -0
- package/dist/editor/media-selector/AiImageSearch.js.map +1 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.d.ts +3 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.js +57 -0
- package/dist/editor/media-selector/AiImageSearchPrompt.js.map +1 -0
- package/dist/editor/media-selector/MediaFolderBrowser.d.ts +5 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js +182 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -0
- package/dist/editor/media-selector/MediaSelector.d.ts +9 -0
- package/dist/editor/media-selector/MediaSelector.js +8 -0
- package/dist/editor/media-selector/MediaSelector.js.map +1 -0
- package/dist/editor/media-selector/Preview.d.ts +4 -0
- package/dist/editor/media-selector/Preview.js +19 -0
- package/dist/editor/media-selector/Preview.js.map +1 -0
- package/dist/editor/media-selector/Thumbnails.d.ts +8 -0
- package/dist/editor/media-selector/Thumbnails.js +10 -0
- package/dist/editor/media-selector/Thumbnails.js.map +1 -0
- package/dist/editor/media-selector/TreeSelector.d.ts +7 -0
- package/dist/editor/media-selector/TreeSelector.js +183 -0
- package/dist/editor/media-selector/TreeSelector.js.map +1 -0
- package/dist/editor/media-selector/UploadZone.d.ts +4 -0
- package/dist/editor/media-selector/UploadZone.js +81 -0
- package/dist/editor/media-selector/UploadZone.js.map +1 -0
- package/dist/editor/media-selector/index.d.ts +8 -0
- package/dist/editor/media-selector/index.js +9 -0
- package/dist/editor/media-selector/index.js.map +1 -0
- package/dist/editor/menubar/ActiveUsers.d.ts +1 -0
- package/dist/editor/menubar/ActiveUsers.js +120 -0
- package/dist/editor/menubar/ActiveUsers.js.map +1 -0
- package/dist/editor/menubar/ApproveAndPublish.d.ts +1 -0
- package/dist/editor/menubar/ApproveAndPublish.js +13 -0
- package/dist/editor/menubar/ApproveAndPublish.js.map +1 -0
- package/dist/editor/menubar/FavoritesControls.d.ts +8 -0
- package/dist/editor/menubar/FavoritesControls.js +124 -0
- package/dist/editor/menubar/FavoritesControls.js.map +1 -0
- package/dist/editor/menubar/GenericToolbar.d.ts +11 -0
- package/dist/editor/menubar/GenericToolbar.js +10 -0
- package/dist/editor/menubar/GenericToolbar.js.map +1 -0
- package/dist/editor/menubar/ItemActionsMenu.d.ts +3 -0
- package/dist/editor/menubar/ItemActionsMenu.js +23 -0
- package/dist/editor/menubar/ItemActionsMenu.js.map +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.d.ts +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.js +54 -0
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -0
- package/dist/editor/menubar/ItemToolbar.d.ts +1 -0
- package/dist/editor/menubar/ItemToolbar.js +11 -0
- package/dist/editor/menubar/ItemToolbar.js.map +1 -0
- package/dist/editor/menubar/NavButtons.d.ts +1 -0
- package/dist/editor/menubar/NavButtons.js +40 -0
- package/dist/editor/menubar/NavButtons.js.map +1 -0
- package/dist/editor/menubar/PageSelector.d.ts +4 -0
- package/dist/editor/menubar/PageSelector.js +149 -0
- package/dist/editor/menubar/PageSelector.js.map +1 -0
- package/dist/editor/menubar/Separator.d.ts +3 -0
- package/dist/editor/menubar/Separator.js +6 -0
- package/dist/editor/menubar/Separator.js.map +1 -0
- package/dist/editor/menubar/SiteInfo.d.ts +1 -0
- package/dist/editor/menubar/SiteInfo.js +24 -0
- package/dist/editor/menubar/SiteInfo.js.map +1 -0
- package/dist/editor/menubar/ToolbarFactory.d.ts +2 -0
- package/dist/editor/menubar/ToolbarFactory.js +55 -0
- package/dist/editor/menubar/ToolbarFactory.js.map +1 -0
- package/dist/editor/menubar/User.d.ts +4 -0
- package/dist/editor/menubar/User.js +18 -0
- package/dist/editor/menubar/User.js.map +1 -0
- package/dist/editor/menubar/VersionSelector.d.ts +10 -0
- package/dist/editor/menubar/VersionSelector.js +53 -0
- package/dist/editor/menubar/VersionSelector.js.map +1 -0
- package/dist/editor/menubar/WorkflowButton.d.ts +1 -0
- package/dist/editor/menubar/WorkflowButton.js +93 -0
- package/dist/editor/menubar/WorkflowButton.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.js +11 -0
- package/dist/editor/menubar/toolbar-sections/CompareControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.d.ts +7 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js +15 -0
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.js +15 -0
- package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js +41 -0
- package/dist/editor/menubar/toolbar-sections/ReviewCommands.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +17 -0
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.d.ts +1 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +21 -0
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -0
- package/dist/editor/menubar/toolbar-sections/index.d.ts +6 -0
- package/dist/editor/menubar/toolbar-sections/index.js +7 -0
- package/dist/editor/menubar/toolbar-sections/index.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.d.ts +6 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +270 -0
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +1 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.d.ts +4 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.js +15 -0
- package/dist/editor/page-editor-chrome/CommentHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.d.ts +4 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +35 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.d.ts +1 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.js +13 -0
- package/dist/editor/page-editor-chrome/FieldActionIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.d.ts +8 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js +26 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.d.ts +6 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js +14 -0
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenu.d.ts +7 -0
- package/dist/editor/page-editor-chrome/FrameMenu.js +346 -0
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenus.d.ts +5 -0
- package/dist/editor/page-editor-chrome/FrameMenus.js +22 -0
- package/dist/editor/page-editor-chrome/FrameMenus.js.map +1 -0
- package/dist/editor/page-editor-chrome/InlineEditor.d.ts +5 -0
- package/dist/editor/page-editor-chrome/InlineEditor.js +704 -0
- package/dist/editor/page-editor-chrome/InlineEditor.js.map +1 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.d.ts +1 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js +33 -0
- package/dist/editor/page-editor-chrome/LockedFieldIndicator.js.map +1 -0
- package/dist/editor/page-editor-chrome/NoLayout.d.ts +1 -0
- package/dist/editor/page-editor-chrome/NoLayout.js +19 -0
- package/dist/editor/page-editor-chrome/NoLayout.js.map +1 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.d.ts +6 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +64 -0
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.d.ts +1 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +152 -0
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.d.ts +18 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +122 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.d.ts +5 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js +289 -0
- package/dist/editor/page-editor-chrome/PlaceholderDropZones.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.d.ts +6 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js +224 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js.map +1 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.d.ts +4 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +16 -0
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.d.ts +7 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +699 -0
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -0
- package/dist/editor/page-viewer/DeviceToolbar.d.ts +6 -0
- package/dist/editor/page-viewer/DeviceToolbar.js +21 -0
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -0
- package/dist/editor/page-viewer/EditorForm.d.ts +8 -0
- package/dist/editor/page-viewer/EditorForm.js +257 -0
- package/dist/editor/page-viewer/EditorForm.js.map +1 -0
- package/dist/editor/page-viewer/EditorFormPopup.d.ts +11 -0
- package/dist/editor/page-viewer/EditorFormPopup.js +41 -0
- package/dist/editor/page-viewer/EditorFormPopup.js.map +1 -0
- package/dist/editor/page-viewer/MiniMap.d.ts +9 -0
- package/dist/editor/page-viewer/MiniMap.js +233 -0
- package/dist/editor/page-viewer/MiniMap.js.map +1 -0
- package/dist/editor/page-viewer/PageViewer.d.ts +10 -0
- package/dist/editor/page-viewer/PageViewer.js +67 -0
- package/dist/editor/page-viewer/PageViewer.js.map +1 -0
- package/dist/editor/page-viewer/PageViewerFrame.d.ts +11 -0
- package/dist/editor/page-viewer/PageViewerFrame.js +857 -0
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.d.ts +3 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js +339 -0
- package/dist/editor/page-viewer/pageModelSkeletonBuilder.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +40 -0
- package/dist/editor/page-viewer/pageViewContext.js +156 -0
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -0
- package/dist/editor/pageModel.d.ts +222 -0
- package/dist/editor/pageModel.js +2 -0
- package/dist/editor/pageModel.js.map +1 -0
- package/dist/editor/picture-shared.d.ts +16 -0
- package/dist/editor/picture-shared.js +25 -0
- package/dist/editor/picture-shared.js.map +1 -0
- package/dist/editor/reviews/Comment.d.ts +8 -0
- package/dist/editor/reviews/Comment.js +162 -0
- package/dist/editor/reviews/Comment.js.map +1 -0
- package/dist/editor/reviews/CommentDisplayPopover.d.ts +9 -0
- package/dist/editor/reviews/CommentDisplayPopover.js +104 -0
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -0
- package/dist/editor/reviews/CommentEditor.d.ts +20 -0
- package/dist/editor/reviews/CommentEditor.js +57 -0
- package/dist/editor/reviews/CommentEditor.js.map +1 -0
- package/dist/editor/reviews/CommentPopover.d.ts +22 -0
- package/dist/editor/reviews/CommentPopover.js +145 -0
- package/dist/editor/reviews/CommentPopover.js.map +1 -0
- package/dist/editor/reviews/CommentView.d.ts +21 -0
- package/dist/editor/reviews/CommentView.js +52 -0
- package/dist/editor/reviews/CommentView.js.map +1 -0
- package/dist/editor/reviews/Comments.d.ts +3 -0
- package/dist/editor/reviews/Comments.js +118 -0
- package/dist/editor/reviews/Comments.js.map +1 -0
- package/dist/editor/reviews/DiffView.d.ts +17 -0
- package/dist/editor/reviews/DiffView.js +57 -0
- package/dist/editor/reviews/DiffView.js.map +1 -0
- package/dist/editor/reviews/PreviewInfo.d.ts +1 -0
- package/dist/editor/reviews/PreviewInfo.js +12 -0
- package/dist/editor/reviews/PreviewInfo.js.map +1 -0
- package/dist/editor/reviews/Reviews.d.ts +1 -0
- package/dist/editor/reviews/Reviews.js +186 -0
- package/dist/editor/reviews/Reviews.js.map +1 -0
- package/dist/editor/reviews/SuggestedEdit.d.ts +4 -0
- package/dist/editor/reviews/SuggestedEdit.js +200 -0
- package/dist/editor/reviews/SuggestedEdit.js.map +1 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.d.ts +9 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.js +204 -0
- package/dist/editor/reviews/SuggestionDisplayPopover.js.map +1 -0
- package/dist/editor/reviews/commentAi.d.ts +7 -0
- package/dist/editor/reviews/commentAi.js +100 -0
- package/dist/editor/reviews/commentAi.js.map +1 -0
- package/dist/editor/reviews/reviewCommands.d.ts +3 -0
- package/dist/editor/reviews/reviewCommands.js +38 -0
- package/dist/editor/reviews/reviewCommands.js.map +1 -0
- package/dist/editor/reviews/useReviews.d.ts +12 -0
- package/dist/editor/reviews/useReviews.js +43 -0
- package/dist/editor/reviews/useReviews.js.map +1 -0
- package/dist/editor/services/agentService.d.ts +306 -0
- package/dist/editor/services/agentService.js +627 -0
- package/dist/editor/services/agentService.js.map +1 -0
- package/dist/editor/services/aiService.d.ts +106 -0
- package/dist/editor/services/aiService.js +294 -0
- package/dist/editor/services/aiService.js.map +1 -0
- package/dist/editor/services/componentDesignerService.d.ts +46 -0
- package/dist/editor/services/componentDesignerService.js +72 -0
- package/dist/editor/services/componentDesignerService.js.map +1 -0
- package/dist/editor/services/contentService.d.ts +79 -0
- package/dist/editor/services/contentService.js +119 -0
- package/dist/editor/services/contentService.js.map +1 -0
- package/dist/editor/services/contextService.d.ts +26 -0
- package/dist/editor/services/contextService.js +103 -0
- package/dist/editor/services/contextService.js.map +1 -0
- package/dist/editor/services/editService.d.ts +66 -0
- package/dist/editor/services/editService.js +325 -0
- package/dist/editor/services/editService.js.map +1 -0
- package/dist/editor/services/favouritesService.d.ts +33 -0
- package/dist/editor/services/favouritesService.js +22 -0
- package/dist/editor/services/favouritesService.js.map +1 -0
- package/dist/editor/services/indexService.d.ts +13 -0
- package/dist/editor/services/indexService.js +45 -0
- package/dist/editor/services/indexService.js.map +1 -0
- package/dist/editor/services/reviewsService.d.ts +18 -0
- package/dist/editor/services/reviewsService.js +60 -0
- package/dist/editor/services/reviewsService.js.map +1 -0
- package/dist/editor/services/searchService.d.ts +17 -0
- package/dist/editor/services/searchService.js +25 -0
- package/dist/editor/services/searchService.js.map +1 -0
- package/dist/editor/services/serviceHelper.d.ts +10 -0
- package/dist/editor/services/serviceHelper.js +118 -0
- package/dist/editor/services/serviceHelper.js.map +1 -0
- package/dist/editor/services/setupService.d.ts +21 -0
- package/dist/editor/services/setupService.js +10 -0
- package/dist/editor/services/setupService.js.map +1 -0
- package/dist/editor/services/suggestedEditsService.d.ts +18 -0
- package/dist/editor/services/suggestedEditsService.js +36 -0
- package/dist/editor/services/suggestedEditsService.js.map +1 -0
- package/dist/editor/services/systemService.d.ts +4 -0
- package/dist/editor/services/systemService.js +11 -0
- package/dist/editor/services/systemService.js.map +1 -0
- package/dist/editor/services-server/api.d.ts +19 -0
- package/dist/editor/services-server/api.js +111 -0
- package/dist/editor/services-server/api.js.map +1 -0
- 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/sidebar/Completions.d.ts +1 -0
- package/dist/editor/sidebar/Completions.js +55 -0
- package/dist/editor/sidebar/Completions.js.map +1 -0
- package/dist/editor/sidebar/ComponentPalette.d.ts +1 -0
- package/dist/editor/sidebar/ComponentPalette.js +86 -0
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -0
- package/dist/editor/sidebar/ComponentTree.d.ts +1 -0
- package/dist/editor/sidebar/ComponentTree.js +691 -0
- package/dist/editor/sidebar/ComponentTree.js.map +1 -0
- package/dist/editor/sidebar/Debug.d.ts +1 -0
- package/dist/editor/sidebar/Debug.js +71 -0
- package/dist/editor/sidebar/Debug.js.map +1 -0
- package/dist/editor/sidebar/DictionaryEditor.d.ts +1 -0
- package/dist/editor/sidebar/DictionaryEditor.js +158 -0
- package/dist/editor/sidebar/DictionaryEditor.js.map +1 -0
- package/dist/editor/sidebar/Divider.d.ts +6 -0
- package/dist/editor/sidebar/Divider.js +6 -0
- package/dist/editor/sidebar/Divider.js.map +1 -0
- package/dist/editor/sidebar/EditHistory.d.ts +1 -0
- package/dist/editor/sidebar/EditHistory.js +78 -0
- package/dist/editor/sidebar/EditHistory.js.map +1 -0
- 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/Insert.d.ts +1 -0
- package/dist/editor/sidebar/Insert.js +22 -0
- package/dist/editor/sidebar/Insert.js.map +1 -0
- package/dist/editor/sidebar/LeftToolbar.d.ts +1 -0
- package/dist/editor/sidebar/LeftToolbar.js +16 -0
- package/dist/editor/sidebar/LeftToolbar.js.map +1 -0
- package/dist/editor/sidebar/MainContentTree.d.ts +5 -0
- package/dist/editor/sidebar/MainContentTree.js +70 -0
- package/dist/editor/sidebar/MainContentTree.js.map +1 -0
- package/dist/editor/sidebar/Performance.d.ts +1 -0
- package/dist/editor/sidebar/Performance.js +32 -0
- package/dist/editor/sidebar/Performance.js.map +1 -0
- package/dist/editor/sidebar/SEOInfo.d.ts +1 -0
- package/dist/editor/sidebar/SEOInfo.js +158 -0
- package/dist/editor/sidebar/SEOInfo.js.map +1 -0
- package/dist/editor/sidebar/Sessions.d.ts +1 -0
- package/dist/editor/sidebar/Sessions.js +29 -0
- package/dist/editor/sidebar/Sessions.js.map +1 -0
- package/dist/editor/sidebar/Sidebar.d.ts +1 -0
- package/dist/editor/sidebar/Sidebar.js +13 -0
- package/dist/editor/sidebar/Sidebar.js.map +1 -0
- package/dist/editor/sidebar/SidebarView.d.ts +10 -0
- package/dist/editor/sidebar/SidebarView.js +40 -0
- package/dist/editor/sidebar/SidebarView.js.map +1 -0
- package/dist/editor/sidebar/Validation.d.ts +1 -0
- package/dist/editor/sidebar/Validation.js +51 -0
- package/dist/editor/sidebar/Validation.js.map +1 -0
- package/dist/editor/sidebar/ViewSelector.d.ts +4 -0
- package/dist/editor/sidebar/ViewSelector.js +191 -0
- package/dist/editor/sidebar/ViewSelector.js.map +1 -0
- package/dist/editor/sidebar/Workbox.d.ts +1 -0
- package/dist/editor/sidebar/Workbox.js +79 -0
- package/dist/editor/sidebar/Workbox.js.map +1 -0
- package/dist/editor/ui/CenteredMessage.d.ts +3 -0
- package/dist/editor/ui/CenteredMessage.js +5 -0
- package/dist/editor/ui/CenteredMessage.js.map +1 -0
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.d.ts +10 -0
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js +38 -0
- package/dist/editor/ui/CopyMoveTargetSelectorDialog.js.map +1 -0
- package/dist/editor/ui/DialogButtons.d.ts +3 -0
- package/dist/editor/ui/DialogButtons.js +5 -0
- package/dist/editor/ui/DialogButtons.js.map +1 -0
- package/dist/editor/ui/DragPreview.d.ts +14 -0
- package/dist/editor/ui/DragPreview.js +33 -0
- package/dist/editor/ui/DragPreview.js.map +1 -0
- package/dist/editor/ui/Icons.d.ts +74 -0
- package/dist/editor/ui/Icons.js +106 -0
- package/dist/editor/ui/Icons.js.map +1 -0
- package/dist/editor/ui/ItemList.d.ts +16 -0
- package/dist/editor/ui/ItemList.js +19 -0
- package/dist/editor/ui/ItemList.js.map +1 -0
- package/dist/editor/ui/ItemNameDialogNew.d.ts +10 -0
- package/dist/editor/ui/ItemNameDialogNew.js +68 -0
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -0
- package/dist/editor/ui/ItemSearch.d.ts +25 -0
- package/dist/editor/ui/ItemSearch.js +92 -0
- package/dist/editor/ui/ItemSearch.js.map +1 -0
- package/dist/editor/ui/PerfectTree.d.ts +78 -0
- package/dist/editor/ui/PerfectTree.js +858 -0
- package/dist/editor/ui/PerfectTree.js.map +1 -0
- package/dist/editor/ui/Section.d.ts +4 -0
- package/dist/editor/ui/Section.js +12 -0
- package/dist/editor/ui/Section.js.map +1 -0
- package/dist/editor/ui/SimpleIconButton.d.ts +14 -0
- package/dist/editor/ui/SimpleIconButton.js +15 -0
- package/dist/editor/ui/SimpleIconButton.js.map +1 -0
- package/dist/editor/ui/SimpleMenu.d.ts +6 -0
- package/dist/editor/ui/SimpleMenu.js +7 -0
- package/dist/editor/ui/SimpleMenu.js.map +1 -0
- package/dist/editor/ui/SimpleTable.d.ts +14 -0
- package/dist/editor/ui/SimpleTable.js +9 -0
- package/dist/editor/ui/SimpleTable.js.map +1 -0
- package/dist/editor/ui/SimpleTabs.d.ts +15 -0
- package/dist/editor/ui/SimpleTabs.js +20 -0
- package/dist/editor/ui/SimpleTabs.js.map +1 -0
- package/dist/editor/ui/SimpleToolbar.d.ts +3 -0
- package/dist/editor/ui/SimpleToolbar.js +5 -0
- package/dist/editor/ui/SimpleToolbar.js.map +1 -0
- package/dist/editor/ui/Spinner.d.ts +4 -0
- package/dist/editor/ui/Spinner.js +18 -0
- package/dist/editor/ui/Spinner.js.map +1 -0
- package/dist/editor/ui/Splitter.d.ts +22 -0
- package/dist/editor/ui/Splitter.js +443 -0
- package/dist/editor/ui/Splitter.js.map +1 -0
- package/dist/editor/ui/TemplateSelectorDialog.d.ts +8 -0
- package/dist/editor/ui/TemplateSelectorDialog.js +61 -0
- package/dist/editor/ui/TemplateSelectorDialog.js.map +1 -0
- package/dist/editor/ui/Toolbar.d.ts +3 -0
- package/dist/editor/ui/Toolbar.js +5 -0
- package/dist/editor/ui/Toolbar.js.map +1 -0
- package/dist/editor/utils/id-helper.d.ts +1 -0
- package/dist/editor/utils/id-helper.js +5 -0
- package/dist/editor/utils/id-helper.js.map +1 -0
- package/dist/editor/utils/insertOptions.d.ts +3 -0
- package/dist/editor/utils/insertOptions.js +43 -0
- package/dist/editor/utils/insertOptions.js.map +1 -0
- package/dist/editor/utils/itemConverters.d.ts +3 -0
- package/dist/editor/utils/itemConverters.js +53 -0
- package/dist/editor/utils/itemConverters.js.map +1 -0
- package/dist/editor/utils/itemutils.d.ts +3 -0
- package/dist/editor/utils/itemutils.js +24 -0
- package/dist/editor/utils/itemutils.js.map +1 -0
- package/dist/editor/utils/jsonCleaner.d.ts +8 -0
- package/dist/editor/utils/jsonCleaner.js +76 -0
- package/dist/editor/utils/jsonCleaner.js.map +1 -0
- package/dist/editor/utils/keyboardNavigation.d.ts +34 -0
- package/dist/editor/utils/keyboardNavigation.js +237 -0
- package/dist/editor/utils/keyboardNavigation.js.map +1 -0
- package/dist/editor/utils/urlUtils.d.ts +9 -0
- package/dist/editor/utils/urlUtils.js +25 -0
- package/dist/editor/utils/urlUtils.js.map +1 -0
- package/dist/editor/utils/useMemoDebug.d.ts +1 -0
- package/dist/editor/utils/useMemoDebug.js +18 -0
- package/dist/editor/utils/useMemoDebug.js.map +1 -0
- package/dist/editor/utils.d.ts +65 -0
- package/dist/editor/utils.js +468 -0
- package/dist/editor/utils.js.map +1 -0
- package/dist/editor/views/CompareView.d.ts +1 -0
- package/dist/editor/views/CompareView.js +148 -0
- package/dist/editor/views/CompareView.js.map +1 -0
- package/dist/editor/views/EditView.d.ts +1 -0
- package/dist/editor/views/EditView.js +15 -0
- package/dist/editor/views/EditView.js.map +1 -0
- package/dist/editor/views/ItemEditor.d.ts +7 -0
- package/dist/editor/views/ItemEditor.js +29 -0
- package/dist/editor/views/ItemEditor.js.map +1 -0
- package/dist/editor/views/MediaFolderEditView.d.ts +4 -0
- package/dist/editor/views/MediaFolderEditView.js +40 -0
- package/dist/editor/views/MediaFolderEditView.js.map +1 -0
- package/dist/editor/views/ParheliaView.d.ts +5 -0
- package/dist/editor/views/ParheliaView.js +136 -0
- package/dist/editor/views/ParheliaView.js.map +1 -0
- package/dist/editor/views/SingleEditView.d.ts +9 -0
- package/dist/editor/views/SingleEditView.js +33 -0
- package/dist/editor/views/SingleEditView.js.map +1 -0
- package/dist/images/bg-shape-black.webp +0 -0
- package/dist/images/wizard-bg.png +0 -0
- package/dist/images/wizard-tour.png +0 -0
- package/dist/images/wizard.png +0 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/safelist.d.ts +1 -0
- package/dist/lib/safelist.js +5 -0
- package/dist/lib/safelist.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/revision.d.ts +2 -0
- package/dist/revision.js +3 -0
- package/dist/revision.js.map +1 -0
- package/dist/splash-screen/ModernSplashScreen.d.ts +8 -0
- package/dist/splash-screen/ModernSplashScreen.js +92 -0
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -0
- package/dist/splash-screen/NewPage.d.ts +3 -0
- package/dist/splash-screen/NewPage.js +145 -0
- package/dist/splash-screen/NewPage.js.map +1 -0
- package/dist/splash-screen/OpenPage.d.ts +1 -0
- package/dist/splash-screen/OpenPage.js +56 -0
- package/dist/splash-screen/OpenPage.js.map +1 -0
- package/dist/splash-screen/ParheliaAssistantChat.d.ts +8 -0
- package/dist/splash-screen/ParheliaAssistantChat.js +155 -0
- package/dist/splash-screen/ParheliaAssistantChat.js.map +1 -0
- package/dist/splash-screen/RecentAgents.d.ts +7 -0
- package/dist/splash-screen/RecentAgents.js +76 -0
- package/dist/splash-screen/RecentAgents.js.map +1 -0
- package/dist/splash-screen/RecentPages.d.ts +1 -0
- package/dist/splash-screen/RecentPages.js +47 -0
- package/dist/splash-screen/RecentPages.js.map +1 -0
- package/dist/splash-screen/SectionHeadline.d.ts +4 -0
- package/dist/splash-screen/SectionHeadline.js +7 -0
- package/dist/splash-screen/SectionHeadline.js.map +1 -0
- package/dist/styles.css +5914 -0
- package/dist/tour/Tour.d.ts +3 -0
- package/dist/tour/Tour.js +426 -0
- package/dist/tour/Tour.js.map +1 -0
- package/dist/tour/default-tour.d.ts +9 -0
- package/dist/tour/default-tour.js +302 -0
- package/dist/tour/default-tour.js.map +1 -0
- package/dist/tour/preview-tour.d.ts +2 -0
- package/dist/tour/preview-tour.js +93 -0
- package/dist/tour/preview-tour.js.map +1 -0
- package/dist/types.d.ts +396 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/images/bg-shape-black.webp +0 -0
- package/images/wizard-bg.png +0 -0
- package/images/wizard-tour.png +0 -0
- package/images/wizard.png +0 -0
- package/package.json +93 -0
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEditContext, useEditContextRef } from "../client/editContext";
|
|
4
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
5
|
+
import { getComponentCommands } from "../commands/componentCommands";
|
|
6
|
+
import ConfirmationDialog from "../ConfirmationDialog";
|
|
7
|
+
import { PerfectTree } from "../ui/PerfectTree";
|
|
8
|
+
import { isValidPlaceholder } from "../componentTreeHelper";
|
|
9
|
+
import { getAbsoluteIconUrl } from "../utils";
|
|
10
|
+
import { Plus, LayoutTemplate, Pentagon, Folder, Square, ChevronRight, Circle, File, Home, } from "lucide-react";
|
|
11
|
+
import { SimpleIconButton } from "../ui/SimpleIconButton";
|
|
12
|
+
import { Spinner } from "../ui/Spinner";
|
|
13
|
+
export function ComponentTree({}) {
|
|
14
|
+
const [expandedKeys, setExpandedKeys] = useState([]);
|
|
15
|
+
const [selectedKeys, setSelectedKeys] = useState(["page"]);
|
|
16
|
+
const [rootNodes, setRootNodes] = useState([]);
|
|
17
|
+
const [nodeDictionary, setNodeDictionary] = useState({});
|
|
18
|
+
let editContextRef = useEditContextRef();
|
|
19
|
+
const editContext = useEditContext();
|
|
20
|
+
const treeRef = useRef(null);
|
|
21
|
+
const confirmDialogRef = useRef(null);
|
|
22
|
+
const pendingDragStartTimeoutRef = useRef(null);
|
|
23
|
+
// Helper function to clean placeholder labels by removing _{guid} pattern
|
|
24
|
+
function cleanPlaceholderLabel(label) {
|
|
25
|
+
return label.replace(/_{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}$/, "");
|
|
26
|
+
}
|
|
27
|
+
// Helper function to check if a component has editable descendants
|
|
28
|
+
// function hasEditableDescendants(component: Component): boolean {
|
|
29
|
+
// if (!component.placeholders) return false;
|
|
30
|
+
// for (const placeholder of component.placeholders) {
|
|
31
|
+
// // If placeholder itself is editable, we have editable descendants
|
|
32
|
+
// if (placeholder.editable) return true;
|
|
33
|
+
// // Check if any component in this placeholder is editable or has editable descendants
|
|
34
|
+
// for (const comp of placeholder.components) {
|
|
35
|
+
// if (comp.editable || hasEditableDescendants(comp)) {
|
|
36
|
+
// return true;
|
|
37
|
+
// }
|
|
38
|
+
// }
|
|
39
|
+
// }
|
|
40
|
+
// return false;
|
|
41
|
+
// }
|
|
42
|
+
// Helper function to get all editable descendants, flattening the tree
|
|
43
|
+
function getEditableDescendants(component, parent) {
|
|
44
|
+
const editableNodes = [];
|
|
45
|
+
if (component.editable) {
|
|
46
|
+
// If this component is editable, include it and map its children normally
|
|
47
|
+
const node = mapComponentNode(component, parent);
|
|
48
|
+
editableNodes.push(node);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
// If this component is not editable, skip it and collect its editable descendants
|
|
52
|
+
if (component.placeholders) {
|
|
53
|
+
for (const placeholder of component.placeholders) {
|
|
54
|
+
// if (placeholder.editable) {
|
|
55
|
+
// const placeholderNode = mapPlaceholderNode(placeholder, parent);
|
|
56
|
+
// editableNodes.push(placeholderNode);
|
|
57
|
+
// } else {
|
|
58
|
+
for (const childComponent of placeholder.components) {
|
|
59
|
+
const childEditableNodes = getEditableDescendants(childComponent, parent);
|
|
60
|
+
editableNodes.push(...childEditableNodes);
|
|
61
|
+
}
|
|
62
|
+
// }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return editableNodes;
|
|
67
|
+
}
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (treeRef.current) {
|
|
70
|
+
const selectedNodeKey = Object.keys(selectedKeys || {})[0];
|
|
71
|
+
const selectedNodeElement = treeRef.current.querySelector(`[data-id="${selectedNodeKey}"]`);
|
|
72
|
+
if (selectedNodeElement) {
|
|
73
|
+
selectedNodeElement.scrollIntoView({
|
|
74
|
+
behavior: "smooth",
|
|
75
|
+
block: "nearest",
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, [selectedKeys]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (editContext?.selection && editContext.selection.length > 0) {
|
|
82
|
+
setSelectedKeys(editContext.selection);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
setSelectedKeys(["page"]);
|
|
86
|
+
}
|
|
87
|
+
}, [editContext?.selection]);
|
|
88
|
+
const selection = editContext?.selection || [];
|
|
89
|
+
const page = editContext?.page;
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
const newExpandedKeys = [...expandedKeys];
|
|
92
|
+
for (const id of selection) {
|
|
93
|
+
if (nodeDictionary[id]?.parent) {
|
|
94
|
+
expandParents(nodeDictionary[id].parent, newExpandedKeys);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (newExpandedKeys.length !== expandedKeys.length ||
|
|
98
|
+
!newExpandedKeys.every((key, i) => key === expandedKeys[i])) {
|
|
99
|
+
setExpandedKeys(newExpandedKeys);
|
|
100
|
+
}
|
|
101
|
+
}, [selection, nodeDictionary]);
|
|
102
|
+
function mapPlaceholderNode(p, parent) {
|
|
103
|
+
const rawLabel = p.description || p.name;
|
|
104
|
+
const cleanedLabel = cleanPlaceholderLabel(rawLabel);
|
|
105
|
+
const node = {
|
|
106
|
+
key: p.key,
|
|
107
|
+
componentId: p.key,
|
|
108
|
+
label: cleanedLabel,
|
|
109
|
+
icon: _jsx(Folder, { className: "h-4 w-4" }),
|
|
110
|
+
data: p,
|
|
111
|
+
parent: parent,
|
|
112
|
+
type: "placeholder",
|
|
113
|
+
className: !p.editable ? "text-gray-400" : "",
|
|
114
|
+
tags: [],
|
|
115
|
+
};
|
|
116
|
+
if (!editContext?.showLayoutComponents) {
|
|
117
|
+
// Map components and filter out layout components when hidden
|
|
118
|
+
const mappedComponents = p.components.map((c) => mapComponentNode(c, node));
|
|
119
|
+
node.children = mappedComponents.filter((componentNode) => {
|
|
120
|
+
const component = componentNode.data;
|
|
121
|
+
return !component.layoutId;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
// Always map components, but filter based on editability and descendants
|
|
126
|
+
const mappedComponents = p.components.map((c) => mapComponentNode(c, node));
|
|
127
|
+
node.children = mappedComponents.filter((componentNode) => {
|
|
128
|
+
const component = componentNode.data;
|
|
129
|
+
return component.editable || true; //hasEditableDescendants(component);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return node;
|
|
133
|
+
}
|
|
134
|
+
function mapPlaceholders(c, parent) {
|
|
135
|
+
if (!c?.placeholders) {
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
if (!editContext?.showLayoutComponents) {
|
|
139
|
+
// Show only non-layout components
|
|
140
|
+
const nodes = [];
|
|
141
|
+
for (const placeholder of c.placeholders) {
|
|
142
|
+
for (const component of placeholder.components) {
|
|
143
|
+
if (!component.layoutId) {
|
|
144
|
+
const componentNode = mapComponentNode(component, parent);
|
|
145
|
+
nodes.push(componentNode);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return nodes;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
// Original logic for when showing layout components
|
|
153
|
+
// Filter placeholders based on editable descendants
|
|
154
|
+
let placeholdersToShow = c.placeholders.filter((p) => {
|
|
155
|
+
// Show placeholder if it's editable or has editable descendants
|
|
156
|
+
if (p.editable)
|
|
157
|
+
return true;
|
|
158
|
+
return p.components.some((comp) => comp.editable || true);
|
|
159
|
+
});
|
|
160
|
+
if (placeholdersToShow.length > 1) {
|
|
161
|
+
return placeholdersToShow.map((x) => mapPlaceholderNode(x, parent));
|
|
162
|
+
}
|
|
163
|
+
else if (placeholdersToShow.length > 0) {
|
|
164
|
+
const placeholder = placeholdersToShow[0];
|
|
165
|
+
// For single placeholders, map the components directly (don't show placeholder node)
|
|
166
|
+
const mappedComponents = placeholder.components.map((c) => {
|
|
167
|
+
const componentNode = mapComponentNode(c, parent);
|
|
168
|
+
// Apply gray styling to components in non-editable placeholders (only when showing non-editable components)
|
|
169
|
+
if (!placeholder.editable) {
|
|
170
|
+
componentNode.className =
|
|
171
|
+
(componentNode.className || "") + " text-gray-400";
|
|
172
|
+
}
|
|
173
|
+
return componentNode;
|
|
174
|
+
});
|
|
175
|
+
// Filter components to only show editable ones or those with editable descendants
|
|
176
|
+
return mappedComponents.filter((componentNode) => {
|
|
177
|
+
const component = componentNode.data;
|
|
178
|
+
return component.editable || true; // || hasEditableDescendants(component);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return [];
|
|
183
|
+
}
|
|
184
|
+
function mapComponentNode(c, parent) {
|
|
185
|
+
const node = {
|
|
186
|
+
key: c.id,
|
|
187
|
+
componentId: c.id,
|
|
188
|
+
label: c.name,
|
|
189
|
+
icon: c.datasourceItem?.icon ? (_jsx("img", { src: c.datasourceItem.icon, width: 16, height: 16 })) : c.icon ? (_jsx("img", { src: c.icon, width: 16, height: 16 })) : (_jsx(Square, { className: "h-4 w-4" })),
|
|
190
|
+
data: c,
|
|
191
|
+
parent: parent,
|
|
192
|
+
isDraggable: true,
|
|
193
|
+
tags: [],
|
|
194
|
+
className: c.isRemovedFromMasterLanguage || !c.editable ? "text-gray-400" : "",
|
|
195
|
+
type: "component",
|
|
196
|
+
};
|
|
197
|
+
if (c.isInheritedFromMasterLanguage) {
|
|
198
|
+
node.tags.push({
|
|
199
|
+
id: "inherited",
|
|
200
|
+
severity: "info",
|
|
201
|
+
value: "Inherited " + (c.isRemovedFromMasterLanguage ? " / removed" : ""),
|
|
202
|
+
tooltip: c.isRemovedFromMasterLanguage
|
|
203
|
+
? "Component was removed from master language"
|
|
204
|
+
: "Component is inherited from master language",
|
|
205
|
+
icon: _jsx(ChevronRight, { className: "h-3 w-3" }),
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
if (c.layoutId) {
|
|
209
|
+
node.tags.push({
|
|
210
|
+
id: "layout",
|
|
211
|
+
severity: "warning",
|
|
212
|
+
value: "Layout",
|
|
213
|
+
icon: _jsx(ChevronRight, { className: "h-3 w-3" }),
|
|
214
|
+
color: "rgb(192 132 252)",
|
|
215
|
+
tooltip: "Component is inherited from layout. Click to edit layout.",
|
|
216
|
+
onClick: async () => {
|
|
217
|
+
if (!editContext || !c.layoutId)
|
|
218
|
+
return;
|
|
219
|
+
const hostItem = await editContext.itemsRepository.getItem({
|
|
220
|
+
id: c.layoutId,
|
|
221
|
+
language: page.item.language,
|
|
222
|
+
version: 0,
|
|
223
|
+
});
|
|
224
|
+
if (!hostItem)
|
|
225
|
+
return;
|
|
226
|
+
confirmDialogRef.current?.confirm({
|
|
227
|
+
header: "Edit layout",
|
|
228
|
+
message: "Edit layout " + hostItem.path + "?",
|
|
229
|
+
accept: () => editContext.loadItem({
|
|
230
|
+
id: c.layoutId,
|
|
231
|
+
language: page.item.language,
|
|
232
|
+
version: 0,
|
|
233
|
+
}),
|
|
234
|
+
});
|
|
235
|
+
},
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
if (c.isSharedLayout) {
|
|
239
|
+
node.tags.push({
|
|
240
|
+
id: "shared-layout",
|
|
241
|
+
severity: "warning",
|
|
242
|
+
value: "",
|
|
243
|
+
icon: _jsx(Pentagon, { className: "h-3 w-3 text-gray-400", strokeWidth: 1 }),
|
|
244
|
+
tooltip: "Component is shared across all languages",
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
if (c.isShared) {
|
|
248
|
+
node.tags.push({
|
|
249
|
+
id: "linked",
|
|
250
|
+
severity: "warning",
|
|
251
|
+
value: "Shared",
|
|
252
|
+
icon: "",
|
|
253
|
+
tooltip: "Component is linked to " + c.datasourceItem?.id,
|
|
254
|
+
color: "rgb(251, 146, 60)",
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
node.children = mapPlaceholders(c, node);
|
|
258
|
+
if (c.items.length > 0 &&
|
|
259
|
+
c.items[0].id !== c.datasourceItem?.id &&
|
|
260
|
+
c.items[0].id !== page?.item.id) {
|
|
261
|
+
const itemsNode = {
|
|
262
|
+
key: "items" + c.id,
|
|
263
|
+
label: "items",
|
|
264
|
+
icon: _jsx(Circle, { className: "h-4 w-4" }),
|
|
265
|
+
parent: node,
|
|
266
|
+
type: "items",
|
|
267
|
+
};
|
|
268
|
+
itemsNode.children = c.items.map((x) => {
|
|
269
|
+
const itemNode = {
|
|
270
|
+
key: x.id,
|
|
271
|
+
label: x.name,
|
|
272
|
+
icon: _jsx(File, { className: "h-4 w-4" }),
|
|
273
|
+
parent: itemsNode,
|
|
274
|
+
type: "item",
|
|
275
|
+
};
|
|
276
|
+
return itemNode;
|
|
277
|
+
});
|
|
278
|
+
node.children.push(itemsNode);
|
|
279
|
+
}
|
|
280
|
+
return node;
|
|
281
|
+
}
|
|
282
|
+
useEffect(() => {
|
|
283
|
+
if (!page)
|
|
284
|
+
return;
|
|
285
|
+
const treeNodes = mapPlaceholders(page.rootComponent, {
|
|
286
|
+
key: "root",
|
|
287
|
+
label: "Root",
|
|
288
|
+
icon: _jsx(Home, { className: "h-4 w-4" }),
|
|
289
|
+
children: [],
|
|
290
|
+
type: "placeholder",
|
|
291
|
+
});
|
|
292
|
+
const dict = {};
|
|
293
|
+
createMap(treeNodes, dict);
|
|
294
|
+
const otherNode = {
|
|
295
|
+
key: "other",
|
|
296
|
+
label: "Other",
|
|
297
|
+
icon: _jsx(File, { className: "h-4 w-4" }),
|
|
298
|
+
children: [],
|
|
299
|
+
type: "other",
|
|
300
|
+
};
|
|
301
|
+
if (otherNode.children?.length) {
|
|
302
|
+
treeNodes.push(otherNode);
|
|
303
|
+
}
|
|
304
|
+
const pageNode = {
|
|
305
|
+
key: "page",
|
|
306
|
+
label: "Page",
|
|
307
|
+
icon: _jsx(Home, { className: "h-4 w-4" }),
|
|
308
|
+
parent: undefined,
|
|
309
|
+
componentId: page.item.id,
|
|
310
|
+
type: "page",
|
|
311
|
+
};
|
|
312
|
+
const finalNodes = [pageNode, ...treeNodes];
|
|
313
|
+
setRootNodes(finalNodes);
|
|
314
|
+
setNodeDictionary(dict);
|
|
315
|
+
}, [page, editContext?.showLayoutComponents]);
|
|
316
|
+
const handleTreeSelection = useCallback((key, event) => {
|
|
317
|
+
let newKeys = [];
|
|
318
|
+
// Helper: gather visible component keys using current tree data and expanded state
|
|
319
|
+
const getVisibleComponentKeys = () => {
|
|
320
|
+
const keys = [];
|
|
321
|
+
const visit = (nodes) => {
|
|
322
|
+
for (const n of nodes) {
|
|
323
|
+
if (n.type === "component")
|
|
324
|
+
keys.push(n.key);
|
|
325
|
+
if (n.children && expandedKeys.includes(n.key)) {
|
|
326
|
+
visit(n.children);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
visit(rootNodes);
|
|
331
|
+
return keys;
|
|
332
|
+
};
|
|
333
|
+
if (event.shiftKey) {
|
|
334
|
+
const anchorKey = selectedKeys && selectedKeys.length > 0
|
|
335
|
+
? selectedKeys[selectedKeys.length - 1]
|
|
336
|
+
: undefined;
|
|
337
|
+
const orderedKeys = getVisibleComponentKeys();
|
|
338
|
+
const aIdx = anchorKey ? orderedKeys.indexOf(anchorKey) : -1;
|
|
339
|
+
const bIdx = orderedKeys.indexOf(key);
|
|
340
|
+
if (aIdx !== -1 && bIdx !== -1) {
|
|
341
|
+
const start = Math.min(aIdx, bIdx);
|
|
342
|
+
const end = Math.max(aIdx, bIdx);
|
|
343
|
+
const rangeKeys = orderedKeys.slice(start, end + 1);
|
|
344
|
+
if (event.ctrlKey) {
|
|
345
|
+
const union = new Set([
|
|
346
|
+
...selectedKeys.filter((k) => nodeDictionary[k]?.type === "component"),
|
|
347
|
+
...rangeKeys,
|
|
348
|
+
]);
|
|
349
|
+
newKeys = Array.from(union);
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
newKeys = rangeKeys;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
// Fallback to single selection when anchor or target not found
|
|
357
|
+
newKeys = [key];
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
else if (event.ctrlKey) {
|
|
361
|
+
if (selectedKeys.includes(key)) {
|
|
362
|
+
newKeys = selectedKeys.filter((x) => x !== key);
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
newKeys = [...selectedKeys, key];
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
newKeys = [key];
|
|
370
|
+
}
|
|
371
|
+
const selectedComponentIds = Array.from(new Set(newKeys
|
|
372
|
+
.filter((k) => nodeDictionary[k]?.type === "component")
|
|
373
|
+
.map((k) => nodeDictionary[k].componentId)));
|
|
374
|
+
editContextRef.current?.select(selectedComponentIds);
|
|
375
|
+
if (selectedComponentIds.length === 1) {
|
|
376
|
+
editContextRef.current?.setScrollIntoView(selectedComponentIds[0]);
|
|
377
|
+
}
|
|
378
|
+
}, [selectedKeys, nodeDictionary, editContextRef]);
|
|
379
|
+
// Handle tree context menu
|
|
380
|
+
const handleTreeContextMenu = async (node, event) => {
|
|
381
|
+
const componentId = nodeDictionary[node.key]?.componentId;
|
|
382
|
+
let selectedComponentIds = editContext?.selection || [];
|
|
383
|
+
if (componentId) {
|
|
384
|
+
if (selectedComponentIds.indexOf(componentId) < 0) {
|
|
385
|
+
editContextRef.current?.select([componentId]);
|
|
386
|
+
selectedComponentIds = [componentId];
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
function isDefinedEntity(entity) {
|
|
390
|
+
return entity !== undefined;
|
|
391
|
+
}
|
|
392
|
+
let selectedEntities = selectedComponentIds
|
|
393
|
+
.filter((key) => nodeDictionary[key])
|
|
394
|
+
.map((key) => nodeDictionary[key].data)
|
|
395
|
+
.filter(isDefinedEntity);
|
|
396
|
+
if (selectedEntities.length === 0 && nodeDictionary[node.key]?.data) {
|
|
397
|
+
selectedEntities = [nodeDictionary[node.key].data];
|
|
398
|
+
}
|
|
399
|
+
let commands = await getComponentCommands(selectedEntities, editContextRef.current);
|
|
400
|
+
const menu = commands.map((x) => ({
|
|
401
|
+
id: x.id,
|
|
402
|
+
label: x.label,
|
|
403
|
+
icon: x.icon,
|
|
404
|
+
disabled: editContextRef.current?.isCommandDisabled({ command: x }),
|
|
405
|
+
command: async (ev) => {
|
|
406
|
+
await editContextRef.current?.executeCommand({
|
|
407
|
+
command: x,
|
|
408
|
+
data: { components: selectedEntities },
|
|
409
|
+
event: event,
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
}));
|
|
413
|
+
if (editContext?.mode === "edit") {
|
|
414
|
+
// Check if we have a placeholder to add insert options
|
|
415
|
+
const placeholder = getPlaceholder(nodeDictionary[node.key] || null);
|
|
416
|
+
if (placeholder && placeholder.insertOptions) {
|
|
417
|
+
const insertOptions = placeholder.insertOptions
|
|
418
|
+
.filter((x) => !x.isHidden && !x.isInvalid)
|
|
419
|
+
.map((x) => ({
|
|
420
|
+
id: x.typeId,
|
|
421
|
+
icon: (_jsx("img", { src: getAbsoluteIconUrl(x.icon), width: "16", height: "16", className: "m-1" })),
|
|
422
|
+
label: x.name,
|
|
423
|
+
command: async () => {
|
|
424
|
+
await editContextRef.current?.operations.addComponent(x.typeId, placeholder.key, 0, // Insert at the beginning by default
|
|
425
|
+
editContextRef.current?.currentItemDescriptor);
|
|
426
|
+
},
|
|
427
|
+
}));
|
|
428
|
+
if (insertOptions.length > 0) {
|
|
429
|
+
// Add separator if there are existing menu items
|
|
430
|
+
if (menu.length > 0) {
|
|
431
|
+
menu.push({ id: "separator-insert", separator: true });
|
|
432
|
+
}
|
|
433
|
+
// Add insert submenu
|
|
434
|
+
menu.push({
|
|
435
|
+
id: "insert",
|
|
436
|
+
label: "Insert",
|
|
437
|
+
icon: _jsx(Plus, { size: 16 }),
|
|
438
|
+
items: insertOptions,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
editContextRef.current?.showContextMenu(event, menu);
|
|
444
|
+
};
|
|
445
|
+
// Convert expanded keys for PerfectTree
|
|
446
|
+
const expandedItems = expandedKeys;
|
|
447
|
+
// Convert selected keys for PerfectTree
|
|
448
|
+
const selectedItems = selectedKeys;
|
|
449
|
+
const handleCollapseItem = useCallback((key) => {
|
|
450
|
+
// First, get the node we're collapsing
|
|
451
|
+
const nodeToCollapse = nodeDictionary[key];
|
|
452
|
+
// Create a new array for expanded keys
|
|
453
|
+
const newExpandedKeys = [...expandedKeys].filter((x) => x !== key);
|
|
454
|
+
setExpandedKeys(newExpandedKeys);
|
|
455
|
+
}, [expandedKeys, nodeDictionary]);
|
|
456
|
+
// Handle expanding nodes
|
|
457
|
+
const handleToggle = useCallback((key) => {
|
|
458
|
+
if (expandedKeys.includes(key)) {
|
|
459
|
+
handleCollapseItem(key);
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
const newExpandedKeys = [...expandedKeys];
|
|
463
|
+
newExpandedKeys.push(key);
|
|
464
|
+
setExpandedKeys(newExpandedKeys);
|
|
465
|
+
}
|
|
466
|
+
}, [expandedKeys, handleCollapseItem]);
|
|
467
|
+
// Handle collapsing nodes
|
|
468
|
+
const getPlaceholder = (node) => {
|
|
469
|
+
if (!node)
|
|
470
|
+
return null;
|
|
471
|
+
if (node.type === "placeholder") {
|
|
472
|
+
const placeholder = node.data;
|
|
473
|
+
return placeholder.editable ? placeholder : null;
|
|
474
|
+
}
|
|
475
|
+
if (node.type === "component" && node.data.placeholders) {
|
|
476
|
+
const editablePlaceholders = node.data.placeholders.filter((p) => p.editable);
|
|
477
|
+
if (editablePlaceholders.length === 1)
|
|
478
|
+
return editablePlaceholders[0];
|
|
479
|
+
}
|
|
480
|
+
return null;
|
|
481
|
+
};
|
|
482
|
+
// Resolve placeholder and correct index for drop zones even when placeholders are hidden/flattened
|
|
483
|
+
const getSiblingsForParent = (parent) => {
|
|
484
|
+
if (!parent)
|
|
485
|
+
return rootNodes || [];
|
|
486
|
+
const parentNode = nodeDictionary[parent.key];
|
|
487
|
+
return (parentNode?.children ||
|
|
488
|
+
[]);
|
|
489
|
+
};
|
|
490
|
+
const findNearestComponentNeighbor = (siblings, index) => {
|
|
491
|
+
// Prefer right neighbor
|
|
492
|
+
for (let i = index; i < siblings.length; i++) {
|
|
493
|
+
if (siblings[i]?.type === "component")
|
|
494
|
+
return siblings[i];
|
|
495
|
+
}
|
|
496
|
+
// Fallback to left neighbor
|
|
497
|
+
for (let j = index - 1; j >= 0; j--) {
|
|
498
|
+
if (siblings[j]?.type === "component")
|
|
499
|
+
return siblings[j];
|
|
500
|
+
}
|
|
501
|
+
return null;
|
|
502
|
+
};
|
|
503
|
+
const resolveDropContext = (dragOverParent, index) => {
|
|
504
|
+
// Direct placeholder parent
|
|
505
|
+
if (dragOverParent && dragOverParent.type === "placeholder") {
|
|
506
|
+
const placeholder = dragOverParent.data;
|
|
507
|
+
return {
|
|
508
|
+
placeholder: placeholder.editable ? placeholder : null,
|
|
509
|
+
indexInPlaceholder: Math.max(0, index),
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
// Single editable placeholder on a component
|
|
513
|
+
if (dragOverParent && dragOverParent.type === "component") {
|
|
514
|
+
const component = dragOverParent.data;
|
|
515
|
+
const editablePlaceholders = (component.placeholders || []).filter((p) => p.editable);
|
|
516
|
+
const siblings = getSiblingsForParent(dragOverParent);
|
|
517
|
+
if (editablePlaceholders.length === 1) {
|
|
518
|
+
const ph = editablePlaceholders[0];
|
|
519
|
+
// Count how many siblings in this placeholder appear before the zone
|
|
520
|
+
const indexInPlaceholder = siblings
|
|
521
|
+
.slice(0, Math.max(0, index))
|
|
522
|
+
.filter((n) => n.type === "component" &&
|
|
523
|
+
n.data?.parentPlaceholder?.key === ph.key).length;
|
|
524
|
+
return { placeholder: ph, indexInPlaceholder };
|
|
525
|
+
}
|
|
526
|
+
// Multiple placeholders: infer from nearest neighbor component
|
|
527
|
+
const neighbor = findNearestComponentNeighbor(siblings, Math.max(0, index));
|
|
528
|
+
const ph = neighbor?.data?.parentPlaceholder;
|
|
529
|
+
if (ph && ph.editable) {
|
|
530
|
+
const indexInPlaceholder = siblings
|
|
531
|
+
.slice(0, Math.max(0, index))
|
|
532
|
+
.filter((n) => n.type === "component" &&
|
|
533
|
+
n.data?.parentPlaceholder?.key === ph.key).length;
|
|
534
|
+
return { placeholder: ph, indexInPlaceholder };
|
|
535
|
+
}
|
|
536
|
+
return { placeholder: null, indexInPlaceholder: 0 };
|
|
537
|
+
}
|
|
538
|
+
// Root-level (no parent): infer from neighbors among root nodes
|
|
539
|
+
const siblings = getSiblingsForParent(null);
|
|
540
|
+
const neighbor = findNearestComponentNeighbor(siblings, Math.max(0, index));
|
|
541
|
+
const ph = neighbor?.data?.parentPlaceholder;
|
|
542
|
+
if (ph && ph.editable) {
|
|
543
|
+
const indexInPlaceholder = siblings
|
|
544
|
+
.slice(0, Math.max(0, index))
|
|
545
|
+
.filter((n) => n.type === "component" &&
|
|
546
|
+
n.data?.parentPlaceholder?.key === ph.key).length;
|
|
547
|
+
return { placeholder: ph, indexInPlaceholder };
|
|
548
|
+
}
|
|
549
|
+
return { placeholder: null, indexInPlaceholder: 0 };
|
|
550
|
+
};
|
|
551
|
+
// Handle drag over node (memoized)
|
|
552
|
+
const handleDragOverZone = useCallback((dragOverNode, index, event) => {
|
|
553
|
+
if (!editContext?.dragObject)
|
|
554
|
+
return false;
|
|
555
|
+
const { placeholder } = resolveDropContext(dragOverNode, index);
|
|
556
|
+
if (!placeholder)
|
|
557
|
+
return false;
|
|
558
|
+
const isValid = isValidPlaceholder(placeholder, editContext.dragObject);
|
|
559
|
+
event.dataTransfer.dropEffect = isValid ? "move" : "none";
|
|
560
|
+
return isValid;
|
|
561
|
+
}, [editContext?.dragObject]);
|
|
562
|
+
// Handle drop on node (memoized)
|
|
563
|
+
const handleDropZone = useCallback((droppedOnNode, index, event) => {
|
|
564
|
+
// When dropping on a node (index < 0), use legacy behavior
|
|
565
|
+
if (index < 0) {
|
|
566
|
+
const placeholder = getPlaceholder(droppedOnNode);
|
|
567
|
+
if (!placeholder)
|
|
568
|
+
return;
|
|
569
|
+
editContext.droppedInPlaceholder(placeholder.key, index);
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
const { placeholder, indexInPlaceholder } = resolveDropContext(droppedOnNode, index);
|
|
573
|
+
if (!placeholder)
|
|
574
|
+
return;
|
|
575
|
+
editContext.droppedInPlaceholder(placeholder.key, indexInPlaceholder);
|
|
576
|
+
}, [editContext]);
|
|
577
|
+
// Memoize isValidDropZone callback
|
|
578
|
+
const handleIsValidDropZone = useCallback((parent, index) => {
|
|
579
|
+
const { placeholder } = resolveDropContext(parent, index);
|
|
580
|
+
if (!placeholder)
|
|
581
|
+
return false;
|
|
582
|
+
if (!editContext?.dragObject)
|
|
583
|
+
return false;
|
|
584
|
+
const result = isValidPlaceholder(placeholder, editContext.dragObject);
|
|
585
|
+
return result;
|
|
586
|
+
}, [editContext?.dragObject]);
|
|
587
|
+
// Memoize onStartDrag callback
|
|
588
|
+
const handleStartDrag = useCallback((data) => {
|
|
589
|
+
const component = data.node.data;
|
|
590
|
+
// Initialize drag data to make sure dataTransfer is set
|
|
591
|
+
data.event.dataTransfer.setData("text/plain", data.node.key);
|
|
592
|
+
// Align with FrameMenu: include componentId and allowed effect
|
|
593
|
+
data.event.dataTransfer.setData("componentId", component.id);
|
|
594
|
+
data.event.dataTransfer.effectAllowed = "copyMove";
|
|
595
|
+
// Only create drag object for components with datasourceItem
|
|
596
|
+
if (!component?.datasourceItem)
|
|
597
|
+
return;
|
|
598
|
+
pendingDragStartTimeoutRef.current = setTimeout(() => {
|
|
599
|
+
const language = editContext.page.item.language;
|
|
600
|
+
const version = editContext.page.item.version;
|
|
601
|
+
const selectedIds = (editContext?.selection?.length || 0) > 1 &&
|
|
602
|
+
editContext.selection.includes(component.id)
|
|
603
|
+
? editContext.selection
|
|
604
|
+
: [component.id];
|
|
605
|
+
const componentsToDrag = selectedIds.map((id) => ({
|
|
606
|
+
id,
|
|
607
|
+
language,
|
|
608
|
+
version,
|
|
609
|
+
}));
|
|
610
|
+
editContext.dragStart({
|
|
611
|
+
type: "component",
|
|
612
|
+
typeId: component.typeId,
|
|
613
|
+
templateId: component.datasourceItem?.templateId,
|
|
614
|
+
name: component.name,
|
|
615
|
+
components: componentsToDrag,
|
|
616
|
+
});
|
|
617
|
+
}, 50);
|
|
618
|
+
// Prevent any upstream handlers from interfering
|
|
619
|
+
data.event.stopPropagation();
|
|
620
|
+
}, [editContext]);
|
|
621
|
+
// Memoize onDragEnd callback
|
|
622
|
+
const handleDragEnd = useCallback((event) => {
|
|
623
|
+
if (pendingDragStartTimeoutRef.current) {
|
|
624
|
+
clearTimeout(pendingDragStartTimeoutRef.current);
|
|
625
|
+
pendingDragStartTimeoutRef.current = null;
|
|
626
|
+
}
|
|
627
|
+
editContext.dragEnd();
|
|
628
|
+
}, [editContext]);
|
|
629
|
+
// Cleanup pending drag start timeout on unmount
|
|
630
|
+
useEffect(() => {
|
|
631
|
+
return () => {
|
|
632
|
+
if (pendingDragStartTimeoutRef.current) {
|
|
633
|
+
clearTimeout(pendingDragStartTimeoutRef.current);
|
|
634
|
+
pendingDragStartTimeoutRef.current = null;
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
}, []);
|
|
638
|
+
if (!page) {
|
|
639
|
+
if (editContext?.contentEditorItem?.hasLayout) {
|
|
640
|
+
return (_jsx("div", { className: "flex h-full items-center justify-center text-xs text-gray-500", children: _jsx(Spinner, {}) }));
|
|
641
|
+
}
|
|
642
|
+
return (_jsx("div", { className: "flex h-full items-center justify-center text-xs text-gray-500", children: "This item has no layout." }));
|
|
643
|
+
}
|
|
644
|
+
return (_jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-gray-200 px-2 py-1", children: [_jsx("div", { className: "flex items-center gap-1", children: _jsx(SimpleIconButton, { icon: _jsx(Plus, { strokeWidth: 1, className: "h-4 w-4" }), label: "Add component", size: "small", "data-testid": "component-tree-add-component", onClick: (event) => {
|
|
645
|
+
if (!editContext ||
|
|
646
|
+
editContext.readonly ||
|
|
647
|
+
editContext.mode !== "edit")
|
|
648
|
+
return;
|
|
649
|
+
editContext.setInsertMode(true);
|
|
650
|
+
} }) }), _jsx("div", { className: "flex items-center gap-1", children: _jsx(SimpleIconButton, { icon: _jsx(LayoutTemplate, { strokeWidth: 1, className: "h-4 w-4" }), label: editContext?.showLayoutComponents ? "Hide layout" : "Show layout", size: "small", selected: editContext?.showLayoutComponents, onClick: () => editContext?.setShowLayoutComponents(!editContext.showLayoutComponents) }) })] }), _jsx("div", { className: "flex-1 p-2", ref: treeRef, "data-testid": "component-tree", children: _jsx(PerfectTree, { nodes: rootNodes, isDragging: !!editContext?.dragObject, multiDragNoun: "components", selectedKeys: selectedItems, expandedKeys: expandedItems, onToggleExpand: handleToggle, onSelect: handleTreeSelection, onContextMenu: handleTreeContextMenu, enableDragAndDrop: true, onDragOverZone: handleDragOverZone, isValidDropZone: handleIsValidDropZone, onStartDrag: handleStartDrag, onDragEnd: handleDragEnd, onDrop: handleDropZone, renderNode: (node) => renderNode(node) }) }), _jsx(ConfirmationDialog, { ref: confirmDialogRef })] }));
|
|
651
|
+
}
|
|
652
|
+
function renderNode(node) {
|
|
653
|
+
return (_jsx("div", { className: `component-tree-node ${node.type ? `component-tree-${node.type}` : ""}`, "data-component-node": node.type === "component" ? "true" : undefined, children: _jsxs("div", { className: "flex items-center gap-2 text-[12px] text-gray-600", children: [typeof node.icon === "string" ? (_jsx("i", { className: node.icon })) : (node.icon), _jsx("span", { className: node.className, children: node.label }), node.tags?.map((x) => (_jsx("div", { children: _jsxs("span", { id: `id-${node.key}-${x.id}`, className: "ml-2 flex rounded p-0.5 px-1.5 text-xs text-white", style: {
|
|
654
|
+
backgroundColor: x.color,
|
|
655
|
+
marginLeft: "8px",
|
|
656
|
+
fontSize: "10px",
|
|
657
|
+
}, title: x.tooltip, onClick: x.onClick
|
|
658
|
+
? (e) => {
|
|
659
|
+
e.stopPropagation();
|
|
660
|
+
x.onClick();
|
|
661
|
+
}
|
|
662
|
+
: undefined, children: [x.icon, x.value] }) }, `tag-${node.key}-${x.id}`)))] }) }));
|
|
663
|
+
}
|
|
664
|
+
function createMap(treeNodes, nodeDictionary) {
|
|
665
|
+
treeNodes.forEach((n) => {
|
|
666
|
+
if (n.key)
|
|
667
|
+
nodeDictionary[n.key] = n;
|
|
668
|
+
if (n.children)
|
|
669
|
+
createMap(n.children, nodeDictionary);
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
function expandParents(node, expandedKeysList) {
|
|
673
|
+
if (!node)
|
|
674
|
+
return;
|
|
675
|
+
if (node.key && !expandedKeysList.includes(node.key)) {
|
|
676
|
+
expandedKeysList.push(node.key);
|
|
677
|
+
}
|
|
678
|
+
if (node.parent) {
|
|
679
|
+
expandParents(node.parent, expandedKeysList);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
function hasSameProps(obj1, obj2) {
|
|
683
|
+
var obj1Props = Object.keys(obj1), obj2Props = Object.keys(obj2);
|
|
684
|
+
if (obj1Props.length == obj2Props.length) {
|
|
685
|
+
return obj1Props.every(function (prop) {
|
|
686
|
+
return obj2Props.indexOf(prop) >= 0;
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
return false;
|
|
690
|
+
}
|
|
691
|
+
//# sourceMappingURL=ComponentTree.js.map
|