n8n-editor-ui 1.77.3 → 1.79.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 (102) hide show
  1. package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-C9LVFaJT.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DKtXGQ8b.js} +1 -1
  2. package/dist/assets/{AuthView-C383xWYW.js → AuthView-DC9bB5r3.js} +2 -2
  3. package/dist/assets/{CanvasChat-BGlghV3T.js → CanvasChat-D3lTBObM.js} +5 -4
  4. package/dist/assets/{CanvasControls-Crujpx17.js → CanvasControls-3_c-idq1.js} +1 -1
  5. package/dist/assets/{ChangePasswordView-DXzIgEaK.js → ChangePasswordView-hTCZFDsu.js} +3 -3
  6. package/dist/assets/CollectionParameter-BJPPrJT6.js +4 -0
  7. package/dist/assets/{ConcurrentExecutionsHeader-D9E-tPI2.js → ConcurrentExecutionsHeader-SdaUSwM5.js} +2 -2
  8. package/dist/assets/{CredentialsView-Db-yh1UW.js → CredentialsView-s41qhyQi.js} +4 -4
  9. package/dist/assets/{ErrorView-DVEUcXeM.js → ErrorView-BPR4tLUF.js} +1 -1
  10. package/dist/assets/{ExecutionsView-CqcJ1jBb.js → ExecutionsView-CTGQ4_xb.js} +5 -5
  11. package/dist/assets/{FileSaver.min-DRMcruyG.js → FileSaver.min-BYPjeNsQ.js} +1 -1
  12. package/dist/assets/{FixedCollectionParameter-rnJQitY7.js → FixedCollectionParameter-kIB2Fa5A.js} +1 -1
  13. package/dist/assets/{ForgotMyPasswordView-CCuBQ23v.js → ForgotMyPasswordView-2fgritvN.js} +3 -3
  14. package/dist/assets/{Logo-vj6e7OLa.js → Logo-hPeyHcb-.js} +1 -1
  15. package/dist/assets/{MainHeader-Bz40v4tX.js → MainHeader-Box9TeIZ.js} +10 -9
  16. package/dist/assets/{MainSidebar-7b7uQIcC.js → MainSidebar-B50zuWdl.js} +10 -10
  17. package/dist/assets/{MainSidebar-Djaxwdmm.css → MainSidebar-BQVC8zBU.css} +13 -13
  18. package/dist/assets/{NodeCreation-KBmCqr6_.js → NodeCreation-Ceo0bVoB.js} +4 -4
  19. package/dist/assets/{NodeCreator-DTMPwVj5.js → NodeCreator-B2c_Rd6j.js} +18 -6
  20. package/dist/assets/{NodeViewSwitcher-DApULbEt.css → NodeViewSwitcher-9WCdidKb.css} +106 -106
  21. package/dist/assets/{NodeViewSwitcher-O6VqzxIl.js → NodeViewSwitcher-CzTWzm1u.js} +113 -70
  22. package/dist/assets/{ProjectCardBadge-OKM1Xgdw.js → ProjectCardBadge-COQxXr59.js} +1 -1
  23. package/dist/assets/{ProjectHeader-6S5uaHXh.js → ProjectHeader-CE7TnWTW.js} +1 -1
  24. package/dist/assets/{ProjectSettings-BnHtiDEV.js → ProjectSettings-MOBpI-14.js} +2 -2
  25. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-IciN-pmV.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-3s6oaYcd.js} +7 -4
  26. package/dist/assets/{ResourcesListLayout-d7mMNhOL.css → ResourcesListLayout-CvrwoZYS.css} +6 -6
  27. package/dist/assets/{ResourcesListLayout-D4r1wqjJ.js → ResourcesListLayout-qO3XuEfV.js} +14 -2
  28. package/dist/assets/{useRunWorkflow-CoRVHZg2.js → RunDataAi-CH-Sjvla.js} +4 -317
  29. package/dist/assets/{RunDataJson-wyo45w7C.js → RunDataJson-B6NXnfu2.js} +16 -14
  30. package/dist/assets/{RunDataJsonActions-D46WL4YN.js → RunDataJsonActions-CuA1XQyQ.js} +4 -5
  31. package/dist/assets/{RunDataSearch-B3EyVssL.js → RunDataSearch-CUG23MTn.js} +1 -1
  32. package/dist/assets/{RunDataTable-DGMN5nF6.js → RunDataTable-Bc0J9GkT.js} +2 -2
  33. package/dist/assets/{SamlOnboarding-CnXUkDfT.js → SamlOnboarding-BJ9WtdP1.js} +3 -3
  34. package/dist/assets/SettingsApiView-BB3Lm3bi.css +301 -0
  35. package/dist/assets/SettingsApiView-DBxgGFH0.js +292 -0
  36. package/dist/assets/{SettingsCommunityNodesView-9KrggWFu.js → SettingsCommunityNodesView-BomJXH9c.js} +5 -4
  37. package/dist/assets/{SettingsExternalSecrets-DBPzjP3z.js → SettingsExternalSecrets-D4rqzyAM.js} +1 -1
  38. package/dist/assets/{SettingsLdapView-Bg2KWXN0.js → SettingsLdapView-DiXHZhqV.js} +1 -1
  39. package/dist/assets/{SettingsLogStreamingView-tgIsDBAk.js → SettingsLogStreamingView-Bt-LEIIQ.js} +1 -1
  40. package/dist/assets/{SettingsPersonalView-CDJ8_Cuz.js → SettingsPersonalView-BvEc_axB.js} +1 -1
  41. package/dist/assets/{SettingsSourceControl-ap8XMKcG.js → SettingsSourceControl-DPlmwsou.js} +1 -1
  42. package/dist/assets/{SettingsSso-B91oi5bN.js → SettingsSso-zllqGFae.js} +1 -1
  43. package/dist/assets/{SettingsUsageAndPlan-Bb6yK99X.js → SettingsUsageAndPlan-C-iqlwdT.js} +1 -1
  44. package/dist/assets/{SettingsUsersView-Ci2z6Jpz.js → SettingsUsersView-DPpywObQ.js} +1 -1
  45. package/dist/assets/{SettingsView-CStRsQ-w.js → SettingsView-Do0ZcFE1.js} +1 -1
  46. package/dist/assets/{SetupView-B5zAoB3c.js → SetupView-BSTPJreH.js} +3 -3
  47. package/dist/assets/{SetupWorkflowCredentialsButton-Cro6GHxL.js → SetupWorkflowCredentialsButton-DiQzzioV.js} +1 -1
  48. package/dist/assets/{SetupWorkflowFromTemplateView-CcwL92Id.js → SetupWorkflowFromTemplateView-Dth4uXJ3.js} +3 -3
  49. package/dist/assets/{SigninView-DsPEhU2L.js → SigninView-DU81K-a8.js} +3 -3
  50. package/dist/assets/{SignoutView-BIckw4fs.js → SignoutView-NOUoiBhH.js} +1 -1
  51. package/dist/assets/{SignupView-DdJWtYpI.js → SignupView-D06cun4d.js} +3 -3
  52. package/dist/assets/{TemplateDetails-C41VgGvk.js → TemplateDetails-rk_My4uB.js} +1 -1
  53. package/dist/assets/{TemplateList-DkS7PdQW.js → TemplateList-BdriMiIx.js} +1 -1
  54. package/dist/assets/{TemplatesCollectionView-BV7HXuai.js → TemplatesCollectionView-Bm07hQFM.js} +5 -5
  55. package/dist/assets/{TemplatesSearchView-BKY_Lw-C.js → TemplatesSearchView-Bf3SRbIa.js} +3 -3
  56. package/dist/assets/{TemplatesView-C312c1EZ.js → TemplatesView-DxMjsDBv.js} +1 -1
  57. package/dist/assets/{TemplatesWorkflowView-BfzWwupR.js → TemplatesWorkflowView-CP1jwG6W.js} +5 -5
  58. package/dist/assets/{TestDefinitionEditView-CwoHUF5w.js → TestDefinitionEditView-BntbT16p.js} +16 -3
  59. package/dist/assets/{TestDefinitionListView-2tWTEUz0.js → TestDefinitionListView-CLiFw2i4.js} +1 -1
  60. package/dist/assets/{TestDefinitionRootView-gJRxCHz3.js → TestDefinitionRootView-Dq2vyM8t.js} +1 -1
  61. package/dist/assets/{VariablesView-DqbIksP3.js → VariablesView-C-mPkz2b.js} +2 -2
  62. package/dist/assets/{WorkerView-DSPfcsXN.js → WorkerView-DOIKhi2W.js} +6 -5
  63. package/dist/assets/{WorkflowActivator-Bm8OihqN.js → WorkflowActivator-CcQuszbk.js} +2 -2
  64. package/dist/assets/{WorkflowExecutionsInfoAccordion-B78-cQSW.js → WorkflowExecutionsInfoAccordion-AONJXhOM.js} +1 -1
  65. package/dist/assets/{WorkflowExecutionsLandingPage-C39BBF2o.js → WorkflowExecutionsLandingPage-C8XFRzTf.js} +2 -2
  66. package/dist/assets/{WorkflowExecutionsPreview-CdlK3mFb.js → WorkflowExecutionsPreview-CqgapiEE.js} +5 -5
  67. package/dist/assets/{WorkflowExecutionsView-a-Pjy5V5.js → WorkflowExecutionsView-DLBbg4s6.js} +5 -5
  68. package/dist/assets/{WorkflowHistory-Bwqmh22i.js → WorkflowHistory-Xzp1cgz9.js} +3 -3
  69. package/dist/assets/{WorkflowOnboardingView-CipWLUUf.js → WorkflowOnboardingView-CM5jKrBr.js} +1 -1
  70. package/dist/assets/{WorkflowPreview-CAjmdxrY.js → WorkflowPreview-CLrfHawQ.js} +1 -1
  71. package/dist/assets/{WorkflowsView-DP6J_TRf.js → WorkflowsView-B8QO2U4z.js} +7 -7
  72. package/dist/assets/_commonjs-dynamic-modules-TGKdzP3c.js +6 -0
  73. package/dist/assets/{easyAiWorkflowUtils-BLdDr_bc.js → easyAiWorkflowUtils-BEjLgBYH.js} +2 -2
  74. package/dist/assets/global-link-actions-CmKpJf6C.js +5 -0
  75. package/dist/assets/import-curl-Dm0tXAal.js +5 -0
  76. package/dist/assets/{index-DablXALM.js → index-BgTszcKd.js} +6084 -4282
  77. package/dist/assets/{index-Bs_8II2j.css → index-xKO0gQfI.css} +1174 -540
  78. package/dist/assets/{polyfills-DfOJfMlf.js → polyfills-C7eMRNFe.js} +92 -39
  79. package/dist/assets/pushConnection.store-Z13Buj1P.js +238 -0
  80. package/dist/assets/{templateActions--1waaCku.js → templateActions-BsBOWAkR.js} +1 -1
  81. package/dist/assets/{useBeforeUnload-C9Q3IFHU.js → useBeforeUnload-BzdqZUNR.js} +1 -1
  82. package/dist/assets/{useCanvasOperations-CEWecDkR.css → useCanvasMapping-DeC609A4.css} +213 -160
  83. package/dist/assets/{useCanvasOperations-CEPzjX8I.js → useCanvasMapping-Dj_ctboo.js} +3447 -3225
  84. package/dist/assets/{useExecutionDebugging-Pzj1BQ1f.js → useExecutionDebugging-DV8arYl7.js} +1 -1
  85. package/dist/assets/{useExecutionHelpers-F_WL-Kvp.js → useExecutionHelpers-OayET-Qz.js} +1 -1
  86. package/dist/assets/useImportCurlCommand-CKdAqJ54.js +9055 -0
  87. package/dist/assets/{usePushConnection-BlvBVLFC.js → usePushConnection-DT6QRFOS.js} +4 -3
  88. package/dist/assets/useRunWorkflow-g6q3R4P4.js +616 -0
  89. package/dist/assets/{useWorkflowActivate-wvqU9rPU.js → useWorkflowActivate-B4fObrrf.js} +1 -1
  90. package/dist/index.html +3 -3
  91. package/dist/static/og_image.png +0 -0
  92. package/dist/tree-sitter-bash.wasm +0 -0
  93. package/dist/tree-sitter.wasm +0 -0
  94. package/package.json +1 -1
  95. package/tsconfig.json +10 -13
  96. package/vite.config.mts +20 -3
  97. package/dist/assets/CollectionParameter-C_1RVSJv.js +0 -4
  98. package/dist/assets/SettingsApiView-DJKJO7zM.css +0 -145
  99. package/dist/assets/SettingsApiView-EFylgnqH.js +0 -227
  100. package/dist/assets/pushConnection.store-DmLr_C_P.js +0 -117
  101. package/dist/assets/usePinnedData-BEOJK2e-.js +0 -274
  102. /package/dist/assets/{useRunWorkflow-DWoFsQdi.css → RunDataAi-DWoFsQdi.css} +0 -0
