@atom8n/n8n-editor-ui 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.stylelintcache +1 -0
- package/README.md +59 -0
- package/biome.jsonc +8 -0
- package/build.log +55 -0
- package/data/node-popularity.json +3998 -0
- package/dist/assets/AddDataTableModal-UINkk54_.js +1555 -0
- package/dist/assets/AgentEditorModal-CVww87TJ.js +358 -0
- package/dist/assets/Alert-Dy86dyOr.js +102 -0
- package/dist/assets/AnimatedSpinner-DmPN4poP.js +15 -0
- package/dist/assets/AnnotationTagsDropdown.ee-BJ7N9lek.js +71 -0
- package/dist/assets/AuthView-D2LWHrMp.js +106 -0
- package/dist/assets/BottomMenu-CIQiK_dJ.js +532 -0
- package/dist/assets/CalendarDate-DgQUMbNo.js +875 -0
- package/dist/assets/ChangePasswordView-Z6tUkw0u.js +133 -0
- package/dist/assets/ChatAgentAvatar-50YBnv3N.js +67 -0
- package/dist/assets/ChatFile-xZxmc2nV.js +146 -0
- package/dist/assets/ChatLayout-CTE_5SiM.js +96 -0
- package/dist/assets/ChatPersonalAgentsView-BGpHk03K.js +149 -0
- package/dist/assets/ChatSidebar-BkVwIypC.js +528 -0
- package/dist/assets/ChatView-BbbdeU9x.js +1559 -0
- package/dist/assets/ChatWorkflowAgentsView-BtunOxlC.js +116 -0
- package/dist/assets/CollectionParameter-BdcPG1lu.js +52 -0
- package/dist/assets/CommitMonoVariable-ytizKI8U.woff2 +0 -0
- package/dist/assets/CommunityNodeUpdateInfo-C37kca4W.js +273 -0
- package/dist/assets/CopyInput-DDZVu2iU.js +74 -0
- package/dist/assets/CredentialIcon-8YdTTFZ1.js +80 -0
- package/dist/assets/CredentialPicker-DWtj314o.js +293 -0
- package/dist/assets/CredentialSelectorModal-DTW2fKh0.js +138 -0
- package/dist/assets/CredentialsView-BjUchcCu.js +480 -0
- package/dist/assets/DataTableActions-DpAkoxg_.js +95 -0
- package/dist/assets/DataTableDetailsView-Coq7zdW5.js +41922 -0
- package/dist/assets/DataTableView-Cs-BIkzw.js +293 -0
- package/dist/assets/DemoFooter-Cga3jvi-.js +65 -0
- package/dist/assets/Draggable-vfvXl9Sp.js +105 -0
- package/dist/assets/EmptySharedSectionActionBox-DOXZtTCv.js +36 -0
- package/dist/assets/EnterpriseEdition.ee-D_rCFexM.js +15 -0
- package/dist/assets/EntityNotFound-3dhTRWsE.js +85 -0
- package/dist/assets/EntityUnAuthorised-ChJYZakE.js +66 -0
- package/dist/assets/ErrorView-zT9cX76a.js +61 -0
- package/dist/assets/EvaluationsRootView-C-OVWYnY.js +523 -0
- package/dist/assets/EvaluationsView-CJwJTruc.js +469 -0
- package/dist/assets/ExecutionsTime-DEQiyozR.js +573 -0
- package/dist/assets/ExecutionsView-Bd5Oh8TH.js +791 -0
- package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-C7Ih-uRo.js +191 -0
- package/dist/assets/FixedCollectionParameter-CYuTDW9t.js +496 -0
- package/dist/assets/ForgotMyPasswordView-Bs_L9P27.js +102 -0
- package/dist/assets/InsightsChartAverageRuntime-Bp3VA8_7.js +62 -0
- package/dist/assets/InsightsChartFailed-KPaNWoEr.js +52 -0
- package/dist/assets/InsightsChartFailureRate-DE6kE3FM.js +54 -0
- package/dist/assets/InsightsChartTimeSaved-auABNZlc.js +68 -0
- package/dist/assets/InsightsChartTotal-BKzYRKE7.js +56 -0
- package/dist/assets/InsightsDashboard-JWx4W6Db.js +473 -0
- package/dist/assets/InsightsPaywall-C8zLLKe8.js +63 -0
- package/dist/assets/InsightsSummary-cmN1lHDm.js +210 -0
- package/dist/assets/InsightsTableWorkflows-CqcC3IbQ.js +203 -0
- package/dist/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
- package/dist/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
- package/dist/assets/ItemsRenderer-DC8WVyMv.js +922 -0
- package/dist/assets/KeyboardShortcutTooltip-D8PAK5JP.js +31 -0
- package/dist/assets/LogsPanel-BR06u9RK.js +52 -0
- package/dist/assets/LogsPanel-C-_acMHp.js +2325 -0
- package/dist/assets/MCPConnectWorkflowsModal-3g8_iUa4.js +303 -0
- package/dist/assets/MainHeader-DiQc1edn.js +2153 -0
- package/dist/assets/MainSidebar-CoPGG5Ea.js +804 -0
- package/dist/assets/MigrationRuleDetail-BAxk1Pvl.js +295 -0
- package/dist/assets/MigrationRules-IW9lZMpE.js +285 -0
- package/dist/assets/Modal-CIzXlZdZ.js +204 -0
- package/dist/assets/ModelByIdSelectorModal-DLvBjzJO.js +115 -0
- package/dist/assets/NDVEmptyState-33UoX00I.js +19743 -0
- package/dist/assets/NodeCreation-BNzbSWSB.js +240 -0
- package/dist/assets/NodeCreator-BftgCKx7.js +1288 -0
- package/dist/assets/NodeDetailsView-CsoQCpcF.js +1075 -0
- package/dist/assets/NodeDetailsViewV2-C_wNQR_3.js +981 -0
- package/dist/assets/NodeIcon-B9VW6tX6.js +87 -0
- package/dist/assets/NodeSettings-ZwVip6VR.js +1872 -0
- package/dist/assets/NodeView-D4WUEvLB.js +2452 -0
- package/dist/assets/OAuthConsentView-DlrUqZbT.js +230 -0
- package/dist/assets/PageViewLayout-NT1KPFgy.js +12 -0
- package/dist/assets/ParameterInputList-sG2nz-Jo.js +38091 -0
- package/dist/assets/PrebuiltAgentTemplatesView-Csi5U8dc.js +154 -0
- package/dist/assets/ProjectBreadcrumb-C_XiY7sc.js +98 -0
- package/dist/assets/ProjectCardBadge-t_hs7vzx.js +209 -0
- package/dist/assets/ProjectHeader-Dq5Ihb26.js +549 -0
- package/dist/assets/ProjectIcon-DY8gGuHX.js +64 -0
- package/dist/assets/ProjectRoleView-Du-KTrAC.js +435 -0
- package/dist/assets/ProjectRolesView-DjxM_y4u.js +239 -0
- package/dist/assets/ProjectSettings-C6kWuV21.js +966 -0
- package/dist/assets/ProjectSharing-CVUgNWAY.js +262 -0
- package/dist/assets/ProjectVariables-CJlAo3dv.js +467 -0
- package/dist/assets/ProviderSettingsModal-BUFC2ZLv.js +307 -0
- package/dist/assets/PushConnectionTracker-DPBnGV0v.js +27 -0
- package/dist/assets/ResolversView-3BdkvvYA.js +209 -0
- package/dist/assets/ResourceFiltersDropdown-dgyXpcEX.js +159 -0
- package/dist/assets/ResourcesListLayout-qBLtomK6.js +631 -0
- package/dist/assets/RunDataHtml-BrW0OQra.js +7 -0
- package/dist/assets/RunDataHtml-Cleia4Cj.js +40 -0
- package/dist/assets/RunDataJson-uxkrhYRK.js +227 -0
- package/dist/assets/RunDataJsonActions-DkPk7E8d.js +5007 -0
- package/dist/assets/RunDataParsedAiContent-CtPRjig-.js +26 -0
- package/dist/assets/RunDataParsedAiContent-WAuqLQ5M.js +192 -0
- package/dist/assets/RunDataSearch-YBWUr93C.js +141 -0
- package/dist/assets/RunDataTable-DcXaBynW.js +631 -0
- package/dist/assets/SamlOnboarding-BTdQ_hr3.js +78 -0
- package/dist/assets/SaveButton-D5sQSxIk.js +89 -0
- package/dist/assets/SelectedItemsInfo-BHZ-NvF5.js +58 -0
- package/dist/assets/SettingsApiView-IfZTMXx1.js +313 -0
- package/dist/assets/SettingsChatHubView-gWh2X6vX.js +285 -0
- package/dist/assets/SettingsCommunityNodesView-D8VQtpGY.js +349 -0
- package/dist/assets/SettingsExternalSecrets-CpMc7mkW.js +233 -0
- package/dist/assets/SettingsLdapView-CU5a2MAy.js +2553 -0
- package/dist/assets/SettingsLogStreamingView-uojTe-oX.js +375 -0
- package/dist/assets/SettingsMCPView-B5Swp1C_.js +1214 -0
- package/dist/assets/SettingsPersonalView-Cr3aGood.js +402 -0
- package/dist/assets/SettingsSourceControl-DXOvFDEY.js +547 -0
- package/dist/assets/SettingsSso-27MfU1HV.js +1032 -0
- package/dist/assets/SettingsUsageAndPlan-DqIO-G46.js +419 -0
- package/dist/assets/SettingsUsersView-DfHB4_Kh.js +833 -0
- package/dist/assets/SettingsView-C4sA7Uny.js +90 -0
- package/dist/assets/SetupTemplateFormStep-BmiSzZin.js +258 -0
- package/dist/assets/SetupView-VORZ-L_u.js +112 -0
- package/dist/assets/SetupWorkflowCredentialsButton-DTmkOAW5.js +73 -0
- package/dist/assets/SetupWorkflowFromTemplateView-B9NupdJE.js +286 -0
- package/dist/assets/SeverityTag-CX1qTTNA.js +45 -0
- package/dist/assets/SigninView-D9_Pm16j.js +358 -0
- package/dist/assets/SignoutView-BFsjEAGz.js +19 -0
- package/dist/assets/SignupView-Am4ot0QZ.js +137 -0
- package/dist/assets/SkeletonAgentCard-C5TL-h8F.js +191 -0
- package/dist/assets/TagsDropdown-Bvx_Hd6Q.js +230 -0
- package/dist/assets/TemplateCard-CyQ1GuVz.js +105 -0
- package/dist/assets/TemplateDetails-CZRusTxE.js +124 -0
- package/dist/assets/TemplateList-DKvbwuiY.js +333 -0
- package/dist/assets/TemplatesCollectionView-D8dxU8By.js +184 -0
- package/dist/assets/TemplatesSearchView-CebC_GLs.js +1230 -0
- package/dist/assets/TemplatesView-025CcmIY.js +57 -0
- package/dist/assets/TemplatesWorkflowView-C2JfwJAn.js +170 -0
- package/dist/assets/TestRunDetailView-Ck78TTWO.js +395 -0
- package/dist/assets/TextWithHighlights-BxumwGnv.js +57 -0
- package/dist/assets/TimeAgo-C6EN4lCs.js +123 -0
- package/dist/assets/ToolsSelectorModal-8QJoUvRL.js +368 -0
- package/dist/assets/TriggerPanel-B6pacLkk.js +1225 -0
- package/dist/assets/VirtualSchema-B3zGe_8b.js +2402 -0
- package/dist/assets/VirtualSchema-Dkh0Cu5z.js +37 -0
- package/dist/assets/VueMarkdown-CQqJL9vK.js +28 -0
- package/dist/assets/WorkerView-Caznsljo.js +563 -0
- package/dist/assets/WorkflowActivationErrorMessage-CGrfPi9O.js +17 -0
- package/dist/assets/WorkflowActivator-BINnz0f7.js +362 -0
- package/dist/assets/WorkflowExecutionsInfoAccordion-Dg37yEfT.js +166 -0
- package/dist/assets/WorkflowExecutionsLandingPage-V2wdubhK.js +93 -0
- package/dist/assets/WorkflowExecutionsPreview-DdJaqYV6.js +616 -0
- package/dist/assets/WorkflowExecutionsView-DV8ySTfn.js +808 -0
- package/dist/assets/WorkflowHistory-GtaBMzIM.js +973 -0
- package/dist/assets/WorkflowLocation-CQ9Sq-2y.js +164 -0
- package/dist/assets/WorkflowOnboardingView-C49gt0Jr.js +61 -0
- package/dist/assets/WorkflowPreview-CXdvv4Nq.js +186 -0
- package/dist/assets/WorkflowTagsDropdown-QwbICWjN.js +71 -0
- package/dist/assets/WorkflowsView-B-MWIECO.js +3253 -0
- package/dist/assets/_MapCache-CcdIl4Ae.js +363 -0
- package/dist/assets/_baseOrderBy-N8Be_6z6.js +2989 -0
- package/dist/assets/_initCloneObject-viQQyT6o.js +80 -0
- package/dist/assets/_plugin-vue_export-helper-BwBpWJRZ.js +6 -0
- package/dist/assets/aiTemplatesStarterCollection.store-nL9nePkK.js +656 -0
- package/dist/assets/apiKeys.store-BhOFmP2j.js +51 -0
- package/dist/assets/assistant.store-CNywgN4S.js +518 -0
- package/dist/assets/auth.eventBus-CWXS0Qp7.js +5 -0
- package/dist/assets/banners.store-CGEcBTDn.js +195 -0
- package/dist/assets/builder.store-Czk2ipDE.js +31417 -0
- package/dist/assets/buttons.esm-yintpW2E.js +364 -0
- package/dist/assets/chart-CNvyywtJ.js +10958 -0
- package/dist/assets/chartjs.utils-BAE52Cv9.js +155 -0
- package/dist/assets/chat.store-290YeyrQ.js +865 -0
- package/dist/assets/chatPanel.store-NDaawEZL.js +118 -0
- package/dist/assets/chunk-6z4oVpB-.js +36 -0
- package/dist/assets/col-Cmt4cmuS.js +158 -0
- package/dist/assets/constants-C8OH4tTq.js +106256 -0
- package/dist/assets/constants-DMrsrpD7.js +32 -0
- package/dist/assets/core-B9gt_4yk.js +4 -0
- package/dist/assets/core-CP5FY4aX.js +1202 -0
- package/dist/assets/core-CRbPymLT.js +9741 -0
- package/dist/assets/dataTable.store-DmipQsol.js +207 -0
- package/dist/assets/date-picker-2IDsBs2n.js +4115 -0
- package/dist/assets/dateFormatter-ik4-9_9r.js +33 -0
- package/dist/assets/dateformat-hG8NERse.js +181 -0
- package/dist/assets/dialog-lMho1TD8.js +425 -0
- package/dist/assets/dist-Cw46Is-h.js +151 -0
- package/dist/assets/doppler-B__k0MeW.webp +0 -0
- package/dist/assets/element-icons-B-tDfklg.woff +0 -0
- package/dist/assets/element-icons-_lZGOqcG.ttf +0 -0
- package/dist/assets/empty-BuGRxzl4.js +2210 -0
- package/dist/assets/en-CF30SCh2.js +95 -0
- package/dist/assets/en-DyO2pPiC.js +2 -0
- package/dist/assets/es-BkUFJVtD.js +43338 -0
- package/dist/assets/evaluation.constants-GYAwmJnh.js +284 -0
- package/dist/assets/executions.store-B9uRYwgv.js +205 -0
- package/dist/assets/exports-Crx_gvt_.js +1799 -0
- package/dist/assets/externalSecrets.ee.store-BJh4a_6G.js +118 -0
- package/dist/assets/fileUtils-CRWqOQje.js +20 -0
- package/dist/assets/folders.store-yAFj-5Vl.js +235 -0
- package/dist/assets/get-BcEmeOxn.js +2781 -0
- package/dist/assets/index-SL8542zQ.js +28372 -0
- package/dist/assets/insights.constants-BkJCYJTL.js +55 -0
- package/dist/assets/insights.store-BFc3kDUo.js +61 -0
- package/dist/assets/insights.utils-CcLXdrrz.js +77 -0
- package/dist/assets/isEmpty-C3XXoHqJ.js +35216 -0
- package/dist/assets/languageModules-9LyndCqU.js +13862 -0
- package/dist/assets/logStreaming.store-IZhWe_VK.js +190 -0
- package/dist/assets/mcp.constants-_Jcn7fPq.js +10 -0
- package/dist/assets/mcp.store-B9yfcAN9.js +116 -0
- package/dist/assets/merge-DhuTk1HM.js +564 -0
- package/dist/assets/nodeCreator.store-Bpnrwp2l.js +5444 -0
- package/dist/assets/nodeIcon-D6X-ENYt.js +102 -0
- package/dist/assets/nodeTransforms-RzcOM0v2.js +42 -0
- package/dist/assets/orderBy-Cu9F9DU_.js +15 -0
- package/dist/assets/path-browserify-RUt2u7iT.js +328 -0
- package/dist/assets/personalizedTemplatesV3.store-BGYp0YBN.js +334 -0
- package/dist/assets/pickBy-UI0Jt4wC.js +18 -0
- package/dist/assets/preload-helper-dyVz7ck7.js +59 -0
- package/dist/assets/radio-CSce3UT0.js +262 -0
- package/dist/assets/readyToRun.store-YEMvPUqo.js +626 -0
- package/dist/assets/readyToRunWorkflows.store-G3srgIze.js +1319 -0
- package/dist/assets/retry-BgHaYzbB.js +23 -0
- package/dist/assets/roles.store-CRf_zJTb.js +51 -0
- package/dist/assets/router-DNpzz3GH.js +2631 -0
- package/dist/assets/sanitize-html-CbW56HUN.js +10758 -0
- package/dist/assets/schemaPreview.store-DUgN1yVE.js +113 -0
- package/dist/assets/semver-Bk6DGseV.js +1306 -0
- package/dist/assets/smartDecimal-DAZl4HKA.js +6 -0
- package/dist/assets/sortByProperty-Cn7iGKYu.js +8 -0
- package/dist/assets/sourceControl.eventBus-D47xXSc_.js +3 -0
- package/dist/assets/sqlite3-DBpDb1lf.wasm +0 -0
- package/dist/assets/sqlite3-opfs-async-proxy-vVtmDGHX.js +461 -0
- package/dist/assets/sqlite3-worker1-bundler-friendly-DLarOZDL.js +9405 -0
- package/dist/assets/src-jviYSG25.js +55454 -0
- package/dist/assets/sso.store-DyApJwhx.js +139 -0
- package/dist/assets/style-E3CrYFV8.css +111829 -0
- package/dist/assets/table-we1DjFMV.js +3944 -0
- package/dist/assets/templateActions-bEDSARw2.js +65 -0
- package/dist/assets/templateTransforms-BHWiRbtR.js +43 -0
- package/dist/assets/truncate-C0KYt7i3.js +4176 -0
- package/dist/assets/typescript.worker-CYqLvLHh.js +152048 -0
- package/dist/assets/uniqBy-xDyuCRP0.js +10 -0
- package/dist/assets/usage.store-CU5J_nGm.js +100 -0
- package/dist/assets/useActions-B1JckIRj.js +255 -0
- package/dist/assets/useBeforeUnload-DiDkvI8p.js +40 -0
- package/dist/assets/useCanvasMapping-BXT7rGhC.js +12570 -0
- package/dist/assets/useCanvasOperations-8ULLtMkY.js +1765 -0
- package/dist/assets/useClipboard-DvjhVHqJ.js +39 -0
- package/dist/assets/useCommandBar-C4tLJbKt.js +2425 -0
- package/dist/assets/useCredentialResolvers-BKeFGJnY.js +78 -0
- package/dist/assets/useCustomAgent-DpILEt5e.js +471 -0
- package/dist/assets/useDebounce-Br5_1ug-.js +147 -0
- package/dist/assets/useExecutionData-M5iKsX6z.js +23 -0
- package/dist/assets/useExecutionDebugging-8azMzbnd.js +191 -0
- package/dist/assets/useExecutionHelpers-BgRRhpBM.js +91 -0
- package/dist/assets/useImportCurlCommand-CKiEmX5P.js +8891 -0
- package/dist/assets/useIntersectionObserver-BWMwOueh.js +33 -0
- package/dist/assets/useKeybindings-B2jfN6rd.js +62 -0
- package/dist/assets/useLogsTreeExpand-sZViUfdM.js +843 -0
- package/dist/assets/useMcp-DoMOIfqT.js +27 -0
- package/dist/assets/usePageRedirectionHelper-DjkznpX6.js +51 -0
- package/dist/assets/usePinnedData-BhZkqttf.js +203 -0
- package/dist/assets/usePushConnection-DMS-F_IW.js +513 -0
- package/dist/assets/useRecentResources-BVORr7eM.js +118 -0
- package/dist/assets/useRunWorkflow-LO7ffLp9.js +950 -0
- package/dist/assets/useSettingsItems-BhZXwMZn.js +144 -0
- package/dist/assets/useTelemetryContext-V6bv4YRq.js +34 -0
- package/dist/assets/useWorkflowActivate-DeSmDXjI.js +152 -0
- package/dist/assets/useWorkflowsCache-DtcEEAIR.js +179 -0
- package/dist/assets/userRoleProvisioning.store-kkSIdeTo.js +33 -0
- package/dist/assets/utils-DI7dLldp.js +54 -0
- package/dist/assets/versions.store-B1z2OrLE.js +191 -0
- package/dist/assets/vue-CydWIhxN.js +4378 -0
- package/dist/assets/vue-json-pretty-CsGX66mG.js +1130 -0
- package/dist/assets/vue.runtime.esm-bundler-tP5dCd7J.js +7325 -0
- package/dist/assets/xml-B_oj6Mle.js +2060 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +157 -0
- package/dist/static/base-path.js +1 -0
- package/dist/static/community_package_tooltip_img.png +0 -0
- package/dist/static/data-mapping-gif.gif +0 -0
- package/dist/static/form-grey.svg +1 -0
- package/dist/static/google-auth/disabled.dark.png +0 -0
- package/dist/static/google-auth/disabled.png +0 -0
- package/dist/static/google-auth/focus.dark.png +0 -0
- package/dist/static/google-auth/focus.png +0 -0
- package/dist/static/google-auth/normal.dark.png +0 -0
- package/dist/static/google-auth/normal.png +0 -0
- package/dist/static/google-auth/pressed.dark.png +0 -0
- package/dist/static/google-auth/pressed.png +0 -0
- package/dist/static/n8n-logo.png +0 -0
- package/dist/static/og_image.png +0 -0
- package/dist/static/open-ai.svg +1 -0
- package/dist/static/openChat.png +0 -0
- package/dist/static/posthog.init.js +41 -0
- package/dist/static/prefers-color-scheme.css +5 -0
- package/dist/static/webhook-icon.svg +1 -0
- package/dist/tree-sitter-bash.wasm +0 -0
- package/dist/tree-sitter.wasm +0 -0
- package/eslint.config.mjs +59 -0
- package/index.html +45 -0
- package/index.js +0 -0
- package/package.json +147 -0
- package/postcss.config.cjs +6 -0
- package/scripts/fetch-node-popularity.mjs +102 -0
- package/stylelint.config.mjs +9 -0
- package/tailwind.config.js +8 -0
- package/tsconfig.json +36 -0
- package/vite/i18n-locales-hmr-helpers.ts +19 -0
- package/vite/source-map-js-shim.ts +1 -0
- package/vite/vite-plugin-node-popularity.mts +32 -0
- package/vite.config.mts +304 -0
|
@@ -0,0 +1,2452 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./NodeCreation-BNzbSWSB.js","./_plugin-vue_export-helper-BwBpWJRZ.js","./src-jviYSG25.js","./preload-helper-dyVz7ck7.js","./truncate-C0KYt7i3.js","./core-CRbPymLT.js","./vue.runtime.esm-bundler-tP5dCd7J.js","./chunk-6z4oVpB-.js","./CalendarDate-DgQUMbNo.js","./get-BcEmeOxn.js","./_MapCache-CcdIl4Ae.js","./sanitize-html-CbW56HUN.js","./empty-BuGRxzl4.js","./path-browserify-RUt2u7iT.js","./en-CF30SCh2.js","./nodeCreator.store-Bpnrwp2l.js","./constants-C8OH4tTq.js","./merge-DhuTk1HM.js","./builder.store-Czk2ipDE.js","./_baseOrderBy-N8Be_6z6.js","./dateformat-hG8NERse.js","./useDebounce-Br5_1ug-.js","./nodeIcon-D6X-ENYt.js","./useRunWorkflow-LO7ffLp9.js","./useCanvasOperations-8ULLtMkY.js","./useClipboard-DvjhVHqJ.js","./usePinnedData-BhZkqttf.js","./folders.store-yAFj-5Vl.js","./executions.store-B9uRYwgv.js","./retry-BgHaYzbB.js","./uniqBy-xDyuCRP0.js","./sortByProperty-Cn7iGKYu.js","./ProjectIcon-DY8gGuHX.js","./versions.store-B1z2OrLE.js","./assistant.store-CNywgN4S.js","./KeyboardShortcutTooltip-D8PAK5JP.js","./NodeIcon-B9VW6tX6.js","./useCommandBar-C4tLJbKt.js","./usePageRedirectionHelper-DjkznpX6.js","./chat.store-290YeyrQ.js","./fileUtils-CRWqOQje.js","./constants-DMrsrpD7.js","./dataTable.store-DmipQsol.js","./CredentialIcon-8YdTTFZ1.js","./useRecentResources-BVORr7eM.js","./chatPanel.store-NDaawEZL.js","./useActions-B1JckIRj.js","./NodeDetailsView-CsoQCpcF.js","./isEmpty-C3XXoHqJ.js","./NDVEmptyState-33UoX00I.js","./vue-json-pretty-CsGX66mG.js","./schemaPreview.store-DUgN1yVE.js","./useExecutionHelpers-BgRRhpBM.js","./dateFormatter-ik4-9_9r.js","./externalSecrets.ee.store-BJh4a_6G.js","./RunDataHtml-Cleia4Cj.js","./ParameterInputList-sG2nz-Jo.js","./exports-Crx_gvt_.js","./vue-CydWIhxN.js","./date-picker-2IDsBs2n.js","./dialog-lMho1TD8.js","./VirtualSchema-B3zGe_8b.js","./Draggable-vfvXl9Sp.js","./useTelemetryContext-V6bv4YRq.js","./nodeTransforms-RzcOM0v2.js","./TextWithHighlights-BxumwGnv.js","./VueMarkdown-CQqJL9vK.js","./NodeSettings-ZwVip6VR.js","./col-Cmt4cmuS.js","./CommunityNodeUpdateInfo-C37kca4W.js","./semver-Bk6DGseV.js","./core-B9gt_4yk.js","./core-CP5FY4aX.js","./useLogsTreeExpand-sZViUfdM.js","./AnimatedSpinner-DmPN4poP.js","./CopyInput-DDZVu2iU.js","./useExecutionData-M5iKsX6z.js","./TriggerPanel-B6pacLkk.js","./RunDataParsedAiContent-WAuqLQ5M.js","./NodeDetailsViewV2-C_wNQR_3.js","./useKeybindings-B2jfN6rd.js","./SetupWorkflowCredentialsButton-DTmkOAW5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { C as computed, Cn as toDisplayString, D as createElementBlock, E as createCommentVNode, G as nextTick, Gt as unref, It as ref, J as onBeforeUnmount, K as onActivated, L as h, M as createVNode, N as defineAsyncComponent, P as defineComponent, T as createBlock, Vt as toRef, W as mergeProps, Y as onDeactivated, Z as onMounted, _ as Fragment, _t as watch, at as renderSlot, bn as normalizeStyle, bt as withCtx, c as useCssModule, et as openBlock, h as withModifiers, it as renderList, j as createTextVNode, mt as useTemplateRef, nt as provide, q as onBeforeMount, vn as normalizeClass, w as createBaseVNode, y as Suspense } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
|
|
3
|
+
import { G as useThrottleFn, R as refThrottled, o as useActiveElement, rt as useI18n } from "./core-CRbPymLT.js";
|
|
4
|
+
import { C as N8nResizeWrapper_default, Cn as N8nIcon_default, R as N8nInfoTip_default, T as N8nRadioButtons_default, bn as N8nText_default, c as N8nInlineTextEdit_default, ct as useDeviceSupport, ot as N8nActionDropdown_default, st as N8nKeyboardShortcut_default, tt as CanvasThinkingPill_default, xn as N8nButton_default, xt as N8nIconButton_default, yn as N8nCallout_default, yt as N8nInput_default } from "./src-jviYSG25.js";
|
|
5
|
+
import "./en-CF30SCh2.js";
|
|
6
|
+
import { t as __vitePreload } from "./preload-helper-dyVz7ck7.js";
|
|
7
|
+
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwBpWJRZ.js";
|
|
8
|
+
import { s as createEventBus } from "./truncate-C0KYt7i3.js";
|
|
9
|
+
import "./date-picker-2IDsBs2n.js";
|
|
10
|
+
import { Bi as hasFocusOnInput, Er as useUsersStore, G as getBounds, Gn as useEnvironmentsStore, Hn as useTagsStore, Jn as useWorkflowState, Jr as CanvasNodeRenderType, Kn as useNodeHelpers, N as useNDVStore, P as useWorkflowsStore, Pt as useNodeTypesStore, Q as getNodesWithNormalizedPosition, Qi as nodeViewEventBus, Qn as useSourceControlStore, Ui as isFocusableEl, X as getNodeViewTab, Xn as useDocumentTitle, Yr as useHistoryStore, Zn as useProjectsStore, _n as useCredentialsStore, _r as useCanvasStore, _t as useVueFlow, aa as useUIStore, an as getSampleWorkflowByTemplateId, ea as htmlEditorEventBus, g as useNpsSurveyStore, h as useMessage, i as useFocusPanelStore, ji as isValueExpression, k as useTelemetry, ms as useSettingsStore, n as useWorkflowSaving, oi as historyBus, pt as getRectOfNodes, qn as injectWorkflowState, r as useWorkflowFileSync, t as useBuilderStore, x as useExternalHooks, y as useToast } from "./builder.store-Czk2ipDE.js";
|
|
11
|
+
import { A as HtmlEditor_default, C as SqlEditor_default, O as CodeNodeEditor_default, _ as isValidParameterOption, a as ParameterOptions_default, g as getParameterTypeOption, k as JsEditor_default, l as CssEditor_default, m as formatAsExpression, s as useResolvedExpression, u as useNodeSettingsParameters, w as ExpressionEditorModalInput_default, y as parseFromExpression } from "./ParameterInputList-sG2nz-Jo.js";
|
|
12
|
+
import "./empty-BuGRxzl4.js";
|
|
13
|
+
import "./col-Cmt4cmuS.js";
|
|
14
|
+
import "./dialog-lMho1TD8.js";
|
|
15
|
+
import { _ as useRoute, g as onBeforeRouteLeave, v as useRouter } from "./get-BcEmeOxn.js";
|
|
16
|
+
import "./sanitize-html-CbW56HUN.js";
|
|
17
|
+
import "./CalendarDate-DgQUMbNo.js";
|
|
18
|
+
import "./path-browserify-RUt2u7iT.js";
|
|
19
|
+
import "./_MapCache-CcdIl4Ae.js";
|
|
20
|
+
import { $a as EVALUATION_NODE_TYPE, $s as ExpressionLocalResolveContextSymbol, Da as jsonParse, Gn as PRODUCTION_ONLY_TRIGGER_NODE_TYPES, L as DRAG_EVENT_DATA_KEY, Lo as MAIN_HEADER_TABS, Oo as getResourcePermissions, Qi as getNodeOutputs, Ro as VIEWS, St as NODE_CREATOR_OPEN_SOURCES, Xo as FROM_AI_PARAMETERS_MODAL_KEY, Ya as AI_TRANSFORM_NODE_TYPE, Zi as getNodeInputs, eo as EVALUATION_TRIGGER_NODE_TYPE, io as HTML_NODE_TYPE, j as VALID_WORKFLOW_IMPORT_URL_REGEX, nc as WorkflowStateKey, rs as MODAL_CONFIRM, sr as STICKY_NODE_TYPE, ua as isTriggerNode, va as isResourceLocatorValue, wn as MANUAL_CHAT_TRIGGER_NODE_TYPE, xs as WORKFLOW_SETTINGS_MODAL_KEY, yc as EnterpriseEditionFeature, zo as ABOUT_MODAL_KEY, zt as CHAT_TRIGGER_NODE_TYPE } from "./constants-C8OH4tTq.js";
|
|
21
|
+
import "./merge-DhuTk1HM.js";
|
|
22
|
+
import { r as useRootStore } from "./_baseOrderBy-N8Be_6z6.js";
|
|
23
|
+
import "./dateformat-hG8NERse.js";
|
|
24
|
+
import "./useDebounce-Br5_1ug-.js";
|
|
25
|
+
import "./assistant.store-CNywgN4S.js";
|
|
26
|
+
import "./chatPanel.store-NDaawEZL.js";
|
|
27
|
+
import "./retry-BgHaYzbB.js";
|
|
28
|
+
import { t as useExecutionsStore } from "./executions.store-B9uRYwgv.js";
|
|
29
|
+
import { i as usePushConnectionStore, n as useAgentRequestStore, t as useRunWorkflow } from "./useRunWorkflow-LO7ffLp9.js";
|
|
30
|
+
import "./usePinnedData-BhZkqttf.js";
|
|
31
|
+
import { t as useNodeCreatorStore, u as shouldIgnoreCanvasShortcut } from "./nodeCreator.store-Bpnrwp2l.js";
|
|
32
|
+
import "./nodeIcon-D6X-ENYt.js";
|
|
33
|
+
import { t as useClipboard } from "./useClipboard-DvjhVHqJ.js";
|
|
34
|
+
import { a as useLogsStore, i as useExperimentalNdvStore, n as useParentFolder, r as canvasEventBus, t as useCanvasOperations } from "./useCanvasOperations-8ULLtMkY.js";
|
|
35
|
+
import "./folders.store-yAFj-5Vl.js";
|
|
36
|
+
import { t as NodeIcon_default } from "./NodeIcon-B9VW6tX6.js";
|
|
37
|
+
import { t as KeyboardShortcutTooltip_default } from "./KeyboardShortcutTooltip-D8PAK5JP.js";
|
|
38
|
+
import { c as ExperimentalCanvasNodeSettings_default, d as CanvasRunWorkflowButton_default, l as useGlobalLinkActions, n as Canvas_default, o as useContextMenuItems, s as useExpressionResolveCtx, t as useCanvasMapping, u as useWorkflowExtraction } from "./useCanvasMapping-BXT7rGhC.js";
|
|
39
|
+
import "./versions.store-B1z2OrLE.js";
|
|
40
|
+
import "./usePageRedirectionHelper-DjkznpX6.js";
|
|
41
|
+
import "./dataTable.store-DmipQsol.js";
|
|
42
|
+
import { c as JsonEditor_default } from "./isEmpty-C3XXoHqJ.js";
|
|
43
|
+
import "./NDVEmptyState-33UoX00I.js";
|
|
44
|
+
import "./exports-Crx_gvt_.js";
|
|
45
|
+
import { t as useExternalSecretsStore } from "./externalSecrets.ee.store-BJh4a_6G.js";
|
|
46
|
+
import "./uniqBy-xDyuCRP0.js";
|
|
47
|
+
import "./semver-Bk6DGseV.js";
|
|
48
|
+
import "./CommunityNodeUpdateInfo-C37kca4W.js";
|
|
49
|
+
import "./RunDataHtml-Cleia4Cj.js";
|
|
50
|
+
import "./VueMarkdown-CQqJL9vK.js";
|
|
51
|
+
import "./Draggable-vfvXl9Sp.js";
|
|
52
|
+
import { n as NodeExecuteButton_default } from "./VirtualSchema-B3zGe_8b.js";
|
|
53
|
+
import "./TextWithHighlights-BxumwGnv.js";
|
|
54
|
+
import { t as useTelemetryContext } from "./useTelemetryContext-V6bv4YRq.js";
|
|
55
|
+
import "./schemaPreview.store-DUgN1yVE.js";
|
|
56
|
+
import { a as needsAgentInput } from "./nodeTransforms-RzcOM0v2.js";
|
|
57
|
+
import "./vue-json-pretty-CsGX66mG.js";
|
|
58
|
+
import "./dateFormatter-ik4-9_9r.js";
|
|
59
|
+
import "./useExecutionHelpers-BgRRhpBM.js";
|
|
60
|
+
import "./NodeSettings-ZwVip6VR.js";
|
|
61
|
+
import "./useActions-B1JckIRj.js";
|
|
62
|
+
import "./vue-CydWIhxN.js";
|
|
63
|
+
import { t as sourceControlEventBus } from "./sourceControl.eventBus-D47xXSc_.js";
|
|
64
|
+
import { t as useKeybindings } from "./useKeybindings-B2jfN6rd.js";
|
|
65
|
+
import { t as useExecutionDebugging } from "./useExecutionDebugging-8azMzbnd.js";
|
|
66
|
+
import { t as useBeforeUnload } from "./useBeforeUnload-DiDkvI8p.js";
|
|
67
|
+
import { t as useAITemplatesStarterCollectionStore } from "./aiTemplatesStarterCollection.store-nL9nePkK.js";
|
|
68
|
+
import { t as useExecutionData } from "./useExecutionData-M5iKsX6z.js";
|
|
69
|
+
import { t as useReadyToRunWorkflowsStore } from "./readyToRunWorkflows.store-G3srgIze.js";
|
|
70
|
+
var WorkflowCanvas_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
71
|
+
inheritAttrs: false,
|
|
72
|
+
__name: "WorkflowCanvas",
|
|
73
|
+
props: {
|
|
74
|
+
id: { default: "canvas" },
|
|
75
|
+
workflow: {},
|
|
76
|
+
workflowObject: {},
|
|
77
|
+
fallbackNodes: { default: () => [] },
|
|
78
|
+
showFallbackNodes: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: true
|
|
81
|
+
},
|
|
82
|
+
eventBus: { default: () => createEventBus() },
|
|
83
|
+
readOnly: { type: Boolean },
|
|
84
|
+
executing: { type: Boolean },
|
|
85
|
+
suppressInteraction: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
setup(__props, { expose: __expose }) {
|
|
91
|
+
const props = __props;
|
|
92
|
+
const canvasRef = useTemplateRef("canvas");
|
|
93
|
+
const $style = useCssModule();
|
|
94
|
+
const { onNodesInitialized, viewport, viewportRef, getNodes, fitBounds } = useVueFlow(props.id);
|
|
95
|
+
const workflow = toRef(props, "workflow");
|
|
96
|
+
const workflowObject = toRef(props, "workflowObject");
|
|
97
|
+
const { nodes: mappedNodes, connections: mappedConnections } = useCanvasMapping({
|
|
98
|
+
nodes: computed(() => {
|
|
99
|
+
return props.showFallbackNodes ? [...props.workflow.nodes, ...props.fallbackNodes] : props.workflow.nodes;
|
|
100
|
+
}),
|
|
101
|
+
connections: computed(() => props.workflow.connections),
|
|
102
|
+
workflowObject
|
|
103
|
+
});
|
|
104
|
+
const initialFitViewDone = ref(false);
|
|
105
|
+
const { off } = onNodesInitialized(() => {
|
|
106
|
+
if (!initialFitViewDone.value) {
|
|
107
|
+
props.eventBus.emit("fitView");
|
|
108
|
+
initialFitViewDone.value = true;
|
|
109
|
+
off();
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const mappedNodesThrottled = refThrottled(mappedNodes, 200);
|
|
113
|
+
const mappedConnectionsThrottled = refThrottled(mappedConnections, 200);
|
|
114
|
+
__expose({
|
|
115
|
+
executeContextMenuAction: (action, nodeIds) => canvasRef.value?.executeContextMenuAction(action, nodeIds),
|
|
116
|
+
ensureNodesAreVisible: (ids) => {
|
|
117
|
+
const canvasElement = viewportRef.value;
|
|
118
|
+
if (!canvasElement) return;
|
|
119
|
+
const targetNodes = getNodes.value.filter((node) => ids.includes(node.id));
|
|
120
|
+
if (targetNodes.length === 0) return;
|
|
121
|
+
const insertionDone = onNodesInitialized(() => {
|
|
122
|
+
const vp = viewport.value;
|
|
123
|
+
const canvasWidth = canvasElement.clientWidth;
|
|
124
|
+
const canvasHeight = canvasElement.clientHeight;
|
|
125
|
+
const nodesRect = getRectOfNodes(targetNodes);
|
|
126
|
+
const screenX = nodesRect.x * vp.zoom + vp.x;
|
|
127
|
+
const screenY = nodesRect.y * vp.zoom + vp.y;
|
|
128
|
+
const screenWidth = nodesRect.width * vp.zoom;
|
|
129
|
+
const screenHeight = nodesRect.height * vp.zoom;
|
|
130
|
+
if (!(screenX >= 0 && screenY >= 0 && screenX + screenWidth <= canvasWidth && screenY + screenHeight <= canvasHeight)) {
|
|
131
|
+
const viewportRect = {
|
|
132
|
+
x: -vp.x / vp.zoom,
|
|
133
|
+
y: -vp.y / vp.zoom,
|
|
134
|
+
width: canvasWidth / vp.zoom,
|
|
135
|
+
height: canvasHeight / vp.zoom
|
|
136
|
+
};
|
|
137
|
+
const minX = Math.min(viewportRect.x, nodesRect.x);
|
|
138
|
+
const minY = Math.min(viewportRect.y, nodesRect.y);
|
|
139
|
+
const maxX = Math.max(viewportRect.x + viewportRect.width, nodesRect.x + nodesRect.width);
|
|
140
|
+
const maxY = Math.max(viewportRect.y + viewportRect.height, nodesRect.y + nodesRect.height);
|
|
141
|
+
fitBounds({
|
|
142
|
+
x: minX,
|
|
143
|
+
y: minY,
|
|
144
|
+
width: maxX - minX,
|
|
145
|
+
height: maxY - minY
|
|
146
|
+
}, {
|
|
147
|
+
padding: .15,
|
|
148
|
+
duration: 100
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
props.eventBus.emit("nodes:select", { ids });
|
|
152
|
+
insertionDone.off();
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
return (_ctx, _cache) => {
|
|
157
|
+
return openBlock(), createElementBlock("div", {
|
|
158
|
+
class: normalizeClass(unref($style).wrapper),
|
|
159
|
+
"data-test-id": "canvas-wrapper"
|
|
160
|
+
}, [createBaseVNode("div", {
|
|
161
|
+
id: "canvas",
|
|
162
|
+
class: normalizeClass(unref($style).canvas)
|
|
163
|
+
}, [workflow.value ? (openBlock(), createBlock(Canvas_default, mergeProps({
|
|
164
|
+
key: 0,
|
|
165
|
+
id: _ctx.id,
|
|
166
|
+
ref: "canvas",
|
|
167
|
+
nodes: _ctx.executing ? unref(mappedNodesThrottled) : unref(mappedNodes),
|
|
168
|
+
connections: _ctx.executing ? unref(mappedConnectionsThrottled) : unref(mappedConnections),
|
|
169
|
+
"event-bus": _ctx.eventBus,
|
|
170
|
+
"read-only": _ctx.readOnly,
|
|
171
|
+
executing: _ctx.executing,
|
|
172
|
+
"suppress-interaction": _ctx.suppressInteraction
|
|
173
|
+
}, _ctx.$attrs), null, 16, [
|
|
174
|
+
"id",
|
|
175
|
+
"nodes",
|
|
176
|
+
"connections",
|
|
177
|
+
"event-bus",
|
|
178
|
+
"read-only",
|
|
179
|
+
"executing",
|
|
180
|
+
"suppress-interaction"
|
|
181
|
+
])) : createCommentVNode("", true)], 2), renderSlot(_ctx.$slots, "default")], 2);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
var WorkflowCanvas_vue_vue_type_style_index_0_lang_module_default = {
|
|
186
|
+
wrapper: "_wrapper_rs56d_123",
|
|
187
|
+
canvas: "_canvas_rs56d_131"
|
|
188
|
+
};
|
|
189
|
+
var WorkflowCanvas_default = /* @__PURE__ */ __plugin_vue_export_helper_default(WorkflowCanvas_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": WorkflowCanvas_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
190
|
+
var ExperimentalNodeDetailsDrawer_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
191
|
+
__name: "ExperimentalNodeDetailsDrawer",
|
|
192
|
+
props: {
|
|
193
|
+
node: {},
|
|
194
|
+
nodeIds: {},
|
|
195
|
+
isReadOnly: { type: Boolean }
|
|
196
|
+
},
|
|
197
|
+
emits: ["openNdv", "contextMenuAction"],
|
|
198
|
+
setup(__props, { emit: __emit }) {
|
|
199
|
+
const emit = __emit;
|
|
200
|
+
const expressionResolveCtx = useExpressionResolveCtx(computed(() => __props.node));
|
|
201
|
+
const contextMenuItems = useContextMenuItems(computed(() => __props.nodeIds));
|
|
202
|
+
const ndvStore = useNDVStore();
|
|
203
|
+
const ndvCloseTimes = ref(0);
|
|
204
|
+
const nodeSettingsViewKey = computed(() => [__props.node.id, ndvCloseTimes.value].join("|"));
|
|
205
|
+
watch(() => ndvStore.activeNodeName, (name, oldName) => {
|
|
206
|
+
if (name === null && oldName !== null) ndvCloseTimes.value += 1;
|
|
207
|
+
});
|
|
208
|
+
provide(ExpressionLocalResolveContextSymbol, expressionResolveCtx);
|
|
209
|
+
return (_ctx, _cache) => {
|
|
210
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(_ctx.$style.component) }, [_ctx.nodeIds.length > 1 ? (openBlock(), createBlock(unref(N8nText_default), {
|
|
211
|
+
key: 0,
|
|
212
|
+
tag: "div",
|
|
213
|
+
color: "text-base",
|
|
214
|
+
class: normalizeClass(_ctx.$style.multipleNodes)
|
|
215
|
+
}, {
|
|
216
|
+
default: withCtx(() => [createBaseVNode("div", null, toDisplayString(_ctx.nodeIds.length) + " nodes selected", 1), createBaseVNode("ul", { class: normalizeClass(_ctx.$style.multipleNodesActions) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(contextMenuItems), (action) => {
|
|
217
|
+
return openBlock(), createElementBlock("li", {
|
|
218
|
+
key: action.id,
|
|
219
|
+
class: normalizeClass(_ctx.$style.multipleNodesAction)
|
|
220
|
+
}, [createVNode(unref(N8nButton_default), {
|
|
221
|
+
type: "secondary",
|
|
222
|
+
disabled: action.disabled,
|
|
223
|
+
onClick: ($event) => emit("contextMenuAction", action.id, _ctx.nodeIds)
|
|
224
|
+
}, {
|
|
225
|
+
default: withCtx(() => [createTextVNode(toDisplayString(action.label) + " ", 1), action.shortcut ? (openBlock(), createBlock(unref(N8nKeyboardShortcut_default), mergeProps({
|
|
226
|
+
key: 0,
|
|
227
|
+
ref_for: true
|
|
228
|
+
}, action.shortcut), null, 16)) : createCommentVNode("", true)]),
|
|
229
|
+
_: 2
|
|
230
|
+
}, 1032, ["disabled", "onClick"])], 2);
|
|
231
|
+
}), 128))], 2)]),
|
|
232
|
+
_: 1
|
|
233
|
+
}, 8, ["class"])) : _ctx.node ? (openBlock(), createBlock(ExperimentalCanvasNodeSettings_default, {
|
|
234
|
+
key: nodeSettingsViewKey.value,
|
|
235
|
+
"node-id": _ctx.node.id,
|
|
236
|
+
"is-read-only": _ctx.isReadOnly
|
|
237
|
+
}, null, 8, ["node-id", "is-read-only"])) : createCommentVNode("", true)], 2);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
var ExperimentalNodeDetailsDrawer_vue_vue_type_style_index_0_lang_module_default = {
|
|
242
|
+
component: "_component_17fl4_123",
|
|
243
|
+
multipleNodes: "_multipleNodes_17fl4_128",
|
|
244
|
+
multipleNodesActions: "_multipleNodesActions_17fl4_138",
|
|
245
|
+
multipleNodesAction: "_multipleNodesAction_17fl4_138"
|
|
246
|
+
};
|
|
247
|
+
var ExperimentalNodeDetailsDrawer_default = /* @__PURE__ */ __plugin_vue_export_helper_default(ExperimentalNodeDetailsDrawer_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": ExperimentalNodeDetailsDrawer_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
248
|
+
var ExperimentalFocusPanelHeader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
249
|
+
__name: "ExperimentalFocusPanelHeader",
|
|
250
|
+
props: {
|
|
251
|
+
node: {},
|
|
252
|
+
parameter: {},
|
|
253
|
+
isExecutable: { type: Boolean },
|
|
254
|
+
readOnly: { type: Boolean }
|
|
255
|
+
},
|
|
256
|
+
emits: [
|
|
257
|
+
"execute",
|
|
258
|
+
"openNdv",
|
|
259
|
+
"clearParameter",
|
|
260
|
+
"renameNode"
|
|
261
|
+
],
|
|
262
|
+
setup(__props, { emit: __emit }) {
|
|
263
|
+
const emit = __emit;
|
|
264
|
+
const nodeTypesStore = useNodeTypesStore();
|
|
265
|
+
const i18n = useI18n();
|
|
266
|
+
const nodeType = computed(() => nodeTypesStore.getNodeType(__props.node.type, __props.node.typeVersion));
|
|
267
|
+
return (_ctx, _cache) => {
|
|
268
|
+
return openBlock(), createBlock(unref(N8nText_default), {
|
|
269
|
+
tag: "header",
|
|
270
|
+
size: "small",
|
|
271
|
+
bold: "",
|
|
272
|
+
class: normalizeClass(_ctx.$style.component)
|
|
273
|
+
}, {
|
|
274
|
+
default: withCtx(() => [
|
|
275
|
+
createVNode(NodeIcon_default, {
|
|
276
|
+
"node-type": nodeType.value,
|
|
277
|
+
size: 16
|
|
278
|
+
}, null, 8, ["node-type"]),
|
|
279
|
+
createBaseVNode("div", { class: normalizeClass(_ctx.$style.breadcrumbs) }, [_ctx.parameter ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
280
|
+
createVNode(unref(N8nText_default), {
|
|
281
|
+
size: "small",
|
|
282
|
+
color: "text-base",
|
|
283
|
+
bold: ""
|
|
284
|
+
}, {
|
|
285
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.node.name), 1)]),
|
|
286
|
+
_: 1
|
|
287
|
+
}),
|
|
288
|
+
createVNode(unref(N8nText_default), {
|
|
289
|
+
size: "small",
|
|
290
|
+
color: "text-light"
|
|
291
|
+
}, {
|
|
292
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [createTextVNode("/")])),
|
|
293
|
+
_: 1
|
|
294
|
+
}),
|
|
295
|
+
createTextVNode(" " + toDisplayString(_ctx.parameter.displayName), 1)
|
|
296
|
+
], 64)) : (openBlock(), createBlock(unref(N8nInlineTextEdit_default), {
|
|
297
|
+
key: 1,
|
|
298
|
+
"model-value": _ctx.node.name,
|
|
299
|
+
"min-width": 0,
|
|
300
|
+
"max-width": 500,
|
|
301
|
+
placeholder: unref(i18n).baseText("ndv.title.rename.placeholder"),
|
|
302
|
+
"read-only": _ctx.readOnly,
|
|
303
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("renameNode", $event))
|
|
304
|
+
}, null, 8, [
|
|
305
|
+
"model-value",
|
|
306
|
+
"placeholder",
|
|
307
|
+
"read-only"
|
|
308
|
+
]))], 2),
|
|
309
|
+
_ctx.parameter ? (openBlock(), createBlock(unref(N8nIconButton_default), {
|
|
310
|
+
key: 0,
|
|
311
|
+
icon: "x",
|
|
312
|
+
size: "small",
|
|
313
|
+
type: "tertiary",
|
|
314
|
+
text: "",
|
|
315
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("clearParameter"))
|
|
316
|
+
})) : (openBlock(), createBlock(unref(N8nIconButton_default), {
|
|
317
|
+
key: 1,
|
|
318
|
+
icon: "expand",
|
|
319
|
+
size: "small",
|
|
320
|
+
type: "tertiary",
|
|
321
|
+
text: "",
|
|
322
|
+
onClick: _cache[2] || (_cache[2] = ($event) => emit("openNdv"))
|
|
323
|
+
})),
|
|
324
|
+
_ctx.isExecutable ? (openBlock(), createBlock(NodeExecuteButton_default, {
|
|
325
|
+
key: 2,
|
|
326
|
+
"data-test-id": "node-execute-button",
|
|
327
|
+
"node-name": _ctx.node.name,
|
|
328
|
+
tooltip: `Execute ${_ctx.node.name}`,
|
|
329
|
+
type: "secondary",
|
|
330
|
+
size: "small",
|
|
331
|
+
icon: "play",
|
|
332
|
+
square: true,
|
|
333
|
+
"hide-label": true,
|
|
334
|
+
"telemetry-source": "focus",
|
|
335
|
+
onExecute: _cache[3] || (_cache[3] = ($event) => emit("execute"))
|
|
336
|
+
}, null, 8, ["node-name", "tooltip"])) : createCommentVNode("", true)
|
|
337
|
+
]),
|
|
338
|
+
_: 1
|
|
339
|
+
}, 8, ["class"]);
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
var ExperimentalFocusPanelHeader_vue_vue_type_style_index_0_lang_module_default = {
|
|
344
|
+
component: "_component_hvb6m_123",
|
|
345
|
+
breadcrumbs: "_breadcrumbs_hvb6m_131"
|
|
346
|
+
};
|
|
347
|
+
var ExperimentalFocusPanelHeader_default = /* @__PURE__ */ __plugin_vue_export_helper_default(ExperimentalFocusPanelHeader_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": ExperimentalFocusPanelHeader_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
348
|
+
var FocusPanel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
349
|
+
name: "FocusPanel",
|
|
350
|
+
__name: "FocusPanel",
|
|
351
|
+
props: { isCanvasReadOnly: { type: Boolean } },
|
|
352
|
+
emits: [
|
|
353
|
+
"focus",
|
|
354
|
+
"saveKeyboardShortcut",
|
|
355
|
+
"contextMenuAction"
|
|
356
|
+
],
|
|
357
|
+
setup(__props, { emit: __emit }) {
|
|
358
|
+
const props = __props;
|
|
359
|
+
const emit = __emit;
|
|
360
|
+
const inputField = ref();
|
|
361
|
+
const wrapperRef = useTemplateRef("wrapper");
|
|
362
|
+
const locale = useI18n();
|
|
363
|
+
const nodeHelpers = useNodeHelpers();
|
|
364
|
+
const focusPanelStore = useFocusPanelStore();
|
|
365
|
+
const workflowsStore = useWorkflowsStore();
|
|
366
|
+
const workflowState = injectWorkflowState();
|
|
367
|
+
const nodeTypesStore = useNodeTypesStore();
|
|
368
|
+
const telemetry = useTelemetry();
|
|
369
|
+
const nodeSettingsParameters = useNodeSettingsParameters();
|
|
370
|
+
const environmentsStore = useEnvironmentsStore();
|
|
371
|
+
const experimentalNdvStore = useExperimentalNdvStore();
|
|
372
|
+
const ndvStore = useNDVStore();
|
|
373
|
+
const deviceSupport = useDeviceSupport();
|
|
374
|
+
const vueFlow = useVueFlow(workflowsStore.workflowId);
|
|
375
|
+
const activeElement = useActiveElement();
|
|
376
|
+
const { renameNode } = useCanvasOperations();
|
|
377
|
+
useTelemetryContext({ view_shown: "focus_panel" });
|
|
378
|
+
const resolvedParameter = computed(() => focusPanelStore.resolvedParameter);
|
|
379
|
+
const inputValue = ref("");
|
|
380
|
+
const focusPanelActive = computed(() => focusPanelStore.focusPanelActive);
|
|
381
|
+
const focusPanelWidth = computed(() => focusPanelStore.focusPanelWidth);
|
|
382
|
+
const isDisabled = computed(() => {
|
|
383
|
+
if (!resolvedParameter.value) return false;
|
|
384
|
+
return !!resolvedParameter.value.parameter.disabledOptions && nodeSettingsParameters.shouldDisplayNodeParameter(resolvedParameter.value.node.parameters, resolvedParameter.value.node, resolvedParameter.value.parameter, resolvedParameter.value.parameterPath.split(".").slice(1, -1).join("."), "disabledOptions");
|
|
385
|
+
});
|
|
386
|
+
const isDisplayed = computed(() => {
|
|
387
|
+
if (!resolvedParameter.value) return true;
|
|
388
|
+
return nodeSettingsParameters.shouldDisplayNodeParameter(resolvedParameter.value.node.parameters, resolvedParameter.value.node, resolvedParameter.value.parameter, resolvedParameter.value.parameterPath.split(".").slice(1, -1).join("."), "displayOptions");
|
|
389
|
+
});
|
|
390
|
+
const node = computed(() => {
|
|
391
|
+
if (!experimentalNdvStore.isNdvInFocusPanelEnabled || resolvedParameter.value) return resolvedParameter.value?.node;
|
|
392
|
+
const selected = vueFlow.getSelectedNodes.value[0];
|
|
393
|
+
return selected?.data?.render.type === CanvasNodeRenderType.Default ? workflowsStore.allNodes.find((n) => n.id === selected.id) : void 0;
|
|
394
|
+
});
|
|
395
|
+
const multipleNodesSelected = computed(() => vueFlow.getSelectedNodes.value.length > 1);
|
|
396
|
+
const isExecutable = computed(() => {
|
|
397
|
+
if (!node.value) return false;
|
|
398
|
+
if (!isDisplayed.value) return false;
|
|
399
|
+
const foreignCredentials = nodeHelpers.getForeignCredentialsIfSharingEnabled(node.value.credentials);
|
|
400
|
+
return nodeHelpers.isNodeExecutable(node.value, !props.isCanvasReadOnly, foreignCredentials);
|
|
401
|
+
});
|
|
402
|
+
const { workflowRunData } = useExecutionData({ node });
|
|
403
|
+
const hasNodeRun = computed(() => {
|
|
404
|
+
if (!node.value) return true;
|
|
405
|
+
const parentNode = workflowsStore.workflowObject.getParentNodes(node.value.name, "main", 1)[0];
|
|
406
|
+
return Boolean(parentNode && workflowRunData.value && Object.prototype.hasOwnProperty.bind(workflowRunData.value)(parentNode));
|
|
407
|
+
});
|
|
408
|
+
function getTypeOption(optionName) {
|
|
409
|
+
return resolvedParameter.value ? getParameterTypeOption(resolvedParameter.value.parameter, optionName) : void 0;
|
|
410
|
+
}
|
|
411
|
+
const codeEditorMode = computed(() => {
|
|
412
|
+
return resolvedParameter.value?.node.parameters.mode;
|
|
413
|
+
});
|
|
414
|
+
const editorType = computed(() => {
|
|
415
|
+
return getTypeOption("editor") ?? void 0;
|
|
416
|
+
});
|
|
417
|
+
const editorLanguage = computed(() => {
|
|
418
|
+
if (editorType.value === "json" || resolvedParameter.value?.parameter.type === "json") return "json";
|
|
419
|
+
return getTypeOption("editorLanguage") ?? "javaScript";
|
|
420
|
+
});
|
|
421
|
+
const editorRows = computed(() => getTypeOption("rows"));
|
|
422
|
+
const isToolNode = computed(() => resolvedParameter.value ? nodeTypesStore.isToolNode(resolvedParameter.value?.node.type) : false);
|
|
423
|
+
const isHtmlNode = computed(() => !!resolvedParameter.value && resolvedParameter.value.node.type === "n8n-nodes-base.html");
|
|
424
|
+
const expressionModeEnabled = computed(() => resolvedParameter.value && isValueExpression(resolvedParameter.value.parameter, resolvedParameter.value.value));
|
|
425
|
+
const expression = computed(() => {
|
|
426
|
+
if (!expressionModeEnabled.value) return "";
|
|
427
|
+
return isResourceLocatorValue(resolvedParameter.value) ? resolvedParameter.value.value : resolvedParameter.value;
|
|
428
|
+
});
|
|
429
|
+
const shouldCaptureForPosthog = computed(() => resolvedParameter.value?.node.type === AI_TRANSFORM_NODE_TYPE);
|
|
430
|
+
const isReadOnly = computed(() => props.isCanvasReadOnly || isDisabled.value);
|
|
431
|
+
const resolvedAdditionalExpressionData = computed(() => {
|
|
432
|
+
return { $vars: environmentsStore.variablesAsObject };
|
|
433
|
+
});
|
|
434
|
+
const targetNodeParameterContext = computed(() => {
|
|
435
|
+
if (!resolvedParameter.value) return void 0;
|
|
436
|
+
return {
|
|
437
|
+
nodeName: resolvedParameter.value.node.name,
|
|
438
|
+
parameterPath: resolvedParameter.value.parameterPath
|
|
439
|
+
};
|
|
440
|
+
});
|
|
441
|
+
const isNodeExecuting = computed(() => workflowState.executingNode.isNodeExecuting(node.value?.name ?? ""));
|
|
442
|
+
const selectedNodeIds = computed(() => vueFlow.getSelectedNodes.value.map((n) => n.id));
|
|
443
|
+
const emptyTitle = computed(() => experimentalNdvStore.isNdvInFocusPanelEnabled ? locale.baseText("nodeView.focusPanel.v2.noParameters.title") : locale.baseText("nodeView.focusPanel.noParameters.title"));
|
|
444
|
+
const emptySubtitle = computed(() => experimentalNdvStore.isNdvInFocusPanelEnabled ? locale.baseText("nodeView.focusPanel.v2.noParameters.subtitle") : locale.baseText("nodeView.focusPanel.noParameters.subtitle"));
|
|
445
|
+
const { resolvedExpression } = useResolvedExpression({
|
|
446
|
+
expression,
|
|
447
|
+
additionalData: resolvedAdditionalExpressionData,
|
|
448
|
+
stringifyObject: resolvedParameter.value && resolvedParameter.value.parameter.type !== "multiOptions"
|
|
449
|
+
});
|
|
450
|
+
function valueChanged(value) {
|
|
451
|
+
if (resolvedParameter.value === void 0) return;
|
|
452
|
+
nodeSettingsParameters.updateNodeParameter(toRef(resolvedParameter.value.node.parameters), {
|
|
453
|
+
value,
|
|
454
|
+
name: resolvedParameter.value.parameterPath
|
|
455
|
+
}, value, resolvedParameter.value.node, isToolNode.value);
|
|
456
|
+
}
|
|
457
|
+
async function setFocus() {
|
|
458
|
+
await nextTick();
|
|
459
|
+
if (inputField.value) {
|
|
460
|
+
if (hasFocusOnInput(inputField.value)) inputField.value.focusOnInput();
|
|
461
|
+
else if (isFocusableEl(inputField.value)) inputField.value.focus();
|
|
462
|
+
}
|
|
463
|
+
emit("focus");
|
|
464
|
+
}
|
|
465
|
+
function optionSelected(command) {
|
|
466
|
+
if (!resolvedParameter.value) return;
|
|
467
|
+
switch (command) {
|
|
468
|
+
case "resetValue":
|
|
469
|
+
if (typeof resolvedParameter.value.parameter.default === "string") valueChanged(resolvedParameter.value.parameter.default);
|
|
470
|
+
setFocus();
|
|
471
|
+
break;
|
|
472
|
+
case "addExpression": {
|
|
473
|
+
const newValue = formatAsExpression(resolvedParameter.value.value, resolvedParameter.value.parameter.type);
|
|
474
|
+
valueChanged(typeof newValue === "string" ? newValue : newValue.value);
|
|
475
|
+
setFocus();
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
case "removeExpression": {
|
|
479
|
+
const newValue = parseFromExpression(resolvedParameter.value.value, resolvedExpression.value, resolvedParameter.value.parameter.type, resolvedParameter.value.parameter.default, (resolvedParameter.value.parameter.options ?? []).filter(isValidParameterOption));
|
|
480
|
+
if (typeof newValue === "string") valueChanged(newValue);
|
|
481
|
+
else if (newValue && typeof newValue.value === "string") valueChanged(newValue.value);
|
|
482
|
+
setFocus();
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
case "formatHtml":
|
|
486
|
+
htmlEditorEventBus.emit("format-html");
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
function closeFocusPanel() {
|
|
491
|
+
if (experimentalNdvStore.isNdvInFocusPanelEnabled && resolvedParameter.value) {
|
|
492
|
+
focusPanelStore.unsetParameters();
|
|
493
|
+
telemetry.track("User removed focused param", {
|
|
494
|
+
source: "closeIcon",
|
|
495
|
+
parameters: focusPanelStore.focusedNodeParametersInTelemetryFormat
|
|
496
|
+
});
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
telemetry.track("User closed focus panel", {
|
|
500
|
+
source: "closeIcon",
|
|
501
|
+
parameters: focusPanelStore.focusedNodeParametersInTelemetryFormat
|
|
502
|
+
});
|
|
503
|
+
focusPanelStore.closeFocusPanel();
|
|
504
|
+
}
|
|
505
|
+
function onExecute() {
|
|
506
|
+
telemetry.track("User executed node from focus panel", focusPanelStore.focusedNodeParametersInTelemetryFormat[0]);
|
|
507
|
+
}
|
|
508
|
+
function onInputChange(val) {
|
|
509
|
+
inputValue.value = val;
|
|
510
|
+
valueChanged(val);
|
|
511
|
+
}
|
|
512
|
+
function focusWithDelay() {
|
|
513
|
+
setTimeout(() => {
|
|
514
|
+
setFocus();
|
|
515
|
+
}, 50);
|
|
516
|
+
}
|
|
517
|
+
function handleKeydown(event) {
|
|
518
|
+
if (event.key === "s" && deviceSupport.isCtrlKeyPressed(event)) {
|
|
519
|
+
event.stopPropagation();
|
|
520
|
+
event.preventDefault();
|
|
521
|
+
if (isReadOnly.value) return;
|
|
522
|
+
emit("saveKeyboardShortcut", event);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
const registerKeyboardListener = () => {
|
|
526
|
+
document.addEventListener("keydown", handleKeydown, true);
|
|
527
|
+
};
|
|
528
|
+
const unregisterKeyboardListener = () => {
|
|
529
|
+
document.removeEventListener("keydown", handleKeydown, true);
|
|
530
|
+
};
|
|
531
|
+
watch([() => focusPanelStore.lastFocusTimestamp, () => expressionModeEnabled.value], () => focusWithDelay());
|
|
532
|
+
watch(() => focusPanelStore.focusPanelActive, (newValue) => {
|
|
533
|
+
if (newValue) registerKeyboardListener();
|
|
534
|
+
else unregisterKeyboardListener();
|
|
535
|
+
}, { immediate: true });
|
|
536
|
+
watch(() => resolvedParameter.value, (newValue) => {
|
|
537
|
+
if (newValue) {
|
|
538
|
+
const value = newValue.value;
|
|
539
|
+
if (typeof value === "string" && value !== inputValue.value) inputValue.value = value;
|
|
540
|
+
}
|
|
541
|
+
}, { immediate: true });
|
|
542
|
+
watch(activeElement, (active) => {
|
|
543
|
+
if (!node.value || !active || !wrapperRef.value?.contains(active)) return;
|
|
544
|
+
const path = active.closest(".parameter-input")?.getAttribute("data-parameter-path");
|
|
545
|
+
if (!path) return;
|
|
546
|
+
telemetry.track("User focused focus panel", {
|
|
547
|
+
node_id: node.value.id,
|
|
548
|
+
node_type: node.value.type,
|
|
549
|
+
parameter_path: path
|
|
550
|
+
});
|
|
551
|
+
});
|
|
552
|
+
function onResize(event) {
|
|
553
|
+
focusPanelStore.updateWidth(event.width);
|
|
554
|
+
}
|
|
555
|
+
const onResizeThrottle = useThrottleFn(onResize, 10);
|
|
556
|
+
function onOpenNdv() {
|
|
557
|
+
if (node.value) ndvStore.setActiveNodeName(node.value.name, "focus_panel");
|
|
558
|
+
}
|
|
559
|
+
function onRenameNode(value) {
|
|
560
|
+
if (node.value) renameNode(node.value.name, value);
|
|
561
|
+
}
|
|
562
|
+
return (_ctx, _cache) => {
|
|
563
|
+
return focusPanelActive.value ? (openBlock(), createElementBlock("div", {
|
|
564
|
+
key: 0,
|
|
565
|
+
ref: "wrapper",
|
|
566
|
+
"data-test-id": "focus-panel",
|
|
567
|
+
class: normalizeClass([
|
|
568
|
+
_ctx.$style.wrapper,
|
|
569
|
+
"ignore-key-press-canvas",
|
|
570
|
+
{ [_ctx.$style.isNdvInFocusPanelEnabled]: unref(experimentalNdvStore).isNdvInFocusPanelEnabled }
|
|
571
|
+
]),
|
|
572
|
+
onKeydown: _cache[10] || (_cache[10] = withModifiers(() => {}, ["stop"]))
|
|
573
|
+
}, [createVNode(unref(N8nResizeWrapper_default), {
|
|
574
|
+
width: focusPanelWidth.value,
|
|
575
|
+
"supported-directions": ["left"],
|
|
576
|
+
"min-width": 300,
|
|
577
|
+
"max-width": unref(experimentalNdvStore).isNdvInFocusPanelEnabled ? void 0 : 1e3,
|
|
578
|
+
"grid-size": 8,
|
|
579
|
+
style: normalizeStyle({ width: `${focusPanelWidth.value}px` }),
|
|
580
|
+
onResize: unref(onResizeThrottle)
|
|
581
|
+
}, {
|
|
582
|
+
default: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.$style.container) }, [unref(experimentalNdvStore).isNdvInFocusPanelEnabled && node.value && !multipleNodesSelected.value ? (openBlock(), createBlock(ExperimentalFocusPanelHeader_default, {
|
|
583
|
+
key: 0,
|
|
584
|
+
node: node.value,
|
|
585
|
+
parameter: resolvedParameter.value?.parameter,
|
|
586
|
+
"is-executable": isExecutable.value,
|
|
587
|
+
"read-only": _ctx.isCanvasReadOnly,
|
|
588
|
+
onExecute,
|
|
589
|
+
onOpenNdv,
|
|
590
|
+
onClearParameter: closeFocusPanel,
|
|
591
|
+
onRenameNode
|
|
592
|
+
}, null, 8, [
|
|
593
|
+
"node",
|
|
594
|
+
"parameter",
|
|
595
|
+
"is-executable",
|
|
596
|
+
"read-only"
|
|
597
|
+
])) : createCommentVNode("", true), resolvedParameter.value ? (openBlock(), createElementBlock("div", {
|
|
598
|
+
key: 1,
|
|
599
|
+
class: normalizeClass(_ctx.$style.content),
|
|
600
|
+
"data-test-id": "focus-parameter"
|
|
601
|
+
}, [!unref(experimentalNdvStore).isNdvInFocusPanelEnabled ? (openBlock(), createElementBlock("div", {
|
|
602
|
+
key: 0,
|
|
603
|
+
class: normalizeClass(_ctx.$style.tabHeader)
|
|
604
|
+
}, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.tabHeaderText) }, [createVNode(unref(N8nText_default), {
|
|
605
|
+
color: "text-dark",
|
|
606
|
+
size: "small"
|
|
607
|
+
}, {
|
|
608
|
+
default: withCtx(() => [createTextVNode(toDisplayString(resolvedParameter.value.parameter.displayName), 1)]),
|
|
609
|
+
_: 1
|
|
610
|
+
}), createVNode(unref(N8nText_default), {
|
|
611
|
+
color: "text-base",
|
|
612
|
+
size: "xsmall"
|
|
613
|
+
}, {
|
|
614
|
+
default: withCtx(() => [createTextVNode(toDisplayString(resolvedParameter.value.node.name), 1)]),
|
|
615
|
+
_: 1
|
|
616
|
+
})], 2), createBaseVNode("div", { class: normalizeClass(_ctx.$style.buttonWrapper) }, [createVNode(NodeExecuteButton_default, {
|
|
617
|
+
"data-test-id": "node-execute-button",
|
|
618
|
+
"node-name": resolvedParameter.value.node.name,
|
|
619
|
+
tooltip: `Execute ${resolvedParameter.value.node.name}`,
|
|
620
|
+
disabled: !isExecutable.value,
|
|
621
|
+
size: "small",
|
|
622
|
+
icon: "play",
|
|
623
|
+
square: true,
|
|
624
|
+
"hide-label": true,
|
|
625
|
+
"telemetry-source": "focus",
|
|
626
|
+
onExecute
|
|
627
|
+
}, null, 8, [
|
|
628
|
+
"node-name",
|
|
629
|
+
"tooltip",
|
|
630
|
+
"disabled"
|
|
631
|
+
]), createVNode(unref(N8nIcon_default), {
|
|
632
|
+
class: normalizeClass(_ctx.$style.closeButton),
|
|
633
|
+
icon: "x",
|
|
634
|
+
color: "text-base",
|
|
635
|
+
size: "xlarge",
|
|
636
|
+
onClick: closeFocusPanel
|
|
637
|
+
}, null, 8, ["class"])], 2)], 2)) : createCommentVNode("", true), createBaseVNode("div", { class: normalizeClass(_ctx.$style.parameterDetailsWrapper) }, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.parameterOptionsWrapper) }, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.noExecutionDataTip) }, [!hasNodeRun.value && !isNodeExecuting.value ? (openBlock(), createBlock(unref(N8nInfoTip_default), {
|
|
638
|
+
key: 0,
|
|
639
|
+
class: normalizeClass(_ctx.$style.delayedShow),
|
|
640
|
+
bold: true
|
|
641
|
+
}, {
|
|
642
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(locale).baseText("nodeView.focusPanel.noExecutionData")), 1)]),
|
|
643
|
+
_: 1
|
|
644
|
+
}, 8, ["class"])) : createCommentVNode("", true)], 2), isDisplayed.value ? (openBlock(), createBlock(ParameterOptions_default, {
|
|
645
|
+
key: 0,
|
|
646
|
+
parameter: resolvedParameter.value.parameter,
|
|
647
|
+
value: resolvedParameter.value.value,
|
|
648
|
+
"is-read-only": isReadOnly.value,
|
|
649
|
+
"onUpdate:modelValue": optionSelected
|
|
650
|
+
}, null, 8, [
|
|
651
|
+
"parameter",
|
|
652
|
+
"value",
|
|
653
|
+
"is-read-only"
|
|
654
|
+
])) : createCommentVNode("", true)], 2), typeof resolvedParameter.value.value === "string" ? (openBlock(), createElementBlock("div", {
|
|
655
|
+
key: 0,
|
|
656
|
+
class: normalizeClass(_ctx.$style.editorContainer)
|
|
657
|
+
}, [!isDisplayed.value ? (openBlock(), createElementBlock("div", {
|
|
658
|
+
key: 0,
|
|
659
|
+
class: normalizeClass([_ctx.$style.content, _ctx.$style.emptyContent])
|
|
660
|
+
}, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.emptyText) }, [createVNode(unref(N8nText_default), { color: "text-base" }, {
|
|
661
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(locale).baseText("nodeView.focusPanel.missingParameter")), 1)]),
|
|
662
|
+
_: 1
|
|
663
|
+
})], 2)], 2)) : expressionModeEnabled.value ? (openBlock(), createBlock(ExpressionEditorModalInput_default, {
|
|
664
|
+
key: 1,
|
|
665
|
+
ref_key: "inputField",
|
|
666
|
+
ref: inputField,
|
|
667
|
+
modelValue: inputValue.value,
|
|
668
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
669
|
+
class: normalizeClass(_ctx.$style.editor),
|
|
670
|
+
"is-read-only": isReadOnly.value,
|
|
671
|
+
path: resolvedParameter.value.parameterPath,
|
|
672
|
+
"data-test-id": "expression-modal-input",
|
|
673
|
+
"target-node-parameter-context": targetNodeParameterContext.value,
|
|
674
|
+
onChange: _cache[1] || (_cache[1] = ($event) => onInputChange($event.value))
|
|
675
|
+
}, null, 8, [
|
|
676
|
+
"modelValue",
|
|
677
|
+
"class",
|
|
678
|
+
"is-read-only",
|
|
679
|
+
"path",
|
|
680
|
+
"target-node-parameter-context"
|
|
681
|
+
])) : ["json", "string"].includes(resolvedParameter.value.parameter.type) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [editorType.value === "codeNodeEditor" ? (openBlock(), createBlock(CodeNodeEditor_default, {
|
|
682
|
+
key: 0,
|
|
683
|
+
id: resolvedParameter.value.parameterPath,
|
|
684
|
+
ref_key: "inputField",
|
|
685
|
+
ref: inputField,
|
|
686
|
+
modelValue: inputValue.value,
|
|
687
|
+
"onUpdate:modelValue": [_cache[2] || (_cache[2] = ($event) => inputValue.value = $event), onInputChange],
|
|
688
|
+
class: normalizeClass(_ctx.$style.heightFull),
|
|
689
|
+
mode: codeEditorMode.value,
|
|
690
|
+
"default-value": resolvedParameter.value.parameter.default,
|
|
691
|
+
language: editorLanguage.value,
|
|
692
|
+
"is-read-only": isReadOnly.value,
|
|
693
|
+
"target-node-parameter-context": targetNodeParameterContext.value,
|
|
694
|
+
"fill-parent": "",
|
|
695
|
+
"disable-ask-ai": true
|
|
696
|
+
}, null, 8, [
|
|
697
|
+
"id",
|
|
698
|
+
"modelValue",
|
|
699
|
+
"class",
|
|
700
|
+
"mode",
|
|
701
|
+
"default-value",
|
|
702
|
+
"language",
|
|
703
|
+
"is-read-only",
|
|
704
|
+
"target-node-parameter-context"
|
|
705
|
+
])) : editorType.value === "htmlEditor" ? (openBlock(), createBlock(HtmlEditor_default, {
|
|
706
|
+
key: 1,
|
|
707
|
+
ref_key: "inputField",
|
|
708
|
+
ref: inputField,
|
|
709
|
+
modelValue: inputValue.value,
|
|
710
|
+
"onUpdate:modelValue": [_cache[3] || (_cache[3] = ($event) => inputValue.value = $event), onInputChange],
|
|
711
|
+
"is-read-only": isReadOnly.value,
|
|
712
|
+
rows: editorRows.value,
|
|
713
|
+
"disable-expression-coloring": !isHtmlNode.value,
|
|
714
|
+
"disable-expression-completions": !isHtmlNode.value,
|
|
715
|
+
fullscreen: "",
|
|
716
|
+
"target-node-parameter-context": targetNodeParameterContext.value
|
|
717
|
+
}, null, 8, [
|
|
718
|
+
"modelValue",
|
|
719
|
+
"is-read-only",
|
|
720
|
+
"rows",
|
|
721
|
+
"disable-expression-coloring",
|
|
722
|
+
"disable-expression-completions",
|
|
723
|
+
"target-node-parameter-context"
|
|
724
|
+
])) : editorType.value === "cssEditor" ? (openBlock(), createBlock(CssEditor_default, {
|
|
725
|
+
key: 2,
|
|
726
|
+
ref_key: "inputField",
|
|
727
|
+
ref: inputField,
|
|
728
|
+
modelValue: inputValue.value,
|
|
729
|
+
"onUpdate:modelValue": [_cache[4] || (_cache[4] = ($event) => inputValue.value = $event), onInputChange],
|
|
730
|
+
"is-read-only": isReadOnly.value,
|
|
731
|
+
rows: editorRows.value,
|
|
732
|
+
fullscreen: "",
|
|
733
|
+
"target-node-parameter-context": targetNodeParameterContext.value
|
|
734
|
+
}, null, 8, [
|
|
735
|
+
"modelValue",
|
|
736
|
+
"is-read-only",
|
|
737
|
+
"rows",
|
|
738
|
+
"target-node-parameter-context"
|
|
739
|
+
])) : editorType.value === "sqlEditor" ? (openBlock(), createBlock(SqlEditor_default, {
|
|
740
|
+
key: 3,
|
|
741
|
+
ref_key: "inputField",
|
|
742
|
+
ref: inputField,
|
|
743
|
+
modelValue: inputValue.value,
|
|
744
|
+
"onUpdate:modelValue": [_cache[5] || (_cache[5] = ($event) => inputValue.value = $event), onInputChange],
|
|
745
|
+
dialect: getTypeOption("sqlDialect"),
|
|
746
|
+
"is-read-only": isReadOnly.value,
|
|
747
|
+
rows: editorRows.value,
|
|
748
|
+
fullscreen: "",
|
|
749
|
+
"target-node-parameter-context": targetNodeParameterContext.value
|
|
750
|
+
}, null, 8, [
|
|
751
|
+
"modelValue",
|
|
752
|
+
"dialect",
|
|
753
|
+
"is-read-only",
|
|
754
|
+
"rows",
|
|
755
|
+
"target-node-parameter-context"
|
|
756
|
+
])) : editorType.value === "jsEditor" ? (openBlock(), createBlock(JsEditor_default, {
|
|
757
|
+
key: 4,
|
|
758
|
+
ref_key: "inputField",
|
|
759
|
+
ref: inputField,
|
|
760
|
+
modelValue: inputValue.value,
|
|
761
|
+
"onUpdate:modelValue": [_cache[6] || (_cache[6] = ($event) => inputValue.value = $event), onInputChange],
|
|
762
|
+
"is-read-only": isReadOnly.value,
|
|
763
|
+
rows: editorRows.value,
|
|
764
|
+
"posthog-capture": shouldCaptureForPosthog.value,
|
|
765
|
+
"fill-parent": ""
|
|
766
|
+
}, null, 8, [
|
|
767
|
+
"modelValue",
|
|
768
|
+
"is-read-only",
|
|
769
|
+
"rows",
|
|
770
|
+
"posthog-capture"
|
|
771
|
+
])) : resolvedParameter.value.parameter.type === "json" ? (openBlock(), createBlock(JsonEditor_default, {
|
|
772
|
+
key: 5,
|
|
773
|
+
ref_key: "inputField",
|
|
774
|
+
ref: inputField,
|
|
775
|
+
modelValue: inputValue.value,
|
|
776
|
+
"onUpdate:modelValue": [_cache[7] || (_cache[7] = ($event) => inputValue.value = $event), onInputChange],
|
|
777
|
+
"is-read-only": isReadOnly.value,
|
|
778
|
+
rows: editorRows.value,
|
|
779
|
+
fullscreen: "",
|
|
780
|
+
"fill-parent": ""
|
|
781
|
+
}, null, 8, [
|
|
782
|
+
"modelValue",
|
|
783
|
+
"is-read-only",
|
|
784
|
+
"rows"
|
|
785
|
+
])) : (openBlock(), createBlock(unref(N8nInput_default), {
|
|
786
|
+
key: 6,
|
|
787
|
+
ref_key: "inputField",
|
|
788
|
+
ref: inputField,
|
|
789
|
+
modelValue: inputValue.value,
|
|
790
|
+
"onUpdate:modelValue": [_cache[8] || (_cache[8] = ($event) => inputValue.value = $event), onInputChange],
|
|
791
|
+
class: normalizeClass(_ctx.$style.editor),
|
|
792
|
+
readonly: isReadOnly.value,
|
|
793
|
+
type: "textarea",
|
|
794
|
+
resize: "none"
|
|
795
|
+
}, null, 8, [
|
|
796
|
+
"modelValue",
|
|
797
|
+
"class",
|
|
798
|
+
"readonly"
|
|
799
|
+
]))], 64)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)], 2)], 2)) : node.value && unref(experimentalNdvStore).isNdvInFocusPanelEnabled ? (openBlock(), createBlock(ExperimentalNodeDetailsDrawer_default, {
|
|
800
|
+
key: 2,
|
|
801
|
+
node: node.value,
|
|
802
|
+
"node-ids": selectedNodeIds.value,
|
|
803
|
+
"is-read-only": isReadOnly.value,
|
|
804
|
+
onOpenNdv,
|
|
805
|
+
onContextMenuAction: _cache[9] || (_cache[9] = (action, nodeIds) => emit("contextMenuAction", action, nodeIds))
|
|
806
|
+
}, null, 8, [
|
|
807
|
+
"node",
|
|
808
|
+
"node-ids",
|
|
809
|
+
"is-read-only"
|
|
810
|
+
])) : (openBlock(), createElementBlock("div", {
|
|
811
|
+
key: 3,
|
|
812
|
+
class: normalizeClass([_ctx.$style.content, _ctx.$style.emptyContent])
|
|
813
|
+
}, [createBaseVNode("div", { class: normalizeClass(_ctx.$style.focusParameterWrapper) }, [
|
|
814
|
+
createBaseVNode("div", { class: normalizeClass(_ctx.$style.iconWrapper) }, [createVNode(unref(N8nIcon_default), {
|
|
815
|
+
class: normalizeClass(_ctx.$style.forceHover),
|
|
816
|
+
icon: "panel-right",
|
|
817
|
+
size: "medium"
|
|
818
|
+
}, null, 8, ["class"]), createVNode(unref(N8nIcon_default), {
|
|
819
|
+
class: normalizeClass(_ctx.$style.pointerIcon),
|
|
820
|
+
icon: "mouse-pointer",
|
|
821
|
+
color: "text-dark",
|
|
822
|
+
size: "large"
|
|
823
|
+
}, null, 8, ["class"])], 2),
|
|
824
|
+
createVNode(unref(N8nIcon_default), {
|
|
825
|
+
icon: "ellipsis-vertical",
|
|
826
|
+
size: "small",
|
|
827
|
+
color: "text-base"
|
|
828
|
+
}),
|
|
829
|
+
createVNode(unref(N8nRadioButtons_default), {
|
|
830
|
+
size: "small",
|
|
831
|
+
"model-value": "expression",
|
|
832
|
+
disabled: true,
|
|
833
|
+
options: [{
|
|
834
|
+
label: unref(locale).baseText("parameterInput.fixed"),
|
|
835
|
+
value: "fixed"
|
|
836
|
+
}, {
|
|
837
|
+
label: unref(locale).baseText("parameterInput.expression"),
|
|
838
|
+
value: "expression"
|
|
839
|
+
}]
|
|
840
|
+
}, null, 8, ["options"])
|
|
841
|
+
], 2), createBaseVNode("div", { class: normalizeClass(_ctx.$style.emptyText) }, [createVNode(unref(N8nText_default), {
|
|
842
|
+
color: "text-base",
|
|
843
|
+
size: "medium",
|
|
844
|
+
bold: true
|
|
845
|
+
}, {
|
|
846
|
+
default: withCtx(() => [createTextVNode(toDisplayString(emptyTitle.value), 1)]),
|
|
847
|
+
_: 1
|
|
848
|
+
}), createVNode(unref(N8nText_default), {
|
|
849
|
+
color: "text-base",
|
|
850
|
+
size: "small"
|
|
851
|
+
}, {
|
|
852
|
+
default: withCtx(() => [createTextVNode(toDisplayString(emptySubtitle.value), 1)]),
|
|
853
|
+
_: 1
|
|
854
|
+
})], 2)], 2))], 2)]),
|
|
855
|
+
_: 1
|
|
856
|
+
}, 8, [
|
|
857
|
+
"width",
|
|
858
|
+
"max-width",
|
|
859
|
+
"style",
|
|
860
|
+
"onResize"
|
|
861
|
+
])], 34)) : createCommentVNode("", true);
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
var FocusPanel_vue_vue_type_style_index_0_lang_module_default = {
|
|
866
|
+
wrapper: "_wrapper_1aqcs_123",
|
|
867
|
+
container: "_container_1aqcs_135",
|
|
868
|
+
content: "_content_1aqcs_141",
|
|
869
|
+
emptyContent: "_emptyContent_1aqcs_147",
|
|
870
|
+
isNdvInFocusPanelEnabled: "_isNdvInFocusPanelEnabled_1aqcs_152",
|
|
871
|
+
emptyText: "_emptyText_1aqcs_155",
|
|
872
|
+
focusParameterWrapper: "_focusParameterWrapper_1aqcs_161",
|
|
873
|
+
iconWrapper: "_iconWrapper_1aqcs_168",
|
|
874
|
+
pointerIcon: "_pointerIcon_1aqcs_172",
|
|
875
|
+
tabHeader: "_tabHeader_1aqcs_182",
|
|
876
|
+
tabHeaderText: "_tabHeaderText_1aqcs_189",
|
|
877
|
+
buttonWrapper: "_buttonWrapper_1aqcs_194",
|
|
878
|
+
parameterDetailsWrapper: "_parameterDetailsWrapper_1aqcs_199",
|
|
879
|
+
parameterOptionsWrapper: "_parameterOptionsWrapper_1aqcs_206",
|
|
880
|
+
noExecutionDataTip: "_noExecutionDataTip_1aqcs_210",
|
|
881
|
+
editorContainer: "_editorContainer_1aqcs_213",
|
|
882
|
+
editor: "_editor_1aqcs_213",
|
|
883
|
+
delayedShow: "_delayedShow_1aqcs_228",
|
|
884
|
+
triggerShow: "_triggerShow_1aqcs_1",
|
|
885
|
+
closeButton: "_closeButton_1aqcs_239",
|
|
886
|
+
heightFull: "_heightFull_1aqcs_243",
|
|
887
|
+
forceHover: "_forceHover_1aqcs_247"
|
|
888
|
+
};
|
|
889
|
+
var FocusPanel_default = /* @__PURE__ */ __plugin_vue_export_helper_default(FocusPanel_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": FocusPanel_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
890
|
+
var CanvasLoadDataButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
891
|
+
__name: "CanvasLoadDataButton",
|
|
892
|
+
props: {
|
|
893
|
+
disabled: { type: Boolean },
|
|
894
|
+
size: {}
|
|
895
|
+
},
|
|
896
|
+
emits: ["load"],
|
|
897
|
+
setup(__props, { emit: __emit }) {
|
|
898
|
+
const emit = __emit;
|
|
899
|
+
const props = __props;
|
|
900
|
+
const i18n = useI18n();
|
|
901
|
+
const toast = useToast();
|
|
902
|
+
const { requestListDataFiles, requestLoadDataFile } = useWorkflowFileSync();
|
|
903
|
+
const dataFiles = ref([]);
|
|
904
|
+
const selectedDataFile = ref(void 0);
|
|
905
|
+
const isLoading = ref(false);
|
|
906
|
+
const label = computed(() => {
|
|
907
|
+
return i18n.baseText("nodeView.loadData.button");
|
|
908
|
+
});
|
|
909
|
+
const actions = computed(() => dataFiles.value.map((file) => ({
|
|
910
|
+
label: file.name,
|
|
911
|
+
disabled: props.disabled || isLoading.value,
|
|
912
|
+
id: file.path,
|
|
913
|
+
checked: selectedDataFile.value === file.path
|
|
914
|
+
})));
|
|
915
|
+
const isSplitButton = computed(() => dataFiles.value.length > 1);
|
|
916
|
+
async function loadDataFiles() {
|
|
917
|
+
if (isLoading.value) return;
|
|
918
|
+
isLoading.value = true;
|
|
919
|
+
try {
|
|
920
|
+
dataFiles.value = await requestListDataFiles() || [];
|
|
921
|
+
if (dataFiles.value.length === 1) selectedDataFile.value = dataFiles.value[0].path;
|
|
922
|
+
} catch (error) {
|
|
923
|
+
console.error("[CanvasLoadDataButton] Failed to load data files:", error);
|
|
924
|
+
toast.showError(error instanceof Error ? error : new Error(String(error)), "Failed to list data files");
|
|
925
|
+
} finally {
|
|
926
|
+
isLoading.value = false;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
async function onLoadData(filePath) {
|
|
930
|
+
const pathToLoad = filePath || selectedDataFile.value || dataFiles.value[0]?.path;
|
|
931
|
+
if (!pathToLoad) {
|
|
932
|
+
if (dataFiles.value.length === 0) toast.showError(/* @__PURE__ */ new Error("No data files found"), "No data files available");
|
|
933
|
+
return;
|
|
934
|
+
}
|
|
935
|
+
if (isLoading.value) return;
|
|
936
|
+
isLoading.value = true;
|
|
937
|
+
try {
|
|
938
|
+
await requestLoadDataFile(pathToLoad);
|
|
939
|
+
selectedDataFile.value = pathToLoad;
|
|
940
|
+
emit("load", pathToLoad);
|
|
941
|
+
} catch (error) {
|
|
942
|
+
console.error("[CanvasLoadDataButton] Failed to load data file:", error);
|
|
943
|
+
toast.showError(error instanceof Error ? error : new Error(String(error)), "Failed to load data file");
|
|
944
|
+
} finally {
|
|
945
|
+
isLoading.value = false;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
function onSelectDataFile(filePath) {
|
|
949
|
+
selectedDataFile.value = filePath;
|
|
950
|
+
onLoadData(filePath);
|
|
951
|
+
}
|
|
952
|
+
onMounted(() => {
|
|
953
|
+
loadDataFiles();
|
|
954
|
+
});
|
|
955
|
+
return (_ctx, _cache) => {
|
|
956
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass([_ctx.$style.component, isSplitButton.value ? _ctx.$style.split : ""]) }, [createVNode(unref(N8nButton_default), {
|
|
957
|
+
class: normalizeClass(_ctx.$style.button),
|
|
958
|
+
loading: isLoading.value,
|
|
959
|
+
disabled: _ctx.disabled,
|
|
960
|
+
size: _ctx.size ?? "large",
|
|
961
|
+
icon: "folder-open",
|
|
962
|
+
type: "secondary",
|
|
963
|
+
"data-test-id": "load-data-button",
|
|
964
|
+
onClick: _cache[0] || (_cache[0] = ($event) => onLoadData())
|
|
965
|
+
}, {
|
|
966
|
+
default: withCtx(() => [createTextVNode(toDisplayString(label.value), 1)]),
|
|
967
|
+
_: 1
|
|
968
|
+
}, 8, [
|
|
969
|
+
"class",
|
|
970
|
+
"loading",
|
|
971
|
+
"disabled",
|
|
972
|
+
"size"
|
|
973
|
+
]), isSplitButton.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("div", {
|
|
974
|
+
role: "presentation",
|
|
975
|
+
class: normalizeClass(_ctx.$style.divider)
|
|
976
|
+
}, null, 2), createVNode(unref(N8nActionDropdown_default), {
|
|
977
|
+
class: normalizeClass(_ctx.$style.menu),
|
|
978
|
+
items: actions.value,
|
|
979
|
+
disabled: _ctx.disabled || isLoading.value,
|
|
980
|
+
placement: "top",
|
|
981
|
+
"extra-popper-class": _ctx.$style.menuPopper,
|
|
982
|
+
onSelect: onSelectDataFile
|
|
983
|
+
}, {
|
|
984
|
+
activator: withCtx(() => [createVNode(unref(N8nButton_default), {
|
|
985
|
+
type: "secondary",
|
|
986
|
+
"icon-size": "large",
|
|
987
|
+
disabled: _ctx.disabled || isLoading.value,
|
|
988
|
+
class: normalizeClass(_ctx.$style.chevron),
|
|
989
|
+
"aria-label": "Select data file",
|
|
990
|
+
icon: "chevron-down"
|
|
991
|
+
}, null, 8, ["disabled", "class"])]),
|
|
992
|
+
menuItem: withCtx((item) => [createBaseVNode("div", { class: normalizeClass([_ctx.$style.menuItem, item.disabled ? _ctx.$style.disabled : ""]) }, [createVNode(unref(N8nText_default), {
|
|
993
|
+
bold: "",
|
|
994
|
+
size: "small"
|
|
995
|
+
}, {
|
|
996
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
997
|
+
_: 2
|
|
998
|
+
}, 1024)], 2)]),
|
|
999
|
+
_: 1
|
|
1000
|
+
}, 8, [
|
|
1001
|
+
"class",
|
|
1002
|
+
"items",
|
|
1003
|
+
"disabled",
|
|
1004
|
+
"extra-popper-class"
|
|
1005
|
+
])], 64)) : createCommentVNode("", true)], 2);
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
var CanvasLoadDataButton_vue_vue_type_style_index_0_lang_module_default = {
|
|
1010
|
+
component: "_component_1mgoo_123",
|
|
1011
|
+
split: "_split_1mgoo_129",
|
|
1012
|
+
button: "_button_1mgoo_129",
|
|
1013
|
+
divider: "_divider_1mgoo_137",
|
|
1014
|
+
chevron: "_chevron_1mgoo_142",
|
|
1015
|
+
menu: "_menu_1mgoo_148",
|
|
1016
|
+
menuPopper: "_menuPopper_1mgoo_152",
|
|
1017
|
+
menuItem: "_menuItem_1mgoo_156",
|
|
1018
|
+
disabled: "_disabled_1mgoo_162"
|
|
1019
|
+
};
|
|
1020
|
+
var CanvasLoadDataButton_default = /* @__PURE__ */ __plugin_vue_export_helper_default(CanvasLoadDataButton_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": CanvasLoadDataButton_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
1021
|
+
var CanvasStopCurrentExecutionButton_default = /* @__PURE__ */ defineComponent({
|
|
1022
|
+
__name: "CanvasStopCurrentExecutionButton",
|
|
1023
|
+
props: { stopping: { type: Boolean } },
|
|
1024
|
+
setup(__props) {
|
|
1025
|
+
const props = __props;
|
|
1026
|
+
const i18n = useI18n();
|
|
1027
|
+
const title = computed(() => props.stopping ? i18n.baseText("nodeView.stoppingCurrentExecution") : i18n.baseText("nodeView.stopCurrentExecution"));
|
|
1028
|
+
return (_ctx, _cache) => {
|
|
1029
|
+
return openBlock(), createBlock(unref(N8nIconButton_default), {
|
|
1030
|
+
icon: "square",
|
|
1031
|
+
size: "large",
|
|
1032
|
+
class: "stop-execution",
|
|
1033
|
+
type: "secondary",
|
|
1034
|
+
title: title.value,
|
|
1035
|
+
loading: _ctx.stopping,
|
|
1036
|
+
"data-test-id": "stop-execution-button"
|
|
1037
|
+
}, null, 8, ["title", "loading"]);
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1041
|
+
var CanvasStopWaitingForWebhookButton_default = /* @__PURE__ */ defineComponent({
|
|
1042
|
+
__name: "CanvasStopWaitingForWebhookButton",
|
|
1043
|
+
setup(__props) {
|
|
1044
|
+
const i18n = useI18n();
|
|
1045
|
+
return (_ctx, _cache) => {
|
|
1046
|
+
return openBlock(), createBlock(unref(N8nIconButton_default), {
|
|
1047
|
+
class: "stop-execution",
|
|
1048
|
+
icon: "square",
|
|
1049
|
+
size: "large",
|
|
1050
|
+
title: unref(i18n).baseText("nodeView.stopWaitingForWebhookCall"),
|
|
1051
|
+
type: "secondary",
|
|
1052
|
+
"data-test-id": "stop-execution-waiting-for-webhook-button"
|
|
1053
|
+
}, null, 8, ["title"]);
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
var _hoisted_1 = { "data-action": "reload" };
|
|
1058
|
+
var _hoisted_2 = {
|
|
1059
|
+
href: "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/",
|
|
1060
|
+
target: "_blank"
|
|
1061
|
+
};
|
|
1062
|
+
var NodeViewUnfinishedWorkflowMessage_default = /* @__PURE__ */ defineComponent({
|
|
1063
|
+
__name: "NodeViewUnfinishedWorkflowMessage",
|
|
1064
|
+
setup(__props) {
|
|
1065
|
+
const i18 = useI18n();
|
|
1066
|
+
return (_ctx, _cache) => {
|
|
1067
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1068
|
+
createBaseVNode("a", _hoisted_1, toDisplayString(unref(i18).baseText("nodeView.refresh")), 1),
|
|
1069
|
+
createTextVNode(" " + toDisplayString(unref(i18).baseText("nodeView.toSeeTheLatestStatus")) + ". ", 1),
|
|
1070
|
+
_cache[0] || (_cache[0] = createBaseVNode("br", null, null, -1)),
|
|
1071
|
+
createBaseVNode("a", _hoisted_2, toDisplayString(unref(i18).baseText("nodeView.moreInfo")), 1)
|
|
1072
|
+
]);
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
var CanvasChatButton_default = /* @__PURE__ */ defineComponent({
|
|
1077
|
+
__name: "CanvasChatButton",
|
|
1078
|
+
props: {
|
|
1079
|
+
label: {},
|
|
1080
|
+
type: {}
|
|
1081
|
+
},
|
|
1082
|
+
setup(__props) {
|
|
1083
|
+
return (_ctx, _cache) => {
|
|
1084
|
+
return openBlock(), createBlock(unref(N8nButton_default), {
|
|
1085
|
+
label: _ctx.label,
|
|
1086
|
+
size: "large",
|
|
1087
|
+
icon: "message-circle",
|
|
1088
|
+
type: _ctx.type,
|
|
1089
|
+
"data-test-id": "workflow-chat-button"
|
|
1090
|
+
}, null, 8, ["label", "type"]);
|
|
1091
|
+
};
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
var NodeView_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1095
|
+
name: "NodeView",
|
|
1096
|
+
__name: "NodeView",
|
|
1097
|
+
setup(__props) {
|
|
1098
|
+
const LazyNodeCreation = defineAsyncComponent(async () => await __vitePreload(() => import("./NodeCreation-BNzbSWSB.js"), __vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46]), import.meta.url));
|
|
1099
|
+
const LazyNodeDetailsView = defineAsyncComponent(async () => await __vitePreload(() => import("./NodeDetailsView-CsoQCpcF.js"), __vite__mapDeps([47,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,48,23,24,25,26,27,28,29,30,49,50,34,51,45,52,53,54,55,56,57,58,59,60,61,62,36,63,64,65,66,67,68,42,69,70,46,71,72,73,74,75,76,77,78]), import.meta.url));
|
|
1100
|
+
const LazyNodeDetailsViewV2 = defineAsyncComponent(async () => await __vitePreload(() => import("./NodeDetailsViewV2-C_wNQR_3.js"), __vite__mapDeps([79,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,48,23,24,25,26,27,28,29,30,49,50,34,51,45,52,53,54,55,56,57,58,59,60,61,62,36,63,64,65,66,67,68,42,69,70,46,71,72,73,74,75,80,76,77,78]), import.meta.url));
|
|
1101
|
+
const LazySetupWorkflowCredentialsButton = defineAsyncComponent(async () => await __vitePreload(() => import("./SetupWorkflowCredentialsButton-DTmkOAW5.js"), __vite__mapDeps([81,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,64]), import.meta.url));
|
|
1102
|
+
const $style = useCssModule();
|
|
1103
|
+
const router = useRouter();
|
|
1104
|
+
const route = useRoute();
|
|
1105
|
+
const i18n = useI18n();
|
|
1106
|
+
const telemetry = useTelemetry();
|
|
1107
|
+
const externalHooks = useExternalHooks();
|
|
1108
|
+
const toast = useToast();
|
|
1109
|
+
const message = useMessage();
|
|
1110
|
+
const documentTitle = useDocumentTitle();
|
|
1111
|
+
const workflowSaving = useWorkflowSaving({ router });
|
|
1112
|
+
const nodeHelpers = useNodeHelpers();
|
|
1113
|
+
const clipboard = useClipboard({ onPaste: onClipboardPaste });
|
|
1114
|
+
const nodeTypesStore = useNodeTypesStore();
|
|
1115
|
+
const uiStore = useUIStore();
|
|
1116
|
+
const workflowsStore = useWorkflowsStore();
|
|
1117
|
+
const sourceControlStore = useSourceControlStore();
|
|
1118
|
+
const nodeCreatorStore = useNodeCreatorStore();
|
|
1119
|
+
const settingsStore = useSettingsStore();
|
|
1120
|
+
const credentialsStore = useCredentialsStore();
|
|
1121
|
+
const environmentsStore = useEnvironmentsStore();
|
|
1122
|
+
const externalSecretsStore = useExternalSecretsStore();
|
|
1123
|
+
const rootStore = useRootStore();
|
|
1124
|
+
const executionsStore = useExecutionsStore();
|
|
1125
|
+
const canvasStore = useCanvasStore();
|
|
1126
|
+
const npsSurveyStore = useNpsSurveyStore();
|
|
1127
|
+
const historyStore = useHistoryStore();
|
|
1128
|
+
const projectsStore = useProjectsStore();
|
|
1129
|
+
const usersStore = useUsersStore();
|
|
1130
|
+
const tagsStore = useTagsStore();
|
|
1131
|
+
const pushConnectionStore = usePushConnectionStore();
|
|
1132
|
+
const ndvStore = useNDVStore();
|
|
1133
|
+
const focusPanelStore = useFocusPanelStore();
|
|
1134
|
+
const builderStore = useBuilderStore();
|
|
1135
|
+
const agentRequestStore = useAgentRequestStore();
|
|
1136
|
+
const logsStore = useLogsStore();
|
|
1137
|
+
const aiTemplatesStarterCollectionStore = useAITemplatesStarterCollectionStore();
|
|
1138
|
+
const readyToRunWorkflowsStore = useReadyToRunWorkflowsStore();
|
|
1139
|
+
const experimentalNdvStore = useExperimentalNdvStore();
|
|
1140
|
+
const workflowState = useWorkflowState();
|
|
1141
|
+
provide(WorkflowStateKey, workflowState);
|
|
1142
|
+
const { addBeforeUnloadEventBindings, removeBeforeUnloadEventBindings } = useBeforeUnload({ route });
|
|
1143
|
+
const { registerCustomAction, unregisterCustomAction } = useGlobalLinkActions();
|
|
1144
|
+
const { runWorkflow, runEntireWorkflow, stopCurrentExecution, stopWaitingForWebhook } = useRunWorkflow({ router });
|
|
1145
|
+
const { updateNodePosition, updateNodesPosition, tidyUp, revertUpdateNodePosition, renameNode, revertRenameNode, revertReplaceNodeParameters, setNodeActive, setNodeSelected, toggleNodesDisabled, revertToggleNodeDisabled, toggleNodesPinned, setNodeParameters, deleteNode, deleteNodes, copyNodes, cutNodes, duplicateNodes, revertDeleteNode, revertAddNode, createConnection, revertCreateConnection, deleteConnection, revertDeleteConnection, revalidateNodeInputConnections, revalidateNodeOutputConnections, setNodeActiveByName, clearNodeActive, tryToOpenSubworkflowInNewTab, importWorkflowData, fetchWorkflowDataFromUrl, resetWorkspace, initializeWorkspace, openExecution, editableWorkflow, editableWorkflowObject, lastClickPosition, startChat, addNodesAndConnections, fitView, openWorkflowTemplate, openWorkflowTemplateFromJSON } = useCanvasOperations();
|
|
1146
|
+
const { extractWorkflow } = useWorkflowExtraction();
|
|
1147
|
+
const { applyExecutionData, applyRunDataFromFile } = useExecutionDebugging();
|
|
1148
|
+
const { fetchAndSetParentFolder } = useParentFolder();
|
|
1149
|
+
const { isVSCodeWebview } = useWorkflowFileSync();
|
|
1150
|
+
useKeybindings({ ctrl_alt_o: () => uiStore.openModal(ABOUT_MODAL_KEY) });
|
|
1151
|
+
const canvasRef = useTemplateRef("canvas");
|
|
1152
|
+
const isLoading = ref(true);
|
|
1153
|
+
const readOnlyNotification = ref(null);
|
|
1154
|
+
const isProductionExecutionPreview = ref(false);
|
|
1155
|
+
const isExecutionPreview = ref(false);
|
|
1156
|
+
const canOpenNDV = ref(true);
|
|
1157
|
+
const hideNodeIssues = ref(false);
|
|
1158
|
+
const fallbackNodes = ref([]);
|
|
1159
|
+
const initializedWorkflowId = ref();
|
|
1160
|
+
const workflowId = computed(() => {
|
|
1161
|
+
const name = route.params.name;
|
|
1162
|
+
return Array.isArray(name) ? name[0] : name;
|
|
1163
|
+
});
|
|
1164
|
+
const routeNodeId = computed(() => {
|
|
1165
|
+
const nodeId = route.params.nodeId;
|
|
1166
|
+
return Array.isArray(nodeId) ? nodeId[0] : nodeId;
|
|
1167
|
+
});
|
|
1168
|
+
const isNewWorkflowRoute = computed(() => {
|
|
1169
|
+
return route.query.new === "true";
|
|
1170
|
+
});
|
|
1171
|
+
const isWorkflowRoute = computed(() => !!route?.meta?.nodeView || isDemoRoute.value);
|
|
1172
|
+
const isDemoRoute = computed(() => route.name === VIEWS.DEMO);
|
|
1173
|
+
const isReadOnlyRoute = computed(() => !!route?.meta?.readOnlyCanvas);
|
|
1174
|
+
const isReadOnlyEnvironment = computed(() => {
|
|
1175
|
+
return sourceControlStore.preferences.branchReadOnly;
|
|
1176
|
+
});
|
|
1177
|
+
const isNDVV2 = computed(() => true);
|
|
1178
|
+
const isCanvasReadOnly = computed(() => {
|
|
1179
|
+
return isDemoRoute.value || isReadOnlyEnvironment.value || !(workflowPermissions.value.update ?? projectPermissions.value.workflow.update) || editableWorkflow.value.isArchived || builderStore.streaming;
|
|
1180
|
+
});
|
|
1181
|
+
const showFallbackNodes = computed(() => triggerNodes.value.length === 0);
|
|
1182
|
+
const keyBindingsEnabled = computed(() => {
|
|
1183
|
+
return !ndvStore.activeNode && uiStore.activeModals.length === 0;
|
|
1184
|
+
});
|
|
1185
|
+
const isLogsPanelOpen = computed(() => logsStore.isOpen);
|
|
1186
|
+
async function initializeData() {
|
|
1187
|
+
const loadPromises = (() => {
|
|
1188
|
+
if (settingsStore.isPreviewMode && isDemoRoute.value) return [];
|
|
1189
|
+
const promises = [
|
|
1190
|
+
workflowsStore.fetchActiveWorkflows(),
|
|
1191
|
+
credentialsStore.fetchCredentialTypes(true),
|
|
1192
|
+
loadCredentials()
|
|
1193
|
+
];
|
|
1194
|
+
if (settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.Variables]) promises.push(environmentsStore.fetchAllVariables());
|
|
1195
|
+
if (settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.ExternalSecrets]) promises.push(externalSecretsStore.fetchAllSecrets());
|
|
1196
|
+
return promises;
|
|
1197
|
+
})();
|
|
1198
|
+
if (nodeTypesStore.allNodeTypes.length === 0) loadPromises.push(nodeTypesStore.getNodeTypes());
|
|
1199
|
+
try {
|
|
1200
|
+
await Promise.all(loadPromises);
|
|
1201
|
+
nodeTypesStore.fetchCommunityNodePreviews();
|
|
1202
|
+
} catch (error) {
|
|
1203
|
+
toast.showError(error, i18n.baseText("nodeView.showError.mounted1.title"), i18n.baseText("nodeView.showError.mounted1.message") + ":");
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
async function initializeRoute(force = false) {
|
|
1208
|
+
if (route.query.action === "addEvaluationTrigger") nodeCreatorStore.openNodeCreatorForTriggerNodes(NODE_CREATOR_OPEN_SOURCES.ADD_EVALUATION_TRIGGER_BUTTON);
|
|
1209
|
+
else if (route.query.action === "addEvaluationNode") nodeCreatorStore.openNodeCreatorForActions(EVALUATION_NODE_TYPE, NODE_CREATOR_OPEN_SOURCES.ADD_EVALUATION_NODE_BUTTON);
|
|
1210
|
+
else if (route.query.action === "executeEvaluation") {
|
|
1211
|
+
if (evaluationTriggerNode.value) runEntireWorkflow("node", evaluationTriggerNode.value.name);
|
|
1212
|
+
}
|
|
1213
|
+
const isAlreadyInitialized = !force && initializedWorkflowId.value && initializedWorkflowId.value === workflowId.value;
|
|
1214
|
+
if (uiStore.isBlankRedirect) uiStore.isBlankRedirect = false;
|
|
1215
|
+
else if (route.name === VIEWS.TEMPLATE_IMPORT) {
|
|
1216
|
+
const loadWorkflowFromJSON = route.query.fromJson === "true";
|
|
1217
|
+
const templateId = route.params.id;
|
|
1218
|
+
if (!templateId) return;
|
|
1219
|
+
if (loadWorkflowFromJSON) {
|
|
1220
|
+
const workflow = getSampleWorkflowByTemplateId(templateId.toString());
|
|
1221
|
+
if (!workflow) {
|
|
1222
|
+
toast.showError(new Error(i18n.baseText("nodeView.couldntLoadWorkflow.invalidWorkflowObject")), i18n.baseText("nodeView.couldntImportWorkflow"));
|
|
1223
|
+
await router.replace({ name: VIEWS.NEW_WORKFLOW });
|
|
1224
|
+
return;
|
|
1225
|
+
}
|
|
1226
|
+
await openWorkflowTemplateFromJSON(workflow);
|
|
1227
|
+
} else await openWorkflowTemplate(templateId.toString());
|
|
1228
|
+
} else if (isWorkflowRoute.value) {
|
|
1229
|
+
if (!isAlreadyInitialized) {
|
|
1230
|
+
historyStore.reset();
|
|
1231
|
+
if (isDemoRoute.value) return await initializeWorkspaceForNewWorkflow();
|
|
1232
|
+
if (isNewWorkflowRoute.value) if (!await workflowsStore.checkWorkflowExists(workflowId.value) && route.meta?.nodeView === true) return await initializeWorkspaceForNewWorkflow();
|
|
1233
|
+
else await router.replace({
|
|
1234
|
+
...route,
|
|
1235
|
+
query: {
|
|
1236
|
+
...route.query,
|
|
1237
|
+
new: void 0
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
await initializeWorkspaceForExistingWorkflow(workflowId.value);
|
|
1241
|
+
nextTick(() => {
|
|
1242
|
+
updateNodesIssues();
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
if (route.name === VIEWS.EXECUTION_DEBUG) await initializeDebugMode();
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
async function initializeWorkspaceForNewWorkflow() {
|
|
1249
|
+
resetWorkspace();
|
|
1250
|
+
const parentFolderId = route.query.parentFolderId;
|
|
1251
|
+
await workflowState.getNewWorkflowDataAndMakeShareable(void 0, projectsStore.currentProjectId, parentFolderId);
|
|
1252
|
+
workflowState.setWorkflowId(workflowId.value);
|
|
1253
|
+
await projectsStore.refreshCurrentProject();
|
|
1254
|
+
await fetchAndSetParentFolder(parentFolderId);
|
|
1255
|
+
uiStore.nodeViewInitialized = true;
|
|
1256
|
+
initializedWorkflowId.value = workflowId.value;
|
|
1257
|
+
fitView();
|
|
1258
|
+
}
|
|
1259
|
+
async function initializeWorkspaceForExistingWorkflow(id) {
|
|
1260
|
+
try {
|
|
1261
|
+
const workflowData = await workflowsStore.fetchWorkflow(id);
|
|
1262
|
+
await openWorkflow(workflowData);
|
|
1263
|
+
if (workflowData.parentFolder) workflowsStore.setParentFolder(workflowData.parentFolder);
|
|
1264
|
+
if (workflowData.meta?.onboardingId) trackOpenWorkflowFromOnboardingTemplate();
|
|
1265
|
+
if (workflowData.meta?.templateId?.startsWith("035_template_onboarding")) aiTemplatesStarterCollectionStore.trackUserOpenedWorkflow(workflowData.meta.templateId.split("-").pop() ?? "");
|
|
1266
|
+
if (workflowData.meta?.templateId?.startsWith("37_onboarding_experiments_batch_aug11")) readyToRunWorkflowsStore.trackOpenWorkflow(workflowData.meta.templateId.split("-").pop() ?? "");
|
|
1267
|
+
await projectsStore.setProjectNavActiveIdByWorkflowHomeProject(workflowData.homeProject, workflowData.sharedWithProjects);
|
|
1268
|
+
workflowsStore.fetchLastSuccessfulExecution();
|
|
1269
|
+
} catch (error) {
|
|
1270
|
+
if (error.httpStatusCode === 404) return await router.replace({
|
|
1271
|
+
name: VIEWS.ENTITY_NOT_FOUND,
|
|
1272
|
+
params: { entityType: "workflow" }
|
|
1273
|
+
});
|
|
1274
|
+
if (error.httpStatusCode === 403) return await router.replace({
|
|
1275
|
+
name: VIEWS.ENTITY_UNAUTHORIZED,
|
|
1276
|
+
params: { entityType: "workflow" }
|
|
1277
|
+
});
|
|
1278
|
+
toast.showError(error, i18n.baseText("openWorkflow.workflowNotFoundError"));
|
|
1279
|
+
router.push({ name: VIEWS.NEW_WORKFLOW });
|
|
1280
|
+
} finally {
|
|
1281
|
+
uiStore.nodeViewInitialized = true;
|
|
1282
|
+
initializedWorkflowId.value = workflowId.value;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
function updateNodesIssues() {
|
|
1286
|
+
nodeHelpers.updateNodesInputIssues();
|
|
1287
|
+
nodeHelpers.updateNodesCredentialsIssues();
|
|
1288
|
+
nodeHelpers.updateNodesParameterIssues();
|
|
1289
|
+
}
|
|
1290
|
+
async function openWorkflow(data) {
|
|
1291
|
+
resetWorkspace();
|
|
1292
|
+
documentTitle.setDocumentTitle(data.name, "IDLE");
|
|
1293
|
+
await initializeWorkspace(data);
|
|
1294
|
+
externalHooks.run("workflow.open", {
|
|
1295
|
+
workflowId: data.id,
|
|
1296
|
+
workflowName: data.name
|
|
1297
|
+
});
|
|
1298
|
+
fitView();
|
|
1299
|
+
}
|
|
1300
|
+
function trackOpenWorkflowFromOnboardingTemplate() {
|
|
1301
|
+
telemetry.track(`User opened workflow from onboarding template with ID ${editableWorkflow.value.meta?.onboardingId}`, { workflow_id: workflowId.value });
|
|
1302
|
+
}
|
|
1303
|
+
const triggerNodes = computed(() => {
|
|
1304
|
+
return editableWorkflow.value.nodes.filter((node) => nodeTypesStore.isTriggerNode(node.type));
|
|
1305
|
+
});
|
|
1306
|
+
const containsTriggerNodes = computed(() => triggerNodes.value.length > 0);
|
|
1307
|
+
const allTriggerNodesDisabled = computed(() => {
|
|
1308
|
+
return triggerNodes.value.filter((node) => node.disabled).length === triggerNodes.value.length;
|
|
1309
|
+
});
|
|
1310
|
+
function onTidyUp(event, options) {
|
|
1311
|
+
tidyUp(event, options);
|
|
1312
|
+
}
|
|
1313
|
+
function onExtractWorkflow(nodeIds) {
|
|
1314
|
+
extractWorkflow(nodeIds);
|
|
1315
|
+
}
|
|
1316
|
+
function onUpdateNodesPosition(events) {
|
|
1317
|
+
updateNodesPosition(events, { trackHistory: true });
|
|
1318
|
+
}
|
|
1319
|
+
function onUpdateNodePosition(id, position) {
|
|
1320
|
+
updateNodePosition(id, position, { trackHistory: true });
|
|
1321
|
+
}
|
|
1322
|
+
function onRevertNodePosition({ nodeName, position }) {
|
|
1323
|
+
revertUpdateNodePosition(nodeName, {
|
|
1324
|
+
x: position[0],
|
|
1325
|
+
y: position[1]
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
function onDeleteNode(id) {
|
|
1329
|
+
const matchedFallbackNode = fallbackNodes.value.findIndex((node) => node.id === id);
|
|
1330
|
+
if (matchedFallbackNode >= 0) fallbackNodes.value.splice(matchedFallbackNode, 1);
|
|
1331
|
+
else deleteNode(id, { trackHistory: true });
|
|
1332
|
+
}
|
|
1333
|
+
function onDeleteNodes(ids) {
|
|
1334
|
+
deleteNodes(ids);
|
|
1335
|
+
}
|
|
1336
|
+
function onRevertDeleteNode({ node }) {
|
|
1337
|
+
revertDeleteNode(node);
|
|
1338
|
+
}
|
|
1339
|
+
function onToggleNodeDisabled(id) {
|
|
1340
|
+
if (!checkIfEditingIsAllowed()) return;
|
|
1341
|
+
toggleNodesDisabled([id]);
|
|
1342
|
+
}
|
|
1343
|
+
function onRevertToggleNodeDisabled({ nodeName }) {
|
|
1344
|
+
revertToggleNodeDisabled(nodeName);
|
|
1345
|
+
}
|
|
1346
|
+
function onToggleNodesDisabled(ids) {
|
|
1347
|
+
if (!checkIfEditingIsAllowed()) return;
|
|
1348
|
+
toggleNodesDisabled(ids);
|
|
1349
|
+
}
|
|
1350
|
+
function onClickNode(_id, event) {
|
|
1351
|
+
lastClickPosition.value = [event.x, event.y];
|
|
1352
|
+
closeNodeCreator();
|
|
1353
|
+
}
|
|
1354
|
+
function onSetNodeActivated(id, event) {
|
|
1355
|
+
if (event?.metaKey || event?.ctrlKey) {
|
|
1356
|
+
if (tryToOpenSubworkflowInNewTab(id)) return;
|
|
1357
|
+
}
|
|
1358
|
+
setNodeActive(id, "canvas_default_view");
|
|
1359
|
+
}
|
|
1360
|
+
function onOpenSubWorkflow(id) {
|
|
1361
|
+
tryToOpenSubworkflowInNewTab(id);
|
|
1362
|
+
}
|
|
1363
|
+
function onSetNodeDeactivated() {
|
|
1364
|
+
clearNodeActive();
|
|
1365
|
+
}
|
|
1366
|
+
function onSetNodeSelected(id) {
|
|
1367
|
+
closeNodeCreator();
|
|
1368
|
+
setNodeSelected(id);
|
|
1369
|
+
}
|
|
1370
|
+
async function onCopyNodes(ids) {
|
|
1371
|
+
await copyNodes(ids);
|
|
1372
|
+
toast.showMessage({
|
|
1373
|
+
title: i18n.baseText("generic.copiedToClipboard"),
|
|
1374
|
+
type: "success"
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
async function onClipboardPaste(plainTextData) {
|
|
1378
|
+
if (getNodeViewTab(route) !== MAIN_HEADER_TABS.WORKFLOW || !keyBindingsEnabled.value || !checkIfEditingIsAllowed()) return;
|
|
1379
|
+
let workflowData = null;
|
|
1380
|
+
if (plainTextData.match(VALID_WORKFLOW_IMPORT_URL_REGEX)) {
|
|
1381
|
+
if (await message.confirm(i18n.baseText("nodeView.confirmMessage.onClipboardPasteEvent.message", { interpolate: { plainTextData } }), i18n.baseText("nodeView.confirmMessage.onClipboardPasteEvent.headline"), {
|
|
1382
|
+
type: "warning",
|
|
1383
|
+
confirmButtonText: i18n.baseText("nodeView.confirmMessage.onClipboardPasteEvent.confirmButtonText"),
|
|
1384
|
+
cancelButtonText: i18n.baseText("nodeView.confirmMessage.onClipboardPasteEvent.cancelButtonText")
|
|
1385
|
+
}) !== "confirm") return;
|
|
1386
|
+
workflowData = await fetchWorkflowDataFromUrl(plainTextData);
|
|
1387
|
+
} else workflowData = jsonParse(plainTextData, { fallbackValue: null });
|
|
1388
|
+
if (!workflowData) return;
|
|
1389
|
+
const ids = (await importWorkflowData(workflowData, "paste", {
|
|
1390
|
+
importTags: false,
|
|
1391
|
+
viewport: viewportBoundaries.value
|
|
1392
|
+
})).nodes?.map((node) => node.id) ?? [];
|
|
1393
|
+
canvasRef.value?.ensureNodesAreVisible(ids);
|
|
1394
|
+
}
|
|
1395
|
+
async function onCutNodes(ids) {
|
|
1396
|
+
if (isCanvasReadOnly.value) await copyNodes(ids);
|
|
1397
|
+
else await cutNodes(ids);
|
|
1398
|
+
}
|
|
1399
|
+
async function onDuplicateNodes(ids) {
|
|
1400
|
+
if (!checkIfEditingIsAllowed()) return;
|
|
1401
|
+
const newIds = await duplicateNodes(ids, { viewport: viewportBoundaries.value });
|
|
1402
|
+
canvasRef.value?.ensureNodesAreVisible(newIds);
|
|
1403
|
+
}
|
|
1404
|
+
function onPinNodes(ids, source) {
|
|
1405
|
+
if (!checkIfEditingIsAllowed()) return;
|
|
1406
|
+
toggleNodesPinned(ids, source);
|
|
1407
|
+
}
|
|
1408
|
+
async function onSaveWorkflow() {
|
|
1409
|
+
const workflowIsSaved = !uiStore.stateIsDirty && workflowsStore.isWorkflowSaved[workflowsStore.workflowId];
|
|
1410
|
+
const workflowIsArchived = workflowsStore.workflow.isArchived;
|
|
1411
|
+
if (workflowIsSaved || workflowIsArchived) return;
|
|
1412
|
+
if (await workflowSaving.saveCurrentWorkflow()) canvasEventBus.emit("saved:workflow");
|
|
1413
|
+
}
|
|
1414
|
+
function onContextMenuAction(action, nodeIds) {
|
|
1415
|
+
canvasRef.value?.executeContextMenuAction(action, nodeIds);
|
|
1416
|
+
}
|
|
1417
|
+
function addWorkflowSavedEventBindings() {
|
|
1418
|
+
canvasEventBus.on("saved:workflow", npsSurveyStore.fetchPromptsData);
|
|
1419
|
+
canvasEventBus.on("saved:workflow", onSaveFromWithinNDV);
|
|
1420
|
+
}
|
|
1421
|
+
function removeWorkflowSavedEventBindings() {
|
|
1422
|
+
canvasEventBus.off("saved:workflow", npsSurveyStore.fetchPromptsData);
|
|
1423
|
+
canvasEventBus.off("saved:workflow", onSaveFromWithinNDV);
|
|
1424
|
+
canvasEventBus.off("saved:workflow", onSaveFromWithinExecutionDebug);
|
|
1425
|
+
}
|
|
1426
|
+
async function onSaveFromWithinNDV() {
|
|
1427
|
+
if (ndvStore.activeNodeName) toast.showMessage({
|
|
1428
|
+
title: i18n.baseText("generic.workflowSaved"),
|
|
1429
|
+
type: "success"
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
async function onCreateWorkflow() {
|
|
1433
|
+
await router.push({ name: VIEWS.NEW_WORKFLOW });
|
|
1434
|
+
}
|
|
1435
|
+
function onRenameNode(name) {
|
|
1436
|
+
if (ndvStore.activeNode?.name) renameNode(ndvStore.activeNode.name, name);
|
|
1437
|
+
}
|
|
1438
|
+
async function onOpenRenameNodeModal(id) {
|
|
1439
|
+
const currentName = workflowsStore.getNodeById(id)?.name ?? "";
|
|
1440
|
+
const activeElement = document.activeElement;
|
|
1441
|
+
if (activeElement && shouldIgnoreCanvasShortcut(activeElement)) return;
|
|
1442
|
+
if (!keyBindingsEnabled.value || document.querySelector(".rename-prompt")) return;
|
|
1443
|
+
try {
|
|
1444
|
+
const promptResponsePromise = message.prompt(i18n.baseText("nodeView.prompt.newName") + ":", i18n.baseText("nodeView.prompt.renameNode") + `: ${currentName}`, {
|
|
1445
|
+
customClass: "rename-prompt",
|
|
1446
|
+
confirmButtonText: i18n.baseText("nodeView.prompt.rename"),
|
|
1447
|
+
cancelButtonText: i18n.baseText("nodeView.prompt.cancel"),
|
|
1448
|
+
inputErrorMessage: i18n.baseText("nodeView.prompt.invalidName"),
|
|
1449
|
+
inputValue: currentName,
|
|
1450
|
+
inputValidator: (value) => {
|
|
1451
|
+
if (!value.trim()) return i18n.baseText("nodeView.prompt.invalidName");
|
|
1452
|
+
return true;
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1455
|
+
await nextTick();
|
|
1456
|
+
const nameInput = document.querySelector(".rename-prompt .el-input__inner");
|
|
1457
|
+
nameInput?.focus();
|
|
1458
|
+
nameInput?.select();
|
|
1459
|
+
let shouldSaveAfterRename = false;
|
|
1460
|
+
const handleKeyDown = (e) => {
|
|
1461
|
+
if (e.key === " ") e.stopPropagation();
|
|
1462
|
+
if ((e.ctrlKey || e.metaKey) && e.key === "s") {
|
|
1463
|
+
e.preventDefault();
|
|
1464
|
+
shouldSaveAfterRename = true;
|
|
1465
|
+
nameInput?.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter" }));
|
|
1466
|
+
}
|
|
1467
|
+
};
|
|
1468
|
+
nameInput?.addEventListener("keydown", handleKeyDown);
|
|
1469
|
+
const promptResponse = await promptResponsePromise;
|
|
1470
|
+
nameInput?.removeEventListener("keydown", handleKeyDown);
|
|
1471
|
+
if (promptResponse.action === "confirm") {
|
|
1472
|
+
await renameNode(currentName, promptResponse.value, { trackHistory: true });
|
|
1473
|
+
if (shouldSaveAfterRename) await onSaveWorkflow();
|
|
1474
|
+
}
|
|
1475
|
+
} catch (e) {}
|
|
1476
|
+
}
|
|
1477
|
+
async function onRevertRenameNode({ currentName, newName }) {
|
|
1478
|
+
await revertRenameNode(currentName, newName);
|
|
1479
|
+
}
|
|
1480
|
+
async function onRevertReplaceNodeParameters({ nodeId, currentProperties, newProperties }) {
|
|
1481
|
+
await revertReplaceNodeParameters(nodeId, currentProperties, newProperties);
|
|
1482
|
+
}
|
|
1483
|
+
function onUpdateNodeParameters(id, parameters) {
|
|
1484
|
+
setNodeParameters(id, parameters);
|
|
1485
|
+
}
|
|
1486
|
+
function onUpdateNodeInputs(id) {
|
|
1487
|
+
revalidateNodeInputConnections(id);
|
|
1488
|
+
}
|
|
1489
|
+
function onUpdateNodeOutputs(id) {
|
|
1490
|
+
revalidateNodeOutputConnections(id);
|
|
1491
|
+
}
|
|
1492
|
+
function onClickNodeAdd(source, sourceHandle) {
|
|
1493
|
+
nodeCreatorStore.openNodeCreatorForConnectingNode({
|
|
1494
|
+
connection: {
|
|
1495
|
+
source,
|
|
1496
|
+
sourceHandle
|
|
1497
|
+
},
|
|
1498
|
+
eventSource: NODE_CREATOR_OPEN_SOURCES.PLUS_ENDPOINT
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1501
|
+
async function loadCredentials() {
|
|
1502
|
+
let options;
|
|
1503
|
+
if (workflowId.value && !isNewWorkflowRoute.value) options = { workflowId: workflowId.value };
|
|
1504
|
+
else {
|
|
1505
|
+
const projectId = (typeof route.query?.projectId === "string" ? route.query?.projectId : void 0) ?? projectsStore.personalProject?.id;
|
|
1506
|
+
if (projectId === void 0) throw new Error("Could not find projectId in the query nor could I find the personal project in the project store");
|
|
1507
|
+
options = { projectId };
|
|
1508
|
+
}
|
|
1509
|
+
await credentialsStore.fetchAllCredentialsForWorkflow(options);
|
|
1510
|
+
}
|
|
1511
|
+
function onCreateConnection(connection) {
|
|
1512
|
+
createConnection(connection, { trackHistory: true });
|
|
1513
|
+
}
|
|
1514
|
+
function onRevertCreateConnection({ connection }) {
|
|
1515
|
+
revertCreateConnection(connection);
|
|
1516
|
+
}
|
|
1517
|
+
function onCreateConnectionCancelled(event, position, mouseEvent) {
|
|
1518
|
+
if ((mouseEvent?.target).classList?.contains("clickable")) return;
|
|
1519
|
+
uiStore.lastInteractedWithNodeId = event.nodeId;
|
|
1520
|
+
uiStore.lastInteractedWithNodeHandle = event.handleId;
|
|
1521
|
+
uiStore.lastCancelledConnectionPosition = [position.x, position.y];
|
|
1522
|
+
setTimeout(() => {
|
|
1523
|
+
if (!event.nodeId) return;
|
|
1524
|
+
nodeCreatorStore.openNodeCreatorForConnectingNode({
|
|
1525
|
+
connection: {
|
|
1526
|
+
source: event.nodeId,
|
|
1527
|
+
sourceHandle: event.handleId
|
|
1528
|
+
},
|
|
1529
|
+
eventSource: NODE_CREATOR_OPEN_SOURCES.NODE_CONNECTION_DROP
|
|
1530
|
+
});
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
function onDeleteConnection(connection) {
|
|
1534
|
+
deleteConnection(connection, { trackHistory: true });
|
|
1535
|
+
}
|
|
1536
|
+
function onRevertDeleteConnection({ connection }) {
|
|
1537
|
+
revertDeleteConnection(connection);
|
|
1538
|
+
}
|
|
1539
|
+
async function importWorkflowExact({ workflow: workflowData }) {
|
|
1540
|
+
if (!workflowData.nodes || !workflowData.connections) throw new Error("Invalid workflow object");
|
|
1541
|
+
resetWorkspace();
|
|
1542
|
+
await initializeData();
|
|
1543
|
+
await initializeWorkspace({
|
|
1544
|
+
...workflowData,
|
|
1545
|
+
nodes: getNodesWithNormalizedPosition(workflowData.nodes)
|
|
1546
|
+
});
|
|
1547
|
+
fitView();
|
|
1548
|
+
}
|
|
1549
|
+
async function onImportWorkflowDataEvent(data) {
|
|
1550
|
+
const workflowData = data.data;
|
|
1551
|
+
const trackEvents = typeof data.trackEvents === "boolean" ? data.trackEvents : void 0;
|
|
1552
|
+
const setStateDirty = typeof data.setStateDirty === "boolean" ? data.setStateDirty : void 0;
|
|
1553
|
+
await importWorkflowData(workflowData, "file", {
|
|
1554
|
+
viewport: viewportBoundaries.value,
|
|
1555
|
+
regenerateIds: data.regenerateIds === true || data.regenerateIds === void 0,
|
|
1556
|
+
trackEvents,
|
|
1557
|
+
setStateDirty
|
|
1558
|
+
});
|
|
1559
|
+
await nextTick();
|
|
1560
|
+
fitView();
|
|
1561
|
+
selectNodes(workflowData.nodes?.map((node) => node.id) ?? []);
|
|
1562
|
+
if (data.tidyUp) {
|
|
1563
|
+
const nodesIdsToTidyUp = data.nodesIdsToTidyUp;
|
|
1564
|
+
setTimeout(async () => {
|
|
1565
|
+
canvasEventBus.emit("tidyUp", {
|
|
1566
|
+
source: "import-workflow-data",
|
|
1567
|
+
nodeIdsFilter: nodesIdsToTidyUp,
|
|
1568
|
+
trackEvents
|
|
1569
|
+
});
|
|
1570
|
+
await nextTick();
|
|
1571
|
+
fitView();
|
|
1572
|
+
}, 0);
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
async function onImportWorkflowUrlEvent(data) {
|
|
1576
|
+
const workflowData = await fetchWorkflowDataFromUrl(data.url);
|
|
1577
|
+
if (!workflowData) return;
|
|
1578
|
+
await importWorkflowData(workflowData, "url", { viewport: viewportBoundaries.value });
|
|
1579
|
+
canvasRef.value?.ensureNodesAreVisible(workflowData.nodes?.map((node) => node.id) ?? []);
|
|
1580
|
+
}
|
|
1581
|
+
function addImportEventBindings() {
|
|
1582
|
+
nodeViewEventBus.on("importWorkflowData", onImportWorkflowDataEvent);
|
|
1583
|
+
nodeViewEventBus.on("importWorkflowUrl", onImportWorkflowUrlEvent);
|
|
1584
|
+
nodeViewEventBus.on("openChat", onOpenChat);
|
|
1585
|
+
}
|
|
1586
|
+
function removeImportEventBindings() {
|
|
1587
|
+
nodeViewEventBus.off("importWorkflowData", onImportWorkflowDataEvent);
|
|
1588
|
+
nodeViewEventBus.off("importWorkflowUrl", onImportWorkflowUrlEvent);
|
|
1589
|
+
nodeViewEventBus.off("openChat", onOpenChat);
|
|
1590
|
+
}
|
|
1591
|
+
const nodeCreatorReplaceTargetId = ref(void 0);
|
|
1592
|
+
function onNodeCreatorClose() {
|
|
1593
|
+
nodeCreatorReplaceTargetId.value = void 0;
|
|
1594
|
+
}
|
|
1595
|
+
async function onAddNodesAndConnections({ nodes, connections }, dragAndDrop = false, position) {
|
|
1596
|
+
if (!checkIfEditingIsAllowed()) return;
|
|
1597
|
+
if (nodeCreatorReplaceTargetId.value !== void 0) {
|
|
1598
|
+
uiStore.resetLastInteractedWith();
|
|
1599
|
+
nodes = nodes.map((x) => ({
|
|
1600
|
+
...x,
|
|
1601
|
+
openDetail: false
|
|
1602
|
+
}));
|
|
1603
|
+
}
|
|
1604
|
+
const { addedNodes } = await addNodesAndConnections(nodes, connections, {
|
|
1605
|
+
dragAndDrop,
|
|
1606
|
+
position,
|
|
1607
|
+
viewport: viewportBoundaries.value,
|
|
1608
|
+
telemetry: true,
|
|
1609
|
+
replaceNodeId: nodeCreatorReplaceTargetId.value
|
|
1610
|
+
});
|
|
1611
|
+
if (addedNodes.length > 0) {
|
|
1612
|
+
const lastAddedNodeId = addedNodes[addedNodes.length - 1].id;
|
|
1613
|
+
selectNodes([lastAddedNodeId]);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
async function onRevertAddNode({ node }) {
|
|
1617
|
+
await revertAddNode(node.name);
|
|
1618
|
+
}
|
|
1619
|
+
function onSwitchActiveNode(nodeName) {
|
|
1620
|
+
const node = workflowsStore.getNodeByName(nodeName);
|
|
1621
|
+
if (!node) return;
|
|
1622
|
+
setNodeActiveByName(nodeName, "other");
|
|
1623
|
+
selectNodes([node.id]);
|
|
1624
|
+
}
|
|
1625
|
+
function onOpenSelectiveNodeCreator(node, connectionType, connectionIndex = 0) {
|
|
1626
|
+
nodeCreatorStore.openSelectiveNodeCreator({
|
|
1627
|
+
node,
|
|
1628
|
+
connectionType,
|
|
1629
|
+
connectionIndex
|
|
1630
|
+
});
|
|
1631
|
+
}
|
|
1632
|
+
function onToggleNodeCreator(options) {
|
|
1633
|
+
nodeCreatorStore.setNodeCreatorState(options);
|
|
1634
|
+
if (!options.createNodeActive) {
|
|
1635
|
+
nodeCreatorReplaceTargetId.value = void 0;
|
|
1636
|
+
if (!options.hasAddedNodes) uiStore.resetLastInteractedWith();
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
function onOpenNodeCreatorFromCanvas(source) {
|
|
1640
|
+
onToggleNodeCreator({
|
|
1641
|
+
createNodeActive: true,
|
|
1642
|
+
source
|
|
1643
|
+
});
|
|
1644
|
+
}
|
|
1645
|
+
function onOpenNodeCreatorForTriggerNodes(source) {
|
|
1646
|
+
nodeCreatorStore.openNodeCreatorForTriggerNodes(source);
|
|
1647
|
+
}
|
|
1648
|
+
function onToggleFocusPanel() {
|
|
1649
|
+
focusPanelStore.toggleFocusPanel();
|
|
1650
|
+
telemetry.track(`User ${focusPanelStore.focusPanelActive ? "opened" : "closed"} focus panel`, {
|
|
1651
|
+
source: "canvasKeyboardShortcut",
|
|
1652
|
+
parameters: focusPanelStore.focusedNodeParametersInTelemetryFormat,
|
|
1653
|
+
parameterCount: focusPanelStore.focusedNodeParametersInTelemetryFormat.length
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
function closeNodeCreator() {
|
|
1657
|
+
if (nodeCreatorStore.isCreateNodeActive) nodeCreatorStore.isCreateNodeActive = false;
|
|
1658
|
+
}
|
|
1659
|
+
function onCreateSticky() {
|
|
1660
|
+
onAddNodesAndConnections({
|
|
1661
|
+
nodes: [{ type: STICKY_NODE_TYPE }],
|
|
1662
|
+
connections: []
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1665
|
+
function onClickConnectionAdd(connection) {
|
|
1666
|
+
nodeCreatorStore.openNodeCreatorForConnectingNode({
|
|
1667
|
+
connection,
|
|
1668
|
+
eventSource: NODE_CREATOR_OPEN_SOURCES.NODE_CONNECTION_ACTION
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
function onClickReplaceNode(nodeId) {
|
|
1672
|
+
const node = workflowsStore.getNodeById(nodeId);
|
|
1673
|
+
if (!node) return;
|
|
1674
|
+
const nodeType = nodeTypesStore.getNodeType(node.type);
|
|
1675
|
+
if (!nodeType) return;
|
|
1676
|
+
nodeCreatorReplaceTargetId.value = nodeId;
|
|
1677
|
+
if (isTriggerNode(nodeType)) nodeCreatorStore.openNodeCreatorForTriggerNodes(NODE_CREATOR_OPEN_SOURCES.REPLACE_NODE_ACTION);
|
|
1678
|
+
else {
|
|
1679
|
+
const inputs = getNodeInputs(editableWorkflowObject.value, node, nodeType).map((output) => typeof output === "string" ? output : output.type);
|
|
1680
|
+
const outputs = getNodeOutputs(editableWorkflowObject.value, node, nodeType).map((output) => typeof output === "string" ? output : output.type);
|
|
1681
|
+
if (inputs[0] && outputs[0] && inputs[0] !== outputs[0]) nodeCreatorStore.openNodeCreatorForRegularNodes(NODE_CREATOR_OPEN_SOURCES.REPLACE_NODE_ACTION);
|
|
1682
|
+
else nodeCreatorStore.openSelectiveNodeCreator({
|
|
1683
|
+
connectionType: inputs[0] ?? outputs[0],
|
|
1684
|
+
node: node.name
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
const workflowPermissions = computed(() => {
|
|
1689
|
+
return workflowId.value ? getResourcePermissions(workflowsStore.getWorkflowById(workflowId.value)?.scopes).workflow : {};
|
|
1690
|
+
});
|
|
1691
|
+
const projectPermissions = computed(() => {
|
|
1692
|
+
return getResourcePermissions((route.query?.projectId ? projectsStore.myProjects.find((p) => p.id === route.query.projectId) : projectsStore.currentProject ?? projectsStore.personalProject)?.scopes);
|
|
1693
|
+
});
|
|
1694
|
+
const isStoppingExecution = ref(false);
|
|
1695
|
+
const isWorkflowRunning = computed(() => workflowsStore.isWorkflowRunning);
|
|
1696
|
+
const isExecutionWaitingForWebhook = computed(() => workflowsStore.executionWaitingForWebhook);
|
|
1697
|
+
const isExecutionDisabled = computed(() => {
|
|
1698
|
+
if (containsChatTriggerNodes.value && isOnlyChatTriggerNodeActive.value && !chatTriggerNodePinnedData.value) return true;
|
|
1699
|
+
return !containsTriggerNodes.value || allTriggerNodesDisabled.value;
|
|
1700
|
+
});
|
|
1701
|
+
const isRunWorkflowButtonVisible = computed(() => !isOnlyChatTriggerNodeActive.value || chatTriggerNodePinnedData.value);
|
|
1702
|
+
const isStopExecutionButtonVisible = computed(() => isWorkflowRunning.value && !isExecutionWaitingForWebhook.value);
|
|
1703
|
+
const isStopWaitingForWebhookButtonVisible = computed(() => isWorkflowRunning.value && isExecutionWaitingForWebhook.value);
|
|
1704
|
+
async function onRunWorkflowToNode(id) {
|
|
1705
|
+
const node = workflowsStore.getNodeById(id);
|
|
1706
|
+
if (!node) return;
|
|
1707
|
+
if (needsAgentInput(node) && nodeTypesStore.isToolNode(node.type)) uiStore.openModalWithData({
|
|
1708
|
+
name: FROM_AI_PARAMETERS_MODAL_KEY,
|
|
1709
|
+
data: { nodeName: node.name }
|
|
1710
|
+
});
|
|
1711
|
+
else {
|
|
1712
|
+
trackRunWorkflowToNode(node);
|
|
1713
|
+
agentRequestStore.clearAgentRequests(workflowsStore.workflowId, node.id);
|
|
1714
|
+
runWorkflow({
|
|
1715
|
+
destinationNode: {
|
|
1716
|
+
nodeName: node.name,
|
|
1717
|
+
mode: "inclusive"
|
|
1718
|
+
},
|
|
1719
|
+
source: "Node.executeNode"
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
function copyWebhookUrl(id, webhookType) {
|
|
1724
|
+
const webhookUrl = workflowsStore.getWebhookUrl(id, webhookType);
|
|
1725
|
+
if (!webhookUrl) return;
|
|
1726
|
+
clipboard.copy(webhookUrl);
|
|
1727
|
+
toast.showMessage({
|
|
1728
|
+
title: i18n.baseText("nodeWebhooks.showMessage.title"),
|
|
1729
|
+
type: "success"
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
async function onCopyTestUrl(id) {
|
|
1733
|
+
const node = workflowsStore.getNodeById(id);
|
|
1734
|
+
if (PRODUCTION_ONLY_TRIGGER_NODE_TYPES.includes(node?.type ?? "")) {
|
|
1735
|
+
toast.showMessage({
|
|
1736
|
+
title: i18n.baseText("nodeWebhooks.showMessage.testWebhookUrl"),
|
|
1737
|
+
type: "warning"
|
|
1738
|
+
});
|
|
1739
|
+
return;
|
|
1740
|
+
}
|
|
1741
|
+
copyWebhookUrl(id, "test");
|
|
1742
|
+
}
|
|
1743
|
+
async function onCopyProductionUrl(id) {
|
|
1744
|
+
if (!workflowsStore.workflow.active) {
|
|
1745
|
+
toast.showMessage({
|
|
1746
|
+
title: i18n.baseText("nodeWebhooks.showMessage.not.active"),
|
|
1747
|
+
type: "warning"
|
|
1748
|
+
});
|
|
1749
|
+
return;
|
|
1750
|
+
}
|
|
1751
|
+
copyWebhookUrl(id, "production");
|
|
1752
|
+
}
|
|
1753
|
+
function trackRunWorkflowToNode(node) {
|
|
1754
|
+
const telemetryPayload = {
|
|
1755
|
+
node_type: node.type,
|
|
1756
|
+
workflow_id: workflowsStore.workflowId,
|
|
1757
|
+
source: "canvas",
|
|
1758
|
+
push_ref: ndvStore.pushRef
|
|
1759
|
+
};
|
|
1760
|
+
telemetry.track("User clicked execute node button", telemetryPayload);
|
|
1761
|
+
externalHooks.run("nodeView.onRunNode", telemetryPayload);
|
|
1762
|
+
}
|
|
1763
|
+
async function onOpenExecution(executionId, nodeId) {
|
|
1764
|
+
canvasStore.startLoading();
|
|
1765
|
+
resetWorkspace();
|
|
1766
|
+
await initializeData();
|
|
1767
|
+
const data = await openExecution(executionId, nodeId);
|
|
1768
|
+
if (!data) return;
|
|
1769
|
+
nextTick(() => {
|
|
1770
|
+
updateNodesIssues();
|
|
1771
|
+
});
|
|
1772
|
+
canvasStore.stopLoading();
|
|
1773
|
+
fitView();
|
|
1774
|
+
canvasEventBus.emit("open:execution", data);
|
|
1775
|
+
externalHooks.run("execution.open", {
|
|
1776
|
+
workflowId: data.workflowData.id,
|
|
1777
|
+
workflowName: data.workflowData.name,
|
|
1778
|
+
executionId
|
|
1779
|
+
});
|
|
1780
|
+
telemetry.track("User opened read-only execution", {
|
|
1781
|
+
workflow_id: data.workflowData.id,
|
|
1782
|
+
execution_mode: data.mode,
|
|
1783
|
+
execution_finished: data.finished
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
function onExecutionOpenedWithError(data) {
|
|
1787
|
+
if (!data.finished && data.data?.resultData?.error) {
|
|
1788
|
+
let nodeErrorFound = false;
|
|
1789
|
+
if (data.data.resultData.runData) {
|
|
1790
|
+
const runData = data.data.resultData.runData;
|
|
1791
|
+
errorCheck: for (const nodeName of Object.keys(runData)) for (const taskData of runData[nodeName]) if (taskData.error) {
|
|
1792
|
+
nodeErrorFound = true;
|
|
1793
|
+
break errorCheck;
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
if (!nodeErrorFound && (data.data.resultData.error.stack ?? data.data.resultData.error.message)) {
|
|
1797
|
+
console.error(`Execution ${data.id} error:`);
|
|
1798
|
+
console.error(data.data.resultData.error.stack);
|
|
1799
|
+
toast.showMessage({
|
|
1800
|
+
title: i18n.baseText("nodeView.showError.workflowError"),
|
|
1801
|
+
message: data.data.resultData.error.message,
|
|
1802
|
+
type: "error",
|
|
1803
|
+
duration: 0
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
function onExecutionOpenedWithWaitTill(data) {
|
|
1809
|
+
if (data.waitTill) toast.showMessage({
|
|
1810
|
+
title: i18n.baseText("nodeView.thisExecutionHasntFinishedYet"),
|
|
1811
|
+
message: h(NodeViewUnfinishedWorkflowMessage_default),
|
|
1812
|
+
type: "warning",
|
|
1813
|
+
duration: 0
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
function addExecutionOpenedEventBindings() {
|
|
1817
|
+
canvasEventBus.on("open:execution", onExecutionOpenedWithError);
|
|
1818
|
+
canvasEventBus.on("open:execution", onExecutionOpenedWithWaitTill);
|
|
1819
|
+
}
|
|
1820
|
+
function removeExecutionOpenedEventBindings() {
|
|
1821
|
+
canvasEventBus.off("open:execution", onExecutionOpenedWithError);
|
|
1822
|
+
canvasEventBus.off("open:execution", onExecutionOpenedWithWaitTill);
|
|
1823
|
+
}
|
|
1824
|
+
async function onLoadData(filePath) {
|
|
1825
|
+
console.log("[NodeView] Data file loaded:", filePath);
|
|
1826
|
+
}
|
|
1827
|
+
async function onStopExecution() {
|
|
1828
|
+
isStoppingExecution.value = true;
|
|
1829
|
+
await stopCurrentExecution();
|
|
1830
|
+
isStoppingExecution.value = false;
|
|
1831
|
+
}
|
|
1832
|
+
async function onStopWaitingForWebhook() {
|
|
1833
|
+
await stopWaitingForWebhook();
|
|
1834
|
+
}
|
|
1835
|
+
function onRunWorkflowButtonMouseEnter() {
|
|
1836
|
+
nodeViewEventBus.emit("runWorkflowButton:mouseenter");
|
|
1837
|
+
}
|
|
1838
|
+
function onRunWorkflowButtonMouseLeave() {
|
|
1839
|
+
nodeViewEventBus.emit("runWorkflowButton:mouseleave");
|
|
1840
|
+
}
|
|
1841
|
+
const chatTriggerNode = computed(() => {
|
|
1842
|
+
return editableWorkflow.value.nodes.find((node) => node.type === CHAT_TRIGGER_NODE_TYPE);
|
|
1843
|
+
});
|
|
1844
|
+
const containsChatTriggerNodes = computed(() => {
|
|
1845
|
+
return !isExecutionWaitingForWebhook.value && !!editableWorkflow.value.nodes.find((node) => ["@n8n/n8n-nodes-langchain.manualChatTrigger", "@n8n/n8n-nodes-langchain.chatTrigger"].includes(node.type) && node.disabled !== true);
|
|
1846
|
+
});
|
|
1847
|
+
const isOnlyChatTriggerNodeActive = computed(() => {
|
|
1848
|
+
return triggerNodes.value.every((node) => node.disabled || node.type === "@n8n/n8n-nodes-langchain.chatTrigger");
|
|
1849
|
+
});
|
|
1850
|
+
const chatTriggerNodePinnedData = computed(() => {
|
|
1851
|
+
if (!chatTriggerNode.value) return null;
|
|
1852
|
+
return workflowsStore.pinDataByNodeName(chatTriggerNode.value.name);
|
|
1853
|
+
});
|
|
1854
|
+
function onOpenChat() {
|
|
1855
|
+
startChat("main");
|
|
1856
|
+
}
|
|
1857
|
+
const evaluationTriggerNode = computed(() => {
|
|
1858
|
+
return editableWorkflow.value.nodes.find((node) => node.type === EVALUATION_TRIGGER_NODE_TYPE);
|
|
1859
|
+
});
|
|
1860
|
+
function addUndoRedoEventBindings() {
|
|
1861
|
+
historyBus.on("nodeMove", onRevertNodePosition);
|
|
1862
|
+
historyBus.on("revertAddNode", onRevertAddNode);
|
|
1863
|
+
historyBus.on("revertRemoveNode", onRevertDeleteNode);
|
|
1864
|
+
historyBus.on("revertAddConnection", onRevertCreateConnection);
|
|
1865
|
+
historyBus.on("revertRemoveConnection", onRevertDeleteConnection);
|
|
1866
|
+
historyBus.on("revertRenameNode", onRevertRenameNode);
|
|
1867
|
+
historyBus.on("revertReplaceNodeParameters", onRevertReplaceNodeParameters);
|
|
1868
|
+
historyBus.on("enableNodeToggle", onRevertToggleNodeDisabled);
|
|
1869
|
+
}
|
|
1870
|
+
function removeUndoRedoEventBindings() {
|
|
1871
|
+
historyBus.off("nodeMove", onRevertNodePosition);
|
|
1872
|
+
historyBus.off("revertAddNode", onRevertAddNode);
|
|
1873
|
+
historyBus.off("revertRemoveNode", onRevertDeleteNode);
|
|
1874
|
+
historyBus.off("revertAddConnection", onRevertCreateConnection);
|
|
1875
|
+
historyBus.off("revertRemoveConnection", onRevertDeleteConnection);
|
|
1876
|
+
historyBus.off("revertRenameNode", onRevertRenameNode);
|
|
1877
|
+
historyBus.off("revertReplaceNodeParameters", onRevertReplaceNodeParameters);
|
|
1878
|
+
historyBus.off("enableNodeToggle", onRevertToggleNodeDisabled);
|
|
1879
|
+
}
|
|
1880
|
+
async function onSourceControlPull() {
|
|
1881
|
+
try {
|
|
1882
|
+
await Promise.all([
|
|
1883
|
+
environmentsStore.fetchAllVariables(),
|
|
1884
|
+
tagsStore.fetchAll(),
|
|
1885
|
+
loadCredentials(),
|
|
1886
|
+
projectsStore.getAvailableProjects()
|
|
1887
|
+
]);
|
|
1888
|
+
if (workflowId.value && !uiStore.stateIsDirty) {
|
|
1889
|
+
const workflowData = await workflowsStore.fetchWorkflow(workflowId.value);
|
|
1890
|
+
if (workflowData) {
|
|
1891
|
+
documentTitle.setDocumentTitle(workflowData.name, "IDLE");
|
|
1892
|
+
await openWorkflow(workflowData);
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
} catch (error) {
|
|
1896
|
+
console.error(error);
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
function addSourceControlEventBindings() {
|
|
1900
|
+
sourceControlEventBus.on("pull", onSourceControlPull);
|
|
1901
|
+
}
|
|
1902
|
+
function removeSourceControlEventBindings() {
|
|
1903
|
+
sourceControlEventBus.off("pull", onSourceControlPull);
|
|
1904
|
+
}
|
|
1905
|
+
function addCommandBarEventBindings() {
|
|
1906
|
+
canvasEventBus.on("create:sticky", onCreateSticky);
|
|
1907
|
+
}
|
|
1908
|
+
function removeCommandBarEventBindings() {
|
|
1909
|
+
canvasEventBus.off("create:sticky", onCreateSticky);
|
|
1910
|
+
}
|
|
1911
|
+
function addPostMessageEventBindings() {
|
|
1912
|
+
window.addEventListener("message", onPostMessageReceived);
|
|
1913
|
+
}
|
|
1914
|
+
function removePostMessageEventBindings() {
|
|
1915
|
+
window.removeEventListener("message", onPostMessageReceived);
|
|
1916
|
+
}
|
|
1917
|
+
function emitPostMessageReady() {
|
|
1918
|
+
if (window.parent) window.parent.postMessage(JSON.stringify({
|
|
1919
|
+
command: "n8nReady",
|
|
1920
|
+
version: rootStore.versionCli
|
|
1921
|
+
}), "*");
|
|
1922
|
+
}
|
|
1923
|
+
async function onPostMessageReceived(messageEvent) {
|
|
1924
|
+
if (!messageEvent) return;
|
|
1925
|
+
if (typeof messageEvent.data === "object" && messageEvent.data !== null) {
|
|
1926
|
+
if (messageEvent.data.type === "workflowSync") return;
|
|
1927
|
+
return;
|
|
1928
|
+
}
|
|
1929
|
+
if (typeof messageEvent.data !== "string" || !messageEvent.data?.includes?.("\"command\"")) return;
|
|
1930
|
+
try {
|
|
1931
|
+
const json = JSON.parse(messageEvent.data);
|
|
1932
|
+
if (json && json.command === "openWorkflow") try {
|
|
1933
|
+
if (json.projectId) await projectsStore.fetchAndSetProject(json.projectId);
|
|
1934
|
+
await importWorkflowExact(json);
|
|
1935
|
+
canOpenNDV.value = json.canOpenNDV ?? true;
|
|
1936
|
+
hideNodeIssues.value = json.hideNodeIssues ?? false;
|
|
1937
|
+
isExecutionPreview.value = false;
|
|
1938
|
+
} catch (e) {
|
|
1939
|
+
if (window.top) window.top.postMessage(JSON.stringify({
|
|
1940
|
+
command: "error",
|
|
1941
|
+
message: i18n.baseText("openWorkflow.workflowImportError")
|
|
1942
|
+
}), "*");
|
|
1943
|
+
toast.showError(e, i18n.baseText("openWorkflow.workflowImportError"));
|
|
1944
|
+
}
|
|
1945
|
+
else if (json && json.command === "openExecution") try {
|
|
1946
|
+
if (json.projectId) await projectsStore.fetchAndSetProject(json.projectId);
|
|
1947
|
+
isProductionExecutionPreview.value = json.executionMode !== "manual" && json.executionMode !== "evaluation";
|
|
1948
|
+
await onOpenExecution(json.executionId, json.nodeId);
|
|
1949
|
+
canOpenNDV.value = json.canOpenNDV ?? true;
|
|
1950
|
+
hideNodeIssues.value = json.hideNodeIssues ?? false;
|
|
1951
|
+
isExecutionPreview.value = true;
|
|
1952
|
+
} catch (e) {
|
|
1953
|
+
if (window.top) window.top.postMessage(JSON.stringify({
|
|
1954
|
+
command: "error",
|
|
1955
|
+
message: i18n.baseText("nodeView.showError.openExecution.title")
|
|
1956
|
+
}), "*");
|
|
1957
|
+
toast.showMessage({
|
|
1958
|
+
title: i18n.baseText("nodeView.showError.openExecution.title"),
|
|
1959
|
+
message: e.message,
|
|
1960
|
+
type: "error"
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
else if (json?.command === "setActiveExecution") executionsStore.activeExecution = await executionsStore.fetchExecution(json.executionId);
|
|
1964
|
+
} catch (e) {}
|
|
1965
|
+
}
|
|
1966
|
+
function checkIfEditingIsAllowed() {
|
|
1967
|
+
if (!initializedWorkflowId.value) return true;
|
|
1968
|
+
if (readOnlyNotification.value?.visible) return false;
|
|
1969
|
+
if (!(workflowPermissions.value.update ?? projectPermissions.value.workflow.update)) return false;
|
|
1970
|
+
if (isReadOnlyRoute.value || isReadOnlyEnvironment.value) {
|
|
1971
|
+
const messageContext = isReadOnlyRoute.value ? "executions" : "workflows";
|
|
1972
|
+
readOnlyNotification.value = toast.showMessage({
|
|
1973
|
+
title: i18n.baseText(isReadOnlyEnvironment.value ? `readOnlyEnv.showMessage.${messageContext}.title` : "readOnly.showMessage.executions.title"),
|
|
1974
|
+
message: i18n.baseText(isReadOnlyEnvironment.value ? `readOnlyEnv.showMessage.${messageContext}.message` : "readOnly.showMessage.executions.message"),
|
|
1975
|
+
type: "info"
|
|
1976
|
+
});
|
|
1977
|
+
return false;
|
|
1978
|
+
}
|
|
1979
|
+
return true;
|
|
1980
|
+
}
|
|
1981
|
+
function checkIfRouteIsAllowed() {
|
|
1982
|
+
if (isReadOnlyEnvironment.value && [VIEWS.NEW_WORKFLOW, VIEWS.TEMPLATE_IMPORT].find((view) => view === route.name)) nextTick(async () => {
|
|
1983
|
+
resetWorkspace();
|
|
1984
|
+
uiStore.stateIsDirty = false;
|
|
1985
|
+
await router.replace({ name: VIEWS.HOMEPAGE });
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
async function initializeDebugMode() {
|
|
1989
|
+
documentTitle.setDocumentTitle(workflowsStore.workflowName, "DEBUG");
|
|
1990
|
+
if (!workflowsStore.isInDebugMode) {
|
|
1991
|
+
await applyExecutionData(route.params.executionId);
|
|
1992
|
+
workflowsStore.isInDebugMode = true;
|
|
1993
|
+
}
|
|
1994
|
+
canvasEventBus.on("saved:workflow", onSaveFromWithinExecutionDebug);
|
|
1995
|
+
}
|
|
1996
|
+
async function onSaveFromWithinExecutionDebug() {
|
|
1997
|
+
if (route.name !== VIEWS.EXECUTION_DEBUG) return;
|
|
1998
|
+
await router.replace({
|
|
1999
|
+
name: VIEWS.WORKFLOW,
|
|
2000
|
+
params: { name: workflowId.value }
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
const viewportTransform = ref({
|
|
2004
|
+
x: 0,
|
|
2005
|
+
y: 0,
|
|
2006
|
+
zoom: 1
|
|
2007
|
+
});
|
|
2008
|
+
const viewportDimensions = ref({
|
|
2009
|
+
width: 0,
|
|
2010
|
+
height: 0
|
|
2011
|
+
});
|
|
2012
|
+
const viewportBoundaries = computed(() => getBounds(viewportTransform.value, viewportDimensions.value));
|
|
2013
|
+
function onViewportChange(viewport, dimensions) {
|
|
2014
|
+
viewportTransform.value = viewport;
|
|
2015
|
+
viewportDimensions.value = dimensions;
|
|
2016
|
+
uiStore.nodeViewOffsetPosition = [viewport.x, viewport.y];
|
|
2017
|
+
}
|
|
2018
|
+
function selectNodes(ids) {
|
|
2019
|
+
setTimeout(() => canvasEventBus.emit("nodes:select", { ids }));
|
|
2020
|
+
}
|
|
2021
|
+
function onClickPane(position) {
|
|
2022
|
+
lastClickPosition.value = [position.x, position.y];
|
|
2023
|
+
onSetNodeSelected();
|
|
2024
|
+
}
|
|
2025
|
+
function onSelectionEnd(position) {
|
|
2026
|
+
lastClickPosition.value = [position.x, position.y];
|
|
2027
|
+
}
|
|
2028
|
+
async function onDragAndDrop(position, event) {
|
|
2029
|
+
if (!event.dataTransfer) return;
|
|
2030
|
+
const dropData = jsonParse(event.dataTransfer.getData(DRAG_EVENT_DATA_KEY));
|
|
2031
|
+
if (dropData) {
|
|
2032
|
+
await onAddNodesAndConnections(dropData, true, [position.x, position.y]);
|
|
2033
|
+
onToggleNodeCreator({
|
|
2034
|
+
createNodeActive: false,
|
|
2035
|
+
hasAddedNodes: true
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
function registerCustomActions() {
|
|
2040
|
+
registerCustomAction({
|
|
2041
|
+
key: "openNodeDetail",
|
|
2042
|
+
action: ({ node }) => {
|
|
2043
|
+
setNodeActiveByName(node, "other");
|
|
2044
|
+
}
|
|
2045
|
+
});
|
|
2046
|
+
registerCustomAction({
|
|
2047
|
+
key: "openSelectiveNodeCreator",
|
|
2048
|
+
action: ({ creatorview: creatorView, connectiontype: connectionType, node }) => {
|
|
2049
|
+
nodeCreatorStore.openSelectiveNodeCreator({
|
|
2050
|
+
node,
|
|
2051
|
+
connectionType,
|
|
2052
|
+
creatorView
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
});
|
|
2056
|
+
registerCustomAction({
|
|
2057
|
+
key: "showNodeCreator",
|
|
2058
|
+
action: () => {
|
|
2059
|
+
ndvStore.unsetActiveNodeName();
|
|
2060
|
+
nextTick(() => {
|
|
2061
|
+
onOpenNodeCreatorForTriggerNodes(NODE_CREATOR_OPEN_SOURCES.TAB);
|
|
2062
|
+
});
|
|
2063
|
+
}
|
|
2064
|
+
});
|
|
2065
|
+
}
|
|
2066
|
+
function unregisterCustomActions() {
|
|
2067
|
+
unregisterCustomAction("openNodeDetail");
|
|
2068
|
+
unregisterCustomAction("openSelectiveNodeCreator");
|
|
2069
|
+
unregisterCustomAction("showNodeCreator");
|
|
2070
|
+
}
|
|
2071
|
+
function showAddFirstStepIfEnabled() {
|
|
2072
|
+
if (uiStore.addFirstStepOnLoad) {
|
|
2073
|
+
onOpenNodeCreatorForTriggerNodes(NODE_CREATOR_OPEN_SOURCES.TRIGGER_PLACEHOLDER_BUTTON);
|
|
2074
|
+
uiStore.addFirstStepOnLoad = false;
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
function updateNodeRoute(nodeId) {
|
|
2078
|
+
const nodeUi = workflowsStore.findNodeByPartialId(nodeId);
|
|
2079
|
+
if (nodeUi) setNodeActive(nodeUi.id, "other");
|
|
2080
|
+
else {
|
|
2081
|
+
toast.showToast({
|
|
2082
|
+
title: i18n.baseText("nodeView.showMessage.ndvUrl.missingNodes.title"),
|
|
2083
|
+
message: i18n.baseText("nodeView.showMessage.ndvUrl.missingNodes.content"),
|
|
2084
|
+
type: "warning"
|
|
2085
|
+
});
|
|
2086
|
+
router.replace({
|
|
2087
|
+
name: route.name,
|
|
2088
|
+
params: { name: workflowId.value },
|
|
2089
|
+
query: route.query
|
|
2090
|
+
});
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
watch([() => route.name, () => route.params.name], async ([newRouteName, newWorkflowId], [oldRouteName, oldWorkflowId]) => {
|
|
2094
|
+
await initializeRoute(newRouteName === VIEWS.NEW_WORKFLOW && oldRouteName === VIEWS.WORKFLOW || newRouteName === VIEWS.WORKFLOW && oldRouteName === VIEWS.NEW_WORKFLOW || newWorkflowId !== oldWorkflowId);
|
|
2095
|
+
});
|
|
2096
|
+
watch(() => {
|
|
2097
|
+
return isLoading.value || isCanvasReadOnly.value || editableWorkflow.value.nodes.length !== 0;
|
|
2098
|
+
}, (isReadOnlyOrLoading) => {
|
|
2099
|
+
if (isReadOnlyOrLoading) {
|
|
2100
|
+
fallbackNodes.value = [];
|
|
2101
|
+
return;
|
|
2102
|
+
}
|
|
2103
|
+
const addNodesItem = {
|
|
2104
|
+
id: CanvasNodeRenderType.AddNodes,
|
|
2105
|
+
name: CanvasNodeRenderType.AddNodes,
|
|
2106
|
+
type: CanvasNodeRenderType.AddNodes,
|
|
2107
|
+
typeVersion: 1,
|
|
2108
|
+
position: [0, 0],
|
|
2109
|
+
parameters: {}
|
|
2110
|
+
};
|
|
2111
|
+
const choicePromptItem = {
|
|
2112
|
+
id: CanvasNodeRenderType.ChoicePrompt,
|
|
2113
|
+
name: CanvasNodeRenderType.ChoicePrompt,
|
|
2114
|
+
type: CanvasNodeRenderType.ChoicePrompt,
|
|
2115
|
+
typeVersion: 1,
|
|
2116
|
+
position: [0, 0],
|
|
2117
|
+
parameters: {},
|
|
2118
|
+
draggable: false
|
|
2119
|
+
};
|
|
2120
|
+
fallbackNodes.value = builderStore.isAIBuilderEnabled ? [choicePromptItem] : [addNodesItem];
|
|
2121
|
+
});
|
|
2122
|
+
watch(() => route.params.nodeId, async (newId) => {
|
|
2123
|
+
if (typeof newId !== "string" || newId === "") ndvStore.unsetActiveNodeName();
|
|
2124
|
+
else updateNodeRoute(newId);
|
|
2125
|
+
});
|
|
2126
|
+
watch(() => ndvStore.activeNode, async (val) => {
|
|
2127
|
+
if (![VIEWS.WORKFLOW].includes(String(route.name))) return;
|
|
2128
|
+
const nodeId = val?.id ? workflowsStore.getPartialIdForNode(val?.id) : "";
|
|
2129
|
+
if (nodeId !== route.params.nodeId) await router.replace({
|
|
2130
|
+
name: route.name,
|
|
2131
|
+
params: {
|
|
2132
|
+
name: workflowId.value,
|
|
2133
|
+
nodeId
|
|
2134
|
+
},
|
|
2135
|
+
query: route.query
|
|
2136
|
+
});
|
|
2137
|
+
});
|
|
2138
|
+
onBeforeRouteLeave(async (to, from, next) => {
|
|
2139
|
+
if (focusPanelStore.focusPanelActive) focusPanelStore.closeFocusPanel();
|
|
2140
|
+
if (isReadOnlyEnvironment.value) {
|
|
2141
|
+
next();
|
|
2142
|
+
return;
|
|
2143
|
+
}
|
|
2144
|
+
const toNodeViewTab = getNodeViewTab(to);
|
|
2145
|
+
const isNavigatingBetweenWorkflows = [VIEWS.WORKFLOW, VIEWS.NEW_WORKFLOW].includes(from.name) && [VIEWS.WORKFLOW, VIEWS.NEW_WORKFLOW].includes(to.name) && from.params.name !== to.params.name;
|
|
2146
|
+
if ((toNodeViewTab === MAIN_HEADER_TABS.EXECUTIONS || from.name === VIEWS.TEMPLATE_IMPORT || toNodeViewTab === MAIN_HEADER_TABS.WORKFLOW && from.name === VIEWS.EXECUTION_DEBUG) && !isNavigatingBetweenWorkflows) {
|
|
2147
|
+
next();
|
|
2148
|
+
return;
|
|
2149
|
+
}
|
|
2150
|
+
await useWorkflowSaving({ router }).promptSaveUnsavedWorkflowChanges(next, { async confirm() {
|
|
2151
|
+
if (from.name === VIEWS.NEW_WORKFLOW) {
|
|
2152
|
+
const savedWorkflowId = workflowsStore.workflowId;
|
|
2153
|
+
await router.replace({
|
|
2154
|
+
name: VIEWS.WORKFLOW,
|
|
2155
|
+
params: { name: savedWorkflowId }
|
|
2156
|
+
});
|
|
2157
|
+
await router.push(to);
|
|
2158
|
+
return false;
|
|
2159
|
+
}
|
|
2160
|
+
workflowState.setWorkflowId("");
|
|
2161
|
+
return true;
|
|
2162
|
+
} });
|
|
2163
|
+
});
|
|
2164
|
+
onBeforeMount(() => {
|
|
2165
|
+
if (!isDemoRoute.value) pushConnectionStore.pushConnect();
|
|
2166
|
+
addPostMessageEventBindings();
|
|
2167
|
+
});
|
|
2168
|
+
onMounted(() => {
|
|
2169
|
+
canvasStore.startLoading();
|
|
2170
|
+
documentTitle.reset();
|
|
2171
|
+
resetWorkspace();
|
|
2172
|
+
initializeData().then(() => {
|
|
2173
|
+
initializeRoute().then(() => {
|
|
2174
|
+
toast.showNotificationForViews([VIEWS.WORKFLOW, VIEWS.NEW_WORKFLOW]);
|
|
2175
|
+
if (route.query.settings) {
|
|
2176
|
+
uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);
|
|
2177
|
+
router.replace({ query: { settings: void 0 } });
|
|
2178
|
+
}
|
|
2179
|
+
}).finally(() => {
|
|
2180
|
+
isLoading.value = false;
|
|
2181
|
+
canvasStore.stopLoading();
|
|
2182
|
+
externalHooks.run("nodeView.mount").catch(() => {});
|
|
2183
|
+
setTimeout(() => {
|
|
2184
|
+
if (routeNodeId.value) updateNodeRoute(routeNodeId.value);
|
|
2185
|
+
}, 500);
|
|
2186
|
+
emitPostMessageReady();
|
|
2187
|
+
const { setupAutoSync } = useWorkflowFileSync();
|
|
2188
|
+
setupAutoSync();
|
|
2189
|
+
});
|
|
2190
|
+
usersStore.showPersonalizationSurvey();
|
|
2191
|
+
checkIfRouteIsAllowed();
|
|
2192
|
+
});
|
|
2193
|
+
addSourceControlEventBindings();
|
|
2194
|
+
addWorkflowSavedEventBindings();
|
|
2195
|
+
addBeforeUnloadEventBindings();
|
|
2196
|
+
addImportEventBindings();
|
|
2197
|
+
addExecutionOpenedEventBindings();
|
|
2198
|
+
addCommandBarEventBindings();
|
|
2199
|
+
registerCustomActions();
|
|
2200
|
+
});
|
|
2201
|
+
onActivated(() => {
|
|
2202
|
+
addUndoRedoEventBindings();
|
|
2203
|
+
showAddFirstStepIfEnabled();
|
|
2204
|
+
});
|
|
2205
|
+
onDeactivated(() => {
|
|
2206
|
+
uiStore.closeModal(WORKFLOW_SETTINGS_MODAL_KEY);
|
|
2207
|
+
removeUndoRedoEventBindings();
|
|
2208
|
+
toast.clearAllStickyNotifications();
|
|
2209
|
+
});
|
|
2210
|
+
onBeforeUnmount(() => {
|
|
2211
|
+
removeSourceControlEventBindings();
|
|
2212
|
+
removePostMessageEventBindings();
|
|
2213
|
+
removeWorkflowSavedEventBindings();
|
|
2214
|
+
removeBeforeUnloadEventBindings();
|
|
2215
|
+
removeImportEventBindings();
|
|
2216
|
+
removeExecutionOpenedEventBindings();
|
|
2217
|
+
removeCommandBarEventBindings();
|
|
2218
|
+
unregisterCustomActions();
|
|
2219
|
+
if (!isDemoRoute.value) pushConnectionStore.pushDisconnect();
|
|
2220
|
+
});
|
|
2221
|
+
return (_ctx, _cache) => {
|
|
2222
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref($style).wrapper) }, [unref(editableWorkflow) && unref(editableWorkflowObject) && !isLoading.value ? (openBlock(), createBlock(WorkflowCanvas_default, {
|
|
2223
|
+
key: 0,
|
|
2224
|
+
id: unref(editableWorkflow).id,
|
|
2225
|
+
ref: "canvas",
|
|
2226
|
+
workflow: unref(editableWorkflow),
|
|
2227
|
+
"workflow-object": unref(editableWorkflowObject),
|
|
2228
|
+
"fallback-nodes": fallbackNodes.value,
|
|
2229
|
+
"show-fallback-nodes": showFallbackNodes.value,
|
|
2230
|
+
"event-bus": unref(canvasEventBus),
|
|
2231
|
+
"read-only": isCanvasReadOnly.value,
|
|
2232
|
+
executing: isWorkflowRunning.value,
|
|
2233
|
+
"key-bindings": keyBindingsEnabled.value,
|
|
2234
|
+
"suppress-interaction": unref(experimentalNdvStore).isMapperOpen,
|
|
2235
|
+
"onUpdate:nodes:position": onUpdateNodesPosition,
|
|
2236
|
+
"onUpdate:node:position": onUpdateNodePosition,
|
|
2237
|
+
"onUpdate:node:activated": onSetNodeActivated,
|
|
2238
|
+
"onUpdate:node:deactivated": onSetNodeDeactivated,
|
|
2239
|
+
"onUpdate:node:selected": onSetNodeSelected,
|
|
2240
|
+
"onUpdate:node:enabled": onToggleNodeDisabled,
|
|
2241
|
+
"onUpdate:node:name": onOpenRenameNodeModal,
|
|
2242
|
+
"onUpdate:node:parameters": onUpdateNodeParameters,
|
|
2243
|
+
"onUpdate:node:inputs": onUpdateNodeInputs,
|
|
2244
|
+
"onUpdate:node:outputs": onUpdateNodeOutputs,
|
|
2245
|
+
"onUpdate:logsOpen": _cache[3] || (_cache[3] = ($event) => unref(logsStore).toggleOpen($event)),
|
|
2246
|
+
"onUpdate:logs:inputOpen": unref(logsStore).toggleInputOpen,
|
|
2247
|
+
"onUpdate:logs:outputOpen": unref(logsStore).toggleOutputOpen,
|
|
2248
|
+
"onUpdate:hasRangeSelection": unref(canvasStore).setHasRangeSelection,
|
|
2249
|
+
"onOpen:subWorkflow": onOpenSubWorkflow,
|
|
2250
|
+
"onClick:node": onClickNode,
|
|
2251
|
+
"onClick:node:add": onClickNodeAdd,
|
|
2252
|
+
"onRun:node": onRunWorkflowToNode,
|
|
2253
|
+
"onCopy:production:url": onCopyProductionUrl,
|
|
2254
|
+
"onCopy:test:url": onCopyTestUrl,
|
|
2255
|
+
"onDelete:node": onDeleteNode,
|
|
2256
|
+
"onCreate:connection": onCreateConnection,
|
|
2257
|
+
"onCreate:connection:cancelled": onCreateConnectionCancelled,
|
|
2258
|
+
"onDelete:connection": onDeleteConnection,
|
|
2259
|
+
"onClick:connection:add": onClickConnectionAdd,
|
|
2260
|
+
"onClick:pane": onClickPane,
|
|
2261
|
+
"onCreate:node": onOpenNodeCreatorFromCanvas,
|
|
2262
|
+
"onCreate:sticky": onCreateSticky,
|
|
2263
|
+
"onDelete:nodes": onDeleteNodes,
|
|
2264
|
+
"onUpdate:nodes:enabled": onToggleNodesDisabled,
|
|
2265
|
+
"onUpdate:nodes:pin": onPinNodes,
|
|
2266
|
+
"onDuplicate:nodes": onDuplicateNodes,
|
|
2267
|
+
"onCopy:nodes": onCopyNodes,
|
|
2268
|
+
"onCut:nodes": onCutNodes,
|
|
2269
|
+
"onReplace:node": onClickReplaceNode,
|
|
2270
|
+
"onRun:workflow": _cache[4] || (_cache[4] = ($event) => unref(runEntireWorkflow)("main")),
|
|
2271
|
+
"onSave:workflow": onSaveWorkflow,
|
|
2272
|
+
"onCreate:workflow": onCreateWorkflow,
|
|
2273
|
+
"onViewport:change": onViewportChange,
|
|
2274
|
+
"onSelection:end": onSelectionEnd,
|
|
2275
|
+
onDragAndDrop,
|
|
2276
|
+
onTidyUp,
|
|
2277
|
+
"onToggle:focusPanel": onToggleFocusPanel,
|
|
2278
|
+
onExtractWorkflow,
|
|
2279
|
+
onStartChat: _cache[5] || (_cache[5] = ($event) => unref(startChat)())
|
|
2280
|
+
}, {
|
|
2281
|
+
default: withCtx(() => [
|
|
2282
|
+
!isCanvasReadOnly.value ? (openBlock(), createBlock(Suspense, { key: 0 }, {
|
|
2283
|
+
default: withCtx(() => [createVNode(unref(LazySetupWorkflowCredentialsButton), { class: normalizeClass(unref($style).setupCredentialsButtonWrapper) }, null, 8, ["class"])]),
|
|
2284
|
+
_: 1
|
|
2285
|
+
})) : createCommentVNode("", true),
|
|
2286
|
+
!isCanvasReadOnly.value ? (openBlock(), createElementBlock("div", {
|
|
2287
|
+
key: 1,
|
|
2288
|
+
class: normalizeClass(unref($style).executionButtons)
|
|
2289
|
+
}, [
|
|
2290
|
+
isRunWorkflowButtonVisible.value ? (openBlock(), createBlock(CanvasRunWorkflowButton_default, {
|
|
2291
|
+
key: 0,
|
|
2292
|
+
"waiting-for-webhook": isExecutionWaitingForWebhook.value,
|
|
2293
|
+
disabled: isExecutionDisabled.value,
|
|
2294
|
+
executing: isWorkflowRunning.value,
|
|
2295
|
+
"trigger-nodes": triggerNodes.value,
|
|
2296
|
+
"get-node-type": unref(nodeTypesStore).getNodeType,
|
|
2297
|
+
"selected-trigger-node-name": unref(workflowsStore).selectedTriggerNodeName,
|
|
2298
|
+
onMouseenter: onRunWorkflowButtonMouseEnter,
|
|
2299
|
+
onMouseleave: onRunWorkflowButtonMouseLeave,
|
|
2300
|
+
onExecute: _cache[0] || (_cache[0] = ($event) => unref(runEntireWorkflow)("main")),
|
|
2301
|
+
onSelectTriggerNode: unref(workflowsStore).setSelectedTriggerNodeName
|
|
2302
|
+
}, null, 8, [
|
|
2303
|
+
"waiting-for-webhook",
|
|
2304
|
+
"disabled",
|
|
2305
|
+
"executing",
|
|
2306
|
+
"trigger-nodes",
|
|
2307
|
+
"get-node-type",
|
|
2308
|
+
"selected-trigger-node-name",
|
|
2309
|
+
"onSelectTriggerNode"
|
|
2310
|
+
])) : createCommentVNode("", true),
|
|
2311
|
+
unref(isVSCodeWebview)() && isRunWorkflowButtonVisible.value ? (openBlock(), createBlock(CanvasLoadDataButton_default, {
|
|
2312
|
+
key: 1,
|
|
2313
|
+
size: "large",
|
|
2314
|
+
disabled: isExecutionDisabled.value,
|
|
2315
|
+
onLoad: onLoadData
|
|
2316
|
+
}, null, 8, ["disabled"])) : createCommentVNode("", true),
|
|
2317
|
+
containsChatTriggerNodes.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [isLogsPanelOpen.value ? (openBlock(), createBlock(CanvasChatButton_default, {
|
|
2318
|
+
key: 0,
|
|
2319
|
+
type: "tertiary",
|
|
2320
|
+
label: unref(i18n).baseText("chat.hide"),
|
|
2321
|
+
class: normalizeClass(unref($style).chatButton),
|
|
2322
|
+
onClick: _cache[1] || (_cache[1] = ($event) => unref(logsStore).toggleOpen(false))
|
|
2323
|
+
}, null, 8, ["label", "class"])) : (openBlock(), createBlock(KeyboardShortcutTooltip_default, {
|
|
2324
|
+
key: 1,
|
|
2325
|
+
label: unref(i18n).baseText("chat.open"),
|
|
2326
|
+
shortcut: { keys: ["c"] }
|
|
2327
|
+
}, {
|
|
2328
|
+
default: withCtx(() => [createVNode(CanvasChatButton_default, {
|
|
2329
|
+
type: isRunWorkflowButtonVisible.value ? "secondary" : "primary",
|
|
2330
|
+
label: unref(i18n).baseText("chat.open"),
|
|
2331
|
+
class: normalizeClass(unref($style).chatButton),
|
|
2332
|
+
onClick: onOpenChat
|
|
2333
|
+
}, null, 8, [
|
|
2334
|
+
"type",
|
|
2335
|
+
"label",
|
|
2336
|
+
"class"
|
|
2337
|
+
])]),
|
|
2338
|
+
_: 1
|
|
2339
|
+
}, 8, ["label"]))], 64)) : createCommentVNode("", true),
|
|
2340
|
+
isStopExecutionButtonVisible.value ? (openBlock(), createBlock(CanvasStopCurrentExecutionButton_default, {
|
|
2341
|
+
key: 3,
|
|
2342
|
+
stopping: isStoppingExecution.value,
|
|
2343
|
+
onClick: onStopExecution
|
|
2344
|
+
}, null, 8, ["stopping"])) : createCommentVNode("", true),
|
|
2345
|
+
isStopWaitingForWebhookButtonVisible.value ? (openBlock(), createBlock(CanvasStopWaitingForWebhookButton_default, {
|
|
2346
|
+
key: 4,
|
|
2347
|
+
onClick: onStopWaitingForWebhook
|
|
2348
|
+
})) : createCommentVNode("", true)
|
|
2349
|
+
], 2)) : createCommentVNode("", true),
|
|
2350
|
+
isReadOnlyEnvironment.value ? (openBlock(), createBlock(unref(N8nCallout_default), {
|
|
2351
|
+
key: 2,
|
|
2352
|
+
theme: "warning",
|
|
2353
|
+
icon: "lock",
|
|
2354
|
+
class: normalizeClass(unref($style).readOnlyEnvironmentNotification)
|
|
2355
|
+
}, {
|
|
2356
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i18n).baseText("readOnlyEnv.cantEditOrRun")), 1)]),
|
|
2357
|
+
_: 1
|
|
2358
|
+
}, 8, ["class"])) : createCommentVNode("", true),
|
|
2359
|
+
unref(builderStore).streaming ? (openBlock(), createBlock(unref(CanvasThinkingPill_default), {
|
|
2360
|
+
key: 3,
|
|
2361
|
+
class: normalizeClass(unref($style).thinkingPill),
|
|
2362
|
+
"show-stop": "",
|
|
2363
|
+
onStop: unref(builderStore).abortStreaming
|
|
2364
|
+
}, null, 8, ["class", "onStop"])) : createCommentVNode("", true),
|
|
2365
|
+
(openBlock(), createBlock(Suspense, null, {
|
|
2366
|
+
default: withCtx(() => [!isCanvasReadOnly.value ? (openBlock(), createBlock(unref(LazyNodeCreation), {
|
|
2367
|
+
key: 0,
|
|
2368
|
+
"create-node-active": unref(nodeCreatorStore).isCreateNodeActive,
|
|
2369
|
+
"node-view-scale": viewportTransform.value.zoom,
|
|
2370
|
+
"focus-panel-active": unref(focusPanelStore).focusPanelActive,
|
|
2371
|
+
onToggleNodeCreator,
|
|
2372
|
+
onAddNodes: onAddNodesAndConnections,
|
|
2373
|
+
onClose: onNodeCreatorClose
|
|
2374
|
+
}, null, 8, [
|
|
2375
|
+
"create-node-active",
|
|
2376
|
+
"node-view-scale",
|
|
2377
|
+
"focus-panel-active"
|
|
2378
|
+
])) : createCommentVNode("", true)]),
|
|
2379
|
+
_: 1
|
|
2380
|
+
})),
|
|
2381
|
+
(openBlock(), createBlock(Suspense, null, {
|
|
2382
|
+
default: withCtx(() => [!isNDVV2.value ? (openBlock(), createBlock(unref(LazyNodeDetailsView), {
|
|
2383
|
+
key: 0,
|
|
2384
|
+
"workflow-object": unref(editableWorkflowObject),
|
|
2385
|
+
"read-only": isCanvasReadOnly.value,
|
|
2386
|
+
"is-production-execution-preview": isProductionExecutionPreview.value,
|
|
2387
|
+
renaming: false,
|
|
2388
|
+
onValueChanged: _cache[2] || (_cache[2] = ($event) => onRenameNode($event.value)),
|
|
2389
|
+
onStopExecution,
|
|
2390
|
+
onSwitchSelectedNode: onSwitchActiveNode,
|
|
2391
|
+
onOpenConnectionNodeCreator: onOpenSelectiveNodeCreator,
|
|
2392
|
+
onSaveKeyboardShortcut: onSaveWorkflow
|
|
2393
|
+
}, null, 8, [
|
|
2394
|
+
"workflow-object",
|
|
2395
|
+
"read-only",
|
|
2396
|
+
"is-production-execution-preview"
|
|
2397
|
+
])) : createCommentVNode("", true)]),
|
|
2398
|
+
_: 1
|
|
2399
|
+
})),
|
|
2400
|
+
(openBlock(), createBlock(Suspense, null, {
|
|
2401
|
+
default: withCtx(() => [isNDVV2.value ? (openBlock(), createBlock(unref(LazyNodeDetailsViewV2), {
|
|
2402
|
+
key: 0,
|
|
2403
|
+
"workflow-object": unref(editableWorkflowObject),
|
|
2404
|
+
"read-only": isCanvasReadOnly.value,
|
|
2405
|
+
"is-production-execution-preview": isProductionExecutionPreview.value,
|
|
2406
|
+
onRenameNode,
|
|
2407
|
+
onStopExecution,
|
|
2408
|
+
onSwitchSelectedNode: onSwitchActiveNode,
|
|
2409
|
+
onOpenConnectionNodeCreator: onOpenSelectiveNodeCreator,
|
|
2410
|
+
onSaveKeyboardShortcut: onSaveWorkflow
|
|
2411
|
+
}, null, 8, [
|
|
2412
|
+
"workflow-object",
|
|
2413
|
+
"read-only",
|
|
2414
|
+
"is-production-execution-preview"
|
|
2415
|
+
])) : createCommentVNode("", true)]),
|
|
2416
|
+
_: 1
|
|
2417
|
+
}))
|
|
2418
|
+
]),
|
|
2419
|
+
_: 1
|
|
2420
|
+
}, 8, [
|
|
2421
|
+
"id",
|
|
2422
|
+
"workflow",
|
|
2423
|
+
"workflow-object",
|
|
2424
|
+
"fallback-nodes",
|
|
2425
|
+
"show-fallback-nodes",
|
|
2426
|
+
"event-bus",
|
|
2427
|
+
"read-only",
|
|
2428
|
+
"executing",
|
|
2429
|
+
"key-bindings",
|
|
2430
|
+
"suppress-interaction",
|
|
2431
|
+
"onUpdate:logs:inputOpen",
|
|
2432
|
+
"onUpdate:logs:outputOpen",
|
|
2433
|
+
"onUpdate:hasRangeSelection"
|
|
2434
|
+
])) : createCommentVNode("", true), !isLoading.value && (unref(experimentalNdvStore).isNdvInFocusPanelEnabled ? !isCanvasReadOnly.value : true) ? (openBlock(), createBlock(FocusPanel_default, {
|
|
2435
|
+
key: 1,
|
|
2436
|
+
"is-canvas-read-only": isCanvasReadOnly.value,
|
|
2437
|
+
onSaveKeyboardShortcut: onSaveWorkflow,
|
|
2438
|
+
onContextMenuAction
|
|
2439
|
+
}, null, 8, ["is-canvas-read-only"])) : createCommentVNode("", true)], 2);
|
|
2440
|
+
};
|
|
2441
|
+
}
|
|
2442
|
+
});
|
|
2443
|
+
var NodeView_vue_vue_type_style_index_0_lang_module_default = {
|
|
2444
|
+
wrapper: "_wrapper_1phws_123",
|
|
2445
|
+
executionButtons: "_executionButtons_1phws_128",
|
|
2446
|
+
chatButton: "_chatButton_1phws_166",
|
|
2447
|
+
setupCredentialsButtonWrapper: "_setupCredentialsButtonWrapper_1phws_170",
|
|
2448
|
+
readOnlyEnvironmentNotification: "_readOnlyEnvironmentNotification_1phws_176",
|
|
2449
|
+
thinkingPill: "_thinkingPill_1phws_183"
|
|
2450
|
+
};
|
|
2451
|
+
var NodeView_default = /* @__PURE__ */ __plugin_vue_export_helper_default(NodeView_vue_vue_type_script_setup_true_lang_default, [["__cssModules", { "$style": NodeView_vue_vue_type_style_index_0_lang_module_default }]]);
|
|
2452
|
+
export { NodeView_default as default };
|