n8n-editor-ui 1.115.1 → 1.116.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/.build/cache-marker +1 -1
  2. package/.build/node-popularity.json +1805 -1805
  3. package/dist/assets/{AddDataStoreModal-B7jBhCjt.css → AddDataTableModal-BzS5Yqag.css} +6 -6
  4. package/dist/assets/{AddDataStoreModal-DxLlmnRh.js → AddDataTableModal-D3lCNgpn.js} +32 -32
  5. package/dist/assets/{AnimatedSpinner-DR4QrGrL.js → AnimatedSpinner-Cr27l8Js.js} +1 -1
  6. package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-BfGhW9R4.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-BC2t-vmg.js} +1 -1
  7. package/dist/assets/{AuthView-CWVio_MZ.css → AuthView-BvfgleDU.css} +30 -30
  8. package/dist/assets/{AuthView-BUfRQlip.js → AuthView-ByAdS5FY.js} +14 -14
  9. package/dist/assets/{ChangePasswordView-hnVcBOdZ.js → ChangePasswordView-CQSCgqRg.js} +3 -3
  10. package/dist/assets/ChatSidebar-BIKL7c8K.js +117 -0
  11. package/dist/assets/ChatSidebar-wKAC9nrh.css +165 -0
  12. package/dist/assets/ChatView-ClX1FsZV.css +657 -0
  13. package/dist/assets/ChatView-osetCni7.js +805 -0
  14. package/dist/assets/CollectionParameter-mR4EdrZi.js +4 -0
  15. package/dist/assets/{CredentialsView-BAqjGrNq.css → CredentialsView-C9uo2Njh.css} +14 -14
  16. package/dist/assets/{CredentialsView-DYbozDMz.js → CredentialsView-DhOvzcuF.js} +15 -15
  17. package/dist/assets/{DataStoreActions.vue_vue_type_script_setup_true_lang-_Q8OXvzI.js → DataTableActions.vue_vue_type_script_setup_true_lang-CPe6URyk.js} +21 -21
  18. package/dist/assets/{DataStoreDetailsView-Bc-J9ZrW.css → DataTableDetailsView-BOmb3x4S.css} +138 -138
  19. package/dist/assets/{DataStoreDetailsView-DN1DvV53.js → DataTableDetailsView-DZF8g3WP.js} +538 -525
  20. package/dist/assets/{DataStoreView-BqQv7QeU.css → DataTableView-ByKnlVtU.css} +14 -14
  21. package/dist/assets/{DataStoreView-BNU_I-gX.js → DataTableView-C4iNAHED.js} +68 -68
  22. package/dist/assets/{DemoFooter-rHoOk6iK.js → DemoFooter-B-9EtV0b.js} +5 -5
  23. package/dist/assets/{EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-DWIEvR1-.js → EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-4ZVwMz6Z.js} +1 -1
  24. package/dist/assets/{EntityNotFound-DAi6p29d.js → EntityNotFound-CZnyKB-G.js} +2 -2
  25. package/dist/assets/EntityNotFound-CargndZm.css +10 -0
  26. package/dist/assets/{EntityUnAuthorised-8E-9FBHe.js → EntityUnAuthorised-CwSJj0Hc.js} +2 -2
  27. package/dist/assets/EntityUnAuthorised-Deb2bHNC.css +10 -0
  28. package/dist/assets/{ErrorView-y79cILv4.js → ErrorView-BontN9_o.js} +4 -4
  29. package/dist/assets/{ErrorView-DPS9icAS.css → ErrorView-D2OMvGTk.css} +8 -8
  30. package/dist/assets/{EvaluationsRootView-B5AhHo41.css → EvaluationsRootView-7FGhfEKm.css} +48 -48
  31. package/dist/assets/{EvaluationsRootView-CWelItmD.js → EvaluationsRootView-z8nnYDZZ.js} +22 -22
  32. package/dist/assets/{EvaluationsView-C0X9064k.js → EvaluationsView-DJXXQS3t.js} +27 -27
  33. package/dist/assets/{EvaluationsView-BTyYfInB.css → EvaluationsView-DsfXDJ-U.css} +35 -35
  34. package/dist/assets/{ExecutionsTime-B5dXCTxD.css → ExecutionsTime-BGpurJsp.css} +41 -41
  35. package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-CmtPBoIQ.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-DYd7fiyA.js} +16 -16
  36. package/dist/assets/{ExecutionsView-DRsBgt5L.js → ExecutionsView-BNcgqbCI.js} +18 -18
  37. package/dist/assets/{ExecutionsView-BxsSXnlU.css → ExecutionsView-BbH7fInw.css} +14 -14
  38. package/dist/assets/{FixedCollectionParameter-D3u3aCCk.css → FixedCollectionParameter-D82suS6W.css} +43 -43
  39. package/dist/assets/{FixedCollectionParameter-Bhdk1XcN.js → FixedCollectionParameter-hHCYDL8K.js} +2 -2
  40. package/dist/assets/{ForgotMyPasswordView-C-GNSvtY.js → ForgotMyPasswordView-DNIrSigH.js} +3 -3
  41. package/dist/assets/{InfoAccordion-dxudNqVC.css → InfoAccordion-BuKidEQb.css} +13 -13
  42. package/dist/assets/{InfoAccordion-BpibqNsS.js → InfoAccordion-DZZQAfE2.js} +7 -7
  43. package/dist/assets/{InsightsChartAverageRuntime-CwkkxEk1.js → InsightsChartAverageRuntime-0_tQwd14.js} +4 -4
  44. package/dist/assets/{InsightsChartFailed-Di6uVDGI.js → InsightsChartFailed-DzwSs_eb.js} +5 -5
  45. package/dist/assets/{InsightsChartFailureRate-Bl5Av3Eu.js → InsightsChartFailureRate-9NSwJrkn.js} +5 -5
  46. package/dist/assets/{InsightsChartTimeSaved-Bcup49B9.js → InsightsChartTimeSaved-yP09tMZN.js} +4 -4
  47. package/dist/assets/{InsightsChartTotal-DnEUMCMt.js → InsightsChartTotal-_BgplVGB.js} +5 -5
  48. package/dist/assets/{InsightsDashboard-luJ134I5.js → InsightsDashboard-BV1ylSUf.js} +21 -21
  49. package/dist/assets/{InsightsDashboard-CYAx_0X9.css → InsightsDashboard-DyOwzHmP.css} +25 -25
  50. package/dist/assets/{InsightsPaywall-BEXUk0T6.js → InsightsPaywall-Bo-jqjcX.js} +1 -1
  51. package/dist/assets/{InsightsSummary-DTFIhBF3.css → InsightsSummary-BazqPYQ0.css} +52 -52
  52. package/dist/assets/{InsightsSummary-XxOp2tas.js → InsightsSummary-Bg9pnspx.js} +11 -11
  53. package/dist/assets/{InsightsTableWorkflows-B4re5fkw.js → InsightsTableWorkflows-Cba5zPpi.js} +7 -7
  54. package/dist/assets/{InsightsTableWorkflows-BTHSCwX8.css → InsightsTableWorkflows-D20Yb7ZW.css} +8 -8
  55. package/dist/assets/{Logo-91TLwfCH.js → Logo-BCYYCeCH.js} +7 -7
  56. package/dist/assets/{Logo-CSmRCqF2.css → Logo-BU1oDo5-.css} +16 -16
  57. package/dist/assets/{LogsPanel-BWP7EQ84.js → LogsPanel-C6aZbU42.js} +141 -1091
  58. package/dist/assets/{LogsPanel-BE9Gl1z0.css → LogsPanel-DVmpE0zV.css} +160 -592
  59. package/dist/assets/{MainHeader-DIiyDT8d.css → MainHeader-BqJwA1aC.css} +117 -117
  60. package/dist/assets/{MainHeader-BaSUt6eJ.js → MainHeader-CAY1EEEh.js} +45 -45
  61. package/dist/assets/{MainSidebar-C4cyDjUV.js → MainSidebar-C9gTPkUi.js} +69 -1133
  62. package/dist/assets/{MainSidebar-BT8sXxNa.css → MainSidebar-tTEyXOKH.css} +107 -279
  63. package/dist/assets/NavigationDropdown-BmOSJSCn.js +1116 -0
  64. package/dist/assets/NavigationDropdown-Wb7mPGhl.css +187 -0
  65. package/dist/assets/{NodeCreation-C4gQlPqI.css → NodeCreation-B1fOtARK.css} +6 -6
  66. package/dist/assets/{NodeCreation-BkqOy8gF.js → NodeCreation-sJ6PySWn.js} +12 -10
  67. package/dist/assets/{NodeCreator-COTYfPaK.css → NodeCreator-CamUhvMk.css} +175 -174
  68. package/dist/assets/{NodeCreator-BppRTVIa.js → NodeCreator-DXsZEKJK.js} +60 -64
  69. package/dist/assets/{NodeDetailsView-BuhpInfo.js → NodeDetailsView-BpyGVsgu.js} +33 -32
  70. package/dist/assets/{NodeDetailsView-CBYV4Rrz.css → NodeDetailsView-D3QAo3SF.css} +61 -61
  71. package/dist/assets/{NodeDetailsViewV2-C0bp_zCD.js → NodeDetailsViewV2-DGkdo0vX.js} +58 -69
  72. package/dist/assets/{NodeDetailsViewV2-J_3cfdea.css → NodeDetailsViewV2-bvXejqU_.css} +67 -60
  73. package/dist/assets/{NodeView-B9LYqx2z.js → NodeView-B8KEEH6t.js} +106 -95
  74. package/dist/assets/{NodeView-Bsq1Fh0D.css → NodeView-BhF0ieQM.css} +85 -85
  75. package/dist/assets/{PageViewLayout-CJlzbuVj.css → PageViewLayout-BIiboMgG.css} +5 -5
  76. package/dist/assets/{PageViewLayout-B8D8Tkxn.js → PageViewLayout-No_pX4Y2.js} +3 -3
  77. package/dist/assets/{PrebuiltAgentTemplatesView-DZAkWI4E.js → PrebuiltAgentTemplatesView-Byz4ljyp.js} +9 -9
  78. package/dist/assets/{PrebuiltAgentTemplatesView-COxu7Iih.css → PrebuiltAgentTemplatesView-jF7HvWnL.css} +14 -14
  79. package/dist/assets/{ProjectBreadcrumb-B1Hnf5da.css → ProjectBreadcrumb-BNbnf7Ir.css} +96 -96
  80. package/dist/assets/{ProjectBreadcrumb-HI65z9tX.js → ProjectBreadcrumb-DzdWVcqt.js} +22 -22
  81. package/dist/assets/{ProjectHeader-BzekhnTR.js → ProjectHeader-C2cvg4nB.js} +36 -18
  82. package/dist/assets/{ProjectHeader-BNMKpvzV.css → ProjectHeader-TKKq6OrY.css} +15 -15
  83. package/dist/assets/{ProjectSettings-BTP0xrzD.js → ProjectSettings-DJsTn3lm.js} +26 -26
  84. package/dist/assets/{ProjectSettings-Cj1kC16G.css → ProjectSettings-c2BBLEzY.css} +60 -60
  85. package/dist/assets/ProjectVariables-CrRq7juM.js +532 -0
  86. package/dist/assets/ProjectVariables-DtGcMnSf.css +293 -0
  87. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-DflOVayR.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-94A3F8Nb.js} +1 -1
  88. package/dist/assets/{ResourcesListLayout-Dm7w49bu.css → ResourcesListLayout-CY-G3BmN.css} +42 -42
  89. package/dist/assets/{ResourcesListLayout-CnidC9EV.js → ResourcesListLayout-U7KWTT3_.js} +25 -21
  90. package/dist/assets/{RunDataJson-DEs4Ql5T.js → RunDataJson-DfyidYxR.js} +8 -8
  91. package/dist/assets/{RunDataJson-BH9HLoGC.css → RunDataJson-PAkTmkZf.css} +19 -19
  92. package/dist/assets/{RunDataJsonActions-Ct02vlvz.js → RunDataJsonActions-CGAwQzcH.js} +2 -2
  93. package/dist/assets/{RunDataJsonActions-B2jW3_UG.css → RunDataJsonActions-CZx7rSSE.css} +2 -2
  94. package/dist/assets/{RunDataParsedAiContent-Bl49tvwG.js → RunDataParsedAiContent-BuF6D9QB.js} +13 -112
  95. package/dist/assets/{RunDataParsedAiContent-wfIiKsq7.css → RunDataParsedAiContent-CvjNCtpG.css} +37 -37
  96. package/dist/assets/{RunDataSearch-2eEalFoi.css → RunDataSearch-CPo36NE_.css} +10 -10
  97. package/dist/assets/{RunDataSearch-D8DXH4rw.js → RunDataSearch-Dkv8Uspi.js} +4 -4
  98. package/dist/assets/{RunDataTable-BZzteeuj.css → RunDataTable-C4QnrVVF.css} +104 -104
  99. package/dist/assets/{RunDataTable-CdxTnMd4.js → RunDataTable-CMj7faUo.js} +33 -33
  100. package/dist/assets/{SamlOnboarding-CLFzc3D4.js → SamlOnboarding-Y33PQ0MC.js} +3 -3
  101. package/dist/assets/{SelectedItemsInfo-Dl4uynXs.css → SelectedItemsInfo-B6Rq6uIe.css} +7 -7
  102. package/dist/assets/{SelectedItemsInfo-Dd3HKZ6z.js → SelectedItemsInfo-niTPahiE.js} +3 -3
  103. package/dist/assets/{SettingsApiView-CmU8R9-c.js → SettingsApiView-B1CSPgk9.js} +14 -14
  104. package/dist/assets/{SettingsApiView-k1hALKCX.css → SettingsApiView-Dtl_N9mK.css} +31 -31
  105. package/dist/assets/{SettingsCommunityNodesView-CjgVPZAy.js → SettingsCommunityNodesView-CRAChGuy.js} +21 -21
  106. package/dist/assets/{SettingsCommunityNodesView-CAggjsaT.css → SettingsCommunityNodesView-CVQjV37D.css} +31 -31
  107. package/dist/assets/{SettingsExternalSecrets-BAX9ENm9.css → SettingsExternalSecrets-CaiOf7cD.css} +12 -12
  108. package/dist/assets/{SettingsExternalSecrets-Baxom4lP.js → SettingsExternalSecrets-CzXAEo07.js} +8 -8
  109. package/dist/assets/{SettingsLdapView-BQUfzAsN.js → SettingsLdapView-DSkINX3j.js} +8 -8
  110. package/dist/assets/{SettingsLdapView-D0SUO3ai.css → SettingsLdapView-KgMO_1GA.css} +17 -17
  111. package/dist/assets/{SettingsLogStreamingView-Bq2IwWDt.js → SettingsLogStreamingView-Bcc-2zVI.js} +7 -7
  112. package/dist/assets/{SettingsLogStreamingView-CflEMmu9.css → SettingsLogStreamingView-xo-rTSA0.css} +12 -12
  113. package/dist/assets/SettingsMCPView-BBO_ZyBU.css +552 -0
  114. package/dist/assets/{SettingsMCPView-D3BOHCtS.js → SettingsMCPView-CHXmiCg2.js} +200 -126
  115. package/dist/assets/{SettingsPersonalView-Bt8bL5tJ.css → SettingsPersonalView-D6LtKnaF.css} +23 -23
  116. package/dist/assets/{SettingsPersonalView-Bbn0olns.js → SettingsPersonalView-SLkmnF62.js} +10 -10
  117. package/dist/assets/{SettingsSourceControl-BBxJXbFC.css → SettingsSourceControl-C6pfOcuv.css} +40 -40
  118. package/dist/assets/{SettingsSourceControl-CC_Pak2B.js → SettingsSourceControl-D9pU6aTH.js} +15 -15
  119. package/dist/assets/{SettingsSso-vViqB8oe.js → SettingsSso-BpyLc_nN.js} +7 -7
  120. package/dist/assets/{SettingsSso-D4HKPLvV.css → SettingsSso-w7Iz4Luy.css} +25 -25
  121. package/dist/assets/{SettingsUsageAndPlan-82J0IcdW.css → SettingsUsageAndPlan-Cct79Zta.css} +34 -34
  122. package/dist/assets/{SettingsUsageAndPlan-BtE-s9Vb.js → SettingsUsageAndPlan-DuurGlum.js} +13 -13
  123. package/dist/assets/{SettingsUsersView-BG7JdfYz.css → SettingsUsersView-CfJcVjkl.css} +28 -28
  124. package/dist/assets/{SettingsUsersView-DVdCq-SX.js → SettingsUsersView-Dot7c7Qq.js} +16 -16
  125. package/dist/assets/{SettingsView-BHLJBEJF.css → SettingsView-C4aA4kVV.css} +18 -18
  126. package/dist/assets/{SettingsView-ByNIw76r.js → SettingsView-Cf9Z1byg.js} +8 -8
  127. package/dist/assets/{SetupView-XbSIMu9B.js → SetupView-Bd3_I6zI.js} +3 -3
  128. package/dist/assets/{SetupWorkflowCredentialsButton-CUzPtmot.js → SetupWorkflowCredentialsButton-CAXEm7u9.js} +1 -1
  129. package/dist/assets/{SetupWorkflowFromTemplateView-ZPJL_m2F.css → SetupWorkflowFromTemplateView-CU2iGJTa.css} +11 -11
  130. package/dist/assets/{SetupWorkflowFromTemplateView-CQcMUEt1.js → SetupWorkflowFromTemplateView-DHDRdPVs.js} +8 -8
  131. package/dist/assets/{SigninView-D57wRRHz.css → SigninView-BQgsTN8o.css} +13 -13
  132. package/dist/assets/{SigninView-C8qujIEW.js → SigninView-D5tuweUZ.js} +9 -9
  133. package/dist/assets/{SignoutView-BCsXtAKk.js → SignoutView-DeXygpms.js} +1 -1
  134. package/dist/assets/{SignupView-By-KjS2P.js → SignupView-CX-Il1Wi.js} +3 -3
  135. package/dist/assets/{TableBase-CX4nZLla.js → TableBase-A3JBly2L.js} +3 -3
  136. package/dist/assets/{TableBase-Bf42_9Yp.css → TableBase-CUZbI5pm.css} +24 -24
  137. package/dist/assets/{Tags-CCemj7t9.css → Tags-6vh_jPIG.css} +4 -4
  138. package/dist/assets/{Tags-D03vT_rK.js → Tags-Mbyj8PZc.js} +2 -2
  139. package/dist/assets/{TemplateDetails-CDaB-6oH.js → TemplateDetails-0MJKz78y.js} +8 -8
  140. package/dist/assets/{TemplateDetails-DyUqVhf2.css → TemplateDetails-DfyKyMyy.css} +13 -13
  141. package/dist/assets/{TemplateList-DNBeV62H.js → TemplateList-5x22FsDC.js} +24 -24
  142. package/dist/assets/{TemplateList-XNW-2Ugr.css → TemplateList-CNUtq0N7.css} +49 -49
  143. package/dist/assets/{TemplatesCollectionView-BTk7wBlq.js → TemplatesCollectionView-CvCuX0Fa.js} +13 -13
  144. package/dist/assets/{TemplatesCollectionView-2q1rzsOG.css → TemplatesCollectionView-klb8FT9y.css} +13 -13
  145. package/dist/assets/{TemplatesSearchView-DtyBPi6V.js → TemplatesSearchView-c0i0daNd.js} +18 -18
  146. package/dist/assets/{TemplatesSearchView-DETaMpDt.css → TemplatesSearchView-gPmmtwoU.css} +50 -50
  147. package/dist/assets/{TemplatesView-BTid6_ga.js → TemplatesView-BOOm6xwn.js} +8 -8
  148. package/dist/assets/{TemplatesView-Cyu28Dlo.css → TemplatesView-BgdyYmrL.css} +21 -21
  149. package/dist/assets/{TemplatesWorkflowView-DpIiJjJp.css → TemplatesWorkflowView-CBjRBbmw.css} +17 -17
  150. package/dist/assets/{TemplatesWorkflowView-CLr9pY-p.js → TemplatesWorkflowView-H8LDxBtL.js} +14 -14
  151. package/dist/assets/{TestRunDetailView-BDPhxOvY.js → TestRunDetailView-BrNWft7p.js} +36 -36
  152. package/dist/assets/{TestRunDetailView--lZbJq4u.css → TestRunDetailView-D_a9QpSQ.css} +93 -93
  153. package/dist/assets/{TriggerPanel-CQgUdcjv.css → TriggerPanel-BbB_P9ZT.css} +158 -236
  154. package/dist/assets/TriggerPanel-DexAqK4Y.js +1633 -0
  155. package/dist/assets/VariablesUsageBadge-C_yi7Lw5.css +129 -0
  156. package/dist/assets/VariablesUsageBadge-DwioJFhQ.js +39 -0
  157. package/dist/assets/{VariablesView-DsA8Mqxt.js → VariablesView-CxJyyUeq.js} +11 -52
  158. package/dist/assets/VariablesView-zN910qd9.css +272 -0
  159. package/dist/assets/{WorkerView-BrSoYcbf.css → WorkerView-4m_NaoAx.css} +47 -47
  160. package/dist/assets/{WorkerView-CDijwoCe.js → WorkerView-CETR714S.js} +39 -39
  161. package/dist/assets/{WorkflowActivator-DKpc2Acz.js → WorkflowActivator-B8KHOz1Y.js} +7 -7
  162. package/dist/assets/{WorkflowActivator-DPDRDtQG.css → WorkflowActivator-DBJbtrBD.css} +9 -9
  163. package/dist/assets/{WorkflowExecutionsInfoAccordion-53bC-IXN.css → WorkflowExecutionsInfoAccordion-CEOvJ-SX.css} +11 -11
  164. package/dist/assets/{WorkflowExecutionsInfoAccordion-Fedus-Da.js → WorkflowExecutionsInfoAccordion-qxgk1h0H.js} +4 -4
  165. package/dist/assets/{WorkflowExecutionsLandingPage-Bm_hJMl4.css → WorkflowExecutionsLandingPage-DMldlKod.css} +8 -8
  166. package/dist/assets/{WorkflowExecutionsLandingPage-BpO-BoFq.js → WorkflowExecutionsLandingPage-HKnqrHXW.js} +6 -6
  167. package/dist/assets/{WorkflowExecutionsPreview-Cd4BrS-0.css → WorkflowExecutionsPreview-CkEakQp2.css} +90 -90
  168. package/dist/assets/{WorkflowExecutionsPreview-DzvPOJOY.js → WorkflowExecutionsPreview-qf-E5Odr.js} +46 -46
  169. package/dist/assets/{WorkflowExecutionsView-DDoqUcYQ.js → WorkflowExecutionsView-CfqNhuZ6.js} +34 -34
  170. package/dist/assets/{WorkflowExecutionsView-Bjkudb8L.css → WorkflowExecutionsView-CqRMwPwF.css} +82 -82
  171. package/dist/assets/{WorkflowHistory-7Ad0Va7M.css → WorkflowHistory-BmerBiKz.css} +71 -71
  172. package/dist/assets/{WorkflowHistory-BhU1Rfch.js → WorkflowHistory-YmqrN3r8.js} +21 -21
  173. package/dist/assets/{WorkflowOnboardingView-BqWP7FwD.js → WorkflowOnboardingView-CjlwTouQ.js} +1 -1
  174. package/dist/assets/{WorkflowPreview-CIOAVgxK.css → WorkflowPreview-Bt03akXc.css} +8 -8
  175. package/dist/assets/{WorkflowPreview-B1W62QhC.js → WorkflowPreview-Cq5khFre.js} +8 -8
  176. package/dist/assets/{WorkflowsView-B8UKso1P.css → WorkflowsView-GJhG9SFw.css} +144 -144
  177. package/dist/assets/{WorkflowsView-B-pO60w1.js → WorkflowsView-RxnSQ30O.js} +79 -83
  178. package/dist/assets/{chartjs.utils-DpK-YRAM.js → chartjs.utils-D_NRIoXj.js} +10 -10
  179. package/dist/assets/chat.utils-2xG-fh51.js +224 -0
  180. package/dist/assets/{core-HZaYo_tU.js → core-DzD694JE.js} +1 -1
  181. package/dist/assets/{evaluation-ZbMdquW3.css → evaluation-BpIei8SG.css} +26 -26
  182. package/dist/assets/{evaluation.constants-DfiJmRyk.js → evaluation.constants-DtUWL9wd.js} +9 -9
  183. package/dist/assets/{global-link-actions-DdzlWwjw.js → global-link-actions-DY3w9YDm.js} +1 -1
  184. package/dist/assets/{index-MTM6BbvW.js → index-CW8ZBeS3.js} +13600 -15420
  185. package/dist/assets/{index-CFiA0qjr.css → index-DXwb0-8G.css} +6384 -6442
  186. package/dist/assets/{index-P3-xVlwI.js → index-DbuMzHzu.js} +1 -1
  187. package/dist/assets/mcp.store-BgAt-In4.js +85 -0
  188. package/dist/assets/{pickBy-DUKPNRlc.js → pickBy-AGrSNJKu.js} +1 -1
  189. package/dist/assets/{readyToRunWorkflows.store-nzu6XNAP.js → readyToRunWorkflows.store-VC9XUBEb.js} +2 -2
  190. package/dist/assets/{readyToRunWorkflowsV2.store-1dRkG6XV.js → readyToRunWorkflowsV2.store-DKvoEeBj.js} +2 -2
  191. package/dist/assets/{templateActions-BePunFaZ.js → templateActions-QrGnobip.js} +1 -1
  192. package/dist/assets/{useBeforeUnload-DsbgbymL.js → useBeforeUnload-LctWPBl6.js} +1 -1
  193. package/dist/assets/{useExecutionDebugging-yUnwhnYk.js → useExecutionDebugging-C4qxdFPE.js} +1 -1
  194. package/dist/assets/{useImportCurlCommand-DcFIVp7Y.js → useImportCurlCommand-uW2F30ZA.js} +1 -1
  195. package/dist/assets/useLogsTreeExpand-BZb1m-U7.css +554 -0
  196. package/dist/assets/useLogsTreeExpand-s-Y7s8m-.js +1080 -0
  197. package/dist/assets/{useProjectPages-JCNZbA2u.js → useProjectPages-CGrunDRk.js} +1 -1
  198. package/dist/assets/{usePushConnection-_VL-61pH.js → usePushConnection-DIHgByHB.js} +17 -19
  199. package/dist/assets/{useWorkflowsCache-DwIv_I-Z.js → useWorkflowsCache-DpRrH96r.js} +1 -1
  200. package/dist/index.html +2 -2
  201. package/package.json +1 -1
  202. package/scripts/fetch-node-popularity.mjs +13 -1
  203. package/turbo.json +2 -1
  204. package/dist/assets/CollectionParameter-BbxTTmMu.js +0 -4
  205. package/dist/assets/ConsumedTokensDetails.vue_vue_type_script_setup_true_lang-Bv40HGJu.js +0 -44
  206. package/dist/assets/EntityNotFound-pTnVFOv-.css +0 -10
  207. package/dist/assets/EntityUnAuthorised-CHl9g0Ry.css +0 -10
  208. package/dist/assets/SettingsMCPView-B7NzLvT3.css +0 -378
  209. package/dist/assets/TriggerPanel-BS69Ky8P.js +0 -3343
  210. package/dist/assets/VariablesView-BMHdLce7.css +0 -400
