n8n-editor-ui 1.68.0 → 1.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/assets/AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-RSY0bJ42.js +57 -0
  2. package/dist/assets/{AuthView-C7b2xzS9.js → AuthView-CrxWnr-e.js} +1 -1
  3. package/dist/assets/{CanvasChat-QctJb8ta.js → CanvasChat-D1ZEiEqI.js} +3 -2
  4. package/dist/assets/{CanvasControls-raoYims4.js → CanvasControls-C-GYIweg.js} +6 -5
  5. package/dist/assets/{ChangePasswordView-BBju88Nm.js → ChangePasswordView-BcJsOCsw.js} +2 -2
  6. package/dist/assets/CollectionParameter-BCa4NW-h.js +4 -0
  7. package/dist/assets/{CredentialsView-BfYXjOVw.js → CredentialsView-C0lKel2q.js} +11 -26
  8. package/dist/assets/{ErrorView-BhPrjw7c.js → ErrorView-4g2OU1Dw.js} +5 -4
  9. package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-Ba-at9rw.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-Ce7AgzqR.js} +2 -2
  10. package/dist/assets/{ExecutionsView-Dcw07XZ-.js → ExecutionsView-BjrC38YB.js} +7 -11
  11. package/dist/assets/{FileSaver.min-CKlTVpWB.js → FileSaver.min-Kzijnshy.js} +1 -1
  12. package/dist/assets/{FixedCollectionParameter-CkI6mCZG.js → FixedCollectionParameter-BlCn1bdn.js} +1 -1
  13. package/dist/assets/{ForgotMyPasswordView--eKPrTSW.js → ForgotMyPasswordView-DM0y4hNn.js} +2 -2
  14. package/dist/assets/{MainHeader-DJdd17Nh.css → MainHeader-CgL_r4xK.css} +53 -24
  15. package/dist/assets/{MainHeader-Btek9DoL.js → MainHeader-D1PkO9vp.js} +67 -41
  16. package/dist/assets/{MainSidebar-CRjg4yDv.js → MainSidebar-CGlOacQQ.js} +63 -127
  17. package/dist/assets/{MainSidebar-BRYJRpOA.css → MainSidebar-DL53w2zU.css} +37 -21
  18. package/dist/assets/{NodeCreation-CDpNw3BL.js → NodeCreation-yT3JgYis.js} +7 -6
  19. package/dist/assets/{NodeCreator-DPpQXLHf.js → NodeCreator-CeYHZgYz.js} +22 -21
  20. package/dist/assets/{NodeViewSwitcher-CNfOOUof.js → NodeViewSwitcher-DJ9GWTwy.js} +592 -370
  21. package/dist/assets/{NodeViewSwitcher-DuVIKqpm.css → NodeViewSwitcher-s2TUlOvE.css} +126 -106
  22. package/dist/assets/{ProjectCardBadge-DzaTsr93.js → ProjectCardBadge-dGORr1ye.js} +1 -1
  23. package/dist/assets/{ProjectHeader-wdvHJxbT.js → ProjectHeader-CFoxyI0_.js} +58 -38
  24. package/dist/assets/{ProjectHeader-09VQWBZH.css → ProjectHeader-CTK_rV3h.css} +13 -6
  25. package/dist/assets/{ProjectSettings-B6j0VJK5.js → ProjectSettings-Bgl_JGoT.js} +24 -23
  26. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-ByoMju5L.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-BabWwsdK.js} +1 -1
  27. package/dist/assets/{ResourcesListLayout-9Vpyt6Ec.js → ResourcesListLayout-B1KB8fTB.js} +3 -16
  28. package/dist/assets/{ResourcesListLayout-CuA8O7do.css → ResourcesListLayout-BuxiQpsj.css} +8 -8
  29. package/dist/assets/{RunDataJson-sPhT7c2h.js → RunDataJson-BQRWHoEA.js} +12 -12
  30. package/dist/assets/{RunDataJsonActions-DiMvLis_.js → RunDataJsonActions-BrABJ_1T.js} +3 -2
  31. package/dist/assets/{RunDataSearch-CF_rpBKx.js → RunDataSearch-kYhI-gst.js} +1 -1
  32. package/dist/assets/{RunDataTable-T52TXUHR.js → RunDataTable-BUXF-nH1.js} +144 -35
  33. package/dist/assets/{RunDataTable-ZwoYenSI.css → RunDataTable-enskmmU4.css} +41 -35
  34. package/dist/assets/{SamlOnboarding-BCn53xtf.js → SamlOnboarding-DI1aQpmq.js} +2 -2
  35. package/dist/assets/{SettingsApiView-DumvK072.js → SettingsApiView-DfdFSKxW.js} +1 -1
  36. package/dist/assets/{SettingsCommunityNodesView-Db787Jar.js → SettingsCommunityNodesView-CFGZW601.js} +3 -3
  37. package/dist/assets/{SettingsExternalSecrets-DKB2o2Dq.js → SettingsExternalSecrets-CzMuyldc.js} +1 -1
  38. package/dist/assets/{SettingsLdapView-BoKoCT5V.js → SettingsLdapView-B_aMpNa8.js} +1 -1
  39. package/dist/assets/{SettingsLogStreamingView-BGX39Unz.js → SettingsLogStreamingView-ByHGVzc1.js} +1 -1
  40. package/dist/assets/{SettingsPersonalView-fTCeSJfu.js → SettingsPersonalView-BpmD5Kqd.js} +1 -1
  41. package/dist/assets/{SettingsSourceControl-_G83P363.js → SettingsSourceControl-DeYPQUBX.js} +1 -1
  42. package/dist/assets/{SettingsSso-Bn48qAiX.js → SettingsSso-1JSXMGCZ.js} +1 -1
  43. package/dist/assets/{SettingsUsageAndPlan-DZkS0RP4.js → SettingsUsageAndPlan-CsUyzTgS.js} +1 -1
  44. package/dist/assets/{SettingsUsersView-BUh2iKEW.js → SettingsUsersView-iOvCX1d1.js} +1 -1
  45. package/dist/assets/{SettingsView-D_S4x7XG.js → SettingsView-WL2khukL.js} +1 -1
  46. package/dist/assets/{SetupView-BenKVU0l.js → SetupView-CeWIEjRa.js} +2 -2
  47. package/dist/assets/{SetupWorkflowCredentialsButton-DKr9ZPLE.js → SetupWorkflowCredentialsButton-CqzxyhWQ.js} +1 -1
  48. package/dist/assets/{SetupWorkflowFromTemplateView-Ce1R_CDh.js → SetupWorkflowFromTemplateView-HpPUcyfA.js} +3 -3
  49. package/dist/assets/{SigninView-xl5aJqka.js → SigninView-DuDYUyp-.js} +2 -2
  50. package/dist/assets/{SignoutView-Bscz6u1Y.js → SignoutView-4gm8WRHv.js} +1 -1
  51. package/dist/assets/{SignupView-CZN8EhJV.js → SignupView-DjY8EclM.js} +2 -2
  52. package/dist/assets/{TemplateDetails-BAQ3vBNJ.js → TemplateDetails-CbfdJ3Zu.js} +2 -2
  53. package/dist/assets/{TemplateList-DD7sqnpI.js → TemplateList-Cc_F6A58.js} +3 -2
  54. package/dist/assets/{TemplatesCollectionView-CG3ZoY8i.js → TemplatesCollectionView-BcZLoIe4.js} +5 -5
  55. package/dist/assets/{TemplatesSearchView-22jrqI8X.js → TemplatesSearchView-BMfAKWhL.js} +3 -3
  56. package/dist/assets/{TemplatesView-BZFc4hZ1.js → TemplatesView-BP0ATqW_.js} +3 -2
  57. package/dist/assets/{TemplatesWorkflowView-DkXtdhUJ.js → TemplatesWorkflowView-CPkYdvfj.js} +5 -5
  58. package/dist/assets/{VariablesView-DHu4ZoMN.js → VariablesView-Bxnz2qAN.js} +12 -12
  59. package/dist/assets/{VariablesView-BPKo50HJ.css → VariablesView-meR15bnW.css} +18 -18
  60. package/dist/assets/{WorkerView-BfxdQiAc.js → WorkerView-DReO6N8w.js} +11 -10
  61. package/dist/assets/{WorkflowActivator-CvdQVEtW.js → WorkflowActivator-B0RYBWDC.js} +2 -2
  62. package/dist/assets/{WorkflowExecutionsInfoAccordion-D2GFnpq1.js → WorkflowExecutionsInfoAccordion-DQl3QT6U.js} +7 -6
  63. package/dist/assets/{WorkflowExecutionsLandingPage-D2bvAsxg.js → WorkflowExecutionsLandingPage-B47g0omt.js} +2 -2
  64. package/dist/assets/{WorkflowExecutionsPreview-D6WBsbAG.js → WorkflowExecutionsPreview-3ZPhGB00.js} +12 -11
  65. package/dist/assets/{WorkflowExecutionsView-DI6r5OvZ.js → WorkflowExecutionsView-C2F5tFjz.js} +18 -9
  66. package/dist/assets/{WorkflowExecutionsView-CZKkPKqJ.css → WorkflowExecutionsView-CepgQyRt.css} +2 -2
  67. package/dist/assets/{WorkflowHistory-Dc1f2Tsn.js → WorkflowHistory-tThywxbZ.js} +3 -3
  68. package/dist/assets/{WorkflowOnboardingView-DyxvWfZ7.js → WorkflowOnboardingView-DJv_JU2k.js} +32 -1
  69. package/dist/assets/{WorkflowPreview-hC6wSe-Y.js → WorkflowPreview-DawY1Fi4.js} +1 -1
  70. package/dist/assets/{WorkflowsView-SIDgO47b.js → WorkflowsView-DA1gqPuM.js} +15 -56
  71. package/dist/assets/{index-40I5DMGP.js → index-BcRlEQdt.js} +1312 -1195
  72. package/dist/assets/{index-Dr3zFZlC.css → index-CSJeF569.css} +213 -203
  73. package/dist/assets/{pushConnection.store-w_WxpOeH.js → pushConnection.store-C9cp1cmF.js} +1 -1
  74. package/dist/assets/{templateActions-D4EHdA9n.js → templateActions-BM1BlED1.js} +1 -1
  75. package/dist/assets/{useBugReporting-CFOQlQpP.js → useBugReporting-D4ibEI2f.js} +1 -1
  76. package/dist/assets/{useExecutionDebugging-LQQWXhPj.js → useExecutionDebugging-B9k8m7iG.js} +1 -1
  77. package/dist/assets/useExecutionHelpers-DYE5_K78.js +113 -0
  78. package/dist/assets/useGlobalEntityCreation-DtWHHZf8.js +168 -0
  79. package/dist/assets/{useNodeViewVersionSwitcher-BLo5Qp-N.js → useNodeViewVersionSwitcher-CSLoLUvW.js} +1 -1
  80. package/dist/assets/{usePushConnection-B5ija5f5.js → usePushConnection-BLi9GBVo.js} +63 -111
  81. package/dist/assets/{useRunWorkflow-MrEKURG4.js → useRunWorkflow-DOJBXbbW.js} +68 -147
  82. package/dist/assets/{useWorkflowActivate-CKedJlgZ.js → useWorkflowActivate-DmBELETa.js} +1 -1
  83. package/dist/index.html +2 -2
  84. package/package.json +1 -1
  85. package/dist/assets/CollectionParameter-DNJAimAt.js +0 -4
  86. package/dist/assets/dateFormatter-BRi2wSZ-.js +0 -21
  87. package/dist/assets/useExecutionHelpers-CXGl_HIp.js +0 -115
