n8n-editor-ui 1.92.0 → 1.93.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 (116) hide show
  1. package/dist/assets/{AnimatedSpinner-CtKKeDrz.js → AnimatedSpinner-hbTZDd93.js} +1 -1
  2. package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DR6h_xsK.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-CYzc5StE.js} +1 -1
  3. package/dist/assets/{AuthView-mKkzBRxh.js → AuthView-8SLMP0H_.js} +2 -2
  4. package/dist/assets/{CanvasChatSwitch-Bu2VD2kp.js → CanvasChatSwitch-Dt8TgNJg.js} +10 -10
  5. package/dist/assets/{ChangePasswordView-D5UI1v-J.js → ChangePasswordView-DIRyDp89.js} +3 -3
  6. package/dist/assets/CollectionParameter-Cj4t6-hd.js +4 -0
  7. package/dist/assets/{CredentialsView-B78eNJO5.js → CredentialsView-B6-VxAJ6.js} +26 -11
  8. package/dist/assets/{DemoFooter-DP26HpCu.js → DemoFooter-CIHwH5PG.js} +8 -8
  9. package/dist/assets/{ErrorView-C3fvEdCg.js → ErrorView-C7i0TZwT.js} +1 -1
  10. package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-BBpwYdHY.js → ExecutionsTime.vue_vue_type_script_setup_true_lang--2G21NNR.js} +2 -2
  11. package/dist/assets/{ExecutionsView-BvlDZwIs.js → ExecutionsView-C_YtciAr.js} +10 -9
  12. package/dist/assets/{FileSaver.min-BzAtcQXX.js → FileSaver.min-bgn7Q9Gt.js} +1 -1
  13. package/dist/assets/{FixedCollectionParameter-CS5zXMAh.js → FixedCollectionParameter-BPCJ5aaq.js} +1 -1
  14. package/dist/assets/{ForgotMyPasswordView-CVQ7pcIG.js → ForgotMyPasswordView-DyUaGd6Z.js} +3 -3
  15. package/dist/assets/{InsightsChartAverageRuntime-Boh0SMb3.js → InsightsChartAverageRuntime-BB2I2vpV.js} +4 -4
  16. package/dist/assets/{InsightsChartFailed-IZ-KYOU9.js → InsightsChartFailed-CN_Rl3Bl.js} +4 -4
  17. package/dist/assets/{InsightsChartFailureRate-2fWw3p0L.js → InsightsChartFailureRate-CHKlg6tg.js} +4 -4
  18. package/dist/assets/{InsightsChartTimeSaved-B2pLVys1.js → InsightsChartTimeSaved-Cd05cM8q.js} +4 -4
  19. package/dist/assets/{InsightsChartTotal-2QD4wPLR.js → InsightsChartTotal-ChAO7myf.js} +4 -4
  20. package/dist/assets/{InsightsDashboard-CbiFbJ8w.js → InsightsDashboard-BeCfBVUz.js} +10 -10
  21. package/dist/assets/{InsightsPaywall-5d-cSdiS.js → InsightsPaywall-Chz8CDc3.js} +1 -1
  22. package/dist/assets/{InsightsSummary-gldDQ9rg.js → InsightsSummary-MECenLJQ.js} +1 -1
  23. package/dist/assets/{InsightsTableWorkflows-_eTCUNCX.js → InsightsTableWorkflows-5rpYY7YT.js} +2 -2
  24. package/dist/assets/{Logo-Dl2xVRIu.js → Logo-DUDCllkm.js} +1 -1
  25. package/dist/assets/{LogsPanel-JnYirDqa.js → LogsPanel-D9r5AcQH.js} +7 -6
  26. package/dist/assets/{MainHeader-CEPLiR-5.css → MainHeader-CEMGASqv.css} +18 -11
  27. package/dist/assets/{MainHeader-Bk29pgmL.js → MainHeader-DkKOOZ_D.js} +145 -79
  28. package/dist/assets/{MainSidebar-zZpP3qQ0.css → MainSidebar-D1_1YFQZ.css} +2 -2
  29. package/dist/assets/{MainSidebar-BM5ku_wM.js → MainSidebar-ZUBIWeXm.js} +28 -11
  30. package/dist/assets/{NodeCreation-BEjdAYc_.js → NodeCreation-DCfAFuL5.js} +10 -5
  31. package/dist/assets/{NodeCreator-D9fmPdS2.css → NodeCreator-D18StsVZ.css} +1021 -174
  32. package/dist/assets/{NodeCreator-cEUgbAI9.js → NodeCreator-a0YVv1IE.js} +863 -418
  33. package/dist/assets/{NodeDetailsView-D4O9dKTA.js → NodeDetailsView-C5_hVJzj.js} +13 -15
  34. package/dist/assets/{NodeDetailsView-DsFLtbxi.css → NodeDetailsView-pYP-34nS.css} +16 -16
  35. package/dist/assets/{NodeView-DDSOUm8E.js → NodeView-Bk9h8GYy.js} +36 -25
  36. package/dist/assets/{ProjectCardBadge-BNn2hiMe.js → ProjectCardBadge-DRlDZx3d.js} +38 -2
  37. package/dist/assets/{ProjectHeader-CaEZ2OPj.js → ProjectHeader-DNm605Kk.js} +106 -64
  38. package/dist/assets/{ProjectSettings-otA8E-yW.js → ProjectSettings-Dge_6KaR.js} +3 -2
  39. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-C3JbZMCk.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-CUf0LkWR.js} +1 -1
  40. package/dist/assets/{ResourcesListLayout-1d9Ic6VX.js → ResourcesListLayout-Bbl-1i4l.js} +156 -53
  41. package/dist/assets/{ResourcesListLayout-CtGME7aU.css → ResourcesListLayout-DuNjbsMn.css} +8 -8
  42. package/dist/assets/{RunData-BjlZgIyx.css → RunData-DQeENuzG.css} +2 -2
  43. package/dist/assets/{RunData-Bx47sNQp.js → RunData-b0RE2JWc.js} +46 -29
  44. package/dist/assets/{RunDataAi-DOac7nwD.js → RunDataAi-DnWcCR_0.js} +4 -4
  45. package/dist/assets/{RunDataJson-Pev6yNEV.js → RunDataJson-CptVuHuA.js} +7 -7
  46. package/dist/assets/{RunDataJsonActions-Co4xgmVq.js → RunDataJsonActions-3jjDztw7.js} +1 -1
  47. package/dist/assets/{RunDataParsedAiContent-D6MNLmT3.js → RunDataParsedAiContent-BbXv-NPD.js} +5 -5
  48. package/dist/assets/{RunDataSearch-C8orcAlP.js → RunDataSearch-B90wjsDA.js} +1 -1
  49. package/dist/assets/{RunDataTable-oi_l8dhA.js → RunDataTable-CpS78GlT.js} +3 -3
  50. package/dist/assets/{SamlOnboarding-CT5J6dx0.js → SamlOnboarding-Ch9K5rRW.js} +3 -3
  51. package/dist/assets/{SettingsApiView-CupjcI9v.js → SettingsApiView-9GU5n_rm.js} +1 -1
  52. package/dist/assets/{SettingsCommunityNodesView-B5K2VLyJ.js → SettingsCommunityNodesView-CPnVRzNX.js} +24 -11
  53. package/dist/assets/{SettingsExternalSecrets-BidJCf_t.js → SettingsExternalSecrets-D7xTMV9h.js} +1 -1
  54. package/dist/assets/{SettingsLdapView-Cva6akhW.js → SettingsLdapView-OfrjGKkt.js} +1 -1
  55. package/dist/assets/{SettingsLogStreamingView-Cy-rAKUO.js → SettingsLogStreamingView-C_VnOaeX.js} +1 -1
  56. package/dist/assets/{SettingsPersonalView-ZJ1Syok2.js → SettingsPersonalView-Dm24akPV.js} +1 -1
  57. package/dist/assets/{SettingsSourceControl-CMtqqlkO.js → SettingsSourceControl-DDCmL82j.js} +1 -1
  58. package/dist/assets/{SettingsSso-Bi3OpykL.js → SettingsSso-BGGQ0Cpg.js} +14 -1
  59. package/dist/assets/{SettingsUsageAndPlan-C5TbwZhP.js → SettingsUsageAndPlan-BzO_zdkH.js} +1 -1
  60. package/dist/assets/{SettingsUsersView-BHuP5k0A.js → SettingsUsersView-DHQUqhqB.js} +1 -1
  61. package/dist/assets/{SettingsView-DPIIqaKN.js → SettingsView-CbtAqjOX.js} +1 -1
  62. package/dist/assets/{SetupView-C4V9j6sh.js → SetupView-BME1OE6U.js} +3 -3
  63. package/dist/assets/{SetupWorkflowCredentialsButton-BZ9ILQUp.js → SetupWorkflowCredentialsButton-DZr4TCPC.js} +1 -1
  64. package/dist/assets/{SetupWorkflowFromTemplateView-3uV3zSU2.js → SetupWorkflowFromTemplateView-CPkKEY04.js} +3 -3
  65. package/dist/assets/{SigninView-DWZHdCjG.js → SigninView-DUeRvOiY.js} +3 -3
  66. package/dist/assets/{SignoutView-DbduXAir.js → SignoutView-BC7SBunZ.js} +1 -1
  67. package/dist/assets/{SignupView-DWq6VACk.js → SignupView-B5ecYJ2q.js} +3 -3
  68. package/dist/assets/{TemplateDetails-BckqE6GK.js → TemplateDetails-DjanZgC1.js} +1 -1
  69. package/dist/assets/{TemplateList-Bw0JeBMP.js → TemplateList-8TyNGxY-.js} +1 -1
  70. package/dist/assets/{TemplatesCollectionView-CAKT-mpV.js → TemplatesCollectionView-BkH4pJCv.js} +5 -5
  71. package/dist/assets/{TemplatesSearchView-I2a5us58.js → TemplatesSearchView-Bcdhi1SL.js} +3 -3
  72. package/dist/assets/{TemplatesView-6EwGFFJK.js → TemplatesView-De2XB6We.js} +1 -1
  73. package/dist/assets/{TemplatesWorkflowView-C8xYMhwu.js → TemplatesWorkflowView-BVnwtrMa.js} +5 -5
  74. package/dist/assets/{TestDefinitionEditView-CNd3Cuzq.js → TestDefinitionEditView-DjmPnrTk.js} +7 -7
  75. package/dist/assets/{TestDefinitionListView-BwTWIaAM.js → TestDefinitionListView-BL2s_qBZ.js} +1 -1
  76. package/dist/assets/{TestDefinitionNewView-BQas0_G1.js → TestDefinitionNewView-B9BqJZST.js} +2 -2
  77. package/dist/assets/{TestDefinitionRootView-D971MFye.js → TestDefinitionRootView-AlWyxbc0.js} +1 -1
  78. package/dist/assets/{VariablesView-DcBBuFxh.js → VariablesView-BZCvPfan.js} +4 -3
  79. package/dist/assets/{WorkerView-DSgBNIeb.js → WorkerView-CigxqnWi.js} +6 -6
  80. package/dist/assets/{WorkflowActivator-CPCbgb_n.js → WorkflowActivator-B7jRy4L1.js} +8 -4
  81. package/dist/assets/{WorkflowActivator-DAyH7N29.css → WorkflowActivator-DrMTmuTZ.css} +2 -2
  82. package/dist/assets/{WorkflowExecutionsInfoAccordion-Bc6vzAZu.js → WorkflowExecutionsInfoAccordion-C_ZycbsF.js} +1 -1
  83. package/dist/assets/{WorkflowExecutionsLandingPage-BPPS4V9i.js → WorkflowExecutionsLandingPage-DOqrfKlC.js} +2 -2
  84. package/dist/assets/{WorkflowExecutionsPreview-Bbb5MB8Z.js → WorkflowExecutionsPreview-B4Cj2gXW.js} +6 -6
  85. package/dist/assets/{WorkflowExecutionsView-Pz-7iHJY.js → WorkflowExecutionsView-RXfP7zkJ.js} +8 -8
  86. package/dist/assets/{WorkflowHistory-Czo9IuI6.js → WorkflowHistory-DrXrRwIS.js} +37 -19
  87. package/dist/assets/{WorkflowOnboardingView-B8DdkfJ5.js → WorkflowOnboardingView-CXH1vCW2.js} +1 -1
  88. package/dist/assets/{WorkflowPreview-eVlO1itk.js → WorkflowPreview-B_MuFEV8.js} +1 -1
  89. package/dist/assets/{WorkflowsView-B2_HJCJ5.css → WorkflowsView-CQvTAWQ0.css} +24 -13
  90. package/dist/assets/{WorkflowsView-Cr2D0vym.js → WorkflowsView-D90hfJ35.js} +299 -157
  91. package/dist/assets/{chartjs.utils-Dk1WO3Mr.js → chartjs.utils-DalQn9bk.js} +2 -2
  92. package/dist/assets/{dateFormatter-C8N5khiG.js → dateFormatter-BPfJSa6q.js} +1 -1
  93. package/dist/assets/{easyAiWorkflowUtils-CLqHnasO.js → easyAiWorkflowUtils-kgtpBx2h.js} +1 -1
  94. package/dist/assets/{global-link-actions-BvoZh8u9.js → global-link-actions-CnWOMvqA.js} +1 -1
  95. package/dist/assets/{import-curl-BpxkGYMX.js → import-curl-BvX_O56D.js} +1 -1
  96. package/dist/assets/{index-Br8T1Gn6.js → index-Bb2NNknG.js} +1 -1
  97. package/dist/assets/{index-B6eunbxp.js → index-DZ6VpjNj.js} +3686 -2273
  98. package/dist/assets/{index-DCpy4nCU.css → index-yNaoC3fo.css} +239 -97
  99. package/dist/assets/{pickBy-8Urz9lDY.js → pickBy-B_HGYyxS.js} +1 -1
  100. package/dist/assets/{templateActions-DzjysjbQ.js → templateActions-DQfZ3ni5.js} +1 -1
  101. package/dist/assets/{useBeforeUnload-DxrN8vOO.js → useBeforeUnload-Cu0LPVWe.js} +1 -1
  102. package/dist/assets/{useCanvasMapping-C2BQB9QB.js → useCanvasMapping-CTTq6x8X.js} +47 -28
  103. package/dist/assets/{useCanvasMapping-cuXLM-h-.css → useCanvasMapping-VtpW_QZA.css} +6 -5
  104. package/dist/assets/{useCanvasOperations-DaP5jKbH.js → useCanvasOperations-u8oSDa_u.js} +95 -444
  105. package/dist/assets/{useClearExecutionButtonVisible-BV-jMf2m.js → useClearExecutionButtonVisible-Dwc1_eG9.js} +2 -2
  106. package/dist/assets/{useExecutionDebugging-0pPCimcw.js → useExecutionDebugging-rc72wLIp.js} +1 -1
  107. package/dist/assets/{useExecutionHelpers-DIvhViMz.js → useExecutionHelpers-DqwMonFW.js} +2 -2
  108. package/dist/assets/{useImportCurlCommand-BWf4R83s.js → useImportCurlCommand-D_onuFvo.js} +2 -2
  109. package/dist/assets/useProjectPages-e8b03-5_.js +17 -0
  110. package/dist/assets/{usePushConnection-Pobjq0U9.js → usePushConnection-wm-7Id6Q.js} +22 -25
  111. package/dist/assets/{useTestDefinitionForm-BA3IS_2B.js → useTestDefinitionForm-DlUOnNC0.js} +1 -1
  112. package/dist/assets/{useWorkflowActivate-DFqvrpj6.js → useWorkflowActivate-65xML23U.js} +1 -1
  113. package/dist/assets/{useWorkflowSaving-BACesUoL.js → useWorkflowSaving-CUel20JA.js} +2 -2
  114. package/dist/index.html +2 -2
  115. package/package.json +1 -1
  116. package/dist/assets/CollectionParameter-BeCTpZ-q.js +0 -4