package/tsconfig.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
2
+ "extends": "@n8n/frontend-typescript-config",
3
3
  "compilerOptions": {
4
- "rootDirs": [".", "../design-system/src", "../@n8n/chat/src"],
5
- "outDir": "dist",
6
- "target": "esnext",
7
- "module": "esnext",
8
- "allowJs": true,
9
- "importHelpers": true,
10
- "incremental": false,
11
- "allowSyntheticDefaultImports": true,
12
- "resolveJsonModule": true,
13
4
  "baseUrl": ".",
5
+ "rootDirs": [
6
+ ".",
7
+ "../../frontend/@n8n/composables/src",
8
+ "../design-system/src",
9
+ "../@n8n/chat/src"
10
+ ],
11
+ "outDir": "dist",
14
12
  "types": [
15
13
  "vitest/globals",
16
14
  "unplugin-icons/types/vue",
@@ -18,12 +16,11 @@
18
16
  ],
19
17
  "paths": {
20
18
  "@/*": ["./src/*"],
21
- "n8n-design-system": ["../design-system/src/main.ts"],
22
- "n8n-design-system/*": ["../design-system/src/*"],
19
+ "n8n-design-system*": ["../design-system/src*"],
20
+ "@n8n/composables*": ["../frontend/@n8n/composables/src*"],
23
21
  "@n8n/chat/*": ["../@n8n/chat/src/*"],
24
22
  "@n8n/api-types*": ["../@n8n/api-types/src*"]
25
23
  },
26
- "lib": ["esnext", "dom", "dom.iterable", "scripthost"],
27
24
  // TODO: remove all options below this line
28
25
  "useUnknownInCatchVariables": false
29
26
  },
