n8n-editor-ui 1.92.0 → 1.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AnimatedSpinner-CtKKeDrz.js → AnimatedSpinner-CY5xYI5m.js} +1 -1
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DR6h_xsK.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-BOrzkwPH.js} +1 -1
- package/dist/assets/{AuthView-mKkzBRxh.js → AuthView-BTzGYAnY.js} +2 -2
- package/dist/assets/{CanvasChatSwitch-Bu2VD2kp.js → CanvasChatSwitch-CwpjFCL0.js} +17 -18
- package/dist/assets/{ChangePasswordView-D5UI1v-J.js → ChangePasswordView-BKR2UFVI.js} +3 -3
- package/dist/assets/CollectionParameter-BJtiV9En.js +4 -0
- package/dist/assets/{CredentialsView-B78eNJO5.js → CredentialsView-DVgxfnNi.js} +26 -11
- package/dist/assets/{DemoFooter-DP26HpCu.js → DemoFooter-C1T3Q0NX.js} +7 -8
- package/dist/assets/{ErrorView-C3fvEdCg.js → ErrorView-Cf2Yb8Ea.js} +1 -1
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-BBpwYdHY.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-DUu0UMcW.js} +2 -2
- package/dist/assets/{ExecutionsView-BvlDZwIs.js → ExecutionsView-DjNkfnDh.js} +20 -18
- package/dist/assets/{FileSaver.min-BzAtcQXX.js → FileSaver.min-C1p9Eies.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-CS5zXMAh.js → FixedCollectionParameter-DN_uJhpe.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView-CVQ7pcIG.js → ForgotMyPasswordView-BMQBDIrq.js} +3 -3
- package/dist/assets/{InsightsChartAverageRuntime-Boh0SMb3.js → InsightsChartAverageRuntime-JzBkV6Rc.js} +4 -4
- package/dist/assets/{InsightsChartFailed-IZ-KYOU9.js → InsightsChartFailed-DMD3c7zM.js} +4 -4
- package/dist/assets/{InsightsChartFailureRate-2fWw3p0L.js → InsightsChartFailureRate-D_qeZo4f.js} +4 -4
- package/dist/assets/{InsightsChartTimeSaved-B2pLVys1.js → InsightsChartTimeSaved-Cw2T-Wvp.js} +4 -4
- package/dist/assets/{InsightsChartTotal-2QD4wPLR.js → InsightsChartTotal-DlF47gob.js} +4 -4
- package/dist/assets/{InsightsDashboard-Bx4vx9gz.css → InsightsDashboard-BSrakbzr.css} +42 -8
- package/dist/assets/{InsightsDashboard-CbiFbJ8w.js → InsightsDashboard-CxQ9H296.js} +40 -41
- package/dist/assets/{InsightsPaywall-5d-cSdiS.js → InsightsPaywall-hRkAfeHz.js} +1 -1
- package/dist/assets/InsightsSummary-BcXd-3nU.js +209 -0
- package/dist/assets/{InsightsSummary-CdlaUpAt.css → InsightsSummary-DzGQpM5h.css} +27 -24
- package/dist/assets/{InsightsTableWorkflows-Blv_GPUj.css → InsightsTableWorkflows-DfTZQkWL.css} +3 -4
- package/dist/assets/{InsightsTableWorkflows-_eTCUNCX.js → InsightsTableWorkflows-ybloXdDn.js} +5 -6
- package/dist/assets/{Logo-Dl2xVRIu.js → Logo-BGe7-2Vd.js} +1 -1
- package/dist/assets/{LogsPanel-JnYirDqa.js → LogsPanel-DtTp6kY0.js} +334 -338
- package/dist/assets/{MainHeader-CEPLiR-5.css → MainHeader-Y95RcfHb.css} +24 -17
- package/dist/assets/{MainHeader-Bk29pgmL.js → MainHeader-h2DV-VuD.js} +148 -82
- package/dist/assets/{MainSidebar-BM5ku_wM.js → MainSidebar-AAHHRXFA.js} +28 -11
- package/dist/assets/{MainSidebar-zZpP3qQ0.css → MainSidebar-D1_1YFQZ.css} +2 -2
- package/dist/assets/{NodeCreation-BEjdAYc_.js → NodeCreation-nHiG-Lhi.js} +9 -5
- package/dist/assets/{NodeCreator-D9fmPdS2.css → NodeCreator-D18StsVZ.css} +1021 -174
- package/dist/assets/{NodeCreator-cEUgbAI9.js → NodeCreator-weAzsmlU.js} +862 -418
- package/dist/assets/{NodeDetailsView-D4O9dKTA.js → NodeDetailsView-BsXbcyfb.js} +22 -15
- package/dist/assets/{NodeDetailsView-DsFLtbxi.css → NodeDetailsView-DpO8nTmN.css} +16 -16
- package/dist/assets/{NodeView-DDSOUm8E.js → NodeView-BY1O3wWl.js} +104 -50
- package/dist/assets/{ProjectCardBadge-BNn2hiMe.js → ProjectCardBadge-3xpk5Z4e.js} +38 -2
- package/dist/assets/{ProjectHeader-CaEZ2OPj.js → ProjectHeader-CpoOisjf.js} +106 -64
- package/dist/assets/{ProjectSettings-otA8E-yW.js → ProjectSettings-B__3XaPY.js} +14 -3
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-C3JbZMCk.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-DaoPdG_5.js} +1 -1
- package/dist/assets/{ResourcesListLayout-1d9Ic6VX.js → ResourcesListLayout-DAxou314.js} +156 -53
- package/dist/assets/{ResourcesListLayout-CtGME7aU.css → ResourcesListLayout-DuNjbsMn.css} +8 -8
- package/dist/assets/{RunData-BjlZgIyx.css → RunData-CE5FsU6k.css} +2 -2
- package/dist/assets/{RunData-Bx47sNQp.js → RunData-fnd-jejc.js} +257 -99
- package/dist/assets/{RunDataAi-DOac7nwD.js → RunDataAi-Ck3VGKP_.js} +3 -4
- package/dist/assets/{RunDataJson-Pev6yNEV.js → RunDataJson-B80Z4URL.js} +7 -7
- package/dist/assets/{RunDataJsonActions-Co4xgmVq.js → RunDataJsonActions-CdZi1Qul.js} +1 -1
- package/dist/assets/{RunDataParsedAiContent-D6MNLmT3.js → RunDataParsedAiContent-BczxQ63H.js} +5 -5
- package/dist/assets/{RunDataSearch-C8orcAlP.js → RunDataSearch-C4KmCz4c.js} +1 -1
- package/dist/assets/{RunDataTable-oi_l8dhA.js → RunDataTable-CsLCZIWp.js} +3 -3
- package/dist/assets/{SamlOnboarding-CT5J6dx0.js → SamlOnboarding-DkhjCrPa.js} +3 -3
- package/dist/assets/{SettingsApiView-CupjcI9v.js → SettingsApiView-Ci2-rEpm.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-B5K2VLyJ.js → SettingsCommunityNodesView-_UOppuqS.js} +24 -11
- package/dist/assets/{SettingsExternalSecrets-BidJCf_t.js → SettingsExternalSecrets-DHIkKr53.js} +1 -1
- package/dist/assets/{SettingsLdapView-Cva6akhW.js → SettingsLdapView-B8ezgdqP.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-Cy-rAKUO.js → SettingsLogStreamingView-YP6Xy7Fe.js} +1 -1
- package/dist/assets/{SettingsPersonalView-ZJ1Syok2.js → SettingsPersonalView-BmbFyWPb.js} +1 -1
- package/dist/assets/{SettingsSourceControl-CMtqqlkO.js → SettingsSourceControl-DwaOdDke.js} +1 -1
- package/dist/assets/{SettingsSso-Bi3OpykL.js → SettingsSso-DOC-P2wt.js} +14 -1
- package/dist/assets/{SettingsUsageAndPlan-C5TbwZhP.js → SettingsUsageAndPlan-DVOLlEkG.js} +1 -1
- package/dist/assets/{SettingsUsersView-BHuP5k0A.js → SettingsUsersView-CN_KLeIm.js} +1 -1
- package/dist/assets/{SettingsView-DPIIqaKN.js → SettingsView-DiAhLyco.js} +1 -1
- package/dist/assets/{SetupView-C4V9j6sh.js → SetupView-OE_yCNOU.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-BZ9ILQUp.js → SetupWorkflowCredentialsButton-Dx1IkZgW.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-3uV3zSU2.js → SetupWorkflowFromTemplateView-lQXKgIuL.js} +3 -3
- package/dist/assets/{SigninView-DWZHdCjG.js → SigninView-BWSrzbF7.js} +3 -3
- package/dist/assets/{SignoutView-DbduXAir.js → SignoutView-DxGgFxt2.js} +1 -1
- package/dist/assets/{SignupView-DWq6VACk.js → SignupView-Dtu5bMqF.js} +3 -3
- package/dist/assets/{TemplateDetails-BckqE6GK.js → TemplateDetails-CQ7TYqsP.js} +1 -1
- package/dist/assets/{TemplateList-Bw0JeBMP.js → TemplateList-Cxmv-0p-.js} +1 -1
- package/dist/assets/{TemplatesCollectionView-CAKT-mpV.js → TemplatesCollectionView-xvV6FXib.js} +5 -5
- package/dist/assets/{TemplatesSearchView-I2a5us58.js → TemplatesSearchView-CsECyZ52.js} +3 -3
- package/dist/assets/{TemplatesView-6EwGFFJK.js → TemplatesView-DrEKpZTU.js} +1 -1
- package/dist/assets/{TemplatesWorkflowView-C8xYMhwu.js → TemplatesWorkflowView-iSAL_yol.js} +5 -5
- package/dist/assets/{TestDefinitionEditView-CNd3Cuzq.js → TestDefinitionEditView-C3ohfu_r.js} +6 -7
- package/dist/assets/{TestDefinitionListView-BwTWIaAM.js → TestDefinitionListView-Dwto0jxH.js} +1 -1
- package/dist/assets/{TestDefinitionNewView-BQas0_G1.js → TestDefinitionNewView-9xVUm2ZJ.js} +2 -2
- package/dist/assets/{TestDefinitionRootView-D971MFye.js → TestDefinitionRootView-DLurQ4xl.js} +1 -1
- package/dist/assets/{VariablesView-DcBBuFxh.js → VariablesView-Cg2WSt_e.js} +4 -3
- package/dist/assets/{WorkerView-DSgBNIeb.js → WorkerView-BG-Dl0Ej.js} +6 -6
- package/dist/assets/{WorkflowActivator-DAyH7N29.css → WorkflowActivator-DrMTmuTZ.css} +2 -2
- package/dist/assets/{WorkflowActivator-CPCbgb_n.js → WorkflowActivator-e7wvW1kJ.js} +17 -11
- package/dist/assets/{WorkflowExecutionsInfoAccordion-Bc6vzAZu.js → WorkflowExecutionsInfoAccordion-CijtfO0l.js} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-BPPS4V9i.js → WorkflowExecutionsLandingPage-Do4y1yOx.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-Bbb5MB8Z.js → WorkflowExecutionsPreview-Bqo_3PXl.js} +6 -6
- package/dist/assets/{WorkflowExecutionsView-Pz-7iHJY.js → WorkflowExecutionsView-C1gS45nc.js} +10 -10
- package/dist/assets/{WorkflowHistory-Czo9IuI6.js → WorkflowHistory-CypQw7rC.js} +37 -19
- package/dist/assets/{WorkflowOnboardingView-B8DdkfJ5.js → WorkflowOnboardingView-DoKXpaNj.js} +1 -1
- package/dist/assets/{WorkflowPreview-eVlO1itk.js → WorkflowPreview-Bxs5XzBX.js} +1 -1
- package/dist/assets/{WorkflowsView-Cr2D0vym.js → WorkflowsView-BlvgD3xI.js} +299 -157
- package/dist/assets/{WorkflowsView-B2_HJCJ5.css → WorkflowsView-CQvTAWQ0.css} +24 -13
- package/dist/assets/{chartjs.utils-Dk1WO3Mr.js → chartjs.utils-CuWcgqCr.js} +2 -2
- package/dist/assets/{dateFormatter-C8N5khiG.js → dateFormatter-LbucaaRt.js} +1 -1
- package/dist/assets/{easyAiWorkflowUtils-CLqHnasO.js → easyAiWorkflowUtils-_kvYb5hw.js} +1 -1
- package/dist/assets/{global-link-actions-BvoZh8u9.js → global-link-actions-DG0SjhQE.js} +1 -1
- package/dist/assets/{import-curl-BpxkGYMX.js → import-curl-DQ6uPzZ1.js} +1 -1
- package/dist/assets/{index-DCpy4nCU.css → index-BA8d2DN9.css} +311 -515
- package/dist/assets/{index-B6eunbxp.js → index-hdsPF3tl.js} +61611 -57550
- package/dist/assets/{index-Br8T1Gn6.js → index-vIybYvt3.js} +1 -1
- package/dist/assets/{pickBy-8Urz9lDY.js → pickBy-DmKUpB7M.js} +1 -1
- package/dist/assets/{polyfills-CLZ4X0Ad.js → polyfills-J2x06Gdp.js} +157 -224
- package/dist/assets/{templateActions-DzjysjbQ.js → templateActions-DxoxchKp.js} +1 -1
- package/dist/assets/{typescript.worker-BsxN2afA.js → typescript.worker-B1loTpxy.js} +1 -1
- package/dist/assets/{useBeforeUnload-DxrN8vOO.js → useBeforeUnload-B7JAQiE8.js} +1 -1
- package/dist/assets/{useCanvasMapping-cuXLM-h-.css → useCanvasMapping-CFf4cwnq.css} +6 -5
- package/dist/assets/{useCanvasMapping-C2BQB9QB.js → useCanvasMapping-CvcOHj5p.js} +94 -50
- package/dist/assets/{useClearExecutionButtonVisible-BV-jMf2m.js → useClearExecutionButtonVisible-DFNEJves.js} +1 -2
- package/dist/assets/{useExecutionDebugging-0pPCimcw.js → useExecutionDebugging-DsRIfE0y.js} +1 -1
- package/dist/assets/{useExecutionHelpers-DIvhViMz.js → useExecutionHelpers-CEOL8_vt.js} +3 -3
- package/dist/assets/{useImportCurlCommand-BWf4R83s.js → useImportCurlCommand-DdIN4YaF.js} +2 -2
- package/dist/assets/useProjectPages-OGc-GAxb.js +17 -0
- package/dist/assets/{usePushConnection-Pobjq0U9.js → usePushConnection-DNGIaS0A.js} +29 -127
- package/dist/assets/{useTestDefinitionForm-BA3IS_2B.js → useTestDefinitionForm-Bi6EgFVm.js} +1 -1
- package/dist/assets/{useWorkflowActivate-DFqvrpj6.js → useWorkflowActivate-CJ1hLmv2.js} +1 -1
- package/dist/assets/{useWorkflowSaving-BACesUoL.js → useWorkflowSaving-BuokdhTC.js} +2 -2
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/tsconfig.json +1 -0
- package/vite.config.mts +4 -0
- package/dist/assets/CollectionParameter-BeCTpZ-q.js +0 -4
- package/dist/assets/InsightsSummary-gldDQ9rg.js +0 -207
- package/dist/assets/useCanvasOperations-DaP5jKbH.js +0 -3183
|
@@ -1,273 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as
|
|
3
|
-
|
|
4
|
-
|
|
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, bS as reactive, o as onMounted, aP as useExternalHooks, y as onBeforeUnmount, b4 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, bT as useNodeCreatorStore, hI as useViewStacks, e8 as useNodeType, r as ref, q as computed, hJ as DEFAULT_SUBCATEGORY, hK as CREDENTIAL_ONLY_NODE_PREFIX, c as useI18n, hL as HITL_SUBCATEGORY, dN as isCommunityPackageName, hM as isNodePreviewKey, cu as resolveDirective, e as createBlock, aV as createSlots, w as withCtx, aA as withDirectives, aB as vShow, B as normalizeStyle, bD as _sfc_main$n, b3 as withModifiers, m as unref, cW as COMMUNITY_NODES_INSTALLATION_DOCS_URL, cm as DRAG_EVENT_DATA_KEY, ag as useTelemetry, hN as camelCase, b8 as mergeProps, t as toDisplayString, gL as WEBHOOK_NODE_TYPE, hO as getNewNodePosition, eX as NODE_SIZE, u as useUsersStore, bF as N8nIcon, bf as N8nText, l as createTextVNode, bh as N8nButton, x as renderSlot, hP as useKeyboardNavigation, Q as useWorkflowsStore, X as watch, b5 as normalizeProps, b6 as guardReactiveProps, bc as onUnmounted, F as Fragment, D as renderList, hQ as REGULAR_NODE_CREATOR_VIEW, cV as useCommunityNodesStore, bz as useNodeTypesStore, aR as N8nTooltip, dx as i18n, h9 as captureException, b as useRouter, aS as N8nLink, V as VIEWS, fb as CUSTOM_API_CALL_KEY, gU as TRIGGER_NODE_CREATOR_VIEW, gI as OPEN_AI_NODE_TYPE, gH as OPEN_AI_NODE_MESSAGE_ASSISTANT_TYPE, hR as withMemo, hS as HTTP_REQUEST_NODE_TYPE, fV as createStaticVNode, hT as REQUEST_NODE_FORM_URL, hU as filterAndSearchNodes, hV as prepareCommunityNodeDetailsViewStack, fl as getNodeIconSource, gN as transformNodeType, hW as AINodesView, hX as AIView, hY as RegularView, hZ as TriggerView, h_ as flattenCreateElements, fe as SEND_AND_WAIT_OPERATION, h$ as AI_OTHERS_NODE_CREATOR_VIEW, i0 as AI_NODE_CREATOR_VIEW, a as useToast, bU as useCredentialsStore, i1 as removePreviewToken, G as useDebounce, f8 as Transition, i2 as AI_UNCATEGORIZED_CATEGORY, H as useUIStore, dL as useAssistantStore, bY as useBuilderStore, aT as _sfc_main$o, i3 as SlideTransition, i4 as useActionsGenerator } from "./index-hdsPF3tl.js";
|
|
2
|
+
import { u as useActions } from "./NodeCreation-nHiG-Lhi.js";
|
|
3
|
+
const _hoisted_1$8 = ["placeholder", "value"];
|
|
4
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
271
5
|
__name: "SearchBar",
|
|
272
6
|
props: {
|
|
273
7
|
placeholder: { default: "" },
|
|
@@ -328,7 +62,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
328
62
|
"data-test-id": "node-creator-search-bar",
|
|
329
63
|
tabindex: "0",
|
|
330
64
|
onInput
|
|
331
|
-
}, null, 42, _hoisted_1$
|
|
65
|
+
}, null, 42, _hoisted_1$8)
|
|
332
66
|
], 2),
|
|
333
67
|
_ctx.modelValue.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
334
68
|
key: 0,
|
|
@@ -351,7 +85,7 @@ const active$3 = "_active_1knv8_144";
|
|
|
351
85
|
const text = "_text_1knv8_148";
|
|
352
86
|
const suffix = "_suffix_1knv8_164";
|
|
353
87
|
const clear = "_clear_1knv8_170";
|
|
354
|
-
const style0$
|
|
88
|
+
const style0$k = {
|
|
355
89
|
searchContainer,
|
|
356
90
|
prefix,
|
|
357
91
|
active: active$3,
|
|
@@ -359,11 +93,11 @@ const style0$e = {
|
|
|
359
93
|
suffix,
|
|
360
94
|
clear
|
|
361
95
|
};
|
|
362
|
-
const cssModules$
|
|
363
|
-
"$style": style0$
|
|
96
|
+
const cssModules$k = {
|
|
97
|
+
"$style": style0$k
|
|
364
98
|
};
|
|
365
|
-
const SearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
366
|
-
const _sfc_main$
|
|
99
|
+
const SearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__cssModules", cssModules$k]]);
|
|
100
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
367
101
|
__name: "NodeItem",
|
|
368
102
|
props: {
|
|
369
103
|
nodeType: {},
|
|
@@ -383,7 +117,10 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
383
117
|
const dragging = ref(false);
|
|
384
118
|
const draggablePosition = ref({ x: -100, y: -100 });
|
|
385
119
|
const draggableDataTransfer2 = ref(null);
|
|
386
|
-
const
|
|
120
|
+
const description2 = computed(() => {
|
|
121
|
+
if (isCommunityNodePreview.value) {
|
|
122
|
+
return props.nodeType.description;
|
|
123
|
+
}
|
|
387
124
|
if (isSendAndWaitCategory.value) {
|
|
388
125
|
return "";
|
|
389
126
|
}
|
|
@@ -395,7 +132,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
395
132
|
fallback: props.nodeType.description
|
|
396
133
|
});
|
|
397
134
|
});
|
|
398
|
-
const showActionArrow = computed(() =>
|
|
135
|
+
const showActionArrow = computed(() => {
|
|
136
|
+
if (isCommunityNode.value && !activeViewStack.communityNodeDetails) {
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
return hasActions.value && !isSendAndWaitCategory.value;
|
|
140
|
+
});
|
|
399
141
|
const isSendAndWaitCategory = computed(() => activeViewStack.subcategory === HITL_SUBCATEGORY);
|
|
400
142
|
const dataTestId = computed(
|
|
401
143
|
() => hasActions.value ? "node-creator-action-item" : "node-creator-node-item"
|
|
@@ -412,6 +154,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
412
154
|
left: `${draggablePosition.value.x}px`
|
|
413
155
|
}));
|
|
414
156
|
const isCommunityNode = computed(() => isCommunityPackageName(props.nodeType.name));
|
|
157
|
+
const isCommunityNodePreview = computed(() => isNodePreviewKey(props.nodeType.name));
|
|
415
158
|
const displayName = computed(() => {
|
|
416
159
|
const trimmedDisplayName = props.nodeType.displayName.trimEnd();
|
|
417
160
|
return i18n2.headerText({
|
|
@@ -451,7 +194,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
451
194
|
return openBlock(), createBlock(_component_N8nNodeCreatorNode, {
|
|
452
195
|
draggable: !showActionArrow.value,
|
|
453
196
|
class: normalizeClass(_ctx.$style.nodeItem),
|
|
454
|
-
description:
|
|
197
|
+
description: description2.value,
|
|
455
198
|
title: displayName.value,
|
|
456
199
|
"show-action-arrow": showActionArrow.value,
|
|
457
200
|
"is-trigger": isTrigger.value,
|
|
@@ -465,7 +208,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
465
208
|
key: 0,
|
|
466
209
|
class: normalizeClass(_ctx.$style.subNodeBackground)
|
|
467
210
|
}, null, 2)) : createCommentVNode("", true),
|
|
468
|
-
createVNode(_sfc_main$
|
|
211
|
+
createVNode(_sfc_main$n, {
|
|
469
212
|
class: normalizeClass(_ctx.$style.nodeIcon),
|
|
470
213
|
"node-type": _ctx.nodeType
|
|
471
214
|
}, null, 8, ["class", "node-type"])
|
|
@@ -477,7 +220,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
477
220
|
class: normalizeClass(_ctx.$style.draggable),
|
|
478
221
|
style: normalizeStyle(draggableStyle.value)
|
|
479
222
|
}, [
|
|
480
|
-
createVNode(_sfc_main$
|
|
223
|
+
createVNode(_sfc_main$n, {
|
|
481
224
|
"node-type": _ctx.nodeType,
|
|
482
225
|
size: 40,
|
|
483
226
|
shrink: false,
|
|
@@ -490,7 +233,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
490
233
|
]),
|
|
491
234
|
_: 2
|
|
492
235
|
}, [
|
|
493
|
-
isCommunityNode.value ? {
|
|
236
|
+
isCommunityNode.value && !isCommunityNodePreview.value && !unref(activeViewStack)?.communityNodeDetails ? {
|
|
494
237
|
name: "tooltip",
|
|
495
238
|
fn: withCtx(() => [
|
|
496
239
|
withDirectives(createBaseVNode("p", {
|
|
@@ -515,24 +258,24 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
515
258
|
}
|
|
516
259
|
});
|
|
517
260
|
const nodeItem = "_nodeItem_1107w_123";
|
|
518
|
-
const nodeIcon$
|
|
261
|
+
const nodeIcon$4 = "_nodeIcon_1107w_131";
|
|
519
262
|
const subNodeBackground = "_subNodeBackground_1107w_135";
|
|
520
263
|
const communityNodeIcon = "_communityNodeIcon_1107w_145";
|
|
521
264
|
const draggable$1 = "_draggable_1107w_149";
|
|
522
265
|
const draggableDataTransfer$1 = "_draggableDataTransfer_1107w_163";
|
|
523
|
-
const style0$
|
|
266
|
+
const style0$j = {
|
|
524
267
|
nodeItem,
|
|
525
|
-
nodeIcon: nodeIcon$
|
|
268
|
+
nodeIcon: nodeIcon$4,
|
|
526
269
|
subNodeBackground,
|
|
527
270
|
communityNodeIcon,
|
|
528
271
|
draggable: draggable$1,
|
|
529
272
|
draggableDataTransfer: draggableDataTransfer$1
|
|
530
273
|
};
|
|
531
|
-
const cssModules$
|
|
532
|
-
"$style": style0$
|
|
274
|
+
const cssModules$j = {
|
|
275
|
+
"$style": style0$j
|
|
533
276
|
};
|
|
534
|
-
const NodeItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
535
|
-
const _sfc_main$
|
|
277
|
+
const NodeItem = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__cssModules", cssModules$j]]);
|
|
278
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
536
279
|
__name: "SubcategoryItem",
|
|
537
280
|
props: {
|
|
538
281
|
item: {}
|
|
@@ -565,15 +308,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
565
308
|
}
|
|
566
309
|
});
|
|
567
310
|
const subCategory = "_subCategory_1x5a1_123";
|
|
568
|
-
const style0$
|
|
311
|
+
const style0$i = {
|
|
569
312
|
subCategory
|
|
570
313
|
};
|
|
571
|
-
const cssModules$
|
|
572
|
-
"$style": style0$
|
|
314
|
+
const cssModules$i = {
|
|
315
|
+
"$style": style0$i
|
|
573
316
|
};
|
|
574
|
-
const SubcategoryItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
575
|
-
const _hoisted_1$
|
|
576
|
-
const _sfc_main$
|
|
317
|
+
const SubcategoryItem = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__cssModules", cssModules$i]]);
|
|
318
|
+
const _hoisted_1$7 = ["textContent"];
|
|
319
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
577
320
|
__name: "LabelItem",
|
|
578
321
|
props: {
|
|
579
322
|
item: {}
|
|
@@ -586,20 +329,20 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
586
329
|
createBaseVNode("span", {
|
|
587
330
|
class: normalizeClass(_ctx.$style.name),
|
|
588
331
|
textContent: toDisplayString(_ctx.item.key)
|
|
589
|
-
}, null, 10, _hoisted_1$
|
|
332
|
+
}, null, 10, _hoisted_1$7)
|
|
590
333
|
], 2);
|
|
591
334
|
};
|
|
592
335
|
}
|
|
593
336
|
});
|
|
594
337
|
const label$1 = "_label_p81gr_123";
|
|
595
|
-
const style0$
|
|
338
|
+
const style0$h = {
|
|
596
339
|
label: label$1
|
|
597
340
|
};
|
|
598
|
-
const cssModules$
|
|
599
|
-
"$style": style0$
|
|
341
|
+
const cssModules$h = {
|
|
342
|
+
"$style": style0$h
|
|
600
343
|
};
|
|
601
|
-
const LabelItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
602
|
-
const _sfc_main$
|
|
344
|
+
const LabelItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__cssModules", cssModules$h]]);
|
|
345
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
603
346
|
__name: "ActionItem",
|
|
604
347
|
props: {
|
|
605
348
|
nodeType: {},
|
|
@@ -686,7 +429,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
686
429
|
class: normalizeClass(_ctx.$style.draggable),
|
|
687
430
|
style: normalizeStyle(draggableStyle.value)
|
|
688
431
|
}, [
|
|
689
|
-
createVNode(_sfc_main$
|
|
432
|
+
createVNode(_sfc_main$n, {
|
|
690
433
|
"node-type": _ctx.nodeType,
|
|
691
434
|
size: 40,
|
|
692
435
|
shrink: false,
|
|
@@ -698,7 +441,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
698
441
|
])
|
|
699
442
|
]),
|
|
700
443
|
icon: withCtx(() => [
|
|
701
|
-
createVNode(_sfc_main$
|
|
444
|
+
createVNode(_sfc_main$n, { "node-type": _ctx.action }, null, 8, ["node-type"])
|
|
702
445
|
]),
|
|
703
446
|
_: 1
|
|
704
447
|
}, 8, ["class", "title", "is-trigger"]);
|
|
@@ -706,20 +449,20 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
706
449
|
}
|
|
707
450
|
});
|
|
708
451
|
const action$1 = "_action_1owvg_123";
|
|
709
|
-
const nodeIcon$
|
|
452
|
+
const nodeIcon$3 = "_nodeIcon_1owvg_135";
|
|
710
453
|
const draggable = "_draggable_1owvg_139";
|
|
711
454
|
const draggableDataTransfer = "_draggableDataTransfer_1owvg_153";
|
|
712
|
-
const style0$
|
|
455
|
+
const style0$g = {
|
|
713
456
|
action: action$1,
|
|
714
|
-
nodeIcon: nodeIcon$
|
|
457
|
+
nodeIcon: nodeIcon$3,
|
|
715
458
|
draggable,
|
|
716
459
|
draggableDataTransfer
|
|
717
460
|
};
|
|
718
|
-
const cssModules$
|
|
719
|
-
"$style": style0$
|
|
461
|
+
const cssModules$g = {
|
|
462
|
+
"$style": style0$g
|
|
720
463
|
};
|
|
721
|
-
const ActionItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
722
|
-
const _sfc_main$
|
|
464
|
+
const ActionItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__cssModules", cssModules$g]]);
|
|
465
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
723
466
|
__name: "ViewItem",
|
|
724
467
|
props: {
|
|
725
468
|
view: {}
|
|
@@ -750,14 +493,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
750
493
|
}
|
|
751
494
|
});
|
|
752
495
|
const view$1 = "_view_17lj9_123";
|
|
753
|
-
const style0$
|
|
496
|
+
const style0$f = {
|
|
754
497
|
view: view$1
|
|
755
498
|
};
|
|
756
|
-
const cssModules$
|
|
757
|
-
"$style": style0$
|
|
499
|
+
const cssModules$f = {
|
|
500
|
+
"$style": style0$f
|
|
758
501
|
};
|
|
759
|
-
const ViewItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
760
|
-
const _sfc_main$
|
|
502
|
+
const ViewItem = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__cssModules", cssModules$f]]);
|
|
503
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
761
504
|
__name: "LinkItem",
|
|
762
505
|
props: {
|
|
763
506
|
link: {}
|
|
@@ -788,15 +531,89 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
788
531
|
}
|
|
789
532
|
});
|
|
790
533
|
const creatorLink = "_creatorLink_cptk0_123";
|
|
791
|
-
const style0$
|
|
534
|
+
const style0$e = {
|
|
792
535
|
creatorLink
|
|
793
536
|
};
|
|
794
|
-
const cssModules$
|
|
795
|
-
"$style": style0$
|
|
537
|
+
const cssModules$e = {
|
|
538
|
+
"$style": style0$e
|
|
796
539
|
};
|
|
797
|
-
const LinkItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
798
|
-
const
|
|
799
|
-
|
|
540
|
+
const LinkItem = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__cssModules", cssModules$e]]);
|
|
541
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
542
|
+
__name: "CommunityNodeInstallHint",
|
|
543
|
+
props: {
|
|
544
|
+
hint: {}
|
|
545
|
+
},
|
|
546
|
+
setup(__props) {
|
|
547
|
+
const isOwner = computed(() => useUsersStore().isInstanceOwner);
|
|
548
|
+
return (_ctx, _cache) => {
|
|
549
|
+
return isOwner.value ? (openBlock(), createElementBlock("div", {
|
|
550
|
+
key: 0,
|
|
551
|
+
class: normalizeClass(_ctx.$style.container)
|
|
552
|
+
}, [
|
|
553
|
+
createVNode(unref(N8nIcon), {
|
|
554
|
+
color: "text-light",
|
|
555
|
+
icon: "info-circle",
|
|
556
|
+
size: "large"
|
|
557
|
+
}),
|
|
558
|
+
createVNode(unref(N8nText), {
|
|
559
|
+
color: "text-base",
|
|
560
|
+
size: "medium"
|
|
561
|
+
}, {
|
|
562
|
+
default: withCtx(() => [
|
|
563
|
+
createTextVNode(toDisplayString(_ctx.hint), 1)
|
|
564
|
+
]),
|
|
565
|
+
_: 1
|
|
566
|
+
})
|
|
567
|
+
], 2)) : createCommentVNode("", true);
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
const container$5 = "_container_1dwo3_123";
|
|
572
|
+
const style0$d = {
|
|
573
|
+
container: container$5
|
|
574
|
+
};
|
|
575
|
+
const cssModules$d = {
|
|
576
|
+
"$style": style0$d
|
|
577
|
+
};
|
|
578
|
+
const CommunityNodeInstallHint = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__cssModules", cssModules$d]]);
|
|
579
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
580
|
+
__name: "CommunityNodeItem",
|
|
581
|
+
props: {
|
|
582
|
+
isPreview: { type: Boolean }
|
|
583
|
+
},
|
|
584
|
+
setup(__props) {
|
|
585
|
+
const i18n2 = useI18n();
|
|
586
|
+
return (_ctx, _cache) => {
|
|
587
|
+
return openBlock(), createElementBlock("div", null, [
|
|
588
|
+
_ctx.isPreview ? (openBlock(), createBlock(CommunityNodeInstallHint, {
|
|
589
|
+
key: 0,
|
|
590
|
+
hint: unref(i18n2).baseText("communityNodeItem.node.hint")
|
|
591
|
+
}, null, 8, ["hint"])) : (openBlock(), createElementBlock("div", {
|
|
592
|
+
key: 1,
|
|
593
|
+
class: normalizeClass(_ctx.$style.marginLeft)
|
|
594
|
+
}, [
|
|
595
|
+
createVNode(unref(N8nButton), {
|
|
596
|
+
size: "medium",
|
|
597
|
+
type: "secondary",
|
|
598
|
+
icon: "plus",
|
|
599
|
+
label: unref(i18n2).baseText("communityNodeItem.label"),
|
|
600
|
+
outline: ""
|
|
601
|
+
}, null, 8, ["label"])
|
|
602
|
+
], 2))
|
|
603
|
+
]);
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
const marginLeft = "_marginLeft_1vvtt_123";
|
|
608
|
+
const style0$c = {
|
|
609
|
+
marginLeft
|
|
610
|
+
};
|
|
611
|
+
const cssModules$c = {
|
|
612
|
+
"$style": style0$c
|
|
613
|
+
};
|
|
614
|
+
const CommunityNodeItem = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__cssModules", cssModules$c]]);
|
|
615
|
+
const _hoisted_1$6 = ["textContent"];
|
|
616
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
800
617
|
__name: "CategoryItem",
|
|
801
618
|
props: {
|
|
802
619
|
expanded: { type: Boolean, default: true },
|
|
@@ -827,7 +644,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
827
644
|
}, [
|
|
828
645
|
createBaseVNode("span", {
|
|
829
646
|
textContent: toDisplayString(categoryName.value)
|
|
830
|
-
}, null, 8, _hoisted_1$
|
|
647
|
+
}, null, 8, _hoisted_1$6),
|
|
831
648
|
_ctx.isTrigger ? (openBlock(), createBlock(_component_font_awesome_icon, {
|
|
832
649
|
key: 0,
|
|
833
650
|
icon: "bolt",
|
|
@@ -855,19 +672,19 @@ const category$1 = "_category_1rqhf_128";
|
|
|
855
672
|
const active$2 = "_active_1rqhf_149";
|
|
856
673
|
const name = "_name_1rqhf_153";
|
|
857
674
|
const arrow = "_arrow_1rqhf_158";
|
|
858
|
-
const style0$
|
|
675
|
+
const style0$b = {
|
|
859
676
|
triggerIcon,
|
|
860
677
|
category: category$1,
|
|
861
678
|
active: active$2,
|
|
862
679
|
name,
|
|
863
680
|
arrow
|
|
864
681
|
};
|
|
865
|
-
const cssModules$
|
|
866
|
-
"$style": style0$
|
|
682
|
+
const cssModules$b = {
|
|
683
|
+
"$style": style0$b
|
|
867
684
|
};
|
|
868
|
-
const CategoryItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
869
|
-
const _hoisted_1$
|
|
870
|
-
const _sfc_main$
|
|
685
|
+
const CategoryItem = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__cssModules", cssModules$b]]);
|
|
686
|
+
const _hoisted_1$5 = ["data-category-collapsed"];
|
|
687
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
871
688
|
__name: "CategorizedItemsRenderer",
|
|
872
689
|
props: {
|
|
873
690
|
elements: { default: () => [] },
|
|
@@ -880,13 +697,17 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
880
697
|
},
|
|
881
698
|
setup(__props) {
|
|
882
699
|
const props = __props;
|
|
883
|
-
const { popViewStack } = useViewStacks();
|
|
700
|
+
const { popViewStack, activeViewStack } = useViewStacks();
|
|
884
701
|
const { registerKeyHook } = useKeyboardNavigation();
|
|
885
702
|
const { workflowId } = useWorkflowsStore();
|
|
886
703
|
const nodeCreatorStore = useNodeCreatorStore();
|
|
704
|
+
const i18n2 = useI18n();
|
|
887
705
|
const activeItemId = computed(() => useKeyboardNavigation()?.activeItemId);
|
|
888
706
|
const actionCount = computed(() => props.elements.filter(({ type }) => type === "action").length);
|
|
889
707
|
const expanded = ref(props.expanded ?? false);
|
|
708
|
+
const isPreview = computed(
|
|
709
|
+
() => activeViewStack.communityNodeDetails && !activeViewStack.communityNodeDetails.installed
|
|
710
|
+
);
|
|
890
711
|
function toggleExpanded() {
|
|
891
712
|
setExpanded(!expanded.value);
|
|
892
713
|
}
|
|
@@ -984,39 +805,46 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
984
805
|
}, [
|
|
985
806
|
renderSlot(_ctx.$slots, "default")
|
|
986
807
|
], 2)) : createCommentVNode("", true),
|
|
987
|
-
|
|
808
|
+
isPreview.value ? (openBlock(), createBlock(CommunityNodeInstallHint, {
|
|
809
|
+
key: 1,
|
|
810
|
+
hint: unref(i18n2).baseText("communityNodeItem.actions.hint")
|
|
811
|
+
}, null, 8, ["hint"])) : createCommentVNode("", true),
|
|
812
|
+
expanded.value ? (openBlock(), createBlock(ItemsRenderer, mergeProps({ key: 2 }, _ctx.$attrs, {
|
|
988
813
|
elements: _ctx.elements,
|
|
989
|
-
"is-trigger": _ctx.isTriggerCategory
|
|
814
|
+
"is-trigger": _ctx.isTriggerCategory,
|
|
815
|
+
class: [{ [_ctx.$style.preview]: isPreview.value }]
|
|
990
816
|
}), {
|
|
991
817
|
default: withCtx(() => _cache[0] || (_cache[0] = [])),
|
|
992
818
|
empty: withCtx(() => [
|
|
993
819
|
renderSlot(_ctx.$slots, "empty", normalizeProps(guardReactiveProps({ elements: _ctx.elements })))
|
|
994
820
|
]),
|
|
995
821
|
_: 3
|
|
996
|
-
}, 16, ["elements", "is-trigger"])) : createCommentVNode("", true)
|
|
997
|
-
], 10, _hoisted_1$
|
|
822
|
+
}, 16, ["elements", "is-trigger", "class"])) : createCommentVNode("", true)
|
|
823
|
+
], 10, _hoisted_1$5);
|
|
998
824
|
};
|
|
999
825
|
}
|
|
1000
826
|
});
|
|
1001
|
-
const mouseOverTooltip = "
|
|
1002
|
-
const categorizedItemsRenderer = "
|
|
1003
|
-
const tooltipPopper = "
|
|
1004
|
-
const contentSlot = "
|
|
1005
|
-
const
|
|
827
|
+
const mouseOverTooltip = "_mouseOverTooltip_wk4vn_123";
|
|
828
|
+
const categorizedItemsRenderer = "_categorizedItemsRenderer_wk4vn_131";
|
|
829
|
+
const tooltipPopper = "_tooltipPopper_wk4vn_135";
|
|
830
|
+
const contentSlot = "_contentSlot_wk4vn_139";
|
|
831
|
+
const preview$1 = "_preview_wk4vn_148";
|
|
832
|
+
const style0$a = {
|
|
1006
833
|
mouseOverTooltip,
|
|
1007
834
|
categorizedItemsRenderer,
|
|
1008
835
|
tooltipPopper,
|
|
1009
|
-
contentSlot
|
|
836
|
+
contentSlot,
|
|
837
|
+
preview: preview$1
|
|
1010
838
|
};
|
|
1011
|
-
const cssModules$
|
|
1012
|
-
"$style": style0$
|
|
839
|
+
const cssModules$a = {
|
|
840
|
+
"$style": style0$a
|
|
1013
841
|
};
|
|
1014
|
-
const CategorizedItemsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1015
|
-
const _hoisted_1$
|
|
1016
|
-
const _hoisted_2$
|
|
842
|
+
const CategorizedItemsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__cssModules", cssModules$a]]);
|
|
843
|
+
const _hoisted_1$4 = { key: 0 };
|
|
844
|
+
const _hoisted_2$3 = ["data-keyboard-nav-type", "data-keyboard-nav-id", "onClick"];
|
|
1017
845
|
const LAZY_LOAD_THRESHOLD = 20;
|
|
1018
846
|
const LAZY_LOAD_ITEMS_PER_TICK = 5;
|
|
1019
|
-
const _sfc_main$
|
|
847
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1020
848
|
__name: "ItemsRenderer",
|
|
1021
849
|
props: {
|
|
1022
850
|
elements: { default: () => [] },
|
|
@@ -1030,7 +858,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1030
858
|
const emit = __emit;
|
|
1031
859
|
const renderedItems2 = ref([]);
|
|
1032
860
|
const renderAnimationRequest = ref(0);
|
|
861
|
+
const { activeViewStack } = useViewStacks();
|
|
1033
862
|
const activeItemId = computed(() => useKeyboardNavigation()?.activeItemId);
|
|
863
|
+
const communityNode = computed(() => activeViewStack.mode === "community-node");
|
|
864
|
+
const isPreview = computed(() => {
|
|
865
|
+
return communityNode.value && !activeViewStack.communityNodeDetails?.installed;
|
|
866
|
+
});
|
|
867
|
+
const highlightActiveItem = computed(() => {
|
|
868
|
+
if (activeViewStack.communityNodeDetails && !activeViewStack.communityNodeDetails.installed) {
|
|
869
|
+
return false;
|
|
870
|
+
}
|
|
871
|
+
return true;
|
|
872
|
+
});
|
|
1034
873
|
function renderItems() {
|
|
1035
874
|
if (props.elements.length <= LAZY_LOAD_THRESHOLD || !props.lazyRender) {
|
|
1036
875
|
renderedItems2.value = props.elements;
|
|
@@ -1101,7 +940,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1101
940
|
return openBlock(), createElementBlock("div", {
|
|
1102
941
|
key: item.uuid
|
|
1103
942
|
}, [
|
|
1104
|
-
renderedItems2.value.includes(item) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
943
|
+
renderedItems2.value.includes(item) ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
1105
944
|
item.type === "section" ? (openBlock(), createBlock(CategorizedItemsRenderer, {
|
|
1106
945
|
key: 0,
|
|
1107
946
|
elements: item.children,
|
|
@@ -1114,9 +953,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1114
953
|
ref: "iteratorItems",
|
|
1115
954
|
class: normalizeClass({
|
|
1116
955
|
clickable: !_ctx.disabled,
|
|
1117
|
-
[_ctx.$style.active]: activeItemId.value === item.uuid,
|
|
1118
|
-
[_ctx.$style.iteratorItem]:
|
|
956
|
+
[_ctx.$style.active]: activeItemId.value === item.uuid && highlightActiveItem.value,
|
|
957
|
+
[_ctx.$style.iteratorItem]: !communityNode.value,
|
|
1119
958
|
[_ctx.$style[item.type]]: true,
|
|
959
|
+
[_ctx.$style.preview]: isPreview.value,
|
|
1120
960
|
// Borderless is only applied to views
|
|
1121
961
|
[_ctx.$style.borderless]: item.type === "view" && item.properties.borderless === true
|
|
1122
962
|
}),
|
|
@@ -1133,27 +973,31 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1133
973
|
key: 1,
|
|
1134
974
|
item: item.properties
|
|
1135
975
|
}, null, 8, ["item"])) : createCommentVNode("", true),
|
|
1136
|
-
|
|
976
|
+
communityNode.value ? (openBlock(), createBlock(CommunityNodeItem, {
|
|
1137
977
|
key: 2,
|
|
978
|
+
"is-preview": isPreview.value
|
|
979
|
+
}, null, 8, ["is-preview"])) : createCommentVNode("", true),
|
|
980
|
+
item.type === "node" && !communityNode.value ? (openBlock(), createBlock(NodeItem, {
|
|
981
|
+
key: 3,
|
|
1138
982
|
"node-type": item.properties,
|
|
1139
983
|
active: true,
|
|
1140
984
|
subcategory: item.subcategory
|
|
1141
985
|
}, null, 8, ["node-type", "subcategory"])) : createCommentVNode("", true),
|
|
1142
986
|
item.type === "action" ? (openBlock(), createBlock(ActionItem, {
|
|
1143
|
-
key:
|
|
987
|
+
key: 4,
|
|
1144
988
|
"node-type": item.properties,
|
|
1145
989
|
action: item.properties,
|
|
1146
990
|
active: true
|
|
1147
991
|
}, null, 8, ["node-type", "action"])) : item.type === "view" ? (openBlock(), createBlock(ViewItem, {
|
|
1148
|
-
key:
|
|
992
|
+
key: 5,
|
|
1149
993
|
view: item.properties,
|
|
1150
994
|
class: normalizeClass(_ctx.$style.viewItem)
|
|
1151
995
|
}, null, 8, ["view", "class"])) : item.type === "link" ? (openBlock(), createBlock(LinkItem, {
|
|
1152
|
-
key:
|
|
996
|
+
key: 6,
|
|
1153
997
|
link: item.properties,
|
|
1154
998
|
class: normalizeClass(_ctx.$style.linkItem)
|
|
1155
999
|
}, null, 8, ["link", "class"])) : createCommentVNode("", true)
|
|
1156
|
-
], 10, _hoisted_2$
|
|
1000
|
+
], 10, _hoisted_2$3))
|
|
1157
1001
|
])) : (openBlock(), createBlock(_component_n8n_loading, {
|
|
1158
1002
|
key: 1,
|
|
1159
1003
|
loading: true,
|
|
@@ -1172,17 +1016,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1172
1016
|
};
|
|
1173
1017
|
}
|
|
1174
1018
|
});
|
|
1175
|
-
const itemSkeleton = "
|
|
1176
|
-
const iteratorItem = "
|
|
1177
|
-
const label = "
|
|
1178
|
-
const category = "
|
|
1179
|
-
const active$1 = "
|
|
1180
|
-
const empty = "
|
|
1181
|
-
const itemsRenderer = "
|
|
1182
|
-
const view = "
|
|
1183
|
-
const link = "
|
|
1184
|
-
const borderless = "
|
|
1185
|
-
const
|
|
1019
|
+
const itemSkeleton = "_itemSkeleton_1r9np_123";
|
|
1020
|
+
const iteratorItem = "_iteratorItem_1r9np_127";
|
|
1021
|
+
const label = "_label_1r9np_139";
|
|
1022
|
+
const category = "_category_1r9np_139";
|
|
1023
|
+
const active$1 = "_active_1r9np_142";
|
|
1024
|
+
const empty = "_empty_1r9np_146";
|
|
1025
|
+
const itemsRenderer = "_itemsRenderer_1r9np_150";
|
|
1026
|
+
const view = "_view_1r9np_159";
|
|
1027
|
+
const link = "_link_1r9np_177";
|
|
1028
|
+
const borderless = "_borderless_1r9np_195";
|
|
1029
|
+
const preview = "_preview_1r9np_203";
|
|
1030
|
+
const style0$9 = {
|
|
1186
1031
|
itemSkeleton,
|
|
1187
1032
|
iteratorItem,
|
|
1188
1033
|
label,
|
|
@@ -1192,13 +1037,14 @@ const style0$5 = {
|
|
|
1192
1037
|
itemsRenderer,
|
|
1193
1038
|
view,
|
|
1194
1039
|
link,
|
|
1195
|
-
borderless
|
|
1040
|
+
borderless,
|
|
1041
|
+
preview
|
|
1196
1042
|
};
|
|
1197
|
-
const cssModules$
|
|
1198
|
-
"$style": style0$
|
|
1043
|
+
const cssModules$9 = {
|
|
1044
|
+
"$style": style0$9
|
|
1199
1045
|
};
|
|
1200
|
-
const ItemsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1201
|
-
const _sfc_main$
|
|
1046
|
+
const ItemsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__cssModules", cssModules$9]]);
|
|
1047
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1202
1048
|
__name: "OrderSwitcher",
|
|
1203
1049
|
props: {
|
|
1204
1050
|
rootView: {}
|
|
@@ -1217,14 +1063,348 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1217
1063
|
};
|
|
1218
1064
|
}
|
|
1219
1065
|
});
|
|
1220
|
-
const
|
|
1066
|
+
const _hoisted_1$3 = { key: 2 };
|
|
1067
|
+
const _hoisted_2$2 = { key: 3 };
|
|
1068
|
+
const _hoisted_3 = { style: { "padding-bottom": "8px" } };
|
|
1069
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
1070
|
+
__name: "CommunityNodeInfo",
|
|
1071
|
+
setup(__props) {
|
|
1072
|
+
const { activeViewStack } = useViewStacks();
|
|
1073
|
+
const { communityNodeDetails } = activeViewStack;
|
|
1074
|
+
const publisherName = ref(void 0);
|
|
1075
|
+
const downloads = ref(null);
|
|
1076
|
+
const verified = ref(false);
|
|
1077
|
+
const communityNodesStore = useCommunityNodesStore();
|
|
1078
|
+
const nodeTypesStore = useNodeTypesStore();
|
|
1079
|
+
const isOwner = computed(() => useUsersStore().isInstanceOwner);
|
|
1080
|
+
const ownerEmailList = computed(
|
|
1081
|
+
() => useUsersStore().allUsers.filter((user) => user.role?.includes("owner")).map((user) => user.email)
|
|
1082
|
+
);
|
|
1083
|
+
const formatNumber = (number) => {
|
|
1084
|
+
if (!number) return null;
|
|
1085
|
+
return new Intl.NumberFormat("en-US").format(number);
|
|
1086
|
+
};
|
|
1087
|
+
async function fetchPackageInfo(packageName) {
|
|
1088
|
+
const communityNodeAttributes = await nodeTypesStore.getCommunityNodeAttributes(
|
|
1089
|
+
activeViewStack.communityNodeDetails?.key || ""
|
|
1090
|
+
);
|
|
1091
|
+
if (communityNodeAttributes) {
|
|
1092
|
+
publisherName.value = communityNodeAttributes.authorName;
|
|
1093
|
+
downloads.value = formatNumber(communityNodeAttributes.numberOfDownloads);
|
|
1094
|
+
const packageInfo = communityNodesStore.getInstalledPackages.find(
|
|
1095
|
+
(p) => p.packageName === communityNodeAttributes.packageName
|
|
1096
|
+
);
|
|
1097
|
+
if (!packageInfo) {
|
|
1098
|
+
verified.value = true;
|
|
1099
|
+
} else {
|
|
1100
|
+
verified.value = packageInfo.installedVersion === communityNodeAttributes.npmVersion;
|
|
1101
|
+
}
|
|
1102
|
+
return;
|
|
1103
|
+
}
|
|
1104
|
+
const url = `https://registry.npmjs.org/${packageName}`;
|
|
1105
|
+
try {
|
|
1106
|
+
const response = await fetch(url);
|
|
1107
|
+
if (!response.ok) {
|
|
1108
|
+
captureException(new Error("Could not get metadata for package"), { extra: { packageName } });
|
|
1109
|
+
return;
|
|
1110
|
+
}
|
|
1111
|
+
const data = await response.json();
|
|
1112
|
+
const publisher = data.maintainers?.[0]?.name;
|
|
1113
|
+
publisherName.value = publisher;
|
|
1114
|
+
const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
1115
|
+
const downloadsUrl = `https://api.npmjs.org/downloads/range/2022-01-01:${today}/${packageName}`;
|
|
1116
|
+
const downloadsResponse = await fetch(downloadsUrl);
|
|
1117
|
+
if (!downloadsResponse.ok) {
|
|
1118
|
+
captureException(new Error("Could not get downloads for package"), {
|
|
1119
|
+
extra: { packageName }
|
|
1120
|
+
});
|
|
1121
|
+
return;
|
|
1122
|
+
}
|
|
1123
|
+
const downloadsData = await downloadsResponse.json();
|
|
1124
|
+
if (!downloadsData.downloads || !downloadsData.downloads.length) return;
|
|
1125
|
+
const total = downloadsData.downloads.reduce((sum, day) => sum + day.downloads, 0);
|
|
1126
|
+
downloads.value = formatNumber(total);
|
|
1127
|
+
} catch (error) {
|
|
1128
|
+
captureException(error, { extra: { packageName } });
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
onMounted(async () => {
|
|
1132
|
+
if (communityNodeDetails?.packageName) {
|
|
1133
|
+
await fetchPackageInfo(communityNodeDetails.packageName);
|
|
1134
|
+
}
|
|
1135
|
+
});
|
|
1136
|
+
return (_ctx, _cache) => {
|
|
1137
|
+
const _component_FontAwesomeIcon = resolveComponent("FontAwesomeIcon");
|
|
1138
|
+
return openBlock(), createElementBlock("div", {
|
|
1139
|
+
class: normalizeClass(_ctx.$style.container)
|
|
1140
|
+
}, [
|
|
1141
|
+
createVNode(unref(N8nText), {
|
|
1142
|
+
class: normalizeClass(_ctx.$style.description),
|
|
1143
|
+
color: "text-base",
|
|
1144
|
+
size: "medium"
|
|
1145
|
+
}, {
|
|
1146
|
+
default: withCtx(() => [
|
|
1147
|
+
createTextVNode(toDisplayString(unref(communityNodeDetails)?.description), 1)
|
|
1148
|
+
]),
|
|
1149
|
+
_: 1
|
|
1150
|
+
}, 8, ["class"]),
|
|
1151
|
+
createBaseVNode("div", {
|
|
1152
|
+
class: normalizeClass(_ctx.$style.separator)
|
|
1153
|
+
}, null, 2),
|
|
1154
|
+
createBaseVNode("div", {
|
|
1155
|
+
class: normalizeClass(_ctx.$style.info)
|
|
1156
|
+
}, [
|
|
1157
|
+
verified.value ? (openBlock(), createBlock(unref(N8nTooltip), {
|
|
1158
|
+
key: 0,
|
|
1159
|
+
placement: "top"
|
|
1160
|
+
}, {
|
|
1161
|
+
content: withCtx(() => [
|
|
1162
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.approved")), 1)
|
|
1163
|
+
]),
|
|
1164
|
+
default: withCtx(() => [
|
|
1165
|
+
createBaseVNode("div", null, [
|
|
1166
|
+
createVNode(_component_FontAwesomeIcon, {
|
|
1167
|
+
class: normalizeClass(_ctx.$style.tooltipIcon),
|
|
1168
|
+
icon: "check-circle"
|
|
1169
|
+
}, null, 8, ["class"]),
|
|
1170
|
+
createVNode(unref(N8nText), {
|
|
1171
|
+
color: "text-light",
|
|
1172
|
+
size: "xsmall",
|
|
1173
|
+
bold: "",
|
|
1174
|
+
"data-test-id": "verified-tag"
|
|
1175
|
+
}, {
|
|
1176
|
+
default: withCtx(() => [
|
|
1177
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.approved.label")), 1)
|
|
1178
|
+
]),
|
|
1179
|
+
_: 1
|
|
1180
|
+
})
|
|
1181
|
+
])
|
|
1182
|
+
]),
|
|
1183
|
+
_: 1
|
|
1184
|
+
})) : (openBlock(), createBlock(unref(N8nTooltip), {
|
|
1185
|
+
key: 1,
|
|
1186
|
+
placement: "top"
|
|
1187
|
+
}, {
|
|
1188
|
+
content: withCtx(() => [
|
|
1189
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.unverified")), 1)
|
|
1190
|
+
]),
|
|
1191
|
+
default: withCtx(() => [
|
|
1192
|
+
createBaseVNode("div", null, [
|
|
1193
|
+
createVNode(_component_FontAwesomeIcon, {
|
|
1194
|
+
class: normalizeClass(_ctx.$style.tooltipIcon),
|
|
1195
|
+
icon: "cube"
|
|
1196
|
+
}, null, 8, ["class"]),
|
|
1197
|
+
createVNode(unref(N8nText), {
|
|
1198
|
+
color: "text-light",
|
|
1199
|
+
size: "xsmall",
|
|
1200
|
+
bold: ""
|
|
1201
|
+
}, {
|
|
1202
|
+
default: withCtx(() => [
|
|
1203
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.unverified.label")), 1)
|
|
1204
|
+
]),
|
|
1205
|
+
_: 1
|
|
1206
|
+
})
|
|
1207
|
+
])
|
|
1208
|
+
]),
|
|
1209
|
+
_: 1
|
|
1210
|
+
})),
|
|
1211
|
+
downloads.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
1212
|
+
createVNode(_component_FontAwesomeIcon, {
|
|
1213
|
+
class: normalizeClass(_ctx.$style.tooltipIcon),
|
|
1214
|
+
icon: "download"
|
|
1215
|
+
}, null, 8, ["class"]),
|
|
1216
|
+
createVNode(unref(N8nText), {
|
|
1217
|
+
color: "text-light",
|
|
1218
|
+
size: "xsmall",
|
|
1219
|
+
bold: "",
|
|
1220
|
+
"data-test-id": "number-of-downloads"
|
|
1221
|
+
}, {
|
|
1222
|
+
default: withCtx(() => [
|
|
1223
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.downloads", { interpolate: { downloads: downloads.value } })), 1)
|
|
1224
|
+
]),
|
|
1225
|
+
_: 1
|
|
1226
|
+
})
|
|
1227
|
+
])) : createCommentVNode("", true),
|
|
1228
|
+
publisherName.value ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
1229
|
+
createVNode(_component_FontAwesomeIcon, {
|
|
1230
|
+
class: normalizeClass(_ctx.$style.tooltipIcon),
|
|
1231
|
+
icon: "user"
|
|
1232
|
+
}, null, 8, ["class"]),
|
|
1233
|
+
createVNode(unref(N8nText), {
|
|
1234
|
+
color: "text-light",
|
|
1235
|
+
size: "xsmall",
|
|
1236
|
+
bold: "",
|
|
1237
|
+
"data-test-id": "publisher-name"
|
|
1238
|
+
}, {
|
|
1239
|
+
default: withCtx(() => [
|
|
1240
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeInfo.publishedBy", { interpolate: { publisherName: publisherName.value } })), 1)
|
|
1241
|
+
]),
|
|
1242
|
+
_: 1
|
|
1243
|
+
})
|
|
1244
|
+
])) : createCommentVNode("", true)
|
|
1245
|
+
], 2),
|
|
1246
|
+
!isOwner.value && !unref(communityNodeDetails)?.installed ? (openBlock(), createElementBlock("div", {
|
|
1247
|
+
key: 0,
|
|
1248
|
+
class: normalizeClass(_ctx.$style.contactOwnerHint)
|
|
1249
|
+
}, [
|
|
1250
|
+
createVNode(unref(N8nIcon), {
|
|
1251
|
+
color: "text-light",
|
|
1252
|
+
icon: "info-circle",
|
|
1253
|
+
size: "large"
|
|
1254
|
+
}),
|
|
1255
|
+
createVNode(unref(N8nText), {
|
|
1256
|
+
color: "text-base",
|
|
1257
|
+
size: "medium"
|
|
1258
|
+
}, {
|
|
1259
|
+
default: withCtx(() => [
|
|
1260
|
+
createBaseVNode("div", _hoisted_3, toDisplayString(unref(i18n).baseText("communityNodeInfo.contact.admin")), 1),
|
|
1261
|
+
ownerEmailList.value.length ? (openBlock(), createBlock(unref(N8nText), {
|
|
1262
|
+
key: 0,
|
|
1263
|
+
bold: ""
|
|
1264
|
+
}, {
|
|
1265
|
+
default: withCtx(() => [
|
|
1266
|
+
createTextVNode(toDisplayString(ownerEmailList.value.join(", ")), 1)
|
|
1267
|
+
]),
|
|
1268
|
+
_: 1
|
|
1269
|
+
})) : createCommentVNode("", true)
|
|
1270
|
+
]),
|
|
1271
|
+
_: 1
|
|
1272
|
+
})
|
|
1273
|
+
], 2)) : createCommentVNode("", true)
|
|
1274
|
+
], 2);
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
});
|
|
1278
|
+
const container$4 = "_container_1ty35_123";
|
|
1279
|
+
const nodeIcon$2 = "_nodeIcon_1ty35_132";
|
|
1280
|
+
const description = "_description_1ty35_137";
|
|
1281
|
+
const separator = "_separator_1ty35_141";
|
|
1282
|
+
const info$1 = "_info_1ty35_147";
|
|
1283
|
+
const tooltipIcon = "_tooltipIcon_1ty35_162";
|
|
1284
|
+
const contactOwnerHint = "_contactOwnerHint_1ty35_167";
|
|
1285
|
+
const style0$8 = {
|
|
1286
|
+
container: container$4,
|
|
1287
|
+
nodeIcon: nodeIcon$2,
|
|
1288
|
+
description,
|
|
1289
|
+
separator,
|
|
1290
|
+
info: info$1,
|
|
1291
|
+
tooltipIcon,
|
|
1292
|
+
contactOwnerHint
|
|
1293
|
+
};
|
|
1294
|
+
const cssModules$8 = {
|
|
1295
|
+
"$style": style0$8
|
|
1296
|
+
};
|
|
1297
|
+
const CommunityNodeInfo = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__cssModules", cssModules$8]]);
|
|
1298
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1299
|
+
__name: "CommunityNodeFooter",
|
|
1300
|
+
props: {
|
|
1301
|
+
packageName: {},
|
|
1302
|
+
showManage: { type: Boolean }
|
|
1303
|
+
},
|
|
1304
|
+
setup(__props) {
|
|
1305
|
+
const props = __props;
|
|
1306
|
+
const router = useRouter();
|
|
1307
|
+
const bugsUrl = ref(`https://registry.npmjs.org/${props.packageName}`);
|
|
1308
|
+
async function openSettingsPage() {
|
|
1309
|
+
await router.push({ name: VIEWS.COMMUNITY_NODES });
|
|
1310
|
+
}
|
|
1311
|
+
async function openIssuesPage() {
|
|
1312
|
+
if (bugsUrl.value) {
|
|
1313
|
+
window.open(bugsUrl.value, "_blank");
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
async function getBugsUrl(packageName) {
|
|
1317
|
+
const url = `https://registry.npmjs.org/${packageName}`;
|
|
1318
|
+
try {
|
|
1319
|
+
const response = await fetch(url);
|
|
1320
|
+
if (!response.ok) {
|
|
1321
|
+
throw new Error("Could not get metadata for package");
|
|
1322
|
+
}
|
|
1323
|
+
const data = await response.json();
|
|
1324
|
+
if (data.bugs?.url) {
|
|
1325
|
+
bugsUrl.value = data.bugs.url;
|
|
1326
|
+
}
|
|
1327
|
+
} catch (error) {
|
|
1328
|
+
captureException(error);
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
onMounted(async () => {
|
|
1332
|
+
if (props.packageName) {
|
|
1333
|
+
await getBugsUrl(props.packageName);
|
|
1334
|
+
}
|
|
1335
|
+
});
|
|
1336
|
+
return (_ctx, _cache) => {
|
|
1337
|
+
return openBlock(), createElementBlock("div", {
|
|
1338
|
+
class: normalizeClass(_ctx.$style.container)
|
|
1339
|
+
}, [
|
|
1340
|
+
props.showManage ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1341
|
+
createVNode(unref(N8nLink), {
|
|
1342
|
+
theme: "text",
|
|
1343
|
+
onClick: openSettingsPage
|
|
1344
|
+
}, {
|
|
1345
|
+
default: withCtx(() => [
|
|
1346
|
+
createVNode(unref(N8nText), {
|
|
1347
|
+
size: "small",
|
|
1348
|
+
color: "primary",
|
|
1349
|
+
bold: ""
|
|
1350
|
+
}, {
|
|
1351
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
1352
|
+
createTextVNode(" Manage ")
|
|
1353
|
+
])),
|
|
1354
|
+
_: 1
|
|
1355
|
+
})
|
|
1356
|
+
]),
|
|
1357
|
+
_: 1
|
|
1358
|
+
}),
|
|
1359
|
+
createVNode(unref(N8nText), {
|
|
1360
|
+
size: "small",
|
|
1361
|
+
color: "primary",
|
|
1362
|
+
bold: ""
|
|
1363
|
+
}, {
|
|
1364
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
1365
|
+
createTextVNode("|")
|
|
1366
|
+
])),
|
|
1367
|
+
_: 1
|
|
1368
|
+
})
|
|
1369
|
+
], 64)) : createCommentVNode("", true),
|
|
1370
|
+
createVNode(unref(N8nLink), {
|
|
1371
|
+
theme: "text",
|
|
1372
|
+
onClick: openIssuesPage
|
|
1373
|
+
}, {
|
|
1374
|
+
default: withCtx(() => [
|
|
1375
|
+
createVNode(unref(N8nText), {
|
|
1376
|
+
size: "small",
|
|
1377
|
+
color: "primary",
|
|
1378
|
+
bold: ""
|
|
1379
|
+
}, {
|
|
1380
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
1381
|
+
createTextVNode(" Report issue ")
|
|
1382
|
+
])),
|
|
1383
|
+
_: 1
|
|
1384
|
+
})
|
|
1385
|
+
]),
|
|
1386
|
+
_: 1
|
|
1387
|
+
})
|
|
1388
|
+
], 2);
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
});
|
|
1392
|
+
const container$3 = "_container_18adw_123";
|
|
1393
|
+
const style0$7 = {
|
|
1394
|
+
container: container$3
|
|
1395
|
+
};
|
|
1396
|
+
const cssModules$7 = {
|
|
1397
|
+
"$style": style0$7
|
|
1398
|
+
};
|
|
1399
|
+
const CommunityNodeFooter = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$7]]);
|
|
1400
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1221
1401
|
__name: "ActionsMode",
|
|
1222
1402
|
emits: ["nodeTypeSelected"],
|
|
1223
1403
|
setup(__props, { emit: __emit }) {
|
|
1224
1404
|
const emit = __emit;
|
|
1225
1405
|
const telemetry = useTelemetry();
|
|
1226
1406
|
const i18n2 = useI18n();
|
|
1227
|
-
const { userActivated } = useUsersStore();
|
|
1407
|
+
const { userActivated, isInstanceOwner } = useUsersStore();
|
|
1228
1408
|
const { popViewStack, updateCurrentViewStack } = useViewStacks();
|
|
1229
1409
|
const { registerKeyHook } = useKeyboardNavigation();
|
|
1230
1410
|
const {
|
|
@@ -1266,6 +1446,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1266
1446
|
const search = computed(() => useViewStacks().activeViewStack.search);
|
|
1267
1447
|
const subcategory = computed(() => useViewStacks().activeViewStack.subcategory);
|
|
1268
1448
|
const rootView = computed(() => useViewStacks().activeViewStack.rootView);
|
|
1449
|
+
const communityNodeDetails = computed(() => useViewStacks().activeViewStack?.communityNodeDetails);
|
|
1269
1450
|
const placeholderTriggerActions = getPlaceholderTriggerActions(subcategory.value || "");
|
|
1270
1451
|
const hasNoTriggerActions = computed(
|
|
1271
1452
|
() => parseCategoryActions(
|
|
@@ -1282,6 +1463,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1282
1463
|
return result;
|
|
1283
1464
|
});
|
|
1284
1465
|
const isTriggerRootView = computed(() => rootView.value === TRIGGER_NODE_CREATOR_VIEW);
|
|
1466
|
+
const shouldShowTriggers = computed(() => {
|
|
1467
|
+
if (communityNodeDetails.value && !parsedTriggerActions.value.length) {
|
|
1468
|
+
return !isNodePreviewKey(useViewStacks().activeViewStack?.items?.[0].key) && isTriggerRootView.value;
|
|
1469
|
+
}
|
|
1470
|
+
return isTriggerRootView.value || parsedTriggerActionsBaseline.value.length !== 0;
|
|
1471
|
+
});
|
|
1285
1472
|
registerKeyHook("ActionsKeyRight", {
|
|
1286
1473
|
keyboardKeys: ["ArrowRight", "Enter"],
|
|
1287
1474
|
condition: (type) => type === "action",
|
|
@@ -1314,6 +1501,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1314
1501
|
if (actionNode) emit("nodeTypeSelected", [actionData.key, actionNode]);
|
|
1315
1502
|
} else if (actionData?.key === OPEN_AI_NODE_TYPE && actionData?.value?.resource === "assistant" && actionData?.value?.operation === "message") {
|
|
1316
1503
|
emit("nodeTypeSelected", [OPEN_AI_NODE_MESSAGE_ASSISTANT_TYPE]);
|
|
1504
|
+
} else if (isNodePreviewKey(actionData?.key)) {
|
|
1505
|
+
return;
|
|
1317
1506
|
} else {
|
|
1318
1507
|
emit("nodeTypeSelected", [actionData.key]);
|
|
1319
1508
|
}
|
|
@@ -1364,13 +1553,17 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1364
1553
|
const _component_n8n_info_tip = resolveComponent("n8n-info-tip");
|
|
1365
1554
|
const _directive_n8n_html = resolveDirective("n8n-html");
|
|
1366
1555
|
return openBlock(), createElementBlock("div", {
|
|
1367
|
-
class: normalizeClass(
|
|
1556
|
+
class: normalizeClass({
|
|
1557
|
+
[_ctx.$style.container]: true,
|
|
1558
|
+
[_ctx.$style.containerPaddingBottom]: !communityNodeDetails.value
|
|
1559
|
+
})
|
|
1368
1560
|
}, [
|
|
1369
|
-
|
|
1370
|
-
|
|
1561
|
+
communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeInfo, { key: 0 })) : createCommentVNode("", true),
|
|
1562
|
+
rootView.value ? (openBlock(), createBlock(_sfc_main$a, {
|
|
1563
|
+
key: 1,
|
|
1371
1564
|
"root-view": rootView.value
|
|
1372
1565
|
}, createSlots({ _: 2 }, [
|
|
1373
|
-
|
|
1566
|
+
shouldShowTriggers.value ? {
|
|
1374
1567
|
name: "triggers",
|
|
1375
1568
|
fn: withCtx(() => [
|
|
1376
1569
|
withMemo([search.value], () => createVNode(CategorizedItemsRenderer, {
|
|
@@ -1484,8 +1677,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1484
1677
|
key: "1"
|
|
1485
1678
|
} : void 0
|
|
1486
1679
|
]), 1032, ["root-view"])) : createCommentVNode("", true),
|
|
1487
|
-
containsAPIAction.value ? (openBlock(), createElementBlock("div", {
|
|
1488
|
-
key:
|
|
1680
|
+
containsAPIAction.value && !communityNodeDetails.value ? (openBlock(), createElementBlock("div", {
|
|
1681
|
+
key: 2,
|
|
1489
1682
|
class: normalizeClass(_ctx.$style.apiHint)
|
|
1490
1683
|
}, [
|
|
1491
1684
|
withDirectives(createBaseVNode("span", {
|
|
@@ -1498,26 +1691,36 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1498
1691
|
})
|
|
1499
1692
|
]
|
|
1500
1693
|
])
|
|
1501
|
-
], 2)) : createCommentVNode("", true)
|
|
1694
|
+
], 2)) : createCommentVNode("", true),
|
|
1695
|
+
communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeFooter, {
|
|
1696
|
+
key: 3,
|
|
1697
|
+
class: normalizeClass(_ctx.$style.communityNodeFooter),
|
|
1698
|
+
"package-name": communityNodeDetails.value.packageName,
|
|
1699
|
+
"show-manage": communityNodeDetails.value.installed && unref(isInstanceOwner)
|
|
1700
|
+
}, null, 8, ["class", "package-name", "show-manage"])) : createCommentVNode("", true)
|
|
1502
1701
|
], 2);
|
|
1503
1702
|
};
|
|
1504
1703
|
}
|
|
1505
1704
|
});
|
|
1506
|
-
const container = "
|
|
1507
|
-
const
|
|
1508
|
-
const
|
|
1509
|
-
const
|
|
1510
|
-
const
|
|
1511
|
-
|
|
1705
|
+
const container$2 = "_container_ikzr4_123";
|
|
1706
|
+
const containerPaddingBottom = "_containerPaddingBottom_ikzr4_129";
|
|
1707
|
+
const communityNodeFooter = "_communityNodeFooter_ikzr4_133";
|
|
1708
|
+
const resetSearch = "_resetSearch_ikzr4_137";
|
|
1709
|
+
const actionsEmpty = "_actionsEmpty_ikzr4_151";
|
|
1710
|
+
const apiHint = "_apiHint_ikzr4_159";
|
|
1711
|
+
const style0$6 = {
|
|
1712
|
+
container: container$2,
|
|
1713
|
+
containerPaddingBottom,
|
|
1714
|
+
communityNodeFooter,
|
|
1512
1715
|
resetSearch,
|
|
1513
1716
|
actionsEmpty,
|
|
1514
1717
|
apiHint
|
|
1515
1718
|
};
|
|
1516
|
-
const cssModules$
|
|
1517
|
-
"$style": style0$
|
|
1719
|
+
const cssModules$6 = {
|
|
1720
|
+
"$style": style0$6
|
|
1518
1721
|
};
|
|
1519
|
-
const ActionsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1520
|
-
const _sfc_main$
|
|
1722
|
+
const ActionsRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$6]]);
|
|
1723
|
+
const _sfc_main$6 = {};
|
|
1521
1724
|
const _hoisted_1$2 = {
|
|
1522
1725
|
width: "75px",
|
|
1523
1726
|
height: "75px",
|
|
@@ -1531,10 +1734,10 @@ function _sfc_render(_ctx, _cache) {
|
|
|
1531
1734
|
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
1735
|
]));
|
|
1533
1736
|
}
|
|
1534
|
-
const NoResultsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1737
|
+
const NoResultsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]);
|
|
1535
1738
|
const _hoisted_1$1 = ["textContent"];
|
|
1536
1739
|
const _hoisted_2$1 = ["textContent"];
|
|
1537
|
-
const _sfc_main$
|
|
1740
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1538
1741
|
__name: "NoResults",
|
|
1539
1742
|
props: {
|
|
1540
1743
|
showIcon: { type: Boolean },
|
|
@@ -1618,37 +1821,48 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1618
1821
|
}
|
|
1619
1822
|
});
|
|
1620
1823
|
const noResults = "_noResults_17xen_123";
|
|
1621
|
-
const title$
|
|
1824
|
+
const title$2 = "_title_17xen_136";
|
|
1622
1825
|
const action = "_action_17xen_145";
|
|
1623
1826
|
const request = "_request_17xen_146";
|
|
1624
1827
|
const icon = "_icon_17xen_162";
|
|
1625
1828
|
const external = "_external_17xen_168";
|
|
1626
|
-
const style0$
|
|
1829
|
+
const style0$5 = {
|
|
1627
1830
|
noResults,
|
|
1628
|
-
title: title$
|
|
1831
|
+
title: title$2,
|
|
1629
1832
|
action,
|
|
1630
1833
|
request,
|
|
1631
1834
|
icon,
|
|
1632
1835
|
external
|
|
1633
1836
|
};
|
|
1634
|
-
const cssModules$
|
|
1635
|
-
"$style": style0$
|
|
1837
|
+
const cssModules$5 = {
|
|
1838
|
+
"$style": style0$5
|
|
1636
1839
|
};
|
|
1637
|
-
const NoResults = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1638
|
-
const _sfc_main$
|
|
1840
|
+
const NoResults = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$5]]);
|
|
1841
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1639
1842
|
__name: "NodesMode",
|
|
1640
1843
|
emits: ["nodeTypeSelected"],
|
|
1641
1844
|
setup(__props, { emit: __emit }) {
|
|
1642
1845
|
const emit = __emit;
|
|
1643
1846
|
const i18n2 = useI18n();
|
|
1644
1847
|
const { mergedNodes, actions, onSubcategorySelected } = useNodeCreatorStore();
|
|
1645
|
-
const { pushViewStack, popViewStack } = useViewStacks();
|
|
1848
|
+
const { pushViewStack, popViewStack, isAiSubcategoryView } = useViewStacks();
|
|
1646
1849
|
const { setAddedNodeActionParameters } = useActions();
|
|
1647
1850
|
const { registerKeyHook } = useKeyboardNavigation();
|
|
1648
1851
|
const activeViewStack = computed(() => useViewStacks().activeViewStack);
|
|
1649
1852
|
const globalSearchItemsDiff = computed(() => useViewStacks().globalSearchItemsDiff);
|
|
1650
|
-
|
|
1651
|
-
|
|
1853
|
+
const communityNodesAndActions = computed(() => useNodeTypesStore().communityNodesAndActions);
|
|
1854
|
+
const moreFromCommunity = computed(() => {
|
|
1855
|
+
return filterAndSearchNodes(
|
|
1856
|
+
communityNodesAndActions.value.mergedNodes,
|
|
1857
|
+
activeViewStack.value.search ?? "",
|
|
1858
|
+
isAiSubcategoryView(activeViewStack.value)
|
|
1859
|
+
);
|
|
1860
|
+
});
|
|
1861
|
+
const isSearchResultEmpty = computed(() => {
|
|
1862
|
+
return (activeViewStack.value.items || []).length === 0 && globalSearchItemsDiff.value.length + moreFromCommunity.value.length === 0;
|
|
1863
|
+
});
|
|
1864
|
+
function getFilteredActions(node, actions2) {
|
|
1865
|
+
const nodeActions = actions2?.[node.key] || [];
|
|
1652
1866
|
if (activeViewStack.value.subcategory === HITL_SUBCATEGORY) {
|
|
1653
1867
|
return getHumanInTheLoopActions(nodeActions);
|
|
1654
1868
|
}
|
|
@@ -1689,7 +1903,20 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1689
1903
|
});
|
|
1690
1904
|
}
|
|
1691
1905
|
if (item.type === "node") {
|
|
1692
|
-
|
|
1906
|
+
let nodeActions = getFilteredActions(item, actions);
|
|
1907
|
+
if (isCommunityPackageName(item.key) && !activeViewStack.value.communityNodeDetails) {
|
|
1908
|
+
if (!nodeActions.length) {
|
|
1909
|
+
nodeActions = getFilteredActions(item, communityNodesAndActions.value.actions);
|
|
1910
|
+
}
|
|
1911
|
+
const viewStack = prepareCommunityNodeDetailsViewStack(
|
|
1912
|
+
item,
|
|
1913
|
+
getNodeIconSource(item.properties),
|
|
1914
|
+
activeViewStack.value.rootView,
|
|
1915
|
+
nodeActions
|
|
1916
|
+
);
|
|
1917
|
+
pushViewStack(viewStack);
|
|
1918
|
+
return;
|
|
1919
|
+
}
|
|
1693
1920
|
if (nodeActions.length === 1) {
|
|
1694
1921
|
selectNodeType([item.key]);
|
|
1695
1922
|
setAddedNodeActionParameters({
|
|
@@ -1749,7 +1976,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1749
1976
|
function subcategoriesMapper(item) {
|
|
1750
1977
|
if (item.type !== "node") return item;
|
|
1751
1978
|
const hasTriggerGroup = item.properties.group.includes("trigger");
|
|
1752
|
-
const nodeActions = getFilteredActions(item);
|
|
1979
|
+
const nodeActions = getFilteredActions(item, actions);
|
|
1753
1980
|
const hasActions = nodeActions.length > 0;
|
|
1754
1981
|
if (hasTriggerGroup && hasActions) {
|
|
1755
1982
|
if (item.properties?.codex) {
|
|
@@ -1766,7 +1993,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1766
1993
|
if (item.type === "section") return true;
|
|
1767
1994
|
if (item.type !== "node") return false;
|
|
1768
1995
|
const hasTriggerGroup = item.properties.group.includes("trigger");
|
|
1769
|
-
const nodeActions = getFilteredActions(item);
|
|
1996
|
+
const nodeActions = getFilteredActions(item, actions);
|
|
1770
1997
|
const hasActions = nodeActions.length > 0;
|
|
1771
1998
|
const isTriggerRootView = activeViewStack.value.rootView === TRIGGER_NODE_CREATOR_VIEW;
|
|
1772
1999
|
if (isTriggerRootView) {
|
|
@@ -1780,7 +2007,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1780
2007
|
function onKeySelect(activeItemId) {
|
|
1781
2008
|
const mergedItems = flattenCreateElements([
|
|
1782
2009
|
...activeViewStack.value.items ?? [],
|
|
1783
|
-
...globalSearchItemsDiff.value ?? []
|
|
2010
|
+
...globalSearchItemsDiff.value ?? [],
|
|
2011
|
+
...moreFromCommunity.value ?? []
|
|
1784
2012
|
]);
|
|
1785
2013
|
const item = mergedItems.find((i) => i.uuid === activeItemId);
|
|
1786
2014
|
if (!item) return;
|
|
@@ -1803,7 +2031,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1803
2031
|
class: normalizeClass(_ctx.$style.items),
|
|
1804
2032
|
onSelected
|
|
1805
2033
|
}, createSlots({ _: 2 }, [
|
|
1806
|
-
|
|
2034
|
+
isSearchResultEmpty.value ? {
|
|
1807
2035
|
name: "empty",
|
|
1808
2036
|
fn: withCtx(() => [
|
|
1809
2037
|
createVNode(NoResults, {
|
|
@@ -1821,20 +2049,209 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1821
2049
|
key: 0,
|
|
1822
2050
|
elements: globalSearchItemsDiff.value,
|
|
1823
2051
|
category: unref(i18n2).baseText("nodeCreator.categoryNames.otherCategories"),
|
|
1824
|
-
onSelected
|
|
2052
|
+
onSelected,
|
|
2053
|
+
expanded: true
|
|
2054
|
+
}, null, 8, ["elements", "category"])) : createCommentVNode("", true),
|
|
2055
|
+
moreFromCommunity.value.length > 0 ? (openBlock(), createBlock(CategorizedItemsRenderer, {
|
|
2056
|
+
key: 1,
|
|
2057
|
+
elements: moreFromCommunity.value,
|
|
2058
|
+
category: unref(i18n2).baseText("nodeCreator.categoryNames.moreFromCommunity"),
|
|
2059
|
+
onSelected,
|
|
2060
|
+
expanded: true
|
|
1825
2061
|
}, null, 8, ["elements", "category"])) : createCommentVNode("", true)
|
|
1826
2062
|
]);
|
|
1827
2063
|
};
|
|
1828
2064
|
}
|
|
1829
2065
|
});
|
|
1830
2066
|
const items = "_items_1i9xd_123";
|
|
1831
|
-
const style0$
|
|
2067
|
+
const style0$4 = {
|
|
1832
2068
|
items
|
|
1833
2069
|
};
|
|
2070
|
+
const cssModules$4 = {
|
|
2071
|
+
"$style": style0$4
|
|
2072
|
+
};
|
|
2073
|
+
const NodesRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$4]]);
|
|
2074
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2075
|
+
__name: "CommunityNodeDetails",
|
|
2076
|
+
setup(__props) {
|
|
2077
|
+
const { activeViewStack, pushViewStack, popViewStack, getAllNodeCreateElements } = useViewStacks();
|
|
2078
|
+
const { communityNodeDetails } = activeViewStack;
|
|
2079
|
+
const loading = ref(false);
|
|
2080
|
+
const communityNodesStore = useCommunityNodesStore();
|
|
2081
|
+
const nodeCreatorStore = useNodeCreatorStore();
|
|
2082
|
+
const toast = useToast();
|
|
2083
|
+
const isOwner = computed(() => useUsersStore().isInstanceOwner);
|
|
2084
|
+
const updateViewStack = (key) => {
|
|
2085
|
+
const installedNodeKey = removePreviewToken(key);
|
|
2086
|
+
const installedNode = getAllNodeCreateElements().find((node) => node.key === installedNodeKey);
|
|
2087
|
+
if (installedNode) {
|
|
2088
|
+
const nodeActions = nodeCreatorStore.actions?.[installedNode.key] || [];
|
|
2089
|
+
popViewStack();
|
|
2090
|
+
const viewStack = prepareCommunityNodeDetailsViewStack(
|
|
2091
|
+
installedNode,
|
|
2092
|
+
getNodeIconSource(installedNode.properties),
|
|
2093
|
+
activeViewStack.rootView,
|
|
2094
|
+
nodeActions
|
|
2095
|
+
);
|
|
2096
|
+
pushViewStack(viewStack, {
|
|
2097
|
+
transitionDirection: "none"
|
|
2098
|
+
});
|
|
2099
|
+
} else {
|
|
2100
|
+
const viewStack = { ...activeViewStack };
|
|
2101
|
+
viewStack.communityNodeDetails.installed = true;
|
|
2102
|
+
pushViewStack(activeViewStack, { resetStacks: true });
|
|
2103
|
+
}
|
|
2104
|
+
};
|
|
2105
|
+
const updateStoresAndViewStack = async (key) => {
|
|
2106
|
+
await useNodeTypesStore().getNodeTypes();
|
|
2107
|
+
await useCredentialsStore().fetchCredentialTypes(true);
|
|
2108
|
+
updateViewStack(key);
|
|
2109
|
+
nodeCreatorStore.removeNodeFromMergedNodes(key);
|
|
2110
|
+
};
|
|
2111
|
+
const getNpmVersion = async (key) => {
|
|
2112
|
+
const communityNodeAttributes = await useNodeTypesStore().getCommunityNodeAttributes(key);
|
|
2113
|
+
if (communityNodeAttributes) {
|
|
2114
|
+
return communityNodeAttributes.npmVersion;
|
|
2115
|
+
}
|
|
2116
|
+
return void 0;
|
|
2117
|
+
};
|
|
2118
|
+
const onInstall = async () => {
|
|
2119
|
+
if (isOwner.value && activeViewStack.communityNodeDetails && !communityNodeDetails?.installed) {
|
|
2120
|
+
const { key, packageName } = activeViewStack.communityNodeDetails;
|
|
2121
|
+
try {
|
|
2122
|
+
loading.value = true;
|
|
2123
|
+
await communityNodesStore.installPackage(packageName, true, await getNpmVersion(key));
|
|
2124
|
+
await updateStoresAndViewStack(key);
|
|
2125
|
+
toast.showMessage({
|
|
2126
|
+
title: i18n.baseText("settings.communityNodes.messages.install.success"),
|
|
2127
|
+
type: "success"
|
|
2128
|
+
});
|
|
2129
|
+
} catch (error) {
|
|
2130
|
+
toast.showError(error, i18n.baseText("settings.communityNodes.messages.install.error"));
|
|
2131
|
+
} finally {
|
|
2132
|
+
loading.value = false;
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
return (_ctx, _cache) => {
|
|
2137
|
+
const _component_NodeIcon = _sfc_main$n;
|
|
2138
|
+
const _component_FontAwesomeIcon = resolveComponent("FontAwesomeIcon");
|
|
2139
|
+
const _component_N8nButton = resolveComponent("N8nButton");
|
|
2140
|
+
return openBlock(), createElementBlock("div", {
|
|
2141
|
+
class: normalizeClass(_ctx.$style.container)
|
|
2142
|
+
}, [
|
|
2143
|
+
createBaseVNode("div", {
|
|
2144
|
+
class: normalizeClass(_ctx.$style.header)
|
|
2145
|
+
}, [
|
|
2146
|
+
createBaseVNode("div", {
|
|
2147
|
+
class: normalizeClass(_ctx.$style.title)
|
|
2148
|
+
}, [
|
|
2149
|
+
unref(communityNodeDetails)?.nodeIcon ? (openBlock(), createBlock(_component_NodeIcon, {
|
|
2150
|
+
key: 0,
|
|
2151
|
+
class: normalizeClass(_ctx.$style.nodeIcon),
|
|
2152
|
+
"icon-source": unref(communityNodeDetails).nodeIcon,
|
|
2153
|
+
circle: false,
|
|
2154
|
+
"show-tooltip": false
|
|
2155
|
+
}, null, 8, ["class", "icon-source"])) : createCommentVNode("", true),
|
|
2156
|
+
createBaseVNode("span", null, toDisplayString(unref(communityNodeDetails)?.title), 1)
|
|
2157
|
+
], 2),
|
|
2158
|
+
createBaseVNode("div", null, [
|
|
2159
|
+
unref(communityNodeDetails)?.installed ? (openBlock(), createElementBlock("div", {
|
|
2160
|
+
key: 0,
|
|
2161
|
+
class: normalizeClass(_ctx.$style.installed)
|
|
2162
|
+
}, [
|
|
2163
|
+
createVNode(_component_FontAwesomeIcon, {
|
|
2164
|
+
class: normalizeClass(_ctx.$style.installedIcon),
|
|
2165
|
+
icon: "cube"
|
|
2166
|
+
}, null, 8, ["class"]),
|
|
2167
|
+
createVNode(unref(N8nText), {
|
|
2168
|
+
color: "text-light",
|
|
2169
|
+
size: "small",
|
|
2170
|
+
bold: ""
|
|
2171
|
+
}, {
|
|
2172
|
+
default: withCtx(() => [
|
|
2173
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("communityNodeDetails.installed")), 1)
|
|
2174
|
+
]),
|
|
2175
|
+
_: 1
|
|
2176
|
+
})
|
|
2177
|
+
], 2)) : isOwner.value ? (openBlock(), createBlock(_component_N8nButton, {
|
|
2178
|
+
key: 1,
|
|
2179
|
+
loading: loading.value,
|
|
2180
|
+
disabled: loading.value,
|
|
2181
|
+
label: "Install Node",
|
|
2182
|
+
size: "small",
|
|
2183
|
+
onClick: onInstall,
|
|
2184
|
+
"data-test-id": "install-community-node-button"
|
|
2185
|
+
}, null, 8, ["loading", "disabled"])) : createCommentVNode("", true)
|
|
2186
|
+
])
|
|
2187
|
+
], 2)
|
|
2188
|
+
], 2);
|
|
2189
|
+
};
|
|
2190
|
+
}
|
|
2191
|
+
});
|
|
2192
|
+
const container$1 = "_container_1eqm0_123";
|
|
2193
|
+
const header$1 = "_header_1eqm0_131";
|
|
2194
|
+
const title$1 = "_title_1eqm0_137";
|
|
2195
|
+
const nodeIcon$1 = "_nodeIcon_1eqm0_145";
|
|
2196
|
+
const installedIcon = "_installedIcon_1eqm0_150";
|
|
2197
|
+
const installed = "_installed_1eqm0_150";
|
|
2198
|
+
const style0$3 = {
|
|
2199
|
+
container: container$1,
|
|
2200
|
+
header: header$1,
|
|
2201
|
+
title: title$1,
|
|
2202
|
+
nodeIcon: nodeIcon$1,
|
|
2203
|
+
installedIcon,
|
|
2204
|
+
installed
|
|
2205
|
+
};
|
|
2206
|
+
const cssModules$3 = {
|
|
2207
|
+
"$style": style0$3
|
|
2208
|
+
};
|
|
2209
|
+
const CommunityNodeDetails = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$3]]);
|
|
2210
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2211
|
+
__name: "CommunityNodeDocsLink",
|
|
2212
|
+
props: {
|
|
2213
|
+
packageName: {}
|
|
2214
|
+
},
|
|
2215
|
+
setup(__props) {
|
|
2216
|
+
const props = __props;
|
|
2217
|
+
const openCommunityNodeDocsPage = () => {
|
|
2218
|
+
const newTab = window.open(`https://www.npmjs.com/package/${props.packageName}`, "_blank");
|
|
2219
|
+
if (newTab) newTab.opener = null;
|
|
2220
|
+
};
|
|
2221
|
+
return (_ctx, _cache) => {
|
|
2222
|
+
const _component_FontAwesomeIcon = resolveComponent("FontAwesomeIcon");
|
|
2223
|
+
return openBlock(), createBlock(unref(N8nLink), {
|
|
2224
|
+
theme: "text",
|
|
2225
|
+
onClick: openCommunityNodeDocsPage,
|
|
2226
|
+
class: normalizeClass(_ctx.$style.container),
|
|
2227
|
+
title: unref(i18n).baseText("communityNodesDocsLink.link.title")
|
|
2228
|
+
}, {
|
|
2229
|
+
default: withCtx(() => [
|
|
2230
|
+
createVNode(unref(N8nText), {
|
|
2231
|
+
size: "small",
|
|
2232
|
+
bold: "",
|
|
2233
|
+
style: { "margin-right": "5px" }
|
|
2234
|
+
}, {
|
|
2235
|
+
default: withCtx(() => [
|
|
2236
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("communityNodesDocsLink.title")), 1)
|
|
2237
|
+
]),
|
|
2238
|
+
_: 1
|
|
2239
|
+
}),
|
|
2240
|
+
createVNode(_component_FontAwesomeIcon, { icon: "external-link-alt" })
|
|
2241
|
+
]),
|
|
2242
|
+
_: 1
|
|
2243
|
+
}, 8, ["class", "title"]);
|
|
2244
|
+
};
|
|
2245
|
+
}
|
|
2246
|
+
});
|
|
2247
|
+
const container = "_container_x2no6_123";
|
|
2248
|
+
const style0$2 = {
|
|
2249
|
+
container
|
|
2250
|
+
};
|
|
1834
2251
|
const cssModules$2 = {
|
|
1835
2252
|
"$style": style0$2
|
|
1836
2253
|
};
|
|
1837
|
-
const
|
|
2254
|
+
const CommunityNodeDocsLink = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
|
|
1838
2255
|
const _hoisted_1 = ["textContent"];
|
|
1839
2256
|
const _hoisted_2 = ["textContent"];
|
|
1840
2257
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -1846,15 +2263,31 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1846
2263
|
const { pushViewStack, popViewStack, updateCurrentViewStack } = useViewStacks();
|
|
1847
2264
|
const { setActiveItemIndex, attachKeydownEvent, detachKeydownEvent } = useKeyboardNavigation();
|
|
1848
2265
|
const nodeCreatorStore = useNodeCreatorStore();
|
|
2266
|
+
const { isInstanceOwner } = useUsersStore();
|
|
1849
2267
|
const activeViewStack = computed(() => useViewStacks().activeViewStack);
|
|
2268
|
+
const communityNodeDetails = computed(() => activeViewStack.value.communityNodeDetails);
|
|
1850
2269
|
const viewStacks = computed(() => useViewStacks().viewStacks);
|
|
1851
2270
|
const isActionsMode = computed(() => useViewStacks().activeViewStackMode === "actions");
|
|
1852
|
-
const searchPlaceholder = computed(
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
2271
|
+
const searchPlaceholder = computed(() => {
|
|
2272
|
+
let node = activeViewStack.value?.title;
|
|
2273
|
+
if (communityNodeDetails.value) {
|
|
2274
|
+
node = communityNodeDetails.value.title;
|
|
2275
|
+
}
|
|
2276
|
+
if (isActionsMode.value) {
|
|
2277
|
+
return i18n2.baseText("nodeCreator.actionsCategory.searchActions", {
|
|
2278
|
+
interpolate: { node }
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2281
|
+
return i18n2.baseText("nodeCreator.searchBar.searchNodes");
|
|
2282
|
+
});
|
|
2283
|
+
const showSearchBar = computed(() => {
|
|
2284
|
+
if (activeViewStack.value.communityNodeDetails) return false;
|
|
2285
|
+
return activeViewStack.value.hasSearch;
|
|
2286
|
+
});
|
|
1857
2287
|
const nodeCreatorView = computed(() => useNodeCreatorStore().selectedView);
|
|
2288
|
+
const isCommunityNodeActionsMode = computed(() => {
|
|
2289
|
+
return communityNodeDetails.value && isActionsMode.value && activeViewStack.value.subcategory;
|
|
2290
|
+
});
|
|
1858
2291
|
function getDefaultActiveIndex(search = "") {
|
|
1859
2292
|
if (activeViewStack.value.mode === "actions") {
|
|
1860
2293
|
return 1;
|
|
@@ -1963,7 +2396,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1963
2396
|
size: "2x"
|
|
1964
2397
|
}, null, 8, ["class"])
|
|
1965
2398
|
], 2)) : createCommentVNode("", true),
|
|
1966
|
-
activeViewStack.value.nodeIcon ? (openBlock(), createBlock(_sfc_main$
|
|
2399
|
+
activeViewStack.value.nodeIcon ? (openBlock(), createBlock(_sfc_main$n, {
|
|
1967
2400
|
key: 1,
|
|
1968
2401
|
class: normalizeClass(_ctx.$style.nodeIcon),
|
|
1969
2402
|
"icon-source": activeViewStack.value.nodeIcon,
|
|
@@ -1975,7 +2408,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1975
2408
|
key: 2,
|
|
1976
2409
|
class: normalizeClass(_ctx.$style.title),
|
|
1977
2410
|
textContent: toDisplayString(activeViewStack.value.title)
|
|
1978
|
-
}, null, 10, _hoisted_1)) : createCommentVNode("", true)
|
|
2411
|
+
}, null, 10, _hoisted_1)) : createCommentVNode("", true),
|
|
2412
|
+
communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeDocsLink, {
|
|
2413
|
+
key: 3,
|
|
2414
|
+
"package-name": communityNodeDetails.value.packageName
|
|
2415
|
+
}, null, 8, ["package-name"])) : createCommentVNode("", true)
|
|
1979
2416
|
], 2),
|
|
1980
2417
|
activeViewStack.value.subtitle ? (openBlock(), createElementBlock("p", {
|
|
1981
2418
|
key: 0,
|
|
@@ -1983,13 +2420,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1983
2420
|
textContent: toDisplayString(activeViewStack.value.subtitle)
|
|
1984
2421
|
}, null, 10, _hoisted_2)) : createCommentVNode("", true)
|
|
1985
2422
|
], 2),
|
|
1986
|
-
|
|
2423
|
+
showSearchBar.value ? (openBlock(), createBlock(SearchBar, {
|
|
1987
2424
|
key: 0,
|
|
1988
2425
|
class: normalizeClass(_ctx.$style.searchBar),
|
|
1989
2426
|
placeholder: searchPlaceholder.value ? searchPlaceholder.value : unref(i18n2).baseText("nodeCreator.searchBar.searchNodes"),
|
|
1990
2427
|
"model-value": activeViewStack.value.search,
|
|
1991
2428
|
"onUpdate:modelValue": onSearch
|
|
1992
2429
|
}, null, 8, ["class", "placeholder", "model-value"])) : createCommentVNode("", true),
|
|
2430
|
+
communityNodeDetails.value ? (openBlock(), createBlock(CommunityNodeDetails, { key: 1 })) : createCommentVNode("", true),
|
|
2431
|
+
communityNodeDetails.value && !isActionsMode.value ? (openBlock(), createBlock(CommunityNodeInfo, { key: 2 })) : createCommentVNode("", true),
|
|
1993
2432
|
createBaseVNode("div", {
|
|
1994
2433
|
class: normalizeClass(_ctx.$style.renderedItems)
|
|
1995
2434
|
}, [
|
|
@@ -2003,7 +2442,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2003
2442
|
key: 2,
|
|
2004
2443
|
"root-view": nodeCreatorView.value
|
|
2005
2444
|
}, _ctx.$attrs), null, 16, ["root-view"]))
|
|
2006
|
-
], 2)
|
|
2445
|
+
], 2),
|
|
2446
|
+
communityNodeDetails.value && !isCommunityNodeActionsMode.value ? (openBlock(), createBlock(CommunityNodeFooter, {
|
|
2447
|
+
key: 3,
|
|
2448
|
+
"package-name": communityNodeDetails.value.packageName,
|
|
2449
|
+
"show-manage": communityNodeDetails.value.installed && unref(isInstanceOwner)
|
|
2450
|
+
}, null, 8, ["package-name", "show-manage"])) : createCommentVNode("", true)
|
|
2007
2451
|
], 34))
|
|
2008
2452
|
]),
|
|
2009
2453
|
_: 1
|
|
@@ -2165,7 +2609,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2165
2609
|
[_ctx.$style.active]: showScrim.value
|
|
2166
2610
|
})
|
|
2167
2611
|
}, null, 2),
|
|
2168
|
-
_ctx.active ? (openBlock(), createBlock(_sfc_main$
|
|
2612
|
+
_ctx.active ? (openBlock(), createBlock(_sfc_main$o, {
|
|
2169
2613
|
key: 0,
|
|
2170
2614
|
class: normalizeClass(_ctx.$style.close),
|
|
2171
2615
|
type: "secondary",
|