@@ -1,273 +1,8 @@
1
- import { eu as createCompounder, iz as memoize, dp as i18n, fh as HTTP_REQUEST_NODE_TYPE, iA as getCredentialOnlyNodeType, eQ as AI_CATEGORY_TOOLS, fs as AI_CATEGORY_ROOT_NODES, fy as CUSTOM_API_CALL_KEY, bs as AI_SUBCATEGORY, d as defineComponent, bQ as reactive, o as onMounted, aP as useExternalHooks, y as onBeforeUnmount, b3 as toRefs, h as resolveComponent, i as createElementBlock, g as openBlock, n as normalizeClass, k as createBaseVNode, f as createCommentVNode, j as createVNode, _ as _export_sfc, d_ as useNodeType, r as ref, q as computed, eB as DEFAULT_SUBCATEGORY, iB as CREDENTIAL_ONLY_NODE_PREFIX, c as useI18n, fk as HITL_SUBCATEGORY, dT as isCommunityPackageName, cm as resolveDirective, e as createBlock, aV as createSlots, w as withCtx, aA as withDirectives, aB as vShow, B as normalizeStyle, bC as _sfc_main$h, b2 as withModifiers, m as unref, cO as COMMUNITY_NODES_INSTALLATION_DOCS_URL, ce as DRAG_EVENT_DATA_KEY, ag as useTelemetry, b7 as mergeProps, t as toDisplayString, fi as WEBHOOK_NODE_TYPE, fB as getNewNodePosition, fO as NODE_SIZE, x as renderSlot, Q as useWorkflowsStore, X as watch, b4 as normalizeProps, b5 as guardReactiveProps, bb as onUnmounted, F as Fragment, D as renderList, fm as REGULAR_NODE_CREATOR_VIEW, u as useUsersStore, fl as TRIGGER_NODE_CREATOR_VIEW, hJ as OPEN_AI_NODE_TYPE, hI as OPEN_AI_NODE_MESSAGE_ASSISTANT_TYPE, iC as withMemo, gY as createStaticVNode, l as createTextVNode, iD as REQUEST_NODE_FORM_URL, gp as getNodeIconSource, eG as SEND_AND_WAIT_OPERATION, eU as AI_OTHERS_NODE_CREATOR_VIEW, eV as AI_NODE_CREATOR_VIEW, G as useDebounce, gi as Transition, eT as AI_UNCATEGORIZED_CATEGORY, H as useUIStore, dC as useAssistantStore, bV as useBuilderStore, aT as _sfc_main$i, iE as SlideTransition, bz as useNodeTypesStore, bR as useCredentialsStore } from "./index-B6eunbxp.js";
2
- import { u as upperFirst, g as formatTriggerActionName, a as useNodeCreatorStore, h as useViewStacks, j as camelCase, k as useKeyboardNavigation, t as transformNodeType, A as AINodesView, l as AIView, R as RegularView, T as TriggerView, n as flattenCreateElements } from "./useCanvasOperations-DaP5jKbH.js";
3
- import { u as useActions } from "./NodeCreation-BEjdAYc_.js";
4
- var startCase = createCompounder(function(result, word, index) {
5
- return result + (index ? " " : "") + upperFirst(word);
6
- });
7
- const PLACEHOLDER_RECOMMENDED_ACTION_KEY = "placeholder_recommended";
8
- function translate(...args) {
9
- return i18n.baseText(...args);
10
- }
11
- const cachedBaseText = memoize(translate, (...args) => JSON.stringify(args));
12
- const customNodeActionsParsers = {
13
- ["n8n-nodes-base.hubspotTrigger"]: (matchedProperty, nodeTypeDescription) => {
14
- const collection = matchedProperty?.options?.[0];
15
- return collection?.values[0]?.options?.map(
16
- (categoryItem) => ({
17
- ...getNodeTypeBase(nodeTypeDescription),
18
- actionKey: categoryItem.value,
19
- displayName: cachedBaseText("nodeCreator.actionsCategory.onEvent", {
20
- interpolate: { event: startCase(categoryItem.name) }
21
- }),
22
- description: categoryItem.description ?? "",
23
- displayOptions: matchedProperty.displayOptions,
24
- values: { eventsUi: { eventValues: [{ name: categoryItem.value }] } }
25
- })
26
- );
27
- }
28
- };
29
- function getNodeTypeBase(nodeTypeDescription, label2) {
30
- const isTrigger = nodeTypeDescription.group.includes("trigger");
31
- const category2 = isTrigger ? cachedBaseText("nodeCreator.actionsCategory.triggers") : cachedBaseText("nodeCreator.actionsCategory.actions");
32
- return {
33
- name: nodeTypeDescription.name,
34
- group: nodeTypeDescription.group,
35
- codex: {
36
- label: label2 ?? "",
37
- categories: [category2]
38
- },
39
- iconUrl: nodeTypeDescription.iconUrl,
40
- iconColor: nodeTypeDescription.iconColor,
41
- outputs: nodeTypeDescription.outputs,
42
- icon: nodeTypeDescription.icon,
43
- defaults: nodeTypeDescription.defaults
44
- };
45
- }
46
- function operationsCategory(nodeTypeDescription) {
47
- if (!!nodeTypeDescription.properties.find((property) => property.name === "resource")) return [];
48
- const matchedProperty = nodeTypeDescription.properties.find(
49
- (property) => property.name?.toLowerCase() === "operation"
50
- );
51
- if (!matchedProperty?.options) return [];
52
- const filteredOutItems = matchedProperty.options.filter(
53
- (categoryItem) => !["*", "", " "].includes(categoryItem.name)
54
- );
55
- const items2 = filteredOutItems.map((item) => ({
56
- ...getNodeTypeBase(nodeTypeDescription),
57
- actionKey: item.value,
58
- displayName: item.action ?? startCase(item.name),
59
- description: item.description ?? "",
60
- displayOptions: matchedProperty.displayOptions,
61
- outputConnectionType: item.outputConnectionType,
62
- values: {
63
- [matchedProperty.name]: matchedProperty.type === "multiOptions" ? [item.value] : item.value
64
- }
65
- }));
66
- if (items2.length === 0) return [];
67
- return items2;
68
- }
69
- function modeCategory(nodeTypeDescription) {
70
- const isAINode = nodeTypeDescription.codex?.categories?.includes(AI_SUBCATEGORY);
71
- if (!isAINode) return [];
72
- const matchedProperty = nodeTypeDescription.properties.find(
73
- (property) => property.name?.toLowerCase() === "mode"
74
- );
75
- if (!matchedProperty?.options) return [];
76
- const modeOptions = matchedProperty.options;
77
- const items2 = modeOptions.map((item) => ({
78
- ...getNodeTypeBase(nodeTypeDescription),
79
- actionKey: item.value,
80
- displayName: item.action ?? startCase(item.name),
81
- description: item.description ?? "",
82
- displayOptions: matchedProperty.displayOptions,
83
- outputConnectionType: item.outputConnectionType,
84
- values: {
85
- [matchedProperty.name]: item.value
86
- }
87
- }));
88
- if (items2.length === 0) return [];
89
- return items2;
90
- }
91
- function triggersCategory(nodeTypeDescription) {
92
- const matchingKeys = ["event", "events", "trigger on"];
93
- const isTrigger = nodeTypeDescription.displayName?.toLowerCase().includes("trigger");
94
- const matchedProperty = nodeTypeDescription.properties.find(
95
- (property) => matchingKeys.includes(property.displayName?.toLowerCase())
96
- );
97
- if (!isTrigger) return [];
98
- if (!matchedProperty?.options) {
99
- return [
100
- {
101
- ...getNodeTypeBase(nodeTypeDescription),
102
- actionKey: PLACEHOLDER_RECOMMENDED_ACTION_KEY,
103
- displayName: cachedBaseText("nodeCreator.actionsCategory.onNewEvent", {
104
- interpolate: { event: nodeTypeDescription.displayName.replace("Trigger", "").trimEnd() }
105
- }),
106
- description: ""
107
- }
108
- ];
109
- }
110
- const filteredOutItems = matchedProperty.options.filter(
111
- (categoryItem) => !["*", "", " "].includes(categoryItem.name)
112
- );
113
- const customParsedItem = customNodeActionsParsers[nodeTypeDescription.name]?.(
114
- matchedProperty,
115
- nodeTypeDescription
116
- );
117
- const items2 = customParsedItem ?? filteredOutItems.map((categoryItem) => ({
118
- ...getNodeTypeBase(nodeTypeDescription),
119
- actionKey: categoryItem.value,
120
- displayName: categoryItem.action ?? cachedBaseText("nodeCreator.actionsCategory.onEvent", {
121
- interpolate: { event: formatTriggerActionName(categoryItem.name) }
122
- }),
123
- description: categoryItem.description ?? "",
124
- displayOptions: matchedProperty.displayOptions,
125
- values: {
126
- [matchedProperty.name]: matchedProperty.type === "multiOptions" ? [categoryItem.value] : categoryItem.value
127
- }
128
- }));
129
- return items2;
130
- }
131
- function resourceCategories(nodeTypeDescription) {
132
- const transformedNodes = [];
133
- const matchedProperties = nodeTypeDescription.properties.filter(
134
- (property) => property.displayName?.toLowerCase() === "resource"
135
- );
136
- matchedProperties.forEach((property) => {
137
- (property.options || []).filter((option) => option.value !== CUSTOM_API_CALL_KEY).forEach((resourceOption, _i, options) => {
138
- const isSingleResource = options.length === 1;
139
- const operations = nodeTypeDescription.properties.find((operation) => {
140
- const isOperation = operation.name === "operation";
141
- const isMatchingResource = operation.displayOptions?.show?.resource?.includes(resourceOption.value) ?? isSingleResource;
142
- const operationVersions = operation.displayOptions?.show?.["@version"];
143
- const nodeTypeVersions = Array.isArray(nodeTypeDescription.version) ? nodeTypeDescription.version : [nodeTypeDescription.version];
144
- const isMatchingVersion = operationVersions ? operationVersions.some(
145
- (version) => typeof version === "number" && nodeTypeVersions.includes(version)
146
- ) : true;
147
- return isOperation && isMatchingResource && isMatchingVersion;
148
- });
149
- if (!operations?.options) return;
150
- const items2 = (operations.options || []).map(
151
- (operationOption) => {
152
- const displayName = operationOption.action ?? `${resourceOption.name} ${startCase(operationOption.name)}`;
153
- const displayOptions = isSingleResource ? { show: { resource: [options[0]?.value] } } : operations?.displayOptions;
154
- return {
155
- ...getNodeTypeBase(
156
- nodeTypeDescription,
157
- `${resourceOption.name} ${cachedBaseText("nodeCreator.actionsCategory.actions")}`
158
- ),
159
- actionKey: operationOption.value,
160
- description: operationOption?.description ?? "",
161
- displayOptions,
162
- values: {
163
- operation: operations?.type === "multiOptions" ? [operationOption.value] : operationOption.value
164
- },
165
- displayName,
166
- group: ["trigger"]
167
- };
168
- }
169
- );
170
- transformedNodes.push(...items2);
171
- });
172
- });
173
- return transformedNodes;
174
- }
175
- function useActionsGenerator() {
176
- function generateNodeActions(node) {
177
- if (!node) return [];
178
- if (node.codex?.subcategories?.AI?.includes(AI_CATEGORY_TOOLS) && !node.codex?.subcategories?.AI?.includes(AI_CATEGORY_ROOT_NODES))
179
- return [];
180
- return [
181
- ...triggersCategory(node),
182
- ...operationsCategory(node),
183
- ...resourceCategories(node),
184
- ...modeCategory(node)
185
- ];
186
- }
187
- function filterActions(actions) {
188
- if (actions.length <= 1) return [];
189
- return actions.filter(
190
- (action2, _, arr) => {
191
- const isApiCall = action2.actionKey === CUSTOM_API_CALL_KEY;
192
- if (isApiCall) return false;
193
- const isPlaceholderTriggerAction = action2.actionKey === PLACEHOLDER_RECOMMENDED_ACTION_KEY;
194
- return !isPlaceholderTriggerAction || isPlaceholderTriggerAction && arr.length > 1;
195
- }
196
- );
197
- }
198
- function getSimplifiedNodeType(node) {
199
- const {
200
- displayName,
201
- defaults,
202
- description,
203
- name: name2,
204
- group,
205
- icon: icon2,
206
- iconUrl,
207
- iconColor,
208
- badgeIconUrl,
209
- outputs,
210
- codex
211
- } = node;
212
- return {
213
- displayName,
214
- defaults,
215
- description,
216
- name: name2,
217
- group,
218
- icon: icon2,
219
- iconColor,
220
- iconUrl,
221
- badgeIconUrl,
222
- outputs,
223
- codex
224
- };
225
- }
226
- function generateMergedNodesAndActions(nodeTypes, httpOnlyCredentials) {
227
- const visibleNodeTypes = [...nodeTypes];
228
- const actions = {};
229
- const mergedNodes = [];
230
- visibleNodeTypes.filter((node) => !node.group.includes("trigger")).forEach((app) => {
231
- const appActions = generateNodeActions(app);
232
- actions[app.name] = appActions;
233
- if (app.name === HTTP_REQUEST_NODE_TYPE) {
234
- const credentialOnlyNodes = httpOnlyCredentials.map((credentialType) => {
235
- const credsOnlyNode = getCredentialOnlyNodeType(app, credentialType);
236
- if (credsOnlyNode) return getSimplifiedNodeType(credsOnlyNode);
237
- return null;
238
- });
239
- const filteredNodes = credentialOnlyNodes.filter(
240
- (node) => node !== null
241
- );
242
- mergedNodes.push(...filteredNodes);
243
- }
244
- mergedNodes.push(getSimplifiedNodeType(app));
245
- });
246
- visibleNodeTypes.filter((node) => node.group.includes("trigger")).forEach((trigger) => {
247
- const normalizedName = trigger.name.replace("Trigger", "");
248
- const triggerActions = generateNodeActions(trigger);
249
- const appActions = actions?.[normalizedName] || [];
250
- const app = mergedNodes.find((node) => node.name === normalizedName);
251
- if (app && appActions?.length > 0) {
252
- const mergedActions = filterActions([...appActions, ...triggerActions]);
253
- actions[normalizedName] = mergedActions;
254
- app.description = trigger.description;
255
- } else {
256
- actions[trigger.name] = filterActions(triggerActions);
257
- mergedNodes.push(getSimplifiedNodeType(trigger));
258
- }
259
- });
260
- return {
261
- actions,
262
- mergedNodes
263
- };
264
- }
265
- return {
266
- generateMergedNodesAndActions
267
- };
268
- }
269
- const _hoisted_1$7 = ["placeholder", "value"];
270
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
1
+ import { d as defineComponent, bR as reactive, o as onMounted, aP as useExternalHooks, y as onBeforeUnmount, b3 as toRefs, h as resolveComponent, i as createElementBlock, g as openBlock, n as normalizeClass, k as createBaseVNode, f as createCommentVNode, j as createVNode, _ as _export_sfc, e0 as useNodeType, r as ref, q as computed, eS as DEFAULT_SUBCATEGORY, iH as CREDENTIAL_ONLY_NODE_PREFIX, c as useI18n, ff as HITL_SUBCATEGORY, dG as isCommunityPackageName, iI as isNodePreviewKey, co as resolveDirective, e as createBlock, aV as createSlots, w as withCtx, aA as withDirectives, aB as vShow, B as normalizeStyle, bC as _sfc_main$n, b2 as withModifiers, m as unref, cQ as COMMUNITY_NODES_INSTALLATION_DOCS_URL, cg as DRAG_EVENT_DATA_KEY, ag as useTelemetry, b7 as mergeProps, t as toDisplayString, fd as WEBHOOK_NODE_TYPE, fG as getNewNodePosition, fT as NODE_SIZE, u as useUsersStore, bE as N8nIcon, be as N8nText, l as createTextVNode, bg as N8nButton, x as renderSlot, Q as useWorkflowsStore, X as watch, b4 as normalizeProps, b5 as guardReactiveProps, bb as onUnmounted, F as Fragment, D as renderList, fi as REGULAR_NODE_CREATOR_VIEW, cP as useCommunityNodesStore, bz as useNodeTypesStore, aR as N8nTooltip, dr as i18n, i9 as captureException, b as useRouter, aS as N8nLink, V as VIEWS, fC as CUSTOM_API_CALL_KEY, fh as TRIGGER_NODE_CREATOR_VIEW, hR as OPEN_AI_NODE_TYPE, hQ as OPEN_AI_NODE_MESSAGE_ASSISTANT_TYPE, iJ as withMemo, fc as HTTP_REQUEST_NODE_TYPE, h4 as createStaticVNode, iK as REQUEST_NODE_FORM_URL, iL as filterAndSearchNodes, iM as prepareCommunityNodeDetailsViewStack, gw as getNodeIconSource, fr as transformNodeType, fp as flattenCreateElements, gr as SEND_AND_WAIT_OPERATION, eN as AI_OTHERS_NODE_CREATOR_VIEW, eP as AI_NODE_CREATOR_VIEW, a as useToast, bS as useCredentialsStore, iN as removePreviewToken, G as useDebounce, go as Transition, eM as AI_UNCATEGORIZED_CATEGORY, H as useUIStore, dE as useAssistantStore, bW as useBuilderStore, aT as _sfc_main$o, iO as SlideTransition, iP as useActionsGenerator } from "./index-DZ6VpjNj.js";
2
+ import { u as useNodeCreatorStore, f as useViewStacks, g as camelCase, h as useKeyboardNavigation, A as AINodesView, j as AIView, R as RegularView, T as TriggerView } from "./useCanvasOperations-u8oSDa_u.js";
3
+ import { u as useActions } from "./NodeCreation-DCfAFuL5.js";
4
+ const _hoisted_1$8 = ["placeholder", "value"];
5
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
271
6
  __name: "SearchBar",