@@ -1,3343 +0,0 @@
1
- import { aZ as hasOwn, bm as reactive, bv as isObject, b9 as _export_sfc, d as defineComponent, bb as useNamespace, bi as inject, Y as renderSlot, aY as h, bn as provide, r as ref, be as removeClass, bc as addClass, a9 as resolveComponent, b4 as withDirectives, b5 as vShow, h as createElementBlock, g as openBlock, j as createBaseVNode, i as createVNode, e as createBlock, f as createCommentVNode, w as withCtx, c0 as resolveDynamicComponent, n as normalizeClass, B as withModifiers, ap as normalizeStyle, F as Fragment, A as renderList, iv as loading_default, bp as ElIcon, en as ElCheckbox, bs as _CollapseTransition, a8 as watch, iw as caret_right_default, ix as isFunction, bq as isString, bo as getCurrentInstance, Z as nextTick, cY as shallowRef, o as onMounted, iy as onUpdated, iz as useEventListener, b7 as EVENT_CODE, t as toDisplayString, bu as iconPropType, iA as useLocale, x as computed, iB as formItemContextKey, _ as _export_sfc$1, a2 as useWorkflowsStore, ae as useNodeTypesStore, dR as usePostHog, dX as NDV_UI_OVERHAUL_EXPERIMENT, cc as NodeConnectionTypes, X as onBeforeUnmount, k as unref, aa as N8nTooltip, cx as NodeIcon, l as createTextVNode, iC as convertToDisplayDateComponents, cL as resolveDirective, dv as InfoTip, c as useI18n, p as N8nText, cs as getDefaultExportFromCjs, iD as requireCapitalize, iE as parseAiContent, N as N8nIcon, O as N8nRadioButtons, iF as _sfc_main$b, iG as ViewSubExecution, cr as formatTokenUsageCount, a_ as useNDVStore, fa as storeToRefs, iH as useNodeDirtiness, iI as useNodeType, cj as usePinnedData, iJ as CanvasNodeDirtiness, cM as RunData, cJ as createSlots, cN as NDVEmptyState, cO as waitingNodeTooltip, di as _sfc_main$d, ac as I18nT, em as _sfc_main$e, al as useTelemetry, Q as useUIStore, b as useRouter, aA as useWorkflowHelpers, iK as isTriggerPanelObject, fY as getTriggerNodeServiceName, ch as CHAT_TRIGGER_NODE_TYPE, iL as WEBHOOK_NODE_TYPE, iM as FORM_TRIGGER_NODE_TYPE, fQ as CopyInput, q as N8nButton, m as N8nHeading, C as N8nLink, aq as createEventBus, ba as Transition, V as VIEWS, ak as WORKFLOW_SETTINGS_MODAL_KEY } from "./index-MTM6BbvW.js";
2
- import { R as RunDataAi$1, g as getConsumedTokens, c as createAiData, a as getTreeNodeData, b as getReferencedData } from "./RunDataParsedAiContent-Bl49tvwG.js";
3
- import { _ as _sfc_main$c } from "./ConsumedTokensDetails.vue_vue_type_script_setup_true_lang-Bv40HGJu.js";
4
- import { u as useExecutionData } from "./NodeView-B9LYqx2z.js";
5
- import { N as N8nInfoAccordion } from "./InfoAccordion-BpibqNsS.js";
6
- const NODE_KEY = "$treeNodeId";
7
- const markNodeData = function(node, data) {
8
- if (!data || data[NODE_KEY])
9
- return;
10
- Object.defineProperty(data, NODE_KEY, {
11
- value: node.id,
12
- enumerable: false,
13
- configurable: false,
14
- writable: false
15
- });
16
- };
17
- const getNodeKey = function(key, data) {
18
- if (!key)
19
- return data[NODE_KEY];
20
- return data[key];
21
- };
22
- const handleCurrentChange = (store, emit, setCurrent) => {
23
- const preCurrentNode = store.value.currentNode;
24
- setCurrent();
25
- const currentNode = store.value.currentNode;
26
- if (preCurrentNode === currentNode)
27
- return;
28
- emit("current-change", currentNode ? currentNode.data : null, currentNode);
29
- };
30
- const getChildState = (node) => {
31
- let all = true;
32
- let none = true;
33
- let allWithoutDisable = true;
34
- for (let i = 0, j = node.length; i < j; i++) {
35
- const n = node[i];
36
- if (n.checked !== true || n.indeterminate) {
37
- all = false;
38
- if (!n.disabled) {
39
- allWithoutDisable = false;
40
- }
41
- }
42
- if (n.checked !== false || n.indeterminate) {
43
- none = false;
44
- }
45
- }
46
- return { all, none, allWithoutDisable, half: !all && !none };
47
- };
48
- const reInitChecked = function(node) {
49
- if (node.childNodes.length === 0 || node.loading)
50
- return;
51
- const { all, none, half } = getChildState(node.childNodes);
52
- if (all) {
53
- node.checked = true;
54
- node.indeterminate = false;
55
- } else if (half) {
56
- node.checked = false;
57
- node.indeterminate = true;
58
- } else if (none) {
59
- node.checked = false;
60
- node.indeterminate = false;
61
- }
62
- const parent = node.parent;
63
- if (!parent || parent.level === 0)
64
- return;
65
- if (!node.store.checkStrictly) {
66
- reInitChecked(parent);
67
- }
68
- };
69
- const getPropertyFromData = function(node, prop) {
70
- const props = node.store.props;
71
- const data = node.data || {};
72
- const config = props[prop];
73
- if (typeof config === "function") {
74
- return config(data, node);
75
- } else if (typeof config === "string") {
76
- return data[config];
77
- } else if (typeof config === "undefined") {
78
- const dataProp = data[prop];
79
- return dataProp === void 0 ? "" : dataProp;
80
- }
81
- };
82
- let nodeIdSeed = 0;
83
- class Node {
84
- constructor(options) {
85
- this.id = nodeIdSeed++;
86
- this.text = null;
87
- this.checked = false;
88
- this.indeterminate = false;
89
- this.data = null;
90
- this.expanded = false;
91
- this.parent = null;
92
- this.visible = true;
93
- this.isCurrent = false;
94
- this.canFocus = false;
95
- for (const name in options) {
96
- if (hasOwn(options, name)) {
97
- this[name] = options[name];
98
- }
99
- }
100
- this.level = 0;
101
- this.loaded = false;
102
- this.childNodes = [];
103
- this.loading = false;
104
- if (this.parent) {
105
- this.level = this.parent.level + 1;
106
- }
107
- }
108
- initialize() {
109
- const store = this.store;
110
- if (!store) {
111
- throw new Error("[Node]store is required!");
112
- }
113
- store.registerNode(this);
114
- const props = store.props;
115
- if (props && typeof props.isLeaf !== "undefined") {
116
- const isLeaf = getPropertyFromData(this, "isLeaf");
117
- if (typeof isLeaf === "boolean") {
118
- this.isLeafByUser = isLeaf;
119
- }
120
- }
121
- if (store.lazy !== true && this.data) {
122
- this.setData(this.data);
123
- if (store.defaultExpandAll) {
124
- this.expanded = true;
125
- this.canFocus = true;
126
- }
127
- } else if (this.level > 0 && store.lazy && store.defaultExpandAll) {
128
- this.expand();
129
- }
130
- if (!Array.isArray(this.data)) {
131
- markNodeData(this, this.data);
132
- }
133
- if (!this.data)
134
- return;
135
- const defaultExpandedKeys = store.defaultExpandedKeys;
136
- const key = store.key;
137
- if (key && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) {
138
- this.expand(null, store.autoExpandParent);
139
- }
140
- if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) {
141
- store.currentNode = this;
142
- store.currentNode.isCurrent = true;
143
- }
144
- if (store.lazy) {
145
- store._initDefaultCheckedNode(this);
146
- }
147
- this.updateLeafState();
148
- if (this.parent && (this.level === 1 || this.parent.expanded === true))
149
- this.canFocus = true;
150
- }
151
- setData(data) {
152
- if (!Array.isArray(data)) {
153
- markNodeData(this, data);
154
- }
155
- this.data = data;
156
- this.childNodes = [];
157
- let children;
158
- if (this.level === 0 && Array.isArray(this.data)) {
159
- children = this.data;
160
- } else {
161
- children = getPropertyFromData(this, "children") || [];
162
- }
163
- for (let i = 0, j = children.length; i < j; i++) {
164
- this.insertChild({ data: children[i] });
165
- }
166
- }
167
- get label() {
168
- return getPropertyFromData(this, "label");
169
- }
170
- get key() {
171
- const nodeKey = this.store.key;
172
- if (this.data)
173
- return this.data[nodeKey];
174
- return null;
175
- }
176
- get disabled() {
177
- return getPropertyFromData(this, "disabled");
178
- }
179
- get nextSibling() {
180
- const parent = this.parent;
181
- if (parent) {
182
- const index = parent.childNodes.indexOf(this);
183
- if (index > -1) {
184
- return parent.childNodes[index + 1];
185
- }
186
- }
187
- return null;
188
- }
189
- get previousSibling() {
190
- const parent = this.parent;
191
- if (parent) {
192
- const index = parent.childNodes.indexOf(this);
193
- if (index > -1) {
194
- return index > 0 ? parent.childNodes[index - 1] : null;
195
- }
196
- }
197
- return null;
198
- }
199
- contains(target, deep = true) {
200
- return (this.childNodes || []).some((child) => child === target || deep && child.contains(target));
201
- }
202
- remove() {
203
- const parent = this.parent;
204
- if (parent) {
205
- parent.removeChild(this);
206
- }
207
- }
208
- insertChild(child, index, batch) {
209
- if (!child)
210
- throw new Error("InsertChild error: child is required.");
211
- if (!(child instanceof Node)) {
212
- if (!batch) {
213
- const children = this.getChildren(true);
214
- if (!children.includes(child.data)) {
215
- if (typeof index === "undefined" || index < 0) {
216
- children.push(child.data);
217
- } else {
218
- children.splice(index, 0, child.data);
219
- }
220
- }
221
- }
222
- Object.assign(child, {
223
- parent: this,
224
- store: this.store
225
- });
226
- child = reactive(new Node(child));
227
- if (child instanceof Node) {
228
- child.initialize();
229
- }
230
- }
231
- child.level = this.level + 1;
232
- if (typeof index === "undefined" || index < 0) {
233
- this.childNodes.push(child);
234
- } else {
235
- this.childNodes.splice(index, 0, child);
236
- }
237
- this.updateLeafState();
238
- }
239
- insertBefore(child, ref2) {
240
- let index;
241
- if (ref2) {
242
- index = this.childNodes.indexOf(ref2);
243
- }
244
- this.insertChild(child, index);
245
- }
246
- insertAfter(child, ref2) {
247
- let index;
248
- if (ref2) {
249
- index = this.childNodes.indexOf(ref2);
250
- if (index !== -1)
251
- index += 1;
252
- }
253
- this.insertChild(child, index);
254
- }
255
- removeChild(child) {
256
- const children = this.getChildren() || [];
257
- const dataIndex = children.indexOf(child.data);
258
- if (dataIndex > -1) {
259
- children.splice(dataIndex, 1);
260
- }
261
- const index = this.childNodes.indexOf(child);
262
- if (index > -1) {
263
- this.store && this.store.deregisterNode(child);
264
- child.parent = null;
265
- this.childNodes.splice(index, 1);
266
- }
267
- this.updateLeafState();
268
- }
269
- removeChildByData(data) {
270
- let targetNode = null;
271
- for (let i = 0; i < this.childNodes.length; i++) {
272
- if (this.childNodes[i].data === data) {
273
- targetNode = this.childNodes[i];
274
- break;
275
- }
276
- }
277
- if (targetNode) {
278
- this.removeChild(targetNode);
279
- }
280
- }
281
- expand(callback, expandParent) {
282
- const done = () => {
283
- if (expandParent) {
284
- let parent = this.parent;
285
- while (parent.level > 0) {
286
- parent.expanded = true;
287
- parent = parent.parent;
288
- }
289
- }
290
- this.expanded = true;
291
- if (callback)
292
- callback();
293
- this.childNodes.forEach((item) => {
294
- item.canFocus = true;
295
- });
296
- };
297
- if (this.shouldLoadData()) {
298
- this.loadData((data) => {
299
- if (Array.isArray(data)) {
300
- if (this.checked) {
301
- this.setChecked(true, true);
302
- } else if (!this.store.checkStrictly) {
303
- reInitChecked(this);
304
- }
305
- done();
306
- }
307
- });
308
- } else {
309
- done();
310
- }
311
- }
312
- doCreateChildren(array, defaultProps = {}) {
313
- array.forEach((item) => {
314
- this.insertChild(Object.assign({ data: item }, defaultProps), void 0, true);
315
- });
316
- }
317
- collapse() {
318
- this.expanded = false;
319
- this.childNodes.forEach((item) => {
320
- item.canFocus = false;
321
- });
322
- }
323
- shouldLoadData() {
324
- return this.store.lazy === true && this.store.load && !this.loaded;
325
- }
326
- updateLeafState() {
327
- if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== "undefined") {
328
- this.isLeaf = this.isLeafByUser;
329
- return;
330
- }
331
- const childNodes = this.childNodes;
332
- if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
333
- this.isLeaf = !childNodes || childNodes.length === 0;
334
- return;
335
- }
336
- this.isLeaf = false;
337
- }
338
- setChecked(value, deep, recursion, passValue) {
339
- this.indeterminate = value === "half";
340
- this.checked = value === true;
341
- if (this.store.checkStrictly)
342
- return;
343
- if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
344
- const { all, allWithoutDisable } = getChildState(this.childNodes);
345
- if (!this.isLeaf && !all && allWithoutDisable) {
346
- this.checked = false;
347
- value = false;
348
- }
349
- const handleDescendants = () => {
350
- if (deep) {
351
- const childNodes = this.childNodes;
352
- for (let i = 0, j = childNodes.length; i < j; i++) {
353
- const child = childNodes[i];
354
- passValue = passValue || value !== false;
355
- const isCheck = child.disabled ? child.checked : passValue;
356
- child.setChecked(isCheck, deep, true, passValue);
357
- }
358
- const { half, all: all2 } = getChildState(childNodes);
359
- if (!all2) {
360
- this.checked = all2;
361
- this.indeterminate = half;
362
- }
363
- }
364
- };
365
- if (this.shouldLoadData()) {
366
- this.loadData(() => {
367
- handleDescendants();
368
- reInitChecked(this);
369
- }, {
370
- checked: value !== false
371
- });
372
- return;
373
- } else {
374
- handleDescendants();
375
- }
376
- }
377
- const parent = this.parent;
378
- if (!parent || parent.level === 0)
379
- return;
380
- if (!recursion) {
381
- reInitChecked(parent);
382
- }
383
- }
384
- getChildren(forceInit = false) {
385
- if (this.level === 0)
386
- return this.data;
387
- const data = this.data;
388
- if (!data)
389
- return null;
390
- const props = this.store.props;
391
- let children = "children";
392
- if (props) {
393
- children = props.children || "children";
394
- }
395
- if (data[children] === void 0) {
396
- data[children] = null;
397
- }
398
- if (forceInit && !data[children]) {
399
- data[children] = [];
400
- }
401
- return data[children];
402
- }
403
- updateChildren() {
404
- const newData = this.getChildren() || [];
405
- const oldData = this.childNodes.map((node) => node.data);
406
- const newDataMap = {};
407
- const newNodes = [];
408
- newData.forEach((item, index) => {
409
- const key = item[NODE_KEY];
410
- const isNodeExists = !!key && oldData.findIndex((data) => data[NODE_KEY] === key) >= 0;
411
- if (isNodeExists) {
412
- newDataMap[key] = { index, data: item };
413
- } else {
414
- newNodes.push({ index, data: item });
415
- }
416
- });
417
- if (!this.store.lazy) {
418
- oldData.forEach((item) => {
419
- if (!newDataMap[item[NODE_KEY]])
420
- this.removeChildByData(item);
421
- });
422
- }
423
- newNodes.forEach(({ index, data }) => {
424
- this.insertChild({ data }, index);
425
- });
426
- this.updateLeafState();
427
- }
428
- loadData(callback, defaultProps = {}) {
429
- if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
430
- this.loading = true;
431
- const resolve = (children) => {
432
- this.childNodes = [];
433
- this.doCreateChildren(children, defaultProps);
434
- this.loaded = true;
435
- this.loading = false;
436
- this.updateLeafState();
437
- if (callback) {
438
- callback.call(this, children);
439
- }
440
- };
441
- this.store.load(this, resolve);
442
- } else {
443
- if (callback) {
444
- callback.call(this);
445
- }
446
- }
447
- }
448
- }
449
- class TreeStore {
450
- constructor(options) {
451
- this.currentNode = null;
452
- this.currentNodeKey = null;
453
- for (const option in options) {
454
- if (hasOwn(options, option)) {
455
- this[option] = options[option];
456
- }
457
- }
458
- this.nodesMap = {};
459
- }
460
- initialize() {
461
- this.root = new Node({
462
- data: this.data,
463
- store: this
464
- });
465
- this.root.initialize();
466
- if (this.lazy && this.load) {
467
- const loadFn = this.load;
468
- loadFn(this.root, (data) => {
469
- this.root.doCreateChildren(data);
470
- this._initDefaultCheckedNodes();
471
- });
472
- } else {
473
- this._initDefaultCheckedNodes();
474
- }
475
- }
476
- filter(value) {
477
- const filterNodeMethod = this.filterNodeMethod;
478
- const lazy = this.lazy;
479
- const traverse = function(node) {
480
- const childNodes = node.root ? node.root.childNodes : node.childNodes;
481
- childNodes.forEach((child) => {
482
- child.visible = filterNodeMethod.call(child, value, child.data, child);
483
- traverse(child);
484
- });
485
- if (!node.visible && childNodes.length) {
486
- let allHidden = true;
487
- allHidden = !childNodes.some((child) => child.visible);
488
- if (node.root) {
489
- node.root.visible = allHidden === false;
490
- } else {
491
- node.visible = allHidden === false;
492
- }
493
- }
494
- if (!value)
495
- return;
496
- if (node.visible && !node.isLeaf && !lazy)
497
- node.expand();
498
- };
499
- traverse(this);
500
- }
501
- setData(newVal) {
502
- const instanceChanged = newVal !== this.root.data;
503
- if (instanceChanged) {
504
- this.root.setData(newVal);
505
- this._initDefaultCheckedNodes();
506
- } else {
507
- this.root.updateChildren();
508
- }
509
- }
510
- getNode(data) {
511
- if (data instanceof Node)
512
- return data;
513
- const key = isObject(data) ? getNodeKey(this.key, data) : data;
514
- return this.nodesMap[key] || null;
515
- }
516
- insertBefore(data, refData) {
517
- const refNode = this.getNode(refData);
518
- refNode.parent.insertBefore({ data }, refNode);
519
- }
520
- insertAfter(data, refData) {
521
- const refNode = this.getNode(refData);
522
- refNode.parent.insertAfter({ data }, refNode);
523
- }
524
- remove(data) {
525
- const node = this.getNode(data);
526
- if (node && node.parent) {
527
- if (node === this.currentNode) {
528
- this.currentNode = null;
529
- }
530
- node.parent.removeChild(node);
531
- }
532
- }
533
- append(data, parentData) {
534
- const parentNode = parentData ? this.getNode(parentData) : this.root;
535
- if (parentNode) {
536
- parentNode.insertChild({ data });
537
- }
538
- }
539
- _initDefaultCheckedNodes() {
540
- const defaultCheckedKeys = this.defaultCheckedKeys || [];
541
- const nodesMap = this.nodesMap;
542
- defaultCheckedKeys.forEach((checkedKey) => {
543
- const node = nodesMap[checkedKey];
544
- if (node) {
545
- node.setChecked(true, !this.checkStrictly);
546
- }
547
- });
548
- }
549
- _initDefaultCheckedNode(node) {
550
- const defaultCheckedKeys = this.defaultCheckedKeys || [];
551
- if (defaultCheckedKeys.includes(node.key)) {
552
- node.setChecked(true, !this.checkStrictly);
553
- }
554
- }
555
- setDefaultCheckedKey(newVal) {
556
- if (newVal !== this.defaultCheckedKeys) {
557
- this.defaultCheckedKeys = newVal;
558
- this._initDefaultCheckedNodes();
559
- }
560
- }
561
- registerNode(node) {
562
- const key = this.key;
563
- if (!node || !node.data)
564
- return;
565
- if (!key) {
566
- this.nodesMap[node.id] = node;
567
- } else {
568
- const nodeKey = node.key;
569
- if (nodeKey !== void 0)
570
- this.nodesMap[node.key] = node;
571
- }
572
- }
573
- deregisterNode(node) {
574
- const key = this.key;
575
- if (!key || !node || !node.data)
576
- return;
577
- node.childNodes.forEach((child) => {
578
- this.deregisterNode(child);
579
- });
580
- delete this.nodesMap[node.key];
581
- }
582
- getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
583
- const checkedNodes = [];
584
- const traverse = function(node) {
585
- const childNodes = node.root ? node.root.childNodes : node.childNodes;
586
- childNodes.forEach((child) => {
587
- if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) {
588
- checkedNodes.push(child.data);
589
- }
590
- traverse(child);
591
- });
592
- };
593
- traverse(this);
594
- return checkedNodes;
595
- }
596
- getCheckedKeys(leafOnly = false) {
597
- return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);
598
- }
599
- getHalfCheckedNodes() {
600
- const nodes = [];
601
- const traverse = function(node) {
602
- const childNodes = node.root ? node.root.childNodes : node.childNodes;
603
- childNodes.forEach((child) => {
604
- if (child.indeterminate) {
605
- nodes.push(child.data);
606
- }
607
- traverse(child);
608
- });
609
- };
610
- traverse(this);
611
- return nodes;
612
- }
613
- getHalfCheckedKeys() {
614
- return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
615
- }
616
- _getAllNodes() {
617
- const allNodes = [];
618
- const nodesMap = this.nodesMap;
619
- for (const nodeKey in nodesMap) {
620
- if (hasOwn(nodesMap, nodeKey)) {
621
- allNodes.push(nodesMap[nodeKey]);
622
- }
623
- }
624
- return allNodes;
625
- }
626
- updateChildren(key, data) {
627
- const node = this.nodesMap[key];
628
- if (!node)
629
- return;
630
- const childNodes = node.childNodes;
631
- for (let i = childNodes.length - 1; i >= 0; i--) {
632
- const child = childNodes[i];
633
- this.remove(child.data);
634
- }
635
- for (let i = 0, j = data.length; i < j; i++) {
636
- const child = data[i];
637
- this.append(child, node.data);
638
- }
639
- }
640
- _setCheckedKeys(key, leafOnly = false, checkedKeys) {
641
- const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level);
642
- const cache = /* @__PURE__ */ Object.create(null);
643
- const keys = Object.keys(checkedKeys);
644
- allNodes.forEach((node) => node.setChecked(false, false));
645
- for (let i = 0, j = allNodes.length; i < j; i++) {
646
- const node = allNodes[i];
647
- const nodeKey = node.data[key].toString();
648
- const checked = keys.includes(nodeKey);
649
- if (!checked) {
650
- if (node.checked && !cache[nodeKey]) {
651
- node.setChecked(false, false);
652
- }
653
- continue;
654
- }
655
- let parent = node.parent;
656
- while (parent && parent.level > 0) {
657
- cache[parent.data[key]] = true;
658
- parent = parent.parent;
659
- }
660
- if (node.isLeaf || this.checkStrictly) {
661
- node.setChecked(true, false);
662
- continue;
663
- }
664
- node.setChecked(true, true);
665
- if (leafOnly) {
666
- node.setChecked(false, false);
667
- const traverse = function(node2) {
668
- const childNodes = node2.childNodes;
669
- childNodes.forEach((child) => {
670
- if (!child.isLeaf) {
671
- child.setChecked(false, false);
672
- }
673
- traverse(child);
674
- });
675
- };
676
- traverse(node);
677
- }
678
- }
679
- }
680
- setCheckedNodes(array, leafOnly = false) {
681
- const key = this.key;
682
- const checkedKeys = {};
683
- array.forEach((item) => {
684
- checkedKeys[(item || {})[key]] = true;
685
- });
686
- this._setCheckedKeys(key, leafOnly, checkedKeys);
687
- }
688
- setCheckedKeys(keys, leafOnly = false) {
689
- this.defaultCheckedKeys = keys;
690
- const key = this.key;
691
- const checkedKeys = {};
692
- keys.forEach((key2) => {
693
- checkedKeys[key2] = true;
694
- });
695
- this._setCheckedKeys(key, leafOnly, checkedKeys);
696
- }
697
- setDefaultExpandedKeys(keys) {
698
- keys = keys || [];
699
- this.defaultExpandedKeys = keys;
700
- keys.forEach((key) => {
701
- const node = this.getNode(key);
702
- if (node)
703
- node.expand(null, this.autoExpandParent);
704
- });
705
- }
706
- setChecked(data, checked, deep) {
707
- const node = this.getNode(data);
708
- if (node) {
709
- node.setChecked(!!checked, deep);
710
- }
711
- }
712
- getCurrentNode() {
713
- return this.currentNode;
714
- }
715
- setCurrentNode(currentNode) {
716
- const prevCurrentNode = this.currentNode;
717
- if (prevCurrentNode) {
718
- prevCurrentNode.isCurrent = false;
719
- }
720
- this.currentNode = currentNode;
721
- this.currentNode.isCurrent = true;
722
- }
723
- setUserCurrentNode(node, shouldAutoExpandParent = true) {
724
- const key = node[this.key];
725
- const currNode = this.nodesMap[key];
726
- this.setCurrentNode(currNode);
727
- if (shouldAutoExpandParent && this.currentNode.level > 1) {
728
- this.currentNode.parent.expand(null, true);
729
- }
730
- }
731
- setCurrentNodeKey(key, shouldAutoExpandParent = true) {
732
- if (key === null || key === void 0) {
733
- this.currentNode && (this.currentNode.isCurrent = false);
734
- this.currentNode = null;
735
- return;
736
- }
737
- const node = this.getNode(key);
738
- if (node) {
739
- this.setCurrentNode(node);
740
- if (shouldAutoExpandParent && this.currentNode.level > 1) {
741
- this.currentNode.parent.expand(null, true);
742
- }
743
- }
744
- }
745
- }
746
- const _sfc_main$a = defineComponent({
747
- name: "ElTreeNodeContent",
748
- props: {
749
- node: {
750
- type: Object,
751
- required: true
752
- },
753
- renderContent: Function
754
- },
755
- setup(props) {
756
- const ns = useNamespace("tree");
757
- const nodeInstance = inject("NodeInstance");
758
- const tree2 = inject("RootTree");
759
- return () => {
760
- const node = props.node;
761
- const { data, store } = node;
762
- return props.renderContent ? props.renderContent(h, { _self: nodeInstance, node, data, store }) : renderSlot(tree2.ctx.slots, "default", { node, data }, () => [
763
- h("span", { class: ns.be("node", "label") }, [node.label])
764
- ]);
765
- };
766
- }
767
- });
768
- var NodeContent = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]);
769
- function useNodeExpandEventBroadcast(props) {
770
- const parentNodeMap = inject("TreeNodeMap", null);
771
- const currentNodeMap = {
772
- treeNodeExpand: (node) => {
773
- if (props.node !== node) {
774
- props.node.collapse();
775
- }
776
- },
777
- children: []
778
- };
779
- if (parentNodeMap) {
780
- parentNodeMap.children.push(currentNodeMap);
781
- }
782
- provide("TreeNodeMap", currentNodeMap);
783
- return {
784
- broadcastExpanded: (node) => {
785
- if (!props.accordion)
786
- return;
787
- for (const childNode of currentNodeMap.children) {
788
- childNode.treeNodeExpand(node);
789
- }
790
- }
791
- };
792
- }
793
- const dragEventsKey = Symbol("dragEvents");
794
- function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {
795
- const ns = useNamespace("tree");
796
- const dragState = ref({
797
- showDropIndicator: false,
798
- draggingNode: null,
799
- dropNode: null,
800
- allowDrop: true,
801
- dropType: null
802
- });
803
- const treeNodeDragStart = ({ event, treeNode: treeNode2 }) => {
804
- if (typeof props.allowDrag === "function" && !props.allowDrag(treeNode2.node)) {
805
- event.preventDefault();
806
- return false;
807
- }
808
- event.dataTransfer.effectAllowed = "move";
809
- try {
810
- event.dataTransfer.setData("text/plain", "");
811
- } catch (e) {
812
- }
813
- dragState.value.draggingNode = treeNode2;
814
- ctx.emit("node-drag-start", treeNode2.node, event);
815
- };
816
- const treeNodeDragOver = ({ event, treeNode: treeNode2 }) => {
817
- const dropNode = treeNode2;
818
- const oldDropNode = dragState.value.dropNode;
819
- if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) {
820
- removeClass(oldDropNode.$el, ns.is("drop-inner"));
821
- }
822
- const draggingNode = dragState.value.draggingNode;
823
- if (!draggingNode || !dropNode)
824
- return;
825
- let dropPrev = true;
826
- let dropInner = true;
827
- let dropNext = true;
828
- let userAllowDropInner = true;
829
- if (typeof props.allowDrop === "function") {
830
- dropPrev = props.allowDrop(draggingNode.node, dropNode.node, "prev");
831
- userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, "inner");
832
- dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next");
833
- }
834
- event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none";
835
- if ((dropPrev || dropInner || dropNext) && (oldDropNode == null ? void 0 : oldDropNode.node.id) !== dropNode.node.id) {
836
- if (oldDropNode) {
837
- ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event);
838
- }
839
- ctx.emit("node-drag-enter", draggingNode.node, dropNode.node, event);
840
- }
841
- if (dropPrev || dropInner || dropNext) {
842
- dragState.value.dropNode = dropNode;
843
- }
844
- if (dropNode.node.nextSibling === draggingNode.node) {
845
- dropNext = false;
846
- }
847
- if (dropNode.node.previousSibling === draggingNode.node) {
848
- dropPrev = false;
849
- }
850
- if (dropNode.node.contains(draggingNode.node, false)) {
851
- dropInner = false;
852
- }
853
- if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
854
- dropPrev = false;
855
- dropInner = false;
856
- dropNext = false;
857
- }
858
- const targetPosition = dropNode.$el.querySelector(`.${ns.be("node", "content")}`).getBoundingClientRect();
859
- const treePosition = el$.value.getBoundingClientRect();
860
- let dropType;
861
- const prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1;
862
- const nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : 1;
863
- let indicatorTop = -9999;
864
- const distance = event.clientY - targetPosition.top;
865
- if (distance < targetPosition.height * prevPercent) {
866
- dropType = "before";
867
- } else if (distance > targetPosition.height * nextPercent) {
868
- dropType = "after";
869
- } else if (dropInner) {
870
- dropType = "inner";
871
- } else {
872
- dropType = "none";
873
- }
874
- const iconPosition = dropNode.$el.querySelector(`.${ns.be("node", "expand-icon")}`).getBoundingClientRect();
875
- const dropIndicator = dropIndicator$.value;
876
- if (dropType === "before") {
877
- indicatorTop = iconPosition.top - treePosition.top;
878
- } else if (dropType === "after") {
879
- indicatorTop = iconPosition.bottom - treePosition.top;
880
- }
881
- dropIndicator.style.top = `${indicatorTop}px`;
882
- dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`;
883
- if (dropType === "inner") {
884
- addClass(dropNode.$el, ns.is("drop-inner"));
885
- } else {
886
- removeClass(dropNode.$el, ns.is("drop-inner"));
887
- }
888
- dragState.value.showDropIndicator = dropType === "before" || dropType === "after";
889
- dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner;
890
- dragState.value.dropType = dropType;
891
- ctx.emit("node-drag-over", draggingNode.node, dropNode.node, event);
892
- };
893
- const treeNodeDragEnd = (event) => {
894
- const { draggingNode, dropType, dropNode } = dragState.value;
895
- event.preventDefault();
896
- event.dataTransfer.dropEffect = "move";
897
- if (draggingNode && dropNode) {
898
- const draggingNodeCopy = { data: draggingNode.node.data };
899
- if (dropType !== "none") {
900
- draggingNode.node.remove();
901
- }
902
- if (dropType === "before") {
903
- dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node);
904
- } else if (dropType === "after") {
905
- dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node);
906
- } else if (dropType === "inner") {
907
- dropNode.node.insertChild(draggingNodeCopy);
908
- }
909
- if (dropType !== "none") {
910
- store.value.registerNode(draggingNodeCopy);
911
- }
912
- removeClass(dropNode.$el, ns.is("drop-inner"));
913
- ctx.emit("node-drag-end", draggingNode.node, dropNode.node, dropType, event);
914
- if (dropType !== "none") {
915
- ctx.emit("node-drop", draggingNode.node, dropNode.node, dropType, event);
916
- }
917
- }
918
- if (draggingNode && !dropNode) {
919
- ctx.emit("node-drag-end", draggingNode.node, null, dropType, event);
920
- }
921
- dragState.value.showDropIndicator = false;
922
- dragState.value.draggingNode = null;
923
- dragState.value.dropNode = null;
924
- dragState.value.allowDrop = true;
925
- };
926
- provide(dragEventsKey, {
927
- treeNodeDragStart,
928
- treeNodeDragOver,
929
- treeNodeDragEnd
930
- });
931
- return {
932
- dragState
933
- };
934
- }
935
- const _sfc_main$9 = defineComponent({
936
- name: "ElTreeNode",
937
- components: {
938
- ElCollapseTransition: _CollapseTransition,
939
- ElCheckbox,
940
- NodeContent,
941
- ElIcon,
942
- Loading: loading_default
943
- },
944
- props: {
945
- node: {
946
- type: Node,
947
- default: () => ({})
948
- },
949
- props: {
950
- type: Object,
951
- default: () => ({})
952
- },
953
- accordion: Boolean,
954
- renderContent: Function,
955
- renderAfterExpand: Boolean,
956
- showCheckbox: {
957
- type: Boolean,
958
- default: false
959
- }
960
- },
961
- emits: ["node-expand"],
962
- setup(props, ctx) {
963
- const ns = useNamespace("tree");
964
- const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
965
- const tree2 = inject("RootTree");
966
- const expanded = ref(false);
967
- const childNodeRendered = ref(false);
968
- const oldChecked = ref(null);
969
- const oldIndeterminate = ref(null);
970
- const node$ = ref(null);
971
- const dragEvents = inject(dragEventsKey);
972
- const instance = getCurrentInstance();
973
- provide("NodeInstance", instance);
974
- if (props.node.expanded) {
975
- expanded.value = true;
976
- childNodeRendered.value = true;
977
- }
978
- const childrenKey = tree2.props.props["children"] || "children";
979
- watch(() => {
980
- const children = props.node.data[childrenKey];
981
- return children && [...children];
982
- }, () => {
983
- props.node.updateChildren();
984
- });
985
- watch(() => props.node.indeterminate, (val) => {
986
- handleSelectChange(props.node.checked, val);
987
- });
988
- watch(() => props.node.checked, (val) => {
989
- handleSelectChange(val, props.node.indeterminate);
990
- });
991
- watch(() => props.node.expanded, (val) => {
992
- nextTick(() => expanded.value = val);
993
- if (val) {
994
- childNodeRendered.value = true;
995
- }
996
- });
997
- const getNodeKey$1 = (node) => {
998
- return getNodeKey(tree2.props.nodeKey, node.data);
999
- };
1000
- const getNodeClass = (node) => {
1001
- const nodeClassFunc = props.props.class;
1002
- if (!nodeClassFunc) {
1003
- return {};
1004
- }
1005
- let className;
1006
- if (isFunction(nodeClassFunc)) {
1007
- const { data } = node;
1008
- className = nodeClassFunc(data, node);
1009
- } else {
1010
- className = nodeClassFunc;
1011
- }
1012
- if (isString(className)) {
1013
- return { [className]: true };
1014
- } else {
1015
- return className;
1016
- }
1017
- };
1018
- const handleSelectChange = (checked, indeterminate) => {
1019
- if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) {
1020
- tree2.ctx.emit("check-change", props.node.data, checked, indeterminate);
1021
- }
1022
- oldChecked.value = checked;
1023
- oldIndeterminate.value = indeterminate;
1024
- };
1025
- const handleClick = (e) => {
1026
- handleCurrentChange(tree2.store, tree2.ctx.emit, () => tree2.store.value.setCurrentNode(props.node));
1027
- tree2.currentNode.value = props.node;
1028
- if (tree2.props.expandOnClickNode) {
1029
- handleExpandIconClick();
1030
- }
1031
- if (tree2.props.checkOnClickNode && !props.node.disabled) {
1032
- handleCheckChange(null, {
1033
- target: { checked: !props.node.checked }
1034
- });
1035
- }
1036
- tree2.ctx.emit("node-click", props.node.data, props.node, instance, e);
1037
- };
1038
- const handleContextMenu = (event) => {
1039
- if (tree2.instance.vnode.props["onNodeContextmenu"]) {
1040
- event.stopPropagation();
1041
- event.preventDefault();
1042
- }
1043
- tree2.ctx.emit("node-contextmenu", event, props.node.data, props.node, instance);
1044
- };
1045
- const handleExpandIconClick = () => {
1046
- if (props.node.isLeaf)
1047
- return;
1048
- if (expanded.value) {
1049
- tree2.ctx.emit("node-collapse", props.node.data, props.node, instance);
1050
- props.node.collapse();
1051
- } else {
1052
- props.node.expand();
1053
- ctx.emit("node-expand", props.node.data, props.node, instance);
1054
- }
1055
- };
1056
- const handleCheckChange = (value, ev) => {
1057
- props.node.setChecked(ev.target.checked, !tree2.props.checkStrictly);
1058
- nextTick(() => {
1059
- const store = tree2.store.value;
1060
- tree2.ctx.emit("check", props.node.data, {
1061
- checkedNodes: store.getCheckedNodes(),
1062
- checkedKeys: store.getCheckedKeys(),
1063
- halfCheckedNodes: store.getHalfCheckedNodes(),
1064
- halfCheckedKeys: store.getHalfCheckedKeys()
1065
- });
1066
- });
1067
- };
1068
- const handleChildNodeExpand = (nodeData, node, instance2) => {
1069
- broadcastExpanded(node);
1070
- tree2.ctx.emit("node-expand", nodeData, node, instance2);
1071
- };
1072
- const handleDragStart = (event) => {
1073
- if (!tree2.props.draggable)
1074
- return;
1075
- dragEvents.treeNodeDragStart({ event, treeNode: props });
1076
- };
1077
- const handleDragOver = (event) => {
1078
- event.preventDefault();
1079
- if (!tree2.props.draggable)
1080
- return;
1081
- dragEvents.treeNodeDragOver({
1082
- event,
1083
- treeNode: { $el: node$.value, node: props.node }
1084
- });
1085
- };
1086
- const handleDrop = (event) => {
1087
- event.preventDefault();
1088
- };
1089
- const handleDragEnd = (event) => {
1090
- if (!tree2.props.draggable)
1091
- return;
1092
- dragEvents.treeNodeDragEnd(event);
1093
- };
1094
- return {
1095
- ns,
1096
- node$,
1097
- tree: tree2,
1098
- expanded,
1099
- childNodeRendered,
1100
- oldChecked,
1101
- oldIndeterminate,
1102
- getNodeKey: getNodeKey$1,
1103
- getNodeClass,
1104
- handleSelectChange,
1105
- handleClick,
1106
- handleContextMenu,
1107
- handleExpandIconClick,
1108
- handleCheckChange,
1109
- handleChildNodeExpand,
1110
- handleDragStart,
1111
- handleDragOver,
1112
- handleDrop,
1113
- handleDragEnd,
1114
- CaretRight: caret_right_default
1115
- };
1116
- }
1117
- });
1118
- const _hoisted_1$5 = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"];
1119
- const _hoisted_2$3 = ["aria-expanded"];
1120
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1121
- const _component_el_icon = resolveComponent("el-icon");
1122
- const _component_el_checkbox = resolveComponent("el-checkbox");
1123
- const _component_loading = resolveComponent("loading");
1124
- const _component_node_content = resolveComponent("node-content");
1125
- const _component_el_tree_node = resolveComponent("el-tree-node");
1126
- const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
1127
- return withDirectives((openBlock(), createElementBlock("div", {
1128
- ref: "node$",
1129
- class: normalizeClass([
1130
- _ctx.ns.b("node"),
1131
- _ctx.ns.is("expanded", _ctx.expanded),
1132
- _ctx.ns.is("current", _ctx.node.isCurrent),
1133
- _ctx.ns.is("hidden", !_ctx.node.visible),
1134
- _ctx.ns.is("focusable", !_ctx.node.disabled),
1135
- _ctx.ns.is("checked", !_ctx.node.disabled && _ctx.node.checked),
1136
- _ctx.getNodeClass(_ctx.node)
1137
- ]),
1138
- role: "treeitem",
1139
- tabindex: "-1",
1140
- "aria-expanded": _ctx.expanded,
1141
- "aria-disabled": _ctx.node.disabled,
1142
- "aria-checked": _ctx.node.checked,
1143
- draggable: _ctx.tree.props.draggable,
1144
- "data-key": _ctx.getNodeKey(_ctx.node),
1145
- onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])),
1146
- onContextmenu: _cache[2] || (_cache[2] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)),
1147
- onDragstart: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), ["stop"])),
1148
- onDragover: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), ["stop"])),
1149
- onDragend: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), ["stop"])),
1150
- onDrop: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.handleDrop && _ctx.handleDrop(...args), ["stop"]))
1151
- }, [
1152
- createBaseVNode("div", {
1153
- class: normalizeClass(_ctx.ns.be("node", "content")),
1154
- style: normalizeStyle({ paddingLeft: (_ctx.node.level - 1) * _ctx.tree.props.indent + "px" })
1155
- }, [
1156
- _ctx.tree.props.icon || _ctx.CaretRight ? (openBlock(), createBlock(_component_el_icon, {
1157
- key: 0,
1158
- class: normalizeClass([
1159
- _ctx.ns.be("node", "expand-icon"),
1160
- _ctx.ns.is("leaf", _ctx.node.isLeaf),
1161
- {
1162
- expanded: !_ctx.node.isLeaf && _ctx.expanded
1163
- }
1164
- ]),
1165
- onClick: withModifiers(_ctx.handleExpandIconClick, ["stop"])
1166
- }, {
1167
- default: withCtx(() => [
1168
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.tree.props.icon || _ctx.CaretRight)))
1169
- ]),
1170
- _: 1
1171
- }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
1172
- _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {
1173
- key: 1,
1174
- "model-value": _ctx.node.checked,
1175
- indeterminate: _ctx.node.indeterminate,
1176
- disabled: !!_ctx.node.disabled,
1177
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
1178
- }, ["stop"])),
1179
- onChange: _ctx.handleCheckChange
1180
- }, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) : createCommentVNode("v-if", true),
1181
- _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, {
1182
- key: 2,
1183
- class: normalizeClass([_ctx.ns.be("node", "loading-icon"), _ctx.ns.is("loading")])
1184
- }, {
1185
- default: withCtx(() => [
1186
- createVNode(_component_loading)
1187
- ]),
1188
- _: 1
1189
- }, 8, ["class"])) : createCommentVNode("v-if", true),
1190
- createVNode(_component_node_content, {
1191
- node: _ctx.node,
1192
- "render-content": _ctx.renderContent
1193
- }, null, 8, ["node", "render-content"])
1194
- ], 6),
1195
- createVNode(_component_el_collapse_transition, null, {
1196
- default: withCtx(() => [
1197
- !_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", {
1198
- key: 0,
1199
- class: normalizeClass(_ctx.ns.be("node", "children")),
1200
- role: "group",
1201
- "aria-expanded": _ctx.expanded
1202
- }, [
1203
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.childNodes, (child) => {
1204
- return openBlock(), createBlock(_component_el_tree_node, {
1205
- key: _ctx.getNodeKey(child),
1206
- "render-content": _ctx.renderContent,
1207
- "render-after-expand": _ctx.renderAfterExpand,
1208
- "show-checkbox": _ctx.showCheckbox,
1209
- node: child,
1210
- accordion: _ctx.accordion,
1211
- props: _ctx.props,
1212
- onNodeExpand: _ctx.handleChildNodeExpand
1213
- }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]);
1214
- }), 128))
1215
- ], 10, _hoisted_2$3)), [
1216
- [vShow, _ctx.expanded]
1217
- ]) : createCommentVNode("v-if", true)
1218
- ]),
1219
- _: 1
1220
- })
1221
- ], 42, _hoisted_1$5)), [
1222
- [vShow, _ctx.node.visible]
1223
- ]);
1224
- }
1225
- var ElTreeNode = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]);
1226
- function useKeydown({ el$ }, store) {
1227
- const ns = useNamespace("tree");
1228
- const treeItems = shallowRef([]);
1229
- const checkboxItems = shallowRef([]);
1230
- onMounted(() => {
1231
- initTabIndex();
1232
- });
1233
- onUpdated(() => {
1234
- treeItems.value = Array.from(el$.value.querySelectorAll("[role=treeitem]"));
1235
- checkboxItems.value = Array.from(el$.value.querySelectorAll("input[type=checkbox]"));
1236
- });
1237
- watch(checkboxItems, (val) => {
1238
- val.forEach((checkbox) => {
1239
- checkbox.setAttribute("tabindex", "-1");
1240
- });
1241
- });
1242
- const handleKeydown = (ev) => {
1243
- const currentItem = ev.target;
1244
- if (!currentItem.className.includes(ns.b("node")))
1245
- return;
1246
- const code = ev.code;
1247
- treeItems.value = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
1248
- const currentIndex = treeItems.value.indexOf(currentItem);
1249
- let nextIndex;
1250
- if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {
1251
- ev.preventDefault();
1252
- if (code === EVENT_CODE.up) {
1253
- nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.value.length - 1;
1254
- const startIndex = nextIndex;
1255
- while (true) {
1256
- if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus)
1257
- break;
1258
- nextIndex--;
1259
- if (nextIndex === startIndex) {
1260
- nextIndex = -1;
1261
- break;
1262
- }
1263
- if (nextIndex < 0) {
1264
- nextIndex = treeItems.value.length - 1;
1265
- }
1266
- }
1267
- } else {
1268
- nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.value.length - 1 ? currentIndex + 1 : 0;
1269
- const startIndex = nextIndex;
1270
- while (true) {
1271
- if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus)
1272
- break;
1273
- nextIndex++;
1274
- if (nextIndex === startIndex) {
1275
- nextIndex = -1;
1276
- break;
1277
- }
1278
- if (nextIndex >= treeItems.value.length) {
1279
- nextIndex = 0;
1280
- }
1281
- }
1282
- }
1283
- nextIndex !== -1 && treeItems.value[nextIndex].focus();
1284
- }
1285
- if ([EVENT_CODE.left, EVENT_CODE.right].includes(code)) {
1286
- ev.preventDefault();
1287
- currentItem.click();
1288
- }
1289
- const hasInput = currentItem.querySelector('[type="checkbox"]');
1290
- if ([EVENT_CODE.enter, EVENT_CODE.space].includes(code) && hasInput) {
1291
- ev.preventDefault();
1292
- hasInput.click();
1293
- }
1294
- };
1295
- useEventListener(el$, "keydown", handleKeydown);
1296
- const initTabIndex = () => {
1297
- var _a;
1298
- treeItems.value = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
1299
- checkboxItems.value = Array.from(el$.value.querySelectorAll("input[type=checkbox]"));
1300
- const checkedItem = el$.value.querySelectorAll(`.${ns.is("checked")}[role=treeitem]`);
1301
- if (checkedItem.length) {
1302
- checkedItem[0].setAttribute("tabindex", "0");
1303
- return;
1304
- }
1305
- (_a = treeItems.value[0]) == null ? void 0 : _a.setAttribute("tabindex", "0");
1306
- };
1307
- }
1308
- const _sfc_main$8 = defineComponent({
1309
- name: "ElTree",
1310
- components: { ElTreeNode },
1311
- props: {
1312
- data: {
1313
- type: Array,
1314
- default: () => []
1315
- },
1316
- emptyText: {
1317
- type: String
1318
- },
1319
- renderAfterExpand: {
1320
- type: Boolean,
1321
- default: true
1322
- },
1323
- nodeKey: String,
1324
- checkStrictly: Boolean,
1325
- defaultExpandAll: Boolean,
1326
- expandOnClickNode: {
1327
- type: Boolean,
1328
- default: true
1329
- },
1330
- checkOnClickNode: Boolean,
1331
- checkDescendants: {
1332
- type: Boolean,
1333
- default: false
1334
- },
1335
- autoExpandParent: {
1336
- type: Boolean,
1337
- default: true
1338
- },
1339
- defaultCheckedKeys: Array,
1340
- defaultExpandedKeys: Array,
1341
- currentNodeKey: [String, Number],
1342
- renderContent: Function,
1343
- showCheckbox: {
1344
- type: Boolean,
1345
- default: false
1346
- },
1347
- draggable: {
1348
- type: Boolean,
1349
- default: false
1350
- },
1351
- allowDrag: Function,
1352
- allowDrop: Function,
1353
- props: {
1354
- type: Object,
1355
- default: () => ({
1356
- children: "children",
1357
- label: "label",
1358
- disabled: "disabled"
1359
- })
1360
- },
1361
- lazy: {
1362
- type: Boolean,
1363
- default: false
1364
- },
1365
- highlightCurrent: Boolean,
1366
- load: Function,
1367
- filterNodeMethod: Function,
1368
- accordion: Boolean,
1369
- indent: {
1370
- type: Number,
1371
- default: 18
1372
- },
1373
- icon: {
1374
- type: iconPropType
1375
- }
1376
- },
1377
- emits: [
1378
- "check-change",
1379
- "current-change",
1380
- "node-click",
1381
- "node-contextmenu",
1382
- "node-collapse",
1383
- "node-expand",
1384
- "check",
1385
- "node-drag-start",
1386
- "node-drag-end",
1387
- "node-drop",
1388
- "node-drag-leave",
1389
- "node-drag-enter",
1390
- "node-drag-over"
1391
- ],
1392
- setup(props, ctx) {
1393
- const { t } = useLocale();
1394
- const ns = useNamespace("tree");
1395
- const store = ref(new TreeStore({
1396
- key: props.nodeKey,
1397
- data: props.data,
1398
- lazy: props.lazy,
1399
- props: props.props,
1400
- load: props.load,
1401
- currentNodeKey: props.currentNodeKey,
1402
- checkStrictly: props.checkStrictly,
1403
- checkDescendants: props.checkDescendants,
1404
- defaultCheckedKeys: props.defaultCheckedKeys,
1405
- defaultExpandedKeys: props.defaultExpandedKeys,
1406
- autoExpandParent: props.autoExpandParent,
1407
- defaultExpandAll: props.defaultExpandAll,
1408
- filterNodeMethod: props.filterNodeMethod
1409
- }));
1410
- store.value.initialize();
1411
- const root = ref(store.value.root);
1412
- const currentNode = ref(null);
1413
- const el$ = ref(null);
1414
- const dropIndicator$ = ref(null);
1415
- const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
1416
- const { dragState } = useDragNodeHandler({
1417
- props,
1418
- ctx,
1419
- el$,
1420
- dropIndicator$,
1421
- store
1422
- });
1423
- useKeydown({ el$ }, store);
1424
- const isEmpty = computed(() => {
1425
- const { childNodes } = root.value;
1426
- return !childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible);
1427
- });
1428
- watch(() => props.currentNodeKey, (newVal) => {
1429
- store.value.setCurrentNodeKey(newVal);
1430
- });
1431
- watch(() => props.defaultCheckedKeys, (newVal) => {
1432
- store.value.setDefaultCheckedKey(newVal);
1433
- });
1434
- watch(() => props.defaultExpandedKeys, (newVal) => {
1435
- store.value.setDefaultExpandedKeys(newVal);
1436
- });
1437
- watch(() => props.data, (newVal) => {
1438
- store.value.setData(newVal);
1439
- }, { deep: true });
1440
- watch(() => props.checkStrictly, (newVal) => {
1441
- store.value.checkStrictly = newVal;
1442
- });
1443
- const filter = (value) => {
1444
- if (!props.filterNodeMethod)
1445
- throw new Error("[Tree] filterNodeMethod is required when filter");
1446
- store.value.filter(value);
1447
- };
1448
- const getNodeKey$1 = (node) => {
1449
- return getNodeKey(props.nodeKey, node.data);
1450
- };
1451
- const getNodePath = (data) => {
1452
- if (!props.nodeKey)
1453
- throw new Error("[Tree] nodeKey is required in getNodePath");
1454
- const node = store.value.getNode(data);
1455
- if (!node)
1456
- return [];
1457
- const path = [node.data];
1458
- let parent = node.parent;
1459
- while (parent && parent !== root.value) {
1460
- path.push(parent.data);
1461
- parent = parent.parent;
1462
- }
1463
- return path.reverse();
1464
- };
1465
- const getCheckedNodes = (leafOnly, includeHalfChecked) => {
1466
- return store.value.getCheckedNodes(leafOnly, includeHalfChecked);
1467
- };
1468
- const getCheckedKeys = (leafOnly) => {
1469
- return store.value.getCheckedKeys(leafOnly);
1470
- };
1471
- const getCurrentNode = () => {
1472
- const currentNode2 = store.value.getCurrentNode();
1473
- return currentNode2 ? currentNode2.data : null;
1474
- };
1475
- const getCurrentKey = () => {
1476
- if (!props.nodeKey)
1477
- throw new Error("[Tree] nodeKey is required in getCurrentKey");
1478
- const currentNode2 = getCurrentNode();
1479
- return currentNode2 ? currentNode2[props.nodeKey] : null;
1480
- };
1481
- const setCheckedNodes = (nodes, leafOnly) => {
1482
- if (!props.nodeKey)
1483
- throw new Error("[Tree] nodeKey is required in setCheckedNodes");
1484
- store.value.setCheckedNodes(nodes, leafOnly);
1485
- };
1486
- const setCheckedKeys = (keys, leafOnly) => {
1487
- if (!props.nodeKey)
1488
- throw new Error("[Tree] nodeKey is required in setCheckedKeys");
1489
- store.value.setCheckedKeys(keys, leafOnly);
1490
- };
1491
- const setChecked = (data, checked, deep) => {
1492
- store.value.setChecked(data, checked, deep);
1493
- };
1494
- const getHalfCheckedNodes = () => {
1495
- return store.value.getHalfCheckedNodes();
1496
- };
1497
- const getHalfCheckedKeys = () => {
1498
- return store.value.getHalfCheckedKeys();
1499
- };
1500
- const setCurrentNode = (node, shouldAutoExpandParent = true) => {
1501
- if (!props.nodeKey)
1502
- throw new Error("[Tree] nodeKey is required in setCurrentNode");
1503
- handleCurrentChange(store, ctx.emit, () => store.value.setUserCurrentNode(node, shouldAutoExpandParent));
1504
- };
1505
- const setCurrentKey = (key, shouldAutoExpandParent = true) => {
1506
- if (!props.nodeKey)
1507
- throw new Error("[Tree] nodeKey is required in setCurrentKey");
1508
- handleCurrentChange(store, ctx.emit, () => store.value.setCurrentNodeKey(key, shouldAutoExpandParent));
1509
- };
1510
- const getNode = (data) => {
1511
- return store.value.getNode(data);
1512
- };
1513
- const remove = (data) => {
1514
- store.value.remove(data);
1515
- };
1516
- const append = (data, parentNode) => {
1517
- store.value.append(data, parentNode);
1518
- };
1519
- const insertBefore = (data, refNode) => {
1520
- store.value.insertBefore(data, refNode);
1521
- };
1522
- const insertAfter = (data, refNode) => {
1523
- store.value.insertAfter(data, refNode);
1524
- };
1525
- const handleNodeExpand = (nodeData, node, instance) => {
1526
- broadcastExpanded(node);
1527
- ctx.emit("node-expand", nodeData, node, instance);
1528
- };
1529
- const updateKeyChildren = (key, data) => {
1530
- if (!props.nodeKey)
1531
- throw new Error("[Tree] nodeKey is required in updateKeyChild");
1532
- store.value.updateChildren(key, data);
1533
- };
1534
- provide("RootTree", {
1535
- ctx,
1536
- props,
1537
- store,
1538
- root,
1539
- currentNode,
1540
- instance: getCurrentInstance()
1541
- });
1542
- provide(formItemContextKey, void 0);
1543
- return {
1544
- ns,
1545
- store,
1546
- root,
1547
- currentNode,
1548
- dragState,
1549
- el$,
1550
- dropIndicator$,
1551
- isEmpty,
1552
- filter,
1553
- getNodeKey: getNodeKey$1,
1554
- getNodePath,
1555
- getCheckedNodes,
1556
- getCheckedKeys,
1557
- getCurrentNode,
1558
- getCurrentKey,
1559
- setCheckedNodes,
1560
- setCheckedKeys,
1561
- setChecked,
1562
- getHalfCheckedNodes,
1563
- getHalfCheckedKeys,
1564
- setCurrentNode,
1565
- setCurrentKey,
1566
- t,
1567
- getNode,
1568
- remove,
1569
- append,
1570
- insertBefore,
1571
- insertAfter,
1572
- handleNodeExpand,
1573
- updateKeyChildren
1574
- };
1575
- }
1576
- });
1577
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1578
- const _component_el_tree_node = resolveComponent("el-tree-node");
1579
- return openBlock(), createElementBlock("div", {
1580
- ref: "el$",
1581
- class: normalizeClass([
1582
- _ctx.ns.b(),
1583
- _ctx.ns.is("dragging", !!_ctx.dragState.draggingNode),
1584
- _ctx.ns.is("drop-not-allow", !_ctx.dragState.allowDrop),
1585
- _ctx.ns.is("drop-inner", _ctx.dragState.dropType === "inner"),
1586
- { [_ctx.ns.m("highlight-current")]: _ctx.highlightCurrent }
1587
- ]),
1588
- role: "tree"
1589
- }, [
1590
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.root.childNodes, (child) => {
1591
- return openBlock(), createBlock(_component_el_tree_node, {
1592
- key: _ctx.getNodeKey(child),
1593
- node: child,
1594
- props: _ctx.props,
1595
- accordion: _ctx.accordion,
1596
- "render-after-expand": _ctx.renderAfterExpand,
1597
- "show-checkbox": _ctx.showCheckbox,
1598
- "render-content": _ctx.renderContent,
1599
- onNodeExpand: _ctx.handleNodeExpand
1600
- }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]);
1601
- }), 128)),
1602
- _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
1603
- key: 0,
1604
- class: normalizeClass(_ctx.ns.e("empty-block"))
1605
- }, [
1606
- renderSlot(_ctx.$slots, "empty", {}, () => {
1607
- var _a;
1608
- return [
1609
- createBaseVNode("span", {
1610
- class: normalizeClass(_ctx.ns.e("empty-text"))
1611
- }, toDisplayString((_a = _ctx.emptyText) != null ? _a : _ctx.t("el.tree.emptyText")), 3)
1612
- ];
1613
- })
1614
- ], 2)) : createCommentVNode("v-if", true),
1615
- withDirectives(createBaseVNode("div", {
1616
- ref: "dropIndicator$",
1617
- class: normalizeClass(_ctx.ns.e("drop-indicator"))
1618
- }, null, 2), [
1619
- [vShow, _ctx.dragState.showDropIndicator]
1620
- ])
1621
- ], 2);
1622
- }
1623
- var Tree = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]);
1624
- Tree.install = (app) => {
1625
- app.component(Tree.name, Tree);
1626
- };
1627
- const _Tree = Tree;
1628
- const ElTree = _Tree;
1629
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1630
- ...{ name: "N8nPulse" },
1631
- __name: "Pulse",
1632
- setup(__props) {
1633
- return (_ctx, _cache) => {
1634
- return openBlock(), createElementBlock("div", {
1635
- class: normalizeClass(["pulse", _ctx.$style.pulseContainer])
1636
- }, [
1637
- createBaseVNode("div", {
1638
- class: normalizeClass(_ctx.$style.pulse)
1639
- }, [
1640
- createBaseVNode("div", {
1641
- class: normalizeClass(_ctx.$style.pulse2)
1642
- }, [
1643
- renderSlot(_ctx.$slots, "default")
1644
- ], 2)
1645
- ], 2)
1646
- ], 2);
1647
- };
1648
- }
1649
- });
1650
- const pulseContainer = "_pulseContainer_1w2uc_123";
1651
- const pulse = "_pulse_1w2uc_123";
1652
- const pulse2 = "_pulse2_1w2uc_139";
1653
- const style0$7 = {
1654
- pulseContainer,
1655
- pulse,
1656
- pulse2
1657
- };
1658
- const cssModules$7 = {
1659
- "$style": style0$7
1660
- };
1661
- const N8nPulse = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["__cssModules", cssModules$7]]);
1662
- const _hoisted_1$4 = ["data-node-name", "data-node-placement", "onClick"];
1663
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1664
- __name: "NDVFloatingNodes",
1665
- props: {
1666
- rootNode: {}
1667
- },
1668
- emits: ["switchSelectedNode"],
1669
- setup(__props, { expose: __expose, emit: __emit }) {
1670
- const props = __props;
1671
- const workflowsStore = useWorkflowsStore();
1672
- const nodeTypesStore = useNodeTypesStore();
1673
- const posthogStore = usePostHog();
1674
- const emit = __emit;
1675
- const isNDVV2 = computed(
1676
- () => posthogStore.isVariantEnabled(
1677
- NDV_UI_OVERHAUL_EXPERIMENT.name,
1678
- NDV_UI_OVERHAUL_EXPERIMENT.variant
1679
- )
1680
- );
1681
- function moveNodeDirection(direction) {
1682
- const matchedDirectionNode = connectedNodes.value[direction][0];
1683
- if (matchedDirectionNode) {
1684
- emit("switchSelectedNode", matchedDirectionNode.node.name);
1685
- }
1686
- }
1687
- function onKeyDown(e) {
1688
- if (e.shiftKey && e.altKey && (e.ctrlKey || e.metaKey)) {
1689
- const mapper = {
1690
- ArrowUp: "outputSub",
1691
- ArrowRight: "outputMain",
1692
- ArrowLeft: "inputMain"
1693
- /* left */
1694
- };
1695
- const matchingDirection = mapper[e.key] || null;
1696
- if (matchingDirection) {
1697
- moveNodeDirection(matchingDirection);
1698
- }
1699
- }
1700
- }
1701
- function getINodesFromNames(names) {
1702
- return names.map((name) => {
1703
- const node = workflowsStore.getNodeByName(name);
1704
- if (node) {
1705
- const nodeType = nodeTypesStore.getNodeType(node.type);
1706
- if (nodeType) {
1707
- return { node, nodeType };
1708
- }
1709
- }
1710
- return null;
1711
- }).filter((n) => n !== null);
1712
- }
1713
- const connectedNodes = computed(() => {
1714
- const workflowObject = workflowsStore.workflowObject;
1715
- const rootName = props.rootNode.name;
1716
- return {
1717
- [
1718
- "outputSub"
1719
- /* top */
1720
- ]: getINodesFromNames(
1721
- workflowObject.getChildNodes(rootName, "ALL_NON_MAIN")
1722
- ),
1723
- [
1724
- "outputMain"
1725
- /* right */
1726
- ]: getINodesFromNames(
1727
- workflowObject.getChildNodes(rootName, NodeConnectionTypes.Main, 1)
1728
- ).reverse(),
1729
- [
1730
- "inputMain"
1731
- /* left */
1732
- ]: getINodesFromNames(
1733
- workflowObject.getParentNodes(rootName, NodeConnectionTypes.Main, 1)
1734
- ).reverse()
1735
- };
1736
- });
1737
- const connectionGroups = [
1738
- "outputSub",
1739
- "outputMain",
1740
- "inputMain"
1741
- /* left */
1742
- ];
1743
- const tooltipPositionMapper = {
1744
- [
1745
- "outputSub"
1746
- /* top */
1747
- ]: "bottom",
1748
- [
1749
- "outputMain"
1750
- /* right */
1751
- ]: "left",
1752
- [
1753
- "inputMain"
1754
- /* left */
1755
- ]: "right"
1756
- };
1757
- onMounted(() => {
1758
- document.addEventListener("keydown", onKeyDown, true);
1759
- });
1760
- onBeforeUnmount(() => {
1761
- document.removeEventListener("keydown", onKeyDown, true);
1762
- });
1763
- __expose({
1764
- moveNodeDirection
1765
- });
1766
- return (_ctx, _cache) => {
1767
- return openBlock(), createElementBlock("aside", {
1768
- class: normalizeClass([_ctx.$style.floatingNodes, { [_ctx.$style.v2]: isNDVV2.value }]),
1769
- "data-test-id": "floating-nodes"
1770
- }, [
1771
- (openBlock(), createElementBlock(Fragment, null, renderList(connectionGroups, (connectionGroup) => {
1772
- return createBaseVNode("ul", {
1773
- key: connectionGroup,
1774
- class: normalizeClass([_ctx.$style.nodesList, _ctx.$style[connectionGroup]])
1775
- }, [
1776
- (openBlock(true), createElementBlock(Fragment, null, renderList(connectedNodes.value[connectionGroup], ({ node, nodeType }) => {
1777
- return openBlock(), createElementBlock(Fragment, null, [
1778
- node && nodeType ? (openBlock(), createBlock(unref(N8nTooltip), {
1779
- key: node.name,
1780
- placement: tooltipPositionMapper[connectionGroup],
1781
- teleported: false,
1782
- offset: isNDVV2.value ? 16 : 60
1783
- }, {
1784
- content: withCtx(() => [
1785
- createTextVNode(toDisplayString(node.name), 1)
1786
- ]),
1787
- default: withCtx(() => [
1788
- createBaseVNode("li", {
1789
- class: normalizeClass(_ctx.$style.connectedNode),
1790
- "data-test-id": "floating-node",
1791
- "data-node-name": node.name,
1792
- "data-node-placement": connectionGroup,
1793
- onClick: ($event) => emit("switchSelectedNode", node.name)
1794
- }, [
1795
- createVNode(NodeIcon, {
1796
- "node-type": nodeType,
1797
- "node-name": node.name,
1798
- "tooltip-position": tooltipPositionMapper[connectionGroup],
1799
- size: isNDVV2.value ? 24 : 35,
1800
- circle: ""
1801
- }, null, 8, ["node-type", "node-name", "tooltip-position", "size"])
1802
- ], 10, _hoisted_1$4)
1803
- ]),
1804
- _: 2
1805
- }, 1032, ["placement", "offset"])) : createCommentVNode("", true)
1806
- ], 64);
1807
- }), 256))
1808
- ], 2);
1809
- }), 64))
1810
- ], 2);
1811
- };
1812
- }
1813
- });
1814
- const floatingNodes = "_floatingNodes_mldmm_123";
1815
- const nodesList = "_nodesList_mldmm_133";
1816
- const inputSub = "_inputSub_mldmm_147";
1817
- const outputSub = "_outputSub_mldmm_147";
1818
- const outputMain = "_outputMain_mldmm_160";
1819
- const inputMain = "_inputMain_mldmm_160";
1820
- const connectedNode = "_connectedNode_mldmm_173";
1821
- const v2 = "_v2_mldmm_214";
1822
- const style0$6 = {
1823
- floatingNodes,
1824
- nodesList,
1825
- inputSub,
1826
- outputSub,
1827
- outputMain,
1828
- inputMain,
1829
- connectedNode,
1830
- v2
1831
- };
1832
- const cssModules$6 = {
1833
- "$style": style0$6
1834
- };
1835
- const NDVFloatingNodes = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__cssModules", cssModules$6]]);
1836
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1837
- __name: "RunInfo",
1838
- props: {
1839
- taskData: {},
1840
- hasStaleData: { type: Boolean },
1841
- hasPinData: { type: Boolean }
1842
- },
1843
- setup(__props) {
1844
- const i18n = useI18n();
1845
- const props = __props;
1846
- const runTaskData = computed(() => {
1847
- return props.taskData;
1848
- });
1849
- const theme = computed(() => {
1850
- return props.taskData?.error ? "danger" : "success";
1851
- });
1852
- const runMetadata = computed(() => {
1853
- if (!runTaskData.value) {
1854
- return null;
1855
- }
1856
- const { date, time } = convertToDisplayDateComponents(runTaskData.value.startTime);
1857
- return {
1858
- executionTime: runTaskData.value.executionTime,
1859
- startTime: `${date} at ${time}`
1860
- };
1861
- });
1862
- return (_ctx, _cache) => {
1863
- const _directive_n8n_html = resolveDirective("n8n-html");
1864
- return _ctx.hasStaleData ? (openBlock(), createBlock(unref(InfoTip), {
1865
- key: 0,
1866
- theme: "warning-light",
1867
- type: "tooltip",
1868
- "tooltip-placement": "right",
1869
- "data-test-id": "node-run-info-stale"
1870
- }, {
1871
- default: withCtx(() => [
1872
- withDirectives(createBaseVNode("span", null, null, 512), [
1873
- [
1874
- _directive_n8n_html,
1875
- unref(i18n).baseText(
1876
- _ctx.hasPinData ? "ndv.output.staleDataWarning.pinData" : "ndv.output.staleDataWarning.regular"
1877
- )
1878
- ]
1879
- ])
1880
- ]),
1881
- _: 1
1882
- })) : runMetadata.value ? (openBlock(), createElementBlock("div", {
1883
- key: 1,
1884
- class: normalizeClass(_ctx.$style.tooltipRow)
1885
- }, [
1886
- _ctx.taskData?.executionStatus !== "canceled" ? (openBlock(), createBlock(unref(InfoTip), {
1887
- key: 0,
1888
- type: "note",
1889
- theme: theme.value,
1890
- "data-test-id": `node-run-status-${theme.value}`,
1891
- size: "large"
1892
- }, null, 8, ["theme", "data-test-id"])) : createCommentVNode("", true),
1893
- createVNode(unref(InfoTip), {
1894
- type: "tooltip",
1895
- theme: "info",
1896
- "data-test-id": `node-run-info`,
1897
- "tooltip-placement": "right"
1898
- }, {
1899
- default: withCtx(() => [
1900
- createBaseVNode("div", null, [
1901
- createVNode(unref(N8nText), {
1902
- bold: true,
1903
- size: "small"
1904
- }, {
1905
- default: withCtx(() => [
1906
- createTextVNode(toDisplayString(runTaskData.value?.error ? unref(i18n).baseText("runData.executionStatus.failed") : runTaskData.value?.executionStatus === "canceled" ? unref(i18n).baseText("runData.executionStatus.canceled") : unref(i18n).baseText("runData.executionStatus.success")), 1)
1907
- ]),
1908
- _: 1
1909
- }),
1910
- _cache[0] || (_cache[0] = createBaseVNode("br", null, null, -1)),
1911
- createVNode(unref(N8nText), {
1912
- bold: true,
1913
- size: "small"
1914
- }, {
1915
- default: withCtx(() => [
1916
- createTextVNode(toDisplayString(unref(i18n).baseText("runData.startTime") + ":"), 1)
1917
- ]),
1918
- _: 1
1919
- }),
1920
- createTextVNode(" " + toDisplayString(runMetadata.value.startTime), 1),
1921
- _cache[1] || (_cache[1] = createBaseVNode("br", null, null, -1)),
1922
- createVNode(unref(N8nText), {
1923
- bold: true,
1924
- size: "small"
1925
- }, {
1926
- default: withCtx(() => [
1927
- createTextVNode(toDisplayString(unref(i18n).baseText("runData.executionTime") + ":"), 1)
1928
- ]),
1929
- _: 1
1930
- }),
1931
- createTextVNode(" " + toDisplayString(runMetadata.value.executionTime) + " " + toDisplayString(unref(i18n).baseText("runData.ms")), 1)
1932
- ])
1933
- ]),
1934
- _: 1
1935
- })
1936
- ], 2)) : createCommentVNode("", true);
1937
- };
1938
- }
1939
- });
1940
- const tooltipRow = "_tooltipRow_14r7d_123";
1941
- const style0$5 = {
1942
- tooltipRow
1943
- };
1944
- const cssModules$5 = {
1945
- "$style": style0$5
1946
- };
1947
- const RunInfo = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__cssModules", cssModules$5]]);
1948
- var capitalizeExports = requireCapitalize();
1949
- const capitalize = /* @__PURE__ */ getDefaultExportFromCjs(capitalizeExports);
1950
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1951
- __name: "AiRunContentBlock",
1952
- props: {
1953
- runData: {},
1954
- error: {}
1955
- },
1956
- setup(__props) {
1957
- const props = __props;
1958
- const isExpanded = ref(getInitialExpandedState());
1959
- const renderType = ref("rendered");
1960
- const parsedRun = computed(() => parseAiContent(props.runData.data ?? [], props.runData.type));
1961
- const contentParsed = computed(
1962
- () => parsedRun.value.some((item) => item.parsedContent?.parsed === true)
1963
- );
1964
- function getInitialExpandedState() {
1965
- const collapsedTypes = {
1966
- input: [
1967
- NodeConnectionTypes.AiDocument,
1968
- NodeConnectionTypes.AiTextSplitter
1969
- ],
1970
- output: [
1971
- NodeConnectionTypes.AiDocument,
1972
- NodeConnectionTypes.AiEmbedding,
1973
- NodeConnectionTypes.AiTextSplitter,
1974
- NodeConnectionTypes.AiVectorStore
1975
- ]
1976
- };
1977
- return !collapsedTypes[props.runData.inOut].includes(props.runData.type);
1978
- }
1979
- function onBlockHeaderClick() {
1980
- isExpanded.value = !isExpanded.value;
1981
- }
1982
- function onRenderTypeChange(value) {
1983
- renderType.value = value;
1984
- }
1985
- return (_ctx, _cache) => {
1986
- return openBlock(), createElementBlock("div", {
1987
- class: normalizeClass(_ctx.$style.block)
1988
- }, [
1989
- createBaseVNode("header", {
1990
- class: normalizeClass(_ctx.$style.blockHeader),
1991
- onClick: onBlockHeaderClick
1992
- }, [
1993
- createBaseVNode("button", {
1994
- class: normalizeClass(_ctx.$style.blockToggle)
1995
- }, [
1996
- createVNode(unref(N8nIcon), {
1997
- icon: isExpanded.value ? "chevron-down" : "chevron-right",
1998
- size: "large"
1999
- }, null, 8, ["icon"])
2000
- ], 2),
2001
- createBaseVNode("p", {
2002
- class: normalizeClass(_ctx.$style.blockTitle)
2003
- }, toDisplayString(unref(capitalize)(_ctx.runData.inOut)), 3),
2004
- contentParsed.value && !_ctx.error && isExpanded.value ? (openBlock(), createBlock(unref(N8nRadioButtons), {
2005
- key: 0,
2006
- size: "small",
2007
- "model-value": renderType.value,
2008
- class: normalizeClass(_ctx.$style.rawSwitch),
2009
- options: [
2010
- { label: "Rendered", value: "rendered" },
2011
- { label: "JSON", value: "json" }
2012
- ],
2013
- "onUpdate:modelValue": onRenderTypeChange
2014
- }, null, 8, ["model-value", "class"])) : createCommentVNode("", true)
2015
- ], 2),
2016
- createBaseVNode("main", {
2017
- class: normalizeClass({
2018
- [_ctx.$style.blockContent]: true,
2019
- [_ctx.$style.blockContentExpanded]: isExpanded.value
2020
- })
2021
- }, [
2022
- _ctx.error ? (openBlock(), createBlock(_sfc_main$b, {
2023
- key: 0,
2024
- error: _ctx.error,
2025
- class: normalizeClass(_ctx.$style.error),
2026
- "show-details": ""
2027
- }, null, 8, ["error", "class"])) : (openBlock(), createBlock(RunDataAi$1, {
2028
- key: 1,
2029
- data: _ctx.runData.data,
2030
- type: _ctx.runData.type,
2031
- content: parsedRun.value,
2032
- "render-type": renderType.value
2033
- }, null, 8, ["data", "type", "content", "render-type"]))
2034
- ], 2)
2035
- ], 2);
2036
- };
2037
- }
2038
- });
2039
- const block = "_block_wafm4_123";
2040
- const blockContent = "_blockContent_wafm4_130";
2041
- const blockContentExpanded = "_blockContentExpanded_wafm4_134";
2042
- const rawSwitch = "_rawSwitch_wafm4_138";
2043
- const blockHeader = "_blockHeader_wafm4_148";
2044
- const blockTitle = "_blockTitle_wafm4_161";
2045
- const blockToggle = "_blockToggle_wafm4_168";
2046
- const error = "_error_wafm4_176";
2047
- const style0$4 = {
2048
- block,
2049
- blockContent,
2050
- blockContentExpanded,
2051
- rawSwitch,
2052
- blockHeader,
2053
- blockTitle,
2054
- blockToggle,
2055
- error
2056
- };
2057
- const cssModules$4 = {
2058
- "$style": style0$4
2059
- };
2060
- const AiRunContentBlock = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__cssModules", cssModules$4]]);
2061
- const _hoisted_1$3 = { key: 0 };
2062
- const _hoisted_2$2 = { key: 1 };
2063
- const _hoisted_3$2 = { key: 2 };
2064
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2065
- __name: "RunDataAiContent",
2066
- props: {
2067
- inputData: {},
2068
- contentIndex: {}
2069
- },
2070
- setup(__props) {
2071
- const props = __props;
2072
- const nodeTypesStore = useNodeTypesStore();
2073
- const workflowsStore = useWorkflowsStore();
2074
- const i18n = useI18n();
2075
- const consumedTokensSum = computed(() => {
2076
- return getConsumedTokens(outputRun.value);
2077
- });
2078
- function extractRunMeta(run) {
2079
- const uiNode = workflowsStore.getNodeByName(props.inputData.node);
2080
- const nodeType = nodeTypesStore.getNodeType(uiNode?.type ?? "");
2081
- const runMeta2 = {
2082
- startTimeMs: run.metadata.startTime,
2083
- executionTimeMs: run.metadata.executionTime,
2084
- node: nodeType,
2085
- type: run.inOut,
2086
- connectionType: run.type,
2087
- subExecution: run.metadata?.subExecution
2088
- };
2089
- return runMeta2;
2090
- }
2091
- const outputRun = computed(() => {
2092
- return props.inputData.data.find((r) => r.inOut === "output");
2093
- });
2094
- const runMeta = computed(() => {
2095
- if (outputRun.value === void 0) {
2096
- return;
2097
- }
2098
- return extractRunMeta(outputRun.value);
2099
- });
2100
- const executionRunData = computed(() => {
2101
- return workflowsStore.getWorkflowExecution?.data?.resultData?.runData;
2102
- });
2103
- const outputError = computed(() => {
2104
- return executionRunData.value?.[props.inputData.node]?.[props.inputData.runIndex]?.error;
2105
- });
2106
- return (_ctx, _cache) => {
2107
- return openBlock(), createElementBlock("div", {
2108
- class: normalizeClass(_ctx.$style.container)
2109
- }, [
2110
- createBaseVNode("header", {
2111
- class: normalizeClass(_ctx.$style.header)
2112
- }, [
2113
- runMeta.value?.node ? (openBlock(), createBlock(NodeIcon, {
2114
- key: 0,
2115
- class: normalizeClass(_ctx.$style.nodeIcon),
2116
- "node-type": runMeta.value.node,
2117
- size: 20
2118
- }, null, 8, ["class", "node-type"])) : createCommentVNode("", true),
2119
- createBaseVNode("div", {
2120
- class: normalizeClass(_ctx.$style.headerWrap)
2121
- }, [
2122
- createBaseVNode("p", {
2123
- class: normalizeClass(_ctx.$style.title)
2124
- }, toDisplayString(_ctx.inputData.node), 3),
2125
- createBaseVNode("ul", {
2126
- class: normalizeClass(_ctx.$style.meta)
2127
- }, [
2128
- runMeta.value?.startTimeMs ? (openBlock(), createElementBlock("li", _hoisted_1$3, toDisplayString(runMeta.value?.executionTimeMs) + "ms", 1)) : createCommentVNode("", true),
2129
- runMeta.value?.startTimeMs ? (openBlock(), createElementBlock("li", _hoisted_2$2, [
2130
- createVNode(unref(N8nTooltip), null, {
2131
- content: withCtx(() => [
2132
- createTextVNode(toDisplayString(new Date(runMeta.value?.startTimeMs).toLocaleString()), 1)
2133
- ]),
2134
- default: withCtx(() => [
2135
- createTextVNode(" " + toDisplayString(unref(i18n).baseText("runData.aiContentBlock.startedAt", {
2136
- interpolate: {
2137
- startTime: new Date(runMeta.value?.startTimeMs).toLocaleTimeString()
2138
- }
2139
- })), 1)
2140
- ]),
2141
- _: 1
2142
- })
2143
- ])) : createCommentVNode("", true),
2144
- runMeta.value ? (openBlock(), createElementBlock("li", _hoisted_3$2, [
2145
- createVNode(ViewSubExecution, {
2146
- "task-metadata": runMeta.value,
2147
- "display-mode": "ai",
2148
- inline: true
2149
- }, null, 8, ["task-metadata"])
2150
- ])) : createCommentVNode("", true),
2151
- (consumedTokensSum.value?.totalTokens ?? 0) > 0 ? (openBlock(), createElementBlock("li", {
2152
- key: 3,
2153
- class: normalizeClass(_ctx.$style.tokensUsage)
2154
- }, [
2155
- createTextVNode(toDisplayString(unref(i18n).baseText("runData.aiContentBlock.tokens", {
2156
- interpolate: {
2157
- count: unref(formatTokenUsageCount)(consumedTokensSum.value, "total")
2158
- }
2159
- })) + " ", 1),
2160
- createVNode(unref(InfoTip), {
2161
- type: "tooltip",
2162
- theme: "info-light",
2163
- "tooltip-placement": "right"
2164
- }, {
2165
- default: withCtx(() => [
2166
- createVNode(_sfc_main$c, { "consumed-tokens": consumedTokensSum.value }, null, 8, ["consumed-tokens"])
2167
- ]),
2168
- _: 1
2169
- })
2170
- ], 2)) : createCommentVNode("", true)
2171
- ], 2)
2172
- ], 2)
2173
- ], 2),
2174
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.inputData.data, (run, index) => {
2175
- return openBlock(), createElementBlock("main", {
2176
- key: index,
2177
- class: normalizeClass(_ctx.$style.content)
2178
- }, [
2179
- createVNode(AiRunContentBlock, {
2180
- "run-data": run,
2181
- error: run.inOut === "output" ? outputError.value : void 0
2182
- }, null, 8, ["run-data", "error"])
2183
- ], 2);
2184
- }), 128))
2185
- ], 2);
2186
- };
2187
- }
2188
- });
2189
- const container$2 = "_container_dypaw_2";
2190
- const nodeIcon$1 = "_nodeIcon_dypaw_5";
2191
- const header$1 = "_header_dypaw_8";
2192
- const headerWrap = "_headerWrap_dypaw_14";
2193
- const title$2 = "_title_dypaw_18";
2194
- const meta = "_meta_dypaw_25";
2195
- const tokensUsage = "_tokensUsage_dypaw_41";
2196
- const style0$3 = {
2197
- container: container$2,
2198
- nodeIcon: nodeIcon$1,
2199
- header: header$1,
2200
- headerWrap,
2201
- title: title$2,
2202
- meta,
2203
- tokensUsage
2204
- };
2205
- const cssModules$3 = {
2206
- "$style": style0$3
2207
- };
2208
- const RunDataAiContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__cssModules", cssModules$3]]);
2209
- const _hoisted_1$2 = ["data-tree-depth"];
2210
- const _hoisted_2$1 = ["onClick"];
2211
- const _hoisted_3$1 = ["textContent"];
2212
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2213
- __name: "RunDataAi",
2214
- props: {
2215
- node: {},
2216
- runIndex: { default: 0 },
2217
- slim: { type: Boolean },
2218
- workflowObject: {}
2219
- },
2220
- setup(__props) {
2221
- const props = __props;
2222
- const workflowsStore = useWorkflowsStore();
2223
- const nodeTypesStore = useNodeTypesStore();
2224
- const selectedRun = ref([]);
2225
- const i18n = useI18n();
2226
- const aiData = computed(
2227
- () => createAiData(
2228
- props.node.name,
2229
- props.workflowObject.connectionsBySourceNode,
2230
- workflowsStore.getWorkflowResultDataByNodeName
2231
- )
2232
- );
2233
- const executionTree = computed(
2234
- () => getTreeNodeData(
2235
- props.node.name,
2236
- props.workflowObject.connectionsBySourceNode,
2237
- aiData.value,
2238
- props.runIndex
2239
- )
2240
- );
2241
- function isTreeNodeSelected(node) {
2242
- return selectedRun.value.some((run) => run.node === node.node && run.runIndex === node.runIndex);
2243
- }
2244
- function toggleTreeItem(node) {
2245
- node.expanded = !node.expanded;
2246
- }
2247
- function onItemClick(data) {
2248
- const matchingRun = aiData.value?.find(
2249
- (run) => run.node === data.node && run.runIndex === data.runIndex
2250
- );
2251
- if (!matchingRun) {
2252
- selectedRun.value = [];
2253
- return;
2254
- }
2255
- const selectedNodeRun = workflowsStore.getWorkflowResultDataByNodeName(data.node)?.[data.runIndex];
2256
- if (!selectedNodeRun) {
2257
- return;
2258
- }
2259
- selectedRun.value = [
2260
- {
2261
- node: data.node,
2262
- runIndex: data.runIndex,
2263
- data: getReferencedData(selectedNodeRun, true)
2264
- }
2265
- ];
2266
- }
2267
- function getNodeType(nodeName) {
2268
- const node = workflowsStore.getNodeByName(nodeName);
2269
- if (!node) {
2270
- return null;
2271
- }
2272
- const nodeType = nodeTypesStore.getNodeType(node?.type);
2273
- return nodeType;
2274
- }
2275
- function selectFirst() {
2276
- if (executionTree.value.length && executionTree.value[0].children.length) {
2277
- onItemClick(executionTree.value[0].children[0]);
2278
- }
2279
- }
2280
- watch(() => props.runIndex, selectFirst, { immediate: true });
2281
- return (_ctx, _cache) => {
2282
- return openBlock(), createElementBlock("div", {
2283
- class: normalizeClass(_ctx.$style.container)
2284
- }, [
2285
- aiData.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2286
- createBaseVNode("div", {
2287
- class: normalizeClass({ [_ctx.$style.tree]: true, [_ctx.$style.slim]: _ctx.slim })
2288
- }, [
2289
- createVNode(unref(ElTree), {
2290
- data: executionTree.value,
2291
- props: { label: "node" },
2292
- "default-expand-all": "",
2293
- indent: 12,
2294
- "expand-on-click-node": false,
2295
- "data-test-id": "lm-chat-logs-tree",
2296
- onNodeClick: onItemClick
2297
- }, {
2298
- default: withCtx(({ node: currentNode, data }) => [
2299
- createBaseVNode("div", {
2300
- class: normalizeClass({
2301
- [_ctx.$style.treeNode]: true,
2302
- [_ctx.$style.isSelected]: isTreeNodeSelected(data)
2303
- }),
2304
- "data-tree-depth": data.depth,
2305
- style: normalizeStyle({ "--item-depth": data.depth })
2306
- }, [
2307
- data.children.length ? (openBlock(), createElementBlock("button", {
2308
- key: 0,
2309
- class: normalizeClass(_ctx.$style.treeToggle),
2310
- onClick: ($event) => toggleTreeItem(currentNode)
2311
- }, [
2312
- createVNode(unref(N8nIcon), {
2313
- icon: currentNode.expanded ? "chevron-down" : "chevron-right"
2314
- }, null, 8, ["icon"])
2315
- ], 10, _hoisted_2$1)) : createCommentVNode("", true),
2316
- createVNode(unref(N8nTooltip), {
2317
- disabled: !_ctx.slim,
2318
- placement: "right"
2319
- }, {
2320
- content: withCtx(() => [
2321
- createTextVNode(toDisplayString(currentNode.label), 1)
2322
- ]),
2323
- default: withCtx(() => [
2324
- createBaseVNode("span", {
2325
- class: normalizeClass(_ctx.$style.leafLabel)
2326
- }, [
2327
- createVNode(NodeIcon, {
2328
- "node-type": getNodeType(data.node),
2329
- size: 17,
2330
- class: normalizeClass(_ctx.$style.nodeIcon)
2331
- }, null, 8, ["node-type", "class"]),
2332
- !_ctx.slim ? (openBlock(), createElementBlock("span", {
2333
- key: 0,
2334
- textContent: toDisplayString(currentNode.label)
2335
- }, null, 8, _hoisted_3$1)) : createCommentVNode("", true)
2336
- ], 2)
2337
- ]),
2338
- _: 2
2339
- }, 1032, ["disabled"])
2340
- ], 14, _hoisted_1$2)
2341
- ]),
2342
- _: 1
2343
- }, 8, ["data"])
2344
- ], 2),
2345
- createBaseVNode("div", {
2346
- class: normalizeClass(_ctx.$style.runData)
2347
- }, [
2348
- selectedRun.value.length === 0 ? (openBlock(), createElementBlock("div", {
2349
- key: 0,
2350
- class: normalizeClass(_ctx.$style.empty)
2351
- }, [
2352
- createVNode(unref(N8nText), { size: "large" }, {
2353
- default: withCtx(() => [
2354
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.output.ai.empty", {
2355
- interpolate: {
2356
- node: props.node.name
2357
- }
2358
- })), 1)
2359
- ]),
2360
- _: 1
2361
- })
2362
- ], 2)) : createCommentVNode("", true),
2363
- (openBlock(true), createElementBlock(Fragment, null, renderList(selectedRun.value, (data, index) => {
2364
- return openBlock(), createElementBlock("div", {
2365
- key: `${data.node}__${data.runIndex}__index`,
2366
- "data-test-id": "lm-chat-logs-entry"
2367
- }, [
2368
- createVNode(RunDataAiContent, {
2369
- "input-data": data,
2370
- "content-index": index
2371
- }, null, 8, ["input-data", "content-index"])
2372
- ]);
2373
- }), 128))
2374
- ], 2)
2375
- ], 64)) : (openBlock(), createElementBlock("div", {
2376
- key: 1,
2377
- class: normalizeClass(_ctx.$style.noData)
2378
- }, toDisplayString(unref(i18n).baseText("ndv.output.ai.waiting")), 3))
2379
- ], 2);
2380
- };
2381
- }
2382
- });
2383
- const treeToggle = "_treeToggle_1qaq4_123";
2384
- const leafLabel = "_leafLabel_1qaq4_131";
2385
- const noData = "_noData_1qaq4_137";
2386
- const empty = "_empty_1qaq4_145";
2387
- const title$1 = "_title_1qaq4_149";
2388
- const tree = "_tree_1qaq4_123";
2389
- const slim = "_slim_1qaq4_161";
2390
- const runData$1 = "_runData_1qaq4_165";
2391
- const container$1 = "_container_1qaq4_171";
2392
- const nodeIcon = "_nodeIcon_1qaq4_198";
2393
- const isSelected = "_isSelected_1qaq4_204";
2394
- const treeNode = "_treeNode_1qaq4_208";
2395
- const style0$2 = {
2396
- treeToggle,
2397
- leafLabel,
2398
- noData,
2399
- empty,
2400
- title: title$1,
2401
- tree,
2402
- slim,
2403
- runData: runData$1,
2404
- container: container$1,
2405
- nodeIcon,
2406
- isSelected,
2407
- treeNode
2408
- };
2409
- const cssModules$2 = {
2410
- "$style": style0$2
2411
- };
2412
- const RunDataAi = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__cssModules", cssModules$2]]);
2413
- const _hoisted_1$1 = {
2414
- key: 0,
2415
- "data-test-id": "ndv-output-waiting"
2416
- };
2417
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2418
- __name: "OutputPanel",
2419
- props: {
2420
- workflowObject: {},
2421
- runIndex: {},
2422
- isReadOnly: { type: Boolean },
2423
- linkedRuns: { type: Boolean },
2424
- canLinkRuns: { type: Boolean },
2425
- pushRef: {},
2426
- blockUI: { type: Boolean, default: false },
2427
- isProductionExecutionPreview: { type: Boolean, default: false },
2428
- isPaneActive: { type: Boolean, default: false },
2429
- displayMode: {}
2430
- },
2431
- emits: ["linkRun", "unlinkRun", "runChange", "activatePane", "tableMounted", "itemHover", "search", "openSettings", "execute", "displayModeChange"],
2432
- setup(__props, { emit: __emit }) {
2433
- const OUTPUT_TYPE = {
2434
- REGULAR: "regular",
2435
- LOGS: "logs"
2436
- };
2437
- const props = __props;
2438
- const emit = __emit;
2439
- const ndvStore = useNDVStore();
2440
- const nodeTypesStore = useNodeTypesStore();
2441
- const workflowsStore = useWorkflowsStore();
2442
- const posthogStore = usePostHog();
2443
- const telemetry = useTelemetry();
2444
- const i18n = useI18n();
2445
- const { activeNode } = storeToRefs(ndvStore);
2446
- const { dirtinessByName } = useNodeDirtiness();
2447
- const { isSubNodeType } = useNodeType({
2448
- node: activeNode
2449
- });
2450
- const pinnedData = usePinnedData(activeNode, {
2451
- runIndex: props.runIndex,
2452
- displayMode: props.displayMode
2453
- });
2454
- const outputMode = ref(OUTPUT_TYPE.REGULAR);
2455
- const outputTypes = ref([
2456
- { label: i18n.baseText("ndv.output.outType.regular"), value: OUTPUT_TYPE.REGULAR },
2457
- { label: i18n.baseText("ndv.output.outType.logs"), value: OUTPUT_TYPE.LOGS }
2458
- ]);
2459
- const runDataRef = ref();
2460
- const collapsingColumnName = ref(null);
2461
- const node = computed(() => {
2462
- return ndvStore.activeNode ?? void 0;
2463
- });
2464
- const { hasNodeRun, workflowExecution, workflowRunData } = useExecutionData({ node });
2465
- const isTriggerNode = computed(() => {
2466
- return !!node.value && nodeTypesStore.isTriggerNode(node.value.type);
2467
- });
2468
- const hasAiMetadata = computed(() => {
2469
- if (isNodeRunning.value || !workflowRunData.value) {
2470
- return false;
2471
- }
2472
- if (node.value) {
2473
- const connectedSubNodes = props.workflowObject.getParentNodes(node.value.name, "ALL_NON_MAIN");
2474
- const resultData = connectedSubNodes.map(workflowsStore.getWorkflowResultDataByNodeName);
2475
- return resultData && Array.isArray(resultData) && resultData.length > 0;
2476
- }
2477
- return false;
2478
- });
2479
- const hasError = computed(
2480
- () => Boolean(
2481
- workflowRunData.value && node.value && workflowRunData.value[node.value.name]?.[props.runIndex]?.error
2482
- )
2483
- );
2484
- const defaultOutputMode = computed(() => {
2485
- return hasError.value && hasAiMetadata.value ? OUTPUT_TYPE.LOGS : OUTPUT_TYPE.REGULAR;
2486
- });
2487
- const isNodeRunning = computed(() => {
2488
- return workflowRunning.value && !!node.value && workflowsStore.isNodeExecuting(node.value.name);
2489
- });
2490
- const workflowRunning = computed(() => workflowsStore.isWorkflowRunning);
2491
- const runTaskData = computed(() => {
2492
- if (!node.value || workflowExecution.value === null) {
2493
- return null;
2494
- }
2495
- const runData2 = workflowRunData.value;
2496
- if (!runData2?.hasOwnProperty(node.value.name)) {
2497
- return null;
2498
- }
2499
- if (runData2[node.value.name].length <= props.runIndex) {
2500
- return null;
2501
- }
2502
- return runData2[node.value.name][props.runIndex];
2503
- });
2504
- const runsCount = computed(() => {
2505
- if (node.value === null) {
2506
- return 0;
2507
- }
2508
- const runData2 = workflowRunData.value;
2509
- if (runData2 === null || node.value && !runData2.hasOwnProperty(node.value.name)) {
2510
- return 0;
2511
- }
2512
- if (node.value && runData2[node.value.name].length) {
2513
- return runData2[node.value.name].length;
2514
- }
2515
- return 0;
2516
- });
2517
- const staleData = computed(() => {
2518
- if (!node.value) {
2519
- return false;
2520
- }
2521
- return dirtinessByName.value[node.value.name] === CanvasNodeDirtiness.PARAMETERS_UPDATED;
2522
- });
2523
- const outputPanelEditMode = computed(() => {
2524
- return ndvStore.outputPanelEditMode;
2525
- });
2526
- const canPinData = computed(() => {
2527
- return pinnedData.isValidNodeType.value && !props.isReadOnly;
2528
- });
2529
- const allToolsWereUnusedNotice = computed(() => {
2530
- if (!node.value || runsCount.value === 0 || hasError.value) return void 0;
2531
- if (pinnedData.hasData.value) return void 0;
2532
- const toolsAvailable = props.workflowObject.getParentNodes(
2533
- node.value.name,
2534
- NodeConnectionTypes.AiTool,
2535
- 1
2536
- );
2537
- const toolsUsedInLatestRun = toolsAvailable.filter(
2538
- (tool) => !!workflowRunData.value?.[tool]?.[props.runIndex]
2539
- );
2540
- if (toolsAvailable.length > 0 && toolsUsedInLatestRun.length === 0) {
2541
- return i18n.baseText("ndv.output.noToolUsedInfo");
2542
- } else {
2543
- return void 0;
2544
- }
2545
- });
2546
- const isNDVV2 = computed(
2547
- () => posthogStore.isVariantEnabled(
2548
- NDV_UI_OVERHAUL_EXPERIMENT.name,
2549
- NDV_UI_OVERHAUL_EXPERIMENT.variant
2550
- )
2551
- );
2552
- const insertTestData = () => {
2553
- if (!runDataRef.value) return;
2554
- runDataRef.value.enterEditMode({
2555
- origin: "insertTestDataLink"
2556
- });
2557
- telemetry.track("User clicked ndv link", {
2558
- workflow_id: workflowsStore.workflowId,
2559
- push_ref: props.pushRef,
2560
- node_type: node.value?.type,
2561
- pane: "output",
2562
- type: "insert-test-data"
2563
- });
2564
- };
2565
- const onLinkRun = () => {
2566
- emit("linkRun");
2567
- };
2568
- const onUnlinkRun = () => {
2569
- emit("unlinkRun");
2570
- };
2571
- const openSettings = () => {
2572
- emit("openSettings");
2573
- telemetry.track("User clicked ndv link", {
2574
- node_type: node.value?.type,
2575
- workflow_id: workflowsStore.workflowId,
2576
- push_ref: props.pushRef,
2577
- pane: "output",
2578
- type: "settings"
2579
- });
2580
- };
2581
- const onRunIndexChange = (run) => {
2582
- emit("runChange", run);
2583
- };
2584
- onMounted(() => {
2585
- outputMode.value = defaultOutputMode.value;
2586
- });
2587
- watch(defaultOutputMode, (newValue, oldValue) => {
2588
- if (newValue === OUTPUT_TYPE.LOGS && oldValue === OUTPUT_TYPE.REGULAR && hasNodeRun.value) {
2589
- outputMode.value = defaultOutputMode.value;
2590
- }
2591
- });
2592
- const activatePane = () => {
2593
- emit("activatePane");
2594
- };
2595
- function handleChangeCollapsingColumn(columnName) {
2596
- collapsingColumnName.value = columnName;
2597
- }
2598
- return (_ctx, _cache) => {
2599
- const _directive_n8n_html = resolveDirective("n8n-html");
2600
- return openBlock(), createBlock(RunData, {
2601
- ref_key: "runDataRef",
2602
- ref: runDataRef,
2603
- class: normalizeClass([_ctx.$style.runData, { [_ctx.$style.runDataV2]: isNDVV2.value }]),
2604
- node: node.value,
2605
- "workflow-object": _ctx.workflowObject,
2606
- "run-index": _ctx.runIndex,
2607
- "linked-runs": _ctx.linkedRuns,
2608
- "can-link-runs": _ctx.canLinkRuns,
2609
- "too-much-data-title": unref(i18n).baseText("ndv.output.tooMuchData.title"),
2610
- "no-data-in-branch-message": unref(i18n).baseText("ndv.output.noOutputDataInBranch"),
2611
- "is-executing": isNodeRunning.value,
2612
- "executing-message": unref(i18n).baseText("ndv.output.executing"),
2613
- "push-ref": _ctx.pushRef,
2614
- "block-u-i": _ctx.blockUI,
2615
- "is-production-execution-preview": _ctx.isProductionExecutionPreview,
2616
- "search-shortcut": _ctx.isPaneActive ? "/" : void 0,
2617
- "hide-pagination": outputMode.value === "logs",
2618
- "pane-type": "output",
2619
- "data-output-type": outputMode.value,
2620
- "callout-message": allToolsWereUnusedNotice.value,
2621
- "display-mode": _ctx.displayMode,
2622
- "disable-ai-content": true,
2623
- "collapsing-table-column-name": collapsingColumnName.value,
2624
- "data-test-id": "ndv-output-panel",
2625
- onActivatePane: activatePane,
2626
- onRunChange: onRunIndexChange,
2627
- onLinkRun,
2628
- onUnlinkRun,
2629
- onTableMounted: _cache[2] || (_cache[2] = ($event) => emit("tableMounted", $event)),
2630
- onItemHover: _cache[3] || (_cache[3] = ($event) => emit("itemHover", $event)),
2631
- onSearch: _cache[4] || (_cache[4] = ($event) => emit("search", $event)),
2632
- onDisplayModeChange: _cache[5] || (_cache[5] = ($event) => emit("displayModeChange", $event)),
2633
- onCollapsingTableColumnChanged: handleChangeCollapsingColumn
2634
- }, createSlots({
2635
- header: withCtx(() => [
2636
- createBaseVNode("div", {
2637
- class: normalizeClass([_ctx.$style.titleSection, { [_ctx.$style.titleSectionV2]: isNDVV2.value }])
2638
- }, [
2639
- hasAiMetadata.value ? (openBlock(), createBlock(unref(N8nRadioButtons), {
2640
- key: 0,
2641
- modelValue: outputMode.value,
2642
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => outputMode.value = $event),
2643
- "data-test-id": "ai-output-mode-select",
2644
- options: outputTypes.value
2645
- }, null, 8, ["modelValue", "options"])) : (openBlock(), createElementBlock("span", {
2646
- key: 1,
2647
- class: normalizeClass([_ctx.$style.title, { [_ctx.$style.titleV2]: isNDVV2.value }])
2648
- }, toDisplayString(unref(i18n).baseText(outputPanelEditMode.value.enabled ? "ndv.output.edit" : "ndv.output")), 3)),
2649
- unref(hasNodeRun) && !unref(pinnedData).hasData.value && (runsCount.value === 1 || runsCount.value > 0 && staleData.value) ? withDirectives((openBlock(), createBlock(RunInfo, {
2650
- key: 2,
2651
- "task-data": runTaskData.value,
2652
- "has-stale-data": staleData.value,
2653
- "has-pin-data": unref(pinnedData).hasData.value
2654
- }, null, 8, ["task-data", "has-stale-data", "has-pin-data"])), [
2655
- [vShow, !outputPanelEditMode.value.enabled]
2656
- ]) : createCommentVNode("", true)
2657
- ], 2)
2658
- ]),
2659
- "node-not-run": withCtx(() => [
2660
- isNDVV2.value ? (openBlock(), createBlock(NDVEmptyState, {
2661
- key: 0,
2662
- title: unref(i18n).baseText(
2663
- isTriggerNode.value ? "ndv.output.noOutputData.trigger.title" : "ndv.output.noOutputData.v2.title"
2664
- )
2665
- }, createSlots({
2666
- default: withCtx(() => [
2667
- createVNode(unref(I18nT), {
2668
- tag: "span",
2669
- keypath: unref(isSubNodeType) ? "ndv.output.runNodeHintSubNode" : "ndv.output.noOutputData.v2.description",
2670
- scope: "global"
2671
- }, {
2672
- link: withCtx(() => [
2673
- createVNode(_sfc_main$d, {
2674
- "hide-icon": "",
2675
- transparent: "",
2676
- type: "secondary",
2677
- "node-name": unref(activeNode)?.name ?? "",
2678
- label: unref(i18n).baseText(
2679
- isTriggerNode.value ? "ndv.output.noOutputData.trigger.action" : "ndv.output.noOutputData.v2.action"
2680
- ),
2681
- "telemetry-source": "inputs",
2682
- onExecute: _cache[1] || (_cache[1] = ($event) => emit("execute"))
2683
- }, null, 8, ["node-name", "label"]),
2684
- _cache[7] || (_cache[7] = createBaseVNode("br", null, null, -1))
2685
- ]),
2686
- _: 1
2687
- }, 8, ["keypath"])
2688
- ]),
2689
- _: 2
2690
- }, [
2691
- isTriggerNode.value ? {
2692
- name: "icon",
2693
- fn: withCtx(() => [
2694
- _cache[6] || (_cache[6] = createBaseVNode("svg", {
2695
- width: "16",
2696
- viewBox: "0 0 14 18",
2697
- fill: "none",
2698
- xmlns: "http://www.w3.org/2000/svg"
2699
- }, [
2700
- createBaseVNode("path", {
2701
- d: "M10.9062 2.40625L8.5 8.03125H12C12.4062 8.03125 12.7812 8.28125 12.9375 8.65625C13.0625 9.0625 12.9688 9.5 12.6562 9.78125L4.65625 16.7812C4.28125 17.0625 3.78125 17.0938 3.40625 16.8125C3.03125 16.5625 2.875 16.0625 3.0625 15.625L5.46875 10H2C1.5625 10 1.1875 9.75 1.0625 9.375C0.90625 8.96875 1 8.53125 1.3125 8.25L9.3125 1.25C9.6875 0.96875 10.1875 0.9375 10.5625 1.21875C10.9375 1.46875 11.0938 1.96875 10.9062 2.40625Z",
2702
- fill: "currentColor"
2703
- })
2704
- ], -1))
2705
- ]),
2706
- key: "0"
2707
- } : {
2708
- name: "icon",
2709
- fn: withCtx(() => [
2710
- createVNode(unref(N8nIcon), {
2711
- icon: "arrow-right-from-line",
2712
- size: "xlarge"
2713
- })
2714
- ]),
2715
- key: "1"
2716
- }
2717
- ]), 1032, ["title"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2718
- workflowRunning.value && !isTriggerNode.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
2719
- createBaseVNode("div", {
2720
- class: normalizeClass(_ctx.$style.spinner)
2721
- }, [
2722
- createVNode(unref(_sfc_main$e), { type: "ring" })
2723
- ], 2),
2724
- createVNode(unref(N8nText), null, {
2725
- default: withCtx(() => [
2726
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.output.waitingToRun")), 1)
2727
- ]),
2728
- _: 1
2729
- })
2730
- ])) : createCommentVNode("", true),
2731
- !workflowRunning.value ? (openBlock(), createBlock(unref(N8nText), {
2732
- key: 1,
2733
- "data-test-id": "ndv-output-run-node-hint"
2734
- }, {
2735
- default: withCtx(() => [
2736
- unref(isSubNodeType) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2737
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.output.runNodeHintSubNode")), 1)
2738
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2739
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.output.runNodeHint")) + " ", 1),
2740
- canPinData.value ? (openBlock(), createElementBlock("span", {
2741
- key: 0,
2742
- onClick: insertTestData
2743
- }, [
2744
- _cache[8] || (_cache[8] = createBaseVNode("br", null, null, -1)),
2745
- createTextVNode(" " + toDisplayString(unref(i18n).baseText("generic.or")) + " ", 1),
2746
- createVNode(unref(N8nText), {
2747
- tag: "a",
2748
- size: "medium",
2749
- color: "primary"
2750
- }, {
2751
- default: withCtx(() => [
2752
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.output.insertTestData")), 1)
2753
- ]),
2754
- _: 1
2755
- })
2756
- ])) : createCommentVNode("", true)
2757
- ], 64))
2758
- ]),
2759
- _: 1
2760
- })) : createCommentVNode("", true)
2761
- ], 64))
2762
- ]),
2763
- "node-waiting": withCtx(() => [
2764
- createVNode(NDVEmptyState, {
2765
- title: unref(i18n).baseText("ndv.output.waitNodeWaiting.title"),
2766
- wide: ""
2767
- }, {
2768
- default: withCtx(() => [
2769
- withDirectives(createBaseVNode("span", null, null, 512), [
2770
- [_directive_n8n_html, unref(waitingNodeTooltip)(node.value)]
2771
- ])
2772
- ]),
2773
- _: 1
2774
- }, 8, ["title"])
2775
- ]),
2776
- "no-output-data": withCtx(() => [
2777
- createVNode(NDVEmptyState, {
2778
- title: unref(i18n).baseText("ndv.output.noOutputData.title")
2779
- }, {
2780
- default: withCtx(() => [
2781
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.output.noOutputData.message")) + " ", 1),
2782
- createBaseVNode("a", { onClick: openSettings }, toDisplayString(unref(i18n).baseText("ndv.output.noOutputData.message.settings")), 1),
2783
- createTextVNode(" " + toDisplayString(unref(i18n).baseText("ndv.output.noOutputData.message.settingsOption")), 1)
2784
- ]),
2785
- _: 1
2786
- }, 8, ["title"])
2787
- ]),
2788
- "recovered-artificial-output-data": withCtx(() => [
2789
- createVNode(NDVEmptyState, {
2790
- title: unref(i18n).baseText("executionDetails.executionFailed.recoveredNodeTitle")
2791
- }, {
2792
- default: withCtx(() => [
2793
- createTextVNode(toDisplayString(unref(i18n).baseText("executionDetails.executionFailed.recoveredNodeMessage")), 1)
2794
- ]),
2795
- _: 1
2796
- }, 8, ["title"])
2797
- ]),
2798
- _: 2
2799
- }, [
2800
- outputMode.value === "logs" && node.value ? {
2801
- name: "content",
2802
- fn: withCtx(() => [
2803
- createVNode(RunDataAi, {
2804
- node: node.value,
2805
- "run-index": _ctx.runIndex,
2806
- "workflow-object": _ctx.workflowObject
2807
- }, null, 8, ["node", "run-index", "workflow-object"])
2808
- ]),
2809
- key: "0"
2810
- } : void 0,
2811
- !unref(pinnedData).hasData.value && runsCount.value > 1 ? {
2812
- name: "run-info",
2813
- fn: withCtx(() => [
2814
- createVNode(RunInfo, { "task-data": runTaskData.value }, null, 8, ["task-data"])
2815
- ]),
2816
- key: "1"
2817
- } : void 0
2818
- ]), 1032, ["class", "node", "workflow-object", "run-index", "linked-runs", "can-link-runs", "too-much-data-title", "no-data-in-branch-message", "is-executing", "executing-message", "push-ref", "block-u-i", "is-production-execution-preview", "search-shortcut", "hide-pagination", "data-output-type", "callout-message", "display-mode", "collapsing-table-column-name"]);
2819
- };
2820
- }
2821
- });
2822
- const runData = "_runData_1lxlh_128";
2823
- const runDataV2 = "_runDataV2_1lxlh_132";
2824
- const outputTypeSelect = "_outputTypeSelect_1lxlh_136";
2825
- const titleSection = "_titleSection_1lxlh_141";
2826
- const titleSectionV2 = "_titleSectionV2_1lxlh_149";
2827
- const title = "_title_1lxlh_141";
2828
- const titleV2 = "_titleV2_1lxlh_161";
2829
- const noOutputData = "_noOutputData_1lxlh_166";
2830
- const link = "_link_1lxlh_176";
2831
- const spinner = "_spinner_1lxlh_183";
2832
- const style0$1 = {
2833
- runData,
2834
- runDataV2,
2835
- outputTypeSelect,
2836
- titleSection,
2837
- titleSectionV2,
2838
- title,
2839
- titleV2,
2840
- noOutputData,
2841
- link,
2842
- spinner
2843
- };
2844
- const cssModules$1 = {
2845
- "$style": style0$1
2846
- };
2847
- const OutputPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__cssModules", cssModules$1]]);
2848
- const _hoisted_1 = { key: "empty" };
2849
- const _hoisted_2 = {
2850
- key: "listening",
2851
- "data-test-id": "trigger-listening"
2852
- };
2853
- const _hoisted_3 = { key: 0 };
2854
- const _hoisted_4 = { key: 1 };
2855
- const _hoisted_5 = { key: 0 };
2856
- const _hoisted_6 = { key: "default" };
2857
- const _hoisted_7 = {
2858
- key: 0,
2859
- class: "mb-xl"
2860
- };
2861
- const _hoisted_8 = ["textContent"];
2862
- const _sfc_main = /* @__PURE__ */ defineComponent({
2863
- __name: "TriggerPanel",
2864
- props: {
2865
- nodeName: {},
2866
- pushRef: { default: "" }
2867
- },
2868
- emits: ["activate", "execute"],
2869
- setup(__props, { emit: __emit }) {
2870
- const props = __props;
2871
- const emit = __emit;
2872
- const nodesTypeStore = useNodeTypesStore();
2873
- const uiStore = useUIStore();
2874
- const workflowsStore = useWorkflowsStore();
2875
- const ndvStore = useNDVStore();
2876
- const router = useRouter();
2877
- const workflowHelpers = useWorkflowHelpers();
2878
- const i18n = useI18n();
2879
- const telemetry = useTelemetry();
2880
- const executionsHelpEventBus = createEventBus();
2881
- const help = ref(null);
2882
- const node = computed(() => workflowsStore.getNodeByName(props.nodeName));
2883
- const nodeType = computed(() => {
2884
- if (node.value) {
2885
- return nodesTypeStore.getNodeType(node.value.type, node.value.typeVersion);
2886
- }
2887
- return null;
2888
- });
2889
- const triggerPanel = computed(() => {
2890
- const panel = nodeType.value?.triggerPanel;
2891
- if (isTriggerPanelObject(panel)) {
2892
- return panel;
2893
- }
2894
- return void 0;
2895
- });
2896
- const hideContent = computed(() => {
2897
- const hideContent2 = triggerPanel.value?.hideContent;
2898
- if (typeof hideContent2 === "boolean") {
2899
- return hideContent2;
2900
- }
2901
- if (node.value) {
2902
- const hideContentValue = workflowsStore.workflowObject.expression.getSimpleParameterValue(
2903
- node.value,
2904
- hideContent2,
2905
- "internal",
2906
- {}
2907
- );
2908
- if (typeof hideContentValue === "boolean") {
2909
- return hideContentValue;
2910
- }
2911
- }
2912
- return false;
2913
- });
2914
- const hasIssues = computed(() => {
2915
- return Boolean(
2916
- node.value?.issues && (node.value.issues.parameters ?? node.value.issues.credentials)
2917
- );
2918
- });
2919
- const serviceName = computed(() => {
2920
- if (nodeType.value) {
2921
- return getTriggerNodeServiceName(nodeType.value);
2922
- }
2923
- return "";
2924
- });
2925
- const displayChatButton = computed(() => {
2926
- return Boolean(
2927
- node.value && node.value.type === CHAT_TRIGGER_NODE_TYPE && node.value.parameters.mode !== "webhook"
2928
- );
2929
- });
2930
- const isWebhookNode = computed(() => {
2931
- return Boolean(node.value && node.value.type === WEBHOOK_NODE_TYPE);
2932
- });
2933
- const webhookHttpMethod = computed(() => {
2934
- if (!node.value || !nodeType.value?.webhooks?.length) {
2935
- return void 0;
2936
- }
2937
- const httpMethod = workflowHelpers.getWebhookExpressionValue(
2938
- nodeType.value.webhooks[0],
2939
- "httpMethod",
2940
- false
2941
- );
2942
- if (Array.isArray(httpMethod)) {
2943
- return httpMethod.join(", ");
2944
- }
2945
- return httpMethod;
2946
- });
2947
- const webhookTestUrl = computed(() => {
2948
- if (!node.value || !nodeType.value?.webhooks?.length) {
2949
- return void 0;
2950
- }
2951
- return workflowHelpers.getWebhookUrl(nodeType.value.webhooks[0], node.value, "test");
2952
- });
2953
- const isWebhookBasedNode = computed(() => {
2954
- return Boolean(nodeType.value?.webhooks?.length);
2955
- });
2956
- const isPollingNode = computed(() => {
2957
- return Boolean(nodeType.value?.polling);
2958
- });
2959
- const isListeningForEvents = computed(() => {
2960
- if (!node.value || node.value.disabled || !isWebhookBasedNode.value) {
2961
- return false;
2962
- }
2963
- if (!workflowsStore.executionWaitingForWebhook) {
2964
- return false;
2965
- }
2966
- const executedNode = workflowsStore.executedNode;
2967
- const isCurrentNodeExecuted = executedNode === props.nodeName;
2968
- const isChildNodeExecuted = executedNode ? workflowsStore.workflowObject.getParentNodes(executedNode).includes(props.nodeName) : false;
2969
- return !executedNode || isCurrentNodeExecuted || isChildNodeExecuted;
2970
- });
2971
- const workflowRunning = computed(() => workflowsStore.isWorkflowRunning);
2972
- const isActivelyPolling = computed(() => {
2973
- const triggeredNode = workflowsStore.executedNode;
2974
- return workflowRunning.value && isPollingNode.value && props.nodeName === triggeredNode;
2975
- });
2976
- const isWorkflowActive = computed(() => {
2977
- return workflowsStore.isWorkflowActive;
2978
- });
2979
- const listeningTitle = computed(() => {
2980
- return nodeType.value?.name === FORM_TRIGGER_NODE_TYPE ? i18n.baseText("ndv.trigger.webhookNode.formTrigger.listening") : i18n.baseText("ndv.trigger.webhookNode.listening");
2981
- });
2982
- const listeningHint = computed(() => {
2983
- switch (nodeType.value?.name) {
2984
- case CHAT_TRIGGER_NODE_TYPE:
2985
- return i18n.baseText("ndv.trigger.webhookBasedNode.chatTrigger.serviceHint");
2986
- case FORM_TRIGGER_NODE_TYPE:
2987
- return i18n.baseText("ndv.trigger.webhookBasedNode.formTrigger.serviceHint");
2988
- default:
2989
- return i18n.baseText("ndv.trigger.webhookBasedNode.serviceHint", {
2990
- interpolate: { service: serviceName.value }
2991
- });
2992
- }
2993
- });
2994
- const header2 = computed(() => {
2995
- if (isActivelyPolling.value) {
2996
- return i18n.baseText("ndv.trigger.pollingNode.fetchingEvent");
2997
- }
2998
- if (triggerPanel.value?.header) {
2999
- return triggerPanel.value.header;
3000
- }
3001
- if (isWebhookBasedNode.value) {
3002
- return i18n.baseText("ndv.trigger.webhookBasedNode.action", {
3003
- interpolate: { name: serviceName.value }
3004
- });
3005
- }
3006
- return "";
3007
- });
3008
- const subheader = computed(() => {
3009
- if (isActivelyPolling.value) {
3010
- return i18n.baseText("ndv.trigger.pollingNode.fetchingHint", {
3011
- interpolate: { name: serviceName.value }
3012
- });
3013
- }
3014
- return "";
3015
- });
3016
- const executionsHelp = computed(() => {
3017
- if (triggerPanel.value?.executionsHelp) {
3018
- if (typeof triggerPanel.value.executionsHelp === "string") {
3019
- return triggerPanel.value.executionsHelp;
3020
- }
3021
- if (!isWorkflowActive.value && triggerPanel.value.executionsHelp.inactive) {
3022
- return triggerPanel.value.executionsHelp.inactive;
3023
- }
3024
- if (isWorkflowActive.value && triggerPanel.value.executionsHelp.active) {
3025
- return triggerPanel.value.executionsHelp.active;
3026
- }
3027
- }
3028
- if (isWebhookBasedNode.value) {
3029
- if (isWorkflowActive.value) {
3030
- return i18n.baseText("ndv.trigger.webhookBasedNode.executionsHelp.active", {
3031
- interpolate: { service: serviceName.value }
3032
- });
3033
- } else {
3034
- return i18n.baseText("ndv.trigger.webhookBasedNode.executionsHelp.inactive", {
3035
- interpolate: { service: serviceName.value }
3036
- });
3037
- }
3038
- }
3039
- if (isPollingNode.value) {
3040
- if (isWorkflowActive.value) {
3041
- return i18n.baseText("ndv.trigger.pollingNode.executionsHelp.active", {
3042
- interpolate: { service: serviceName.value }
3043
- });
3044
- } else {
3045
- return i18n.baseText("ndv.trigger.pollingNode.executionsHelp.inactive", {
3046
- interpolate: { service: serviceName.value }
3047
- });
3048
- }
3049
- }
3050
- return "";
3051
- });
3052
- const activationHint = computed(() => {
3053
- if (isActivelyPolling.value || !triggerPanel.value) {
3054
- return "";
3055
- }
3056
- if (triggerPanel.value.activationHint) {
3057
- if (typeof triggerPanel.value.activationHint === "string") {
3058
- return triggerPanel.value.activationHint;
3059
- }
3060
- if (!isWorkflowActive.value && typeof triggerPanel.value.activationHint.inactive === "string") {
3061
- return triggerPanel.value.activationHint.inactive;
3062
- }
3063
- if (isWorkflowActive.value && typeof triggerPanel.value.activationHint.active === "string") {
3064
- return triggerPanel.value.activationHint.active;
3065
- }
3066
- }
3067
- if (isWebhookBasedNode.value) {
3068
- if (isWorkflowActive.value) {
3069
- return i18n.baseText("ndv.trigger.webhookBasedNode.activationHint.active", {
3070
- interpolate: { service: serviceName.value }
3071
- });
3072
- } else {
3073
- return i18n.baseText("ndv.trigger.webhookBasedNode.activationHint.inactive", {
3074
- interpolate: { service: serviceName.value }
3075
- });
3076
- }
3077
- }
3078
- if (isPollingNode.value) {
3079
- if (isWorkflowActive.value) {
3080
- return i18n.baseText("ndv.trigger.pollingNode.activationHint.active", {
3081
- interpolate: { service: serviceName.value }
3082
- });
3083
- } else {
3084
- return i18n.baseText("ndv.trigger.pollingNode.activationHint.inactive", {
3085
- interpolate: { service: serviceName.value }
3086
- });
3087
- }
3088
- }
3089
- return "";
3090
- });
3091
- const expandExecutionHelp = () => {
3092
- if (help.value) {
3093
- executionsHelpEventBus.emit("expand");
3094
- }
3095
- };
3096
- const openWebhookUrl = () => {
3097
- telemetry.track("User clicked ndv link", {
3098
- workflow_id: workflowsStore.workflowId,
3099
- push_ref: props.pushRef,
3100
- pane: "input",
3101
- type: "open-chat"
3102
- });
3103
- window.open(webhookTestUrl.value, "_blank", "noreferrer");
3104
- };
3105
- const onLinkClick = (e) => {
3106
- if (!e.target) {
3107
- return;
3108
- }
3109
- const target = e.target;
3110
- if (target.localName !== "a") return;
3111
- if (target.dataset?.key) {
3112
- e.stopPropagation();
3113
- e.preventDefault();
3114
- if (target.dataset.key === "activate") {
3115
- emit("activate");
3116
- } else if (target.dataset.key === "executions") {
3117
- telemetry.track("User clicked ndv link", {
3118
- workflow_id: workflowsStore.workflowId,
3119
- push_ref: props.pushRef,
3120
- pane: "input",
3121
- type: "open-executions-log"
3122
- });
3123
- ndvStore.unsetActiveNodeName();
3124
- void router.push({
3125
- name: VIEWS.EXECUTIONS
3126
- });
3127
- } else if (target.dataset.key === "settings") {
3128
- uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);
3129
- }
3130
- }
3131
- };
3132
- const onTestLinkCopied = () => {
3133
- telemetry.track("User copied webhook URL", {
3134
- pane: "inputs",
3135
- type: "test url"
3136
- });
3137
- };
3138
- const onNodeExecute = () => {
3139
- emit("execute");
3140
- };
3141
- return (_ctx, _cache) => {
3142
- const _directive_n8n_html = resolveDirective("n8n-html");
3143
- return openBlock(), createElementBlock("div", {
3144
- class: normalizeClass(_ctx.$style.container)
3145
- }, [
3146
- createVNode(Transition, {
3147
- name: "fade",
3148
- mode: "out-in"
3149
- }, {
3150
- default: withCtx(() => [
3151
- hasIssues.value || hideContent.value ? (openBlock(), createElementBlock("div", _hoisted_1)) : isListeningForEvents.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
3152
- createVNode(unref(N8nPulse), null, {
3153
- default: withCtx(() => [
3154
- createVNode(NodeIcon, {
3155
- "node-type": nodeType.value,
3156
- size: 40
3157
- }, null, 8, ["node-type"])
3158
- ]),
3159
- _: 1
3160
- }),
3161
- isWebhookNode.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
3162
- createVNode(unref(N8nText), {
3163
- tag: "div",
3164
- size: "large",
3165
- color: "text-dark",
3166
- class: "mb-2xs",
3167
- bold: ""
3168
- }, {
3169
- default: withCtx(() => [
3170
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.trigger.webhookNode.listening")), 1)
3171
- ]),
3172
- _: 1
3173
- }),
3174
- createBaseVNode("div", {
3175
- class: normalizeClass([_ctx.$style.shake, "mb-xs"])
3176
- }, [
3177
- createVNode(unref(N8nText), null, {
3178
- default: withCtx(() => [
3179
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.trigger.webhookNode.requestHint", {
3180
- interpolate: { type: webhookHttpMethod.value ?? "" }
3181
- })), 1)
3182
- ]),
3183
- _: 1
3184
- })
3185
- ], 2),
3186
- createVNode(CopyInput, {
3187
- value: webhookTestUrl.value,
3188
- "toast-title": unref(i18n).baseText("ndv.trigger.copiedTestUrl"),
3189
- class: "mb-2xl",
3190
- size: "medium",
3191
- collapse: true,
3192
- "copy-button-text": unref(i18n).baseText("generic.clickToCopy"),
3193
- onCopy: onTestLinkCopied
3194
- }, null, 8, ["value", "toast-title", "copy-button-text"]),
3195
- createVNode(_sfc_main$d, {
3196
- "data-test-id": "trigger-execute-button",
3197
- "node-name": _ctx.nodeName,
3198
- size: "medium",
3199
- "telemetry-source": "inputs",
3200
- onExecute: onNodeExecute
3201
- }, null, 8, ["node-name"])
3202
- ])) : (openBlock(), createElementBlock("div", _hoisted_4, [
3203
- createVNode(unref(N8nText), {
3204
- tag: "div",
3205
- size: "large",
3206
- color: "text-dark",
3207
- class: "mb-2xs",
3208
- bold: ""
3209
- }, {
3210
- default: withCtx(() => [
3211
- createTextVNode(toDisplayString(listeningTitle.value), 1)
3212
- ]),
3213
- _: 1
3214
- }),
3215
- createBaseVNode("div", {
3216
- class: normalizeClass([_ctx.$style.shake, "mb-xs"])
3217
- }, [
3218
- createVNode(unref(N8nText), { tag: "div" }, {
3219
- default: withCtx(() => [
3220
- createTextVNode(toDisplayString(listeningHint.value), 1)
3221
- ]),
3222
- _: 1
3223
- })
3224
- ], 2),
3225
- displayChatButton.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
3226
- createVNode(unref(N8nButton), {
3227
- class: "mb-xl",
3228
- onClick: _cache[0] || (_cache[0] = ($event) => openWebhookUrl())
3229
- }, {
3230
- default: withCtx(() => [
3231
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.trigger.chatTrigger.openChat")), 1)
3232
- ]),
3233
- _: 1
3234
- })
3235
- ])) : createCommentVNode("", true),
3236
- createVNode(_sfc_main$d, {
3237
- "data-test-id": "trigger-execute-button",
3238
- "node-name": _ctx.nodeName,
3239
- size: "medium",
3240
- "telemetry-source": "inputs",
3241
- onExecute: onNodeExecute
3242
- }, null, 8, ["node-name"])
3243
- ]))
3244
- ])) : (openBlock(), createElementBlock("div", _hoisted_6, [
3245
- isActivelyPolling.value ? (openBlock(), createElementBlock("div", _hoisted_7, [
3246
- createVNode(unref(_sfc_main$e), { type: "ring" })
3247
- ])) : createCommentVNode("", true),
3248
- createBaseVNode("div", {
3249
- class: normalizeClass(_ctx.$style.action)
3250
- }, [
3251
- createBaseVNode("div", {
3252
- "data-test-id": "trigger-header",
3253
- class: normalizeClass(_ctx.$style.header)
3254
- }, [
3255
- header2.value ? (openBlock(), createBlock(unref(N8nHeading), {
3256
- key: 0,
3257
- tag: "h1",
3258
- bold: ""
3259
- }, {
3260
- default: withCtx(() => [
3261
- createTextVNode(toDisplayString(header2.value), 1)
3262
- ]),
3263
- _: 1
3264
- })) : createCommentVNode("", true),
3265
- subheader.value ? (openBlock(), createBlock(unref(N8nText), { key: 1 }, {
3266
- default: withCtx(() => [
3267
- createBaseVNode("span", {
3268
- textContent: toDisplayString(subheader.value)
3269
- }, null, 8, _hoisted_8)
3270
- ]),
3271
- _: 1
3272
- })) : createCommentVNode("", true)
3273
- ], 2),
3274
- createVNode(_sfc_main$d, {
3275
- "data-test-id": "trigger-execute-button",
3276
- "node-name": _ctx.nodeName,
3277
- size: "medium",
3278
- "telemetry-source": "inputs",
3279
- onExecute: onNodeExecute
3280
- }, null, 8, ["node-name"])
3281
- ], 2),
3282
- activationHint.value ? (openBlock(), createBlock(unref(N8nText), {
3283
- key: 1,
3284
- size: "small",
3285
- onClick: onLinkClick
3286
- }, {
3287
- default: withCtx(() => [
3288
- withDirectives(createBaseVNode("span", null, null, 512), [
3289
- [_directive_n8n_html, activationHint.value]
3290
- ]),
3291
- _cache[1] || (_cache[1] = createTextVNode("  "))
3292
- ]),
3293
- _: 1
3294
- })) : createCommentVNode("", true),
3295
- activationHint.value && executionsHelp.value ? (openBlock(), createBlock(unref(N8nLink), {
3296
- key: 2,
3297
- size: "small",
3298
- onClick: expandExecutionHelp
3299
- }, {
3300
- default: withCtx(() => [
3301
- createTextVNode(toDisplayString(unref(i18n).baseText("ndv.trigger.moreInfo")), 1)
3302
- ]),
3303
- _: 1
3304
- })) : createCommentVNode("", true),
3305
- executionsHelp.value ? (openBlock(), createBlock(unref(N8nInfoAccordion), {
3306
- key: 3,
3307
- ref_key: "help",
3308
- ref: help,
3309
- class: normalizeClass(_ctx.$style.accordion),
3310
- title: unref(i18n).baseText("ndv.trigger.executionsHint.question"),
3311
- description: executionsHelp.value,
3312
- "event-bus": unref(executionsHelpEventBus),
3313
- "onClick:body": onLinkClick
3314
- }, null, 8, ["class", "title", "description", "event-bus"])) : createCommentVNode("", true)
3315
- ]))
3316
- ]),
3317
- _: 1
3318
- })
3319
- ], 2);
3320
- };
3321
- }
3322
- });
3323
- const container = "_container_1mcl9_123";
3324
- const header = "_header_1mcl9_140";
3325
- const action = "_action_1mcl9_147";
3326
- const shake = "_shake_1mcl9_151";
3327
- const accordion = "_accordion_1mcl9_172";
3328
- const style0 = {
3329
- container,
3330
- header,
3331
- action,
3332
- shake,
3333
- accordion
3334
- };
3335
- const cssModules = {
3336
- "$style": style0
3337
- };
3338
- const TriggerPanel = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-1595498e"]]);
3339
- export {
3340
- NDVFloatingNodes as N,
3341
- OutputPanel as O,
3342
- TriggerPanel as T
3343
- };