n8n-editor-ui 1.101.0 → 1.102.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/{ActionDropdown-BujIG0Jq.js → ActionDropdown-D-JmCYsp.js} +2 -2
- package/dist/assets/{AnimatedSpinner-B5cpb6Fs.js → AnimatedSpinner-BiuDg2x2.js} +1 -1
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-BPigGQTI.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-Bp194Fz4.js} +1 -1
- package/dist/assets/{AuthView-BOTPYtpM.js → AuthView-DF-20OPE.js} +2 -2
- package/dist/assets/{ChangePasswordView-DbeC55bz.js → ChangePasswordView-DSn8-M1-.js} +3 -3
- package/dist/assets/CollectionParameter-Bz5DzZqs.js +4 -0
- package/dist/assets/{CredentialsView-DUh5K-2r.js → CredentialsView-IQx76pD4.js} +8 -8
- package/dist/assets/{DemoFooter-BXPfbNJE.js → DemoFooter-49OiW0k2.js} +8 -7
- package/dist/assets/{EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-CDDQIxv5.js → EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-FNKd4r6R.js} +1 -1
- package/dist/assets/{EntityNotFound-CBUuOOYw.js → EntityNotFound-DScKsOtg.js} +1 -1
- package/dist/assets/{EntityUnAuthorised-7xgN3ECo.js → EntityUnAuthorised-DweZmhgI.js} +1 -1
- package/dist/assets/{ErrorView-BVfcsoOa.js → ErrorView-CNDVS4gm.js} +4 -4
- package/dist/assets/{EvaluationsRootView-BjrpKDj-.js → EvaluationsRootView-81SdPChp.js} +19 -27
- package/dist/assets/{EvaluationsView-DdmFZCH-.js → EvaluationsView-BAyQWPF9.js} +7 -7
- package/dist/assets/{ExecutionsTime-kMSlccIr.css → ExecutionsTime-DkME6I3E.css} +26 -19
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-Ctx5Ybnr.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-Qw7S05EC.js} +23 -21
- package/dist/assets/{ExecutionsView-8BjGHy2I.js → ExecutionsView--yDyvnL8.js} +15 -16
- package/dist/assets/{ExecutionsView-DSsowKj4.css → ExecutionsView-BHBePl1_.css} +1 -1
- package/dist/assets/{FileSaver.min-C5wzcK59.js → FileSaver.min-CeGSkamF.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-DjlaZyUQ.css → FixedCollectionParameter-CEzpjeQZ.css} +18 -18
- package/dist/assets/{FixedCollectionParameter-BrPQ5Vay.js → FixedCollectionParameter-tgbkzIuD.js} +7 -7
- package/dist/assets/{ForgotMyPasswordView-L0afefc1.js → ForgotMyPasswordView-CVwKac4K.js} +3 -3
- package/dist/assets/{InfoAccordion-CEk3XG5b.js → InfoAccordion-75IQV-_q.js} +1 -1
- package/dist/assets/{InsightsChartAverageRuntime-BrwBWr_R.js → InsightsChartAverageRuntime-C4C4zghF.js} +4 -4
- package/dist/assets/{InsightsChartFailed-ILKWvikG.js → InsightsChartFailed-DyhWE17m.js} +4 -4
- package/dist/assets/{InsightsChartFailureRate-D1AVYwU7.js → InsightsChartFailureRate-B09GcGvY.js} +4 -4
- package/dist/assets/{InsightsChartTimeSaved-D49Rwn6-.js → InsightsChartTimeSaved-DGzFyou3.js} +4 -4
- package/dist/assets/{InsightsChartTotal-Bs-pUgA3.js → InsightsChartTotal-fIUzF41H.js} +4 -4
- package/dist/assets/{InsightsDashboard-BIC4uZpW.js → InsightsDashboard-Qhv7fScv.js} +10 -10
- package/dist/assets/{InsightsPaywall-DmwFI-6e.js → InsightsPaywall-C3-la0kD.js} +1 -1
- package/dist/assets/{InsightsSummary-D9lEzWNT.js → InsightsSummary-CJgV5s0y.js} +14 -13
- package/dist/assets/{InsightsSummary-DzGQpM5h.css → InsightsSummary-DTFIhBF3.css} +25 -27
- package/dist/assets/InsightsTableWorkflows-P5OHXu1Y.js +177 -0
- package/dist/assets/{Logo-DNxOhbuV.js → Logo-8MWdHUz0.js} +1 -1
- package/dist/assets/{LogsPanel-DvWnD7rJ.js → LogsPanel-BabpRONg.js} +279 -212
- package/dist/assets/{LogsPanel-D5R6F35L.css → LogsPanel-Bvy4ANV7.css} +106 -61
- package/dist/assets/{MainHeader-BVHIuVVT.js → MainHeader-0ppftO6b.js} +10 -10
- package/dist/assets/{MainSidebar-CEHr93uL.js → MainSidebar-BnXOkYK4.js} +23 -16
- package/dist/assets/{MainSidebar-DqrgzqvZ.css → MainSidebar-CaLHZgDB.css} +2 -2
- package/dist/assets/{InsightsTableWorkflows-CC8t-sAL.js → N8nDataTableServer-Cx18Zd1O.js} +9 -181
- package/dist/assets/{NodeCreation-Bq5626Ha.js → NodeCreation-DKbc91uY.js} +7 -7
- package/dist/assets/{NodeCreator-Dk0sNXFZ.css → NodeCreator-DWE25utr.css} +51 -58
- package/dist/assets/{NodeCreator-D7xT3ogw.js → NodeCreator-xRYJHbTG.js} +118 -112
- package/dist/assets/NodeDetailsView-CPVE5S8P.js +1155 -0
- package/dist/assets/NodeDetailsView-CaTI-1QQ.css +668 -0
- package/dist/assets/NodeDetailsViewV2-5pxsZwAo.js +1061 -0
- package/dist/assets/NodeDetailsViewV2-BxNx4ZUM.css +506 -0
- package/dist/assets/{NodeView-DL8JxnMc.css → NodeView-Cgf2HuDk.css} +263 -110
- package/dist/assets/{NodeView-DoR46iB5.js → NodeView-DYjZmKNE.js} +580 -409
- package/dist/assets/{ProjectHeader-DSKKwiQ0.js → ProjectHeader-e8JosKaj.js} +5 -5
- package/dist/assets/{ProjectSettings-C3sMIDHh.js → ProjectSettings-DNKcVLkd.js} +201 -25
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-cnANEo9o.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-EuKDPqQH.js} +3 -3
- package/dist/assets/{ResourcesListLayout-BVbjqFbc.js → ResourcesListLayout-C4y0iPmg.js} +4 -4
- package/dist/assets/{RunData-DG20AzLo.js → RunData-D3xzjO33.js} +124 -99
- package/dist/assets/{RunData-B5_okvCv.css → RunData-DuKNwYqe.css} +99 -85
- package/dist/assets/{RunDataJson-7okRLIES.js → RunDataJson-D5YFtOcJ.js} +16 -20
- package/dist/assets/{RunDataJsonActions-DrgwFS0W.css → RunDataJsonActions-B2jW3_UG.css} +3 -5
- package/dist/assets/{RunDataJsonActions-Qkg8HmUd.js → RunDataJsonActions-BWvs4coo.js} +15 -16
- package/dist/assets/{RunDataParsedAiContent-DRO1Bjsh.js → RunDataParsedAiContent-BYISiW-I.js} +12 -12
- package/dist/assets/{RunDataParsedAiContent-9EEUzCKp.css → RunDataParsedAiContent-wfIiKsq7.css} +16 -13
- package/dist/assets/{RunDataSearch-R6qtl0Jf.css → RunDataSearch-2eEalFoi.css} +8 -7
- package/dist/assets/{RunDataSearch-D5eQUWvi.js → RunDataSearch-oo3_BoLt.js} +4 -4
- package/dist/assets/{RunDataTable-CJmmTtEp.js → RunDataTable-6rCOQNCX.js} +126 -54
- package/dist/assets/{RunDataTable-CykHIwNT.css → RunDataTable-CTBtmQIs.css} +84 -44
- package/dist/assets/{SamlOnboarding-ClxYfm5z.js → SamlOnboarding-BG-gGcbY.js} +3 -3
- package/dist/assets/{SettingsApiView-Ds7FYVrN.js → SettingsApiView-Bmlbp7pD.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-QKvLs6gi.js → SettingsCommunityNodesView-4DWd4UiC.js} +32 -6
- package/dist/assets/{SettingsExternalSecrets-d1KDgYYp.css → SettingsExternalSecrets-BAX9ENm9.css} +9 -6
- package/dist/assets/{SettingsExternalSecrets-DGRdvsMy.js → SettingsExternalSecrets-hpUcipWw.js} +17 -13
- package/dist/assets/{SettingsLdapView-C_LJwixk.js → SettingsLdapView-7p7L95v9.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-CaEJvgJ9.js → SettingsLogStreamingView-4CpWJqj_.js} +1 -1
- package/dist/assets/{SettingsPersonalView-DlwXaGDs.js → SettingsPersonalView-9iP06ihA.js} +11 -3
- package/dist/assets/{SettingsSourceControl-B6eULOfX.js → SettingsSourceControl-BGjWhqqJ.js} +5 -5
- package/dist/assets/{SettingsSso-5zcg-J4E.js → SettingsSso-ChOyD3kc.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-CMBvYdjo.js → SettingsUsageAndPlan-jP8nn4Rh.js} +1 -1
- package/dist/assets/SettingsUsersView-BhfbqjxW.js +861 -0
- package/dist/assets/SettingsUsersView-BuZbf1jq.css +446 -0
- package/dist/assets/{SettingsView-Bawwm19P.css → SettingsView-4yzof_Pb.css} +4 -4
- package/dist/assets/{SettingsView-BuDKhqwZ.js → SettingsView-DTFEdRdj.js} +14 -14
- package/dist/assets/{SetupView-DSaQcQDF.js → SetupView-CXuAO6tx.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-BWISZAxq.js → SetupWorkflowCredentialsButton-Bj4rSqAV.js} +2 -2
- package/dist/assets/{SetupWorkflowFromTemplateView-CfDWCwoA.js → SetupWorkflowFromTemplateView-DG8Ml3A0.js} +8 -12
- package/dist/assets/{SigninView-BpjyswHb.js → SigninView-KmmptKWN.js} +7 -3
- package/dist/assets/{SignoutView-f_CoUl4S.js → SignoutView-8rAPEX_X.js} +1 -1
- package/dist/assets/{SignupView-q3f9g3P9.js → SignupView-ZYUP6f-Y.js} +3 -3
- package/dist/assets/{TableBase-DruQl-SO.js → TableBase-7XxrB0dw.js} +1 -1
- package/dist/assets/{Tags-DbmKHzWo.js → Tags-C8Jnw74N.js} +1 -1
- package/dist/assets/{TemplateDetails-DP_5pkzG.js → TemplateDetails-Bk1ixuRQ.js} +2 -2
- package/dist/assets/{TemplateList-y8Aumcsb.js → TemplateList-9SAC8OGn.js} +6 -3
- package/dist/assets/{TemplatesCollectionView-VdQpHtxs.js → TemplatesCollectionView-CLZDJ4HM.js} +6 -6
- package/dist/assets/{TemplatesSearchView-BUcYRVEK.js → TemplatesSearchView-DRzdGp3s.js} +8 -8
- package/dist/assets/{TemplatesView-4DUEEEtD.js → TemplatesView-V6ud-nM5.js} +3 -3
- package/dist/assets/{TemplatesWorkflowView--zUXMB8f.js → TemplatesWorkflowView-CLb4CuR2.js} +6 -6
- package/dist/assets/{NodeDetailsView-DB-5JPUD.js → TriggerPanel-BOC7PYsi.js} +498 -1415
- package/dist/assets/{NodeDetailsView-BaIj2qAa.css → TriggerPanel-DRpKKKun.css} +296 -903
- package/dist/assets/{VariablesView-DoWb0Vtv.js → VariablesView-BDzhSaxw.js} +6 -6
- package/dist/assets/{VariablesView-Kog_9PMT.css → VariablesView-Bh0OeH4s.css} +6 -6
- package/dist/assets/{WorkerView-D56d7XJA.js → WorkerView-C2A7cYkr.js} +9 -9
- package/dist/assets/{WorkflowActivator-CQxaDCfA.js → WorkflowActivator-BmIzNsA8.js} +8 -8
- package/dist/assets/{WorkflowActivator-BJPsIkXE.css → WorkflowActivator-DhLX6i1H.css} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-D9p_ZqmA.js → WorkflowExecutionsInfoAccordion-Cn4GRGO_.js} +6 -6
- package/dist/assets/{WorkflowExecutionsLandingPage-CymYth6K.js → WorkflowExecutionsLandingPage-s-dIgG6D.js} +3 -3
- package/dist/assets/{WorkflowExecutionsPreview-DRvf3WQC.js → WorkflowExecutionsPreview-BE7NfRAa.js} +12 -12
- package/dist/assets/{WorkflowExecutionsView-DxiIaUKV.js → WorkflowExecutionsView-DFmBdF-B.js} +16 -16
- package/dist/assets/{WorkflowHistory-DBPIq2u7.js → WorkflowHistory-3wO0nQYD.js} +4 -4
- package/dist/assets/{WorkflowOnboardingView-D4QKSetf.js → WorkflowOnboardingView-mBVE6x-i.js} +1 -1
- package/dist/assets/{WorkflowPreview-D3YRZjYi.js → WorkflowPreview-DlNMFCKn.js} +1 -1
- package/dist/assets/{WorkflowsView-ipf8KKwB.css → WorkflowsView-CyJbJBc8.css} +25 -21
- package/dist/assets/{WorkflowsView-DPADmBVd.js → WorkflowsView-DsAOuPT0.js} +77 -72
- package/dist/assets/{chartjs.utils-Cou_ISuU.js → chartjs.utils-BywXqBmg.js} +2 -2
- package/dist/assets/{en-DzZibgm_.js → en-CcKAtA8V.js} +45 -5
- package/dist/assets/{global-link-actions-olwfH36z.js → global-link-actions-BzAw9ZbO.js} +1 -1
- package/dist/assets/{import-curl-DD21H3kK.js → import-curl-1LWAxRTV.js} +1 -1
- package/dist/assets/{index-uJOu4Uio.js → index-B6A1nL2x.js} +1 -1
- package/dist/assets/{index-BzamKJpD.css → index-C66_v3sX.css} +1302 -1279
- package/dist/assets/{index-7S5ADieN.js → index-V0GOmfo8.js} +40721 -34933
- package/dist/assets/{pickBy-DPxZbMic.js → pickBy-CtRItcCT.js} +1 -1
- package/dist/assets/{templateActions-DJJfyIhq.js → templateActions-DpIzx0ws.js} +2 -2
- package/dist/assets/{useBeforeUnload-DveXGtGN.js → useBeforeUnload-B0EP7Q2i.js} +1 -1
- package/dist/assets/{useExecutionDebugging-DM4nhx6D.js → useExecutionDebugging-AwlOA2KI.js} +2 -1
- package/dist/assets/{useExecutionHelpers-BfF56crp.js → useExecutionHelpers-DvBwGIzz.js} +1 -1
- package/dist/assets/{useImportCurlCommand-BAgQhwtE.js → useImportCurlCommand-DIFC7Epr.js} +2 -2
- package/dist/assets/{useKeybindings-CV0VsjNP.js → useKeybindings-CduQ2pi5.js} +4 -4
- package/dist/assets/{useProjectPages-DgMGWOaO.js → useProjectPages-DmNmAOdq.js} +1 -1
- package/dist/assets/{usePushConnection-D8SE-itT.js → usePushConnection-Dyd5__87.js} +6 -12
- package/dist/assets/{useWorkflowActivate-BKz3N1SO.js → useWorkflowActivate-z9iwP6OY.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/vite.config.mts +2 -2
- package/dist/assets/CollectionParameter-CExdr4jd.js +0 -4
- package/dist/assets/SettingsUsersView-BL3TAhT8.js +0 -338
- package/dist/assets/SettingsUsersView-By12E2li.css +0 -143
|
@@ -0,0 +1,1155 @@
|
|
|
1
|
+
import { d as defineComponent, e as createBlock, g as openBlock, hr as Draggable, n as normalizeClass, w as withCtx, j as createBaseVNode, h as createElementBlock, f as createCommentVNode, i as createVNode, N as N8nIcon, _ as _export_sfc, cb as useThrottleFn, aM as useNDVStore, T as useUIStore, r as ref, cJ as useSlots, o as onMounted, x as computed, cm as ndvEventBus, I as onBeforeUnmount, aa as watch, ib as MAIN_NODE_PANEL_WIDTH, b6 as useStorage, ic as LOCAL_STORAGE_MAIN_PANEL_RELATIVE_WIDTH, l as unref, P as normalizeStyle, J as renderSlot, c8 as N8nResizeWrapper, K as nextTick, bB as useNodeHelpers, fn as storeToRefs, bz as usePinnedData, bG as useNodeTypesStore, a4 as useWorkflowsStore, dV as useDeviceSupport, e2 as getNodeOutputs, bo as NodeConnectionTypes, bH as START_NODE_TYPE, id as EXECUTABLE_TRIGGER_NODE_TYPES, aS as STICKY_NODE_TYPE, dz as BASE_NODE_SURVEY_URL, gw as dataPinningEventBus, O as resolveComponent, $ as N8nTooltip, p as N8nText, k as createTextVNode, t as toDisplayString, c as useI18n, bh as createSlots, Q as createEventBus, c9 as useStyles, ie as APP_MODALS_ELEMENT_ID, ay as useTelemetry, aA as useMessage, aB as MODAL_CONFIRM, et as jsonParse, bf as useExternalHooks } from "./index-V0GOmfo8.js";
|
|
2
|
+
import { N as NodeSettings } from "./NodeView-DYjZmKNE.js";
|
|
3
|
+
import { _ as __unplugin_components_0, O as OutputPanel, T as TriggerPanel, I as InputPanel } from "./TriggerPanel-BOC7PYsi.js";
|
|
4
|
+
import { u as useWorkflowActivate } from "./useWorkflowActivate-z9iwP6OY.js";
|
|
5
|
+
import "./ActionDropdown-D-JmCYsp.js";
|
|
6
|
+
import "./useKeybindings-CduQ2pi5.js";
|
|
7
|
+
import "./import-curl-1LWAxRTV.js";
|
|
8
|
+
import "./global-link-actions-BzAw9ZbO.js";
|
|
9
|
+
import "./useExecutionDebugging-AwlOA2KI.js";
|
|
10
|
+
import "./useBeforeUnload-B0EP7Q2i.js";
|
|
11
|
+
import "./RunData-D3xzjO33.js";
|
|
12
|
+
import "./FileSaver.min-CeGSkamF.js";
|
|
13
|
+
import "./useExecutionHelpers-DvBwGIzz.js";
|
|
14
|
+
import "./RunDataParsedAiContent-BYISiW-I.js";
|
|
15
|
+
import "./InfoAccordion-75IQV-_q.js";
|
|
16
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
17
|
+
__name: "PanelDragButton",
|
|
18
|
+
props: {
|
|
19
|
+
canMoveRight: { type: Boolean },
|
|
20
|
+
canMoveLeft: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
emits: ["drag", "dragstart", "dragend"],
|
|
23
|
+
setup(__props, { emit: __emit }) {
|
|
24
|
+
const emit = __emit;
|
|
25
|
+
const onDrag = (e) => {
|
|
26
|
+
emit("drag", e);
|
|
27
|
+
};
|
|
28
|
+
const onDragEnd = () => {
|
|
29
|
+
emit("dragend");
|
|
30
|
+
};
|
|
31
|
+
const onDragStart = () => {
|
|
32
|
+
emit("dragstart");
|
|
33
|
+
};
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
const _component_n8n_icon = N8nIcon;
|
|
36
|
+
return openBlock(), createBlock(Draggable, {
|
|
37
|
+
type: "panel-resize",
|
|
38
|
+
class: normalizeClass(_ctx.$style.dragContainer),
|
|
39
|
+
onDrag,
|
|
40
|
+
onDragstart: onDragStart,
|
|
41
|
+
onDragend: onDragEnd
|
|
42
|
+
}, {
|
|
43
|
+
default: withCtx(({ isDragging }) => [
|
|
44
|
+
createBaseVNode("div", {
|
|
45
|
+
class: normalizeClass({ [_ctx.$style.dragButton]: true }),
|
|
46
|
+
"data-test-id": "panel-drag-button"
|
|
47
|
+
}, [
|
|
48
|
+
_ctx.canMoveLeft ? (openBlock(), createElementBlock("span", {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: normalizeClass({ [_ctx.$style.leftArrow]: true, [_ctx.$style.visible]: isDragging })
|
|
51
|
+
}, [
|
|
52
|
+
createVNode(_component_n8n_icon, { icon: "arrow-left" })
|
|
53
|
+
], 2)) : createCommentVNode("", true),
|
|
54
|
+
_ctx.canMoveRight ? (openBlock(), createElementBlock("span", {
|
|
55
|
+
key: 1,
|
|
56
|
+
class: normalizeClass({ [_ctx.$style.rightArrow]: true, [_ctx.$style.visible]: isDragging })
|
|
57
|
+
}, [
|
|
58
|
+
createVNode(_component_n8n_icon, { icon: "arrow-right" })
|
|
59
|
+
], 2)) : createCommentVNode("", true),
|
|
60
|
+
createBaseVNode("div", {
|
|
61
|
+
class: normalizeClass(_ctx.$style.grid)
|
|
62
|
+
}, _cache[0] || (_cache[0] = [
|
|
63
|
+
createBaseVNode("div", null, [
|
|
64
|
+
createBaseVNode("div"),
|
|
65
|
+
createBaseVNode("div"),
|
|
66
|
+
createBaseVNode("div"),
|
|
67
|
+
createBaseVNode("div"),
|
|
68
|
+
createBaseVNode("div")
|
|
69
|
+
], -1),
|
|
70
|
+
createBaseVNode("div", null, [
|
|
71
|
+
createBaseVNode("div"),
|
|
72
|
+
createBaseVNode("div"),
|
|
73
|
+
createBaseVNode("div"),
|
|
74
|
+
createBaseVNode("div"),
|
|
75
|
+
createBaseVNode("div")
|
|
76
|
+
], -1)
|
|
77
|
+
]), 2)
|
|
78
|
+
], 2)
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
}, 8, ["class"]);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const dragContainer = "_dragContainer_16elv_123";
|
|
86
|
+
const dragButton = "_dragButton_16elv_127";
|
|
87
|
+
const leftArrow = "_leftArrow_16elv_141 _arrow_16elv_150";
|
|
88
|
+
const rightArrow = "_rightArrow_16elv_142 _arrow_16elv_150";
|
|
89
|
+
const visible$1 = "_visible_16elv_146";
|
|
90
|
+
const arrow = "_arrow_16elv_150";
|
|
91
|
+
const grid = "_grid_16elv_168";
|
|
92
|
+
const style0$1 = {
|
|
93
|
+
dragContainer,
|
|
94
|
+
dragButton,
|
|
95
|
+
leftArrow,
|
|
96
|
+
rightArrow,
|
|
97
|
+
visible: visible$1,
|
|
98
|
+
arrow,
|
|
99
|
+
grid
|
|
100
|
+
};
|
|
101
|
+
const cssModules$2 = {
|
|
102
|
+
"$style": style0$1
|
|
103
|
+
};
|
|
104
|
+
const PanelDragButton = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
|
|
105
|
+
const SIDE_MARGIN = 24;
|
|
106
|
+
const SIDE_PANELS_MARGIN = 80;
|
|
107
|
+
const MIN_PANEL_WIDTH = 310;
|
|
108
|
+
const PANEL_WIDTH = 350;
|
|
109
|
+
const PANEL_WIDTH_LARGE = 420;
|
|
110
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
111
|
+
__name: "NDVDraggablePanels",
|
|
112
|
+
props: {
|
|
113
|
+
isDraggable: { type: Boolean },
|
|
114
|
+
hideInputAndOutput: { type: Boolean },
|
|
115
|
+
nodeType: {}
|
|
116
|
+
},
|
|
117
|
+
emits: ["init", "dragstart", "dragend", "switchSelectedNode", "close"],
|
|
118
|
+
setup(__props, { emit: __emit }) {
|
|
119
|
+
const MIN_WINDOW_WIDTH = 2 * (SIDE_MARGIN + SIDE_PANELS_MARGIN) + MIN_PANEL_WIDTH;
|
|
120
|
+
const initialMainPanelWidth = {
|
|
121
|
+
regular: MAIN_NODE_PANEL_WIDTH,
|
|
122
|
+
dragless: MAIN_NODE_PANEL_WIDTH,
|
|
123
|
+
unknown: MAIN_NODE_PANEL_WIDTH,
|
|
124
|
+
inputless: MAIN_NODE_PANEL_WIDTH,
|
|
125
|
+
wide: MAIN_NODE_PANEL_WIDTH * 2
|
|
126
|
+
};
|
|
127
|
+
const throttledOnResize = useThrottleFn(onResize, 100);
|
|
128
|
+
const ndvStore = useNDVStore();
|
|
129
|
+
const uiStore = useUIStore();
|
|
130
|
+
const props = __props;
|
|
131
|
+
const isDragging = ref(false);
|
|
132
|
+
const initialized = ref(false);
|
|
133
|
+
const containerWidth = ref(uiStore.appGridDimensions.width);
|
|
134
|
+
const emit = __emit;
|
|
135
|
+
const slots = useSlots();
|
|
136
|
+
onMounted(() => {
|
|
137
|
+
if (mainPanelDimensions.value.relativeLeft === 1 && mainPanelDimensions.value.relativeRight === 1) {
|
|
138
|
+
setMainPanelWidth();
|
|
139
|
+
setPositions(getInitialLeftPosition(mainPanelDimensions.value.relativeWidth));
|
|
140
|
+
restorePositionData();
|
|
141
|
+
}
|
|
142
|
+
emit("init", { position: mainPanelDimensions.value.relativeLeft });
|
|
143
|
+
setTimeout(() => {
|
|
144
|
+
initialized.value = true;
|
|
145
|
+
}, 0);
|
|
146
|
+
ndvEventBus.on("setPositionByName", setPositionByName);
|
|
147
|
+
});
|
|
148
|
+
onBeforeUnmount(() => {
|
|
149
|
+
ndvEventBus.off("setPositionByName", setPositionByName);
|
|
150
|
+
});
|
|
151
|
+
watch(
|
|
152
|
+
() => uiStore.appGridDimensions,
|
|
153
|
+
async (dimensions) => {
|
|
154
|
+
const ndv = document.getElementById("ndv");
|
|
155
|
+
if (ndv) {
|
|
156
|
+
await nextTick();
|
|
157
|
+
const { width: ndvWidth } = ndv.getBoundingClientRect();
|
|
158
|
+
containerWidth.value = ndvWidth;
|
|
159
|
+
} else {
|
|
160
|
+
containerWidth.value = dimensions.width;
|
|
161
|
+
}
|
|
162
|
+
const minRelativeWidth = pxToRelativeWidth(MIN_PANEL_WIDTH);
|
|
163
|
+
const isBelowMinWidthMainPanel = mainPanelDimensions.value.relativeWidth < minRelativeWidth;
|
|
164
|
+
if (isBelowMinWidthMainPanel) {
|
|
165
|
+
setMainPanelWidth(minRelativeWidth);
|
|
166
|
+
}
|
|
167
|
+
const isBelowMinLeft = minimumLeftPosition.value > mainPanelDimensions.value.relativeLeft;
|
|
168
|
+
const isMaxRight = maximumRightPosition.value > mainPanelDimensions.value.relativeRight;
|
|
169
|
+
if (dimensions.width > MIN_WINDOW_WIDTH && isBelowMinLeft && isMaxRight) {
|
|
170
|
+
setMainPanelWidth(minRelativeWidth);
|
|
171
|
+
setPositions(getInitialLeftPosition(mainPanelDimensions.value.relativeWidth));
|
|
172
|
+
}
|
|
173
|
+
setPositions(mainPanelDimensions.value.relativeLeft);
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
const currentNodePaneType = computed(() => {
|
|
177
|
+
if (!hasInputSlot.value) return "inputless";
|
|
178
|
+
if (!props.isDraggable) return "dragless";
|
|
179
|
+
if (props.nodeType === null) return "unknown";
|
|
180
|
+
return props.nodeType.parameterPane ?? "regular";
|
|
181
|
+
});
|
|
182
|
+
const mainPanelDimensions = computed(() => {
|
|
183
|
+
return ndvStore.mainPanelDimensions[currentNodePaneType.value];
|
|
184
|
+
});
|
|
185
|
+
const calculatedPositions = computed(
|
|
186
|
+
() => {
|
|
187
|
+
const hasInput = slots.input !== void 0;
|
|
188
|
+
const outputPanelRelativeLeft = mainPanelDimensions.value.relativeLeft + mainPanelDimensions.value.relativeWidth;
|
|
189
|
+
const inputPanelRelativeRight = hasInput ? 1 - outputPanelRelativeLeft + mainPanelDimensions.value.relativeWidth : 1 - pxToRelativeWidth(SIDE_MARGIN);
|
|
190
|
+
return {
|
|
191
|
+
inputPanelRelativeRight,
|
|
192
|
+
outputPanelRelativeLeft
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
const outputPanelRelativeTranslate = computed(() => {
|
|
197
|
+
const panelMinLeft = 1 - pxToRelativeWidth(MIN_PANEL_WIDTH + SIDE_MARGIN);
|
|
198
|
+
const currentRelativeLeftDelta = calculatedPositions.value.outputPanelRelativeLeft - panelMinLeft;
|
|
199
|
+
return currentRelativeLeftDelta > 0 ? currentRelativeLeftDelta : 0;
|
|
200
|
+
});
|
|
201
|
+
const supportedResizeDirections = computed(() => {
|
|
202
|
+
const supportedDirections = ["right"];
|
|
203
|
+
if (props.isDraggable) supportedDirections.push("left");
|
|
204
|
+
return supportedDirections;
|
|
205
|
+
});
|
|
206
|
+
const hasInputSlot = computed(() => {
|
|
207
|
+
return slots.input !== void 0;
|
|
208
|
+
});
|
|
209
|
+
const inputPanelMargin = computed(() => pxToRelativeWidth(SIDE_PANELS_MARGIN));
|
|
210
|
+
const minimumLeftPosition = computed(() => {
|
|
211
|
+
if (containerWidth.value < MIN_WINDOW_WIDTH) return pxToRelativeWidth(1);
|
|
212
|
+
if (!hasInputSlot.value) return pxToRelativeWidth(SIDE_MARGIN);
|
|
213
|
+
return pxToRelativeWidth(SIDE_MARGIN + 20) + inputPanelMargin.value;
|
|
214
|
+
});
|
|
215
|
+
const maximumRightPosition = computed(() => {
|
|
216
|
+
if (containerWidth.value < MIN_WINDOW_WIDTH) return pxToRelativeWidth(1);
|
|
217
|
+
return pxToRelativeWidth(SIDE_MARGIN + 20) + inputPanelMargin.value;
|
|
218
|
+
});
|
|
219
|
+
const canMoveLeft = computed(() => {
|
|
220
|
+
return mainPanelDimensions.value.relativeLeft > minimumLeftPosition.value;
|
|
221
|
+
});
|
|
222
|
+
const canMoveRight = computed(() => {
|
|
223
|
+
return mainPanelDimensions.value.relativeRight > maximumRightPosition.value;
|
|
224
|
+
});
|
|
225
|
+
const mainPanelStyles = computed(() => {
|
|
226
|
+
return {
|
|
227
|
+
left: `${relativeWidthToPx(mainPanelDimensions.value.relativeLeft)}px`,
|
|
228
|
+
right: `${relativeWidthToPx(mainPanelDimensions.value.relativeRight)}px`
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
const inputPanelStyles = computed(() => {
|
|
232
|
+
return {
|
|
233
|
+
right: `${relativeWidthToPx(calculatedPositions.value.inputPanelRelativeRight)}px`
|
|
234
|
+
};
|
|
235
|
+
});
|
|
236
|
+
const outputPanelStyles = computed(() => {
|
|
237
|
+
return {
|
|
238
|
+
left: `${relativeWidthToPx(calculatedPositions.value.outputPanelRelativeLeft)}px`,
|
|
239
|
+
transform: `translateX(-${relativeWidthToPx(outputPanelRelativeTranslate.value)}px)`
|
|
240
|
+
};
|
|
241
|
+
});
|
|
242
|
+
const hasDoubleWidth = computed(() => {
|
|
243
|
+
return props.nodeType?.parameterPane === "wide";
|
|
244
|
+
});
|
|
245
|
+
const fixedPanelWidth = computed(() => {
|
|
246
|
+
const multiplier = hasDoubleWidth.value ? 2 : 1;
|
|
247
|
+
if (containerWidth.value > 1700) {
|
|
248
|
+
return PANEL_WIDTH_LARGE * multiplier;
|
|
249
|
+
}
|
|
250
|
+
return PANEL_WIDTH * multiplier;
|
|
251
|
+
});
|
|
252
|
+
const onSwitchSelectedNode = (node) => emit("switchSelectedNode", node);
|
|
253
|
+
function getInitialLeftPosition(width) {
|
|
254
|
+
if (currentNodePaneType.value === "dragless")
|
|
255
|
+
return pxToRelativeWidth(SIDE_MARGIN + 1 + fixedPanelWidth.value);
|
|
256
|
+
return hasInputSlot.value ? 0.5 - width / 2 : minimumLeftPosition.value;
|
|
257
|
+
}
|
|
258
|
+
function setMainPanelWidth(relativeWidth) {
|
|
259
|
+
const mainPanelRelativeWidth = relativeWidth || pxToRelativeWidth(initialMainPanelWidth[currentNodePaneType.value]);
|
|
260
|
+
ndvStore.setMainPanelDimensions({
|
|
261
|
+
panelType: currentNodePaneType.value,
|
|
262
|
+
dimensions: {
|
|
263
|
+
relativeWidth: mainPanelRelativeWidth
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
function setPositions(relativeLeft) {
|
|
268
|
+
const mainPanelRelativeLeft = relativeLeft || 1 - calculatedPositions.value.inputPanelRelativeRight;
|
|
269
|
+
const mainPanelRelativeRight = 1 - mainPanelRelativeLeft - mainPanelDimensions.value.relativeWidth;
|
|
270
|
+
const isMaxRight = maximumRightPosition.value > mainPanelRelativeRight;
|
|
271
|
+
const isMinLeft = minimumLeftPosition.value > mainPanelRelativeLeft;
|
|
272
|
+
const isInputless = currentNodePaneType.value === "inputless";
|
|
273
|
+
if (isMinLeft) {
|
|
274
|
+
ndvStore.setMainPanelDimensions({
|
|
275
|
+
panelType: currentNodePaneType.value,
|
|
276
|
+
dimensions: {
|
|
277
|
+
relativeLeft: minimumLeftPosition.value,
|
|
278
|
+
relativeRight: 1 - mainPanelDimensions.value.relativeWidth - minimumLeftPosition.value
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
if (isMaxRight) {
|
|
284
|
+
ndvStore.setMainPanelDimensions({
|
|
285
|
+
panelType: currentNodePaneType.value,
|
|
286
|
+
dimensions: {
|
|
287
|
+
relativeLeft: 1 - mainPanelDimensions.value.relativeWidth - maximumRightPosition.value,
|
|
288
|
+
relativeRight: maximumRightPosition.value
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
ndvStore.setMainPanelDimensions({
|
|
294
|
+
panelType: currentNodePaneType.value,
|
|
295
|
+
dimensions: {
|
|
296
|
+
relativeLeft: isInputless ? minimumLeftPosition.value : mainPanelRelativeLeft,
|
|
297
|
+
relativeRight: mainPanelRelativeRight
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function setPositionByName(position) {
|
|
302
|
+
const positionByName = {
|
|
303
|
+
minLeft: minimumLeftPosition.value,
|
|
304
|
+
maxRight: maximumRightPosition.value,
|
|
305
|
+
initial: getInitialLeftPosition(mainPanelDimensions.value.relativeWidth)
|
|
306
|
+
};
|
|
307
|
+
setPositions(positionByName[position]);
|
|
308
|
+
}
|
|
309
|
+
function pxToRelativeWidth(px) {
|
|
310
|
+
return px / containerWidth.value;
|
|
311
|
+
}
|
|
312
|
+
function relativeWidthToPx(relativeWidth) {
|
|
313
|
+
return relativeWidth * containerWidth.value;
|
|
314
|
+
}
|
|
315
|
+
function onResizeEnd() {
|
|
316
|
+
storePositionData();
|
|
317
|
+
}
|
|
318
|
+
function onResizeThrottle(data) {
|
|
319
|
+
if (initialized.value) {
|
|
320
|
+
void throttledOnResize(data);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function onResize({ direction, x, width }) {
|
|
324
|
+
const relativeDistance = pxToRelativeWidth(x);
|
|
325
|
+
const relativeWidth = pxToRelativeWidth(width);
|
|
326
|
+
if (direction === "left" && relativeDistance <= minimumLeftPosition.value) return;
|
|
327
|
+
if (direction === "right" && 1 - relativeDistance <= maximumRightPosition.value) return;
|
|
328
|
+
if (width <= MIN_PANEL_WIDTH) return;
|
|
329
|
+
setMainPanelWidth(relativeWidth);
|
|
330
|
+
setPositions(direction === "left" ? relativeDistance : mainPanelDimensions.value.relativeLeft);
|
|
331
|
+
}
|
|
332
|
+
function restorePositionData() {
|
|
333
|
+
const storedPanelWidthData = useStorage(
|
|
334
|
+
`${LOCAL_STORAGE_MAIN_PANEL_RELATIVE_WIDTH}_${currentNodePaneType.value}`
|
|
335
|
+
).value;
|
|
336
|
+
if (storedPanelWidthData) {
|
|
337
|
+
const parsedWidth = parseFloat(storedPanelWidthData);
|
|
338
|
+
setMainPanelWidth(parsedWidth);
|
|
339
|
+
const initialPosition = getInitialLeftPosition(parsedWidth);
|
|
340
|
+
setPositions(initialPosition);
|
|
341
|
+
return true;
|
|
342
|
+
}
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
function storePositionData() {
|
|
346
|
+
useStorage(`${LOCAL_STORAGE_MAIN_PANEL_RELATIVE_WIDTH}_${currentNodePaneType.value}`).value = mainPanelDimensions.value.relativeWidth.toString();
|
|
347
|
+
}
|
|
348
|
+
function onDragStart() {
|
|
349
|
+
isDragging.value = true;
|
|
350
|
+
emit("dragstart", { position: mainPanelDimensions.value.relativeLeft });
|
|
351
|
+
}
|
|
352
|
+
function onDrag(position) {
|
|
353
|
+
const relativeLeft = pxToRelativeWidth(position[0]) - mainPanelDimensions.value.relativeWidth / 2;
|
|
354
|
+
setPositions(relativeLeft);
|
|
355
|
+
}
|
|
356
|
+
function onDragEnd() {
|
|
357
|
+
setTimeout(() => {
|
|
358
|
+
isDragging.value = false;
|
|
359
|
+
emit("dragend", {
|
|
360
|
+
windowWidth: containerWidth.value,
|
|
361
|
+
position: mainPanelDimensions.value.relativeLeft
|
|
362
|
+
});
|
|
363
|
+
}, 0);
|
|
364
|
+
storePositionData();
|
|
365
|
+
}
|
|
366
|
+
return (_ctx, _cache) => {
|
|
367
|
+
const _component_N8nResizeWrapper = N8nResizeWrapper;
|
|
368
|
+
return openBlock(), createElementBlock("div", null, [
|
|
369
|
+
unref(ndvStore).activeNode ? (openBlock(), createBlock(__unplugin_components_0, {
|
|
370
|
+
key: 0,
|
|
371
|
+
"root-node": unref(ndvStore).activeNode,
|
|
372
|
+
onSwitchSelectedNode
|
|
373
|
+
}, null, 8, ["root-node"])) : createCommentVNode("", true),
|
|
374
|
+
!_ctx.hideInputAndOutput ? (openBlock(), createElementBlock("div", {
|
|
375
|
+
key: 1,
|
|
376
|
+
class: normalizeClass(_ctx.$style.inputPanel),
|
|
377
|
+
style: normalizeStyle(inputPanelStyles.value)
|
|
378
|
+
}, [
|
|
379
|
+
renderSlot(_ctx.$slots, "input")
|
|
380
|
+
], 6)) : createCommentVNode("", true),
|
|
381
|
+
!_ctx.hideInputAndOutput ? (openBlock(), createElementBlock("div", {
|
|
382
|
+
key: 2,
|
|
383
|
+
class: normalizeClass(_ctx.$style.outputPanel),
|
|
384
|
+
style: normalizeStyle(outputPanelStyles.value)
|
|
385
|
+
}, [
|
|
386
|
+
renderSlot(_ctx.$slots, "output")
|
|
387
|
+
], 6)) : createCommentVNode("", true),
|
|
388
|
+
createBaseVNode("div", {
|
|
389
|
+
class: normalizeClass(_ctx.$style.mainPanel),
|
|
390
|
+
style: normalizeStyle(mainPanelStyles.value)
|
|
391
|
+
}, [
|
|
392
|
+
createVNode(_component_N8nResizeWrapper, {
|
|
393
|
+
"is-resizing-enabled": currentNodePaneType.value !== "unknown",
|
|
394
|
+
width: relativeWidthToPx(mainPanelDimensions.value.relativeWidth),
|
|
395
|
+
"min-width": MIN_PANEL_WIDTH,
|
|
396
|
+
"grid-size": 20,
|
|
397
|
+
"supported-directions": supportedResizeDirections.value,
|
|
398
|
+
outset: "",
|
|
399
|
+
onResize: onResizeThrottle,
|
|
400
|
+
onResizeend: onResizeEnd
|
|
401
|
+
}, {
|
|
402
|
+
default: withCtx(() => [
|
|
403
|
+
createBaseVNode("div", {
|
|
404
|
+
class: normalizeClass(_ctx.$style.dragButtonContainer)
|
|
405
|
+
}, [
|
|
406
|
+
!_ctx.hideInputAndOutput && _ctx.isDraggable ? (openBlock(), createBlock(PanelDragButton, {
|
|
407
|
+
key: 0,
|
|
408
|
+
class: normalizeClass({ [_ctx.$style.draggable]: true, [_ctx.$style.visible]: isDragging.value }),
|
|
409
|
+
"can-move-left": canMoveLeft.value,
|
|
410
|
+
"can-move-right": canMoveRight.value,
|
|
411
|
+
onDragstart: onDragStart,
|
|
412
|
+
onDrag,
|
|
413
|
+
onDragend: onDragEnd
|
|
414
|
+
}, null, 8, ["class", "can-move-left", "can-move-right"])) : createCommentVNode("", true)
|
|
415
|
+
], 2),
|
|
416
|
+
createBaseVNode("div", {
|
|
417
|
+
class: normalizeClass({ [_ctx.$style.mainPanelInner]: true, [_ctx.$style.dragging]: isDragging.value })
|
|
418
|
+
}, [
|
|
419
|
+
renderSlot(_ctx.$slots, "main")
|
|
420
|
+
], 2)
|
|
421
|
+
]),
|
|
422
|
+
_: 3
|
|
423
|
+
}, 8, ["is-resizing-enabled", "width", "supported-directions"])
|
|
424
|
+
], 6)
|
|
425
|
+
]);
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
const dataPanel = "_dataPanel_181lg_123";
|
|
430
|
+
const inputPanel = "_inputPanel_181lg_132 _dataPanel_181lg_123";
|
|
431
|
+
const outputPanel = "_outputPanel_181lg_140 _dataPanel_181lg_123";
|
|
432
|
+
const mainPanel = "_mainPanel_181lg_148";
|
|
433
|
+
const draggable = "_draggable_181lg_152";
|
|
434
|
+
const mainPanelInner = "_mainPanelInner_181lg_156";
|
|
435
|
+
const dragging = "_dragging_181lg_163";
|
|
436
|
+
const dragButtonContainer = "_dragButtonContainer_181lg_176";
|
|
437
|
+
const visible = "_visible_181lg_192";
|
|
438
|
+
const style0 = {
|
|
439
|
+
dataPanel,
|
|
440
|
+
inputPanel,
|
|
441
|
+
outputPanel,
|
|
442
|
+
mainPanel,
|
|
443
|
+
draggable,
|
|
444
|
+
mainPanelInner,
|
|
445
|
+
dragging,
|
|
446
|
+
"double-width": "_double-width_181lg_172",
|
|
447
|
+
dragButtonContainer,
|
|
448
|
+
visible
|
|
449
|
+
};
|
|
450
|
+
const cssModules$1 = {
|
|
451
|
+
"$style": style0
|
|
452
|
+
};
|
|
453
|
+
const NDVDraggablePanels = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
|
|
454
|
+
const _hoisted_1 = {
|
|
455
|
+
key: 0,
|
|
456
|
+
ref: "container",
|
|
457
|
+
class: "data-display",
|
|
458
|
+
"data-test-id": "ndv-modal",
|
|
459
|
+
tabindex: "0"
|
|
460
|
+
};
|
|
461
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
462
|
+
__name: "NodeDetailsView",
|
|
463
|
+
props: {
|
|
464
|
+
workflowObject: {},
|
|
465
|
+
readOnly: { type: Boolean, default: false },
|
|
466
|
+
renaming: { type: Boolean },
|
|
467
|
+
isProductionExecutionPreview: { type: Boolean, default: false }
|
|
468
|
+
},
|
|
469
|
+
emits: ["saveKeyboardShortcut", "valueChanged", "switchSelectedNode", "openConnectionNodeCreator", "redrawNode", "stopExecution"],
|
|
470
|
+
setup(__props, { emit: __emit }) {
|
|
471
|
+
const emit = __emit;
|
|
472
|
+
const props = __props;
|
|
473
|
+
const ndvStore = useNDVStore();
|
|
474
|
+
const externalHooks = useExternalHooks();
|
|
475
|
+
const nodeHelpers = useNodeHelpers();
|
|
476
|
+
const { activeNode } = storeToRefs(ndvStore);
|
|
477
|
+
const pinnedData = usePinnedData(activeNode);
|
|
478
|
+
const workflowActivate = useWorkflowActivate();
|
|
479
|
+
const nodeTypesStore = useNodeTypesStore();
|
|
480
|
+
const workflowsStore = useWorkflowsStore();
|
|
481
|
+
const deviceSupport = useDeviceSupport();
|
|
482
|
+
const telemetry = useTelemetry();
|
|
483
|
+
const i18n = useI18n();
|
|
484
|
+
const message = useMessage();
|
|
485
|
+
const { APP_Z_INDEXES } = useStyles();
|
|
486
|
+
const settingsEventBus = createEventBus();
|
|
487
|
+
const redrawRequired = ref(false);
|
|
488
|
+
const runInputIndex = ref(-1);
|
|
489
|
+
const runOutputIndex = computed(() => ndvStore.output.run ?? -1);
|
|
490
|
+
const selectedInput = ref();
|
|
491
|
+
const isLinkingEnabled = ref(true);
|
|
492
|
+
const triggerWaitingWarningEnabled = ref(false);
|
|
493
|
+
const isDragging = ref(false);
|
|
494
|
+
const mainPanelPosition = ref(0);
|
|
495
|
+
const pinDataDiscoveryTooltipVisible = ref(false);
|
|
496
|
+
const avgInputRowHeight = ref(0);
|
|
497
|
+
const avgOutputRowHeight = ref(0);
|
|
498
|
+
const isInputPaneActive = ref(false);
|
|
499
|
+
const isOutputPaneActive = ref(false);
|
|
500
|
+
const isPairedItemHoveringEnabled = ref(true);
|
|
501
|
+
const pushRef = computed(() => ndvStore.pushRef);
|
|
502
|
+
const activeNodeType = computed(() => {
|
|
503
|
+
if (activeNode.value) {
|
|
504
|
+
return nodeTypesStore.getNodeType(activeNode.value.type, activeNode.value.typeVersion);
|
|
505
|
+
}
|
|
506
|
+
return null;
|
|
507
|
+
});
|
|
508
|
+
const showTriggerWaitingWarning = computed(
|
|
509
|
+
() => triggerWaitingWarningEnabled.value && !!activeNodeType.value && !activeNodeType.value.group.includes("trigger") && workflowsStore.isWorkflowRunning && workflowsStore.executionWaitingForWebhook
|
|
510
|
+
);
|
|
511
|
+
const workflowRunData = computed(() => {
|
|
512
|
+
if (workflowExecution.value === null) {
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
const executionData = workflowExecution.value.data;
|
|
516
|
+
if (executionData?.resultData) {
|
|
517
|
+
return executionData.resultData.runData;
|
|
518
|
+
}
|
|
519
|
+
return null;
|
|
520
|
+
});
|
|
521
|
+
const parentNodes = computed(() => {
|
|
522
|
+
if (activeNode.value) {
|
|
523
|
+
return props.workflowObject.getParentNodesByDepth(activeNode.value.name, 1);
|
|
524
|
+
}
|
|
525
|
+
return [];
|
|
526
|
+
});
|
|
527
|
+
const parentNode = computed(() => {
|
|
528
|
+
for (const parent of parentNodes.value) {
|
|
529
|
+
if (workflowsStore?.pinnedWorkflowData?.[parent.name]) {
|
|
530
|
+
return parent;
|
|
531
|
+
}
|
|
532
|
+
if (workflowRunData.value?.[parent.name]) {
|
|
533
|
+
return parent;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
return parentNodes.value[0];
|
|
537
|
+
});
|
|
538
|
+
const inputNodeName = computed(() => {
|
|
539
|
+
const nodeOutputs = activeNode.value && activeNodeType.value ? getNodeOutputs(props.workflowObject, activeNode.value, activeNodeType.value) : [];
|
|
540
|
+
const nonMainOutputs = nodeOutputs.filter((output) => {
|
|
541
|
+
if (typeof output === "string") return output !== NodeConnectionTypes.Main;
|
|
542
|
+
return output.type !== NodeConnectionTypes.Main;
|
|
543
|
+
});
|
|
544
|
+
const isSubNode = nonMainOutputs.length > 0;
|
|
545
|
+
if (isSubNode && activeNode.value) {
|
|
546
|
+
const connectedOutputNode = props.workflowObject.getChildNodes(
|
|
547
|
+
activeNode.value.name,
|
|
548
|
+
"ALL_NON_MAIN"
|
|
549
|
+
)?.[0];
|
|
550
|
+
return connectedOutputNode;
|
|
551
|
+
}
|
|
552
|
+
return selectedInput.value ?? parentNode.value?.name;
|
|
553
|
+
});
|
|
554
|
+
const inputNode = computed(() => {
|
|
555
|
+
if (inputNodeName.value) {
|
|
556
|
+
return workflowsStore.getNodeByName(inputNodeName.value);
|
|
557
|
+
}
|
|
558
|
+
return null;
|
|
559
|
+
});
|
|
560
|
+
const inputSize = computed(() => ndvStore.ndvInputDataWithPinnedData.length);
|
|
561
|
+
const isTriggerNode = computed(
|
|
562
|
+
() => !!activeNodeType.value && (activeNodeType.value.group.includes("trigger") || activeNodeType.value.name === START_NODE_TYPE)
|
|
563
|
+
);
|
|
564
|
+
const showTriggerPanel = computed(() => {
|
|
565
|
+
const override = !!activeNodeType.value?.triggerPanel;
|
|
566
|
+
if (typeof activeNodeType.value?.triggerPanel === "boolean") {
|
|
567
|
+
return override;
|
|
568
|
+
}
|
|
569
|
+
const isWebhookBasedNode = !!activeNodeType.value?.webhooks?.length;
|
|
570
|
+
const isPollingNode = activeNodeType.value?.polling;
|
|
571
|
+
return !props.readOnly && isTriggerNode.value && (isWebhookBasedNode || isPollingNode || override);
|
|
572
|
+
});
|
|
573
|
+
const hasOutputConnection = computed(() => {
|
|
574
|
+
if (!activeNode.value) return false;
|
|
575
|
+
const outgoingConnections = workflowsStore.outgoingConnectionsByNodeName(activeNode.value.name);
|
|
576
|
+
return (Object.values(outgoingConnections)?.[0]?.[0] ?? []).length > 0;
|
|
577
|
+
});
|
|
578
|
+
const isExecutableTriggerNode = computed(() => {
|
|
579
|
+
if (!activeNodeType.value) return false;
|
|
580
|
+
return EXECUTABLE_TRIGGER_NODE_TYPES.includes(activeNodeType.value.name);
|
|
581
|
+
});
|
|
582
|
+
const isActiveStickyNode = computed(
|
|
583
|
+
() => !!ndvStore.activeNode && ndvStore.activeNode.type === STICKY_NODE_TYPE
|
|
584
|
+
);
|
|
585
|
+
const workflowExecution = computed(() => workflowsStore.getWorkflowExecution);
|
|
586
|
+
const maxOutputRun = computed(() => {
|
|
587
|
+
if (activeNode.value === null) {
|
|
588
|
+
return 0;
|
|
589
|
+
}
|
|
590
|
+
const runData = workflowRunData.value;
|
|
591
|
+
if (!runData?.[activeNode.value.name]) {
|
|
592
|
+
return 0;
|
|
593
|
+
}
|
|
594
|
+
if (runData[activeNode.value.name].length) {
|
|
595
|
+
return runData[activeNode.value.name].length - 1;
|
|
596
|
+
}
|
|
597
|
+
return 0;
|
|
598
|
+
});
|
|
599
|
+
const outputRun = computed(
|
|
600
|
+
() => runOutputIndex.value === -1 ? maxOutputRun.value : Math.min(runOutputIndex.value, maxOutputRun.value)
|
|
601
|
+
);
|
|
602
|
+
const maxInputRun = computed(() => {
|
|
603
|
+
if (inputNode.value === null || activeNode.value === null) {
|
|
604
|
+
return 0;
|
|
605
|
+
}
|
|
606
|
+
const workflowNode = props.workflowObject.getNode(activeNode.value.name);
|
|
607
|
+
if (!workflowNode || !activeNodeType.value) {
|
|
608
|
+
return 0;
|
|
609
|
+
}
|
|
610
|
+
const outputs = getNodeOutputs(
|
|
611
|
+
props.workflowObject,
|
|
612
|
+
workflowNode,
|
|
613
|
+
activeNodeType.value
|
|
614
|
+
);
|
|
615
|
+
let node = inputNode.value;
|
|
616
|
+
const runData = workflowRunData.value;
|
|
617
|
+
if (outputs.some((output) => output !== NodeConnectionTypes.Main)) {
|
|
618
|
+
node = activeNode.value;
|
|
619
|
+
}
|
|
620
|
+
if (!node || !runData?.hasOwnProperty(node.name)) {
|
|
621
|
+
return 0;
|
|
622
|
+
}
|
|
623
|
+
if (runData[node.name].length) {
|
|
624
|
+
return runData[node.name].length - 1;
|
|
625
|
+
}
|
|
626
|
+
return 0;
|
|
627
|
+
});
|
|
628
|
+
const connectedCurrentNodeOutputs = computed(() => {
|
|
629
|
+
return parentNodes.value.find(({ name }) => name === inputNodeName.value)?.indicies;
|
|
630
|
+
});
|
|
631
|
+
const inputRun = computed(() => {
|
|
632
|
+
if (isLinkingEnabled.value && maxOutputRun.value === maxInputRun.value) {
|
|
633
|
+
return outputRun.value;
|
|
634
|
+
}
|
|
635
|
+
const currentInputNodeName = inputNodeName.value;
|
|
636
|
+
if (runInputIndex.value === -1 && currentInputNodeName) {
|
|
637
|
+
return connectedCurrentNodeOutputs.value?.map(
|
|
638
|
+
(outputIndex) => nodeHelpers.getLastRunIndexWithData(currentInputNodeName, outputIndex)
|
|
639
|
+
).find((runIndex) => runIndex !== -1) ?? maxInputRun.value;
|
|
640
|
+
}
|
|
641
|
+
return Math.min(runInputIndex.value, maxInputRun.value);
|
|
642
|
+
});
|
|
643
|
+
const canLinkRuns = computed(
|
|
644
|
+
() => maxOutputRun.value > 0 && maxOutputRun.value === maxInputRun.value
|
|
645
|
+
);
|
|
646
|
+
const linked = computed(() => isLinkingEnabled.value && canLinkRuns.value);
|
|
647
|
+
const featureRequestUrl = computed(() => {
|
|
648
|
+
if (!activeNodeType.value) {
|
|
649
|
+
return "";
|
|
650
|
+
}
|
|
651
|
+
return `${BASE_NODE_SURVEY_URL}${activeNodeType.value.name}`;
|
|
652
|
+
});
|
|
653
|
+
const outputPanelEditMode = computed(() => ndvStore.outputPanelEditMode);
|
|
654
|
+
const isExecutionWaitingForWebhook = computed(() => workflowsStore.executionWaitingForWebhook);
|
|
655
|
+
const blockUi = computed(
|
|
656
|
+
() => workflowsStore.isWorkflowRunning || isExecutionWaitingForWebhook.value
|
|
657
|
+
);
|
|
658
|
+
const foreignCredentials = computed(
|
|
659
|
+
() => nodeHelpers.getForeignCredentialsIfSharingEnabled(activeNode.value?.credentials)
|
|
660
|
+
);
|
|
661
|
+
const hasForeignCredential = computed(() => foreignCredentials.value.length > 0);
|
|
662
|
+
const inputPanelDisplayMode = computed(() => ndvStore.inputPanelDisplayMode);
|
|
663
|
+
const outputPanelDisplayMode = computed(() => ndvStore.outputPanelDisplayMode);
|
|
664
|
+
const setIsTooltipVisible = ({ isTooltipVisible }) => {
|
|
665
|
+
pinDataDiscoveryTooltipVisible.value = isTooltipVisible;
|
|
666
|
+
};
|
|
667
|
+
const onKeyDown = (e) => {
|
|
668
|
+
if (e.key === "s" && deviceSupport.isCtrlKeyPressed(e)) {
|
|
669
|
+
onSaveWorkflow(e);
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
const onSaveWorkflow = (e) => {
|
|
673
|
+
e.stopPropagation();
|
|
674
|
+
e.preventDefault();
|
|
675
|
+
if (props.readOnly) return;
|
|
676
|
+
emit("saveKeyboardShortcut", e);
|
|
677
|
+
};
|
|
678
|
+
const onInputItemHover = (e) => {
|
|
679
|
+
if (e === null || !inputNodeName.value || !isPairedItemHoveringEnabled.value) {
|
|
680
|
+
ndvStore.setHoveringItem(null);
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
const item = {
|
|
684
|
+
nodeName: inputNodeName.value,
|
|
685
|
+
runIndex: inputRun.value,
|
|
686
|
+
outputIndex: e.outputIndex,
|
|
687
|
+
itemIndex: e.itemIndex
|
|
688
|
+
};
|
|
689
|
+
ndvStore.setHoveringItem(item);
|
|
690
|
+
};
|
|
691
|
+
const onInputTableMounted = (e) => {
|
|
692
|
+
avgInputRowHeight.value = e.avgRowHeight;
|
|
693
|
+
};
|
|
694
|
+
const onWorkflowActivate = () => {
|
|
695
|
+
ndvStore.activeNodeName = null;
|
|
696
|
+
setTimeout(() => {
|
|
697
|
+
void workflowActivate.activateCurrentWorkflow("ndv");
|
|
698
|
+
}, 1e3);
|
|
699
|
+
};
|
|
700
|
+
const onOutputItemHover = (e) => {
|
|
701
|
+
if (e === null || !activeNode.value || !isPairedItemHoveringEnabled.value) {
|
|
702
|
+
ndvStore.setHoveringItem(null);
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
const item = {
|
|
706
|
+
nodeName: activeNode.value?.name,
|
|
707
|
+
runIndex: outputRun.value,
|
|
708
|
+
outputIndex: e.outputIndex,
|
|
709
|
+
itemIndex: e.itemIndex
|
|
710
|
+
};
|
|
711
|
+
ndvStore.setHoveringItem(item);
|
|
712
|
+
};
|
|
713
|
+
const onFeatureRequestClick = () => {
|
|
714
|
+
window.open(featureRequestUrl.value, "_blank");
|
|
715
|
+
if (activeNode.value) {
|
|
716
|
+
telemetry.track("User clicked ndv link", {
|
|
717
|
+
node_type: activeNode.value.type,
|
|
718
|
+
workflow_id: workflowsStore.workflowId,
|
|
719
|
+
push_ref: pushRef.value,
|
|
720
|
+
pane: NodeConnectionTypes.Main,
|
|
721
|
+
type: "i-wish-this-node-would"
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
const onDragEnd = (e) => {
|
|
726
|
+
isDragging.value = false;
|
|
727
|
+
telemetry.track("User moved parameters pane", {
|
|
728
|
+
// example method for tracking
|
|
729
|
+
window_width: e.windowWidth,
|
|
730
|
+
start_position: mainPanelPosition.value,
|
|
731
|
+
end_position: e.position,
|
|
732
|
+
node_type: activeNodeType.value ? activeNodeType.value.name : "",
|
|
733
|
+
push_ref: pushRef.value,
|
|
734
|
+
workflow_id: workflowsStore.workflowId
|
|
735
|
+
});
|
|
736
|
+
mainPanelPosition.value = e.position;
|
|
737
|
+
};
|
|
738
|
+
const onDragStart = (e) => {
|
|
739
|
+
isDragging.value = true;
|
|
740
|
+
mainPanelPosition.value = e.position;
|
|
741
|
+
};
|
|
742
|
+
const onPanelsInit = (e) => {
|
|
743
|
+
mainPanelPosition.value = e.position;
|
|
744
|
+
};
|
|
745
|
+
const onLinkRunToOutput = () => {
|
|
746
|
+
isLinkingEnabled.value = true;
|
|
747
|
+
trackLinking("output");
|
|
748
|
+
};
|
|
749
|
+
const onUnlinkRun = (pane) => {
|
|
750
|
+
runInputIndex.value = runOutputIndex.value;
|
|
751
|
+
isLinkingEnabled.value = false;
|
|
752
|
+
trackLinking(pane);
|
|
753
|
+
};
|
|
754
|
+
const onNodeExecute = () => {
|
|
755
|
+
setTimeout(() => {
|
|
756
|
+
if (!activeNode.value || !workflowsStore.isWorkflowRunning) {
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
triggerWaitingWarningEnabled.value = true;
|
|
760
|
+
}, 1e3);
|
|
761
|
+
};
|
|
762
|
+
const openSettings = () => {
|
|
763
|
+
settingsEventBus.emit("openSettings");
|
|
764
|
+
};
|
|
765
|
+
const trackLinking = (pane) => {
|
|
766
|
+
telemetry.track("User changed ndv run linking", {
|
|
767
|
+
node_type: activeNodeType.value ? activeNodeType.value.name : "",
|
|
768
|
+
push_ref: pushRef.value,
|
|
769
|
+
linked: linked.value,
|
|
770
|
+
pane
|
|
771
|
+
});
|
|
772
|
+
};
|
|
773
|
+
const onLinkRunToInput = () => {
|
|
774
|
+
ndvStore.setOutputRunIndex(runInputIndex.value);
|
|
775
|
+
isLinkingEnabled.value = true;
|
|
776
|
+
trackLinking("input");
|
|
777
|
+
};
|
|
778
|
+
const valueChanged = (parameterData) => {
|
|
779
|
+
emit("valueChanged", parameterData);
|
|
780
|
+
};
|
|
781
|
+
const onSwitchSelectedNode = (nodeTypeName) => {
|
|
782
|
+
emit("switchSelectedNode", nodeTypeName);
|
|
783
|
+
};
|
|
784
|
+
const onOpenConnectionNodeCreator = (nodeTypeName, connectionType, connectionIndex = 0) => {
|
|
785
|
+
emit("openConnectionNodeCreator", nodeTypeName, connectionType, connectionIndex);
|
|
786
|
+
};
|
|
787
|
+
const close = async () => {
|
|
788
|
+
if (isDragging.value) {
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
if (activeNode.value && (typeof activeNodeType.value?.outputs === "string" || typeof activeNodeType.value?.inputs === "string" || redrawRequired.value)) {
|
|
792
|
+
const nodeName = activeNode.value.name;
|
|
793
|
+
setTimeout(() => {
|
|
794
|
+
emit("redrawNode", nodeName);
|
|
795
|
+
}, 1);
|
|
796
|
+
}
|
|
797
|
+
if (outputPanelEditMode.value.enabled && activeNode.value) {
|
|
798
|
+
const shouldPinDataBeforeClosing = await message.confirm(
|
|
799
|
+
"",
|
|
800
|
+
i18n.baseText("ndv.pinData.beforeClosing.title"),
|
|
801
|
+
{
|
|
802
|
+
confirmButtonText: i18n.baseText("ndv.pinData.beforeClosing.confirm"),
|
|
803
|
+
cancelButtonText: i18n.baseText("ndv.pinData.beforeClosing.cancel")
|
|
804
|
+
}
|
|
805
|
+
);
|
|
806
|
+
if (shouldPinDataBeforeClosing === MODAL_CONFIRM) {
|
|
807
|
+
const { value } = outputPanelEditMode.value;
|
|
808
|
+
try {
|
|
809
|
+
pinnedData.setData(jsonParse(value), "on-ndv-close-modal");
|
|
810
|
+
} catch (error) {
|
|
811
|
+
console.error(error);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
ndvStore.setOutputPanelEditModeEnabled(false);
|
|
815
|
+
}
|
|
816
|
+
await externalHooks.run("dataDisplay.nodeEditingFinished");
|
|
817
|
+
telemetry.track("User closed node modal", {
|
|
818
|
+
node_type: activeNodeType.value ? activeNodeType.value?.name : "",
|
|
819
|
+
push_ref: pushRef.value,
|
|
820
|
+
workflow_id: workflowsStore.workflowId
|
|
821
|
+
});
|
|
822
|
+
triggerWaitingWarningEnabled.value = false;
|
|
823
|
+
ndvStore.activeNodeName = null;
|
|
824
|
+
ndvStore.resetNDVPushRef();
|
|
825
|
+
};
|
|
826
|
+
const trackRunChange = (run, pane) => {
|
|
827
|
+
telemetry.track("User changed ndv run dropdown", {
|
|
828
|
+
push_ref: pushRef.value,
|
|
829
|
+
run_index: run,
|
|
830
|
+
node_type: activeNodeType.value ? activeNodeType.value?.name : "",
|
|
831
|
+
pane
|
|
832
|
+
});
|
|
833
|
+
};
|
|
834
|
+
const onRunOutputIndexChange = (run) => {
|
|
835
|
+
ndvStore.setOutputRunIndex(run);
|
|
836
|
+
trackRunChange(run, "output");
|
|
837
|
+
};
|
|
838
|
+
const onRunInputIndexChange = (run) => {
|
|
839
|
+
runInputIndex.value = run;
|
|
840
|
+
if (linked.value) {
|
|
841
|
+
ndvStore.setOutputRunIndex(run);
|
|
842
|
+
}
|
|
843
|
+
trackRunChange(run, "input");
|
|
844
|
+
};
|
|
845
|
+
const onOutputTableMounted = (e) => {
|
|
846
|
+
avgOutputRowHeight.value = e.avgRowHeight;
|
|
847
|
+
};
|
|
848
|
+
const onInputNodeChange = (value, index) => {
|
|
849
|
+
runInputIndex.value = -1;
|
|
850
|
+
isLinkingEnabled.value = true;
|
|
851
|
+
selectedInput.value = value;
|
|
852
|
+
telemetry.track("User changed ndv input dropdown", {
|
|
853
|
+
node_type: activeNode.value ? activeNode.value.type : "",
|
|
854
|
+
push_ref: pushRef.value,
|
|
855
|
+
workflow_id: workflowsStore.workflowId,
|
|
856
|
+
selection_value: index,
|
|
857
|
+
input_node_type: inputNode.value ? inputNode.value.type : ""
|
|
858
|
+
});
|
|
859
|
+
};
|
|
860
|
+
const onStopExecution = () => {
|
|
861
|
+
emit("stopExecution");
|
|
862
|
+
};
|
|
863
|
+
const activateInputPane = () => {
|
|
864
|
+
isInputPaneActive.value = true;
|
|
865
|
+
isOutputPaneActive.value = false;
|
|
866
|
+
};
|
|
867
|
+
const activateOutputPane = () => {
|
|
868
|
+
isInputPaneActive.value = false;
|
|
869
|
+
isOutputPaneActive.value = true;
|
|
870
|
+
};
|
|
871
|
+
const onSearch = (search) => {
|
|
872
|
+
isPairedItemHoveringEnabled.value = !search;
|
|
873
|
+
};
|
|
874
|
+
const registerKeyboardListener = () => {
|
|
875
|
+
document.addEventListener("keydown", onKeyDown, true);
|
|
876
|
+
};
|
|
877
|
+
const unregisterKeyboardListener = () => {
|
|
878
|
+
document.removeEventListener("keydown", onKeyDown, true);
|
|
879
|
+
};
|
|
880
|
+
const setSelectedInput = (value) => {
|
|
881
|
+
selectedInput.value = value;
|
|
882
|
+
};
|
|
883
|
+
const handleChangeDisplayMode = (pane, mode) => {
|
|
884
|
+
ndvStore.setPanelDisplayMode({ pane, mode });
|
|
885
|
+
};
|
|
886
|
+
watch(
|
|
887
|
+
activeNode,
|
|
888
|
+
(node, oldNode) => {
|
|
889
|
+
if (node && !oldNode) {
|
|
890
|
+
registerKeyboardListener();
|
|
891
|
+
} else if (!node) {
|
|
892
|
+
unregisterKeyboardListener();
|
|
893
|
+
}
|
|
894
|
+
if (node && node.name !== oldNode?.name && !isActiveStickyNode.value) {
|
|
895
|
+
runInputIndex.value = -1;
|
|
896
|
+
ndvStore.setOutputRunIndex(-1);
|
|
897
|
+
isLinkingEnabled.value = true;
|
|
898
|
+
selectedInput.value = void 0;
|
|
899
|
+
triggerWaitingWarningEnabled.value = false;
|
|
900
|
+
avgOutputRowHeight.value = 0;
|
|
901
|
+
avgInputRowHeight.value = 0;
|
|
902
|
+
setTimeout(() => ndvStore.setNDVPushRef(), 0);
|
|
903
|
+
if (!activeNodeType.value) {
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
906
|
+
void externalHooks.run("dataDisplay.nodeTypeChanged", {
|
|
907
|
+
nodeSubtitle: nodeHelpers.getNodeSubtitle(node, activeNodeType.value, props.workflowObject)
|
|
908
|
+
});
|
|
909
|
+
setTimeout(() => {
|
|
910
|
+
if (activeNode.value) {
|
|
911
|
+
const outgoingConnections = workflowsStore.outgoingConnectionsByNodeName(
|
|
912
|
+
activeNode.value?.name
|
|
913
|
+
);
|
|
914
|
+
telemetry.track("User opened node modal", {
|
|
915
|
+
node_id: activeNode.value?.id,
|
|
916
|
+
node_type: activeNodeType.value ? activeNodeType.value?.name : "",
|
|
917
|
+
workflow_id: workflowsStore.workflowId,
|
|
918
|
+
push_ref: pushRef.value,
|
|
919
|
+
is_editable: !hasForeignCredential.value,
|
|
920
|
+
parameters_pane_position: mainPanelPosition.value,
|
|
921
|
+
input_first_connector_runs: maxInputRun.value,
|
|
922
|
+
output_first_connector_runs: maxOutputRun.value,
|
|
923
|
+
selected_view_inputs: isTriggerNode.value ? "trigger" : inputPanelDisplayMode.value,
|
|
924
|
+
selected_view_outputs: outputPanelDisplayMode.value,
|
|
925
|
+
input_connectors: parentNodes.value.length,
|
|
926
|
+
output_connectors: outgoingConnections?.main?.length,
|
|
927
|
+
input_displayed_run_index: inputRun.value,
|
|
928
|
+
output_displayed_run_index: outputRun.value,
|
|
929
|
+
data_pinning_tooltip_presented: pinDataDiscoveryTooltipVisible.value,
|
|
930
|
+
input_displayed_row_height_avg: avgInputRowHeight.value,
|
|
931
|
+
output_displayed_row_height_avg: avgOutputRowHeight.value
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
}, 2e3);
|
|
935
|
+
}
|
|
936
|
+
if (window.top && !isActiveStickyNode.value) {
|
|
937
|
+
window.top.postMessage(JSON.stringify({ command: node ? "openNDV" : "closeNDV" }), "*");
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
{ immediate: true }
|
|
941
|
+
);
|
|
942
|
+
watch(maxOutputRun, () => {
|
|
943
|
+
ndvStore.setOutputRunIndex(-1);
|
|
944
|
+
});
|
|
945
|
+
watch(maxInputRun, () => {
|
|
946
|
+
runInputIndex.value = -1;
|
|
947
|
+
});
|
|
948
|
+
watch(inputNodeName, (nodeName) => {
|
|
949
|
+
setTimeout(() => {
|
|
950
|
+
ndvStore.setInputNodeName(nodeName);
|
|
951
|
+
}, 0);
|
|
952
|
+
});
|
|
953
|
+
watch(inputRun, (inputRun2) => {
|
|
954
|
+
setTimeout(() => {
|
|
955
|
+
ndvStore.setInputRunIndex(inputRun2);
|
|
956
|
+
}, 0);
|
|
957
|
+
});
|
|
958
|
+
onMounted(() => {
|
|
959
|
+
dataPinningEventBus.on("data-pinning-discovery", setIsTooltipVisible);
|
|
960
|
+
ndvEventBus.on("updateInputNodeName", setSelectedInput);
|
|
961
|
+
});
|
|
962
|
+
onBeforeUnmount(() => {
|
|
963
|
+
dataPinningEventBus.off("data-pinning-discovery", setIsTooltipVisible);
|
|
964
|
+
ndvEventBus.off("updateInputNodeName", setSelectedInput);
|
|
965
|
+
unregisterKeyboardListener();
|
|
966
|
+
});
|
|
967
|
+
return (_ctx, _cache) => {
|
|
968
|
+
const _component_n8n_icon = N8nIcon;
|
|
969
|
+
const _component_n8n_text = N8nText;
|
|
970
|
+
const _component_n8n_tooltip = N8nTooltip;
|
|
971
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
972
|
+
return openBlock(), createBlock(_component_el_dialog, {
|
|
973
|
+
id: "ndv",
|
|
974
|
+
"model-value": (!!unref(activeNode) || _ctx.renaming) && !isActiveStickyNode.value,
|
|
975
|
+
"before-close": close,
|
|
976
|
+
"show-close": false,
|
|
977
|
+
class: "data-display-wrapper ndv-wrapper",
|
|
978
|
+
"overlay-class": "data-display-overlay",
|
|
979
|
+
width: "auto",
|
|
980
|
+
"append-to": `#${unref(APP_MODALS_ELEMENT_ID)}`,
|
|
981
|
+
"data-test-id": "ndv",
|
|
982
|
+
"z-index": unref(APP_Z_INDEXES).NDV,
|
|
983
|
+
"data-has-output-connection": hasOutputConnection.value
|
|
984
|
+
}, {
|
|
985
|
+
default: withCtx(() => [
|
|
986
|
+
createVNode(_component_n8n_tooltip, {
|
|
987
|
+
placement: "bottom-start",
|
|
988
|
+
visible: showTriggerWaitingWarning.value,
|
|
989
|
+
disabled: !showTriggerWaitingWarning.value
|
|
990
|
+
}, {
|
|
991
|
+
content: withCtx(() => [
|
|
992
|
+
createBaseVNode("div", {
|
|
993
|
+
class: normalizeClass(_ctx.$style.triggerWarning)
|
|
994
|
+
}, toDisplayString(unref(i18n).baseText("ndv.backToCanvas.waitingForTriggerWarning")), 3)
|
|
995
|
+
]),
|
|
996
|
+
default: withCtx(() => [
|
|
997
|
+
createBaseVNode("div", {
|
|
998
|
+
class: normalizeClass(_ctx.$style.backToCanvas),
|
|
999
|
+
"data-test-id": "back-to-canvas",
|
|
1000
|
+
onClick: close
|
|
1001
|
+
}, [
|
|
1002
|
+
createVNode(_component_n8n_icon, {
|
|
1003
|
+
icon: "arrow-left",
|
|
1004
|
+
color: "text-xlight",
|
|
1005
|
+
size: "medium"
|
|
1006
|
+
}),
|
|
1007
|
+
createVNode(_component_n8n_text, {
|
|
1008
|
+
color: "text-xlight",
|
|
1009
|
+
size: "medium",
|
|
1010
|
+
bold: true
|
|
1011
|
+
}, {
|
|
1012
|
+
default: withCtx(() => [
|
|
1013
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("ndv.backToCanvas")), 1)
|
|
1014
|
+
]),
|
|
1015
|
+
_: 1
|
|
1016
|
+
})
|
|
1017
|
+
], 2)
|
|
1018
|
+
]),
|
|
1019
|
+
_: 1
|
|
1020
|
+
}, 8, ["visible", "disabled"]),
|
|
1021
|
+
unref(activeNode) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1022
|
+
createBaseVNode("div", {
|
|
1023
|
+
class: normalizeClass(_ctx.$style.modalBackground),
|
|
1024
|
+
onClick: close
|
|
1025
|
+
}, null, 2),
|
|
1026
|
+
(openBlock(), createBlock(NDVDraggablePanels, {
|
|
1027
|
+
key: unref(activeNode).name,
|
|
1028
|
+
"is-trigger-node": isTriggerNode.value,
|
|
1029
|
+
"hide-input-and-output": activeNodeType.value === null,
|
|
1030
|
+
position: isTriggerNode.value && !showTriggerPanel.value ? 0 : void 0,
|
|
1031
|
+
"is-draggable": !isTriggerNode.value,
|
|
1032
|
+
"has-double-width": activeNodeType.value?.parameterPane === "wide",
|
|
1033
|
+
"node-type": activeNodeType.value,
|
|
1034
|
+
onSwitchSelectedNode,
|
|
1035
|
+
onOpenConnectionNodeCreator,
|
|
1036
|
+
onClose: close,
|
|
1037
|
+
onInit: onPanelsInit,
|
|
1038
|
+
onDragstart: onDragStart,
|
|
1039
|
+
onDragend: onDragEnd
|
|
1040
|
+
}, createSlots({
|
|
1041
|
+
output: withCtx(() => [
|
|
1042
|
+
createVNode(OutputPanel, {
|
|
1043
|
+
"data-test-id": "output-panel",
|
|
1044
|
+
workflow: _ctx.workflowObject,
|
|
1045
|
+
"can-link-runs": canLinkRuns.value,
|
|
1046
|
+
"run-index": outputRun.value,
|
|
1047
|
+
"linked-runs": linked.value,
|
|
1048
|
+
"push-ref": pushRef.value,
|
|
1049
|
+
"is-read-only": _ctx.readOnly || hasForeignCredential.value,
|
|
1050
|
+
"block-u-i": blockUi.value && isTriggerNode.value && !isExecutableTriggerNode.value,
|
|
1051
|
+
"is-production-execution-preview": _ctx.isProductionExecutionPreview,
|
|
1052
|
+
"is-pane-active": isOutputPaneActive.value,
|
|
1053
|
+
"display-mode": outputPanelDisplayMode.value,
|
|
1054
|
+
onActivatePane: activateOutputPane,
|
|
1055
|
+
onLinkRun: onLinkRunToOutput,
|
|
1056
|
+
onUnlinkRun: _cache[2] || (_cache[2] = () => onUnlinkRun("output")),
|
|
1057
|
+
onRunChange: onRunOutputIndexChange,
|
|
1058
|
+
onOpenSettings: openSettings,
|
|
1059
|
+
onTableMounted: onOutputTableMounted,
|
|
1060
|
+
onItemHover: onOutputItemHover,
|
|
1061
|
+
onSearch,
|
|
1062
|
+
onDisplayModeChange: _cache[3] || (_cache[3] = ($event) => handleChangeDisplayMode("output", $event))
|
|
1063
|
+
}, null, 8, ["workflow", "can-link-runs", "run-index", "linked-runs", "push-ref", "is-read-only", "block-u-i", "is-production-execution-preview", "is-pane-active", "display-mode"])
|
|
1064
|
+
]),
|
|
1065
|
+
main: withCtx(() => [
|
|
1066
|
+
createVNode(NodeSettings, {
|
|
1067
|
+
"event-bus": unref(settingsEventBus),
|
|
1068
|
+
dragging: isDragging.value,
|
|
1069
|
+
"push-ref": pushRef.value,
|
|
1070
|
+
"foreign-credentials": foreignCredentials.value,
|
|
1071
|
+
"read-only": _ctx.readOnly,
|
|
1072
|
+
"block-u-i": blockUi.value && showTriggerPanel.value,
|
|
1073
|
+
executable: !_ctx.readOnly,
|
|
1074
|
+
"input-size": inputSize.value,
|
|
1075
|
+
onValueChanged: valueChanged,
|
|
1076
|
+
onExecute: onNodeExecute,
|
|
1077
|
+
onStopExecution,
|
|
1078
|
+
onRedrawRequired: _cache[4] || (_cache[4] = ($event) => redrawRequired.value = true),
|
|
1079
|
+
onActivate: onWorkflowActivate,
|
|
1080
|
+
onSwitchSelectedNode,
|
|
1081
|
+
onOpenConnectionNodeCreator
|
|
1082
|
+
}, null, 8, ["event-bus", "dragging", "push-ref", "foreign-credentials", "read-only", "block-u-i", "executable", "input-size"]),
|
|
1083
|
+
featureRequestUrl.value ? (openBlock(), createElementBlock("a", {
|
|
1084
|
+
key: 0,
|
|
1085
|
+
class: normalizeClass(_ctx.$style.featureRequest),
|
|
1086
|
+
target: "_blank",
|
|
1087
|
+
onClick: onFeatureRequestClick
|
|
1088
|
+
}, [
|
|
1089
|
+
createVNode(_component_n8n_icon, { icon: "lightbulb" }),
|
|
1090
|
+
createTextVNode(" " + toDisplayString(unref(i18n).baseText("ndv.featureRequest")), 1)
|
|
1091
|
+
], 2)) : createCommentVNode("", true)
|
|
1092
|
+
]),
|
|
1093
|
+
_: 2
|
|
1094
|
+
}, [
|
|
1095
|
+
showTriggerPanel.value || !isTriggerNode.value ? {
|
|
1096
|
+
name: "input",
|
|
1097
|
+
fn: withCtx(() => [
|
|
1098
|
+
showTriggerPanel.value ? (openBlock(), createBlock(TriggerPanel, {
|
|
1099
|
+
key: 0,
|
|
1100
|
+
"node-name": unref(activeNode).name,
|
|
1101
|
+
"push-ref": pushRef.value,
|
|
1102
|
+
onExecute: onNodeExecute,
|
|
1103
|
+
onActivate: onWorkflowActivate
|
|
1104
|
+
}, null, 8, ["node-name", "push-ref"])) : !isTriggerNode.value ? (openBlock(), createBlock(InputPanel, {
|
|
1105
|
+
key: 1,
|
|
1106
|
+
workflow: _ctx.workflowObject,
|
|
1107
|
+
"can-link-runs": canLinkRuns.value,
|
|
1108
|
+
"run-index": inputRun.value,
|
|
1109
|
+
"linked-runs": linked.value,
|
|
1110
|
+
"current-node-name": inputNodeName.value,
|
|
1111
|
+
"push-ref": pushRef.value,
|
|
1112
|
+
"read-only": _ctx.readOnly || hasForeignCredential.value,
|
|
1113
|
+
"is-production-execution-preview": _ctx.isProductionExecutionPreview,
|
|
1114
|
+
"is-pane-active": isInputPaneActive.value,
|
|
1115
|
+
"display-mode": inputPanelDisplayMode.value,
|
|
1116
|
+
onActivatePane: activateInputPane,
|
|
1117
|
+
onLinkRun: onLinkRunToInput,
|
|
1118
|
+
onUnlinkRun: _cache[0] || (_cache[0] = () => onUnlinkRun("input")),
|
|
1119
|
+
onRunChange: onRunInputIndexChange,
|
|
1120
|
+
onOpenSettings: openSettings,
|
|
1121
|
+
onChangeInputNode: onInputNodeChange,
|
|
1122
|
+
onExecute: onNodeExecute,
|
|
1123
|
+
onTableMounted: onInputTableMounted,
|
|
1124
|
+
onItemHover: onInputItemHover,
|
|
1125
|
+
onSearch,
|
|
1126
|
+
onDisplayModeChange: _cache[1] || (_cache[1] = ($event) => handleChangeDisplayMode("input", $event))
|
|
1127
|
+
}, null, 8, ["workflow", "can-link-runs", "run-index", "linked-runs", "current-node-name", "push-ref", "read-only", "is-production-execution-preview", "is-pane-active", "display-mode"])) : createCommentVNode("", true)
|
|
1128
|
+
]),
|
|
1129
|
+
key: "0"
|
|
1130
|
+
} : void 0
|
|
1131
|
+
]), 1032, ["is-trigger-node", "hide-input-and-output", "position", "is-draggable", "has-double-width", "node-type"]))
|
|
1132
|
+
], 512)) : createCommentVNode("", true)
|
|
1133
|
+
]),
|
|
1134
|
+
_: 1
|
|
1135
|
+
}, 8, ["model-value", "append-to", "z-index", "data-has-output-connection"]);
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
const modalBackground = "_modalBackground_176ah_123";
|
|
1140
|
+
const triggerWarning = "_triggerWarning_176ah_128";
|
|
1141
|
+
const backToCanvas = "_backToCanvas_176ah_132";
|
|
1142
|
+
const featureRequest = "_featureRequest_176ah_153";
|
|
1143
|
+
const style1 = {
|
|
1144
|
+
modalBackground,
|
|
1145
|
+
triggerWarning,
|
|
1146
|
+
backToCanvas,
|
|
1147
|
+
featureRequest
|
|
1148
|
+
};
|
|
1149
|
+
const cssModules = {
|
|
1150
|
+
"$style": style1
|
|
1151
|
+
};
|
|
1152
|
+
const NodeDetailsView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
1153
|
+
export {
|
|
1154
|
+
NodeDetailsView as default
|
|
1155
|
+
};
|