272
7
  props: {
273
8
  placeholder: { default: "" },
@@ -328,7 +63,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
328
63
  "data-test-id": "node-creator-search-bar",
329
64
  tabindex: "0",
330
65
  onInput
331
- }, null, 42, _hoisted_1$7)
66
+ }, null, 42, _hoisted_1$8)
332
67
  ], 2),
333
68
  _ctx.modelValue.length > 0 ? (openBlock(), createElementBlock("div", {
334
69
  key: 0,
@@ -351,7 +86,7 @@ const active$3 = "_active_1knv8_144";
351
86
  const text = "_text_1knv8_148";
352
87
  const suffix = "_suffix_1knv8_164";
353
88
  const clear = "_clear_1knv8_170";
354
- const style0$e = {
89
+ const style0$k = {
355
90
  searchContainer,
356
91
  prefix,
357
92
  active: active$3,
@@ -359,11 +94,11 @@ const style0$e = {
359
94
  suffix,
360
95
  clear
361
96
  };
362
- const cssModules$e = {
363
- "$style": style0$e
97
+ const cssModules$k = {
98
+ "$style": style0$k
364
99
  };
365
- const SearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__cssModules", cssModules$e]]);
366
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
100
+ const SearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__cssModules", cssModules$k]]);
101
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
367
102
  __name: "NodeItem",
368
103
  props: {
369
104
  nodeType: {},
@@ -383,7 +118,10 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
383
118
  const dragging = ref(false);
384
119
  const draggablePosition = ref({ x: -100, y: -100 });
385
120
  const draggableDataTransfer2 = ref(null);
386
- const description = computed(() => {
121
+ const description2 = computed(() => {
122
+ if (isCommunityNodePreview.value) {
123
+ return props.nodeType.description;
124
+ }
387
125
  if (isSendAndWaitCategory.value) {
388
126
  return "";
389
127
  }
@@ -395,7 +133,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
395
133
  fallback: props.nodeType.description
396
134
  });
397
135
  });
398
- const showActionArrow = computed(() => hasActions.value && !isSendAndWaitCategory.value);
136
+ const showActionArrow = computed(() => {
137
+ if (isCommunityNode.value && !activeViewStack.communityNodeDetails) {
138
+ return true;
139
+ }
140
+ return hasActions.value && !isSendAndWaitCategory.value;
141
+ });
399
142
  const isSendAndWaitCategory = computed(() => activeViewStack.subcategory === HITL_SUBCATEGORY);
400
143
  const dataTestId = computed(
401
144
  () => hasActions.value ? "node-creator-action-item" : "node-creator-node-item"
@@ -412,6 +155,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
412
155
  left: `${draggablePosition.value.x}px`
413
156
  }));
414
157
  const isCommunityNode = computed(() => isCommunityPackageName(props.nodeType.name));
158
+ const isCommunityNodePreview = computed(() => isNodePreviewKey(props.nodeType.name));
415
159
  const displayName = computed(() => {
416
160
  const trimmedDisplayName = props.nodeType.displayName.trimEnd();
417
161
  return i18n2.headerText({
@@ -451,7 +195,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
451
195
  return openBlock(), createBlock(_component_N8nNodeCreatorNode, {
452
196
  draggable: !showActionArrow.value,
453
197
  class: normalizeClass(_ctx.$style.nodeItem),
454
- description: description.value,
198
+ description: description2.value,
455
199
  title: displayName.value,
456
200
  "show-action-arrow": showActionArrow.value,
457
201
  "is-trigger": isTrigger.value,
@@ -465,7 +209,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
465
209
  key: 0,
466
210
  class: normalizeClass(_ctx.$style.subNodeBackground)
467
211
  }, null, 2)) : createCommentVNode("", true),
468
- createVNode(_sfc_main$h, {
212
+ createVNode(_sfc_main$n, {
469
213
  class: normalizeClass(_ctx.$style.nodeIcon),
470
214
  "node-type": _ctx.nodeType
471
215
  }, null, 8, ["class", "node-type"])
@@ -477,7 +221,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
477
221
  class: normalizeClass(_ctx.$style.draggable),
478
222
  style: normalizeStyle(draggableStyle.value)
479
223
  }, [
480
- createVNode(_sfc_main$h, {
224
+ createVNode(_sfc_main$n, {
481
225
  "node-type": _ctx.nodeType,
482
226
  size: 40,
483
227
  shrink: false,
@@ -490,7 +234,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
490
234
  ]),
491
235
  _: 2
492
236
  }, [
493
- isCommunityNode.value ? {
237
+ isCommunityNode.value && !isCommunityNodePreview.value && !unref(activeViewStack)?.communityNodeDetails ? {
494
238
  name: "tooltip",
495
239
  fn: withCtx(() => [
496
240
  withDirectives(createBaseVNode("p", {
@@ -515,24 +259,24 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
515
259
  }
516
260
  });
517
261
  const nodeItem = "_nodeItem_1107w_123";
518
- const nodeIcon$2 = "_nodeIcon_1107w_131";
262
+ const nodeIcon$4 = "_nodeIcon_1107w_131";
519
263
  const subNodeBackground = "_subNodeBackground_1107w_135";
520
264
  const communityNodeIcon = "_communityNodeIcon_1107w_145";
521
265
  const draggable$1 = "_draggable_1107w_149";
522
266
  const draggableDataTransfer$1 = "_draggableDataTransfer_1107w_163";
523
- const style0$d = {
267
+ const style0$j = {
524
268
  nodeItem,
525
- nodeIcon: nodeIcon$2,
269
+ nodeIcon: nodeIcon$4,
526
270
  subNodeBackground,
527
271
  communityNodeIcon,
528
272
  draggable: draggable$1,
529
273
  draggableDataTransfer: draggableDataTransfer$1
530
274
  };
531
- const cssModules$d = {
532
- "$style": style0$d
275
+ const cssModules$j = {
276
+ "$style": style0$j
533
277
  };
534
- const NodeItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__cssModules", cssModules$d]]);
535
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
278
+ const NodeItem = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__cssModules", cssModules$j]]);
279
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
536
280
  __name: "SubcategoryItem",
537
281
  props: {
538
282
  item: {}
@@ -565,15 +309,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
565
309
  }
566
310
  });
567
311
  const subCategory = "_subCategory_1x5a1_123";
568
- const style0$c = {
312
+ const style0$i = {
569
313
  subCategory
570
314
  };
571
- const cssModules$c = {
572
- "$style": style0$c
315
+ const cssModules$i = {
316
+ "$style": style0$i
573
317
  };
574
- const SubcategoryItem = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__cssModules", cssModules$c]]);
575
- const _hoisted_1$6 = ["textContent"];
576
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
318
+ const SubcategoryItem = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__cssModules", cssModules$i]]);
319
+ const _hoisted_1$7 = ["textContent"];
320
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
577
321
  __name: "LabelItem",
578
322
  props: {
579
323
  item: {}
@@ -586,20 +330,20 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
586
330
  createBaseVNode("span", {
587
331
  class: normalizeClass(_ctx.$style.name),
588
332
  textContent: toDisplayString(_ctx.item.key)
589
- }, null, 10, _hoisted_1$6)
333
+ }, null, 10, _hoisted_1$7)
590
334
  ], 2);
591
335
  };
592
336
  }
593
337
  });
594
338
  const label$1 = "_label_p81gr_123";
595
- const style0$b = {
339
+ const style0$h = {
596
340
  label: label$1
597
341
  };
598
- const cssModules$b = {
599
- "$style": style0$b
342
+ const cssModules$h = {
343
+ "$style": style0$h
600
344
  };
601
- const LabelItem = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__cssModules", cssModules$b]]);
602
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
345
+ const LabelItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__cssModules", cssModules$h]]);
346
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
603
347
  __name: "ActionItem",
604
348
  props: {
605
349
  nodeType: {},
@@ -686,7 +430,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
686
430
  class: normalizeClass(_ctx.$style.draggable),
687
431
  style: normalizeStyle(draggableStyle.value)
688
432
  }, [
689
- createVNode(_sfc_main$h, {
433
+ createVNode(_sfc_main$n, {
690
434
  "node-type": _ctx.nodeType,
691
435
  size: 40,
692
436
  shrink: false,
@@ -698,7 +442,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
698
442
  ])
699
443
  ]),
700
444
  icon: withCtx(() => [
701
- createVNode(_sfc_main$h, { "node-type": _ctx.action }, null, 8, ["node-type"])
445
+ createVNode(_sfc_main$n, { "node-type": _ctx.action }, null, 8, ["node-type"])
702
446
  ]),
703
447
  _: 1
704
448
  }, 8, ["class", "title", "is-trigger"]);
@@ -706,20 +450,20 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
706
450
  }
707
451
  });
708
452
  const action$1 = "_action_1owvg_123";
709
- const nodeIcon$1 = "_nodeIcon_1owvg_135";
453
+ const nodeIcon$3 = "_nodeIcon_1owvg_135";
710
454
  const draggable = "_draggable_1owvg_139";
711
455
  const draggableDataTransfer = "_draggableDataTransfer_1owvg_153";
712
- const style0$a = {
456
+ const style0$g = {
713
457
  action: action$1,
714
- nodeIcon: nodeIcon$1,
458
+ nodeIcon: nodeIcon$3,
715
459
  draggable,
716
460
  draggableDataTransfer
717
461
  };
718
- const cssModules$a = {
719
- "$style": style0$a
462
+ const cssModules$g = {
463
+ "$style": style0$g
720
464
  };
721
- const ActionItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__cssModules", cssModules$a]]);
722
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
465
+ const ActionItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__cssModules", cssModules$g]]);
466
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
723
467
  __name: "ViewItem",
724
468
  props: {
725
469
  view: {}
@@ -750,14 +494,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
750
494
  }
751
495
  });
752
496
  const view$1 = "_view_17lj9_123";
753
- const style0$9 = {
497
+ const style0$f = {
754
498
  view: view$1
755
499
  };
756
- const cssModules$9 = {
757
- "$style": style0$9
500
+ const cssModules$f = {
501
+ "$style": style0$f
758
502
  };
759
- const ViewItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__cssModules", cssModules$9]]);
760
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
503
+ const ViewItem = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__cssModules", cssModules$f]]);
504
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
761
505
  __name: "LinkItem",
762
506
  props: {
763
507
  link: {}
@@ -788,15 +532,89 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
788
532
  }
789
533
  });
790
534
  const creatorLink = "_creatorLink_cptk0_123";
791
- const style0$8 = {
535
+ const style0$e = {
792
536
  creatorLink
793
537
  };
794
- const cssModules$8 = {
795
- "$style": style0$8
538
+ const cssModules$e = {
539
+ "$style": style0$e
796
540
  };
797
- const LinkItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__cssModules", cssModules$8]]);
798
- const _hoisted_1$5 = ["textContent"];
799
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
541
+ const LinkItem = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__cssModules", cssModules$e]]);
542
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
543
+ __name: "CommunityNodeInstallHint",
544
+ props: {
545
+ hint: {}
546
+ },
547
+ setup(__props) {
548
+ const isOwner = computed(() => useUsersStore().isInstanceOwner);
549
+ return (_ctx, _cache) => {
550
+ return isOwner.value ? (openBlock(), createElementBlock("div", {
551
+ key: 0,
552
+ class: normalizeClass(_ctx.$style.container)
553
+ }, [
554
+ createVNode(unref(N8nIcon), {
555
+ color: "text-light",
556
+ icon: "info-circle",
557
+ size: "large"
558
+ }),
559
+ createVNode(unref(N8nText), {
560
+ color: "text-base",
561
+ size: "medium"
562
+ }, {
563
+ default: withCtx(() => [
564
+ createTextVNode(toDisplayString(_ctx.hint), 1)
565
+ ]),
566
+ _: 1
567
+ })
568
+ ], 2)) : createCommentVNode("", true);
569
+ };
570
+ }
571
+ });
572
+ const container$5 = "_container_1dwo3_123";
573
+ const style0$d = {
574
+ container: container$5
575
+ };
576
+ const cssModules$d = {
577
+ "$style": style0$d
578
+ };
579
+ const CommunityNodeInstallHint = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__cssModules", cssModules$d]]);
580
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
581
+ __name: "CommunityNodeItem",
582
+ props: {
583
+ isPreview: { type: Boolean }
584
+ },
585
+ setup(__props) {
586
+ const i18n2 = useI18n();
587
+ return (_ctx, _cache) => {
588
+ return openBlock(), createElementBlock("div", null, [
589
+ _ctx.isPreview ? (openBlock(), createBlock(CommunityNodeInstallHint, {
590
+ key: 0,
591
+ hint: unref(i18n2).baseText("communityNodeItem.node.hint")
592
+ }, null, 8, ["hint"])) : (openBlock(), createElementBlock("div", {
593
+ key: 1,
594
+ class: normalizeClass(_ctx.$style.marginLeft)
595
+ }, [
596
+ createVNode(unref(N8nButton), {
597
+ size: "medium",
598
+ type: "secondary",
599
+ icon: "plus",
600
+ label: unref(i18n2).baseText("communityNodeItem.label"),
601
+ outline: ""
602
+ }, null, 8, ["label"])
603
+ ], 2))
604
+ ]);
605
+ };
606
+ }
607
+ });
608
+ const marginLeft = "_marginLeft_1vvtt_123";
609
+ const style0$c = {
610
+ marginLeft
611
+ };
612
+ const cssModules$c = {
613
+ "$style": style0$c
614
+ };
615
+ const CommunityNodeItem = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__cssModules", cssModules$c]]);
616
+ const _hoisted_1$6 = ["textContent"];
617
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
800
618
  __name: "CategoryItem",
801
619
  props: {
802
620
  expanded: { type: Boolean, default: true },
@@ -827,7 +645,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
827
645
  }, [
828
646
  createBaseVNode("span", {
829
647
  textContent: toDisplayString(categoryName.value)
830
- }, null, 8, _hoisted_1$5),
648
+ }, null, 8, _hoisted_1$6),
831
649
  _ctx.isTrigger ? (openBlock(), createBlock(_component_font_awesome_icon, {
832
650
  key: 0,
833
651
  icon: "bolt",
@@ -855,19 +673,19 @@ const category$1 = "_category_1rqhf_128";
855
673
  const active$2 = "_active_1rqhf_149";
856
674
  const name = "_name_1rqhf_153";
857
675
  const arrow = "_arrow_1rqhf_158";
858
- const style0$7 = {
676
+ const style0$b = {
859
677
  triggerIcon,
860
678
  category: category$1,
861
679
  active: active$2,
862
680
  name,
863
681
  arrow
864
682
  };
865
- const cssModules$7 = {
866
- "$style": style0$7
683
+ const cssModules$b = {
684
+ "$style": style0$b
867
685
  };
868
- const CategoryItem = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__cssModules", cssModules$7]]);
869
- const _hoisted_1$4 = ["data-category-collapsed"];
870
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
686
+ const CategoryItem = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__cssModules", cssModules$b]]);
687
+ const _hoisted_1$5 = ["data-category-collapsed"];
688
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
871
689
  __name: "CategorizedItemsRenderer",
872
690
  props: {
873
691
  elements: { default: () => [] },
@@ -880,13 +698,17 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
880
698
  },
881
699
  setup(__props) {
882
700
  const props = __props;
883
- const { popViewStack } = useViewStacks();
701
+ const { popViewStack, activeViewStack } = useViewStacks();
884
702
  const { registerKeyHook } = useKeyboardNavigation();
885
703
  const { workflowId } = useWorkflowsStore();
886
704
  const nodeCreatorStore = useNodeCreatorStore();
705
+ const i18n2 = useI18n();
887
706
  const activeItemId = computed(() => useKeyboardNavigation()?.activeItemId);
888
707
  const actionCount = computed(() => props.elements.filter(({ type }) => type === "action").length);
889
708
  const expanded = ref(props.expanded ?? false);
709
+ const isPreview = computed(
710
+ () => activeViewStack.communityNodeDetails && !activeViewStack.communityNodeDetails.installed
711
+ );
890
712
  function toggleExpanded() {
891
713
  setExpanded(!expanded.value);
892
714
  }
@@ -984,39 +806,46 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
984
806
  }, [
985
807
  renderSlot(_ctx.$slots, "default")
986
808
  ], 2)) : createCommentVNode("", true),
987
- expanded.value ? (openBlock(), createBlock(ItemsRenderer, mergeProps({ key: 1 }, _ctx.$attrs, {
809
+ isPreview.value ? (openBlock(), createBlock(CommunityNodeInstallHint, {
810
+ key: 1,
811
+ hint: unref(i18n2).baseText("communityNodeItem.actions.hint")
812
+ }, null, 8, ["hint"])) : createCommentVNode("", true),
813
+ expanded.value ? (openBlock(), createBlock(ItemsRenderer, mergeProps({ key: 2 }, _ctx.$attrs, {
988
814
  elements: _ctx.elements,
989
- "is-trigger": _ctx.isTriggerCategory
815
+ "is-trigger": _ctx.isTriggerCategory,
816
+ class: [{ [_ctx.$style.preview]: isPreview.value }]
990
817
  }), {
991
818
  default: withCtx(() => _cache[0] || (_cache[0] = [])),
992
819
  empty: withCtx(() => [
993
820
  renderSlot(_ctx.$slots, "empty", normalizeProps(guardReactiveProps({ elements: _ctx.elements })))
994
821
  ]),
995
822
  _: 3
996
- }, 16, ["elements", "is-trigger"])) : createCommentVNode("", true)
997
- ], 10, _hoisted_1$4);
823
+ }, 16, ["elements", "is-trigger", "class"])) : createCommentVNode("", true)
824
+ ], 10, _hoisted_1$5);
998
825
  };
999
826
  }
1000
827
  });
1001
- const mouseOverTooltip = "_mouseOverTooltip_5wyeb_123";
1002
- const categorizedItemsRenderer = "_categorizedItemsRenderer_5wyeb_131";
1003
- const tooltipPopper = "_tooltipPopper_5wyeb_135";
1004
- const contentSlot = "_contentSlot_5wyeb_139";
1005
- const style0$6 = {
828
+ const mouseOverTooltip = "_mouseOverTooltip_wk4vn_123";
829
+ const categorizedItemsRenderer = "_categorizedItemsRenderer_wk4vn_131";
830
+ const tooltipPopper = "_tooltipPopper_wk4vn_135";
831
+ const contentSlot = "_contentSlot_wk4vn_139";
832
+ const preview$1 = "_preview_wk4vn_148";
833
+ const style0$a = {
1006
834
  mouseOverTooltip,
1007
835
  categorizedItemsRenderer,
1008
836
  tooltipPopper,
1009
- contentSlot
837
+ contentSlot,
838
+ preview: preview$1
1010
839
  };
1011
- const cssModules$6 = {
1012
- "$style": style0$6
840
+ const cssModules$a = {
841
+ "$style": style0$a
1013
842
  };
1014
- const CategorizedItemsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$6]]);
1015
- const _hoisted_1$3 = { key: 0 };
1016
- const _hoisted_2$2 = ["data-keyboard-nav-type", "data-keyboard-nav-id", "onClick"];
843
+ const CategorizedItemsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__cssModules", cssModules$a]]);
844
+ const _hoisted_1$4 = { key: 0 };
845
+ const _hoisted_2$3 = ["data-keyboard-nav-type", "data-keyboard-nav-id", "onClick"];
1017
846
  const LAZY_LOAD_THRESHOLD = 20;
1018
847
  const LAZY_LOAD_ITEMS_PER_TICK = 5;
1019
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
848
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1020
849
  __name: "ItemsRenderer",
1021
850
  props: {
1022
851
  elements: { default: () => [] },
@@ -1030,7 +859,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1030
859
  const emit = __emit;
1031
860
  const renderedItems2 = ref([]);
1032
861
  const renderAnimationRequest = ref(0);
862
+ const { activeViewStack } = useViewStacks();
1033
863
  const activeItemId = computed(() => useKeyboardNavigation()?.activeItemId);
864
+ const communityNode = computed(() => activeViewStack.mode === "community-node");
865
+ const isPreview = computed(() => {
866
+ return communityNode.value && !activeViewStack.communityNodeDetails?.installed;
867
+ });
868
+ const highlightActiveItem = computed(() => {
869
+ if (activeViewStack.communityNodeDetails && !activeViewStack.communityNodeDetails.installed) {
870
+ return false;
871
+ }
872
+ return true;
873
+ });
1034
874
  function renderItems() {
1035
875
  if (props.elements.length <= LAZY_LOAD_THRESHOLD || !props.lazyRender) {
1036
876
  renderedItems2.value = props.elements;
@@ -1101,7 +941,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1101
941
  return openBlock(), createElementBlock("div", {
1102
942
  key: item.uuid
1103
943
  }, [
1104
- renderedItems2.value.includes(item) ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
944
+ renderedItems2.value.includes(item) ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
1105
945
  item.type === "section" ? (openBlock(), createBlock(CategorizedItemsRenderer, {
1106
946
  key: 0,
1107
947
  elements: item.children,
@@ -1114,9 +954,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1114
954
  ref: "iteratorItems",
1115
955
  class: normalizeClass({
1116
956
  clickable: !_ctx.disabled,
1117
- [_ctx.$style.active]: activeItemId.value === item.uuid,
1118
- [_ctx.$style.iteratorItem]: true,
957
+ [_ctx.$style.active]: activeItemId.value === item.uuid && highlightActiveItem.value,
958
+ [_ctx.$style.iteratorItem]: !communityNode.value,
1119
959
  [_ctx.$style[item.type]]: true,
960
+ [_ctx.$style.preview]: isPreview.value,
1120
961
  // Borderless is only applied to views
1121
962
  [_ctx.$style.borderless]: item.type === "view" && item.properties.borderless === true
1122
963
  }),
@@ -1133,27 +974,31 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1133
974
  key: 1,
1134
975
  item: item.properties
1135
976
  }, null, 8, ["item"])) : createCommentVNode("", true),
1136
- item.type === "node" ? (openBlock(), createBlock(NodeItem, {
977
+ communityNode.value ? (openBlock(), createBlock(CommunityNodeItem, {
1137
978
  key: 2,
979
+ "is-preview": isPreview.value
980
+ }, null, 8, ["is-preview"])) : createCommentVNode("", true),
981
+ item.type === "node" && !communityNode.value ? (openBlock(), createBlock(NodeItem, {
982
+ key: 3,
1138
983
  "node-type": item.properties,
1139
984
  active: true,
1140
985
  subcategory: item.subcategory
1141
986
  }, null, 8, ["node-type", "subcategory"])) : createCommentVNode("", true),
1142
987
  item.type === "action" ? (openBlock(), createBlock(ActionItem, {
1143
- key: 3,
988
+ key: 4,
1144
989
  "node-type": item.properties,
1145
990
  action: item.properties,
1146
991
  active: true
1147
992
  }, null, 8, ["node-type", "action"])) : item.type === "view" ? (openBlock(), createBlock(ViewItem, {
1148
- key: 4,
993
+ key: 5,
1149
994
  view: item.properties,
1150
995
  class: normalizeClass(_ctx.$style.viewItem)
1151
996
  }, null, 8, ["view", "class"])) : item.type === "link" ? (openBlock(), createBlock(LinkItem, {
1152
- key: 5,
997
+ key: 6,
1153
998
  link: item.properties,
1154
999
  class: normalizeClass(_ctx.$style.linkItem)
1155
1000
  }, null, 8, ["link", "class"])) : createCommentVNode("", true)
1156
- ], 10, _hoisted_2$2))
1001
+ ], 10, _hoisted_2$3))
1157
1002
  ])) : (openBlock(), createBlock(_component_n8n_loading, {
1158
1003
  key: 1,
1159
1004
  loading: true,
@@ -1172,17 +1017,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1172
1017
  };
1173
1018
  }
1174
1019
  });