@@ -1,4 +1,4 @@
1
- import { C as createEventBus, R as defineStore, S as STORES, Z as useRootStore, m as useSettingsStore, p as computed, r as ref, W as TIME } from "./index-40I5DMGP.js";
1
+ import { C as createEventBus, R as defineStore, S as STORES, Z as useRootStore, p as useSettingsStore, q as computed, r as ref, W as TIME } from "./index-BcRlEQdt.js";
2
2
  const globalLinkActionsEventBus = createEventBus();
3
3
  const usePushConnectionStore = defineStore(STORES.PUSH, () => {
4
4
  const rootStore = useRootStore();
@@ -1,4 +1,4 @@
1
- import { iE as TEMPLATE_CREDENTIAL_SETUP_EXPERIMENT, fg as assert, V as VIEWS, gz as tryToParseNumber, iI as doesNodeHaveCredentialsToFill, iJ as getNewWorkflow, iK as replaceAllTemplateNodeCredentials, gy as getFixedNodesList } from "./index-40I5DMGP.js";
1
+ import { iE as TEMPLATE_CREDENTIAL_SETUP_EXPERIMENT, fi as assert, V as VIEWS, gB as tryToParseNumber, iI as doesNodeHaveCredentialsToFill, iJ as getNewWorkflow, iK as replaceAllTemplateNodeCredentials, gA as getFixedNodesList } from "./index-BcRlEQdt.js";
2
2
  async function createWorkflowFromTemplate(opts) {
3
3
  const { credentialOverrides, nodeTypeProvider, rootStore, template, workflowsStore } = opts;
4
4
  const workflowData = await getNewWorkflow(rootStore.restApiContext, { name: template.name });
@@ -1,4 +1,4 @@
1
- import { hL as useDebugInfo } from "./index-40I5DMGP.js";
1
+ import { hM as useDebugInfo } from "./index-BcRlEQdt.js";
2
2
  const BASE_FORUM_URL = "https://github.com/n8n-io/n8n/issues/new?labels=bug-report";
3
3
  const REPORT_TEMPLATE = `
4
4
  <!-- Please follow the template below. Skip the questions that are not relevant to you. -->
@@ -1,4 +1,4 @@
1
- import { b as useRouter, a as useToast, T as useWorkflowsStore, m as useSettingsStore, K as useUIStore, a5 as usePageRedirectionHelper, p as computed, a8 as EnterpriseEditionFeature, aq as h, hC as sanitizeHtml, ae as MODAL_CONFIRM, V as VIEWS, Z as useRootStore, i5 as isFullExecutionResponse, i6 as DEBUG_PAYWALL_MODAL_KEY, ak as useTelemetry, g as useI18n, al as useMessage } from "./index-40I5DMGP.js";
1
+ import { b as useRouter, a as useToast, T as useWorkflowsStore, p as useSettingsStore, K as useUIStore, a5 as usePageRedirectionHelper, q as computed, a8 as EnterpriseEditionFeature, aq as h, hD as sanitizeHtml, ae as MODAL_CONFIRM, V as VIEWS, Z as useRootStore, i5 as isFullExecutionResponse, i6 as DEBUG_PAYWALL_MODAL_KEY, ak as useTelemetry, g as useI18n, al as useMessage } from "./index-BcRlEQdt.js";
2
2
  const useExecutionDebugging = () => {
3
3
  const telemetry = useTelemetry();
4
4
  const router = useRouter();
@@ -0,0 +1,113 @@
1
+ import { j2 as dateformat, b as useRouter, V as VIEWS, g as useI18n, ak as useTelemetry } from "./index-BcRlEQdt.js";
2
+ const convertToDisplayDateComponents = (fullDate) => {
3
+ const mask = `d mmm${new Date(fullDate).getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? "" : ", yyyy"}#HH:MM:ss`;
4
+ const formattedDate = dateformat(fullDate, mask);
5
+ const [date, time] = formattedDate.split("#");
6
+ return { date, time };
7
+ };
8
+ function convertToDisplayDate(fullDate) {
9
+ const mask = `d mmm${new Date(fullDate).getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? "" : ", yyyy"}#HH:MM:ss`;
10
+ const formattedDate = dateformat(fullDate, mask);
11
+ const [date, time] = formattedDate.split("#");
12
+ return { date, time };
13
+ }
14
+ const toDayMonth = (fullDate) => dateformat(fullDate, "d mmm");
15
+ const toTime = (fullDate) => dateformat(fullDate, "HH:MM:ss");
16
+ function useExecutionHelpers() {
17
+ const i18n = useI18n();
18
+ const router = useRouter();
19
+ const telemetry = useTelemetry();
20
+ function getUIDetails(execution) {
21
+ var _a, _b;
22
+ const status = {
23
+ name: "unknown",
24
+ createdAt: ((_a = execution.createdAt) == null ? void 0 : _a.toString()) ?? "",
25
+ startTime: formatDate(execution.startedAt),
26
+ label: "Status unknown",
27
+ runningTime: "",
28
+ showTimestamp: true,
29
+ tags: ((_b = execution.annotation) == null ? void 0 : _b.tags) ?? []
30
+ };
31
+ if (execution.status === "new") {
32
+ status.name = "new";
33
+ status.label = i18n.baseText("executionsList.new");
34
+ status.showTimestamp = false;
35
+ } else if (execution.status === "waiting") {
36
+ status.name = "waiting";
37
+ status.label = i18n.baseText("executionsList.waiting");
38
+ status.showTimestamp = false;
39
+ } else if (execution.status === "canceled") {
40
+ status.label = i18n.baseText("executionsList.canceled");
41
+ } else if (execution.status === "running") {
42
+ status.name = "running";
43
+ status.label = i18n.baseText("executionsList.running");
44
+ } else if (execution.status === "success") {
45
+ status.name = "success";
46
+ status.label = i18n.baseText("executionsList.succeeded");
47
+ } else if (execution.status === "error" || execution.status === "crashed") {
48
+ status.name = "error";
49
+ status.label = i18n.baseText("executionsList.error");
50
+ }
51
+ if (!execution.status) execution.status = "unknown";
52
+ if (execution.startedAt && execution.stoppedAt) {
53
+ const stoppedAt = execution.stoppedAt ? new Date(execution.stoppedAt).getTime() : Date.now();
54
+ status.runningTime = i18n.displayTimer(
55
+ stoppedAt - new Date(execution.startedAt).getTime(),
56
+ true
57
+ );
58
+ }
59
+ return status;
60
+ }
61
+ function formatDate(fullDate) {
62
+ const { date, time } = convertToDisplayDate(fullDate);
63
+ return i18n.baseText("executionsList.started", { interpolate: { time, date } });
64
+ }
65
+ function isExecutionRetriable(execution) {
66
+ return ["crashed", "error"].includes(execution.status) && !execution.retrySuccessId;
67
+ }
68
+ function openExecutionInNewTab(executionId, workflowId) {
69
+ const route = router.resolve({
70
+ name: VIEWS.EXECUTION_PREVIEW,
71
+ params: { name: workflowId, executionId }
72
+ });
73
+ window.open(route.href, "_blank");
74
+ }
75
+ function resolveRelatedExecutionUrl(metadata) {
76
+ const info = metadata.parentExecution || metadata.subExecution;
77
+ if (!info) {
78
+ return "";
79
+ }
80
+ const { workflowId, executionId } = info;
81
+ return router.resolve({
82
+ name: VIEWS.EXECUTION_PREVIEW,
83
+ params: { name: workflowId, executionId }
84
+ }).fullPath;
85
+ }
86
+ function trackOpeningRelatedExecution(metadata, view) {
87
+ const info = metadata.parentExecution || metadata.subExecution;
88
+ if (!info) {
89
+ return;
90
+ }
91
+ telemetry.track(
92
+ metadata.parentExecution ? "User clicked parent execution button" : "User clicked inspect sub-workflow",
93
+ {
94
+ view
95
+ }
96
+ );
97
+ }
98
+ return {
99
+ getUIDetails,
100
+ formatDate,
101
+ isExecutionRetriable,
102
+ openExecutionInNewTab,
103
+ trackOpeningRelatedExecution,
104
+ resolveRelatedExecutionUrl
105
+ };
106
+ }
107
+ export {
108
+ toTime as a,
109
+ convertToDisplayDate as b,
110
+ convertToDisplayDateComponents as c,
111
+ toDayMonth as t,
112
+ useExecutionHelpers as u
113
+ };
@@ -0,0 +1,168 @@
1
+ import { a1 as useProjectsStore, a0 as useSourceControlStore, b as useRouter, a as useToast, q as computed, aH as sortByProperty, V as VIEWS, cV as toValue, a5 as usePageRedirectionHelper, g as useI18n, am as getResourcePermissions } from "./index-BcRlEQdt.js";
2
+ const useGlobalEntityCreation = (multipleProjects = true) => {
3
+ const CREATE_PROJECT_ID = "create-project";
4
+ const projectsStore = useProjectsStore();
5
+ const sourceControlStore = useSourceControlStore();
6
+ const router = useRouter();
7
+ const i18n = useI18n();
8
+ const toast = useToast();
9
+ const displayProjects = computed(
10
+ () => sortByProperty(
11
+ "name",
12
+ projectsStore.myProjects.filter((p) => p.type === "team")
13
+ )
14
+ );
15
+ const disabledWorkflow = (scopes = []) => sourceControlStore.preferences.branchReadOnly || !getResourcePermissions(scopes).workflow.create;
16
+ const disabledCredential = (scopes = []) => sourceControlStore.preferences.branchReadOnly || !getResourcePermissions(scopes).credential.create;
17
+ const menu = computed(() => {
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
19
+ if (!projectsStore.canCreateProjects) {
20
+ return [
21
+ {
22
+ id: "workflow",
23
+ title: "Workflow",
24
+ route: {
25
+ name: VIEWS.NEW_WORKFLOW,
26
+ query: {
27
+ projectId: (_a = projectsStore.personalProject) == null ? void 0 : _a.id
28
+ }
29
+ }
30
+ },
31
+ {
32
+ id: "credential",
33
+ title: "Credential",
34
+ route: {
35
+ name: VIEWS.CREDENTIALS,
36
+ params: {
37
+ projectId: (_b = projectsStore.personalProject) == null ? void 0 : _b.id,
38
+ credentialId: "create"
39
+ }
40
+ }
41
+ }
42
+ ];
43
+ }
44
+ if (!toValue(multipleProjects)) {
45
+ return [
46
+ {
47
+ id: "workflow",
48
+ title: "Workflow",
49
+ disabled: disabledWorkflow((_c = projectsStore.currentProject) == null ? void 0 : _c.scopes),
50
+ route: {
51
+ name: VIEWS.NEW_WORKFLOW,
52
+ query: {
53
+ projectId: (_d = projectsStore.currentProject) == null ? void 0 : _d.id
54
+ }
55
+ }
56
+ },
57
+ {
58
+ id: "credential",
59
+ title: "Credential",
60
+ disabled: disabledCredential((_e = projectsStore.currentProject) == null ? void 0 : _e.scopes),
61
+ route: {
62
+ name: VIEWS.PROJECTS_CREDENTIALS,
63
+ params: {
64
+ projectId: (_f = projectsStore.currentProject) == null ? void 0 : _f.id,
65
+ credentialId: "create"
66
+ }
67
+ }
68
+ }
69
+ ];
70
+ }
71
+ return [
72
+ {
73
+ id: "workflow",
74
+ title: "Workflow",
75
+ submenu: [
76
+ {
77
+ id: "workflow-title",
78
+ title: "Create in",
79
+ disabled: true
80
+ },
81
+ {
82
+ id: "workflow-personal",
83
+ title: i18n.baseText("projects.menu.personal"),
84
+ icon: "user",
85
+ disabled: disabledWorkflow((_g = projectsStore.personalProject) == null ? void 0 : _g.scopes),
86
+ route: {
87
+ name: VIEWS.NEW_WORKFLOW,
88
+ query: { projectId: (_h = projectsStore.personalProject) == null ? void 0 : _h.id }
89
+ }
90
+ },
91
+ ...displayProjects.value.map((project) => ({
92
+ id: `workflow-${project.id}`,
93
+ title: project.name,
94
+ icon: "layer-group",
95
+ disabled: disabledWorkflow(project.scopes),
96
+ route: {
97
+ name: VIEWS.NEW_WORKFLOW,
98
+ query: { projectId: project.id }
99
+ }
100
+ }))
101
+ ]
102
+ },
103
+ {
104
+ id: "credential",
105
+ title: "Credential",
106
+ submenu: [
107
+ {
108
+ id: "credential-title",
109
+ title: "Create in",
110
+ disabled: true
111
+ },
112
+ {
113
+ id: "credential-personal",
114
+ title: i18n.baseText("projects.menu.personal"),
115
+ icon: "user",
116
+ disabled: disabledCredential((_i = projectsStore.personalProject) == null ? void 0 : _i.scopes),
117
+ route: {
118
+ name: VIEWS.PROJECTS_CREDENTIALS,
119
+ params: { projectId: (_j = projectsStore.personalProject) == null ? void 0 : _j.id, credentialId: "create" }
120
+ }
121
+ },
122
+ ...displayProjects.value.map((project) => ({
123
+ id: `credential-${project.id}`,
124
+ title: project.name,
125
+ icon: "layer-group",
126
+ disabled: disabledCredential(project.scopes),
127
+ route: {
128
+ name: VIEWS.PROJECTS_CREDENTIALS,
129
+ params: { projectId: project.id, credentialId: "create" }
130
+ }
131
+ }))
132
+ ]
133
+ },
134
+ {
135
+ id: CREATE_PROJECT_ID,
136
+ title: "Project"
137
+ }
138
+ ];
139
+ });
140
+ const createProject = async () => {
141
+ try {
142
+ const newProject = await projectsStore.createProject({
143
+ name: i18n.baseText("projects.settings.newProjectName")
144
+ });
145
+ await router.push({ name: VIEWS.PROJECT_SETTINGS, params: { projectId: newProject.id } });
146
+ toast.showMessage({
147
+ title: i18n.baseText("projects.settings.save.successful.title", {
148
+ interpolate: { projectName: newProject.name }
149
+ }),
150
+ type: "success"
151
+ });
152
+ } catch (error) {
153
+ toast.showError(error, i18n.baseText("projects.error.title"));
154
+ }
155
+ };
156
+ const handleSelect = (id) => {
157
+ if (id !== CREATE_PROJECT_ID) return;
158
+ if (projectsStore.canCreateProjects) {
159
+ void createProject();
160
+ return;
161
+ }
162
+ void usePageRedirectionHelper().goToUpgrade("rbac", "upgrade-rbac");
163
+ };
164
+ return { menu, handleSelect };
165
+ };
166
+ export {
167
+ useGlobalEntityCreation as u
168
+ };
@@ -1,4 +1,4 @@
1
- import { K as useUIStore, $ as useCanvasStore, r as ref, p as computed, V as VIEWS, g as useI18n, at as useNDVStore, T as useWorkflowsStore, m as useSettingsStore, hJ as refDebounced, hK as useLocalStorage, ak as useTelemetry } from "./index-40I5DMGP.js";
1
+ import { K as useUIStore, $ as useCanvasStore, r as ref, q as computed, V as VIEWS, g as useI18n, at as useNDVStore, T as useWorkflowsStore, p as useSettingsStore, hK as refDebounced, hL as useLocalStorage, ak as useTelemetry } from "./index-BcRlEQdt.js";
2
2
  function useBeforeUnload({ route }) {
3
3
  const uiStore = useUIStore();
4
4
  const canvasStore = useCanvasStore();
@@ -1,5 +1,5 @@
1
- import { iY as makeRestApiRequest, R as defineStore, Z as useRootStore, d as defineComponent, c as openBlock, h as createElementBlock, k as createTextVNode, t as toDisplayString, j as createBaseVNode, A as unref, g as useI18n, a4 as useWorkflowHelpers, bg as useNodeHelpers, a as useToast, dS as useCredentialsStore, bf as useNodeTypesStore, m as useSettingsStore, K as useUIStore, T as useWorkflowsStore, hP as useAssistantStore, r as ref, iZ as parse, i_ as codeNodeEditorEventBus, ag as WORKFLOW_SETTINGS_MODAL_KEY, gw as generateNodesGraph, aq as h, eV as getTriggerNodeServiceName, aK as useExternalHooks, ak as useTelemetry } from "./index-40I5DMGP.js";
2
- import { u as usePushConnectionStore, g as globalLinkActionsEventBus } from "./pushConnection.store-w_WxpOeH.js";
1
+ import { iY as makeRestApiRequest, R as defineStore, Z as useRootStore, d as defineComponent, cF as resolveDirective, c as openBlock, h as createElementBlock, ax as withDirectives, j as createBaseVNode, t as toDisplayString, l as unref, g as useI18n, a4 as useWorkflowHelpers, bi as useNodeHelpers, a as useToast, dU as useCredentialsStore, bh as useNodeTypesStore, p as useSettingsStore, K as useUIStore, T as useWorkflowsStore, hQ as useAssistantStore, r as ref, iZ as parse, i_ as codeNodeEditorEventBus, ag as WORKFLOW_SETTINGS_MODAL_KEY, gy as generateNodesGraph, aq as h, eX as getTriggerNodeServiceName, aM as useExternalHooks, ak as useTelemetry } from "./index-BcRlEQdt.js";
2
+ import { u as usePushConnectionStore, g as globalLinkActionsEventBus } from "./pushConnection.store-C9cp1cmF.js";
3
3
  const GET_STATUS_ENDPOINT = "/orchestration/worker/status";
4
4
  const sendGetWorkerStatus = async (context) => {
5
5
  await makeRestApiRequest(context, "POST", GET_STATUS_ENDPOINT);
@@ -62,7 +62,8 @@ const useOrchestrationStore = defineStore("orchestrationManager", {
62
62
  }
63
63
  }
64
64
  });
65
- const _hoisted_1 = ["data-action-parameter-node"];
65
+ const _hoisted_1 = { "data-test-id": "sanitized-error-message" };
66
+ const _hoisted_2 = ["data-action-parameter-node"];
66
67
  const _sfc_main = /* @__PURE__ */ defineComponent({
67
68
  __name: "NodeExecutionErrorMessage",
68
69
  props: {
@@ -72,13 +73,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
73
  setup(__props) {
73
74
  const i18n = useI18n();
74
75
  return (_ctx, _cache) => {
76
+ const _directive_n8n_html = resolveDirective("n8n-html");
75
77
  return openBlock(), createElementBlock("div", null, [
76
- createTextVNode(toDisplayString(_ctx.errorMessage), 1),
78
+ withDirectives(createBaseVNode("span", _hoisted_1, null, 512), [
79
+ [_directive_n8n_html, _ctx.errorMessage]
80
+ ]),
77
81
  _cache[0] || (_cache[0] = createBaseVNode("br", null, null, -1)),
78
82
  createBaseVNode("a", {
79
83
  "data-action": "openNodeDetail",
80
84
  "data-action-parameter-node": _ctx.nodeName
81
- }, toDisplayString(unref(i18n).baseText("node.executionError.openNode")), 9, _hoisted_1)
85
+ }, toDisplayString(unref(i18n).baseText("node.executionError.openNode")), 9, _hoisted_2)
82
86
  ]);
83
87
  };
84
88
  }
@@ -110,8 +114,8 @@ function usePushConnection({ router }) {
110
114
  removeEventListener.value();
111
115
  }
112
116
  }
113
- function queuePushMessage(event2, retryAttempts) {
114
- pushMessageQueue.value.push({ message: event2, retriesLeft: retryAttempts });
117
+ function queuePushMessage(event, retryAttempts) {
118
+ pushMessageQueue.value.push({ message: event, retriesLeft: retryAttempts });
115
119
  if (retryTimeout.value === null) {
116
120
  retryTimeout.value = setTimeout(processWaitingPushMessages, 20);
117
121
  }
@@ -138,7 +142,7 @@ function usePushConnection({ router }) {
138
142
  }
139
143
  }
140
144
  async function pushMessageReceived(receivedData, isRetry) {
141
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G;
145
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
142
146
  const retryAttempts = 5;
143
147
  if (receivedData.type === "sendWorkerStatusMessage") {
144
148
  const pushData = receivedData.data;
@@ -161,52 +165,11 @@ function usePushConnection({ router }) {
161
165
  const pushData = receivedData.data;
162
166
  if (workflowsStore.activeExecutionId !== pushData.executionId) {
163
167
  if (isRetry !== true) {
164
- queuePushMessage(event, retryAttempts);
168
+ queuePushMessage(receivedData, retryAttempts);
165
169
  }
166
170
  return false;
167
171
  }
168
172
  }
169
- let recoveredPushData = void 0;
170
- if (receivedData.type === "executionRecovered") {
171
- const recoveredExecutionId = (_a = receivedData.data) == null ? void 0 : _a.executionId;
172
- const isWorkflowRunning = uiStore.isActionActive["workflowRunning"];
173
- if (isWorkflowRunning && workflowsStore.activeExecutionId === recoveredExecutionId) {
174
- const executionData = await workflowsStore.fetchExecutionDataById(
175
- workflowsStore.activeExecutionId
176
- );
177
- if (executionData == null ? void 0 : executionData.data) {
178
- executionData.data = parse(executionData.data);
179
- const iRunExecutionData = {
180
- startData: (_b = executionData.data) == null ? void 0 : _b.startData,
181
- resultData: ((_c = executionData.data) == null ? void 0 : _c.resultData) ?? { runData: {} },
182
- executionData: (_d = executionData.data) == null ? void 0 : _d.executionData
183
- };
184
- if (((_e = workflowsStore.workflowExecutionData) == null ? void 0 : _e.workflowId) === executionData.workflowId) {
185
- const activeRunData = (_h = (_g = (_f = workflowsStore.workflowExecutionData) == null ? void 0 : _f.data) == null ? void 0 : _g.resultData) == null ? void 0 : _h.runData;
186
- if (activeRunData) {
187
- for (const key of Object.keys(activeRunData)) {
188
- iRunExecutionData.resultData.runData[key] = activeRunData[key];
189
- }
190
- }
191
- }
192
- const iRun = {
193
- data: iRunExecutionData,
194
- finished: executionData.finished,
195
- mode: executionData.mode,
196
- waitTill: (_i = executionData.data) == null ? void 0 : _i.waitTill,
197
- startedAt: executionData.startedAt,
198
- stoppedAt: executionData.stoppedAt,
199
- status: "crashed"
200
- };
201
- if (executionData.data) {
202
- recoveredPushData = {
203
- executionId: executionData.id,
204
- data: iRun
205
- };
206
- }
207
- }
208
- }
209
- }
210
173
  if (receivedData.type === "workflowFailedToActivate" && workflowsStore.workflowId === receivedData.data.workflowId) {
211
174
  workflowsStore.setWorkflowInactive(receivedData.data.workflowId);
212
175
  workflowsStore.setActive(false);
@@ -227,37 +190,37 @@ function usePushConnection({ router }) {
227
190
  return true;
228
191
  }
229
192
  if (receivedData.type === "executionFinished" || receivedData.type === "executionRecovered") {
230
- let pushData;
231
- if (receivedData.type === "executionRecovered" && recoveredPushData !== void 0) {
232
- pushData = recoveredPushData;
233
- } else {
234
- pushData = receivedData.data;
235
- }
236
- const { activeExecutionId } = workflowsStore;
237
- if (activeExecutionId === pushData.executionId) {
238
- const activeRunData = (_l = (_k = (_j = workflowsStore.workflowExecutionData) == null ? void 0 : _j.data) == null ? void 0 : _k.resultData) == null ? void 0 : _l.runData;
239
- if (activeRunData) {
240
- for (const key of Object.keys(activeRunData)) {
241
- if (((_w = (_v = (_u = (_t = (_s = (_r = (_q = (_p = (_o = (_n = (_m = pushData.data) == null ? void 0 : _m.data) == null ? void 0 : _n.resultData) == null ? void 0 : _o.runData) == null ? void 0 : _p[key]) == null ? void 0 : _q[0]) == null ? void 0 : _r.data) == null ? void 0 : _s.main) == null ? void 0 : _t[0]) == null ? void 0 : _u[0]) == null ? void 0 : _v.json) == null ? void 0 : _w.isArtificialRecoveredEventItem) === true && activeRunData[key].length > 0)
242
- pushData.data.data.resultData.runData[key] = activeRunData[key];
243
- }
244
- }
245
- workflowsStore.finishActiveExecution(pushData);
246
- }
247
193
  if (!uiStore.isActionActive["workflowRunning"]) {
248
194
  return false;
249
195
  }
250
- if (activeExecutionId !== pushData.executionId) {
196
+ const { executionId } = receivedData.data;
197
+ const { activeExecutionId } = workflowsStore;
198
+ if (executionId !== activeExecutionId) {
251
199
  if (isRetry !== true) {
252
- queuePushMessage(event, retryAttempts);
200
+ queuePushMessage(receivedData, retryAttempts);
253
201
  }
254
202
  return false;
255
203
  }
256
- const runDataExecuted = pushData.data;
257
- let runDataExecutedErrorMessage = getExecutionError(runDataExecuted.data);
258
- if (runDataExecuted.status === "crashed") {
204
+ const executionData = await workflowsStore.fetchExecutionDataById(executionId);
205
+ if (!(executionData == null ? void 0 : executionData.data)) return false;
206
+ executionData.data = parse(executionData.data);
207
+ const iRunExecutionData = {
208
+ startData: (_a = executionData.data) == null ? void 0 : _a.startData,
209
+ resultData: ((_b = executionData.data) == null ? void 0 : _b.resultData) ?? { runData: {} },
210
+ executionData: (_c = executionData.data) == null ? void 0 : _c.executionData
211
+ };
212
+ if (((_d = workflowsStore.workflowExecutionData) == null ? void 0 : _d.workflowId) === executionData.workflowId) {
213
+ const activeRunData = (_g = (_f = (_e = workflowsStore.workflowExecutionData) == null ? void 0 : _e.data) == null ? void 0 : _f.resultData) == null ? void 0 : _g.runData;
214
+ if (activeRunData) {
215
+ for (const key of Object.keys(activeRunData)) {
216
+ iRunExecutionData.resultData.runData[key] = activeRunData[key];
217
+ }
218
+ }
219
+ }
220
+ let runDataExecutedErrorMessage = getExecutionError(iRunExecutionData);
221
+ if (executionData.status === "crashed") {
259
222
  runDataExecutedErrorMessage = i18n.baseText("pushConnection.executionFailed.message");
260
- } else if (runDataExecuted.status === "canceled") {
223
+ } else if (executionData.status === "canceled") {
261
224
  runDataExecutedErrorMessage = i18n.baseText(
262
225
  "executionsList.showMessage.stopExecution.message",
263
226
  {
@@ -265,10 +228,10 @@ function usePushConnection({ router }) {
265
228
  }
266
229
  );
267
230
  }
268
- const lineNumber = (_z = (_y = (_x = runDataExecuted == null ? void 0 : runDataExecuted.data) == null ? void 0 : _x.resultData) == null ? void 0 : _y.error) == null ? void 0 : _z.lineNumber;
231
+ const lineNumber = (_i = (_h = iRunExecutionData.resultData) == null ? void 0 : _h.error) == null ? void 0 : _i.lineNumber;
269
232
  codeNodeEditorEventBus.emit("highlightLine", lineNumber ?? "final");
270
233
  const workflow = workflowHelpers.getCurrentWorkflow();
271
- if (runDataExecuted.waitTill !== void 0) {
234
+ if (((_j = executionData.data) == null ? void 0 : _j.waitTill) !== void 0) {
272
235
  const workflowSettings = workflowsStore.workflowSettings;
273
236
  const saveManualExecutions = settingsStore.saveManualExecutions;
274
237
  const isSavingExecutions = workflowSettings.saveManualExecutions === void 0 ? saveManualExecutions : workflowSettings.saveManualExecutions;
@@ -282,10 +245,10 @@ function usePushConnection({ router }) {
282
245
  });
283
246
  }
284
247
  workflowHelpers.setDocumentTitle(workflow.name, "IDLE");
285
- } else if (runDataExecuted.finished !== true) {
248
+ } else if (executionData.finished !== true) {
286
249
  workflowHelpers.setDocumentTitle(workflow.name, "ERROR");
287
- if (((_A = runDataExecuted.data.resultData.error) == null ? void 0 : _A.name) === "ExpressionError" && runDataExecuted.data.resultData.error.functionality === "pairedItem") {
288
- const error = runDataExecuted.data.resultData.error;
250
+ if (((_k = iRunExecutionData.resultData.error) == null ? void 0 : _k.name) === "ExpressionError" && iRunExecutionData.resultData.error.functionality === "pairedItem") {
251
+ const error = iRunExecutionData.resultData.error;
289
252
  void workflowHelpers.getWorkflowDataToSave().then((workflowData) => {
290
253
  const eventData = {
291
254
  caused_by_credential: false,
@@ -317,8 +280,8 @@ function usePushConnection({ router }) {
317
280
  });
318
281
  });
319
282
  }
320
- if (((_B = runDataExecuted.data.resultData.error) == null ? void 0 : _B.name) === "SubworkflowOperationError") {
321
- const error = runDataExecuted.data.resultData.error;
283
+ if (((_l = iRunExecutionData.resultData.error) == null ? void 0 : _l.name) === "SubworkflowOperationError") {
284
+ const error = iRunExecutionData.resultData.error;
322
285
  workflowsStore.subWorkflowExecutionError = error;
323
286
  toast.showMessage({
324
287
  title: error.message,
@@ -326,9 +289,9 @@ function usePushConnection({ router }) {
326
289
  type: "error",
327
290
  duration: 0
328
291
  });
329
- } else if ((((_C = runDataExecuted.data.resultData.error) == null ? void 0 : _C.name) === "NodeOperationError" || ((_D = runDataExecuted.data.resultData.error) == null ? void 0 : _D.name) === "NodeApiError") && runDataExecuted.data.resultData.error.functionality === "configuration-node") {
292
+ } else if ((((_m = iRunExecutionData.resultData.error) == null ? void 0 : _m.name) === "NodeOperationError" || ((_n = iRunExecutionData.resultData.error) == null ? void 0 : _n.name) === "NodeApiError") && iRunExecutionData.resultData.error.functionality === "configuration-node") {
330
293
  let title;
331
- const nodeError = runDataExecuted.data.resultData.error;
294
+ const nodeError = iRunExecutionData.resultData.error;
332
295
  if (nodeError.node.name) {
333
296
  title = `Error in sub-node ‘${nodeError.node.name}‘`;
334
297
  } else {
@@ -345,15 +308,15 @@ function usePushConnection({ router }) {
345
308
  });
346
309
  } else {
347
310
  let title;
348
- const isManualExecutionCancelled = runDataExecuted.mode === "manual" && runDataExecuted.status === "canceled";
311
+ const isManualExecutionCancelled = executionData.mode === "manual" && executionData.status === "canceled";
349
312
  if (isManualExecutionCancelled) {
350
313
  toast.showMessage({
351
314
  title: i18n.baseText("nodeView.showMessage.stopExecutionTry.title"),
352
315
  type: "success"
353
316
  });
354
317
  } else {
355
- if (runDataExecuted.data.resultData.lastNodeExecuted) {
356
- title = `Problem in node ‘${runDataExecuted.data.resultData.lastNodeExecuted}‘`;
318
+ if (iRunExecutionData.resultData.lastNodeExecuted) {
319
+ title = `Problem in node ‘${iRunExecutionData.resultData.lastNodeExecuted}‘`;
357
320
  } else {
358
321
  title = "Problem executing workflow";
359
322
  }
@@ -361,7 +324,8 @@ function usePushConnection({ router }) {
361
324
  title,
362
325
  message: runDataExecutedErrorMessage,
363
326
  type: "error",
364
- duration: 0
327
+ duration: 0,
328
+ dangerouslyUseHTMLString: true
365
329
  });
366
330
  }
367
331
  }
@@ -371,7 +335,7 @@ function usePushConnection({ router }) {
371
335
  if (execution == null ? void 0 : execution.executedNode) {
372
336
  const node = workflowsStore.getNodeByName(execution.executedNode);
373
337
  const nodeType = node && nodeTypesStore.getNodeType(node.type, node.typeVersion);
374
- const nodeOutput = execution && execution.executedNode && ((_G = (_F = (_E = execution.data) == null ? void 0 : _E.resultData) == null ? void 0 : _F.runData) == null ? void 0 : _G[execution.executedNode]);
338
+ const nodeOutput = execution && execution.executedNode && ((_q = (_p = (_o = execution.data) == null ? void 0 : _o.resultData) == null ? void 0 : _p.runData) == null ? void 0 : _q[execution.executedNode]);
375
339
  if ((nodeType == null ? void 0 : nodeType.polling) && !nodeOutput) {
376
340
  toast.showMessage({
377
341
  title: i18n.baseText("pushConnection.pollingNode.dataNotFound", {
@@ -400,41 +364,29 @@ function usePushConnection({ router }) {
400
364
  }
401
365
  }
402
366
  if (workflowsStore.getWorkflowRunData) {
403
- runDataExecuted.data.resultData.runData = workflowsStore.getWorkflowRunData;
367
+ iRunExecutionData.resultData.runData = workflowsStore.getWorkflowRunData;
404
368
  }
405
369
  workflowsStore.executingNode.length = 0;
406
- workflowsStore.setWorkflowExecutionData(runDataExecuted);
370
+ workflowsStore.setWorkflowExecutionData(executionData);
407
371
  uiStore.removeActiveAction("workflowRunning");
408
372
  nodeHelpers.updateNodesExecutionIssues();
409
- const lastNodeExecuted = runDataExecuted.data.resultData.lastNodeExecuted;
373
+ const lastNodeExecuted = iRunExecutionData.resultData.lastNodeExecuted;
410
374
  let itemsCount = 0;
411
- if (lastNodeExecuted && runDataExecuted.data.resultData.runData[lastNodeExecuted] && !runDataExecutedErrorMessage) {
412
- itemsCount = runDataExecuted.data.resultData.runData[lastNodeExecuted][0].data.main[0].length;
375
+ if (lastNodeExecuted && iRunExecutionData.resultData.runData[lastNodeExecuted] && !runDataExecutedErrorMessage) {
376
+ itemsCount = iRunExecutionData.resultData.runData[lastNodeExecuted][0].data.main[0].length;
413
377
  }
414
378
  void useExternalHooks().run("pushConnection.executionFinished", {
415
379
  itemsCount,
416
- nodeName: runDataExecuted.data.resultData.lastNodeExecuted,
380
+ nodeName: iRunExecutionData.resultData.lastNodeExecuted,
417
381
  errorMessage: runDataExecutedErrorMessage,
418
- runDataExecutedStartData: runDataExecuted.data.startData,
419
- resultDataError: runDataExecuted.data.resultData.error
382
+ runDataExecutedStartData: iRunExecutionData.startData,
383
+ resultDataError: iRunExecutionData.resultData.error
420
384
  });
421
- } else if (receivedData.type === "executionStarted") {
422
- const pushData = receivedData.data;
423
- const executionData = {
424
- id: pushData.executionId,
425
- finished: false,
426
- status: "running",
427
- mode: pushData.mode,
428
- startedAt: pushData.startedAt,
429
- retryOf: pushData.retryOf,
430
- workflowId: pushData.workflowId,
431
- workflowName: pushData.workflowName
432
- };
433
- workflowsStore.addActiveExecution(executionData);
434
- } else if (receivedData.type === "nodeExecuteAfter") {
385
+ } else if (receivedData.type === "executionWaiting") ;
386
+ else if (receivedData.type === "executionStarted") ;
387
+ else if (receivedData.type === "nodeExecuteAfter") {
435
388
  const pushData = receivedData.data;
436
- workflowsStore.addNodeExecutionData(pushData);
437
- workflowsStore.removeExecutingNode(pushData.nodeName);
389
+ workflowsStore.updateNodeExecutionData(pushData);
438
390
  void assistantStore.onNodeExecution(pushData);
439
391
  } else if (receivedData.type === "nodeExecuteBefore") {
440
392
  const pushData = receivedData.data;