package/vite.config.mts CHANGED
@@ -1,9 +1,10 @@
1
1
  import vue from '@vitejs/plugin-vue';
2
2
  import { resolve } from 'path';
3
3
  import { defineConfig, mergeConfig } from 'vite';
4
+ import { viteStaticCopy } from 'vite-plugin-static-copy';
4
5
  import svgLoader from 'vite-svg-loader';
5
6
 
6
- import { vitestConfig } from '../design-system/vite.config.mts';
7
+ import { vitestConfig } from '@n8n/frontend-vitest-config';
7
8
  import icons from 'unplugin-icons/vite';
8
9
  import iconsResolver from 'unplugin-icons/resolver';
9
10
  import components from 'unplugin-vue-components/vite';
@@ -22,7 +23,7 @@ const alias = [
22
23
  { find: 'stream', replacement: 'stream-browserify' },
23
24
  {
24
25
  find: /^n8n-design-system$/,
25
- replacement: resolve(__dirname, '..', 'design-system', 'src', 'main.ts'),
26
+ replacement: resolve(__dirname, '..', 'design-system', 'src', 'index.ts'),
26
27
  },
27
28
  {
28
29
  find: /^n8n-design-system\//,
@@ -36,6 +37,10 @@ const alias = [
36
37
  find: /^@n8n\/chat\//,
37
38
  replacement: resolve(__dirname, '..', '@n8n', 'chat', 'src') + '/',
38
39
  },
40
+ {
41
+ find: /^@n8n\/composables(.+)$/,
42
+ replacement: resolve(__dirname, '..', 'frontend', '@n8n', 'composables', 'src$1'),
43
+ },
39
44
  ...['orderBy', 'camelCase', 'cloneDeep', 'startCase'].map((name) => ({
40
45
  find: new RegExp(`^lodash.${name}$`, 'i'),
41
46
  replacement: `lodash-es/${name}`,
@@ -59,6 +64,12 @@ const plugins = [
59
64
  }),
60
65
  ],
61
66
  }),
67
+ viteStaticCopy({
68
+ targets: [
69
+ { src: resolve('node_modules/web-tree-sitter/tree-sitter.wasm'), dest: '' },
70
+ { src: resolve('node_modules/curlconverter/dist/tree-sitter-bash.wasm'), dest: '' },
71
+ ],
72
+ }),
62
73
  vue(),
63
74
  svgLoader(),
64
75
  legacy({
@@ -69,6 +80,7 @@ const plugins = [
69
80
  ];
70
81
 
71
82
  const { RELEASE: release } = process.env;
83
+ const target = browserslistToEsbuild(browsers);
72
84
 
73
85
  export default mergeConfig(
74
86
  defineConfig({
@@ -96,7 +108,12 @@ export default mergeConfig(
96
108
  build: {
97
109
  minify: !!release,
98
110
  sourcemap: !!release,
99
- target: browserslistToEsbuild(browsers),
111
+ target,
112
+ },
113
+ optimizeDeps: {
114
+ esbuildOptions: {
115
+ target,
116
+ },
100
117
  },
101
118
  worker: {
102
119
  format: 'es',
@@ -1,4 +0,0 @@
1
- import { ie as _sfc_main } from "./index-DablXALM.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,145 +0,0 @@
1
- /* BEM support Func
2
- -------------------------- */
3
- /* Transition
4
- -------------------------- */
5
- /* Color
6
- -------------------------- */
7
- /* Link
8
- -------------------------- */
9
- /* Border
10
- -------------------------- */
11
- /* Outline
12
- -------------------------- */
13
- /* Box shadow
14
- -------------------------- */
15
- /* Fill
16
- -------------------------- */
17
- /* Typography
18
- -------------------------- */
19
- /* z-index
20
- -------------------------- */
21
- /* Disable base
22
- -------------------------- */
23
- /* Icon
24
- -------------------------- */
25
- /* Checkbox
26
- -------------------------- */
27
- /* Radio
28
- -------------------------- */
29
- /* Select
30
- -------------------------- */
31
- /* Alert
32
- -------------------------- */
33
- /* MessageBox
34
- -------------------------- */
35
- /* Message
36
- -------------------------- */
37
- /* Notification
38
- -------------------------- */
39
- /* Input
40
- -------------------------- */
41
- /* Cascader
42
- -------------------------- */
43
- /* Group
44
- -------------------------- */
45
- /* Tab
46
- -------------------------- */
47
- /* Button
48
- -------------------------- */
49
- /* cascader
50
- -------------------------- */
51
- /* Switch
52
- -------------------------- */
53
- /* Dialog
54
- -------------------------- */
55
- /* Table
56
- -------------------------- */
57
- /* Pagination
58
- -------------------------- */
59
- /* Popup
60
- -------------------------- */
61
- /* Popover
62
- -------------------------- */
63
- /* Tooltip
64
- -------------------------- */
65
- /* Tag
66
- -------------------------- */
67
- /* Tree
68
- -------------------------- */
69
- /* Dropdown
70
- -------------------------- */
71
- /* Badge
72
- -------------------------- */
73
- /* Card
74
- --------------------------*/
75
- /* Slider
76
- --------------------------*/
77
- /* Steps
78
- --------------------------*/
79
- /* Menu
80
- --------------------------*/
81
- /* Rate
82
- --------------------------*/
83
- /* DatePicker
84
- --------------------------*/
85
- /* Loading
86
- --------------------------*/
87
- /* Scrollbar
88
- --------------------------*/
89
- /* Carousel
90
- --------------------------*/
91
- /* Collapse
92
- --------------------------*/
93
- /* Transfer
94
- --------------------------*/
95
- /* Header
96
- --------------------------*/
97
- /* Footer
98
- --------------------------*/
99
- /* Main
100
- --------------------------*/
101
- /* Timeline
102
- --------------------------*/
103
- /* Backtop
104
- --------------------------*/
105
- /* Link
106
- --------------------------*/
107
- /* Calendar
108
- --------------------------*/
109
- /* Form
110
- -------------------------- */
111
- /* Avatar
112
- --------------------------*/
113
- /* Break-point
114
- --------------------------*/
115
- /* Break-points
116
- -------------------------- */
117
- /* Scrollbar
118
- -------------------------- */
119
- /* Placeholder
120
- -------------------------- */
121
- /* BEM
122
- -------------------------- */
123
- ._container_10d3f_123 > * {
124
- margin-bottom: var(--spacing-2xl);
125
- }
126
- ._header_10d3f_127 {
127
- display: flex;
128
- align-items: center;
129
- white-space: nowrap;
130
- }
131
- ._header_10d3f_127 *:first-child {
132
- flex-grow: 1;
133
- }
134
- ._card_10d3f_136 {
135
- position: relative;
136
- }
137
- ._delete_10d3f_140 {
138
- position: absolute;
139
- display: inline-block;
140
- top: var(--spacing-s);
141
- right: var(--spacing-s);
142
- }
143
- ._hint_10d3f_147 {
144
- color: var(--color-text-light);
145
- }
@@ -1,227 +0,0 @@
1
- import { d as defineComponent, p as useSettingsStore, aH as useCloudPlanStore, Z as useRootStore, a as useToast, a3 as useDocumentTitle, a5 as usePageRedirectionHelper, r as ref, q as computed, o as onMounted, fo as DOCS_DOMAIN, c as openBlock, h as createElementBlock, j as createBaseVNode, i as createVNode, w as withCtx, k as createTextVNode, t as toDisplayString, l as unref, n as normalizeClass, cY as CopyInput, e as createBlock, f as createCommentVNode, g as useI18n, ae as MODAL_CONFIRM, m as resolveComponent, ak as useMessage, aj as useTelemetry, _ as _export_sfc } from "./index-DablXALM.js";
2
- const _hoisted_1 = { style: { fontSize: "var(--font-size-s)", color: "var(--color-text-light)" } };
3
- const _hoisted_2 = { key: 0 };
4
- const _hoisted_3 = { class: "mb-s" };
5
- const _hoisted_4 = ["textContent"];
6
- const _hoisted_5 = ["textContent"];
7
- const _sfc_main = /* @__PURE__ */ defineComponent({
8
- __name: "SettingsApiView",
9
- setup(__props) {
10
- const settingsStore = useSettingsStore();
11
- const cloudPlanStore = useCloudPlanStore();
12
- const { baseUrl } = useRootStore();
13
- const { showError, showMessage } = useToast();
14
- const { confirm } = useMessage();
15
- const documentTitle = useDocumentTitle();
16
- const i18n = useI18n();
17
- const { goToUpgrade } = usePageRedirectionHelper();
18
- const telemetry = useTelemetry();
19
- const loading = ref(false);
20
- const mounted = ref(false);
21
- const apiKeys = ref([]);
22
- const apiDocsURL = ref("");
23
- const { isPublicApiEnabled, isSwaggerUIEnabled, publicApiPath, publicApiLatestVersion } = settingsStore;
24
- const isRedactedApiKey = computed(() => {
25
- if (!apiKeys.value) return false;
26
- return apiKeys.value[0].apiKey.includes("*");
27
- });
28
- onMounted(() => {
29
- documentTitle.set(i18n.baseText("settings.api"));
30
- if (!isPublicApiEnabled) return;
31
- void getApiKeys();
32
- apiDocsURL.value = isSwaggerUIEnabled ? `${baseUrl}${publicApiPath}/v${publicApiLatestVersion}/docs` : `https://${DOCS_DOMAIN}/api/api-reference/`;
33
- });
34
- function onUpgrade() {
35
- void goToUpgrade("settings-n8n-api", "upgrade-api", "redirect");
36
- }
37
- async function showDeleteModal() {
38
- const confirmed = await confirm(
39
- i18n.baseText("settings.api.delete.description"),
40
- i18n.baseText("settings.api.delete.title"),
41
- {
42
- confirmButtonText: i18n.baseText("settings.api.delete.button"),
43
- cancelButtonText: i18n.baseText("generic.cancel")
44
- }
45
- );
46
- if (confirmed === MODAL_CONFIRM) {
47
- await deleteApiKey();
48
- }
49
- }
50
- async function getApiKeys() {
51
- try {
52
- apiKeys.value = await settingsStore.getApiKeys();
53
- } catch (error) {
54
- showError(error, i18n.baseText("settings.api.view.error"));
55
- } finally {
56
- mounted.value = true;
57
- }
58
- }
59
- async function createApiKey() {
60
- loading.value = true;
61
- try {
62
- const newApiKey = await settingsStore.createApiKey();
63
- apiKeys.value.push(newApiKey);
64
- } catch (error) {
65
- showError(error, i18n.baseText("settings.api.create.error"));
66
- } finally {
67
- loading.value = false;
68
- telemetry.track("User clicked create API key button");
69
- }
70
- }
71
- async function deleteApiKey() {
72
- try {
73
- await settingsStore.deleteApiKey(apiKeys.value[0].id);
74
- showMessage({
75
- title: i18n.baseText("settings.api.delete.toast"),
76
- type: "success"
77
- });
78
- apiKeys.value = [];
79
- } catch (error) {
80
- showError(error, i18n.baseText("settings.api.delete.error"));
81
- } finally {
82
- telemetry.track("User clicked delete API key button");
83
- }
84
- }
85
- function onCopy() {
86
- telemetry.track("User clicked copy API key button");
87
- }
88
- return (_ctx, _cache) => {
89
- const _component_n8n_heading = resolveComponent("n8n-heading");
90
- const _component_i18n_t = resolveComponent("i18n-t");
91
- const _component_n8n_info_tip = resolveComponent("n8n-info-tip");
92
- const _component_n8n_link = resolveComponent("n8n-link");
93
- const _component_n8n_card = resolveComponent("n8n-card");
94
- const _component_n8n_text = resolveComponent("n8n-text");
95
- const _component_n8n_action_box = resolveComponent("n8n-action-box");
96
- return openBlock(), createElementBlock("div", {
97
- class: normalizeClass(_ctx.$style.container)
98
- }, [
99
- createBaseVNode("div", {
100
- class: normalizeClass(_ctx.$style.header)
101
- }, [
102
- createVNode(_component_n8n_heading, { size: "2xlarge" }, {
103
- default: withCtx(() => [
104
- createTextVNode(toDisplayString(unref(i18n).baseText("settings.api")) + " ", 1),
105
- createBaseVNode("span", _hoisted_1, " (" + toDisplayString(unref(i18n).baseText("generic.beta")) + ") ", 1)
106
- ]),
107
- _: 1
108
- })
109
- ], 2),
110
- apiKeys.value.length ? (openBlock(), createElementBlock("div", _hoisted_2, [
111
- createBaseVNode("p", _hoisted_3, [
112
- createVNode(_component_n8n_info_tip, { bold: false }, {
113
- default: withCtx(() => [
114
- createVNode(_component_i18n_t, {
115
- keypath: "settings.api.view.info",
116
- tag: "span"
117
- }, {
118
- apiAction: withCtx(() => [
119
- createBaseVNode("a", {
120
- href: "https://docs.n8n.io/api",
121
- target: "_blank",
122
- textContent: toDisplayString(unref(i18n).baseText("settings.api.view.info.api"))
123
- }, null, 8, _hoisted_4)
124
- ]),
125
- webhookAction: withCtx(() => [
126
- createBaseVNode("a", {
127
- href: "https://docs.n8n.io/integrations/core-nodes/n8n-nodes-base.webhook/",
128
- target: "_blank",
129
- textContent: toDisplayString(unref(i18n).baseText("settings.api.view.info.webhook"))
130
- }, null, 8, _hoisted_5)
131
- ]),
132
- _: 1
133
- })
134
- ]),
135
- _: 1
136
- })
137
- ]),
138
- createVNode(_component_n8n_card, {
139
- class: normalizeClass(["mb-4xs", _ctx.$style.card])
140
- }, {
141
- default: withCtx(() => [
142
- createBaseVNode("span", {
143
- class: normalizeClass(_ctx.$style.delete)
144
- }, [
145
- createVNode(_component_n8n_link, {
146
- bold: true,
147
- onClick: showDeleteModal
148
- }, {
149
- default: withCtx(() => [
150
- createTextVNode(toDisplayString(unref(i18n).baseText("generic.delete")), 1)
151
- ]),
152
- _: 1
153
- })
154
- ], 2),
155
- createBaseVNode("div", null, [
156
- createVNode(CopyInput, {
157
- label: apiKeys.value[0].label,
158
- value: apiKeys.value[0].apiKey,
159
- "copy-button-text": unref(i18n).baseText("generic.clickToCopy"),
160
- "toast-title": unref(i18n).baseText("settings.api.view.copy.toast"),
161
- "redact-value": true,
162
- "disable-copy": isRedactedApiKey.value,
163
- hint: !isRedactedApiKey.value ? unref(i18n).baseText("settings.api.view.copy") : "",
164
- onCopy
165
- }, null, 8, ["label", "value", "copy-button-text", "toast-title", "disable-copy", "hint"])
166
- ])
167
- ]),
168
- _: 1
169
- }, 8, ["class"]),
170
- createBaseVNode("div", {
171
- class: normalizeClass(_ctx.$style.hint)
172
- }, [
173
- createVNode(_component_n8n_text, { size: "small" }, {
174
- default: withCtx(() => [
175
- createTextVNode(toDisplayString(unref(i18n).baseText(`settings.api.view.${unref(isSwaggerUIEnabled) ? "tryapi" : "more-details"}`)), 1)
176
- ]),
177
- _: 1
178
- }),
179
- _cache[0] || (_cache[0] = createTextVNode(" " + toDisplayString(" ") + " ")),
180
- createVNode(_component_n8n_link, {
181
- to: apiDocsURL.value,
182
- "new-window": true,
183
- size: "small"
184
- }, {
185
- default: withCtx(() => [
186
- createTextVNode(toDisplayString(unref(i18n).baseText(
187
- `settings.api.view.${unref(isSwaggerUIEnabled) ? "apiPlayground" : "external-docs"}`
188
- )), 1)
189
- ]),
190
- _: 1
191
- }, 8, ["to"])
192
- ], 2)
193
- ])) : !unref(isPublicApiEnabled) && unref(cloudPlanStore).userIsTrialing ? (openBlock(), createBlock(_component_n8n_action_box, {
194
- key: 1,
195
- "data-test-id": "public-api-upgrade-cta",
196
- heading: unref(i18n).baseText("settings.api.trial.upgradePlan.title"),
197
- description: unref(i18n).baseText("settings.api.trial.upgradePlan.description"),
198
- "button-text": unref(i18n).baseText("settings.api.trial.upgradePlan.cta"),
199
- "onClick:button": onUpgrade
200
- }, null, 8, ["heading", "description", "button-text"])) : mounted.value && !unref(cloudPlanStore).state.loadingPlan ? (openBlock(), createBlock(_component_n8n_action_box, {
201
- key: 2,
202
- "button-text": unref(i18n).baseText(loading.value ? "settings.api.create.button.loading" : "settings.api.create.button"),
203
- description: unref(i18n).baseText("settings.api.create.description"),
204
- "onClick:button": createApiKey
205
- }, null, 8, ["button-text", "description"])) : createCommentVNode("", true)
206
- ], 2);
207
- };
208
- }
209
- });
210
- const container = "_container_10d3f_123";
211
- const header = "_header_10d3f_127";
212
- const card = "_card_10d3f_136";
213
- const hint = "_hint_10d3f_147";
214
- const style0 = {
215
- container,
216
- header,
217
- card,
218
- "delete": "_delete_10d3f_140",
219
- hint
220
- };
221
- const cssModules = {
222
- "$style": style0
223
- };
224
- const SettingsApiView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
225
- export {
226
- SettingsApiView as default
227
- };
@@ -1,117 +0,0 @@
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-DablXALM.js";
2
- const globalLinkActionsEventBus = createEventBus();
3
- const usePushConnectionStore = defineStore(STORES.PUSH, () => {
4
- const rootStore = useRootStore();
5
- const settingsStore = useSettingsStore();
6
- const pushRef = computed(() => rootStore.pushRef);
7
- const pushSource = ref(null);
8
- const reconnectTimeout = ref(null);
9
- const connectRetries = ref(0);
10
- const lostConnection = ref(false);
11
- const outgoingQueue = ref([]);
12
- const isConnectionOpen = ref(false);
13
- const onMessageReceivedHandlers = ref([]);
14
- const addEventListener = (handler) => {
15
- onMessageReceivedHandlers.value.push(handler);
16
- return () => {
17
- const index = onMessageReceivedHandlers.value.indexOf(handler);
18
- if (index !== -1) {
19
- onMessageReceivedHandlers.value.splice(index, 1);
20
- }
21
- };
22
- };
23
- function onConnectionError() {
24
- pushDisconnect();
25
- connectRetries.value++;
26
- reconnectTimeout.value = setTimeout(
27
- attemptReconnect,
28
- Math.min(connectRetries.value * 2e3, 8 * TIME.SECOND)
29
- // maximum 8 seconds backoff
30
- );
31
- }
32
- function pushDisconnect() {
33
- if (pushSource.value !== null) {
34
- pushSource.value.removeEventListener("error", onConnectionError);
35
- pushSource.value.removeEventListener("close", onConnectionError);
36
- pushSource.value.removeEventListener("message", pushMessageReceived);
37
- if (pushSource.value.readyState < 2) pushSource.value.close();
38
- pushSource.value = null;
39
- }
40
- isConnectionOpen.value = false;
41
- }
42
- function pushConnect() {
43
- pushDisconnect();
44
- if (reconnectTimeout.value) {
45
- clearTimeout(reconnectTimeout.value);
46
- reconnectTimeout.value = null;
47
- }
48
- const useWebSockets = settingsStore.pushBackend === "websocket";
49
- const restUrl = rootStore.restUrl;
50
- const url = `/push?pushRef=${pushRef.value}`;
51
- if (useWebSockets) {
52
- const { protocol, host } = window.location;
53
- const baseUrl = restUrl.startsWith("http") ? restUrl.replace(/^http/, "ws") : `${protocol === "https:" ? "wss" : "ws"}://${host + restUrl}`;
54
- pushSource.value = new WebSocket(`${baseUrl}${url}`);
55
- } else {
56
- pushSource.value = new EventSource(`${restUrl}${url}`, { withCredentials: true });
57
- }
58
- pushSource.value.addEventListener("open", onConnectionSuccess, false);
59
- pushSource.value.addEventListener("message", pushMessageReceived, false);
60
- pushSource.value.addEventListener(useWebSockets ? "close" : "error", onConnectionError, false);
61
- }
62
- function attemptReconnect() {
63
- pushConnect();
64
- }
65
- function serializeAndSend(message) {
66
- if (pushSource.value && "send" in pushSource.value) {
67
- pushSource.value.send(JSON.stringify(message));
68
- }
69
- }
70
- function onConnectionSuccess() {
71
- isConnectionOpen.value = true;
72
- connectRetries.value = 0;
73
- lostConnection.value = false;
74
- rootStore.setPushConnectionActive();
75
- pushSource.value?.removeEventListener("open", onConnectionSuccess);
76
- if (outgoingQueue.value.length) {
77
- for (const message of outgoingQueue.value) {
78
- serializeAndSend(message);
79
- }
80
- outgoingQueue.value = [];
81
- }
82
- }
83
- function send(message) {
84
- if (!isConnectionOpen.value) {
85
- outgoingQueue.value.push(message);
86
- return;
87
- }
88
- serializeAndSend(message);
89
- }
90
- async function pushMessageReceived(event) {
91
- let receivedData;
92
- try {
93
- receivedData = JSON.parse(event.data);
94
- } catch (error) {
95
- return;
96
- }
97
- onMessageReceivedHandlers.value.forEach((handler) => handler(receivedData));
98
- }
99
- const clearQueue = () => {
100
- outgoingQueue.value = [];
101
- };
102
- return {
103
- pushRef,
104
- pushSource,
105
- isConnectionOpen,
106
- onMessageReceivedHandlers,
107
- addEventListener,
108
- pushConnect,
109
- pushDisconnect,
110
- send,
111
- clearQueue
112
- };
113
- });
114
- export {
115
- globalLinkActionsEventBus as g,
116
- usePushConnectionStore as u
117
- };