1175
- const itemSkeleton = "_itemSkeleton_e346c_123";
1176
- const iteratorItem = "_iteratorItem_e346c_127";
1177
- const label = "_label_e346c_139";
1178
- const category = "_category_e346c_139";
1179
- const active$1 = "_active_e346c_142";
1180
- const empty = "_empty_e346c_146";
1181
- const itemsRenderer = "_itemsRenderer_e346c_150";
1182
- const view = "_view_e346c_159";
1183
- const link = "_link_e346c_177";
1184
- const borderless = "_borderless_e346c_195";
1185
- const style0$5 = {
1020
+ const itemSkeleton = "_itemSkeleton_1r9np_123";
1021
+ const iteratorItem = "_iteratorItem_1r9np_127";
1022
+ const label = "_label_1r9np_139";
1023
+ const category = "_category_1r9np_139";
1024
+ const active$1 = "_active_1r9np_142";
1025
+ const empty = "_empty_1r9np_146";
1026
+ const itemsRenderer = "_itemsRenderer_1r9np_150";
1027
+ const view = "_view_1r9np_159";
1028
+ const link = "_link_1r9np_177";
1029
+ const borderless = "_borderless_1r9np_195";
1030
+ const preview = "_preview_1r9np_203";
1031
+ const style0$9 = {
1186
1032
  itemSkeleton,
1187
1033
  iteratorItem,
1188
1034
  label,
@@ -1192,13 +1038,14 @@ const style0$5 = {
1192
1038
  itemsRenderer,
1193
1039
  view,
1194
1040
  link,
1195
- borderless
1041
+ borderless,
1042
+ preview
1196
1043
  };
1197
- const cssModules$5 = {
1198
- "$style": style0$5
1044
+ const cssModules$9 = {
1045
+ "$style": style0$9
1199
1046
  };
1200
- const ItemsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$5]]);
1201
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1047
+ const ItemsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__cssModules", cssModules$9]]);
1048
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1202
1049
  __name: "OrderSwitcher",
