n8n-editor-ui 1.119.1 → 1.120.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddDataTableModal-78UiDOZ6.js → AddDataTableModal-CbPeeND7.js} +17 -17
- package/dist/assets/AddDataTableModal-legacy-TWGqOwvJ.js +165 -0
- package/dist/assets/AnimatedSpinner-legacy-a37yY0a9.js +35 -0
- package/dist/assets/AnnotationTagsDropdown.ee-legacy-m3_lZt5p.js +90 -0
- package/dist/assets/{AnnotationTagsDropdown.ee-B5SGfmxY.js → AnnotationTagsDropdown.ee-nr8ND2ZK.js} +2 -2
- package/dist/assets/{AuthView-CaCXt20h.js → AuthView-GQg0-dxd.js} +6 -6
- package/dist/assets/AuthView-legacy-BTkTpaqQ.js +170 -0
- package/dist/assets/{ChangePasswordView-sh87mWR6.js → ChangePasswordView-CMxYIEv7.js} +15 -15
- package/dist/assets/ChangePasswordView-legacy-UYMze_th.js +165 -0
- package/dist/assets/{ChatAgentsView-4SiYQ9YJ.js → ChatAgentsView-BF2UQldY.js} +22 -22
- package/dist/assets/ChatAgentsView-legacy-C-TEUCMJ.js +418 -0
- package/dist/assets/{ChatSidebar-C0XXqw3v.js → ChatSidebar-CwUIdqm5.js} +29 -24
- package/dist/assets/ChatSidebar-legacy-BcM0mdnb.js +485 -0
- package/dist/assets/{ChatView-BlkLzP1X.js → ChatView-CuoxXANC.js} +26 -26
- package/dist/assets/ChatView-legacy-DQzrDKVi.js +1192 -0
- package/dist/assets/CollectionParameter-legacy-BCZyr-W3.js +16 -0
- package/dist/assets/CollectionParameter-uOVc6KhF.js +58 -0
- package/dist/assets/{CommunityNodeUpdateInfo-Egv665vx.js → CommunityNodeUpdateInfo-BbQHVpK8.js} +8 -8
- package/dist/assets/CommunityNodeUpdateInfo-legacy-CffmFLEi.js +395 -0
- package/dist/assets/{CopyInput-DX-FL085.js → CopyInput-CiPK5ddq.js} +4 -4
- package/dist/assets/CopyInput-legacy-BbjpqRcT.js +141 -0
- package/dist/assets/{CredentialIcon-DS3l06t2.js → CredentialIcon-CwCVRpiA.js} +2 -2
- package/dist/assets/CredentialIcon-legacy-nJdgWX0p.js +110 -0
- package/dist/assets/{CredentialsView-C3SKDwtI.js → CredentialsView-Dq_bJCTX.js} +38 -38
- package/dist/assets/CredentialsView-legacy-CBU7oObS.js +562 -0
- package/dist/assets/{DataTableActions-lgRuMb9F.js → DataTableActions-1pCUiTrK.js} +9 -9
- package/dist/assets/DataTableActions-legacy-cggWdqxr.js +113 -0
- package/dist/assets/{DataTableDetailsView-CoWw-4gy.js → DataTableDetailsView-FZ996I2K.js} +23 -23
- package/dist/assets/DataTableDetailsView-legacy-T6s1xIYP.js +46280 -0
- package/dist/assets/{DataTableView-hUsgVnZS.js → DataTableView-0cgj7Yv8.js} +42 -35
- package/dist/assets/DataTableView-legacy-Bs1jkgGw.js +353 -0
- package/dist/assets/DemoFooter-CYGOF76r.js +70 -0
- package/dist/assets/DemoFooter-legacy-BDdJ7htI.js +39 -0
- package/dist/assets/{Draggable-DFf4aD-Y.js → Draggable-Cp3VJXN0.js} +1 -1
- package/dist/assets/Draggable-legacy-CyKi_Tb4.js +158 -0
- package/dist/assets/{EmptySharedSectionActionBox-BkPu0yI0.js → EmptySharedSectionActionBox-D83jdITF.js} +4 -4
- package/dist/assets/EmptySharedSectionActionBox-legacy-V1B39cgS.js +68 -0
- package/dist/assets/{EnterpriseEdition.ee-BoNEV-MB.js → EnterpriseEdition.ee-Dmuvy1Qj.js} +1 -1
- package/dist/assets/EnterpriseEdition.ee-legacy-D0gBfVDw.js +44 -0
- package/dist/assets/{EntityNotFound-Bs-aLs3W.js → EntityNotFound-BF7nteVf.js} +7 -7
- package/dist/assets/EntityNotFound-legacy-Bfl0-2gj.js +116 -0
- package/dist/assets/{EntityUnAuthorised-BwhGn6eD.js → EntityUnAuthorised-4No93VOO.js} +7 -7
- package/dist/assets/EntityUnAuthorised-legacy-DLIqjuJf.js +97 -0
- package/dist/assets/{ErrorView-Cvlb8nm0.js → ErrorView-GWT7FjjH.js} +9 -9
- package/dist/assets/ErrorView-legacy-CtfV-zYc.js +100 -0
- package/dist/assets/{EvaluationsRootView-DdOZORFr.js → EvaluationsRootView-C3RbV5Qf.js} +26 -26
- package/dist/assets/EvaluationsRootView-legacy-DNES1nzh.js +633 -0
- package/dist/assets/{EvaluationsView-DxiPOlGL.js → EvaluationsView-Da2okwlD.js} +20 -20
- package/dist/assets/EvaluationsView-legacy-DfePizpg.js +612 -0
- package/dist/assets/ExecutionsTime-legacy-CqDKZjaw.js +618 -0
- package/dist/assets/{ExecutionsTime-DwXL-TY4.js → ExecutionsTime-y_VFxk2z.js} +9 -9
- package/dist/assets/{ExecutionsView-B4XGhWmY.js → ExecutionsView-CHuoC0nO.js} +37 -37
- package/dist/assets/ExecutionsView-legacy-DD0RXem0.js +941 -0
- package/dist/assets/{ExternalSecretsProviderConnectionSwitch.ee-DCTg0mdX.js → ExternalSecretsProviderConnectionSwitch.ee-BQSSIasB.js} +4 -4
- package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-legacy-7UjbdgbG.js +269 -0
- package/dist/assets/FileSaver.min-legacy-BTN44Z38.js +100 -0
- package/dist/assets/{FixedCollectionParameter-DjdDaH5s.js → FixedCollectionParameter-BhQfNO8a.js} +48 -48
- package/dist/assets/FixedCollectionParameter-legacy-uiOfunC4.js +346 -0
- package/dist/assets/{ForgotMyPasswordView-KkAVBYit.js → ForgotMyPasswordView-V8EfVOR8.js} +15 -15
- package/dist/assets/ForgotMyPasswordView-legacy-BbZiFRc2.js +118 -0
- package/dist/assets/{InsightsChartAverageRuntime-D5Gh8Rz5.js → InsightsChartAverageRuntime-CfCpplsX.js} +8 -8
- package/dist/assets/InsightsChartAverageRuntime-legacy-C6yRYbdN.js +91 -0
- package/dist/assets/{InsightsChartFailed-D7PZ_ctV.js → InsightsChartFailed-DrX7-PQa.js} +7 -7
- package/dist/assets/InsightsChartFailed-legacy-BXNV41_X.js +82 -0
- package/dist/assets/{InsightsChartFailureRate-CpPU5Kwd.js → InsightsChartFailureRate-DGn_vu5L.js} +8 -8
- package/dist/assets/InsightsChartFailureRate-legacy-xpR-l77z.js +85 -0
- package/dist/assets/{InsightsChartTimeSaved-DYrv2t2N.js → InsightsChartTimeSaved-Fn70fEqD.js} +8 -8
- package/dist/assets/InsightsChartTimeSaved-legacy-DyXMw-Zj.js +99 -0
- package/dist/assets/{InsightsChartTotal-CNqL-Qn3.js → InsightsChartTotal-B0EltniK.js} +7 -7
- package/dist/assets/InsightsChartTotal-legacy-ny-Gn0NL.js +82 -0
- package/dist/assets/InsightsDashboard-legacy-bfD59wUo.js +562 -0
- package/dist/assets/{InsightsDashboard-CrJZtNDS.js → InsightsDashboard-vqQRDBrv.js} +36 -36
- package/dist/assets/{InsightsPaywall-DxgcxZ5z.js → InsightsPaywall-BKEVuxSt.js} +16 -16
- package/dist/assets/InsightsPaywall-legacy-By7YqflZ.js +83 -0
- package/dist/assets/{InsightsSummary-Bew3_p6D.js → InsightsSummary-DsQSWG2Q.js} +8 -8
- package/dist/assets/InsightsSummary-legacy-DK4uQ90J.js +225 -0
- package/dist/assets/{InsightsTableWorkflows-TAIASHgR.js → InsightsTableWorkflows-MahuiDFz.js} +16 -16
- package/dist/assets/InsightsTableWorkflows-legacy-By2jMj0_.js +269 -0
- package/dist/assets/{ItemsRenderer-BfXptelN.js → ItemsRenderer-CejxMtdi.js} +8 -8
- package/dist/assets/ItemsRenderer-legacy-Cv8U3BDP.js +1178 -0
- package/dist/assets/KeyboardShortcutTooltip-legacy-Bvz-OQ26.js +81 -0
- package/dist/assets/{KeyboardShortcutTooltip-y1pBqAge.js → KeyboardShortcutTooltip-qZ5YD2sD.js} +1 -1
- package/dist/assets/{LogsPanel-Uc0E6yn-.js → LogsPanel-DDYWCOb0.js} +28 -30
- package/dist/assets/LogsPanel-Dotn9lvR.js +57 -0
- package/dist/assets/LogsPanel-legacy-ByvltTa3.js +16 -0
- package/dist/assets/LogsPanel-legacy-CskB3POf.js +2951 -0
- package/dist/assets/{MainHeader-M-D-hY8c.js → MainHeader-B2hrGRGJ.js} +241 -65
- package/dist/assets/{MainHeader-Dz9UViYg.css → MainHeader-Csdi9iXJ.css} +177 -29
- package/dist/assets/MainHeader-legacy-B3RrmiZE.js +2193 -0
- package/dist/assets/{MainSidebar-Bf52gQzU.js → MainSidebar-BlYUNsoE.js} +26 -26
- package/dist/assets/MainSidebar-legacy-CNRw0zHi.js +1306 -0
- package/dist/assets/{MainSidebarUserArea-UHX8ACa4.js → MainSidebarUserArea-CX_QMKfH.js} +5 -5
- package/dist/assets/MainSidebarUserArea-legacy-0NdAGU8c.js +172 -0
- package/dist/assets/Modal-legacy-DoUf8p-N.js +265 -0
- package/dist/assets/{Modal-DwutFKNY.js → Modal-mampYWrf.js} +5 -5
- package/dist/assets/{ModalDrawer-B2sNzJVm.js → ModalDrawer-BJGlFvi2.js} +6 -6
- package/dist/assets/ModalDrawer-legacy-BXaxLKkg.js +308 -0
- package/dist/assets/{NDVEmptyState-DdpBamQ9.js → NDVEmptyState-C7QVArdv.js} +1 -1
- package/dist/assets/NDVEmptyState-legacy-DjsKEIfJ.js +19819 -0
- package/dist/assets/{NodeCreation-BRIx8Ei9.js → NodeCreation-CL1i8pHd.js} +46 -46
- package/dist/assets/NodeCreation-legacy-CaZ3pWYZ.js +273 -0
- package/dist/assets/{NodeCreator-DDG2GQ-C.js → NodeCreator-DEx3Dj6j.js} +31 -31
- package/dist/assets/NodeCreator-legacy-Dz9MkQtc.js +1670 -0
- package/dist/assets/{NodeDetailsView-4jVeGvDi.js → NodeDetailsView-WyL3mE7Y.js} +64 -64
- package/dist/assets/NodeDetailsView-legacy-CMUSzOjZ.js +1116 -0
- package/dist/assets/{NodeDetailsViewV2-MeaPvImX.js → NodeDetailsViewV2-Bc3aUBj3.js} +65 -65
- package/dist/assets/NodeDetailsViewV2-legacy-mj-LYRpv.js +1060 -0
- package/dist/assets/{NodeIcon-C-rkj6sB.js → NodeIcon-BYTrCZAx.js} +2 -2
- package/dist/assets/NodeIcon-legacy-BHX1t3Oi.js +127 -0
- package/dist/assets/{NodeSettings-gAtnSv8q.js → NodeSettings-CPhr6Uu2.js} +19 -19
- package/dist/assets/NodeSettings-legacy-BjwVqiPp.js +2811 -0
- package/dist/assets/{NodeView-jjqmiYDP.js → NodeView-CUs2uLnS.js} +69 -69
- package/dist/assets/NodeView-legacy-B7u8GgSk.js +2660 -0
- package/dist/assets/{SettingsProvisioningView-Dhfda99J.css → OAuthConsentView-CXZbBKS5.css} +74 -32
- package/dist/assets/OAuthConsentView-YjViDNW3.js +225 -0
- package/dist/assets/OAuthConsentView-legacy-CT4ApTLs.js +292 -0
- package/dist/assets/PageViewLayout-legacy-B1As2gDz.js +44 -0
- package/dist/assets/{ParameterInputList-kEoD9fc7.js → ParameterInputList-DTj_ngLA.js} +29 -29
- package/dist/assets/ParameterInputList-legacy-pcN7bYH4.js +38124 -0
- package/dist/assets/{PrebuiltAgentTemplatesView-Dd6IJD_W.js → PrebuiltAgentTemplatesView-BECOiYO1.js} +18 -18
- package/dist/assets/PrebuiltAgentTemplatesView-legacy-DYhUlIns.js +205 -0
- package/dist/assets/{ProjectBreadcrumb-scGlGqYf.js → ProjectBreadcrumb-ClcStQiI.js} +4 -4
- package/dist/assets/ProjectBreadcrumb-legacy-PE_pUf9P.js +140 -0
- package/dist/assets/{ProjectCardBadge-p4AY0ubu.js → ProjectCardBadge-CR1M799A.js} +5 -5
- package/dist/assets/ProjectCardBadge-legacy-DwhYlW-b.js +251 -0
- package/dist/assets/{ProjectHeader-BZeiGuD6.js → ProjectHeader-L2nKcFJq.js} +12 -11
- package/dist/assets/ProjectHeader-legacy-Dk15aN_m.js +710 -0
- package/dist/assets/{ProjectIcon-DqKjDNbR.js → ProjectIcon-CHk5fa0e.js} +1 -1
- package/dist/assets/ProjectIcon-legacy-PFbusJyz.js +109 -0
- package/dist/assets/{ProjectRoleView-ByzrSQP-.js → ProjectRoleView-BIInR1qk.js} +46 -31
- package/dist/assets/ProjectRoleView-legacy-BO9-6Zog.js +480 -0
- package/dist/assets/{ProjectRolesView-DclD8eEm.js → ProjectRolesView-D2-fIOtW.js} +24 -21
- package/dist/assets/ProjectRolesView-legacy-CWMn_I7U.js +321 -0
- package/dist/assets/{ProjectSettings-4wa93sE4.js → ProjectSettings-BlClYwF1.js} +27 -26
- package/dist/assets/ProjectSettings-legacy-BPsXj5XT.js +1070 -0
- package/dist/assets/{ProjectSharing-BVPUxo_M.js → ProjectSharing-CSeX6YY5.js} +5 -5
- package/dist/assets/ProjectSharing-legacy-xYY68ooo.js +307 -0
- package/dist/assets/{ProjectVariables-x9spBaqX.js → ProjectVariables-Bjzw7BIq.js} +34 -34
- package/dist/assets/ProjectVariables-legacy-DfW6sdX0.js +572 -0
- package/dist/assets/{PushConnectionTracker-ByNVqY0h.js → PushConnectionTracker-DFq8UG-S.js} +3 -3
- package/dist/assets/PushConnectionTracker-legacy-B0Q_Dv5f.js +65 -0
- package/dist/assets/{ResourcesListLayout-UXbxK1S7.js → ResourcesListLayout-Cf-VCtXT.js} +10 -10
- package/dist/assets/ResourcesListLayout-legacy-DYKabjb6.js +938 -0
- package/dist/assets/RunDataHtml-B1O-g3bi.js +7 -0
- package/dist/assets/{RunDataHtml-DdtrEw19.js → RunDataHtml-BNcvZDMJ.js} +1 -1
- package/dist/assets/RunDataHtml-legacy-DopSvQCJ.js +63 -0
- package/dist/assets/RunDataHtml-legacy-h0qPMlWv.js +16 -0
- package/dist/assets/{RunDataJson-CxLotBq-.js → RunDataJson-CtU-jO3b.js} +14 -17
- package/dist/assets/RunDataJson-legacy-CDVGwTtk.js +253 -0
- package/dist/assets/{RunDataJsonActions-qylVa2u8.js → RunDataJsonActions-DcS_v76R.js} +15 -15
- package/dist/assets/RunDataJsonActions-legacy-CamxDlZh.js +5126 -0
- package/dist/assets/RunDataParsedAiContent-BFEUw_Z8.js +25 -0
- package/dist/assets/{RunDataParsedAiContent-Cs80jq_q.js → RunDataParsedAiContent-BVsW98ij.js} +7 -7
- package/dist/assets/RunDataParsedAiContent-legacy-CQnMh9q4.js +16 -0
- package/dist/assets/RunDataParsedAiContent-legacy-y3M6jgoj.js +234 -0
- package/dist/assets/{RunDataSearch-BvoYWH8W.js → RunDataSearch-Dd6t4Vgs.js} +10 -10
- package/dist/assets/RunDataSearch-legacy-D2VmIo7g.js +194 -0
- package/dist/assets/{RunDataTable-d3eXUdSg.js → RunDataTable-CuP87FpN.js} +16 -16
- package/dist/assets/RunDataTable-legacy-ByZIy2Hl.js +724 -0
- package/dist/assets/{SamlOnboarding-CRtDDWqf.js → SamlOnboarding-R6iv6uwF.js} +15 -15
- package/dist/assets/SamlOnboarding-legacy-3hKQbF8_.js +92 -0
- package/dist/assets/{SaveButton-D1iDaopV.js → SaveButton-CtUWsjwd.js} +3 -3
- package/dist/assets/SaveButton-legacy-6GGcUStL.js +123 -0
- package/dist/assets/{SelectedItemsInfo-CSzniBOD.js → SelectedItemsInfo-CFCO70kL.js} +2 -2
- package/dist/assets/SelectedItemsInfo-legacy-u_4Aalns.js +95 -0
- package/dist/assets/{SettingsApiView-DqnHEaAj.js → SettingsApiView-Aw62JsK1.js} +20 -20
- package/dist/assets/SettingsApiView-legacy-C9zAm0u7.js +409 -0
- package/dist/assets/SettingsCommunityNodesView-legacy-BKyymFU0.js +443 -0
- package/dist/assets/{SettingsCommunityNodesView-C7JC1VAK.js → SettingsCommunityNodesView-usMNCBTP.js} +34 -34
- package/dist/assets/{SettingsExternalSecrets-CqTHs6zk.js → SettingsExternalSecrets-3H27kaGp.js} +18 -18
- package/dist/assets/SettingsExternalSecrets-legacy-CUMq_ivN.js +315 -0
- package/dist/assets/SettingsLdapView-legacy-D5vgdVWc.js +2246 -0
- package/dist/assets/{SettingsLdapView-zifHhZKy.js → SettingsLdapView-oVEYnCs1.js} +21 -21
- package/dist/assets/{SettingsLogStreamingView-CQwuqSl8.js → SettingsLogStreamingView-DBnackHm.js} +20 -20
- package/dist/assets/SettingsLogStreamingView-legacy-CQ8nq1FW.js +479 -0
- package/dist/assets/SettingsMCPView-BD9hb-oe.js +936 -0
- package/dist/assets/SettingsMCPView-BGXq9o_x.css +1248 -0
- package/dist/assets/SettingsMCPView-legacy-B8E45TNn.js +1111 -0
- package/dist/assets/{SettingsPersonalView-C1NF8zuk.js → SettingsPersonalView-Dw-9ZYmb.js} +16 -16
- package/dist/assets/SettingsPersonalView-legacy-BCa5pb35.js +484 -0
- package/dist/assets/SettingsProvisioningView-C4D0a4Kz.css +303 -0
- package/dist/assets/SettingsProvisioningView-DpAIsdfr.js +448 -0
- package/dist/assets/SettingsProvisioningView-legacy-7LiGCRgO.js +530 -0
- package/dist/assets/{SettingsSourceControl-CZryQCqT.js → SettingsSourceControl-DJj3DHHA.js} +20 -20
- package/dist/assets/SettingsSourceControl-legacy-BdmpiLob.js +580 -0
- package/dist/assets/{SettingsSso-CeeFO_Pv.js → SettingsSso-BeDmk3V-.js} +21 -21
- package/dist/assets/SettingsSso-legacy-BTbHZn2L.js +507 -0
- package/dist/assets/{SettingsUsageAndPlan-DMMd5WcZ.js → SettingsUsageAndPlan-FoM6V1Ld.js} +19 -19
- package/dist/assets/SettingsUsageAndPlan-legacy-m-cDuLWb.js +505 -0
- package/dist/assets/{SettingsUsersView-DWVyE4hY.js → SettingsUsersView-BwTyYPXj.js} +21 -21
- package/dist/assets/SettingsUsersView-legacy-D39e8lpD.js +931 -0
- package/dist/assets/{SettingsView-trF6L-tM.js → SettingsView-BfAuJHR3.js} +13 -12
- package/dist/assets/SettingsView-legacy-hgJAMD5w.js +346 -0
- package/dist/assets/{SetupTemplateFormStep-BsgzR5CN.js → SetupTemplateFormStep-5Dxz6mL3.js} +6 -6
- package/dist/assets/SetupTemplateFormStep-legacy-Br6RSFQH.js +548 -0
- package/dist/assets/{SetupView-Bx4ZLcja.js → SetupView-CvELBthc.js} +15 -15
- package/dist/assets/SetupView-legacy-yEyZVczN.js +126 -0
- package/dist/assets/{SetupWorkflowCredentialsButton-DR_aufFd.js → SetupWorkflowCredentialsButton-DAFrS1pq.js} +12 -12
- package/dist/assets/SetupWorkflowCredentialsButton-legacy-BkSWj18e.js +84 -0
- package/dist/assets/SetupWorkflowFromTemplateView-legacy-ByqlU9fc.js +376 -0
- package/dist/assets/{SetupWorkflowFromTemplateView-Ded77Ph-.js → SetupWorkflowFromTemplateView-uxGhfWLo.js} +21 -21
- package/dist/assets/SigninView-legacy-wkJIfoQV.js +441 -0
- package/dist/assets/{SigninView-DXPofyPm.js → SigninView-qzciwLod.js} +16 -16
- package/dist/assets/{SignoutView-B7H_dRJO.js → SignoutView-BAHDN7_D.js} +10 -10
- package/dist/assets/SignoutView-legacy-7HQWbMDt.js +56 -0
- package/dist/assets/{SignupView-BHWVvwh8.js → SignupView-ClulJHw1.js} +15 -15
- package/dist/assets/SignupView-legacy-2pnkjTn7.js +154 -0
- package/dist/assets/TagsDropdown-legacy-BtJ1Sjlj.js +285 -0
- package/dist/assets/{TagsDropdown-D6CYk5R8.js → TagsDropdown-sf5rCG4m.js} +4 -4
- package/dist/assets/{TemplateDetails-ezK9JOOl.js → TemplateDetails-DQtY0s_s.js} +7 -7
- package/dist/assets/TemplateDetails-legacy-BsMCyy8I.js +197 -0
- package/dist/assets/{TemplateList-DztR2yKa.js → TemplateList-DRC8FrQz.js} +5 -5
- package/dist/assets/TemplateList-legacy-D0LSlQK9.js +411 -0
- package/dist/assets/{TemplatesCollectionView-Bu_YRd84.js → TemplatesCollectionView-DONrZBME.js} +23 -23
- package/dist/assets/TemplatesCollectionView-legacy-HXEUNo_l.js +248 -0
- package/dist/assets/{TemplatesSearchView-C7zBEV2b.js → TemplatesSearchView-DDZuvKqM.js} +21 -21
- package/dist/assets/TemplatesSearchView-legacy-28acdtqn.js +1427 -0
- package/dist/assets/{TemplatesView-BnozPkTX.js → TemplatesView-BmiQGH35.js} +3 -3
- package/dist/assets/TemplatesView-legacy-B2w8licK.js +113 -0
- package/dist/assets/{TemplatesWorkflowView-BTyHc3MG.js → TemplatesWorkflowView-Cdwrydpt.js} +25 -25
- package/dist/assets/TemplatesWorkflowView-legacy-C_2wkoc1.js +220 -0
- package/dist/assets/{TestRunDetailView-B76TM9u8.js → TestRunDetailView-Dhq4tAJV.js} +18 -18
- package/dist/assets/TestRunDetailView-legacy-hQli5No4.js +500 -0
- package/dist/assets/TextWithHighlights-legacy-CVW5NpX4.js +108 -0
- package/dist/assets/{TimeAgo-Gv5h1Utx.js → TimeAgo-BFJOHR5_.js} +2 -2
- package/dist/assets/TimeAgo-legacy-OJCaC3xJ.js +200 -0
- package/dist/assets/{TriggerPanel-Dx9LpA4p.js → TriggerPanel-DtaNk_Mt.js} +80 -28
- package/dist/assets/{TriggerPanel-BQveVt6Q.css → TriggerPanel-jKx3Ut66.css} +31 -10
- package/dist/assets/TriggerPanel-legacy-DGckjcgd.js +1519 -0
- package/dist/assets/{VirtualSchema-CUUzo795.js → VirtualSchema-BPKNcaHe.js} +16 -16
- package/dist/assets/VirtualSchema-Ce9RryqL.js +43 -0
- package/dist/assets/VirtualSchema-legacy-BT94K3Qg.js +2655 -0
- package/dist/assets/VirtualSchema-legacy-DWrDvaPx.js +16 -0
- package/dist/assets/{VueMarkdown-CiR4a0gO.js → VueMarkdown-CF7KJfpC.js} +1 -1
- package/dist/assets/VueMarkdown-legacy-Dyo2dNbU.js +50 -0
- package/dist/assets/{WorkerView-D7h4pmTk.js → WorkerView-CUypvdcg.js} +39 -39
- package/dist/assets/WorkerView-legacy-DMYRM_Cm.js +636 -0
- package/dist/assets/{WorkflowActivator-k3HTYXbc.js → WorkflowActivator-DcgoNwmT.js} +8 -8
- package/dist/assets/WorkflowActivator-legacy-PoTuxdWE.js +473 -0
- package/dist/assets/{WorkflowExecutionsInfoAccordion-DL5cBkbK.js → WorkflowExecutionsInfoAccordion-C6OXDZEA.js} +7 -7
- package/dist/assets/WorkflowExecutionsInfoAccordion-legacy-B4TTZinW.js +226 -0
- package/dist/assets/{WorkflowExecutionsLandingPage-DlXz9Jry.js → WorkflowExecutionsLandingPage-D2pYB3tS.js} +21 -21
- package/dist/assets/WorkflowExecutionsLandingPage-legacy-DaS6jgLc.js +136 -0
- package/dist/assets/{WorkflowExecutionsPreview-DJWD2i74.js → WorkflowExecutionsPreview-B-EBo84g.js} +25 -25
- package/dist/assets/WorkflowExecutionsPreview-legacy-BZAG_FE2.js +745 -0
- package/dist/assets/{WorkflowExecutionsView-CK-2WqY7.js → WorkflowExecutionsView-DPiBL6kC.js} +38 -38
- package/dist/assets/WorkflowExecutionsView-legacy-C6eVhTue.js +880 -0
- package/dist/assets/{WorkflowHistory-Cb-ZoRBp.js → WorkflowHistory-ZHxuKv_S.js} +19 -19
- package/dist/assets/WorkflowHistory-legacy-D9EpXPrw.js +881 -0
- package/dist/assets/{WorkflowOnboardingView-CguOMlib.js → WorkflowOnboardingView-B7iQi_8k.js} +9 -9
- package/dist/assets/WorkflowOnboardingView-legacy-DGVGXrbp.js +95 -0
- package/dist/assets/WorkflowPreview-legacy-Ck8uteSS.js +249 -0
- package/dist/assets/{WorkflowPreview-DY79uYFw.js → WorkflowPreview-q32aqNwB.js} +5 -5
- package/dist/assets/{WorkflowTagsDropdown-CdEFZM1A.js → WorkflowTagsDropdown-DTUxLHbz.js} +2 -2
- package/dist/assets/WorkflowTagsDropdown-legacy-D6X-TzYC.js +90 -0
- package/dist/assets/{WorkflowsView-BnxQSw3m.js → WorkflowsView-CMeOv7jM.js} +98 -80
- package/dist/assets/{WorkflowsView-2XTsT7zB.css → WorkflowsView-M8ExG7Q2.css} +22 -19
- package/dist/assets/WorkflowsView-legacy-BpAAeN0R.js +3521 -0
- package/dist/assets/{_MapCache-Byd-DTfo.js → _MapCache-Dw6Llo22.js} +74 -11
- package/dist/assets/_MapCache-legacy-DcX1vy0l.js +11084 -0
- package/dist/assets/_plugin-vue_export-helper-legacy-DZMI5HPp.js +19 -0
- package/dist/assets/{apiKeys.store-CPsBJKkq.js → apiKeys.store-HKuBxy3l.js} +1 -1
- package/dist/assets/apiKeys.store-legacy-BLC1aaW1.js +76 -0
- package/dist/assets/{assistant.store-DvuxtpS4.js → assistant.store-BtplYeLr.js} +6 -6
- package/dist/assets/assistant.store-legacy-Dk3PMmMU.js +1313 -0
- package/dist/assets/{auth.eventBus-YsWbuB84.js → auth.eventBus-16zfbqGs.js} +1 -1
- package/dist/assets/auth.eventBus-legacy-HP2TbQxy.js +22 -0
- package/dist/assets/{banners.store-BQPwuqhn.js → banners.store-DikUBA5o.js} +3 -3
- package/dist/assets/banners.store-legacy-DUTxfINX.js +260 -0
- package/dist/assets/buttons.esm-legacy-BLrJSt1Z.js +419 -0
- package/dist/assets/chart-legacy-DbW-cf8m.js +12055 -0
- package/dist/assets/chartjs.utils-legacy-CKDO0Ba9.js +208 -0
- package/dist/assets/{chartjs.utils-Bf07Y-P-.js → chartjs.utils-om4DCCN2.js} +3 -3
- package/dist/assets/{chatPanel.store-fM-8PK9i.js → chatPanel.store-BZOiAoXE.js} +4 -4
- package/dist/assets/chatPanel.store-legacy-CQ6tsDjT.js +153 -0
- package/dist/assets/chunk-legacy-Re9CbdfL.js +59 -0
- package/dist/assets/{cloudPlan.store-DrraBpZJ.js → cloudPlan.store-DT2PFV79.js} +2 -2
- package/dist/assets/cloudPlan.store-legacy-BPgz6zU7.js +208 -0
- package/dist/assets/{col-DK_GtMhM.js → col-Da3-PCMn.js} +3 -3
- package/dist/assets/col-legacy-Bhm60Oe3.js +186 -0
- package/dist/assets/{constants-DvlTm3U4.js → constants-C5Tj3dXQ.js} +362 -356
- package/dist/assets/constants-legacy-CLA25gM9.js +61343 -0
- package/dist/assets/constants-legacy-D22nGw-a.js +26 -0
- package/dist/assets/{core-6lPsS9S5.js → core-CH2Kku_3.js} +1 -1
- package/dist/assets/core-legacy-BVoFM47F.js +1857 -0
- package/dist/assets/core-legacy-De470jmW.js +20 -0
- package/dist/assets/{dataTable.store-u9fGWest.js → dataTable.store-BC5cIRU-.js} +5 -3
- package/dist/assets/dataTable.store-legacy-BKpQb7Gy.js +202 -0
- package/dist/assets/{date-picker-CVSd-BRt.js → date-picker-D6cS76wx.js} +3 -3
- package/dist/assets/date-picker-legacy-pB1SshLs.js +4508 -0
- package/dist/assets/{dateFormatter-BD73Za8B.js → dateFormatter-DysKGI6w.js} +1 -1
- package/dist/assets/dateFormatter-legacy-Dl8dqhrg.js +53 -0
- package/dist/assets/dateformat-legacy-Xt1X-tys.js +161 -0
- package/dist/assets/{dialog-BMoy5MDa.js → dialog-Cgy1Sihv.js} +4 -4
- package/dist/assets/dialog-legacy-BrpTfsO5.js +518 -0
- package/dist/assets/{dist-CWw8iddm.js → dist-D33xoYUY.js} +1 -1
- package/dist/assets/dist-legacy-8f5owWm6.js +204 -0
- package/dist/assets/{empty-BuGRxzl4.js → empty-RTEMfF4N.js} +1 -1
- package/dist/assets/empty-legacy-DnVUoqbC.js +2409 -0
- package/dist/assets/en-legacy-Bgme8Vbm.js +98 -0
- package/dist/assets/en-legacy-BwVJMmMW.js +16 -0
- package/dist/assets/{es-BazDU8Wd.js → es-Cjns9o4Y.js} +1 -1
- package/dist/assets/es-legacy-8dRs2C3P.js +16006 -0
- package/dist/assets/{evaluation.constants-CIiAC2dT.js → evaluation.constants-BJTUNo2q.js} +3 -3
- package/dist/assets/evaluation.constants-legacy-7byaeleB.js +363 -0
- package/dist/assets/{executions.store-IU9p1s46.js → executions.store-D2xBmTFC.js} +1 -1
- package/dist/assets/executions.store-legacy-BzRopbKX.js +246 -0
- package/dist/assets/exports-legacy-RTRnyI4R.js +3103 -0
- package/dist/assets/{externalSecrets.ee.store-1z63wMHN.js → externalSecrets.ee.store-CbqCu_KF.js} +2 -2
- package/dist/assets/externalSecrets.ee.store-legacy-BP6gQv_P.js +145 -0
- package/dist/assets/{focusPanel.store-BJpwjMIG.js → focusPanel.store-CPU1uVq-.js} +4 -4
- package/dist/assets/focusPanel.store-legacy-BcpstEbJ.js +264 -0
- package/dist/assets/{folders.store-Db975T-w.js → folders.store-CmYx4Y_F.js} +2 -2
- package/dist/assets/folders.store-legacy-BAC47Qt0.js +267 -0
- package/dist/assets/{icon-DhADuA9N.js → icon-DmIKo5zZ.js} +1 -1
- package/dist/assets/icon-legacy-gLTnORTx.js +458 -0
- package/dist/assets/{index-C8erHZ_Y.css → index-4I6DPmNr.css} +1 -1
- package/dist/assets/{index-C25i7qsE.js → index-CSjecLC-.js} +189 -1627
- package/dist/assets/index-legacy-BeiTnujt.js +28424 -0
- package/dist/assets/insights.constants-legacy-D5Y8YhR_.js +64 -0
- package/dist/assets/{insights.store-DC_enAA-.js → insights.store-aHF8maKY.js} +4 -4
- package/dist/assets/insights.store-legacy-XeWToovL.js +89 -0
- package/dist/assets/{insights.utils-ClJRVRAK.js → insights.utils-ClwWcg-l.js} +8 -8
- package/dist/assets/insights.utils-legacy-DWaseOa4.js +96 -0
- package/dist/assets/{isEmpty-DrZRN4lR.js → isEmpty-Dg0afC99.js} +30 -31
- package/dist/assets/isEmpty-legacy-7ibnR7BO.js +43393 -0
- package/dist/assets/{languageModules-CNluY7w0.js → languageModules-BF7Ga1Pj.js} +1 -1
- package/dist/assets/languageModules-legacy-BaU1eOK3.js +7184 -0
- package/dist/assets/{logStreaming.store-CPvxjcQB.js → logStreaming.store-DFZnZ2Rt.js} +1 -1
- package/dist/assets/logStreaming.store-legacy-B_cbQPAW.js +209 -0
- package/dist/assets/mcp.constants-BCNosk1p.js +5 -0
- package/dist/assets/mcp.constants-legacy-CZfk8DW2.js +18 -0
- package/dist/assets/{mcp.store-YGfe2oZU.js → mcp.store-Bd62s_4P.js} +23 -3
- package/dist/assets/mcp.store-legacy-C00py4q_.js +125 -0
- package/dist/assets/{merge-CKEa8BM2.js → merge-Dnkh07HW.js} +1 -1
- package/dist/assets/merge-legacy-CcVOuFTi.js +1529 -0
- package/dist/assets/{nodeCreator.store-DHz0Nc1Y.js → nodeCreator.store-C1GkQ_2N.js} +8 -8
- package/dist/assets/nodeCreator.store-legacy-CjrGX9Lm.js +4758 -0
- package/dist/assets/{nodeIcon-ry_JIpAT.js → nodeIcon-ChI78z3o.js} +2 -2
- package/dist/assets/nodeIcon-legacy-DD6sIN5e.js +122 -0
- package/dist/assets/{nodeTransforms-PeZUYiCs.js → nodeTransforms-C7fmOXNl.js} +2 -2
- package/dist/assets/nodeTransforms-legacy-BI0GkY5n.js +86 -0
- package/dist/assets/npsSurvey.store-legacy-oZP0npqy.js +123 -0
- package/dist/assets/{npsSurvey.store-BTpA4Bdf.js → npsSurvey.store-ylMA9JZD.js} +2 -2
- package/dist/assets/{orderBy-CMVxNao4.js → orderBy-FDQLKrkD.js} +2 -2
- package/dist/assets/orderBy-legacy-BZrAOdi3.js +63 -0
- package/dist/assets/{overlay-B8MMvNgs.js → overlay-C02_kK8Y.js} +2 -2
- package/dist/assets/overlay-legacy-CfieUdAZ.js +218 -0
- package/dist/assets/{path-browserify-DsmB_HMK.js → path-browserify-CTmc1OxV.js} +1 -1
- package/dist/assets/path-browserify-legacy-DJbEMZcd.js +328 -0
- package/dist/assets/{personalizedTemplatesV3.store-C0D2WZuq.js → personalizedTemplatesV3.store-alXco4LN.js} +4 -4
- package/dist/assets/personalizedTemplatesV3.store-legacy-D4xPTzWQ.js +313 -0
- package/dist/assets/{pickBy-DWZbVA0W.js → pickBy-SlOaKcI1.js} +2 -2
- package/dist/assets/pickBy-legacy-5fAqUgO0.js +59 -0
- package/dist/assets/polyfills-legacy-07zJxDbQ.js +4836 -0
- package/dist/assets/preload-helper-legacy-CXRjoQ0T.js +73 -0
- package/dist/assets/{radio-5XOrKEP7.js → radio-BlnltmtN.js} +3 -3
- package/dist/assets/radio-legacy-CvqQyMRY.js +323 -0
- package/dist/assets/{readyToRunWorkflows.store-C23cIyhu.js → readyToRunWorkflows.store-BXoUeVNE.js} +5 -5
- package/dist/assets/readyToRunWorkflows.store-legacy-CLv3FVF5.js +2086 -0
- package/dist/assets/{readyToRunWorkflowsV2.store-BxZUJyXQ.js → readyToRunWorkflowsV2.store-BJAu2HwR.js} +7 -7
- package/dist/assets/readyToRunWorkflowsV2.store-legacy-CM_1ZlJR.js +549 -0
- package/dist/assets/retry-legacy-CkXCWkMV.js +48 -0
- package/dist/assets/{roles.store-Bk6Eo7y8.js → roles.store-DzShOYE2.js} +2 -2
- package/dist/assets/roles.store-legacy-BxleDMZw.js +67 -0
- package/dist/assets/{router-D4zIcC5W.js → router-B0aGwO7-.js} +93 -84
- package/dist/assets/router-legacy-BCUbS_pL.js +1705 -0
- package/dist/assets/{sanitize-html-BuXr7o4T.js → sanitize-html-Cfxibw1n.js} +2 -2
- package/dist/assets/sanitize-html-legacy-DfOUEbdf.js +9987 -0
- package/dist/assets/{schemaPreview.store-BVhugjbw.js → schemaPreview.store-DoyPeLof.js} +2 -2
- package/dist/assets/schemaPreview.store-legacy-CtBwiQEG.js +153 -0
- package/dist/assets/{semver-lN9oCZPq.js → semver-D1BuALCK.js} +2 -2
- package/dist/assets/semver-legacy-iZYhFDDU.js +1499 -0
- package/dist/assets/smartDecimal-legacy-BeOdMR2z.js +19 -0
- package/dist/assets/sortByProperty-legacy-CgPLoqtk.js +21 -0
- package/dist/assets/{sourceControl.eventBus-BkPwCZw_.js → sourceControl.eventBus-kAyFUXsG.js} +1 -1
- package/dist/assets/sourceControl.eventBus-legacy-oIGia_rL.js +17 -0
- package/dist/assets/{src-D6S9Khji.js → src-DsaRShTK.js} +648 -600
- package/dist/assets/src-legacy-6Jvz4Sen.js +64208 -0
- package/dist/assets/{sso.store-qzj82Xj4.js → sso.store-Cw8J8on5.js} +1 -1
- package/dist/assets/sso.store-legacy-Ci_mQS0X.js +185 -0
- package/dist/assets/{table-s-zqHExs.js → table-adhNf731.js} +3 -3
- package/dist/assets/table-legacy-DECH20yK.js +4957 -0
- package/dist/assets/{templateActions-BeIpzgaa.js → templateActions-B4t6RCi8.js} +4 -4
- package/dist/assets/templateActions-legacy-CqwW8d3O.js +134 -0
- package/dist/assets/{templateTransforms-Cgy40V1P.js → templateTransforms-Bu9cSoOY.js} +1 -1
- package/dist/assets/templateTransforms-legacy-DToYks9P.js +84 -0
- package/dist/assets/{templates.store-COjIpQaS.js → templates.store-Bt8tpLPx.js} +3 -3
- package/dist/assets/templates.store-legacy-CPyYqMqR.js +459 -0
- package/dist/assets/{truncate-DGRsht-H.js → truncate-7XypoloM.js} +1 -1
- package/dist/assets/truncate-legacy-D2_XDpGK.js +5763 -0
- package/dist/assets/{uniqBy-BUNHbbw3.js → uniqBy-DAOmWpEt.js} +1 -1
- package/dist/assets/uniqBy-legacy-8A5HU2la.js +52 -0
- package/dist/assets/{usage.store-EBmhHKPv.js → usage.store-Xl7x6DGx.js} +1 -1
- package/dist/assets/usage.store-legacy-CVF7gKOp.js +126 -0
- package/dist/assets/{useActions-CqdsN2GH.js → useActions-BeWbvBcf.js} +5 -5
- package/dist/assets/useActions-legacy-B8B-O_ET.js +330 -0
- package/dist/assets/{useAgent-BHJHCfap.js → useAgent-C1ldRVaA.js} +1 -1
- package/dist/assets/useAgent-legacy-BSTQ3a_e.js +28 -0
- package/dist/assets/{useBeforeUnload-BPhnlPrH.js → useBeforeUnload-Dk9osL_V.js} +3 -3
- package/dist/assets/useBeforeUnload-legacy-hCNmJWkt.js +69 -0
- package/dist/assets/{useBugReporting-oDEHgPM1.js → useBugReporting-B8EUAXTd.js} +9 -9
- package/dist/assets/useBugReporting-legacy-Dbui6uN6.js +383 -0
- package/dist/assets/{useCanvasMapping-DWlYBxgN.js → useCanvasMapping-CC7eJyt0.js} +21 -20
- package/dist/assets/useCanvasMapping-legacy-DRk52E6N.js +14180 -0
- package/dist/assets/{useCanvasOperations-CFsSFVcO.js → useCanvasOperations-Cxgmc_7x.js} +13 -13
- package/dist/assets/useCanvasOperations-legacy-DDhXmhZf.js +1992 -0
- package/dist/assets/{useChatCredentials-CMV_NA0l.js → useChatCredentials-DQJGjWzL.js} +24 -12
- package/dist/assets/useChatCredentials-legacy-BB0gXwkF.js +717 -0
- package/dist/assets/{useChatHubSidebarState-CM9tokIj.js → useChatHubSidebarState-DpLl3Oap.js} +14 -7
- package/dist/assets/useChatHubSidebarState-legacy-fa3EFauo.js +733 -0
- package/dist/assets/{useClipboard-fRnZpGbX.js → useClipboard-BkbYyMX3.js} +2 -2
- package/dist/assets/useClipboard-legacy-CF0IG1Mu.js +78 -0
- package/dist/assets/{useCommandBar-_c6cO-zw.js → useCommandBar-DOChPPYZ.js} +29 -25
- package/dist/assets/useCommandBar-legacy-Bx4lZuXv.js +2100 -0
- package/dist/assets/{useDebounce-BgcdaJ78.js → useDebounce-DFa0sFlC.js} +2 -2
- package/dist/assets/useDebounce-legacy-D-CoXkwk.js +326 -0
- package/dist/assets/{useExecutionData-Bk540rxU.js → useExecutionData-D1Hu-5sr.js} +1 -1
- package/dist/assets/useExecutionData-legacy-DmERlRFZ.js +42 -0
- package/dist/assets/useExecutionDebugging-legacy-DARRX5Rl.js +152 -0
- package/dist/assets/{useExecutionDebugging-BNrxsZTN.js → useExecutionDebugging-yG8CO6AO.js} +7 -7
- package/dist/assets/useExecutionHelpers-legacy-CQh3o0WC.js +120 -0
- package/dist/assets/{useExecutionHelpers-DrFWi6u7.js → useExecutionHelpers-sUZnNg8O.js} +5 -5
- package/dist/assets/{useExternalHooks-SxBXYVNW.js → useExternalHooks-DSSTcvme.js} +1 -1
- package/dist/assets/useExternalHooks-legacy-DAJrb39U.js +53 -0
- package/dist/assets/{useImportCurlCommand-obipPNWg.js → useImportCurlCommand-C8Mv1xEK.js} +11 -11
- package/dist/assets/useImportCurlCommand-legacy-Cs_C8ucb.js +8269 -0
- package/dist/assets/useIntersectionObserver-legacy-CQWXa295.js +69 -0
- package/dist/assets/{useKeybindings-DlmwtVDN.js → useKeybindings-BeP-kiF_.js} +4 -4
- package/dist/assets/useKeybindings-legacy-BP8xe8FX.js +118 -0
- package/dist/assets/{useLogsTreeExpand-gKLCILZL.js → useLogsTreeExpand-VaIZtJEy.js} +11 -11
- package/dist/assets/useLogsTreeExpand-legacy-9ArL6-As.js +1039 -0
- package/dist/assets/{useMcp-_gyuyL1x.js → useMcp-CXTbPxKj.js} +3 -7
- package/dist/assets/useMcp-legacy-Dx5gBZcF.js +46 -0
- package/dist/assets/{useMessage-Ceo97RRX.js → useMessage-hiDKbQYH.js} +5 -5
- package/dist/assets/useMessage-legacy-Cl537NB0.js +683 -0
- package/dist/assets/{usePageRedirectionHelper-C_ctyI4O.js → usePageRedirectionHelper-C8YGBi-F.js} +4 -4
- package/dist/assets/usePageRedirectionHelper-legacy-CeLk3K53.js +95 -0
- package/dist/assets/{usePinnedData-Csij2qN3.js → usePinnedData-BsuIBj2b.js} +5 -5
- package/dist/assets/usePinnedData-legacy-9ciMJD_m.js +283 -0
- package/dist/assets/{usePushConnection-XZibrqm8.js → usePushConnection-cXyYzGoP.js} +11 -11
- package/dist/assets/usePushConnection-legacy-D3xue9ej.js +763 -0
- package/dist/assets/{useRecentResources-FhIOba0w.js → useRecentResources-D1-21efA.js} +7 -7
- package/dist/assets/useRecentResources-legacy-CdJaBL9r.js +159 -0
- package/dist/assets/{useRunWorkflow-_-_hUnHE.js → useRunWorkflow-BLqckUNU.js} +9 -9
- package/dist/assets/useRunWorkflow-legacy-ClvXUChT.js +1136 -0
- package/dist/assets/{useTelemetry-EOV0Llso.js → useTelemetry-DedEakwK.js} +89 -54
- package/dist/assets/useTelemetry-legacy-Bu_8SoSm.js +31004 -0
- package/dist/assets/{useTelemetryContext-CSMUQPEW.js → useTelemetryContext-DX-4dy5E.js} +1 -1
- package/dist/assets/useTelemetryContext-legacy-DQvfjWrO.js +81 -0
- package/dist/assets/{useToast-BlMNYwds.js → useToast-LQk5sJH0.js} +6 -6
- package/dist/assets/useToast-legacy-CIRx5txg.js +610 -0
- package/dist/assets/{useWorkflowActivate-OfPMIBJ5.js → useWorkflowActivate-BSpG7MxI.js} +8 -8
- package/dist/assets/useWorkflowActivate-legacy-Btoe32cC.js +125 -0
- package/dist/assets/{useWorkflowSaving-CWyt929n.js → useWorkflowSaving-GL9jVODA.js} +10 -10
- package/dist/assets/useWorkflowSaving-legacy-8U0vS257.js +329 -0
- package/dist/assets/{useWorkflowsCache-BSXTJC8C.js → useWorkflowsCache-B4y-W-2Y.js} +1 -1
- package/dist/assets/useWorkflowsCache-legacy-Cpa2s1nv.js +217 -0
- package/dist/assets/{versions.store-Dx98n6R_.js → versions.store-Bon8LCsf.js} +3 -3
- package/dist/assets/versions.store-legacy-ZeK5FOAp.js +244 -0
- package/dist/assets/vue-json-pretty-BAtqAAV1.js +1130 -0
- package/dist/assets/vue-json-pretty-legacy-Dk5EQofb.js +1282 -0
- package/dist/assets/vue-legacy-Cj7LJTPA.js +4579 -0
- package/dist/assets/vue.runtime.esm-bundler-legacy-Bq05oSFs.js +8050 -0
- package/dist/assets/xml-legacy-Cyrxa7r6.js +1245 -0
- package/dist/index.html +107 -103
- package/dist/static/openChat.png +0 -0
- package/package.json +1 -1
- package/vite.config.mts +0 -2
- package/dist/assets/CollectionParameter-CizL_Xml.js +0 -58
- package/dist/assets/DemoFooter-D8E8sLCS.js +0 -71
- package/dist/assets/LogsPanel-sLas9qHQ.js +0 -58
- package/dist/assets/RunDataHtml-X9lzUZaX.js +0 -7
- package/dist/assets/RunDataParsedAiContent-DBP5JHe4.js +0 -25
- package/dist/assets/SettingsMCPView-BBO_ZyBU.css +0 -552
- package/dist/assets/SettingsMCPView-Chjl8-hw.js +0 -584
- package/dist/assets/SettingsProvisioningView-BFUB6c2Z.js +0 -252
- package/dist/assets/VirtualSchema-5T21Yyqx.js +0 -43
- package/dist/assets/vue-json-pretty-BltKoWq2.js +0 -681
- /package/dist/assets/{AnimatedSpinner-Dd4F9nQ8.js → AnimatedSpinner-4ie3BOLv.js} +0 -0
- /package/dist/assets/{PageViewLayout-Ccqeja5V.js → PageViewLayout-kj_BBPfv.js} +0 -0
- /package/dist/assets/{buttons.esm-Euf82NbC.js → buttons.esm-CT4flsfB.js} +0 -0
- /package/dist/assets/{chart-BI8B7UPV.js → chart-CE3HWIkr.js} +0 -0
- /package/dist/assets/{constants-CPQyU8WO.js → constants-9ReQTHaF.js} +0 -0
- /package/dist/assets/{core-CIkXL_1D.js → core-CzunNfUb.js} +0 -0
- /package/dist/assets/{insights.constants-NogjFJ3a.js → insights.constants-DK2g3nnD.js} +0 -0
- /package/dist/assets/{smartDecimal-5rgLDM96.js → smartDecimal-e9uPsnJa.js} +0 -0
- /package/dist/assets/{sortByProperty-0UtqPmvJ.js → sortByProperty-CUhVU03p.js} +0 -0
- /package/dist/assets/{useIntersectionObserver-BkAtQAzK.js → useIntersectionObserver-C8Bz3yon.js} +0 -0
- /package/dist/assets/{vue-LyXhKoPx.js → vue-RAk0R0Jn.js} +0 -0
- /package/dist/assets/{xml-F7krcG3E.js → xml-B_gYdkaU.js} +0 -0
|
@@ -0,0 +1,1992 @@
|
|
|
1
|
+
;
|
|
2
|
+
(function () {
|
|
3
|
+
System.register(["./chunk-legacy-Re9CbdfL.js", "./vue.runtime.esm-bundler-legacy-Bq05oSFs.js", "./_MapCache-legacy-DcX1vy0l.js", "./truncate-legacy-D2_XDpGK.js", "./useTelemetry-legacy-Bu_8SoSm.js", "./useToast-legacy-CIRx5txg.js", "./constants-legacy-CLA25gM9.js", "./useExternalHooks-legacy-DAJrb39U.js", "./templates.store-legacy-CPyYqMqR.js", "./focusPanel.store-legacy-BcpstEbJ.js", "./executions.store-legacy-BzRopbKX.js", "./usePinnedData-legacy-9ciMJD_m.js", "./nodeCreator.store-legacy-CjrGX9Lm.js", "./useClipboard-legacy-CF0IG1Mu.js", "./folders.store-legacy-BAC47Qt0.js"], function (_export, _context) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
var __toESM, __commonJS, computed, nextTick, ref, shallowRef, useI18n, useLocalStorage, useRouter, createEventBus, useRoute, getExecutionErrorToastConfiguration, RemoveConnectionCommand, useSettingsStore, tryToParseNumber, useHistoryStore, useProjectsStore, isChatNode, useCredentialsStore, v4_default, RenameNodeCommand, useUIStore, ReplaceNodeParametersCommand, useRootStore, getNodesGroupSize, injectWorkflowState, CanvasNodeRenderType, AddNodeCommand, useCanvasStore, useDataSchema, useTagsStore, useNDVStore, getNewNodePosition, CanvasConnectionMode, DEFAULT_VIEWPORT_BOUNDARIES, GRID_SIZE, isValidNodeConnectionType, generateOffsets, usePostHog, RemoveNodeCommand, MoveNodeCommand, CONFIGURATION_NODE_SIZE, useWorkflowHelpers, useWorkflowsStore, PUSH_NODES_OFFSET, useNodeTypesStore, CONFIGURABLE_NODE_SIZE, useTelemetry, DEFAULT_NODE_SIZE, isPresent, AddConnectionCommand, defineStore, useNodeHelpers, useToast, require_cloneDeep, UPDATE_WEBHOOK_ID_NODE_TYPES, deepCopy, EnterpriseEditionFeature, NDV_IN_FOCUS_PANEL_EXPERIMENT, WEBHOOK_NODE_TYPE, require__baseUniq, FORM_TRIGGER_NODE_TYPE, isCommunityPackageName, getNodeInputs, LOCAL_STORAGE_LOGS_PANEL_DETAILS_PANEL_SUB_NODE, NodeConnectionTypes, getConnectionTypes, LOCAL_STORAGE_LOGS_PANEL_DETAILS_PANEL, CANVAS_ZOOMED_VIEW_EXPERIMENT, VIEWS, LOCAL_STORAGE_LOGS_PANEL_OPEN, generateNodesGraph, LOCAL_STORAGE_LOGS_SYNC_SELECTION, getNodeOutputs, getSubworkflowId, STICKY_NODE_TYPE, getNodeParameters, MCP_TRIGGER_NODE_TYPE, useExternalHooks, useTemplatesStore, useFocusPanelStore, useExecutionsStore, usePinnedData, mapCanvasConnectionToLegacyConnection, parseCanvasConnectionHandleString, mapLegacyConnectionToCanvasConnection, createCanvasConnectionHandleString, mapLegacyConnectionsToCanvasConnections, useNodeCreatorStore, useClipboard, useFoldersStore, chatEventBus, LOCAL_STORAGE_PANEL_HEIGHT, LOCAL_STORAGE_PANEL_WIDTH, LOCAL_STORAGE_OVERVIEW_PANEL_WIDTH, LOGS_PANEL_STATE, LOG_DETAILS_PANEL_STATE, useLogsStore, require_uniq, useExperimentalNdvStore, canvasEventBus, import_cloneDeep, import_uniq;
|
|
7
|
+
//#region src/app/composables/useUniqueNodeName.ts
|
|
8
|
+
function useUniqueNodeName() {
|
|
9
|
+
/**
|
|
10
|
+
* All in-store node name defaults ending with a number, e.g.
|
|
11
|
+
* `AWS S3`, `Magento 2`, `MSG91`, `S3`, `SIGNL4`, `sms77`
|
|
12
|
+
*/
|
|
13
|
+
function numberSuffixedNames() {
|
|
14
|
+
return useNodeTypesStore().allNodeTypes.reduce((acc, nodeType) => {
|
|
15
|
+
if (typeof nodeType.defaults.name !== "string") throw new Error("Expected node name default to be a string");
|
|
16
|
+
if (/\d$/.test(nodeType.defaults.name)) acc.push(nodeType.defaults.name);
|
|
17
|
+
return acc;
|
|
18
|
+
}, []);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create a unique node name from an original name, based on the names of
|
|
22
|
+
* all nodes on canvas and any extra names that cannot be used.
|
|
23
|
+
*/
|
|
24
|
+
function uniqueNodeName(originalName, extraNames = []) {
|
|
25
|
+
const {
|
|
26
|
+
canvasNames
|
|
27
|
+
} = useWorkflowsStore();
|
|
28
|
+
if (!canvasNames.has(originalName) && !extraNames.includes(originalName)) return originalName;
|
|
29
|
+
const nsn = numberSuffixedNames().find(nsn$1 => originalName.startsWith(nsn$1));
|
|
30
|
+
if (nsn) {
|
|
31
|
+
let unique$1 = "";
|
|
32
|
+
let index$1 = 1;
|
|
33
|
+
const remainder = originalName.split(nsn).pop();
|
|
34
|
+
const lastChar = remainder?.[remainder.length - 1];
|
|
35
|
+
if (lastChar && Number.isInteger(Number(lastChar))) {
|
|
36
|
+
index$1 = parseInt(lastChar, 10);
|
|
37
|
+
originalName = originalName.slice(0, -1);
|
|
38
|
+
}
|
|
39
|
+
unique$1 = originalName;
|
|
40
|
+
while (canvasNames.has(unique$1) || extraNames.includes(unique$1)) unique$1 = originalName + index$1++;
|
|
41
|
+
return unique$1;
|
|
42
|
+
}
|
|
43
|
+
if (/^\d+-?\d*$/.test(originalName)) {
|
|
44
|
+
let unique$1 = "";
|
|
45
|
+
let index$1 = 1;
|
|
46
|
+
const match$1 = originalName.match(/(?<base>\d+)-?(?<suffix>\d*)/);
|
|
47
|
+
if (!match$1?.groups) throw new Error("Failed to find match for unique name");
|
|
48
|
+
if (match$1?.groups?.suffix !== "") index$1 = parseInt(match$1.groups.suffix, 10);
|
|
49
|
+
unique$1 = match$1.groups.base;
|
|
50
|
+
while (canvasNames.has(unique$1) || extraNames.includes(unique$1)) unique$1 = match$1.groups.base + "-" + index$1++;
|
|
51
|
+
return unique$1;
|
|
52
|
+
}
|
|
53
|
+
let unique = "";
|
|
54
|
+
let index = 1;
|
|
55
|
+
const match = originalName.match(/(?<base>.*\D+)(?<suffix>\d*)/);
|
|
56
|
+
if (!match?.groups) throw new Error("Failed to find match for unique name");
|
|
57
|
+
if (match?.groups?.suffix !== "") index = parseInt(match.groups.suffix, 10);
|
|
58
|
+
unique = match.groups.base;
|
|
59
|
+
while (canvasNames.has(unique) || extraNames.includes(unique)) unique = match.groups.base + index++;
|
|
60
|
+
return unique;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
uniqueNodeName
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region ../@n8n/chat/src/utils/event-bus.ts
|
|
69
|
+
function createEventBus$1() {
|
|
70
|
+
const handlers = /* @__PURE__ */new Map();
|
|
71
|
+
function off(eventName, fn) {
|
|
72
|
+
const eventFns = handlers.get(eventName);
|
|
73
|
+
if (eventFns) eventFns.splice(eventFns.indexOf(fn) >>> 0, 1);
|
|
74
|
+
}
|
|
75
|
+
function on(eventName, fn) {
|
|
76
|
+
let eventFns = handlers.get(eventName);
|
|
77
|
+
if (!eventFns) eventFns = [fn];else eventFns.push(fn);
|
|
78
|
+
handlers.set(eventName, eventFns);
|
|
79
|
+
return () => off(eventName, fn);
|
|
80
|
+
}
|
|
81
|
+
function emit(eventName, event) {
|
|
82
|
+
const eventFns = handlers.get(eventName);
|
|
83
|
+
if (eventFns) eventFns.slice().forEach(async handler => {
|
|
84
|
+
await handler(event);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
on,
|
|
89
|
+
off,
|
|
90
|
+
emit
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region ../@n8n/chat/src/event-buses/chatEventBus.ts
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/features/core/folders/composables/useParentFolder.ts
|
|
99
|
+
function useParentFolder() {
|
|
100
|
+
const foldersStore = useFoldersStore();
|
|
101
|
+
const projectsStore = useProjectsStore();
|
|
102
|
+
const workflowsStore = useWorkflowsStore();
|
|
103
|
+
const fetchAndSetParentFolder = async folderId => {
|
|
104
|
+
if (!folderId) return;
|
|
105
|
+
let parentFolder = foldersStore.getCachedFolder(folderId);
|
|
106
|
+
if (!parentFolder && projectsStore.currentProjectId) {
|
|
107
|
+
await foldersStore.getFolderPath(projectsStore.currentProjectId, folderId);
|
|
108
|
+
parentFolder = foldersStore.getCachedFolder(folderId);
|
|
109
|
+
}
|
|
110
|
+
if (parentFolder) workflowsStore.setParentFolder({
|
|
111
|
+
...parentFolder,
|
|
112
|
+
parentFolderId: parentFolder.parentFolder ?? null
|
|
113
|
+
});
|
|
114
|
+
return parentFolder ?? null;
|
|
115
|
+
};
|
|
116
|
+
return {
|
|
117
|
+
fetchAndSetParentFolder
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/app/composables/useCanvasOperations.ts
|
|
123
|
+
|
|
124
|
+
function useCanvasOperations() {
|
|
125
|
+
const rootStore = useRootStore();
|
|
126
|
+
const workflowsStore = useWorkflowsStore();
|
|
127
|
+
const workflowState = injectWorkflowState();
|
|
128
|
+
const credentialsStore = useCredentialsStore();
|
|
129
|
+
const historyStore = useHistoryStore();
|
|
130
|
+
const uiStore = useUIStore();
|
|
131
|
+
const ndvStore = useNDVStore();
|
|
132
|
+
const nodeTypesStore = useNodeTypesStore();
|
|
133
|
+
const canvasStore = useCanvasStore();
|
|
134
|
+
const settingsStore = useSettingsStore();
|
|
135
|
+
const tagsStore = useTagsStore();
|
|
136
|
+
const nodeCreatorStore = useNodeCreatorStore();
|
|
137
|
+
const executionsStore = useExecutionsStore();
|
|
138
|
+
const projectsStore = useProjectsStore();
|
|
139
|
+
const logsStore = useLogsStore();
|
|
140
|
+
const experimentalNdvStore = useExperimentalNdvStore();
|
|
141
|
+
const templatesStore = useTemplatesStore();
|
|
142
|
+
const focusPanelStore = useFocusPanelStore();
|
|
143
|
+
const i18n = useI18n();
|
|
144
|
+
const toast = useToast();
|
|
145
|
+
const workflowHelpers = useWorkflowHelpers();
|
|
146
|
+
const nodeHelpers = useNodeHelpers();
|
|
147
|
+
const telemetry = useTelemetry();
|
|
148
|
+
const externalHooks = useExternalHooks();
|
|
149
|
+
const clipboard = useClipboard();
|
|
150
|
+
const {
|
|
151
|
+
uniqueNodeName
|
|
152
|
+
} = useUniqueNodeName();
|
|
153
|
+
const {
|
|
154
|
+
fetchAndSetParentFolder
|
|
155
|
+
} = useParentFolder();
|
|
156
|
+
const router = useRouter();
|
|
157
|
+
const route = useRoute();
|
|
158
|
+
const lastClickPosition = ref([0, 0]);
|
|
159
|
+
const preventOpeningNDV = !!localStorage.getItem("NodeView.preventOpeningNDV");
|
|
160
|
+
const editableWorkflow = computed(() => workflowsStore.workflow);
|
|
161
|
+
const editableWorkflowObject = computed(() => workflowsStore.workflowObject);
|
|
162
|
+
const triggerNodes = computed(() => {
|
|
163
|
+
return workflowsStore.workflowTriggerNodes;
|
|
164
|
+
});
|
|
165
|
+
/**
|
|
166
|
+
* Node operations
|
|
167
|
+
*/
|
|
168
|
+
function tidyUp({
|
|
169
|
+
result,
|
|
170
|
+
source,
|
|
171
|
+
target
|
|
172
|
+
}, {
|
|
173
|
+
trackEvents = true
|
|
174
|
+
} = {}) {
|
|
175
|
+
updateNodesPosition(result.nodes.map(({
|
|
176
|
+
id,
|
|
177
|
+
x,
|
|
178
|
+
y
|
|
179
|
+
}) => ({
|
|
180
|
+
id,
|
|
181
|
+
position: {
|
|
182
|
+
x,
|
|
183
|
+
y
|
|
184
|
+
}
|
|
185
|
+
})), {
|
|
186
|
+
trackBulk: true,
|
|
187
|
+
trackHistory: true
|
|
188
|
+
});
|
|
189
|
+
if (trackEvents) trackTidyUp({
|
|
190
|
+
result,
|
|
191
|
+
source,
|
|
192
|
+
target
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function trackTidyUp({
|
|
196
|
+
result,
|
|
197
|
+
source,
|
|
198
|
+
target
|
|
199
|
+
}) {
|
|
200
|
+
telemetry.track("User tidied up canvas", {
|
|
201
|
+
source,
|
|
202
|
+
target,
|
|
203
|
+
nodes_count: result.nodes.length
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function updateNodesPosition(events, {
|
|
207
|
+
trackHistory = false,
|
|
208
|
+
trackBulk = true
|
|
209
|
+
} = {}) {
|
|
210
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
211
|
+
events.forEach(({
|
|
212
|
+
id,
|
|
213
|
+
position
|
|
214
|
+
}) => {
|
|
215
|
+
updateNodePosition(id, position, {
|
|
216
|
+
trackHistory
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
220
|
+
}
|
|
221
|
+
function updateNodePosition(id, position, {
|
|
222
|
+
trackHistory = false
|
|
223
|
+
} = {}) {
|
|
224
|
+
const node = workflowsStore.getNodeById(id);
|
|
225
|
+
if (!node) return;
|
|
226
|
+
const oldPosition = [...node.position];
|
|
227
|
+
const newPosition = [position.x, position.y];
|
|
228
|
+
workflowState.setNodePositionById(id, newPosition);
|
|
229
|
+
if (trackHistory) historyStore.pushCommandToUndo(new MoveNodeCommand(node.name, oldPosition, newPosition, Date.now()));
|
|
230
|
+
}
|
|
231
|
+
function revertUpdateNodePosition(nodeName, position) {
|
|
232
|
+
const node = workflowsStore.getNodeByName(nodeName);
|
|
233
|
+
if (!node) return;
|
|
234
|
+
updateNodePosition(node.id, position);
|
|
235
|
+
}
|
|
236
|
+
function replaceNodeParameters(nodeId, currentParameters, newParameters, {
|
|
237
|
+
trackHistory = false,
|
|
238
|
+
trackBulk = true
|
|
239
|
+
} = {}) {
|
|
240
|
+
const node = workflowsStore.getNodeById(nodeId);
|
|
241
|
+
if (!node) return;
|
|
242
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
243
|
+
workflowState.setNodeParameters({
|
|
244
|
+
name: node.name,
|
|
245
|
+
value: newParameters
|
|
246
|
+
});
|
|
247
|
+
if (trackHistory) historyStore.pushCommandToUndo(new ReplaceNodeParametersCommand(nodeId, currentParameters, newParameters, Date.now()));
|
|
248
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
249
|
+
}
|
|
250
|
+
async function revertReplaceNodeParameters(nodeId, currentParameters, newParameters) {
|
|
251
|
+
replaceNodeParameters(nodeId, newParameters, currentParameters);
|
|
252
|
+
}
|
|
253
|
+
async function renameNode(currentName, newName, {
|
|
254
|
+
trackHistory = false,
|
|
255
|
+
trackBulk = true
|
|
256
|
+
} = {}) {
|
|
257
|
+
if (currentName === newName) return;
|
|
258
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
259
|
+
newName = uniqueNodeName(newName);
|
|
260
|
+
const workflow = workflowsStore.cloneWorkflowObject();
|
|
261
|
+
try {
|
|
262
|
+
workflow.renameNode(currentName, newName);
|
|
263
|
+
} catch (error) {
|
|
264
|
+
toast.showMessage({
|
|
265
|
+
type: "error",
|
|
266
|
+
title: error.message,
|
|
267
|
+
message: error.description
|
|
268
|
+
});
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
if (trackHistory) historyStore.pushCommandToUndo(new RenameNodeCommand(currentName, newName, Date.now()));
|
|
272
|
+
workflowsStore.renameNodeSelectedAndExecution({
|
|
273
|
+
old: currentName,
|
|
274
|
+
new: newName
|
|
275
|
+
});
|
|
276
|
+
workflowsStore.setNodes(Object.values(workflow.nodes));
|
|
277
|
+
workflowsStore.setConnections(workflow.connectionsBySourceNode);
|
|
278
|
+
if (ndvStore.activeNodeName === currentName) ndvStore.setActiveNodeName(newName, "other");
|
|
279
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
280
|
+
}
|
|
281
|
+
async function revertRenameNode(currentName, previousName) {
|
|
282
|
+
await renameNode(currentName, previousName);
|
|
283
|
+
}
|
|
284
|
+
function connectAdjacentNodes(id, {
|
|
285
|
+
trackHistory = false
|
|
286
|
+
} = {}) {
|
|
287
|
+
const node = workflowsStore.getNodeById(id);
|
|
288
|
+
if (!node) return;
|
|
289
|
+
const outputConnectionsByType = workflowsStore.outgoingConnectionsByNodeName(node.name);
|
|
290
|
+
const incomingConnectionsByType = workflowsStore.incomingConnectionsByNodeName(node.name);
|
|
291
|
+
for (const [type, incomingConnectionsByInputIndex] of Object.entries(incomingConnectionsByType)) for (const incomingConnection of incomingConnectionsByInputIndex.at(0) ?? []) {
|
|
292
|
+
const incomingNodeId = workflowsStore.getNodeByName(incomingConnection.node)?.id;
|
|
293
|
+
if (!incomingNodeId) continue;
|
|
294
|
+
for (const outgoingConnection of outputConnectionsByType[type]?.at(0) ?? []) {
|
|
295
|
+
const outgoingNodeId = workflowsStore.getNodeByName(outgoingConnection.node)?.id;
|
|
296
|
+
if (!outgoingNodeId) continue;
|
|
297
|
+
if (trackHistory) historyStore.pushCommandToUndo(new AddConnectionCommand([{
|
|
298
|
+
node: incomingConnection.node,
|
|
299
|
+
type,
|
|
300
|
+
index: incomingConnection.index
|
|
301
|
+
}, {
|
|
302
|
+
node: outgoingConnection.node,
|
|
303
|
+
type,
|
|
304
|
+
index: outgoingConnection.index
|
|
305
|
+
}], Date.now()));
|
|
306
|
+
createConnection({
|
|
307
|
+
source: incomingNodeId,
|
|
308
|
+
sourceHandle: createCanvasConnectionHandleString({
|
|
309
|
+
mode: CanvasConnectionMode.Output,
|
|
310
|
+
type,
|
|
311
|
+
index: incomingConnection.index
|
|
312
|
+
}),
|
|
313
|
+
target: outgoingNodeId,
|
|
314
|
+
targetHandle: createCanvasConnectionHandleString({
|
|
315
|
+
mode: CanvasConnectionMode.Input,
|
|
316
|
+
type,
|
|
317
|
+
index: outgoingConnection.index
|
|
318
|
+
})
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function deleteNode(id, {
|
|
324
|
+
trackHistory = false,
|
|
325
|
+
trackBulk = true
|
|
326
|
+
} = {}) {
|
|
327
|
+
const node = workflowsStore.getNodeById(id);
|
|
328
|
+
if (!node) return;
|
|
329
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
330
|
+
if (uiStore.lastInteractedWithNodeId === id) uiStore.lastInteractedWithNodeId = void 0;
|
|
331
|
+
connectAdjacentNodes(id, {
|
|
332
|
+
trackHistory
|
|
333
|
+
});
|
|
334
|
+
deleteConnectionsByNodeId(id, {
|
|
335
|
+
trackHistory,
|
|
336
|
+
trackBulk: false
|
|
337
|
+
});
|
|
338
|
+
workflowsStore.removeNodeExecutionDataById(id);
|
|
339
|
+
workflowsStore.removeNodeById(id);
|
|
340
|
+
if (trackHistory) {
|
|
341
|
+
historyStore.pushCommandToUndo(new RemoveNodeCommand(node, Date.now()));
|
|
342
|
+
if (trackBulk) historyStore.stopRecordingUndo();
|
|
343
|
+
}
|
|
344
|
+
trackDeleteNode(id);
|
|
345
|
+
}
|
|
346
|
+
function deleteNodes(ids, {
|
|
347
|
+
trackHistory = true,
|
|
348
|
+
trackBulk = true
|
|
349
|
+
} = {}) {
|
|
350
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
351
|
+
ids.forEach(id => deleteNode(id, {
|
|
352
|
+
trackHistory,
|
|
353
|
+
trackBulk: false
|
|
354
|
+
}));
|
|
355
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
356
|
+
}
|
|
357
|
+
function revertDeleteNode(node) {
|
|
358
|
+
workflowsStore.addNode(node);
|
|
359
|
+
uiStore.stateIsDirty = true;
|
|
360
|
+
}
|
|
361
|
+
function trackDeleteNode(id) {
|
|
362
|
+
const node = workflowsStore.getNodeById(id);
|
|
363
|
+
if (!node) return;
|
|
364
|
+
if (node.type === "n8n-nodes-base.stickyNote") telemetry.track("User deleted workflow note", {
|
|
365
|
+
workflow_id: workflowsStore.workflowId
|
|
366
|
+
});else {
|
|
367
|
+
externalHooks.run("node.deleteNode", {
|
|
368
|
+
node
|
|
369
|
+
});
|
|
370
|
+
telemetry.track("User deleted node", {
|
|
371
|
+
node_type: node.type,
|
|
372
|
+
workflow_id: workflowsStore.workflowId
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
function replaceNodeConnections(previousId, newId, {
|
|
377
|
+
trackHistory = false,
|
|
378
|
+
trackBulk = true,
|
|
379
|
+
replaceInputs = true,
|
|
380
|
+
replaceOutputs = true
|
|
381
|
+
} = {}) {
|
|
382
|
+
const previousNode = workflowsStore.getNodeById(previousId);
|
|
383
|
+
const newNode = workflowsStore.getNodeById(newId);
|
|
384
|
+
if (!previousNode || !newNode) return;
|
|
385
|
+
const workflowObject = workflowsStore.workflowObject;
|
|
386
|
+
const inputNodeNames = replaceInputs ? (0, import_uniq.default)(workflowObject.getParentNodes(previousNode.name, "ALL", 1)) : [];
|
|
387
|
+
const outputNodeNames = replaceOutputs ? (0, import_uniq.default)(workflowObject.getChildNodes(previousNode.name, "ALL", 1)) : [];
|
|
388
|
+
const connectionPairs = [...workflowObject.getConnectionsBetweenNodes(inputNodeNames, [previousNode.name]), ...workflowObject.getConnectionsBetweenNodes([previousNode.name], outputNodeNames)];
|
|
389
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
390
|
+
for (const pair of connectionPairs) {
|
|
391
|
+
const sourceNode = workflowsStore.getNodeByName(pair[0].node);
|
|
392
|
+
const targetNode = workflowsStore.getNodeByName(pair[1].node);
|
|
393
|
+
if (!sourceNode || !targetNode) continue;
|
|
394
|
+
deleteConnection(mapLegacyConnectionToCanvasConnection(sourceNode, targetNode, pair), {
|
|
395
|
+
trackHistory,
|
|
396
|
+
trackBulk: false
|
|
397
|
+
});
|
|
398
|
+
const newSourceIConnection = {
|
|
399
|
+
...pair[0],
|
|
400
|
+
node: pair[0].node === previousNode.name ? newNode.name : pair[0].node
|
|
401
|
+
};
|
|
402
|
+
const newTargetIConnection = {
|
|
403
|
+
...pair[1],
|
|
404
|
+
node: pair[1].node === previousNode.name ? newNode.name : pair[1].node
|
|
405
|
+
};
|
|
406
|
+
const newSourceNode = sourceNode.name === previousNode.name ? newNode : sourceNode;
|
|
407
|
+
const newTargetNode = targetNode.name === previousNode.name ? newNode : targetNode;
|
|
408
|
+
if (!isConnectionAllowed(newSourceNode, newTargetNode, newSourceIConnection, newTargetIConnection)) continue;
|
|
409
|
+
const newCanvasConnection = mapLegacyConnectionToCanvasConnection(newSourceNode, newTargetNode, [newSourceIConnection, newTargetIConnection]);
|
|
410
|
+
createConnection(newCanvasConnection, {
|
|
411
|
+
trackHistory
|
|
412
|
+
});
|
|
413
|
+
revalidateNodeInputConnections(newCanvasConnection.target);
|
|
414
|
+
revalidateNodeOutputConnections(newCanvasConnection.source);
|
|
415
|
+
}
|
|
416
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
417
|
+
}
|
|
418
|
+
function setNodeActive(id, source) {
|
|
419
|
+
const node = workflowsStore.getNodeById(id);
|
|
420
|
+
if (!node) return;
|
|
421
|
+
workflowsStore.setNodePristine(node.name, false);
|
|
422
|
+
setNodeActiveByName(node.name, source);
|
|
423
|
+
}
|
|
424
|
+
function setNodeActiveByName(name, source) {
|
|
425
|
+
ndvStore.setActiveNodeName(name, source);
|
|
426
|
+
}
|
|
427
|
+
function clearNodeActive() {
|
|
428
|
+
ndvStore.unsetActiveNodeName();
|
|
429
|
+
}
|
|
430
|
+
function setNodeParameters(id, parameters) {
|
|
431
|
+
const node = workflowsStore.getNodeById(id);
|
|
432
|
+
if (!node) return;
|
|
433
|
+
workflowState.setNodeParameters({
|
|
434
|
+
name: node.name,
|
|
435
|
+
value: parameters
|
|
436
|
+
}, true);
|
|
437
|
+
}
|
|
438
|
+
function setNodeSelected(id) {
|
|
439
|
+
if (!id) {
|
|
440
|
+
uiStore.lastInteractedWithNodeId = void 0;
|
|
441
|
+
uiStore.lastSelectedNode = "";
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
const node = workflowsStore.getNodeById(id);
|
|
445
|
+
if (!node) return;
|
|
446
|
+
uiStore.lastInteractedWithNodeId = id;
|
|
447
|
+
uiStore.lastSelectedNode = node.name;
|
|
448
|
+
}
|
|
449
|
+
function toggleNodesDisabled(ids, {
|
|
450
|
+
trackHistory = true,
|
|
451
|
+
trackBulk = true
|
|
452
|
+
} = {}) {
|
|
453
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
454
|
+
const nodes = workflowsStore.getNodesByIds(ids);
|
|
455
|
+
nodeHelpers.disableNodes(nodes, {
|
|
456
|
+
trackHistory,
|
|
457
|
+
trackBulk: false
|
|
458
|
+
});
|
|
459
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
460
|
+
}
|
|
461
|
+
function revertToggleNodeDisabled(nodeName) {
|
|
462
|
+
const node = workflowsStore.getNodeByName(nodeName);
|
|
463
|
+
if (node) nodeHelpers.disableNodes([node]);
|
|
464
|
+
}
|
|
465
|
+
function toggleNodesPinned(ids, source, {
|
|
466
|
+
trackHistory = true,
|
|
467
|
+
trackBulk = true
|
|
468
|
+
} = {}) {
|
|
469
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
470
|
+
const nodes = workflowsStore.getNodesByIds(ids);
|
|
471
|
+
const nextStatePinned = nodes.some(node => !workflowsStore.pinDataByNodeName(node.name));
|
|
472
|
+
for (const node of nodes) {
|
|
473
|
+
const pinnedDataForNode = usePinnedData(node);
|
|
474
|
+
if (nextStatePinned) {
|
|
475
|
+
const dataToPin = useDataSchema().getInputDataWithPinned(node);
|
|
476
|
+
if (dataToPin.length !== 0) pinnedDataForNode.setData(dataToPin, source);
|
|
477
|
+
} else pinnedDataForNode.unsetData(source);
|
|
478
|
+
}
|
|
479
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
480
|
+
}
|
|
481
|
+
function requireNodeTypeDescription(type, version) {
|
|
482
|
+
return nodeTypesStore.getNodeType(type, version) ?? nodeTypesStore.communityNodeType(type)?.nodeDescription ?? {
|
|
483
|
+
properties: [],
|
|
484
|
+
displayName: type,
|
|
485
|
+
name: type,
|
|
486
|
+
group: [],
|
|
487
|
+
description: "",
|
|
488
|
+
version: version ?? 1,
|
|
489
|
+
defaults: {},
|
|
490
|
+
inputs: [],
|
|
491
|
+
outputs: []
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
async function addNodes(nodes, {
|
|
495
|
+
viewport,
|
|
496
|
+
...options
|
|
497
|
+
} = {}) {
|
|
498
|
+
let insertPosition = options.position;
|
|
499
|
+
let lastAddedNode;
|
|
500
|
+
const addedNodes = [];
|
|
501
|
+
const nodesWithTypeVersion = nodes.map(node => {
|
|
502
|
+
const typeVersion = node.typeVersion ?? resolveNodeVersion(requireNodeTypeDescription(node.type));
|
|
503
|
+
return {
|
|
504
|
+
...node,
|
|
505
|
+
typeVersion
|
|
506
|
+
};
|
|
507
|
+
});
|
|
508
|
+
await loadNodeTypesProperties(nodesWithTypeVersion);
|
|
509
|
+
if (options.trackHistory && options.trackBulk) historyStore.startRecordingUndo();
|
|
510
|
+
for (const [index, nodeAddData] of nodesWithTypeVersion.entries()) {
|
|
511
|
+
const {
|
|
512
|
+
isAutoAdd,
|
|
513
|
+
openDetail: openNDV,
|
|
514
|
+
actionName,
|
|
515
|
+
...node
|
|
516
|
+
} = nodeAddData;
|
|
517
|
+
const position = node.position ?? insertPosition;
|
|
518
|
+
const nodeTypeDescription = requireNodeTypeDescription(node.type, node.typeVersion);
|
|
519
|
+
try {
|
|
520
|
+
const newNode = addNode({
|
|
521
|
+
...node,
|
|
522
|
+
position
|
|
523
|
+
}, nodeTypeDescription, {
|
|
524
|
+
...options,
|
|
525
|
+
...(index === 0 ? {
|
|
526
|
+
viewport
|
|
527
|
+
} : {}),
|
|
528
|
+
openNDV,
|
|
529
|
+
isAutoAdd,
|
|
530
|
+
actionName
|
|
531
|
+
});
|
|
532
|
+
lastAddedNode = newNode;
|
|
533
|
+
addedNodes.push(newNode);
|
|
534
|
+
} catch (error) {
|
|
535
|
+
toast.showError(error, i18n.baseText("error"));
|
|
536
|
+
console.error(error);
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
insertPosition = [lastAddedNode.position[0] + DEFAULT_NODE_SIZE[0] * 2 + 16, lastAddedNode.position[1]];
|
|
540
|
+
}
|
|
541
|
+
if (lastAddedNode) updatePositionForNodeWithMultipleInputs(lastAddedNode);
|
|
542
|
+
if (options.trackHistory && options.trackBulk) historyStore.stopRecordingUndo();
|
|
543
|
+
if (!options.keepPristine) uiStore.stateIsDirty = true;
|
|
544
|
+
return addedNodes;
|
|
545
|
+
}
|
|
546
|
+
function updatePositionForNodeWithMultipleInputs(node) {
|
|
547
|
+
const inputNodes = editableWorkflowObject.value.getParentNodesByDepth(node.name, 1);
|
|
548
|
+
if (inputNodes.length > 1) inputNodes.slice(1).forEach((inputNode, index) => {
|
|
549
|
+
const nodeUi = workflowsStore.getNodeByName(inputNode.name);
|
|
550
|
+
if (!nodeUi) return;
|
|
551
|
+
updateNodePosition(nodeUi.id, {
|
|
552
|
+
x: nodeUi.position[0],
|
|
553
|
+
y: nodeUi.position[1] + 100 * (index + 1)
|
|
554
|
+
});
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Check if maximum allowed number of this type of node has been reached
|
|
559
|
+
*/
|
|
560
|
+
function checkMaxNodesOfTypeReached(nodeTypeDescription) {
|
|
561
|
+
if (nodeTypeDescription.maxNodes !== void 0 && workflowHelpers.getNodeTypeCount(nodeTypeDescription.name) >= nodeTypeDescription.maxNodes) throw new Error(i18n.baseText("nodeView.showMessage.showMaxNodeTypeError.message", {
|
|
562
|
+
adjustToNumber: nodeTypeDescription.maxNodes,
|
|
563
|
+
interpolate: {
|
|
564
|
+
nodeTypeDataDisplayName: nodeTypeDescription.displayName
|
|
565
|
+
}
|
|
566
|
+
}));
|
|
567
|
+
}
|
|
568
|
+
function addNode(node, nodeTypeDescription, options = {}) {
|
|
569
|
+
checkMaxNodesOfTypeReached(nodeTypeDescription);
|
|
570
|
+
const nodeData = resolveNodeData(node, nodeTypeDescription, {
|
|
571
|
+
viewport: options.viewport
|
|
572
|
+
});
|
|
573
|
+
if (!nodeData) throw new Error(i18n.baseText("nodeViewV2.showError.failedToCreateNode"));
|
|
574
|
+
workflowsStore.addNode(nodeData);
|
|
575
|
+
if (options.trackHistory) historyStore.pushCommandToUndo(new AddNodeCommand(nodeData, Date.now()));
|
|
576
|
+
if (!options.isAutoAdd) createConnectionToLastInteractedWithNode(nodeData, options);
|
|
577
|
+
nextTick(() => {
|
|
578
|
+
if (!options.keepPristine) uiStore.stateIsDirty = true;
|
|
579
|
+
workflowsStore.setNodePristine(nodeData.name, true);
|
|
580
|
+
nodeHelpers.matchCredentials(nodeData);
|
|
581
|
+
nodeHelpers.updateNodeParameterIssues(nodeData);
|
|
582
|
+
nodeHelpers.updateNodeCredentialIssues(nodeData);
|
|
583
|
+
nodeHelpers.updateNodeInputIssues(nodeData);
|
|
584
|
+
const isStickyNode = nodeData.type === STICKY_NODE_TYPE;
|
|
585
|
+
const nextView = isStickyNode || !options.openNDV || preventOpeningNDV ? void 0 : experimentalNdvStore.isNdvInFocusPanelEnabled && focusPanelStore.focusPanelActive && focusPanelStore.resolvedParameter === void 0 ? "focus_panel" : experimentalNdvStore.isZoomedViewEnabled ? "zoomed_view" : "ndv";
|
|
586
|
+
if (options.telemetry) trackAddNode(nodeData, options, nextView);
|
|
587
|
+
if (!isStickyNode) {
|
|
588
|
+
externalHooks.run("nodeView.addNodeButton", {
|
|
589
|
+
nodeTypeName: nodeData.type
|
|
590
|
+
});
|
|
591
|
+
if (nextView === "focus_panel") {} else if (nextView === "zoomed_view") experimentalNdvStore.setNodeNameToBeFocused(nodeData.name);else if (nextView === "ndv") ndvStore.setActiveNodeName(nodeData.name, "added_new_node");
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
return nodeData;
|
|
595
|
+
}
|
|
596
|
+
async function revertAddNode(nodeName) {
|
|
597
|
+
const node = workflowsStore.getNodeByName(nodeName);
|
|
598
|
+
if (!node) return;
|
|
599
|
+
deleteNode(node.id);
|
|
600
|
+
}
|
|
601
|
+
function createConnectionToLastInteractedWithNode(node, options = {}) {
|
|
602
|
+
const lastInteractedWithNode = uiStore.lastInteractedWithNode;
|
|
603
|
+
if (!lastInteractedWithNode) return;
|
|
604
|
+
const lastInteractedWithNodeId = lastInteractedWithNode.id;
|
|
605
|
+
const lastInteractedWithNodeConnection = uiStore.lastInteractedWithNodeConnection;
|
|
606
|
+
const lastInteractedWithNodeHandle = uiStore.lastInteractedWithNodeHandle;
|
|
607
|
+
if (lastInteractedWithNodeHandle) {
|
|
608
|
+
const {
|
|
609
|
+
type: connectionType,
|
|
610
|
+
mode
|
|
611
|
+
} = parseCanvasConnectionHandleString(lastInteractedWithNodeHandle);
|
|
612
|
+
const nodeId = node.id;
|
|
613
|
+
const nodeHandle = createCanvasConnectionHandleString({
|
|
614
|
+
mode: CanvasConnectionMode.Input,
|
|
615
|
+
type: connectionType,
|
|
616
|
+
index: 0
|
|
617
|
+
});
|
|
618
|
+
if (mode === CanvasConnectionMode.Input) createConnection({
|
|
619
|
+
source: nodeId,
|
|
620
|
+
sourceHandle: nodeHandle,
|
|
621
|
+
target: lastInteractedWithNodeId,
|
|
622
|
+
targetHandle: lastInteractedWithNodeHandle
|
|
623
|
+
});else createConnection({
|
|
624
|
+
source: lastInteractedWithNodeId,
|
|
625
|
+
sourceHandle: lastInteractedWithNodeHandle,
|
|
626
|
+
target: nodeId,
|
|
627
|
+
targetHandle: nodeHandle
|
|
628
|
+
});
|
|
629
|
+
} else createConnection({
|
|
630
|
+
source: lastInteractedWithNodeId,
|
|
631
|
+
sourceHandle: createCanvasConnectionHandleString({
|
|
632
|
+
mode: CanvasConnectionMode.Output,
|
|
633
|
+
type: NodeConnectionTypes.Main,
|
|
634
|
+
index: 0
|
|
635
|
+
}),
|
|
636
|
+
target: node.id,
|
|
637
|
+
targetHandle: createCanvasConnectionHandleString({
|
|
638
|
+
mode: CanvasConnectionMode.Input,
|
|
639
|
+
type: NodeConnectionTypes.Main,
|
|
640
|
+
index: 0
|
|
641
|
+
})
|
|
642
|
+
});
|
|
643
|
+
if (lastInteractedWithNodeConnection) {
|
|
644
|
+
deleteConnection(lastInteractedWithNodeConnection, {
|
|
645
|
+
trackHistory: options.trackHistory
|
|
646
|
+
});
|
|
647
|
+
if (workflowsStore.getNodeById(lastInteractedWithNodeConnection.target)) createConnection({
|
|
648
|
+
source: node.id,
|
|
649
|
+
sourceHandle: createCanvasConnectionHandleString({
|
|
650
|
+
mode: CanvasConnectionMode.Input,
|
|
651
|
+
type: NodeConnectionTypes.Main,
|
|
652
|
+
index: 0
|
|
653
|
+
}),
|
|
654
|
+
target: lastInteractedWithNodeConnection.target,
|
|
655
|
+
targetHandle: lastInteractedWithNodeConnection.targetHandle
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
function trackAddNode(nodeData, options, nextView) {
|
|
660
|
+
switch (nodeData.type) {
|
|
661
|
+
case STICKY_NODE_TYPE:
|
|
662
|
+
trackAddStickyNoteNode();
|
|
663
|
+
break;
|
|
664
|
+
default:
|
|
665
|
+
trackAddDefaultNode(nodeData, options, nextView);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
function trackAddStickyNoteNode() {
|
|
669
|
+
telemetry.track("User inserted workflow note", {
|
|
670
|
+
workflow_id: workflowsStore.workflowId
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
function trackAddDefaultNode(nodeData, options, nextView) {
|
|
674
|
+
const nodeParameters = nodeData.parameters;
|
|
675
|
+
const resource = typeof nodeParameters?.resource === "string" ? nodeParameters.resource : void 0;
|
|
676
|
+
const operation = typeof nodeParameters?.operation === "string" ? nodeParameters.operation : void 0;
|
|
677
|
+
nodeCreatorStore.onNodeAddedToCanvas({
|
|
678
|
+
node_id: nodeData.id,
|
|
679
|
+
node_type: nodeData.type,
|
|
680
|
+
node_version: nodeData.typeVersion,
|
|
681
|
+
is_auto_add: options.isAutoAdd,
|
|
682
|
+
workflow_id: workflowsStore.workflowId,
|
|
683
|
+
drag_and_drop: options.dragAndDrop,
|
|
684
|
+
input_node_type: uiStore.lastInteractedWithNode ? uiStore.lastInteractedWithNode.type : void 0,
|
|
685
|
+
resource,
|
|
686
|
+
operation,
|
|
687
|
+
action: options.actionName,
|
|
688
|
+
next_view_shown: nextView
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Resolves the data for a new node
|
|
693
|
+
*/
|
|
694
|
+
function resolveNodeData(node, nodeTypeDescription, options = {}) {
|
|
695
|
+
const id = node.id ?? nodeHelpers.assignNodeId(node);
|
|
696
|
+
const name = node.name ?? nodeHelpers.getDefaultNodeName(node) ?? nodeTypeDescription.defaults.name;
|
|
697
|
+
const type = nodeTypeDescription.name;
|
|
698
|
+
const typeVersion = node.typeVersion;
|
|
699
|
+
const position = options.forcePosition && node.position ? node.position : resolveNodePosition(node, nodeTypeDescription, {
|
|
700
|
+
viewport: options.viewport
|
|
701
|
+
});
|
|
702
|
+
const disabled = node.disabled ?? false;
|
|
703
|
+
const parameters = node.parameters ?? {};
|
|
704
|
+
const nodeData = {
|
|
705
|
+
...node,
|
|
706
|
+
id,
|
|
707
|
+
name,
|
|
708
|
+
type,
|
|
709
|
+
typeVersion,
|
|
710
|
+
position,
|
|
711
|
+
disabled,
|
|
712
|
+
parameters
|
|
713
|
+
};
|
|
714
|
+
resolveNodeName(nodeData);
|
|
715
|
+
resolveNodeParameters(nodeData, nodeTypeDescription);
|
|
716
|
+
resolveNodeWebhook(nodeData, nodeTypeDescription);
|
|
717
|
+
return nodeData;
|
|
718
|
+
}
|
|
719
|
+
async function loadNodeTypesProperties(nodes) {
|
|
720
|
+
const allNodeTypeDescriptions = nodeTypesStore.allNodeTypes;
|
|
721
|
+
const nodesToBeFetched = [];
|
|
722
|
+
allNodeTypeDescriptions.forEach(nodeTypeDescription => {
|
|
723
|
+
const nodeVersions = Array.isArray(nodeTypeDescription.version) ? nodeTypeDescription.version : [nodeTypeDescription.version];
|
|
724
|
+
if (!!nodes.find(n => n.type === nodeTypeDescription.name && nodeVersions.includes(n.typeVersion)) && !nodeTypeDescription.hasOwnProperty("properties")) nodesToBeFetched.push({
|
|
725
|
+
name: nodeTypeDescription.name,
|
|
726
|
+
version: Array.isArray(nodeTypeDescription.version) ? nodeTypeDescription.version.slice(-1)[0] : nodeTypeDescription.version
|
|
727
|
+
});
|
|
728
|
+
});
|
|
729
|
+
if (nodesToBeFetched.length > 0) await nodeTypesStore.getNodesInformation(nodesToBeFetched);
|
|
730
|
+
}
|
|
731
|
+
function resolveNodeVersion(nodeTypeDescription) {
|
|
732
|
+
let nodeVersion = nodeTypeDescription.defaultVersion;
|
|
733
|
+
if (typeof nodeVersion === "undefined") nodeVersion = Array.isArray(nodeTypeDescription.version) ? nodeTypeDescription.version.slice(-1)[0] : nodeTypeDescription.version;
|
|
734
|
+
return nodeVersion;
|
|
735
|
+
}
|
|
736
|
+
function resolveNodeParameters(node, nodeTypeDescription) {
|
|
737
|
+
node.parameters = getNodeParameters(nodeTypeDescription?.properties ?? [], node.parameters, true, false, node, nodeTypeDescription) ?? {};
|
|
738
|
+
}
|
|
739
|
+
function resolveNodePosition(node, nodeTypeDescription, options = {}) {
|
|
740
|
+
const lastInteractedWithNode = uiStore.lastInteractedWithNode;
|
|
741
|
+
const lastInteractedWithNodeConnection = uiStore.lastInteractedWithNodeConnection;
|
|
742
|
+
const lastInteractedWithNodeHandle = uiStore.lastInteractedWithNodeHandle;
|
|
743
|
+
const {
|
|
744
|
+
type: connectionType,
|
|
745
|
+
index: connectionIndex
|
|
746
|
+
} = parseCanvasConnectionHandleString(lastInteractedWithNodeHandle ?? lastInteractedWithNodeConnection?.sourceHandle ?? "");
|
|
747
|
+
const nodeSize = connectionType === NodeConnectionTypes.Main ? DEFAULT_NODE_SIZE : CONFIGURATION_NODE_SIZE;
|
|
748
|
+
const pushOffsets = [nodeSize[0] / 2, nodeSize[1] / 2];
|
|
749
|
+
let position = node.position;
|
|
750
|
+
if (position) return getNewNodePosition(workflowsStore.allNodes, position, {
|
|
751
|
+
offset: pushOffsets,
|
|
752
|
+
size: nodeSize,
|
|
753
|
+
viewport: options.viewport,
|
|
754
|
+
normalize: false
|
|
755
|
+
});
|
|
756
|
+
if (lastInteractedWithNode) {
|
|
757
|
+
const lastInteractedWithNodeTypeDescription = nodeTypesStore.getNodeType(lastInteractedWithNode.type, lastInteractedWithNode.typeVersion);
|
|
758
|
+
const lastInteractedWithNodeObject = editableWorkflowObject.value.getNode(lastInteractedWithNode.name);
|
|
759
|
+
const newNodeInsertPosition = uiStore.lastCancelledConnectionPosition;
|
|
760
|
+
if (newNodeInsertPosition) {
|
|
761
|
+
const xOffset = connectionType === NodeConnectionTypes.Main ? 0 : -nodeSize[0] / 2;
|
|
762
|
+
const yOffset = connectionType === NodeConnectionTypes.Main ? -nodeSize[1] / 2 : 0;
|
|
763
|
+
position = [newNodeInsertPosition[0] + xOffset, newNodeInsertPosition[1] + yOffset];
|
|
764
|
+
uiStore.lastCancelledConnectionPosition = void 0;
|
|
765
|
+
} else if (lastInteractedWithNodeTypeDescription && lastInteractedWithNodeObject) {
|
|
766
|
+
const lastInteractedWithNodeInputs = getNodeInputs(editableWorkflowObject.value, lastInteractedWithNodeObject, lastInteractedWithNodeTypeDescription);
|
|
767
|
+
const lastInteractedWithNodeInputTypes = getConnectionTypes(lastInteractedWithNodeInputs);
|
|
768
|
+
const lastInteractedWithNodeScopedInputTypes = (lastInteractedWithNodeInputTypes || []).filter(input => input !== NodeConnectionTypes.Main);
|
|
769
|
+
const lastInteractedWithNodeOutputs = getNodeOutputs(editableWorkflowObject.value, lastInteractedWithNodeObject, lastInteractedWithNodeTypeDescription);
|
|
770
|
+
const lastInteractedWithNodeMainOutputs = getConnectionTypes(lastInteractedWithNodeOutputs).filter(output => output === NodeConnectionTypes.Main);
|
|
771
|
+
let yOffset = 0;
|
|
772
|
+
if (lastInteractedWithNodeConnection) shiftDownstreamNodesPosition(lastInteractedWithNode.name, PUSH_NODES_OFFSET, {
|
|
773
|
+
trackHistory: true
|
|
774
|
+
});
|
|
775
|
+
if (lastInteractedWithNodeMainOutputs.length > 1) yOffset = generateOffsets(lastInteractedWithNodeMainOutputs.length, DEFAULT_NODE_SIZE[1], 16)[connectionIndex];
|
|
776
|
+
let outputs = [];
|
|
777
|
+
try {
|
|
778
|
+
outputs = getNodeOutputs(editableWorkflowObject.value, node, nodeTypeDescription);
|
|
779
|
+
} catch (e) {}
|
|
780
|
+
const outputTypes = getConnectionTypes(outputs);
|
|
781
|
+
const customOffset = {
|
|
782
|
+
[NodeConnectionTypes.AiLanguageModel]: nodeSize[0] * 2,
|
|
783
|
+
[NodeConnectionTypes.AiMemory]: nodeSize[0]
|
|
784
|
+
}[connectionType] ?? 0;
|
|
785
|
+
if (outputTypes.length > 0 && outputTypes.every(outputName => outputName !== NodeConnectionTypes.Main)) {
|
|
786
|
+
const scopedConnectionIndex = lastInteractedWithNodeScopedInputTypes.findIndex(inputType => outputs[0] === inputType);
|
|
787
|
+
const lastInteractedWithNodeWidthDivisions = Math.max(lastInteractedWithNodeScopedInputTypes.length + 1, 1);
|
|
788
|
+
position = [lastInteractedWithNode.position[0] + CONFIGURABLE_NODE_SIZE[0] / lastInteractedWithNodeWidthDivisions * (scopedConnectionIndex + 1) - nodeSize[0] / 2 - customOffset, lastInteractedWithNode.position[1] + PUSH_NODES_OFFSET];
|
|
789
|
+
} else {
|
|
790
|
+
let pushOffset = PUSH_NODES_OFFSET;
|
|
791
|
+
if (lastInteractedWithNodeInputTypes.find(input => input !== NodeConnectionTypes.Main)) pushOffset += 140;
|
|
792
|
+
position = [lastInteractedWithNode.position[0] + pushOffset, lastInteractedWithNode.position[1] + yOffset];
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
if (!position) if (nodeTypesStore.isTriggerNode(node.type) && triggerNodes.value.length === 0) position = [0, 0];else position = lastClickPosition.value;
|
|
797
|
+
return getNewNodePosition(workflowsStore.allNodes, position, {
|
|
798
|
+
offset: pushOffsets,
|
|
799
|
+
size: nodeSize,
|
|
800
|
+
viewport: options.viewport
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
function resolveNodeName(node) {
|
|
804
|
+
node.name = uniqueNodeName(i18n.localizeNodeName(rootStore.defaultLocale, node.name, node.type));
|
|
805
|
+
}
|
|
806
|
+
function resolveNodeWebhook(node, nodeTypeDescription) {
|
|
807
|
+
if (nodeTypeDescription.webhooks?.length && !node.webhookId) nodeHelpers.assignWebhookId(node);
|
|
808
|
+
if (["n8n-nodes-base.webhook", "n8n-nodes-base.formTrigger", "@n8n/n8n-nodes-langchain.mcpTrigger"].includes(node.type) && node.parameters.path === "") node.parameters.path = node.webhookId;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Moves all downstream nodes of a node
|
|
812
|
+
*/
|
|
813
|
+
function shiftDownstreamNodesPosition(sourceNodeName, margin, {
|
|
814
|
+
trackHistory = false
|
|
815
|
+
}) {
|
|
816
|
+
const sourceNode = workflowsStore.nodesByName[sourceNodeName];
|
|
817
|
+
const checkNodes = workflowHelpers.getConnectedNodes("downstream", editableWorkflowObject.value, sourceNodeName);
|
|
818
|
+
for (const nodeName of checkNodes) {
|
|
819
|
+
const node = workflowsStore.nodesByName[nodeName];
|
|
820
|
+
if (!node || !sourceNode || node.position[0] < sourceNode.position[0]) continue;
|
|
821
|
+
updateNodePosition(node.id, {
|
|
822
|
+
x: node.position[0] + margin,
|
|
823
|
+
y: node.position[1]
|
|
824
|
+
}, {
|
|
825
|
+
trackHistory
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Connection operations
|
|
831
|
+
*/
|
|
832
|
+
function createConnection(connection, {
|
|
833
|
+
trackHistory = false,
|
|
834
|
+
keepPristine = false
|
|
835
|
+
} = {}) {
|
|
836
|
+
const sourceNode = workflowsStore.getNodeById(connection.source);
|
|
837
|
+
const targetNode = workflowsStore.getNodeById(connection.target);
|
|
838
|
+
if (!sourceNode || !targetNode) return;
|
|
839
|
+
if (trackHistory) historyStore.pushCommandToUndo(new AddConnectionCommand(mapCanvasConnectionToLegacyConnection(sourceNode, targetNode, connection), Date.now()));
|
|
840
|
+
const mappedConnection = mapCanvasConnectionToLegacyConnection(sourceNode, targetNode, connection);
|
|
841
|
+
if (!isConnectionAllowed(sourceNode, targetNode, mappedConnection[0], mappedConnection[1])) return;
|
|
842
|
+
workflowsStore.addConnection({
|
|
843
|
+
connection: mappedConnection
|
|
844
|
+
});
|
|
845
|
+
nextTick(() => {
|
|
846
|
+
nodeHelpers.updateNodeInputIssues(sourceNode);
|
|
847
|
+
nodeHelpers.updateNodeInputIssues(targetNode);
|
|
848
|
+
});
|
|
849
|
+
if (!keepPristine) uiStore.stateIsDirty = true;
|
|
850
|
+
}
|
|
851
|
+
function revertCreateConnection(connection) {
|
|
852
|
+
const sourceNodeName = connection[0].node;
|
|
853
|
+
const sourceNode = workflowsStore.getNodeByName(sourceNodeName);
|
|
854
|
+
const targetNodeName = connection[1].node;
|
|
855
|
+
const targetNode = workflowsStore.getNodeByName(targetNodeName);
|
|
856
|
+
if (!sourceNode || !targetNode) return;
|
|
857
|
+
deleteConnection(mapLegacyConnectionToCanvasConnection(sourceNode, targetNode, connection));
|
|
858
|
+
}
|
|
859
|
+
function deleteConnectionsByNodeId(targetNodeId, {
|
|
860
|
+
trackHistory = false,
|
|
861
|
+
trackBulk = true
|
|
862
|
+
} = {}) {
|
|
863
|
+
const targetNode = workflowsStore.getNodeById(targetNodeId);
|
|
864
|
+
if (!targetNode) return;
|
|
865
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
866
|
+
const connections = (0, import_cloneDeep.default)(workflowsStore.workflow.connections);
|
|
867
|
+
for (const nodeName of Object.keys(connections)) {
|
|
868
|
+
const node = workflowsStore.getNodeByName(nodeName);
|
|
869
|
+
if (!node) continue;
|
|
870
|
+
for (const type of Object.keys(connections[nodeName])) for (const index of Object.keys(connections[nodeName][type])) {
|
|
871
|
+
const connectionsToDelete = connections[nodeName][type][parseInt(index, 10)] ?? [];
|
|
872
|
+
for (const connectionIndex of Object.keys(connectionsToDelete)) {
|
|
873
|
+
const connectionData = connectionsToDelete[parseInt(connectionIndex, 10)];
|
|
874
|
+
if (!connectionData) continue;
|
|
875
|
+
const connectionDataNode = workflowsStore.getNodeByName(connectionData.node);
|
|
876
|
+
if (connectionDataNode && (connectionDataNode.id === targetNode.id || node.name === targetNode.name)) deleteConnection({
|
|
877
|
+
source: node.id,
|
|
878
|
+
sourceHandle: createCanvasConnectionHandleString({
|
|
879
|
+
mode: CanvasConnectionMode.Output,
|
|
880
|
+
type,
|
|
881
|
+
index: parseInt(index, 10)
|
|
882
|
+
}),
|
|
883
|
+
target: connectionDataNode.id,
|
|
884
|
+
targetHandle: createCanvasConnectionHandleString({
|
|
885
|
+
mode: CanvasConnectionMode.Input,
|
|
886
|
+
type: connectionData.type,
|
|
887
|
+
index: connectionData.index
|
|
888
|
+
})
|
|
889
|
+
}, {
|
|
890
|
+
trackHistory,
|
|
891
|
+
trackBulk: false
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
delete workflowsStore.workflow.connections[targetNode.name];
|
|
897
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
898
|
+
}
|
|
899
|
+
function deleteConnection(connection, {
|
|
900
|
+
trackHistory = false,
|
|
901
|
+
trackBulk = true
|
|
902
|
+
} = {}) {
|
|
903
|
+
const sourceNode = workflowsStore.getNodeById(connection.source);
|
|
904
|
+
const targetNode = workflowsStore.getNodeById(connection.target);
|
|
905
|
+
if (!sourceNode || !targetNode) return;
|
|
906
|
+
const mappedConnection = mapCanvasConnectionToLegacyConnection(sourceNode, targetNode, connection);
|
|
907
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
908
|
+
workflowsStore.removeConnection({
|
|
909
|
+
connection: mappedConnection
|
|
910
|
+
});
|
|
911
|
+
if (trackHistory) {
|
|
912
|
+
historyStore.pushCommandToUndo(new RemoveConnectionCommand(mappedConnection, Date.now()));
|
|
913
|
+
if (trackBulk) historyStore.stopRecordingUndo();
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
function revertDeleteConnection(connection) {
|
|
917
|
+
workflowsStore.addConnection({
|
|
918
|
+
connection
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
function revalidateNodeConnections(id, connectionMode) {
|
|
922
|
+
const node = workflowsStore.getNodeById(id);
|
|
923
|
+
const isInput = connectionMode === CanvasConnectionMode.Input;
|
|
924
|
+
if (!node) return;
|
|
925
|
+
if (!nodeTypesStore.getNodeType(node.type, node.typeVersion)) return;
|
|
926
|
+
mapLegacyConnectionsToCanvasConnections(workflowsStore.workflow.connections, workflowsStore.workflow.nodes).forEach(connection => {
|
|
927
|
+
if (isInput ? connection.target === id : connection.source === id) {
|
|
928
|
+
const otherNodeId = isInput ? connection.source : connection.target;
|
|
929
|
+
const otherNode = workflowsStore.getNodeById(otherNodeId);
|
|
930
|
+
if (!otherNode || !connection.data) return;
|
|
931
|
+
const [firstNode, secondNode] = isInput ? [otherNode, node] : [node, otherNode];
|
|
932
|
+
if (!isConnectionAllowed(firstNode, secondNode, connection.data.source, connection.data.target)) nextTick(() => deleteConnection(connection));
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
function revalidateNodeInputConnections(id) {
|
|
937
|
+
return revalidateNodeConnections(id, CanvasConnectionMode.Input);
|
|
938
|
+
}
|
|
939
|
+
function revalidateNodeOutputConnections(id) {
|
|
940
|
+
return revalidateNodeConnections(id, CanvasConnectionMode.Output);
|
|
941
|
+
}
|
|
942
|
+
function isConnectionAllowed(sourceNode, targetNode, sourceConnection, targetConnection) {
|
|
943
|
+
const blocklist = [STICKY_NODE_TYPE];
|
|
944
|
+
const checkIsNotInstalledCommunityNode = node => isCommunityPackageName(node.type) && !useNodeTypesStore().getIsNodeInstalled(node.type);
|
|
945
|
+
const isSourceNotInstalled = checkIsNotInstalledCommunityNode(sourceNode);
|
|
946
|
+
const isTargetNotInstalled = checkIsNotInstalledCommunityNode(targetNode);
|
|
947
|
+
const getNodeType = node => {
|
|
948
|
+
return nodeTypesStore.getNodeType(node.type, node.typeVersion) ?? nodeTypesStore.communityNodeType(node.type)?.nodeDescription;
|
|
949
|
+
};
|
|
950
|
+
if (sourceConnection.type !== targetConnection.type) return false;
|
|
951
|
+
if (blocklist.includes(sourceNode.type) || blocklist.includes(targetNode.type)) return false;
|
|
952
|
+
const sourceNodeType = getNodeType(sourceNode);
|
|
953
|
+
const sourceWorkflowNode = editableWorkflowObject.value.getNode(sourceNode.name);
|
|
954
|
+
if (!sourceWorkflowNode) return false;
|
|
955
|
+
let sourceNodeOutputs = [];
|
|
956
|
+
if (sourceNodeType) sourceNodeOutputs = getNodeOutputs(editableWorkflowObject.value, sourceWorkflowNode, sourceNodeType) || [];
|
|
957
|
+
const sourceNodeHasOutputConnectionOfType = !!sourceNodeOutputs.find(output => {
|
|
958
|
+
return (typeof output === "string" ? output : output.type) === sourceConnection.type;
|
|
959
|
+
});
|
|
960
|
+
const sourceNodeHasOutputConnectionPortOfType = sourceConnection.index < sourceNodeOutputs.length;
|
|
961
|
+
if ((!sourceNodeHasOutputConnectionOfType || !sourceNodeHasOutputConnectionPortOfType) && !isSourceNotInstalled) return false;
|
|
962
|
+
const targetNodeType = getNodeType(targetNode);
|
|
963
|
+
const targetWorkflowNode = editableWorkflowObject.value.getNode(targetNode.name);
|
|
964
|
+
if (!targetWorkflowNode) return false;
|
|
965
|
+
let targetNodeInputs = [];
|
|
966
|
+
if (targetNodeType) targetNodeInputs = getNodeInputs(editableWorkflowObject.value, targetWorkflowNode, targetNodeType) || [];
|
|
967
|
+
const targetNodeHasInputConnectionOfType = !!targetNodeInputs.find(input => {
|
|
968
|
+
if ((typeof input === "string" ? input : input.type) !== targetConnection.type) return false;
|
|
969
|
+
const filter = typeof input === "object" && "filter" in input ? input.filter : void 0;
|
|
970
|
+
if (filter?.nodes?.length && !filter.nodes?.includes(sourceNode.type) || filter?.excludedNodes?.length && filter.excludedNodes?.includes(sourceNode.type)) {
|
|
971
|
+
toast.showToast({
|
|
972
|
+
title: i18n.baseText("nodeView.showError.nodeNodeCompatible.title"),
|
|
973
|
+
message: i18n.baseText("nodeView.showError.nodeNodeCompatible.message", {
|
|
974
|
+
interpolate: {
|
|
975
|
+
sourceNodeName: sourceNode.name,
|
|
976
|
+
targetNodeName: targetNode.name
|
|
977
|
+
}
|
|
978
|
+
}),
|
|
979
|
+
type: "error",
|
|
980
|
+
duration: 5e3
|
|
981
|
+
});
|
|
982
|
+
return false;
|
|
983
|
+
}
|
|
984
|
+
return true;
|
|
985
|
+
});
|
|
986
|
+
const targetNodeHasInputConnectionPortOfType = targetConnection.index < targetNodeInputs.length;
|
|
987
|
+
if ((!targetNodeHasInputConnectionOfType || !targetNodeHasInputConnectionPortOfType) && !isTargetNotInstalled) return false;
|
|
988
|
+
return true;
|
|
989
|
+
}
|
|
990
|
+
async function addConnections(connections, {
|
|
991
|
+
trackBulk = true,
|
|
992
|
+
trackHistory = false,
|
|
993
|
+
keepPristine = false
|
|
994
|
+
} = {}) {
|
|
995
|
+
await nextTick();
|
|
996
|
+
if (trackBulk && trackHistory) historyStore.startRecordingUndo();
|
|
997
|
+
for (const connection of connections) createConnection(connection, {
|
|
998
|
+
trackHistory,
|
|
999
|
+
keepPristine
|
|
1000
|
+
});
|
|
1001
|
+
if (trackBulk && trackHistory) historyStore.stopRecordingUndo();
|
|
1002
|
+
if (!keepPristine) uiStore.stateIsDirty = true;
|
|
1003
|
+
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Workspace operations
|
|
1006
|
+
*/
|
|
1007
|
+
function resetWorkspace() {
|
|
1008
|
+
nodeCreatorStore.setNodeCreatorState({
|
|
1009
|
+
createNodeActive: false
|
|
1010
|
+
});
|
|
1011
|
+
nodeCreatorStore.setShowScrim(false);
|
|
1012
|
+
if (workflowsStore.executionWaitingForWebhook) try {
|
|
1013
|
+
workflowsStore.removeTestWebhook(workflowsStore.workflowId);
|
|
1014
|
+
} catch (error) {}
|
|
1015
|
+
workflowsStore.resetWorkflow();
|
|
1016
|
+
workflowState.resetState();
|
|
1017
|
+
workflowsStore.currentWorkflowExecutions = [];
|
|
1018
|
+
workflowState.setActiveExecutionId(void 0);
|
|
1019
|
+
workflowsStore.lastSuccessfulExecution = null;
|
|
1020
|
+
uiStore.resetLastInteractedWith();
|
|
1021
|
+
uiStore.stateIsDirty = false;
|
|
1022
|
+
executionsStore.activeExecution = null;
|
|
1023
|
+
nodeHelpers.credentialsUpdated.value = false;
|
|
1024
|
+
}
|
|
1025
|
+
function initializeWorkspace(data) {
|
|
1026
|
+
workflowHelpers.initState(data);
|
|
1027
|
+
data.nodes.forEach(node => {
|
|
1028
|
+
const nodeTypeDescription = requireNodeTypeDescription(node.type, node.typeVersion);
|
|
1029
|
+
const isUnknownNode = !nodeTypesStore.getNodeType(node.type, node.typeVersion) && !nodeTypesStore.communityNodeType(node.type)?.nodeDescription;
|
|
1030
|
+
nodeHelpers.matchCredentials(node);
|
|
1031
|
+
if (!isUnknownNode) {
|
|
1032
|
+
resolveNodeParameters(node, nodeTypeDescription);
|
|
1033
|
+
resolveNodeWebhook(node, nodeTypeDescription);
|
|
1034
|
+
}
|
|
1035
|
+
});
|
|
1036
|
+
workflowsStore.setNodes(data.nodes);
|
|
1037
|
+
workflowsStore.setConnections(data.connections);
|
|
1038
|
+
}
|
|
1039
|
+
const initializeUnknownNodes = nodes => {
|
|
1040
|
+
nodes.forEach(node => {
|
|
1041
|
+
const nodeTypeDescription = requireNodeTypeDescription(node.type, node.typeVersion);
|
|
1042
|
+
nodeHelpers.matchCredentials(node);
|
|
1043
|
+
resolveNodeParameters(node, nodeTypeDescription);
|
|
1044
|
+
resolveNodeWebhook(node, nodeTypeDescription);
|
|
1045
|
+
const nodeIndex = workflowsStore.workflow.nodes.findIndex(n => {
|
|
1046
|
+
return n.name === node.name;
|
|
1047
|
+
});
|
|
1048
|
+
workflowState.updateNodeAtIndex(nodeIndex, node);
|
|
1049
|
+
});
|
|
1050
|
+
};
|
|
1051
|
+
/**
|
|
1052
|
+
* Import operations
|
|
1053
|
+
*/
|
|
1054
|
+
function removeUnknownCredentials(workflow) {
|
|
1055
|
+
if (!workflow?.nodes) return;
|
|
1056
|
+
for (const node of workflow.nodes) {
|
|
1057
|
+
if (!node.credentials) continue;
|
|
1058
|
+
for (const [name, credential] of Object.entries(node.credentials)) {
|
|
1059
|
+
if (typeof credential === "string" || credential.id === null) continue;
|
|
1060
|
+
if (!credentialsStore.getCredentialById(credential.id)) delete node.credentials[name];
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
async function addImportedNodesToWorkflow(data, {
|
|
1065
|
+
trackBulk = true,
|
|
1066
|
+
trackHistory = false,
|
|
1067
|
+
viewport = DEFAULT_VIEWPORT_BOUNDARIES
|
|
1068
|
+
} = {}) {
|
|
1069
|
+
const nodeNameTable = {};
|
|
1070
|
+
const newNodeNames = new Set((data.nodes ?? []).map(node => node.name));
|
|
1071
|
+
if (!data.nodes) throw new Error(i18n.baseText("nodeView.noNodesGivenToAdd"));
|
|
1072
|
+
const nodeTypesCount = workflowHelpers.getNodeTypesMaxCount();
|
|
1073
|
+
let oldName;
|
|
1074
|
+
let newName;
|
|
1075
|
+
const createNodes = [];
|
|
1076
|
+
await nodeHelpers.loadNodesProperties(data.nodes.map(node => ({
|
|
1077
|
+
name: node.type,
|
|
1078
|
+
version: node.typeVersion
|
|
1079
|
+
})));
|
|
1080
|
+
data.nodes.forEach(node => {
|
|
1081
|
+
if (nodeTypesCount[node.type] !== void 0) if (nodeTypesCount[node.type].exist >= nodeTypesCount[node.type].max) {
|
|
1082
|
+
nodeNameTable[node.name] = nodeTypesCount[node.type].nodeNames[0];
|
|
1083
|
+
return;
|
|
1084
|
+
} else nodeTypesCount[node.type].exist += 1;
|
|
1085
|
+
oldName = node.name;
|
|
1086
|
+
const localized = i18n.localizeNodeName(rootStore.defaultLocale, node.name, node.type);
|
|
1087
|
+
newNodeNames.delete(oldName);
|
|
1088
|
+
newName = uniqueNodeName(localized, Array.from(newNodeNames));
|
|
1089
|
+
newNodeNames.add(newName);
|
|
1090
|
+
nodeNameTable[oldName] = newName;
|
|
1091
|
+
createNodes.push(node);
|
|
1092
|
+
});
|
|
1093
|
+
const newConnections = {};
|
|
1094
|
+
const currentConnections = data.connections ?? {};
|
|
1095
|
+
const createNodeNames = createNodes.map(node => node.name);
|
|
1096
|
+
let sourceNode, type, sourceIndex, connectionIndex, connectionData;
|
|
1097
|
+
for (sourceNode of Object.keys(currentConnections)) {
|
|
1098
|
+
if (!createNodeNames.includes(sourceNode)) continue;
|
|
1099
|
+
const connection = {};
|
|
1100
|
+
for (type of Object.keys(currentConnections[sourceNode])) {
|
|
1101
|
+
connection[type] = [];
|
|
1102
|
+
for (sourceIndex = 0; sourceIndex < currentConnections[sourceNode][type].length; sourceIndex++) {
|
|
1103
|
+
const nodeSourceConnections = [];
|
|
1104
|
+
const connectionsToCheck = currentConnections[sourceNode][type][sourceIndex];
|
|
1105
|
+
if (connectionsToCheck) for (connectionIndex = 0; connectionIndex < connectionsToCheck.length; connectionIndex++) {
|
|
1106
|
+
connectionData = connectionsToCheck[connectionIndex];
|
|
1107
|
+
if (!createNodeNames.includes(connectionData.node)) continue;
|
|
1108
|
+
nodeSourceConnections.push(connectionData);
|
|
1109
|
+
}
|
|
1110
|
+
connection[type].push(nodeSourceConnections);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
newConnections[sourceNode] = connection;
|
|
1114
|
+
}
|
|
1115
|
+
const tempWorkflow = workflowsStore.createWorkflowObject(createNodes, newConnections);
|
|
1116
|
+
for (oldName in nodeNameTable) {
|
|
1117
|
+
if (oldName === nodeNameTable[oldName]) continue;
|
|
1118
|
+
tempWorkflow.renameNode(oldName, nodeNameTable[oldName]);
|
|
1119
|
+
}
|
|
1120
|
+
if (data.pinData) {
|
|
1121
|
+
let pinDataSuccess = true;
|
|
1122
|
+
for (const nodeName of Object.keys(data.pinData)) {
|
|
1123
|
+
if (!pinDataSuccess) {
|
|
1124
|
+
toast.showError(new Error(i18n.baseText("ndv.pinData.error.tooLarge.description")), i18n.baseText("ndv.pinData.error.tooLarge.title"));
|
|
1125
|
+
continue;
|
|
1126
|
+
}
|
|
1127
|
+
const node = tempWorkflow.nodes[nodeNameTable[nodeName]];
|
|
1128
|
+
try {
|
|
1129
|
+
usePinnedData(node).setData(data.pinData[nodeName], "add-nodes");
|
|
1130
|
+
pinDataSuccess = true;
|
|
1131
|
+
} catch (error) {
|
|
1132
|
+
pinDataSuccess = false;
|
|
1133
|
+
console.error(error);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
if (trackBulk && trackHistory) historyStore.startRecordingUndo();
|
|
1138
|
+
await addNodes(Object.values(tempWorkflow.nodes), {
|
|
1139
|
+
trackBulk: false,
|
|
1140
|
+
trackHistory,
|
|
1141
|
+
viewport
|
|
1142
|
+
});
|
|
1143
|
+
await addConnections(mapLegacyConnectionsToCanvasConnections(tempWorkflow.connectionsBySourceNode, Object.values(tempWorkflow.nodes)), {
|
|
1144
|
+
trackBulk: false,
|
|
1145
|
+
trackHistory
|
|
1146
|
+
});
|
|
1147
|
+
if (trackBulk && trackHistory) historyStore.stopRecordingUndo();
|
|
1148
|
+
uiStore.stateIsDirty = true;
|
|
1149
|
+
return {
|
|
1150
|
+
nodes: Object.values(tempWorkflow.nodes),
|
|
1151
|
+
connections: tempWorkflow.connectionsBySourceNode
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
async function importWorkflowData(workflowData, source, {
|
|
1155
|
+
importTags = true,
|
|
1156
|
+
trackBulk = true,
|
|
1157
|
+
trackHistory = true,
|
|
1158
|
+
viewport,
|
|
1159
|
+
regenerateIds = true,
|
|
1160
|
+
trackEvents = true
|
|
1161
|
+
} = {}) {
|
|
1162
|
+
uiStore.resetLastInteractedWith();
|
|
1163
|
+
if (!workflowData.hasOwnProperty("nodes") || !workflowData.hasOwnProperty("connections")) return {};
|
|
1164
|
+
try {
|
|
1165
|
+
const nodeIdMap = {};
|
|
1166
|
+
if (workflowData.nodes) {
|
|
1167
|
+
const nodeNames = new Set(workflowData.nodes.map(node => node.name));
|
|
1168
|
+
workflowData.nodes.forEach(node => {
|
|
1169
|
+
if (!node.name) {
|
|
1170
|
+
const newName = uniqueNodeName(nodeTypesStore.getNodeType(node.type)?.displayName ?? node.type, Array.from(nodeNames));
|
|
1171
|
+
node.name = newName;
|
|
1172
|
+
nodeNames.add(newName);
|
|
1173
|
+
}
|
|
1174
|
+
if (node.webhookId && UPDATE_WEBHOOK_ID_NODE_TYPES.includes(node.type)) {
|
|
1175
|
+
if (Object.values(workflowsStore.workflowObject.nodes).some(n => n.webhookId === node.webhookId)) {
|
|
1176
|
+
nodeHelpers.assignWebhookId(node);
|
|
1177
|
+
if (node.parameters.path) node.parameters.path = node.webhookId;else if (node.parameters.options.path) node.parameters.options.path = node.webhookId;
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
if (node.id) {
|
|
1181
|
+
const previousId = node.id;
|
|
1182
|
+
if (regenerateIds) {
|
|
1183
|
+
const newId = nodeHelpers.assignNodeId(node);
|
|
1184
|
+
nodeIdMap[newId] = previousId;
|
|
1185
|
+
}
|
|
1186
|
+
} else nodeHelpers.assignNodeId(node);
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
removeUnknownCredentials(workflowData);
|
|
1190
|
+
try {
|
|
1191
|
+
if (trackEvents) {
|
|
1192
|
+
const nodeGraph = JSON.stringify(generateNodesGraph(workflowData, workflowHelpers.getNodeTypes(), {
|
|
1193
|
+
nodeIdMap,
|
|
1194
|
+
sourceInstanceId: workflowData.meta && workflowData.meta.instanceId !== rootStore.instanceId ? workflowData.meta.instanceId : "",
|
|
1195
|
+
isCloudDeployment: settingsStore.isCloudDeployment
|
|
1196
|
+
}).nodeGraph);
|
|
1197
|
+
if (source === "paste") telemetry.track("User pasted nodes", {
|
|
1198
|
+
workflow_id: workflowsStore.workflowId,
|
|
1199
|
+
node_graph_string: nodeGraph
|
|
1200
|
+
});else if (source === "duplicate") telemetry.track("User duplicated nodes", {
|
|
1201
|
+
workflow_id: workflowsStore.workflowId,
|
|
1202
|
+
node_graph_string: nodeGraph
|
|
1203
|
+
});else telemetry.track("User imported workflow", {
|
|
1204
|
+
source,
|
|
1205
|
+
workflow_id: workflowsStore.workflowId,
|
|
1206
|
+
node_graph_string: nodeGraph
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
} catch {}
|
|
1210
|
+
workflowHelpers.updateNodePositions(workflowData, getNewNodePosition(editableWorkflow.value.nodes, lastClickPosition.value, {
|
|
1211
|
+
...(workflowData.nodes && workflowData.nodes.length > 1 ? {
|
|
1212
|
+
size: getNodesGroupSize(workflowData.nodes)
|
|
1213
|
+
} : {}),
|
|
1214
|
+
viewport
|
|
1215
|
+
}));
|
|
1216
|
+
await addImportedNodesToWorkflow(workflowData, {
|
|
1217
|
+
trackBulk,
|
|
1218
|
+
trackHistory,
|
|
1219
|
+
viewport
|
|
1220
|
+
});
|
|
1221
|
+
if (importTags && settingsStore.areTagsEnabled && Array.isArray(workflowData.tags)) await importWorkflowTags(workflowData);
|
|
1222
|
+
if (workflowData.name) workflowState.setWorkflowName({
|
|
1223
|
+
newName: workflowData.name,
|
|
1224
|
+
setStateDirty: true
|
|
1225
|
+
});
|
|
1226
|
+
return workflowData;
|
|
1227
|
+
} catch (error) {
|
|
1228
|
+
toast.showError(error, i18n.baseText("nodeView.showError.importWorkflowData.title"));
|
|
1229
|
+
return {};
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
async function importWorkflowTags(workflowData) {
|
|
1233
|
+
const allTags = await tagsStore.fetchAll();
|
|
1234
|
+
const tagNames = new Set(allTags.map(tag => tag.name));
|
|
1235
|
+
const workflowTags = workflowData.tags;
|
|
1236
|
+
const notFound = workflowTags.filter(tag => !tagNames.has(tag.name));
|
|
1237
|
+
const creatingTagPromises = [];
|
|
1238
|
+
for (const tag of notFound) {
|
|
1239
|
+
const creationPromise = tagsStore.create(tag.name).then(newTag => {
|
|
1240
|
+
allTags.push(newTag);
|
|
1241
|
+
return newTag;
|
|
1242
|
+
});
|
|
1243
|
+
creatingTagPromises.push(creationPromise);
|
|
1244
|
+
}
|
|
1245
|
+
await Promise.all(creatingTagPromises);
|
|
1246
|
+
const tagIds = workflowTags.reduce((accu, imported) => {
|
|
1247
|
+
const tag = allTags.find(t => t.name === imported.name);
|
|
1248
|
+
if (tag) accu.push(tag.id);
|
|
1249
|
+
return accu;
|
|
1250
|
+
}, []);
|
|
1251
|
+
workflowsStore.addWorkflowTagIds(tagIds);
|
|
1252
|
+
}
|
|
1253
|
+
async function fetchWorkflowDataFromUrl(url) {
|
|
1254
|
+
let workflowData;
|
|
1255
|
+
canvasStore.startLoading();
|
|
1256
|
+
try {
|
|
1257
|
+
workflowData = await workflowsStore.getWorkflowFromUrl(url);
|
|
1258
|
+
} catch (error) {
|
|
1259
|
+
toast.showError(error, i18n.baseText("nodeView.showError.getWorkflowDataFromUrl.title"));
|
|
1260
|
+
return;
|
|
1261
|
+
} finally {
|
|
1262
|
+
canvasStore.stopLoading();
|
|
1263
|
+
}
|
|
1264
|
+
return workflowData;
|
|
1265
|
+
}
|
|
1266
|
+
function getNodesToSave(nodes) {
|
|
1267
|
+
const data = {
|
|
1268
|
+
nodes: [],
|
|
1269
|
+
connections: {},
|
|
1270
|
+
pinData: {}
|
|
1271
|
+
};
|
|
1272
|
+
const exportedNodeNames = /* @__PURE__ */new Set();
|
|
1273
|
+
for (const node of nodes) {
|
|
1274
|
+
const nodeSaveData = workflowHelpers.getNodeDataToSave(node);
|
|
1275
|
+
const pinDataForNode = workflowsStore.pinDataByNodeName(node.name);
|
|
1276
|
+
if (pinDataForNode) data.pinData[node.name] = pinDataForNode;
|
|
1277
|
+
if (nodeSaveData.credentials && settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.Sharing]) nodeSaveData.credentials = filterAllowedCredentials(nodeSaveData.credentials, workflowsStore.usedCredentials);
|
|
1278
|
+
data.nodes.push(nodeSaveData);
|
|
1279
|
+
exportedNodeNames.add(node.name);
|
|
1280
|
+
}
|
|
1281
|
+
data.connections = getConnectionsForNodes(data.nodes, exportedNodeNames);
|
|
1282
|
+
workflowHelpers.removeForeignCredentialsFromWorkflow(data, credentialsStore.allCredentials);
|
|
1283
|
+
return data;
|
|
1284
|
+
}
|
|
1285
|
+
function filterAllowedCredentials(credentials, usedCredentials) {
|
|
1286
|
+
return Object.fromEntries(Object.entries(credentials).filter(([, credential]) => {
|
|
1287
|
+
return credential.id && (!usedCredentials[credential.id] || usedCredentials[credential.id]?.currentUserHasAccess);
|
|
1288
|
+
}));
|
|
1289
|
+
}
|
|
1290
|
+
function getConnectionsForNodes(nodes, includeNodeNames) {
|
|
1291
|
+
const connections = {};
|
|
1292
|
+
for (const node of nodes) {
|
|
1293
|
+
const outgoingConnections = workflowsStore.outgoingConnectionsByNodeName(node.name);
|
|
1294
|
+
if (!Object.keys(outgoingConnections).length) continue;
|
|
1295
|
+
const filteredConnections = filterConnectionsByNodes(outgoingConnections, includeNodeNames);
|
|
1296
|
+
if (Object.keys(filteredConnections).length) connections[node.name] = filteredConnections;
|
|
1297
|
+
}
|
|
1298
|
+
return connections;
|
|
1299
|
+
}
|
|
1300
|
+
function filterConnectionsByNodes(connections, includeNodeNames) {
|
|
1301
|
+
const filteredConnections = {};
|
|
1302
|
+
for (const [type, typeConnections] of Object.entries(connections)) {
|
|
1303
|
+
const validConnections = typeConnections.map(sourceConnections => (sourceConnections ?? []).filter(connection => includeNodeNames.has(connection.node)));
|
|
1304
|
+
if (validConnections.length) filteredConnections[type] = validConnections;
|
|
1305
|
+
}
|
|
1306
|
+
return filteredConnections;
|
|
1307
|
+
}
|
|
1308
|
+
async function duplicateNodes(ids, options = {}) {
|
|
1309
|
+
return (await importWorkflowData(deepCopy(getNodesToSave(workflowsStore.getNodesByIds(ids))), "duplicate", {
|
|
1310
|
+
viewport: options.viewport,
|
|
1311
|
+
importTags: false
|
|
1312
|
+
})).nodes?.map(node => node.id).filter(isPresent) ?? [];
|
|
1313
|
+
}
|
|
1314
|
+
async function copyNodes(ids) {
|
|
1315
|
+
const workflowData = deepCopy(getNodesToSave(workflowsStore.getNodesByIds(ids)));
|
|
1316
|
+
workflowData.meta = {
|
|
1317
|
+
...workflowData.meta,
|
|
1318
|
+
...workflowsStore.workflow.meta,
|
|
1319
|
+
instanceId: rootStore.instanceId
|
|
1320
|
+
};
|
|
1321
|
+
await clipboard.copy(JSON.stringify(workflowData, null, 2));
|
|
1322
|
+
telemetry.track("User copied nodes", {
|
|
1323
|
+
node_types: workflowData.nodes.map(node => node.type),
|
|
1324
|
+
workflow_id: workflowsStore.workflowId
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
async function cutNodes(ids) {
|
|
1328
|
+
await copyNodes(ids);
|
|
1329
|
+
deleteNodes(ids);
|
|
1330
|
+
}
|
|
1331
|
+
async function openExecution(executionId, nodeId) {
|
|
1332
|
+
let data;
|
|
1333
|
+
try {
|
|
1334
|
+
data = await workflowsStore.getExecution(executionId);
|
|
1335
|
+
} catch (error) {
|
|
1336
|
+
toast.showError(error, i18n.baseText("nodeView.showError.openExecution.title"));
|
|
1337
|
+
return;
|
|
1338
|
+
}
|
|
1339
|
+
if (data === void 0) throw new Error(`Execution with id "${executionId}" could not be found!`);
|
|
1340
|
+
if (data.status === "error" && data.data?.resultData.error) {
|
|
1341
|
+
const {
|
|
1342
|
+
title,
|
|
1343
|
+
message
|
|
1344
|
+
} = getExecutionErrorToastConfiguration({
|
|
1345
|
+
error: data.data.resultData.error,
|
|
1346
|
+
lastNodeExecuted: data.data.resultData.lastNodeExecuted
|
|
1347
|
+
});
|
|
1348
|
+
toast.showMessage({
|
|
1349
|
+
title,
|
|
1350
|
+
message,
|
|
1351
|
+
type: "error",
|
|
1352
|
+
duration: 0
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
initializeWorkspace(data.workflowData);
|
|
1356
|
+
workflowState.setWorkflowExecutionData(data);
|
|
1357
|
+
if (!["manual", "evaluation"].includes(data.mode)) workflowsStore.setWorkflowPinData({});
|
|
1358
|
+
if (nodeId) {
|
|
1359
|
+
const node = workflowsStore.getNodeById(nodeId);
|
|
1360
|
+
if (node) ndvStore.setActiveNodeName(node.name, "other");else toast.showError(/* @__PURE__ */new Error(`Node with id "${nodeId}" could not be found!`), i18n.baseText("nodeView.showError.openExecution.node"));
|
|
1361
|
+
}
|
|
1362
|
+
uiStore.stateIsDirty = false;
|
|
1363
|
+
return data;
|
|
1364
|
+
}
|
|
1365
|
+
function startChat(source) {
|
|
1366
|
+
if (!workflowsStore.allNodes.some(isChatNode)) return;
|
|
1367
|
+
const workflowObject = workflowsStore.workflowObject;
|
|
1368
|
+
logsStore.toggleOpen(true);
|
|
1369
|
+
const payload = {
|
|
1370
|
+
workflow_id: workflowObject.id,
|
|
1371
|
+
button_type: source
|
|
1372
|
+
};
|
|
1373
|
+
externalHooks.run("nodeView.onOpenChat", payload);
|
|
1374
|
+
telemetry.track("User clicked chat open button", payload);
|
|
1375
|
+
setTimeout(() => {
|
|
1376
|
+
chatEventBus.emit("focusInput");
|
|
1377
|
+
}, 0);
|
|
1378
|
+
}
|
|
1379
|
+
async function importTemplate({
|
|
1380
|
+
id,
|
|
1381
|
+
name,
|
|
1382
|
+
workflow
|
|
1383
|
+
}) {
|
|
1384
|
+
const convertedNodes = workflow.nodes?.map(workflowsStore.convertTemplateNodeToNodeUi);
|
|
1385
|
+
if (workflow.connections) workflowsStore.setConnections(workflow.connections);
|
|
1386
|
+
await addNodes(convertedNodes ?? []);
|
|
1387
|
+
await workflowState.getNewWorkflowDataAndMakeShareable(name, projectsStore.currentProjectId);
|
|
1388
|
+
workflowsStore.addToWorkflowMetadata({
|
|
1389
|
+
templateId: `${id}`
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
function tryToOpenSubworkflowInNewTab(nodeId) {
|
|
1393
|
+
const node = workflowsStore.getNodeById(nodeId);
|
|
1394
|
+
if (!node) return false;
|
|
1395
|
+
const subWorkflowId = getSubworkflowId(node);
|
|
1396
|
+
if (!subWorkflowId) return false;
|
|
1397
|
+
window.open(`${rootStore.baseUrl}workflow/${subWorkflowId}`, "_blank");
|
|
1398
|
+
return true;
|
|
1399
|
+
}
|
|
1400
|
+
function replaceNode(previousId, newId, {
|
|
1401
|
+
trackHistory = true,
|
|
1402
|
+
trackBulk = true
|
|
1403
|
+
} = {}) {
|
|
1404
|
+
const previousNode = workflowsStore.getNodeById(previousId);
|
|
1405
|
+
const newNode = workflowsStore.getNodeById(newId);
|
|
1406
|
+
if (!previousNode || !newNode) return;
|
|
1407
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
1408
|
+
const [x, y] = previousNode.position;
|
|
1409
|
+
updateNodePosition(newId, {
|
|
1410
|
+
x,
|
|
1411
|
+
y
|
|
1412
|
+
}, {
|
|
1413
|
+
trackHistory
|
|
1414
|
+
});
|
|
1415
|
+
replaceNodeConnections(previousId, newId, {
|
|
1416
|
+
trackBulk: false,
|
|
1417
|
+
trackHistory
|
|
1418
|
+
});
|
|
1419
|
+
deleteNode(previousId, {
|
|
1420
|
+
trackHistory,
|
|
1421
|
+
trackBulk: false
|
|
1422
|
+
});
|
|
1423
|
+
uiStore.stateIsDirty = true;
|
|
1424
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
1425
|
+
}
|
|
1426
|
+
async function addNodesAndConnections(nodes, addedConnections, {
|
|
1427
|
+
trackBulk = true,
|
|
1428
|
+
trackHistory = true,
|
|
1429
|
+
...options
|
|
1430
|
+
}) {
|
|
1431
|
+
if (trackHistory && trackBulk) historyStore.startRecordingUndo();
|
|
1432
|
+
const addedNodes = await addNodes(nodes, {
|
|
1433
|
+
...options,
|
|
1434
|
+
trackHistory,
|
|
1435
|
+
trackBulk: false,
|
|
1436
|
+
telemetry: true
|
|
1437
|
+
});
|
|
1438
|
+
const offsetIndex = editableWorkflow.value.nodes.length - nodes.length;
|
|
1439
|
+
await addConnections(addedConnections.map(({
|
|
1440
|
+
from,
|
|
1441
|
+
to
|
|
1442
|
+
}) => {
|
|
1443
|
+
const fromNode = editableWorkflow.value.nodes[offsetIndex + from.nodeIndex];
|
|
1444
|
+
const toNode = editableWorkflow.value.nodes[offsetIndex + to.nodeIndex];
|
|
1445
|
+
const type = from.type ?? to.type ?? NodeConnectionTypes.Main;
|
|
1446
|
+
return {
|
|
1447
|
+
source: fromNode.id,
|
|
1448
|
+
sourceHandle: createCanvasConnectionHandleString({
|
|
1449
|
+
mode: CanvasConnectionMode.Output,
|
|
1450
|
+
type: isValidNodeConnectionType(type) ? type : NodeConnectionTypes.Main,
|
|
1451
|
+
index: from.outputIndex ?? 0
|
|
1452
|
+
}),
|
|
1453
|
+
target: toNode.id,
|
|
1454
|
+
targetHandle: createCanvasConnectionHandleString({
|
|
1455
|
+
mode: CanvasConnectionMode.Input,
|
|
1456
|
+
type: isValidNodeConnectionType(type) ? type : NodeConnectionTypes.Main,
|
|
1457
|
+
index: to.inputIndex ?? 0
|
|
1458
|
+
}),
|
|
1459
|
+
data: {
|
|
1460
|
+
source: {
|
|
1461
|
+
index: from.outputIndex ?? 0,
|
|
1462
|
+
type
|
|
1463
|
+
},
|
|
1464
|
+
target: {
|
|
1465
|
+
index: to.inputIndex ?? 0,
|
|
1466
|
+
type
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
}), {
|
|
1471
|
+
trackHistory,
|
|
1472
|
+
trackBulk: false
|
|
1473
|
+
});
|
|
1474
|
+
uiStore.resetLastInteractedWith();
|
|
1475
|
+
if (addedNodes.length > 0 && options.replaceNodeId) {
|
|
1476
|
+
const lastAddedNodeId = addedNodes[addedNodes.length - 1].id;
|
|
1477
|
+
replaceNode(options.replaceNodeId, lastAddedNodeId, {
|
|
1478
|
+
trackHistory,
|
|
1479
|
+
trackBulk: false
|
|
1480
|
+
});
|
|
1481
|
+
}
|
|
1482
|
+
if (trackHistory && trackBulk) historyStore.stopRecordingUndo();
|
|
1483
|
+
return {
|
|
1484
|
+
addedNodes
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
function fitView() {
|
|
1488
|
+
setTimeout(() => canvasEventBus.emit("fitView"));
|
|
1489
|
+
}
|
|
1490
|
+
function trackOpenWorkflowTemplate(templateId) {
|
|
1491
|
+
telemetry.track("User inserted workflow template", {
|
|
1492
|
+
source: "workflow",
|
|
1493
|
+
template_id: tryToParseNumber(templateId),
|
|
1494
|
+
wf_template_repo_session_id: templatesStore.previousSessionId
|
|
1495
|
+
});
|
|
1496
|
+
}
|
|
1497
|
+
async function openWorkflowTemplate(templateId) {
|
|
1498
|
+
resetWorkspace();
|
|
1499
|
+
canvasStore.startLoading();
|
|
1500
|
+
canvasStore.setLoadingText(i18n.baseText("nodeView.loadingTemplate"));
|
|
1501
|
+
workflowsStore.currentWorkflowExecutions = [];
|
|
1502
|
+
executionsStore.activeExecution = null;
|
|
1503
|
+
let data;
|
|
1504
|
+
try {
|
|
1505
|
+
externalHooks.run("template.requested", {
|
|
1506
|
+
templateId
|
|
1507
|
+
});
|
|
1508
|
+
data = await templatesStore.getFixedWorkflowTemplate(templateId);
|
|
1509
|
+
if (!data) throw new Error(i18n.baseText("nodeView.workflowTemplateWithIdCouldNotBeFound", {
|
|
1510
|
+
interpolate: {
|
|
1511
|
+
templateId
|
|
1512
|
+
}
|
|
1513
|
+
}));
|
|
1514
|
+
} catch (error) {
|
|
1515
|
+
toast.showError(error, i18n.baseText("nodeView.couldntImportWorkflow"));
|
|
1516
|
+
await router.replace({
|
|
1517
|
+
name: VIEWS.NEW_WORKFLOW
|
|
1518
|
+
});
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
trackOpenWorkflowTemplate(templateId);
|
|
1522
|
+
uiStore.isBlankRedirect = true;
|
|
1523
|
+
await router.replace({
|
|
1524
|
+
name: VIEWS.NEW_WORKFLOW,
|
|
1525
|
+
query: {
|
|
1526
|
+
templateId
|
|
1527
|
+
}
|
|
1528
|
+
});
|
|
1529
|
+
await importTemplate({
|
|
1530
|
+
id: templateId,
|
|
1531
|
+
name: data.name,
|
|
1532
|
+
workflow: data.workflow
|
|
1533
|
+
});
|
|
1534
|
+
uiStore.stateIsDirty = true;
|
|
1535
|
+
canvasStore.stopLoading();
|
|
1536
|
+
externalHooks.run("template.open", {
|
|
1537
|
+
templateId,
|
|
1538
|
+
templateName: data.name,
|
|
1539
|
+
workflow: data.workflow
|
|
1540
|
+
});
|
|
1541
|
+
fitView();
|
|
1542
|
+
}
|
|
1543
|
+
async function openWorkflowTemplateFromJSON(workflow) {
|
|
1544
|
+
if (!workflow.nodes || !workflow.connections) {
|
|
1545
|
+
toast.showError(new Error(i18n.baseText("nodeView.couldntLoadWorkflow.invalidWorkflowObject")), i18n.baseText("nodeView.couldntImportWorkflow"));
|
|
1546
|
+
await router.replace({
|
|
1547
|
+
name: VIEWS.NEW_WORKFLOW
|
|
1548
|
+
});
|
|
1549
|
+
return;
|
|
1550
|
+
}
|
|
1551
|
+
resetWorkspace();
|
|
1552
|
+
canvasStore.startLoading();
|
|
1553
|
+
canvasStore.setLoadingText(i18n.baseText("nodeView.loadingTemplate"));
|
|
1554
|
+
workflowsStore.currentWorkflowExecutions = [];
|
|
1555
|
+
executionsStore.activeExecution = null;
|
|
1556
|
+
uiStore.isBlankRedirect = true;
|
|
1557
|
+
const templateId = workflow.meta.templateId;
|
|
1558
|
+
const parentFolderId = route.query.parentFolderId;
|
|
1559
|
+
await projectsStore.refreshCurrentProject();
|
|
1560
|
+
await fetchAndSetParentFolder(parentFolderId);
|
|
1561
|
+
await router.replace({
|
|
1562
|
+
name: VIEWS.NEW_WORKFLOW,
|
|
1563
|
+
query: {
|
|
1564
|
+
templateId,
|
|
1565
|
+
parentFolderId,
|
|
1566
|
+
projectId: projectsStore.currentProjectId
|
|
1567
|
+
}
|
|
1568
|
+
});
|
|
1569
|
+
await importTemplate({
|
|
1570
|
+
id: templateId,
|
|
1571
|
+
name: workflow.name,
|
|
1572
|
+
workflow
|
|
1573
|
+
});
|
|
1574
|
+
uiStore.stateIsDirty = true;
|
|
1575
|
+
canvasStore.stopLoading();
|
|
1576
|
+
fitView();
|
|
1577
|
+
}
|
|
1578
|
+
return {
|
|
1579
|
+
lastClickPosition,
|
|
1580
|
+
editableWorkflow,
|
|
1581
|
+
editableWorkflowObject,
|
|
1582
|
+
triggerNodes,
|
|
1583
|
+
requireNodeTypeDescription,
|
|
1584
|
+
addNodes,
|
|
1585
|
+
addNode,
|
|
1586
|
+
resolveNodePosition,
|
|
1587
|
+
revertAddNode,
|
|
1588
|
+
updateNodesPosition,
|
|
1589
|
+
updateNodePosition,
|
|
1590
|
+
tidyUp,
|
|
1591
|
+
revertUpdateNodePosition,
|
|
1592
|
+
setNodeActive,
|
|
1593
|
+
setNodeActiveByName,
|
|
1594
|
+
clearNodeActive,
|
|
1595
|
+
setNodeSelected,
|
|
1596
|
+
toggleNodesDisabled,
|
|
1597
|
+
revertToggleNodeDisabled,
|
|
1598
|
+
toggleNodesPinned,
|
|
1599
|
+
setNodeParameters,
|
|
1600
|
+
renameNode,
|
|
1601
|
+
revertRenameNode,
|
|
1602
|
+
replaceNodeParameters,
|
|
1603
|
+
revertReplaceNodeParameters,
|
|
1604
|
+
deleteNode,
|
|
1605
|
+
deleteNodes,
|
|
1606
|
+
copyNodes,
|
|
1607
|
+
cutNodes,
|
|
1608
|
+
duplicateNodes,
|
|
1609
|
+
getNodesToSave,
|
|
1610
|
+
revertDeleteNode,
|
|
1611
|
+
addConnections,
|
|
1612
|
+
createConnection,
|
|
1613
|
+
revertCreateConnection,
|
|
1614
|
+
deleteConnection,
|
|
1615
|
+
revertDeleteConnection,
|
|
1616
|
+
deleteConnectionsByNodeId,
|
|
1617
|
+
revalidateNodeInputConnections,
|
|
1618
|
+
revalidateNodeOutputConnections,
|
|
1619
|
+
isConnectionAllowed,
|
|
1620
|
+
filterConnectionsByNodes,
|
|
1621
|
+
connectAdjacentNodes,
|
|
1622
|
+
importWorkflowData,
|
|
1623
|
+
fetchWorkflowDataFromUrl,
|
|
1624
|
+
resetWorkspace,
|
|
1625
|
+
initializeWorkspace,
|
|
1626
|
+
resolveNodeWebhook,
|
|
1627
|
+
openExecution,
|
|
1628
|
+
startChat,
|
|
1629
|
+
importTemplate,
|
|
1630
|
+
replaceNodeConnections,
|
|
1631
|
+
tryToOpenSubworkflowInNewTab,
|
|
1632
|
+
initializeUnknownNodes,
|
|
1633
|
+
replaceNode,
|
|
1634
|
+
addNodesAndConnections,
|
|
1635
|
+
fitView,
|
|
1636
|
+
openWorkflowTemplate,
|
|
1637
|
+
openWorkflowTemplateFromJSON
|
|
1638
|
+
};
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
//#endregion
|
|
1642
|
+
_export({
|
|
1643
|
+
n: useParentFolder,
|
|
1644
|
+
t: useCanvasOperations
|
|
1645
|
+
});
|
|
1646
|
+
return {
|
|
1647
|
+
setters: [function (_chunkLegacy001Js) {
|
|
1648
|
+
__toESM = _chunkLegacy001Js.o;
|
|
1649
|
+
__commonJS = _chunkLegacy001Js.t;
|
|
1650
|
+
}, function (_vueRuntimeEsmBundlerLegacy003Js) {
|
|
1651
|
+
computed = _vueRuntimeEsmBundlerLegacy003Js.C;
|
|
1652
|
+
nextTick = _vueRuntimeEsmBundlerLegacy003Js.G;
|
|
1653
|
+
ref = _vueRuntimeEsmBundlerLegacy003Js.It;
|
|
1654
|
+
shallowRef = _vueRuntimeEsmBundlerLegacy003Js.zt;
|
|
1655
|
+
}, function (_MapCacheLegacy005Js) {
|
|
1656
|
+
useI18n = _MapCacheLegacy005Js.gt;
|
|
1657
|
+
useLocalStorage = _MapCacheLegacy005Js.j;
|
|
1658
|
+
}, function (_truncateLegacy00hJs) {
|
|
1659
|
+
useRouter = _truncateLegacy00hJs.b;
|
|
1660
|
+
createEventBus = _truncateLegacy00hJs.x;
|
|
1661
|
+
useRoute = _truncateLegacy00hJs.y;
|
|
1662
|
+
}, function (_useTelemetryLegacy00FJs) {
|
|
1663
|
+
getExecutionErrorToastConfiguration = _useTelemetryLegacy00FJs.$;
|
|
1664
|
+
RemoveConnectionCommand = _useTelemetryLegacy00FJs.Ar;
|
|
1665
|
+
useSettingsStore = _useTelemetryLegacy00FJs.Bo;
|
|
1666
|
+
tryToParseNumber = _useTelemetryLegacy00FJs.Ci;
|
|
1667
|
+
useHistoryStore = _useTelemetryLegacy00FJs.Cr;
|
|
1668
|
+
useProjectsStore = _useTelemetryLegacy00FJs.En;
|
|
1669
|
+
isChatNode = _useTelemetryLegacy00FJs.G;
|
|
1670
|
+
useCredentialsStore = _useTelemetryLegacy00FJs.Ht;
|
|
1671
|
+
v4_default = _useTelemetryLegacy00FJs.Io;
|
|
1672
|
+
RenameNodeCommand = _useTelemetryLegacy00FJs.Mr;
|
|
1673
|
+
useUIStore = _useTelemetryLegacy00FJs.Ni;
|
|
1674
|
+
ReplaceNodeParametersCommand = _useTelemetryLegacy00FJs.Nr;
|
|
1675
|
+
useRootStore = _useTelemetryLegacy00FJs.Qs;
|
|
1676
|
+
getNodesGroupSize = _useTelemetryLegacy00FJs.S;
|
|
1677
|
+
injectWorkflowState = _useTelemetryLegacy00FJs.Sn;
|
|
1678
|
+
CanvasNodeRenderType = _useTelemetryLegacy00FJs.Sr;
|
|
1679
|
+
AddNodeCommand = _useTelemetryLegacy00FJs.Tr;
|
|
1680
|
+
useCanvasStore = _useTelemetryLegacy00FJs.Un;
|
|
1681
|
+
useDataSchema = _useTelemetryLegacy00FJs.Zt;
|
|
1682
|
+
useTagsStore = _useTelemetryLegacy00FJs._n;
|
|
1683
|
+
useNDVStore = _useTelemetryLegacy00FJs.a;
|
|
1684
|
+
getNewNodePosition = _useTelemetryLegacy00FJs.b;
|
|
1685
|
+
CanvasConnectionMode = _useTelemetryLegacy00FJs.br;
|
|
1686
|
+
DEFAULT_VIEWPORT_BOUNDARIES = _useTelemetryLegacy00FJs.d;
|
|
1687
|
+
GRID_SIZE = _useTelemetryLegacy00FJs.f;
|
|
1688
|
+
isValidNodeConnectionType = _useTelemetryLegacy00FJs.gr;
|
|
1689
|
+
generateOffsets = _useTelemetryLegacy00FJs.h;
|
|
1690
|
+
usePostHog = _useTelemetryLegacy00FJs.i;
|
|
1691
|
+
RemoveNodeCommand = _useTelemetryLegacy00FJs.jr;
|
|
1692
|
+
MoveNodeCommand = _useTelemetryLegacy00FJs.kr;
|
|
1693
|
+
CONFIGURATION_NODE_SIZE = _useTelemetryLegacy00FJs.l;
|
|
1694
|
+
useWorkflowHelpers = _useTelemetryLegacy00FJs.mn;
|
|
1695
|
+
useWorkflowsStore = _useTelemetryLegacy00FJs.o;
|
|
1696
|
+
PUSH_NODES_OFFSET = _useTelemetryLegacy00FJs.p;
|
|
1697
|
+
useNodeTypesStore = _useTelemetryLegacy00FJs.rt;
|
|
1698
|
+
CONFIGURABLE_NODE_SIZE = _useTelemetryLegacy00FJs.s;
|
|
1699
|
+
useTelemetry = _useTelemetryLegacy00FJs.t;
|
|
1700
|
+
DEFAULT_NODE_SIZE = _useTelemetryLegacy00FJs.u;
|
|
1701
|
+
isPresent = _useTelemetryLegacy00FJs.vi;
|
|
1702
|
+
AddConnectionCommand = _useTelemetryLegacy00FJs.wr;
|
|
1703
|
+
defineStore = _useTelemetryLegacy00FJs.xc;
|
|
1704
|
+
useNodeHelpers = _useTelemetryLegacy00FJs.xn;
|
|
1705
|
+
}, function (_useToastLegacy00HJs) {
|
|
1706
|
+
useToast = _useToastLegacy00HJs.t;
|
|
1707
|
+
}, function (_constantsLegacy00NJs) {
|
|
1708
|
+
require_cloneDeep = _constantsLegacy00NJs.Br;
|
|
1709
|
+
UPDATE_WEBHOOK_ID_NODE_TYPES = _constantsLegacy00NJs.En;
|
|
1710
|
+
deepCopy = _constantsLegacy00NJs.Hi;
|
|
1711
|
+
EnterpriseEditionFeature = _constantsLegacy00NJs.Hs;
|
|
1712
|
+
NDV_IN_FOCUS_PANEL_EXPERIMENT = _constantsLegacy00NJs.Ns;
|
|
1713
|
+
WEBHOOK_NODE_TYPE = _constantsLegacy00NJs.On;
|
|
1714
|
+
require__baseUniq = _constantsLegacy00NJs.Qr;
|
|
1715
|
+
FORM_TRIGGER_NODE_TYPE = _constantsLegacy00NJs.St;
|
|
1716
|
+
isCommunityPackageName = _constantsLegacy00NJs.Ui;
|
|
1717
|
+
getNodeInputs = _constantsLegacy00NJs._i;
|
|
1718
|
+
LOCAL_STORAGE_LOGS_PANEL_DETAILS_PANEL_SUB_NODE = _constantsLegacy00NJs.as;
|
|
1719
|
+
NodeConnectionTypes = _constantsLegacy00NJs.ea;
|
|
1720
|
+
getConnectionTypes = _constantsLegacy00NJs.gi;
|
|
1721
|
+
LOCAL_STORAGE_LOGS_PANEL_DETAILS_PANEL = _constantsLegacy00NJs.is;
|
|
1722
|
+
CANVAS_ZOOMED_VIEW_EXPERIMENT = _constantsLegacy00NJs.ks;
|
|
1723
|
+
VIEWS = _constantsLegacy00NJs.mo;
|
|
1724
|
+
LOCAL_STORAGE_LOGS_PANEL_OPEN = _constantsLegacy00NJs.os;
|
|
1725
|
+
generateNodesGraph = _constantsLegacy00NJs.pi;
|
|
1726
|
+
LOCAL_STORAGE_LOGS_SYNC_SELECTION = _constantsLegacy00NJs.ss;
|
|
1727
|
+
getNodeOutputs = _constantsLegacy00NJs.vi;
|
|
1728
|
+
getSubworkflowId = _constantsLegacy00NJs.wi;
|
|
1729
|
+
STICKY_NODE_TYPE = _constantsLegacy00NJs.xn;
|
|
1730
|
+
getNodeParameters = _constantsLegacy00NJs.yi;
|
|
1731
|
+
MCP_TRIGGER_NODE_TYPE = _constantsLegacy00NJs.zt;
|
|
1732
|
+
}, function (_useExternalHooksLegacy00XJs) {
|
|
1733
|
+
useExternalHooks = _useExternalHooksLegacy00XJs.t;
|
|
1734
|
+
}, function (_templatesStoreLegacy015Js) {
|
|
1735
|
+
useTemplatesStore = _templatesStoreLegacy015Js.t;
|
|
1736
|
+
}, function (_focusPanelStoreLegacy017Js) {
|
|
1737
|
+
useFocusPanelStore = _focusPanelStoreLegacy017Js.t;
|
|
1738
|
+
}, function (_executionsStoreLegacy01dJs) {
|
|
1739
|
+
useExecutionsStore = _executionsStoreLegacy01dJs.t;
|
|
1740
|
+
}, function (_usePinnedDataLegacy01hJs) {
|
|
1741
|
+
usePinnedData = _usePinnedDataLegacy01hJs.t;
|
|
1742
|
+
}, function (_nodeCreatorStoreLegacy01jJs) {
|
|
1743
|
+
mapCanvasConnectionToLegacyConnection = _nodeCreatorStoreLegacy01jJs.a;
|
|
1744
|
+
parseCanvasConnectionHandleString = _nodeCreatorStoreLegacy01jJs.l;
|
|
1745
|
+
mapLegacyConnectionToCanvasConnection = _nodeCreatorStoreLegacy01jJs.o;
|
|
1746
|
+
createCanvasConnectionHandleString = _nodeCreatorStoreLegacy01jJs.r;
|
|
1747
|
+
mapLegacyConnectionsToCanvasConnections = _nodeCreatorStoreLegacy01jJs.s;
|
|
1748
|
+
useNodeCreatorStore = _nodeCreatorStoreLegacy01jJs.t;
|
|
1749
|
+
}, function (_useClipboardLegacy01nJs) {
|
|
1750
|
+
useClipboard = _useClipboardLegacy01nJs.t;
|
|
1751
|
+
}, function (_foldersStoreLegacy01tJs) {
|
|
1752
|
+
useFoldersStore = _foldersStoreLegacy01tJs.t;
|
|
1753
|
+
}],
|
|
1754
|
+
execute: function () {
|
|
1755
|
+
_export("d", chatEventBus = createEventBus$1()); //#endregion
|
|
1756
|
+
//#region src/features/execution/logs/logs.constants.ts
|
|
1757
|
+
_export("s", LOCAL_STORAGE_PANEL_HEIGHT = "N8N_CANVAS_CHAT_HEIGHT");
|
|
1758
|
+
_export("c", LOCAL_STORAGE_PANEL_WIDTH = "N8N_CANVAS_CHAT_WIDTH");
|
|
1759
|
+
_export("o", LOCAL_STORAGE_OVERVIEW_PANEL_WIDTH = "N8N_LOGS_OVERVIEW_PANEL_WIDTH");
|
|
1760
|
+
_export("l", LOGS_PANEL_STATE = {
|
|
1761
|
+
CLOSED: "closed",
|
|
1762
|
+
ATTACHED: "attached",
|
|
1763
|
+
FLOATING: "floating"
|
|
1764
|
+
});
|
|
1765
|
+
_export("u", LOG_DETAILS_PANEL_STATE = {
|
|
1766
|
+
INPUT: "input",
|
|
1767
|
+
OUTPUT: "output",
|
|
1768
|
+
BOTH: "both"
|
|
1769
|
+
}); //#endregion
|
|
1770
|
+
//#region src/app/stores/logs.store.ts
|
|
1771
|
+
_export("a", useLogsStore = defineStore("logs", () => {
|
|
1772
|
+
const isOpen = useLocalStorage(LOCAL_STORAGE_LOGS_PANEL_OPEN, false);
|
|
1773
|
+
const preferPoppedOut = ref(false);
|
|
1774
|
+
const state = computed(() => isOpen.value ? preferPoppedOut.value ? LOGS_PANEL_STATE.FLOATING : LOGS_PANEL_STATE.ATTACHED : LOGS_PANEL_STATE.CLOSED);
|
|
1775
|
+
const height = ref(0);
|
|
1776
|
+
const detailsState = useLocalStorage(LOCAL_STORAGE_LOGS_PANEL_DETAILS_PANEL, LOG_DETAILS_PANEL_STATE.OUTPUT, {
|
|
1777
|
+
writeDefaults: false
|
|
1778
|
+
});
|
|
1779
|
+
const detailsStateSubNode = useLocalStorage(LOCAL_STORAGE_LOGS_PANEL_DETAILS_PANEL_SUB_NODE, LOG_DETAILS_PANEL_STATE.BOTH, {
|
|
1780
|
+
writeDefaults: false
|
|
1781
|
+
});
|
|
1782
|
+
const isLogSelectionSyncedWithCanvas = useLocalStorage(LOCAL_STORAGE_LOGS_SYNC_SELECTION, true, {
|
|
1783
|
+
writeDefaults: false
|
|
1784
|
+
});
|
|
1785
|
+
const isSubNodeSelected = ref(false);
|
|
1786
|
+
const telemetry = useTelemetry();
|
|
1787
|
+
const chatSessionId = ref(getNewSessionId());
|
|
1788
|
+
const chatSessionMessages = ref([]);
|
|
1789
|
+
function setHeight(value) {
|
|
1790
|
+
height.value = value;
|
|
1791
|
+
}
|
|
1792
|
+
function getNewSessionId() {
|
|
1793
|
+
return v4_default().replace(/-/g, "");
|
|
1794
|
+
}
|
|
1795
|
+
function resetChatSessionId() {
|
|
1796
|
+
chatSessionId.value = getNewSessionId();
|
|
1797
|
+
}
|
|
1798
|
+
function resetMessages() {
|
|
1799
|
+
chatSessionMessages.value = [];
|
|
1800
|
+
}
|
|
1801
|
+
function toggleOpen(value) {
|
|
1802
|
+
isOpen.value = value ?? !isOpen.value;
|
|
1803
|
+
}
|
|
1804
|
+
function setPreferPoppedOut(value) {
|
|
1805
|
+
preferPoppedOut.value = value;
|
|
1806
|
+
}
|
|
1807
|
+
function setSubNodeSelected(value) {
|
|
1808
|
+
isSubNodeSelected.value = value;
|
|
1809
|
+
}
|
|
1810
|
+
function toggleInputOpen(open) {
|
|
1811
|
+
const statesWithInput = [LOG_DETAILS_PANEL_STATE.INPUT, LOG_DETAILS_PANEL_STATE.BOTH];
|
|
1812
|
+
const stateRef = isSubNodeSelected.value ? detailsStateSubNode : detailsState;
|
|
1813
|
+
const wasOpen = statesWithInput.includes(stateRef.value);
|
|
1814
|
+
if (open === wasOpen) return;
|
|
1815
|
+
stateRef.value = wasOpen ? LOG_DETAILS_PANEL_STATE.OUTPUT : LOG_DETAILS_PANEL_STATE.BOTH;
|
|
1816
|
+
telemetry.track("User toggled log view sub pane", {
|
|
1817
|
+
pane: "input",
|
|
1818
|
+
newState: wasOpen ? "hidden" : "visible",
|
|
1819
|
+
isSubNode: isSubNodeSelected.value
|
|
1820
|
+
});
|
|
1821
|
+
}
|
|
1822
|
+
function toggleOutputOpen(open) {
|
|
1823
|
+
const statesWithOutput = [LOG_DETAILS_PANEL_STATE.OUTPUT, LOG_DETAILS_PANEL_STATE.BOTH];
|
|
1824
|
+
const stateRef = isSubNodeSelected.value ? detailsStateSubNode : detailsState;
|
|
1825
|
+
const wasOpen = statesWithOutput.includes(stateRef.value);
|
|
1826
|
+
if (open === wasOpen) return;
|
|
1827
|
+
stateRef.value = wasOpen ? LOG_DETAILS_PANEL_STATE.INPUT : LOG_DETAILS_PANEL_STATE.BOTH;
|
|
1828
|
+
telemetry.track("User toggled log view sub pane", {
|
|
1829
|
+
pane: "output",
|
|
1830
|
+
newState: wasOpen ? "hidden" : "visible",
|
|
1831
|
+
isSubNode: isSubNodeSelected.value
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
function toggleLogSelectionSync(value) {
|
|
1835
|
+
isLogSelectionSyncedWithCanvas.value = value ?? !isLogSelectionSyncedWithCanvas.value;
|
|
1836
|
+
}
|
|
1837
|
+
function addChatMessage(message) {
|
|
1838
|
+
chatSessionMessages.value.push(message);
|
|
1839
|
+
}
|
|
1840
|
+
return {
|
|
1841
|
+
state,
|
|
1842
|
+
isOpen: computed(() => state.value !== LOGS_PANEL_STATE.CLOSED),
|
|
1843
|
+
detailsState: computed(() => isSubNodeSelected.value ? detailsStateSubNode.value : detailsState.value),
|
|
1844
|
+
height: computed(() => height.value),
|
|
1845
|
+
isLogSelectionSyncedWithCanvas: computed(() => isLogSelectionSyncedWithCanvas.value),
|
|
1846
|
+
chatSessionId: computed(() => chatSessionId.value),
|
|
1847
|
+
chatSessionMessages: computed(() => chatSessionMessages.value),
|
|
1848
|
+
addChatMessage,
|
|
1849
|
+
setHeight,
|
|
1850
|
+
toggleOpen,
|
|
1851
|
+
setPreferPoppedOut,
|
|
1852
|
+
setSubNodeSelected,
|
|
1853
|
+
toggleInputOpen,
|
|
1854
|
+
toggleOutputOpen,
|
|
1855
|
+
toggleLogSelectionSync,
|
|
1856
|
+
resetChatSessionId,
|
|
1857
|
+
resetMessages
|
|
1858
|
+
};
|
|
1859
|
+
})); //#endregion
|
|
1860
|
+
//#region ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js
|
|
1861
|
+
require_uniq = /* @__PURE__ */__commonJS({
|
|
1862
|
+
"../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js": (exports, module) => {
|
|
1863
|
+
var baseUniq = require__baseUniq();
|
|
1864
|
+
/**
|
|
1865
|
+
* Creates a duplicate-free version of an array, using
|
|
1866
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1867
|
+
* for equality comparisons, in which only the first occurrence of each element
|
|
1868
|
+
* is kept. The order of result values is determined by the order they occur
|
|
1869
|
+
* in the array.
|
|
1870
|
+
*
|
|
1871
|
+
* @static
|
|
1872
|
+
* @memberOf _
|
|
1873
|
+
* @since 0.1.0
|
|
1874
|
+
* @category Array
|
|
1875
|
+
* @param {Array} array The array to inspect.
|
|
1876
|
+
* @returns {Array} Returns the new duplicate free array.
|
|
1877
|
+
* @example
|
|
1878
|
+
*
|
|
1879
|
+
* _.uniq([2, 1, 2]);
|
|
1880
|
+
* // => [2, 1]
|
|
1881
|
+
*/
|
|
1882
|
+
function uniq$1(array) {
|
|
1883
|
+
return array && array.length ? baseUniq(array) : [];
|
|
1884
|
+
}
|
|
1885
|
+
module.exports = uniq$1;
|
|
1886
|
+
}
|
|
1887
|
+
}); //#endregion
|
|
1888
|
+
//#region src/features/workflows/canvas/experimental/experimentalNdv.store.ts
|
|
1889
|
+
_export("i", useExperimentalNdvStore = defineStore("experimentalNdv", () => {
|
|
1890
|
+
const workflowStore = useWorkflowsStore();
|
|
1891
|
+
const postHogStore = usePostHog();
|
|
1892
|
+
const isZoomedViewEnabled = computed(() => postHogStore.getVariant(CANVAS_ZOOMED_VIEW_EXPERIMENT.name) === CANVAS_ZOOMED_VIEW_EXPERIMENT.variant);
|
|
1893
|
+
const isNdvInFocusPanelEnabled = computed(() => postHogStore.getVariant(NDV_IN_FOCUS_PANEL_EXPERIMENT.name) === NDV_IN_FOCUS_PANEL_EXPERIMENT.variant);
|
|
1894
|
+
const maxCanvasZoom = computed(() => isZoomedViewEnabled.value ? 2 : 4);
|
|
1895
|
+
const previousViewport = ref();
|
|
1896
|
+
const collapsedNodes = shallowRef({});
|
|
1897
|
+
const nodeNameToBeFocused = ref();
|
|
1898
|
+
const isMapperOpen = ref(false);
|
|
1899
|
+
function setNodeExpanded(nodeId, isExpanded) {
|
|
1900
|
+
collapsedNodes.value = {
|
|
1901
|
+
...collapsedNodes.value,
|
|
1902
|
+
[nodeId]: isExpanded === void 0 ? !collapsedNodes.value[nodeId] : !isExpanded
|
|
1903
|
+
};
|
|
1904
|
+
}
|
|
1905
|
+
function collapseAllNodes() {
|
|
1906
|
+
collapsedNodes.value = workflowStore.allNodes.reduce((acc, node) => {
|
|
1907
|
+
acc[node.id] = true;
|
|
1908
|
+
return acc;
|
|
1909
|
+
}, {});
|
|
1910
|
+
}
|
|
1911
|
+
function expandAllNodes() {
|
|
1912
|
+
collapsedNodes.value = {};
|
|
1913
|
+
}
|
|
1914
|
+
function isActive(canvasZoom) {
|
|
1915
|
+
return isZoomedViewEnabled.value && Math.abs(canvasZoom - maxCanvasZoom.value) < 1e-6;
|
|
1916
|
+
}
|
|
1917
|
+
function setNodeNameToBeFocused(nodeName) {
|
|
1918
|
+
nodeNameToBeFocused.value = nodeName;
|
|
1919
|
+
}
|
|
1920
|
+
function setMapperOpen(value) {
|
|
1921
|
+
isMapperOpen.value = value;
|
|
1922
|
+
}
|
|
1923
|
+
function focusNode(node, {
|
|
1924
|
+
canvasDimensions,
|
|
1925
|
+
canvasViewport,
|
|
1926
|
+
setCenter
|
|
1927
|
+
}) {
|
|
1928
|
+
collapsedNodes.value = {
|
|
1929
|
+
...collapsedNodes.value,
|
|
1930
|
+
[node.id]: false
|
|
1931
|
+
};
|
|
1932
|
+
const topMargin = 80;
|
|
1933
|
+
const nodeWidth = node.dimensions.width * (isActive(canvasViewport.zoom) ? 1 : 1.5);
|
|
1934
|
+
if (nodeNameToBeFocused.value === node.data.name) nodeNameToBeFocused.value = void 0;
|
|
1935
|
+
setCenter(node.position.x + nodeWidth / 2, node.position.y + (canvasDimensions.height * (1 / 2) - topMargin) / maxCanvasZoom.value, {
|
|
1936
|
+
duration: 200,
|
|
1937
|
+
zoom: maxCanvasZoom.value,
|
|
1938
|
+
interpolate: "linear"
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
function toggleZoomMode(options) {
|
|
1942
|
+
if (isActive(options.canvasViewport.zoom)) {
|
|
1943
|
+
if (previousViewport.value === void 0) {
|
|
1944
|
+
options.fitView({
|
|
1945
|
+
duration: 200,
|
|
1946
|
+
interpolate: "linear"
|
|
1947
|
+
});
|
|
1948
|
+
return;
|
|
1949
|
+
}
|
|
1950
|
+
options.setViewport(previousViewport.value, {
|
|
1951
|
+
duration: 200,
|
|
1952
|
+
interpolate: "linear"
|
|
1953
|
+
});
|
|
1954
|
+
return;
|
|
1955
|
+
}
|
|
1956
|
+
previousViewport.value = options.canvasViewport;
|
|
1957
|
+
const toFocus = options.selectedNodes.filter(node => node.data.render.type === CanvasNodeRenderType.Default).toSorted((a, b) => a.position.y === b.position.y ? a.position.x - b.position.x : a.position.y - b.position.y)[0];
|
|
1958
|
+
if (toFocus) {
|
|
1959
|
+
focusNode(toFocus, options);
|
|
1960
|
+
return;
|
|
1961
|
+
}
|
|
1962
|
+
options.zoomTo(maxCanvasZoom.value, {
|
|
1963
|
+
duration: 200,
|
|
1964
|
+
interpolate: "linear"
|
|
1965
|
+
});
|
|
1966
|
+
}
|
|
1967
|
+
return {
|
|
1968
|
+
isZoomedViewEnabled,
|
|
1969
|
+
isNdvInFocusPanelEnabled,
|
|
1970
|
+
maxCanvasZoom,
|
|
1971
|
+
previousZoom: computed(() => previousViewport.value),
|
|
1972
|
+
collapsedNodes: computed(() => collapsedNodes.value),
|
|
1973
|
+
nodeNameToBeFocused: computed(() => nodeNameToBeFocused.value),
|
|
1974
|
+
isMapperOpen: computed(() => isMapperOpen.value),
|
|
1975
|
+
isActive,
|
|
1976
|
+
setNodeExpanded,
|
|
1977
|
+
expandAllNodes,
|
|
1978
|
+
collapseAllNodes,
|
|
1979
|
+
toggleZoomMode,
|
|
1980
|
+
focusNode,
|
|
1981
|
+
setNodeNameToBeFocused,
|
|
1982
|
+
setMapperOpen
|
|
1983
|
+
};
|
|
1984
|
+
})); //#endregion
|
|
1985
|
+
//#region src/features/workflows/canvas/canvas.eventBus.ts
|
|
1986
|
+
_export("r", canvasEventBus = createEventBus());
|
|
1987
|
+
import_cloneDeep = /* @__PURE__ */__toESM(require_cloneDeep());
|
|
1988
|
+
import_uniq = /* @__PURE__ */__toESM(require_uniq());
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
});
|
|
1992
|
+
})();
|