1203
1050
  props: {
1204
1051
  rootView: {}
@@ -1217,14 +1064,348 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1217
1064
  };
1218
1065
  }
1219
1066
  });
1220
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1067
+ const _hoisted_1$3 = { key: 2 };
1068
+ const _hoisted_2$2 = { key: 3 };
1069
+ const _hoisted_3 = { style: { "padding-bottom": "8px" } };
1070
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1071
+ __name: "CommunityNodeInfo",
1072
+ setup(__props) {
1073
+ const { activeViewStack } = useViewStacks();
1074
+ const { communityNodeDetails } = activeViewStack;
1075
+ const publisherName = ref(void 0);
1076
+ const downloads = ref(null);
1077
+ const verified = ref(false);
1078
+ const communityNodesStore = useCommunityNodesStore();
1079
+ const nodeTypesStore = useNodeTypesStore();
1080
+ const isOwner = computed(() => useUsersStore().isInstanceOwner);
1081
+ const ownerEmailList = computed(
1082
+ () => useUsersStore().allUsers.filter((user) => user.role?.includes("owner")).map((user) => user.email)
1083
+ );
1084
+ const formatNumber = (number) => {
1085
+ if (!number) return null;
1086
+ return new Intl.NumberFormat("en-US").format(number);
1087
+ };
1088
+ async function fetchPackageInfo(packageName) {
1089
+ const communityNodeAttributes = await nodeTypesStore.getCommunityNodeAttributes(
1090
+ activeViewStack.communityNodeDetails?.key || ""
1091
+ );
1092
+ if (communityNodeAttributes) {
1093
+ publisherName.value = communityNodeAttributes.authorName;
1094
+ downloads.value = formatNumber(communityNodeAttributes.numberOfDownloads);
1095
+ const packageInfo = communityNodesStore.getInstalledPackages.find(
1096
+ (p) => p.packageName === communityNodeAttributes.packageName
1097
+ );
1098
+ if (!packageInfo) {
1099
+ verified.value = true;
1100
+ } else {
1101
+ verified.value = packageInfo.installedVersion === communityNodeAttributes.npmVersion;
1102
+ }
1103
+ return;
1104
+ }
1105
+ const url = `https://registry.npmjs.org/${packageName}`;
1106
+ try {
1107
+ const response = await fetch(url);
1108
+ if (!response.ok) {
1109
+ captureException(new Error("Could not get metadata for package"), { extra: { packageName } });
1110
+ return;
1111
+ }
1112
+ const data = await response.json();
1113
+ const publisher = data.maintainers?.[0]?.name;
1114
+ publisherName.value = publisher;
1115
+ const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
1116
+ const downloadsUrl = `https://api.npmjs.org/downloads/range/2022-01-01:${today}/${packageName}`;
1117
+ const downloadsResponse = await fetch(downloadsUrl);
1118
+ if (!downloadsResponse.ok) {
1119
+ captureException(new Error("Could not get downloads for package"), {
1120
+ extra: { packageName }
1121
+ });
1122
+ return;
1123
+ }
1124
+ const downloadsData = await downloadsResponse.json();
1125
+ if (!downloadsData.downloads || !downloadsData.downloads.length) return;
1126
+ const total = downloadsData.downloads.reduce((sum, day) => sum + day.downloads, 0);
1127
+ downloads.value = formatNumber(total);
1128
+ } catch (error) {
1129
+ captureException(error, { extra: { packageName } });
1130
+ }
1131
+ }
1132
+ onMounted(async () => {
1133
+ if (communityNodeDetails?.packageName) {
1134
+ await fetchPackageInfo(communityNodeDetails.packageName);
1135
+ }
1136
+ });
1137
+ return (_ctx, _cache) => {
1138
+ const _component_FontAwesomeIcon = resolveComponent("FontAwesomeIcon");
1139
+ return openBlock(), createElementBlock("div", {
1140
+ class: normalizeClass(_ctx.$style.container)
1141
+ }, [
1142
+ createVNode(unref(N8nText), {
1143
+ class: normalizeClass(_ctx.$style.description),
1144
+ color: "text-base",
1145
+ size: "medium"
1146
+ }, {
1147
+ default: withCtx(() => [
1148
+ createTextVNode(toDisplayString(unref(communityNodeDetails)?.description), 1)
1149
+ ]),
1150
+ _: 1
1151
+ }, 8, ["class"]),
1152
+ createBaseVNode("div", {
1153
+ class: normalizeClass(_ctx.$style.separator)
1154
+ }, null, 2),
1155
+ createBaseVNode("div", {
1156
+ class: normalizeClass(_ctx.$style.info)
1157
+ }, [
1158
+ verified.value ? (openBlock(), createBlock(unref(N8nTooltip), {
1159
+ key: 0,
1160
+ placement: "top"
1161
+ }, {
1162
+ content: withCtx(() => [
1163
+ createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.approved")), 1)
1164
+ ]),
1165
+ default: withCtx(() => [
1166
+ createBaseVNode("div", null, [
1167
+ createVNode(_component_FontAwesomeIcon, {
1168
+ class: normalizeClass(_ctx.$style.tooltipIcon),
1169
+ icon: "check-circle"
1170
+ }, null, 8, ["class"]),
1171
+ createVNode(unref(N8nText), {
1172
+ color: "text-light",
1173
+ size: "xsmall",
1174
+ bold: "",
1175
+ "data-test-id": "verified-tag"
1176
+ }, {
1177
+ default: withCtx(() => [
1178
+ createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.approved.label")), 1)
1179
+ ]),
1180
+ _: 1
1181
+ })
1182
+ ])
1183
+ ]),
1184
+ _: 1
1185
+ })) : (openBlock(), createBlock(unref(N8nTooltip), {
1186
+ key: 1,
1187
+ placement: "top"
1188
+ }, {
1189
+ content: withCtx(() => [
1190
+ createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.unverified")), 1)
1191
+ ]),
1192
+ default: withCtx(() => [
1193
+ createBaseVNode("div", null, [
1194
+ createVNode(_component_FontAwesomeIcon, {
1195
+ class: normalizeClass(_ctx.$style.tooltipIcon),
1196
+ icon: "cube"
1197
+ }, null, 8, ["class"]),
1198
+ createVNode(unref(N8nText), {
1199
+ color: "text-light",
1200
+ size: "xsmall",
1201
+ bold: ""
1202
+ }, {
1203
+ default: withCtx(() => [
1204
+ createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.unverified.label")), 1)
1205
+ ]),
1206
+ _: 1
1207
+ })
1208
+ ])
1209
+ ]),
1210
+ _: 1
1211
+ })),
1212
+ downloads.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
1213
+ createVNode(_component_FontAwesomeIcon, {
1214
+ class: normalizeClass(_ctx.$style.tooltipIcon),
1215
+ icon: "download"
1216
+ }, null, 8, ["class"]),
1217
+ createVNode(unref(N8nText), {
1218
+ color: "text-light",
1219
+ size: "xsmall",
1220
+ bold: "",
1221
+ "data-test-id": "number-of-downloads"
1222
+ }, {
1223
+ default: withCtx(() => [
1224
+ createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.downloads", { interpolate: { downloads: downloads.value } })), 1)
1225
+ ]),
1226
+ _: 1
1227
+ })
1228
+ ])) : createCommentVNode("", true),
1229
+ publisherName.value ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
1230
+ createVNode(_component_FontAwesomeIcon, {
1231
+ class: normalizeClass(_ctx.$style.tooltipIcon),
1232
+ icon: "user"
1233
+ }, null, 8, ["class"]),
1234
+ createVNode(unref(N8nText), {
1235
+ color: "text-light",
1236
+ size: "xsmall",
1237
+ bold: "",
1238
+ "data-test-id": "publisher-name"
1239
+ }, {
1240
+ default: withCtx(() => [
1241
+ createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.publishedBy", { interpolate: { publisherName: publisherName.value } })), 1)
1242
+ ]),
1243
+ _: 1
1244
+ })
1245
+ ])) : createCommentVNode("", true)
1246
+ ], 2),
1247
+ !isOwner.value && !unref(communityNodeDetails)?.installed ? (openBlock(), createElementBlock("div", {
1248
+ key: 0,
1249
+ class: normalizeClass(_ctx.$style.contactOwnerHint)
1250
+ }, [
1251
+ createVNode(unref(N8nIcon), {
1252
+ color: "text-light",
1253
+ icon: "info-circle",
1254
+ size: "large"
1255
+ }),
1256
+ createVNode(unref(N8nText), {
1257
+ color: "text-base",
1258
+ size: "medium"
1259
+ }, {
1260
+ default: withCtx(() => [
1261
+ createBaseVNode("div", _hoisted_3, toDisplayString(unref(i18n).baseText("communityNodeInfo.contact.admin")), 1),
1262
+ ownerEmailList.value.length ? (openBlock(), createBlock(unref(N8nText), {
1263
+ key: 0,
1264
+ bold: ""
1265
+ }, {
1266
+ default: withCtx(() => [
1267
+ createTextVNode(toDisplayString(ownerEmailList.value.join(", ")), 1)
1268
+ ]),
1269
+ _: 1
1270
+ })) : createCommentVNode("", true)
1271
+ ]),
1272
+ _: 1
1273
+ })
1274
+ ], 2)) : createCommentVNode("", true)
1275
+ ], 2);
1276
+ };
1277
+ }
1278
+ });
1279
+ const container$4 = "_container_1ty35_123";
1280
+ const nodeIcon$2 = "_nodeIcon_1ty35_132";
1281
+ const description = "_description_1ty35_137";
1282
+ const separator = "_separator_1ty35_141";
1283
+ const info$1 = "_info_1ty35_147";
1284
+ const tooltipIcon = "_tooltipIcon_1ty35_162";
1285
+ const contactOwnerHint = "_contactOwnerHint_1ty35_167";
1286
+ const style0$8 = {
1287
+ container: container$4,
1288
+ nodeIcon: nodeIcon$2,
1289
+ description,
1290
+ separator,
1291
+ info: info$1,
1292
+ tooltipIcon,
1293
+ contactOwnerHint
1294
+ };
1295
+ const cssModules$8 = {
1296
+ "$style": style0$8
1297
+ };
1298
+ const CommunityNodeInfo = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__cssModules", cssModules$8]]);
1299
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1300
+ __name: "CommunityNodeFooter",
1301
+ props: {
1302
+ packageName: {},
1303
+ showManage: { type: Boolean }
1304
+ },
1305
+ setup(__props) {
1306
+ const props = __props;
1307
+ const router = useRouter();
1308
+ const bugsUrl = ref(`https://registry.npmjs.org/${props.packageName}`);
1309
+ async function openSettingsPage() {
1310
+ await router.push({ name: VIEWS.COMMUNITY_NODES });
1311
+ }
1312
+ async function openIssuesPage() {
1313
+ if (bugsUrl.value) {
1314
+ window.open(bugsUrl.value, "_blank");
1315
+ }
1316
+ }
1317
+ async function getBugsUrl(packageName) {
1318
+ const url = `https://registry.npmjs.org/${packageName}`;
1319
+ try {
1320
+ const response = await fetch(url);
1321
+ if (!response.ok) {
1322
+ throw new Error("Could not get metadata for package");
1323
+ }
1324
+ const data = await response.json();
1325
+ if (data.bugs?.url) {
1326
+ bugsUrl.value = data.bugs.url;
1327
+ }
1328
+ } catch (error) {
1329
+ captureException(error);
1330
+ }
1331
+ }
1332
+ onMounted(async () => {
1333
+ if (props.packageName) {
1334
+ await getBugsUrl(props.packageName);
1335
+ }
1336
+ });
1337
+ return (_ctx, _cache) => {
1338
+ return openBlock(), createElementBlock("div", {
1339
+ class: normalizeClass(_ctx.$style.container)
1340
+ }, [
1341
+ props.showManage ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1342
+ createVNode(unref(N8nLink), {
1343
+ theme: "text",
1344
+ onClick: openSettingsPage
1345
+ }, {
1346
+ default: withCtx(() => [
1347
+ createVNode(unref(N8nText), {
1348
+ size: "small",
1349
+ color: "primary",
1350
+ bold: ""
1351
+ }, {
1352
+ default: withCtx(() => _cache[0] || (_cache[0] = [
1353
+ createTextVNode(" Manage ")
1354
+ ])),
1355
+ _: 1
1356
+ })
1357
+ ]),
1358
+ _: 1
1359
+ }),
1360
+ createVNode(unref(N8nText), {
1361
+ size: "small",
1362
+ color: "primary",
1363
+ bold: ""
1364
+ }, {
1365
+ default: withCtx(() => _cache[1] || (_cache[1] = [
1366
+ createTextVNode("|")
1367
+ ])),
1368
+ _: 1
1369
+ })
1370
+ ], 64)) : createCommentVNode("", true),
1371
+ createVNode(unref(N8nLink), {
1372
+ theme: "text",
1373
+ onClick: openIssuesPage
1374
+ }, {
1375
+ default: withCtx(() => [
1376
+ createVNode(unref(N8nText), {
1377
+ size: "small",
1378
+ color: "primary",
1379
+ bold: ""
1380
+ }, {
1381
+ default: withCtx(() => _cache[2] || (_cache[2] = [
1382
+ createTextVNode(" Report issue ")
1383
+ ])),
1384
+ _: 1
1385
+ })
1386
+ ]),
1387
+ _: 1
1388
+ })
1389
+ ], 2);
1390
+ };
1391
+ }
1392
+ });
1393
+ const container$3 = "_container_18adw_123";
1394
+ const style0$7 = {
1395
+ container: container$3
1396
+ };
1397
+ const cssModules$7 = {
1398
+ "$style": style0$7
1399
+ };
1400
+ const CommunityNodeFooter = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$7]]);
1401
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1221
1402
  __name: "ActionsMode",
1222
1403
  emits: ["nodeTypeSelected"],
1223
1404
  setup(__props, { emit: __emit }) {
1224
1405
  const emit = __emit;
1225
1406
  const telemetry = useTelemetry();
1226
1407
  const i18n2 = useI18n();
1227
- const { userActivated } = useUsersStore();
1408
+ const { userActivated, isInstanceOwner } = useUsersStore();
1228
1409
  const { popViewStack, updateCurrentViewStack } = useViewStacks();
1229
1410
  const { registerKeyHook } = useKeyboardNavigation();
1230
1411
  const {
@@ -1266,6 +1447,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1266
1447
  const search = computed(() => useViewStacks().activeViewStack.search);
1267
1448
  const subcategory = computed(() => useViewStacks().activeViewStack.subcategory);
1268
1449
  const rootView = computed(() => useViewStacks().activeViewStack.rootView);
1450
+ const communityNodeDetails = computed(() => useViewStacks().activeViewStack?.communityNodeDetails);
1269
1451
  const placeholderTriggerActions = getPlaceholderTriggerActions(subcategory.value || "");
1270
1452
  const hasNoTriggerActions = computed(
1271
1453
  () => parseCategoryActions(
@@ -1282,6 +1464,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1282
1464
  return result;
1283
1465
  });
1284
1466
  const isTriggerRootView = computed(() => rootView.value === TRIGGER_NODE_CREATOR_VIEW);
1467
+ const shouldShowTriggers = computed(() => {
1468
+ if (communityNodeDetails.value && !parsedTriggerActions.value.length) {
1469
+ return !isNodePreviewKey(useViewStacks().activeViewStack?.items?.[0].key) && isTriggerRootView.value;
1470
+ }
1471
+ return isTriggerRootView.value || parsedTriggerActionsBaseline.value.length !== 0;
1472
+ });
1285
1473
  registerKeyHook("ActionsKeyRight", {
1286
1474
  keyboardKeys: ["ArrowRight", "Enter"],
1287
1475
  condition: (type) => type === "action",
@@ -1314,6 +1502,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1314
1502
  if (actionNode) emit("nodeTypeSelected", [actionData.key, actionNode]);
1315
1503
  } else if (actionData?.key === OPEN_AI_NODE_TYPE && actionData?.value?.resource === "assistant" && actionData?.value?.operation === "message") {
1316
1504
  emit("nodeTypeSelected", [OPEN_AI_NODE_MESSAGE_ASSISTANT_TYPE]);
1505
+ } else if (isNodePreviewKey(actionData?.key)) {
1506
+ return;
1317
1507
  } else {
1318
1508
  emit("nodeTypeSelected", [actionData.key]);
1319
1509
  }
@@ -1364,13 +1554,17 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1364
1554
  const _component_n8n_info_tip = resolveComponent("n8n-info-tip");
1365
1555
  const _directive_n8n_html = resolveDirective("n8n-html");
1366
1556
  return openBlock(), createElementBlock("div", {
1367
- class: normalizeClass(_ctx.$style.container)
1557
+ class: normalizeClass({
1558
+ [_ctx.$style.container]: true,
1559
+ [_ctx.$style.containerPaddingBottom]: !communityNodeDetails.value
1560
+ })
1368
1561
  }, [
1369
- rootView.value ? (openBlock(), createBlock(_sfc_main$6, {
1370
- key: 0,
1562
+ communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeInfo, { key: 0 })) : createCommentVNode("", true),
1563
+ rootView.value ? (openBlock(), createBlock(_sfc_main$a, {
1564
+ key: 1,
1371
1565
  "root-view": rootView.value
1372
1566
  }, createSlots({ _: 2 }, [
1373
- isTriggerRootView.value || parsedTriggerActionsBaseline.value.length !== 0 ? {
1567
+ shouldShowTriggers.value ? {
1374
1568
  name: "triggers",
1375
1569
  fn: withCtx(() => [
1376
1570
  withMemo([search.value], () => createVNode(CategorizedItemsRenderer, {
@@ -1484,8 +1678,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1484
1678
  key: "1"
1485
1679
  } : void 0
1486
1680
  ]), 1032, ["root-view"])) : createCommentVNode("", true),
1487
- containsAPIAction.value ? (openBlock(), createElementBlock("div", {
1488
- key: 1,
1681
+ containsAPIAction.value && !communityNodeDetails.value ? (openBlock(), createElementBlock("div", {
1682
+ key: 2,
1489
1683
  class: normalizeClass(_ctx.$style.apiHint)
1490
1684
  }, [
1491
1685
  withDirectives(createBaseVNode("span", {
@@ -1498,26 +1692,36 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1498
1692
  })
1499
1693
  ]
1500
1694
  ])
1501
- ], 2)) : createCommentVNode("", true)
1695
+ ], 2)) : createCommentVNode("", true),
1696
+ communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeFooter, {
1697
+ key: 3,
1698
+ class: normalizeClass(_ctx.$style.communityNodeFooter),
1699
+ "package-name": communityNodeDetails.value.packageName,
1700
+ "show-manage": communityNodeDetails.value.installed && unref(isInstanceOwner)
1701
+ }, null, 8, ["class", "package-name", "show-manage"])) : createCommentVNode("", true)
1502
1702
  ], 2);
1503
1703
  };
1504
1704
  }
1505
1705
  });
1506
- const container = "_container_169mw_123";
1507
- const resetSearch = "_resetSearch_169mw_129";
1508
- const actionsEmpty = "_actionsEmpty_169mw_143";
1509
- const apiHint = "_apiHint_169mw_151";
1510
- const style0$4 = {
1511
- container,
1706
+ const container$2 = "_container_ikzr4_123";
1707
+ const containerPaddingBottom = "_containerPaddingBottom_ikzr4_129";
1708
+ const communityNodeFooter = "_communityNodeFooter_ikzr4_133";
1709
+ const resetSearch = "_resetSearch_ikzr4_137";
1710
+ const actionsEmpty = "_actionsEmpty_ikzr4_151";
1711
+ const apiHint = "_apiHint_ikzr4_159";
1712
+ const style0$6 = {
1713
+ container: container$2,
1714
+ containerPaddingBottom,
1715
+ communityNodeFooter,
1512
1716
  resetSearch,
1513
1717
  actionsEmpty,
1514
1718
  apiHint
1515
1719
  };
1516
- const cssModules$4 = {
1517
- "$style": style0$4
1720
+ const cssModules$6 = {
1721
+ "$style": style0$6
1518
1722
  };
1519
- const ActionsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$4]]);
1520
- const _sfc_main$4 = {};
1723
+ const ActionsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$6]]);
1724
+ const _sfc_main$6 = {};
1521
1725
  const _hoisted_1$2 = {
1522
1726
  width: "75px",
1523
1727
  height: "75px",
@@ -1531,10 +1735,10 @@ function _sfc_render(_ctx, _cache) {
1531
1735
  createStaticVNode('<title>no-nodes-keyart</title><g id="Nodes-panel-prototype-V2.1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="nodes-panel-(component)" transform="translate(-2085.000000, -352.000000)"><g id="nodes_panel" transform="translate(1880.000000, 151.000000)"><g id="Panel" transform="translate(50.000000, 0.000000)"><g id="Group-3" transform="translate(105.000000, 171.000000)"><g id="no-nodes-keyart" transform="translate(50.000000, 30.000000)"><rect id="Rectangle" x="0" y="0" width="75" height="75"></rect><g id="Group" transform="translate(6.562500, 8.164062)" fill="#C4C8D1" fill-rule="nonzero"><polygon id="Rectangle" transform="translate(49.192016, 45.302553) rotate(-45.000000) translate(-49.192016, -45.302553) " points="44.5045606 32.0526802 53.8794707 32.0526802 53.8794707 58.5524261 44.5045606 58.5524261"></polygon><path id="Path" d="M48.125,23.0859375 C54.15625,23.0859375 59.0625,18.1796875 59.0625,12.1484375 C59.0625,10.3359375 58.5625,8.6484375 57.78125,7.1484375 L49.34375,15.5859375 L44.6875,10.9296875 L53.125,2.4921875 C51.625,1.7109375 49.9375,1.2109375 48.125,1.2109375 C42.09375,1.2109375 37.1875,6.1171875 37.1875,12.1484375 C37.1875,13.4296875 37.4375,14.6484375 37.84375,15.7734375 L32.0625,21.5546875 L26.5,15.9921875 L28.71875,13.7734375 L24.3125,9.3671875 L30.9375,2.7421875 C27.28125,-0.9140625 21.34375,-0.9140625 17.6875,2.7421875 L6.625,13.8046875 L11.03125,18.2109375 L2.21875,18.2109375 L1.38777878e-15,20.4296875 L11.0625,31.4921875 L13.28125,29.2734375 L13.28125,20.4296875 L17.6875,24.8359375 L19.90625,22.6171875 L25.46875,28.1796875 L2.3125,51.3359375 L8.9375,57.9609375 L44.5,22.4296875 C45.625,22.8359375 46.84375,23.0859375 48.125,23.0859375 Z"></path></g></g></g></g></g></g></g>', 2)
1532
1736
  ]));
1533
1737
  }
1534
- const NoResultsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render]]);
1738
+ const NoResultsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]);
1535
1739
  const _hoisted_1$1 = ["textContent"];
1536
1740
  const _hoisted_2$1 = ["textContent"];
1537
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1741
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1538
1742
  __name: "NoResults",
1539
1743
  props: {
1540
1744
  showIcon: { type: Boolean },
@@ -1618,37 +1822,48 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1618
1822
  }
1619
1823
  });
1620
1824
  const noResults = "_noResults_17xen_123";
1621
- const title$1 = "_title_17xen_136";
1825
+ const title$2 = "_title_17xen_136";
1622
1826
  const action = "_action_17xen_145";
1623
1827
  const request = "_request_17xen_146";
1624
1828
  const icon = "_icon_17xen_162";
1625
1829
  const external = "_external_17xen_168";
1626
- const style0$3 = {
1830
+ const style0$5 = {
1627
1831
  noResults,
1628
- title: title$1,
1832
+ title: title$2,
1629
1833
  action,
1630
1834
  request,
1631
1835
  icon,
1632
1836
  external
1633
1837
  };
1634
- const cssModules$3 = {
1635
- "$style": style0$3
1838
+ const cssModules$5 = {
1839
+ "$style": style0$5
1636
1840
  };
1637
- const NoResults = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$3]]);
1638
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1841
+ const NoResults = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$5]]);
1842
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1639
1843
  __name: "NodesMode",
1640
1844
  emits: ["nodeTypeSelected"],
1641
1845
  setup(__props, { emit: __emit }) {
1642
1846
  const emit = __emit;
1643
1847
  const i18n2 = useI18n();
1644
1848
  const { mergedNodes, actions, onSubcategorySelected } = useNodeCreatorStore();
1645
- const { pushViewStack, popViewStack } = useViewStacks();
1849
+ const { pushViewStack, popViewStack, isAiSubcategoryView } = useViewStacks();
1646
1850
  const { setAddedNodeActionParameters } = useActions();
1647
1851
  const { registerKeyHook } = useKeyboardNavigation();
1648
1852
  const activeViewStack = computed(() => useViewStacks().activeViewStack);
1649
1853
  const globalSearchItemsDiff = computed(() => useViewStacks().globalSearchItemsDiff);
1650
- function getFilteredActions(node) {
1651
- const nodeActions = actions?.[node.key] || [];
1854
+ const communityNodesAndActions = computed(() => useNodeTypesStore().communityNodesAndActions);
1855
+ const moreFromCommunity = computed(() => {
1856
+ return filterAndSearchNodes(
1857
+ communityNodesAndActions.value.mergedNodes,
1858
+ activeViewStack.value.search ?? "",
1859
+ isAiSubcategoryView(activeViewStack.value)
1860
+ );
1861
+ });
1862
+ const isSearchResultEmpty = computed(() => {
1863
+ return (activeViewStack.value.items || []).length === 0 && globalSearchItemsDiff.value.length + moreFromCommunity.value.length === 0;
1864
+ });
1865
+ function getFilteredActions(node, actions2) {
1866
+ const nodeActions = actions2?.[node.key] || [];
1652
1867
  if (activeViewStack.value.subcategory === HITL_SUBCATEGORY) {
1653
1868
  return getHumanInTheLoopActions(nodeActions);
1654
1869
  }
@@ -1689,7 +1904,20 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1689
1904
  });
1690
1905
  }
1691
1906
  if (item.type === "node") {
1692
- const nodeActions = getFilteredActions(item);
1907
+ let nodeActions = getFilteredActions(item, actions);
1908
+ if (isCommunityPackageName(item.key) && !activeViewStack.value.communityNodeDetails) {
1909
+ if (!nodeActions.length) {
1910
+ nodeActions = getFilteredActions(item, communityNodesAndActions.value.actions);
1911
+ }
1912
+ const viewStack = prepareCommunityNodeDetailsViewStack(
1913
+ item,
1914
+ getNodeIconSource(item.properties),
1915
+ activeViewStack.value.rootView,
1916
+ nodeActions
1917
+ );
1918
+ pushViewStack(viewStack);
1919
+ return;
1920
+ }
1693
1921
  if (nodeActions.length === 1) {
1694
1922
  selectNodeType([item.key]);
1695
1923
  setAddedNodeActionParameters({
@@ -1749,7 +1977,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1749
1977
  function subcategoriesMapper(item) {
1750
1978
  if (item.type !== "node") return item;
1751
1979
  const hasTriggerGroup = item.properties.group.includes("trigger");
1752
- const nodeActions = getFilteredActions(item);
1980
+ const nodeActions = getFilteredActions(item, actions);
1753
1981
  const hasActions = nodeActions.length > 0;
1754
1982
  if (hasTriggerGroup && hasActions) {
1755
1983
  if (item.properties?.codex) {
@@ -1766,7 +1994,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1766
1994
  if (item.type === "section") return true;
1767
1995
  if (item.type !== "node") return false;
1768
1996
  const hasTriggerGroup = item.properties.group.includes("trigger");
1769
- const nodeActions = getFilteredActions(item);
1997
+ const nodeActions = getFilteredActions(item, actions);
1770
1998
  const hasActions = nodeActions.length > 0;
1771
1999
  const isTriggerRootView = activeViewStack.value.rootView === TRIGGER_NODE_CREATOR_VIEW;
1772
2000
  if (isTriggerRootView) {
@@ -1780,7 +2008,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1780
2008
  function onKeySelect(activeItemId) {
1781
2009
  const mergedItems = flattenCreateElements([
1782
2010
  ...activeViewStack.value.items ?? [],
1783
- ...globalSearchItemsDiff.value ?? []
2011
+ ...globalSearchItemsDiff.value ?? [],
2012
+ ...moreFromCommunity.value ?? []
1784
2013
  ]);
1785
2014
  const item = mergedItems.find((i) => i.uuid === activeItemId);
1786
2015
  if (!item) return;
@@ -1803,7 +2032,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1803
2032
  class: normalizeClass(_ctx.$style.items),
1804
2033
  onSelected
1805
2034
  }, createSlots({ _: 2 }, [
1806
- (activeViewStack.value.items || []).length === 0 && globalSearchItemsDiff.value.length === 0 ? {
2035
+ isSearchResultEmpty.value ? {
1807
2036
  name: "empty",
1808
2037
  fn: withCtx(() => [
1809
2038
  createVNode(NoResults, {
@@ -1821,20 +2050,209 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1821
2050
  key: 0,
1822
2051
  elements: globalSearchItemsDiff.value,
1823
2052
  category: unref(i18n2).baseText("nodeCreator.categoryNames.otherCategories"),
1824
- onSelected
2053
+ onSelected,
2054
+ expanded: true
2055
+ }, null, 8, ["elements", "category"])) : createCommentVNode("", true),
2056
+ moreFromCommunity.value.length > 0 ? (openBlock(), createBlock(CategorizedItemsRenderer, {
2057
+ key: 1,
2058
+ elements: moreFromCommunity.value,
2059
+ category: unref(i18n2).baseText("nodeCreator.categoryNames.moreFromCommunity"),
2060
+ onSelected,
2061
+ expanded: true
1825
2062
  }, null, 8, ["elements", "category"])) : createCommentVNode("", true)
1826
2063
  ]);
1827
2064
  };
1828
2065
  }
1829
2066
  });
1830
2067
  const items = "_items_1i9xd_123";
1831
- const style0$2 = {
2068
+ const style0$4 = {
1832
2069
  items
1833
2070
  };
2071
+ const cssModules$4 = {
2072
+ "$style": style0$4
2073
+ };
2074
+ const NodesRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$4]]);
2075
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2076
+ __name: "CommunityNodeDetails",
2077
+ setup(__props) {
2078
+ const { activeViewStack, pushViewStack, popViewStack, getAllNodeCreateElements } = useViewStacks();
2079
+ const { communityNodeDetails } = activeViewStack;
2080
+ const loading = ref(false);
2081
+ const communityNodesStore = useCommunityNodesStore();
2082
+ const nodeCreatorStore = useNodeCreatorStore();
2083
+ const toast = useToast();
2084
+ const isOwner = computed(() => useUsersStore().isInstanceOwner);
2085
+ const updateViewStack = (key) => {
2086
+ const installedNodeKey = removePreviewToken(key);
2087
+ const installedNode = getAllNodeCreateElements().find((node) => node.key === installedNodeKey);
2088
+ if (installedNode) {
2089
+ const nodeActions = nodeCreatorStore.actions?.[installedNode.key] || [];
2090
+ popViewStack();
2091
+ const viewStack = prepareCommunityNodeDetailsViewStack(
2092
+ installedNode,
2093
+ getNodeIconSource(installedNode.properties),
2094
+ activeViewStack.rootView,
2095
+ nodeActions
2096
+ );
2097
+ pushViewStack(viewStack, {
2098
+ transitionDirection: "none"
2099
+ });
2100
+ } else {
2101
+ const viewStack = { ...activeViewStack };
2102
+ viewStack.communityNodeDetails.installed = true;
2103
+ pushViewStack(activeViewStack, { resetStacks: true });
2104
+ }
2105
+ };
2106
+ const updateStoresAndViewStack = async (key) => {
2107
+ await useNodeTypesStore().getNodeTypes();
2108
+ await useCredentialsStore().fetchCredentialTypes(true);
2109
+ updateViewStack(key);
2110
+ nodeCreatorStore.removeNodeFromMergedNodes(key);
2111
+ };
2112
+ const getNpmVersion = async (key) => {
2113
+ const communityNodeAttributes = await useNodeTypesStore().getCommunityNodeAttributes(key);
2114
+ if (communityNodeAttributes) {
2115
+ return communityNodeAttributes.npmVersion;
2116
+ }
2117
+ return void 0;
2118
+ };
2119
+ const onInstall = async () => {
2120
+ if (isOwner.value && activeViewStack.communityNodeDetails && !communityNodeDetails?.installed) {
2121
+ const { key, packageName } = activeViewStack.communityNodeDetails;
2122
+ try {
2123
+ loading.value = true;
2124
+ await communityNodesStore.installPackage(packageName, true, await getNpmVersion(key));
2125
+ await updateStoresAndViewStack(key);
2126
+ toast.showMessage({
2127
+ title: i18n.baseText("settings.communityNodes.messages.install.success"),
2128
+ type: "success"
2129
+ });
2130
+ } catch (error) {
2131
+ toast.showError(error, i18n.baseText("settings.communityNodes.messages.install.error"));
2132
+ } finally {
2133
+ loading.value = false;
2134
+ }
2135
+ }
2136
+ };
2137
+ return (_ctx, _cache) => {
2138
+ const _component_NodeIcon = _sfc_main$n;
2139
+ const _component_FontAwesomeIcon = resolveComponent("FontAwesomeIcon");
2140
+ const _component_N8nButton = resolveComponent("N8nButton");
2141
+ return openBlock(), createElementBlock("div", {
2142
+ class: normalizeClass(_ctx.$style.container)
2143
+ }, [
2144
+ createBaseVNode("div", {
2145
+ class: normalizeClass(_ctx.$style.header)
2146
+ }, [
2147
+ createBaseVNode("div", {
2148
+ class: normalizeClass(_ctx.$style.title)
2149
+ }, [
2150
+ unref(communityNodeDetails)?.nodeIcon ? (openBlock(), createBlock(_component_NodeIcon, {
2151
+ key: 0,
2152
+ class: normalizeClass(_ctx.$style.nodeIcon),
2153
+ "icon-source": unref(communityNodeDetails).nodeIcon,
2154
+ circle: false,
2155
+ "show-tooltip": false
2156
+ }, null, 8, ["class", "icon-source"])) : createCommentVNode("", true),
2157
+ createBaseVNode("span", null, toDisplayString(unref(communityNodeDetails)?.title), 1)
2158
+ ], 2),
2159
+ createBaseVNode("div", null, [
2160
+ unref(communityNodeDetails)?.installed ? (openBlock(), createElementBlock("div", {
2161
+ key: 0,
2162
+ class: normalizeClass(_ctx.$style.installed)
2163
+ }, [
2164
+ createVNode(_component_FontAwesomeIcon, {
2165
+ class: normalizeClass(_ctx.$style.installedIcon),
2166
+ icon: "cube"
2167
+ }, null, 8, ["class"]),
2168
+ createVNode(unref(N8nText), {
2169
+ color: "text-light",
2170
+ size: "small",
2171
+ bold: ""
2172
+ }, {
2173
+ default: withCtx(() => [
2174
+ createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeDetails.installed")), 1)
2175
+ ]),
2176
+ _: 1
2177
+ })
2178
+ ], 2)) : isOwner.value ? (openBlock(), createBlock(_component_N8nButton, {
2179
+ key: 1,
2180
+ loading: loading.value,
2181
+ disabled: loading.value,
2182
+ label: "Install Node",
2183
+ size: "small",
2184
+ onClick: onInstall,
2185
+ "data-test-id": "install-community-node-button"
2186
+ }, null, 8, ["loading", "disabled"])) : createCommentVNode("", true)
2187
+ ])
2188
+ ], 2)
2189
+ ], 2);
2190
+ };
2191
+ }
2192
+ });
2193
+ const container$1 = "_container_1eqm0_123";
2194
+ const header$1 = "_header_1eqm0_131";
2195
+ const title$1 = "_title_1eqm0_137";
2196
+ const nodeIcon$1 = "_nodeIcon_1eqm0_145";
2197
+ const installedIcon = "_installedIcon_1eqm0_150";
2198
+ const installed = "_installed_1eqm0_150";
2199
+ const style0$3 = {
2200
+ container: container$1,
2201
+ header: header$1,
2202
+ title: title$1,
2203
+ nodeIcon: nodeIcon$1,
2204
+ installedIcon,
2205
+ installed
2206
+ };
2207
+ const cssModules$3 = {
2208
+ "$style": style0$3
2209
+ };
2210
+ const CommunityNodeDetails = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$3]]);
2211
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2212
+ __name: "CommunityNodeDocsLink",
2213
+ props: {
2214
+ packageName: {}
2215
+ },
2216
+ setup(__props) {
2217
+ const props = __props;
2218
+ const openCommunityNodeDocsPage = () => {
2219
+ const newTab = window.open(`https://www.npmjs.com/package/${props.packageName}`, "_blank");
2220
+ if (newTab) newTab.opener = null;
2221
+ };
2222
+ return (_ctx, _cache) => {
2223
+ const _component_FontAwesomeIcon = resolveComponent("FontAwesomeIcon");
2224
+ return openBlock(), createBlock(unref(N8nLink), {
2225
+ theme: "text",
2226
+ onClick: openCommunityNodeDocsPage,
2227
+ class: normalizeClass(_ctx.$style.container),
2228
+ title: unref(i18n).baseText("communityNodesDocsLink.link.title")
2229
+ }, {
2230
+ default: withCtx(() => [
2231
+ createVNode(unref(N8nText), {
2232
+ size: "small",
2233
+ bold: "",
2234
+ style: { "margin-right": "5px" }
2235
+ }, {
2236
+ default: withCtx(() => [
2237
+ createTextVNode(toDisplayString(unref(i18n).baseText("communityNodesDocsLink.title")), 1)
2238
+ ]),
2239
+ _: 1
2240
+ }),
2241
+ createVNode(_component_FontAwesomeIcon, { icon: "external-link-alt" })
2242
+ ]),
2243
+ _: 1
2244
+ }, 8, ["class", "title"]);
2245
+ };
2246
+ }
2247
+ });
2248
+ const container = "_container_x2no6_123";
2249
+ const style0$2 = {
2250
+ container
2251
+ };
1834
2252
  const cssModules$2 = {
1835
2253
  "$style": style0$2
1836
2254
  };
1837
- const NodesRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
2255
+ const CommunityNodeDocsLink = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
1838
2256
  const _hoisted_1 = ["textContent"];
1839
2257
  const _hoisted_2 = ["textContent"];
1840
2258
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -1846,15 +2264,31 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1846
2264
  const { pushViewStack, popViewStack, updateCurrentViewStack } = useViewStacks();
1847
2265
  const { setActiveItemIndex, attachKeydownEvent, detachKeydownEvent } = useKeyboardNavigation();
1848
2266
  const nodeCreatorStore = useNodeCreatorStore();
2267
+ const { isInstanceOwner } = useUsersStore();
1849
2268
  const activeViewStack = computed(() => useViewStacks().activeViewStack);
2269
+ const communityNodeDetails = computed(() => activeViewStack.value.communityNodeDetails);
1850
2270
  const viewStacks = computed(() => useViewStacks().viewStacks);
1851
2271
  const isActionsMode = computed(() => useViewStacks().activeViewStackMode === "actions");
1852
- const searchPlaceholder = computed(
1853
- () => isActionsMode.value ? i18n2.baseText("nodeCreator.actionsCategory.searchActions", {
1854
- interpolate: { node: activeViewStack.value.title }
1855
- }) : i18n2.baseText("nodeCreator.searchBar.searchNodes")
1856
- );
2272
+ const searchPlaceholder = computed(() => {
2273
+ let node = activeViewStack.value?.title;
2274
+ if (communityNodeDetails.value) {
2275
+ node = communityNodeDetails.value.title;
2276
+ }
2277
+ if (isActionsMode.value) {
2278
+ return i18n2.baseText("nodeCreator.actionsCategory.searchActions", {
2279
+ interpolate: { node }
2280
+ });
2281
+ }
2282
+ return i18n2.baseText("nodeCreator.searchBar.searchNodes");
2283
+ });
2284
+ const showSearchBar = computed(() => {
2285
+ if (activeViewStack.value.communityNodeDetails) return false;
2286
+ return activeViewStack.value.hasSearch;
2287
+ });
1857
2288
  const nodeCreatorView = computed(() => useNodeCreatorStore().selectedView);
2289
+ const isCommunityNodeActionsMode = computed(() => {
2290
+ return communityNodeDetails.value && isActionsMode.value && activeViewStack.value.subcategory;
2291
+ });
1858
2292
  function getDefaultActiveIndex(search = "") {
1859
2293
  if (activeViewStack.value.mode === "actions") {
1860
2294
  return 1;
@@ -1963,7 +2397,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1963
2397
  size: "2x"
1964
2398
  }, null, 8, ["class"])
1965
2399
  ], 2)) : createCommentVNode("", true),
1966
- activeViewStack.value.nodeIcon ? (openBlock(), createBlock(_sfc_main$h, {
2400
+ activeViewStack.value.nodeIcon ? (openBlock(), createBlock(_sfc_main$n, {
1967
2401
  key: 1,
1968
2402
  class: normalizeClass(_ctx.$style.nodeIcon),
1969
2403
  "icon-source": activeViewStack.value.nodeIcon,
@@ -1975,7 +2409,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1975
2409
  key: 2,
1976
2410
  class: normalizeClass(_ctx.$style.title),
1977
2411
  textContent: toDisplayString(activeViewStack.value.title)
1978
- }, null, 10, _hoisted_1)) : createCommentVNode("", true)
2412
+ }, null, 10, _hoisted_1)) : createCommentVNode("", true),
2413
+ communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeDocsLink, {
2414
+ key: 3,
2415
+ "package-name": communityNodeDetails.value.packageName
2416
+ }, null, 8, ["package-name"])) : createCommentVNode("", true)
1979
2417
  ], 2),
1980
2418
  activeViewStack.value.subtitle ? (openBlock(), createElementBlock("p", {
1981
2419
  key: 0,
@@ -1983,13 +2421,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1983
2421
  textContent: toDisplayString(activeViewStack.value.subtitle)
1984
2422
  }, null, 10, _hoisted_2)) : createCommentVNode("", true)
1985
2423
  ], 2),
1986
- activeViewStack.value.hasSearch ? (openBlock(), createBlock(SearchBar, {
2424
+ showSearchBar.value ? (openBlock(), createBlock(SearchBar, {
1987
2425
  key: 0,
1988
2426
  class: normalizeClass(_ctx.$style.searchBar),
1989
2427
  placeholder: searchPlaceholder.value ? searchPlaceholder.value : unref(i18n2).baseText("nodeCreator.searchBar.searchNodes"),
1990
2428
  "model-value": activeViewStack.value.search,
1991
2429
  "onUpdate:modelValue": onSearch
1992
2430
  }, null, 8, ["class", "placeholder", "model-value"])) : createCommentVNode("", true),
2431
+ communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeDetails, { key: 1 })) : createCommentVNode("", true),
2432
+ communityNodeDetails.value && !isActionsMode.value ? (openBlock(), createBlock(CommunityNodeInfo, { key: 2 })) : createCommentVNode("", true),
1993
2433
  createBaseVNode("div", {
1994
2434
  class: normalizeClass(_ctx.$style.renderedItems)
1995
2435
  }, [
@@ -2003,7 +2443,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2003
2443
  key: 2,
2004
2444
  "root-view": nodeCreatorView.value
2005
2445
  }, _ctx.$attrs), null, 16, ["root-view"]))
2006
- ], 2)
2446
+ ], 2),
2447
+ communityNodeDetails.value && !isCommunityNodeActionsMode.value ? (openBlock(), createBlock(CommunityNodeFooter, {
2448
+ key: 3,
2449
+ "package-name": communityNodeDetails.value.packageName,
2450
+ "show-manage": communityNodeDetails.value.installed && unref(isInstanceOwner)
2451
+ }, null, 8, ["package-name", "show-manage"])) : createCommentVNode("", true)
2007
2452
  ], 34))
2008
2453
  ]),
2009
2454
  _: 1
@@ -2165,7 +2610,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2165
2610
  [_ctx.$style.active]: showScrim.value
2166
2611
  })
2167
2612
  }, null, 2),
2168
- _ctx.active ? (openBlock(), createBlock(_sfc_main$i, {
2613
+ _ctx.active ? (openBlock(), createBlock(_sfc_main$o, {
2169
2614
  key: 0,
2170
2615
  class: normalizeClass(_ctx.$style.close),
2171
2616
  type: "secondary",