n8n-editor-ui 1.102.2 → 1.104.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-CiegfqhB.js → ActionDropdown-Ct6XJ0cl.js} +1 -1
- package/dist/assets/{AnimatedSpinner-DZ7wHd_W.js → AnimatedSpinner-CIyQ3zKd.js} +1 -1
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-BQoi5khn.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-xv6FYiyR.js} +1 -1
- package/dist/assets/{AuthView-K2y2JXyp.js → AuthView-dJdngoqx.js} +2 -2
- package/dist/assets/{ChangePasswordView-D_EsQtLD.js → ChangePasswordView-C74U84q5.js} +3 -3
- package/dist/assets/CollectionParameter-DCn5Jtcj.js +4 -0
- package/dist/assets/ConsumedTokensDetails.vue_vue_type_script_setup_true_lang-CkASni2S.js +44 -0
- package/dist/assets/{CredentialsView-DvE9GnD7.js → CredentialsView-jouDB3H1.js} +8 -8
- package/dist/assets/{DemoFooter-kRP32xy4.js → DemoFooter-CHlbEpB-.js} +9 -8
- package/dist/assets/{EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-B6KKFEL7.js → EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-CbDihlsO.js} +1 -1
- package/dist/assets/{EntityNotFound-q_5k8QTh.js → EntityNotFound-Dtqj9thX.js} +1 -1
- package/dist/assets/{EntityUnAuthorised-DrFh2EVh.js → EntityUnAuthorised-BBsbc6du.js} +1 -1
- package/dist/assets/{ErrorView-CdyA4lBI.js → ErrorView-BN4Jm32q.js} +1 -1
- package/dist/assets/{EvaluationsRootView-DBi9hUxa.js → EvaluationsRootView-B70WfmnQ.js} +5 -3
- package/dist/assets/{EvaluationsView-6l_Invxt.css → EvaluationsView-BTyYfInB.css} +6 -6
- package/dist/assets/{EvaluationsView-VbCSsM2z.js → EvaluationsView-DQd7op3j.js} +53 -40
- package/dist/assets/{ExecutionsTime-DkME6I3E.css → ExecutionsTime-Bo7IOE5K.css} +6 -6
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-v5SEEKlZ.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-C_2brmCr.js} +16 -16
- package/dist/assets/{ExecutionsView-sSmNa_LK.js → ExecutionsView-CKPZTnZV.js} +21 -18
- package/dist/assets/{FileSaver.min-BemkeU_7.js → FileSaver.min-BvxTURBB.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-yzvCzSx6.js → FixedCollectionParameter-CA-CigeR.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView-BKvBLqbr.js → ForgotMyPasswordView-YyVmo-nw.js} +3 -3
- package/dist/assets/{InfoAccordion--ZQQuSPX.js → InfoAccordion-BNmUe2V9.js} +1 -1
- package/dist/assets/{InsightsChartAverageRuntime-DGOGXDwW.js → InsightsChartAverageRuntime-C9sCNhzD.js} +5 -4
- package/dist/assets/{InsightsChartFailed-1vg5XpxV.js → InsightsChartFailed-DWA6YbZj.js} +5 -4
- package/dist/assets/{InsightsChartFailureRate-7nJvVi9O.js → InsightsChartFailureRate-CfknGtrr.js} +5 -4
- package/dist/assets/{InsightsChartTimeSaved-DKn1pZ2q.js → InsightsChartTimeSaved-DtLO9DJx.js} +5 -4
- package/dist/assets/{InsightsChartTotal-ByrPtNMJ.js → InsightsChartTotal-yX_QJ-44.js} +5 -4
- package/dist/assets/{InsightsDashboard-BwLnzxKC.js → InsightsDashboard-BlYvn96O.js} +19 -19
- package/dist/assets/{InsightsDashboard-CXbI-Jyg.css → InsightsDashboard-C27Avzrv.css} +2 -2
- package/dist/assets/{InsightsPaywall-8Xzv5tgi.js → InsightsPaywall-BCfIY_xn.js} +3 -3
- package/dist/assets/{InsightsSummary-CVMZ0AIR.js → InsightsSummary-OiO7efWD.js} +9 -4
- package/dist/assets/{InsightsTableWorkflows-DJhX6bQW.css → InsightsTableWorkflows-BTHSCwX8.css} +27 -3
- package/dist/assets/{InsightsTableWorkflows-KGsV_wLS.js → InsightsTableWorkflows-pTl3m7wx.js} +80 -27
- package/dist/assets/{Logo-DFdhGUpH.js → Logo-8g4P9vyv.js} +1 -1
- package/dist/assets/{LogsPanel-Bvy4ANV7.css → LogsPanel-D0xdq4fV.css} +21 -21
- package/dist/assets/{LogsPanel-DDzEUcu_.js → LogsPanel-so01MtIR.js} +23 -12
- package/dist/assets/{MainHeader-IUjqKc1i.js → MainHeader-CcUlKfHC.js} +20 -26
- package/dist/assets/{MainHeader-DYYEm7nF.css → MainHeader-qSHM1Rvp.css} +12 -12
- package/dist/assets/{MainSidebar-CaLHZgDB.css → MainSidebar-D74VZmM5.css} +7 -8
- package/dist/assets/{MainSidebar-BV-JzM27.js → MainSidebar-DOGhP_oY.js} +26 -25
- package/dist/assets/{N8nDataTableServer-Dq5Mwh9d.js → N8nDataTableServer-9HerjyzX.js} +39 -19
- package/dist/assets/{NodeCreation-DCV9QVeh.js → NodeCreation-CVbCKnet.js} +45 -21
- package/dist/assets/{NodeCreation-32nlvQSy.css → NodeCreation-CxN6JIS_.css} +9 -1
- package/dist/assets/{NodeCreator-C8jv1gta.js → NodeCreator-BOosPF8_.js} +114 -204
- package/dist/assets/{NodeCreator-DWE25utr.css → NodeCreator-CkvY2niF.css} +0 -128
- package/dist/assets/{NodeDetailsView-D7qedYA0.js → NodeDetailsView-KFidngJi.js} +21 -16
- package/dist/assets/{NodeDetailsViewV2-BAkPjDo5.js → NodeDetailsViewV2-BL4KKqW-.js} +21 -16
- package/dist/assets/{NodeView-DKlyR0_C.js → NodeView-BzC6ELga.js} +2271 -686
- package/dist/assets/{NodeView-BbQy7Are.css → NodeView-G2qfXaOy.css} +766 -95
- package/dist/assets/{ProjectHeader-Co0EPo6y.js → ProjectHeader-B9-GdGvC.js} +2 -2
- package/dist/assets/{ProjectSettings-CUwuhSyu.js → ProjectSettings-CE4_geFa.js} +7 -5
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-DDVpVAyT.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-Bb8zUJvi.js} +1 -1
- package/dist/assets/{ResourcesListLayout-0KbQy3_m.js → ResourcesListLayout-ClTEnqVS.js} +3 -3
- package/dist/assets/{RunDataJson-T-LRvnsQ.js → RunDataJson-fXQKTIFD.js} +8 -9
- package/dist/assets/{RunDataJsonActions-C5tGgl2w.js → RunDataJsonActions-CMP1sUPZ.js} +1 -1
- package/dist/assets/RunDataParsedAiContent-CHK6Y4ET.js +298 -0
- package/dist/assets/{RunDataSearch-CsykTpQU.js → RunDataSearch-CAZGWZzz.js} +1 -1
- package/dist/assets/{RunDataTable-DS-hDrAF.js → RunDataTable-CeqmA-n3.js} +65 -56
- package/dist/assets/{RunDataTable-CTBtmQIs.css → RunDataTable-n918b-Qv.css} +55 -55
- package/dist/assets/{SamlOnboarding-Dr42BiUa.js → SamlOnboarding-BrdzPMSK.js} +3 -3
- package/dist/assets/{SettingsApiView-0TAqOns3.js → SettingsApiView-Cj2YYKAl.js} +5 -4
- package/dist/assets/{SettingsCommunityNodesView-BO5mZg81.js → SettingsCommunityNodesView-ChB--kZD.js} +4 -3
- package/dist/assets/{SettingsExternalSecrets-BmpYfnUN.js → SettingsExternalSecrets-BjghCvkE.js} +5 -3
- package/dist/assets/{SettingsLdapView-AdcIL_WB.js → SettingsLdapView-DIB1-nTk.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-DHAPBv4i.js → SettingsLogStreamingView-BOOGkcwK.js} +1 -1
- package/dist/assets/{SettingsPersonalView-D-sKTNF5.js → SettingsPersonalView-DaNZTNUy.js} +1 -1
- package/dist/assets/{SettingsSourceControl-D_jgIQPN.js → SettingsSourceControl-B5fQRT0V.js} +10 -8
- package/dist/assets/{SettingsSso-DpxORkrt.js → SettingsSso-CWX-T13W.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-DWu4RW1N.js → SettingsUsageAndPlan-Cnnf9k6X.js} +15 -10
- package/dist/assets/{SettingsUsageAndPlan-D6TiPwUx.css → SettingsUsageAndPlan-ZZQpCmyQ.css} +3 -3
- package/dist/assets/{SettingsUsersView-r6-ZO8CO.js → SettingsUsersView-BLDi4lpv.js} +107 -44
- package/dist/assets/{SettingsUsersView-BuZbf1jq.css → SettingsUsersView-RQTdLxyb.css} +13 -6
- package/dist/assets/{SettingsView-DoZ4920P.js → SettingsView-Dtc8MEv6.js} +1 -1
- package/dist/assets/{SetupView-Ca70rhsh.js → SetupView-C4C-2Idz.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-ujybntOa.js → SetupWorkflowCredentialsButton-Pzrxag-k.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-KE6NTkHC.js → SetupWorkflowFromTemplateView-CRsZDYct.js} +3 -3
- package/dist/assets/{SigninView-_rmKLSpx.js → SigninView-COyoSAUi.js} +3 -3
- package/dist/assets/{SignoutView-DYPGyBsZ.js → SignoutView-B0t9kc5s.js} +1 -1
- package/dist/assets/{SignupView-BDSpYIB0.js → SignupView-BN8MCOnb.js} +3 -3
- package/dist/assets/{TableBase-Bz6zRvAL.js → TableBase-BmhIwPwZ.js} +1 -1
- package/dist/assets/{Tags-Doq3WsWA.js → Tags-DeTgaVsD.js} +1 -1
- package/dist/assets/{TemplateDetails-BzDS-0Fd.js → TemplateDetails-Bh-WSvQ-.js} +2 -2
- package/dist/assets/{TemplateList-D_XBHKQu.js → TemplateList-DxvJMjPE.js} +1 -1
- package/dist/assets/{TemplatesCollectionView-BvnC5QZ9.js → TemplatesCollectionView-BhilAS_8.js} +6 -6
- package/dist/assets/{TemplatesSearchView-CCsnhiD3.js → TemplatesSearchView-CWxnTQ8Z.js} +3 -3
- package/dist/assets/{TemplatesView-DbW9D41Q.js → TemplatesView-Co-FQLhr.js} +1 -1
- package/dist/assets/{TemplatesWorkflowView-CVFtBBcd.js → TemplatesWorkflowView-DAWgsT0T.js} +6 -6
- package/dist/assets/{TriggerPanel-DRpKKKun.css → TriggerPanel-DJv04feX.css} +1 -354
- package/dist/assets/{TriggerPanel-CP3_UsCW.js → TriggerPanel-JaXhe1VW.js} +133 -1089
- package/dist/assets/{VariablesView-DIZkSQZ3.js → VariablesView-JnfEn1f-.js} +5 -5
- package/dist/assets/VueMarkdown-DDKnTMgT.js +1570 -0
- package/dist/assets/{WorkerView-DgXLi4d9.js → WorkerView-DZG4C_Qp.js} +6 -5
- package/dist/assets/{WorkflowActivator-f0lJXePV.js → WorkflowActivator-C8hP37n7.js} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-BFSae6PE.js → WorkflowExecutionsInfoAccordion-DCNvkxhh.js} +2 -2
- package/dist/assets/{WorkflowExecutionsLandingPage-Bb104kSO.js → WorkflowExecutionsLandingPage-DVp6SoPy.js} +3 -3
- package/dist/assets/{WorkflowExecutionsPreview-Do5Rp-8m.js → WorkflowExecutionsPreview-CKYWZWv1.js} +9 -7
- package/dist/assets/{WorkflowExecutionsView-BSv7OYhx.js → WorkflowExecutionsView-BIkweP3p.js} +8 -8
- package/dist/assets/{WorkflowHistory-CsEfwZK8.js → WorkflowHistory-C0LrWJW0.js} +6 -6
- package/dist/assets/{WorkflowOnboardingView-BOvx7CPi.js → WorkflowOnboardingView-CWMUgnLK.js} +1 -1
- package/dist/assets/{WorkflowPreview-BQ_GLS2J.js → WorkflowPreview-DmYMBSH3.js} +3 -1
- package/dist/assets/{WorkflowsView-DYxrTukw.js → WorkflowsView-jEphnf90.js} +125 -17
- package/dist/assets/aiTemplatesStarterCollection.store-oECEA5nR.js +794 -0
- package/dist/assets/{chartjs.utils-D8ESC4_p.js → chartjs.utils-CP28DnUQ.js} +2 -2
- package/dist/assets/{en-C2EOIYih.js → en-BX7CKkqE.js} +27 -6
- package/dist/assets/{global-link-actions-BIVeUMGo.js → global-link-actions-BjpAG7gt.js} +1 -1
- package/dist/assets/{import-curl-CjhdjoGU.js → import-curl-BD22LJ4z.js} +1 -1
- package/dist/assets/{index-COleXxZf.css → index-BWpYwmXd.css} +541 -1074
- package/dist/assets/{index-DAODXvFs.js → index-CjbtyS1n.js} +1 -1
- package/dist/assets/{index-B3p3789J.js → index-Cm5yBbby.js} +21381 -15752
- package/dist/assets/{pickBy-CaeaG_7P.js → pickBy-DA-1tKxT.js} +1 -1
- package/dist/assets/{templateActions-Ct4VGqHx.js → templateActions-D9IAsJ2m.js} +1 -1
- package/dist/assets/{typescript.worker-CUj0Nj-S.js → typescript.worker-KwUz68Jx.js} +2499 -157
- package/dist/assets/{useBeforeUnload-Yj83KQFp.js → useBeforeUnload-BR-V9Uaz.js} +1 -1
- package/dist/assets/{useExecutionDebugging-wUQ9K2sh.js → useExecutionDebugging-C8zR-uFJ.js} +1 -1
- package/dist/assets/{useExecutionHelpers-i07QEXws.js → useExecutionHelpers-DQcWcZ8o.js} +1 -1
- package/dist/assets/{useImportCurlCommand-Bs8VOC2z.js → useImportCurlCommand-B3-fEq8S.js} +9 -9
- package/dist/assets/{RunData-DuKNwYqe.css → useKeybindings-2A271Jke.css} +193 -62
- package/dist/assets/{RunData-CctCvWsu.js → useKeybindings-DetzdpXy.js} +288 -1696
- package/dist/assets/{useProjectPages-DHCwu3nX.js → useProjectPages-qXIMd_UF.js} +1 -1
- package/dist/assets/{usePushConnection-Iyy-883l.js → usePushConnection-Duvg6z8O.js} +10 -2
- package/dist/assets/{useWorkflowActivate-DpHXxGAq.js → useWorkflowActivate-BE4Ckf9k.js} +1 -1
- package/dist/index.html +3 -7
- package/eslint.config.mjs +1 -1
- package/index.html +1 -5
- package/package.json +1 -1
- package/vite.config.mts +23 -3
- package/dist/assets/CollectionParameter-DvyRKBx0.js +0 -4
- package/dist/assets/RunDataParsedAiContent-BILLIvVH.js +0 -148
- package/dist/assets/useKeybindings-BUK7Ngh6.css +0 -133
- package/dist/assets/useKeybindings-ul7syjnB.js +0 -118
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a6 as useRoute, x as computed, V as VIEWS, eI as reactive } from "./index-Cm5yBbby.js";
|
|
2
2
|
const useProjectPages = () => {
|
|
3
3
|
const route = useRoute();
|
|
4
4
|
const isOverviewSubPage = computed(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as globalLinkActionsEventBus } from "./global-link-actions-
|
|
1
|
+
import { gM as makeRestApiRequest, a5 as useWorkflowsStore, T as useUIStore, gN as clearPopupWindowState, eY as getEasyAiWorkflowJson, az as useTelemetry, cc as parse, gO as hasTrimmedItem, v as useSettingsStore, ak as useWorkflowSaving, al as useWorkflowHelpers, aD as WORKFLOW_SETTINGS_MODAL_KEY, a as useToast, gP as generateNodesGraph, c as useI18n, gQ as getExecutionErrorToastConfiguration, bH as useNodeTypesStore, e9 as getTriggerNodeServiceName, bC as useNodeHelpers, gR as hasTrimmedData, be as useExternalHooks, gS as codeNodeEditorEventBus, eR as EVALUATION_TRIGGER_NODE_TYPE, bD as useRunWorkflow, gT as getExecutionErrorMessage, du as useCredentialsStore, fa as useAssistantStore, fe as useSchemaPreviewStore, dd as isCommunityPackageName, a3 as defineStore, ad as useRootStore, a4 as usePushConnectionStore, r as ref } from "./index-Cm5yBbby.js";
|
|
2
|
+
import { g as globalLinkActionsEventBus } from "./global-link-actions-BjpAG7gt.js";
|
|
3
|
+
import { u as useAITemplatesStarterCollectionStore } from "./aiTemplatesStarterCollection.store-oECEA5nR.js";
|
|
3
4
|
var GET_STATUS_ENDPOINT = "/orchestration/worker/status";
|
|
4
5
|
var sendGetWorkerStatus = async (context) => {
|
|
5
6
|
await makeRestApiRequest(context, "POST", GET_STATUS_ENDPOINT);
|
|
@@ -7,6 +8,7 @@ var sendGetWorkerStatus = async (context) => {
|
|
|
7
8
|
async function executionFinished({ data }, options) {
|
|
8
9
|
const workflowsStore = useWorkflowsStore();
|
|
9
10
|
const uiStore = useUIStore();
|
|
11
|
+
const aiTemplatesStarterCollectionStore = useAITemplatesStarterCollectionStore();
|
|
10
12
|
workflowsStore.lastAddedExecutingNode = null;
|
|
11
13
|
if (typeof workflowsStore.activeExecutionId === "undefined") {
|
|
12
14
|
return;
|
|
@@ -22,6 +24,12 @@ async function executionFinished({ data }, options) {
|
|
|
22
24
|
status: data.status
|
|
23
25
|
});
|
|
24
26
|
}
|
|
27
|
+
if (workflow.meta.templateId.startsWith("035_template_onboarding")) {
|
|
28
|
+
aiTemplatesStarterCollectionStore.trackUserExecutedWorkflow(
|
|
29
|
+
workflow.meta.templateId.split("-").pop() ?? "",
|
|
30
|
+
data.status
|
|
31
|
+
);
|
|
32
|
+
}
|
|
25
33
|
}
|
|
26
34
|
uiStore.setProcessingExecutionResults(true);
|
|
27
35
|
let successToastAlreadyShown = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ref, b as useRouter,
|
|
1
|
+
import { r as ref, b as useRouter, al as useWorkflowHelpers, ak as useWorkflowSaving, a5 as useWorkflowsStore, T as useUIStore, a as useToast, ai as useNpsSurveyStore, a7 as PLACEHOLDER_EMPTY_WORKFLOW_ID, az as useTelemetry, be as useExternalHooks, c as useI18n, b5 as useStorage, g$ as LOCAL_STORAGE_ACTIVATION_FLAG, h0 as WORKFLOW_ACTIVE_MODAL_KEY } from "./index-Cm5yBbby.js";
|
|
2
2
|
function useWorkflowActivate() {
|
|
3
3
|
const updatingWorkflowActivation = ref(false);
|
|
4
4
|
const router = useRouter();
|
package/dist/index.html
CHANGED
|
@@ -8,16 +8,12 @@
|
|
|
8
8
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
9
9
|
<link rel="icon" href="/{{BASE_PATH}}/favicon.ico" />
|
|
10
10
|
<style>@media (prefers-color-scheme: dark) { body { background-color: rgb(45, 46, 46) } }</style>
|
|
11
|
-
<script
|
|
12
|
-
window.BASE_PATH = '/{{BASE_PATH}}/';
|
|
13
|
-
window.REST_ENDPOINT = '{{REST_ENDPOINT}}';
|
|
14
|
-
</script>
|
|
15
|
-
<script src="/{{REST_ENDPOINT}}/sentry.js"></script>
|
|
11
|
+
<script src="/{{REST_ENDPOINT}}/config.js"></script>
|
|
16
12
|
<script>!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled getFeatureFlag onFeatureFlags reloadFeatureFlags".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[])</script>
|
|
17
13
|
|
|
18
14
|
<title>n8n.io - Workflow Automation</title>
|
|
19
|
-
<script type="module" crossorigin src="/{{BASE_PATH}}/assets/index-
|
|
20
|
-
<link rel="stylesheet" crossorigin href="/{{BASE_PATH}}/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/{{BASE_PATH}}/assets/index-Cm5yBbby.js"></script>
|
|
16
|
+
<link rel="stylesheet" crossorigin href="/{{BASE_PATH}}/assets/index-BWpYwmXd.css">
|
|
21
17
|
</head>
|
|
22
18
|
<body>
|
|
23
19
|
<noscript>
|
package/eslint.config.mjs
CHANGED
|
@@ -24,7 +24,7 @@ export default defineConfig(frontendConfig, {
|
|
|
24
24
|
'@typescript-eslint/dot-notation': 'warn',
|
|
25
25
|
'@stylistic/lines-between-class-members': 'warn',
|
|
26
26
|
'@stylistic/member-delimiter-style': 'warn',
|
|
27
|
-
'@typescript-eslint/naming-convention': '
|
|
27
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
28
28
|
'@typescript-eslint/no-empty-interface': 'warn',
|
|
29
29
|
'@typescript-eslint/no-for-in-array': 'warn',
|
|
30
30
|
'@typescript-eslint/no-loop-func': 'warn',
|
package/index.html
CHANGED
|
@@ -6,11 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
7
|
<link rel="icon" href="/favicon.ico" />
|
|
8
8
|
<style>@media (prefers-color-scheme: dark) { body { background-color: rgb(45, 46, 46) } }</style>
|
|
9
|
-
|
|
10
|
-
window.BASE_PATH = '/{{BASE_PATH}}/';
|
|
11
|
-
window.REST_ENDPOINT = '{{REST_ENDPOINT}}';
|
|
12
|
-
</script>
|
|
13
|
-
<script src="/{{REST_ENDPOINT}}/sentry.js"></script>
|
|
9
|
+
%CONFIG_SCRIPT%
|
|
14
10
|
<script>!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled getFeatureFlag onFeatureFlags reloadFeatureFlags".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[])</script>
|
|
15
11
|
|
|
16
12
|
<title>n8n.io - Workflow Automation</title>
|
package/package.json
CHANGED
package/vite.config.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import vue from '@vitejs/plugin-vue';
|
|
2
2
|
import { posix as pathPosix, resolve } from 'path';
|
|
3
|
-
import { defineConfig, mergeConfig } from 'vite';
|
|
3
|
+
import { defineConfig, mergeConfig, type UserConfig } from 'vite';
|
|
4
4
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
5
|
+
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
|
5
6
|
import svgLoader from 'vite-svg-loader';
|
|
6
7
|
|
|
7
8
|
import { vitestConfig } from '@n8n/vitest-config/frontend';
|
|
@@ -63,9 +64,14 @@ const alias = [
|
|
|
63
64
|
find: /^lodash\.(.+)$/,
|
|
64
65
|
replacement: 'lodash/$1',
|
|
65
66
|
},
|
|
67
|
+
{
|
|
68
|
+
// For sanitize-html
|
|
69
|
+
find: 'source-map-js',
|
|
70
|
+
replacement: resolve(__dirname, 'src/source-map-js-shim'),
|
|
71
|
+
},
|
|
66
72
|
];
|
|
67
73
|
|
|
68
|
-
const plugins = [
|
|
74
|
+
const plugins: UserConfig['plugins'] = [
|
|
69
75
|
icons({
|
|
70
76
|
compiler: 'vue3',
|
|
71
77
|
autoInstall: true,
|
|
@@ -115,6 +121,20 @@ const plugins = [
|
|
|
115
121
|
modernPolyfills: true,
|
|
116
122
|
renderLegacyChunks: false,
|
|
117
123
|
}),
|
|
124
|
+
{
|
|
125
|
+
name: 'Insert config script',
|
|
126
|
+
transformIndexHtml: (html, ctx) => {
|
|
127
|
+
const replacement = ctx.server
|
|
128
|
+
? '' // Skip when using Vite dev server
|
|
129
|
+
: '<script src="/{{REST_ENDPOINT}}/config.js"></script>';
|
|
130
|
+
|
|
131
|
+
return html.replace('%CONFIG_SCRIPT%', replacement);
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
// For sanitize-html
|
|
135
|
+
nodePolyfills({
|
|
136
|
+
include: ['fs', 'path', 'url', 'util', 'timers'],
|
|
137
|
+
}),
|
|
118
138
|
];
|
|
119
139
|
|
|
120
140
|
const { RELEASE: release } = process.env;
|
|
@@ -131,7 +151,7 @@ export default mergeConfig(
|
|
|
131
151
|
plugins,
|
|
132
152
|
resolve: { alias },
|
|
133
153
|
base: publicPath,
|
|
134
|
-
envPrefix: 'VUE',
|
|
154
|
+
envPrefix: ['VUE', 'N8N_ENV_FEAT'],
|
|
135
155
|
css: {
|
|
136
156
|
preprocessorOptions: {
|
|
137
157
|
scss: {
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { d as defineComponent, c4 as useClipboard, a as useToast, h as createElementBlock, g as openBlock, n as normalizeClass, F as Fragment, y as renderList, e as createBlock, f as createCommentVNode, l as unref, t as toDisplayString, i as createVNode, a0 as _sfc_main$1, c as useI18n, _ as _export_sfc } from "./index-B3p3789J.js";
|
|
2
|
-
import { V as VueMarkdown, H as HighlightJS } from "./RunData-CctCvWsu.js";
|
|
3
|
-
import "./FileSaver.min-BemkeU_7.js";
|
|
4
|
-
import "./useKeybindings-ul7syjnB.js";
|
|
5
|
-
import "./useExecutionHelpers-i07QEXws.js";
|
|
6
|
-
const _hoisted_1 = ["data-content-type"];
|
|
7
|
-
const _hoisted_2 = ["textContent"];
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "RunDataParsedAiContent",
|
|
10
|
-
props: {
|
|
11
|
-
content: {},
|
|
12
|
-
compact: { type: Boolean, default: false },
|
|
13
|
-
renderType: {}
|
|
14
|
-
},
|
|
15
|
-
setup(__props) {
|
|
16
|
-
const i18n = useI18n();
|
|
17
|
-
const clipboard = useClipboard();
|
|
18
|
-
const { showMessage } = useToast();
|
|
19
|
-
function isJsonString(text) {
|
|
20
|
-
try {
|
|
21
|
-
JSON.parse(text);
|
|
22
|
-
return true;
|
|
23
|
-
} catch (e) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const markdownOptions = {
|
|
28
|
-
highlight(str, lang) {
|
|
29
|
-
if (lang && HighlightJS.getLanguage(lang)) {
|
|
30
|
-
try {
|
|
31
|
-
return HighlightJS.highlight(str, { language: lang }).value;
|
|
32
|
-
} catch {
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return "";
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
function isMarkdown(jsonMarkdown) {
|
|
39
|
-
if (typeof jsonMarkdown !== "string") return false;
|
|
40
|
-
const markdownPatterns = [
|
|
41
|
-
/^# .+/gm,
|
|
42
|
-
// headers
|
|
43
|
-
/\*{1,2}.+\*{1,2}/g,
|
|
44
|
-
// emphasis and strong
|
|
45
|
-
/\[.+\]\(.+\)/g,
|
|
46
|
-
// links
|
|
47
|
-
/```[\s\S]+```/g
|
|
48
|
-
// code blocks
|
|
49
|
-
];
|
|
50
|
-
return markdownPatterns.some((pattern) => pattern.test(jsonMarkdown));
|
|
51
|
-
}
|
|
52
|
-
function formatToJsonMarkdown(data) {
|
|
53
|
-
return "```json\n" + data + "\n```";
|
|
54
|
-
}
|
|
55
|
-
function jsonToMarkdown(data) {
|
|
56
|
-
if (isMarkdown(data)) return data;
|
|
57
|
-
if (Array.isArray(data) && data.length && typeof data[0] !== "number") {
|
|
58
|
-
const markdownArray = data.map((item) => jsonToMarkdown(item));
|
|
59
|
-
return markdownArray.join("\n\n").trim();
|
|
60
|
-
}
|
|
61
|
-
if (typeof data === "string") {
|
|
62
|
-
if (isJsonString(data)) {
|
|
63
|
-
return formatToJsonMarkdown(data);
|
|
64
|
-
}
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
|
-
return formatToJsonMarkdown(JSON.stringify(data, null, 2));
|
|
68
|
-
}
|
|
69
|
-
function onCopyToClipboard(object) {
|
|
70
|
-
try {
|
|
71
|
-
void clipboard.copy(JSON.stringify(object, void 0, 2));
|
|
72
|
-
showMessage({
|
|
73
|
-
title: i18n.baseText("generic.copiedToClipboard"),
|
|
74
|
-
type: "success"
|
|
75
|
-
});
|
|
76
|
-
} catch {
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return (_ctx, _cache) => {
|
|
80
|
-
return openBlock(), createElementBlock("div", {
|
|
81
|
-
class: normalizeClass([_ctx.$style.component, _ctx.compact ? _ctx.$style.compact : ""])
|
|
82
|
-
}, [
|
|
83
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.content, ({ parsedContent, raw }, index) => {
|
|
84
|
-
return openBlock(), createElementBlock("div", {
|
|
85
|
-
key: index,
|
|
86
|
-
class: normalizeClass(_ctx.$style.contentText),
|
|
87
|
-
"data-content-type": parsedContent?.type
|
|
88
|
-
}, [
|
|
89
|
-
parsedContent && _ctx.renderType === "rendered" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
90
|
-
parsedContent.type === "json" ? (openBlock(), createBlock(unref(VueMarkdown), {
|
|
91
|
-
key: 0,
|
|
92
|
-
source: jsonToMarkdown(parsedContent.data),
|
|
93
|
-
class: normalizeClass(_ctx.$style.markdown),
|
|
94
|
-
options: markdownOptions
|
|
95
|
-
}, null, 8, ["source", "class"])) : parsedContent.type === "markdown" ? (openBlock(), createBlock(unref(VueMarkdown), {
|
|
96
|
-
key: 1,
|
|
97
|
-
source: parsedContent.data,
|
|
98
|
-
class: normalizeClass(_ctx.$style.markdown),
|
|
99
|
-
options: markdownOptions
|
|
100
|
-
}, null, 8, ["source", "class"])) : parsedContent.type === "text" ? (openBlock(), createElementBlock("p", {
|
|
101
|
-
key: 2,
|
|
102
|
-
class: normalizeClass(_ctx.$style.runText),
|
|
103
|
-
textContent: toDisplayString(parsedContent.data)
|
|
104
|
-
}, null, 10, _hoisted_2)) : createCommentVNode("", true)
|
|
105
|
-
], 64)) : (openBlock(), createElementBlock("div", {
|
|
106
|
-
key: 1,
|
|
107
|
-
class: normalizeClass(_ctx.$style.rawContent)
|
|
108
|
-
}, [
|
|
109
|
-
createVNode(unref(_sfc_main$1), {
|
|
110
|
-
size: "small",
|
|
111
|
-
class: normalizeClass(_ctx.$style.copyToClipboard),
|
|
112
|
-
type: "secondary",
|
|
113
|
-
title: unref(i18n).baseText("nodeErrorView.copyToClipboard"),
|
|
114
|
-
icon: "files",
|
|
115
|
-
onClick: ($event) => onCopyToClipboard(raw)
|
|
116
|
-
}, null, 8, ["class", "title", "onClick"]),
|
|
117
|
-
createVNode(unref(VueMarkdown), {
|
|
118
|
-
source: jsonToMarkdown(raw),
|
|
119
|
-
class: normalizeClass(_ctx.$style.markdown)
|
|
120
|
-
}, null, 8, ["source", "class"])
|
|
121
|
-
], 2))
|
|
122
|
-
], 10, _hoisted_1);
|
|
123
|
-
}), 128))
|
|
124
|
-
], 2);
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
const runText = "_runText_1ucj0_123";
|
|
129
|
-
const markdown = "_markdown_1ucj0_128";
|
|
130
|
-
const compact = "_compact_1ucj0_151";
|
|
131
|
-
const copyToClipboard = "_copyToClipboard_1ucj0_159";
|
|
132
|
-
const rawContent = "_rawContent_1ucj0_169";
|
|
133
|
-
const contentText = "_contentText_1ucj0_173";
|
|
134
|
-
const style0 = {
|
|
135
|
-
runText,
|
|
136
|
-
markdown,
|
|
137
|
-
compact,
|
|
138
|
-
copyToClipboard,
|
|
139
|
-
rawContent,
|
|
140
|
-
contentText
|
|
141
|
-
};
|
|
142
|
-
const cssModules = {
|
|
143
|
-
"$style": style0
|
|
144
|
-
};
|
|
145
|
-
const RunDataAi = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
146
|
-
export {
|
|
147
|
-
RunDataAi as default
|
|
148
|
-
};
|
|
@@ -1,133 +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
|
-
._uiBlocker_j0zl4_123 {
|
|
124
|
-
position: absolute;
|
|
125
|
-
top: 0;
|
|
126
|
-
left: 0;
|
|
127
|
-
width: 100%;
|
|
128
|
-
height: 100%;
|
|
129
|
-
background-color: var(--color-block-ui-overlay);
|
|
130
|
-
z-index: 10;
|
|
131
|
-
opacity: 0.6;
|
|
132
|
-
border-radius: var(--border-radius-large);
|
|
133
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { d as defineComponent, e as createBlock, g as openBlock, dJ as Transition, w as withCtx, aU as withDirectives, aV as vShow, j as createBaseVNode, n as normalizeClass, _ as _export_sfc, Q as createEventBus, bW as inject, r as ref, c5 as PiPWindowSymbol, cn as useActiveElement, dP as useDeviceSupport, x as computed, cZ as toValue, eD as useEventListener } from "./index-B3p3789J.js";
|
|
2
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
|
-
__name: "BlockUi",
|
|
4
|
-
props: {
|
|
5
|
-
show: { type: Boolean, default: false }
|
|
6
|
-
},
|
|
7
|
-
setup(__props) {
|
|
8
|
-
return (_ctx, _cache) => {
|
|
9
|
-
return openBlock(), createBlock(Transition, {
|
|
10
|
-
name: "fade",
|
|
11
|
-
mode: "out-in"
|
|
12
|
-
}, {
|
|
13
|
-
default: withCtx(() => [
|
|
14
|
-
withDirectives(createBaseVNode("div", {
|
|
15
|
-
class: normalizeClass(["n8n-block-ui", _ctx.$style.uiBlocker]),
|
|
16
|
-
role: "dialog",
|
|
17
|
-
"aria-hidden": true
|
|
18
|
-
}, null, 2), [
|
|
19
|
-
[vShow, _ctx.show]
|
|
20
|
-
])
|
|
21
|
-
]),
|
|
22
|
-
_: 1
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const uiBlocker = "_uiBlocker_j0zl4_123";
|
|
28
|
-
const style0 = {
|
|
29
|
-
uiBlocker
|
|
30
|
-
};
|
|
31
|
-
const cssModules = {
|
|
32
|
-
"$style": style0
|
|
33
|
-
};
|
|
34
|
-
const N8nBlockUi = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-76a59b58"]]);
|
|
35
|
-
const canvasEventBus = createEventBus();
|
|
36
|
-
const useKeybindings = (keymap, options) => {
|
|
37
|
-
const pipWindow = inject(PiPWindowSymbol, ref());
|
|
38
|
-
const activeElement = useActiveElement({ window: pipWindow?.value });
|
|
39
|
-
const { isCtrlKeyPressed } = useDeviceSupport();
|
|
40
|
-
const isDisabled = computed(() => toValue(options?.disabled));
|
|
41
|
-
const ignoreKeyPresses = computed(() => {
|
|
42
|
-
if (!activeElement.value) return false;
|
|
43
|
-
const active = activeElement.value;
|
|
44
|
-
const isInput = ["INPUT", "TEXTAREA"].includes(active.tagName);
|
|
45
|
-
const isContentEditable = active.closest("[contenteditable]") !== null;
|
|
46
|
-
const isIgnoreClass = active.closest(".ignore-key-press-canvas") !== null;
|
|
47
|
-
return isInput || isContentEditable || isIgnoreClass;
|
|
48
|
-
});
|
|
49
|
-
const normalizedKeymap = computed(
|
|
50
|
-
() => Object.fromEntries(
|
|
51
|
-
Object.entries(toValue(keymap)).flatMap(([shortcut, handler]) => {
|
|
52
|
-
const shortcuts = shortcut.split("|");
|
|
53
|
-
return shortcuts.map((s) => [normalizeShortcutString(s), handler]);
|
|
54
|
-
})
|
|
55
|
-
)
|
|
56
|
-
);
|
|
57
|
-
function shortcutPartsToString(parts) {
|
|
58
|
-
return parts.map((key) => key.toLowerCase()).sort((a, b) => a.localeCompare(b)).join("+");
|
|
59
|
-
}
|
|
60
|
-
function normalizeShortcutString(shortcut) {
|
|
61
|
-
if (shortcut.length === 1) {
|
|
62
|
-
return shortcut.toLowerCase();
|
|
63
|
-
}
|
|
64
|
-
const splitChars = ["+", "_", "-"];
|
|
65
|
-
const splitCharsRegEx = splitChars.reduce((acc, char) => {
|
|
66
|
-
if (shortcut.startsWith(char) || shortcut.endsWith(char)) {
|
|
67
|
-
return acc;
|
|
68
|
-
}
|
|
69
|
-
return char + acc;
|
|
70
|
-
}, "");
|
|
71
|
-
return shortcutPartsToString(shortcut.split(new RegExp(`[${splitCharsRegEx}]`)));
|
|
72
|
-
}
|
|
73
|
-
function keyboardEventCodeToKey(code) {
|
|
74
|
-
if (code.startsWith("Digit")) {
|
|
75
|
-
return code.replace("Digit", "").toLowerCase();
|
|
76
|
-
} else if (code.startsWith("Key")) {
|
|
77
|
-
return code.replace("Key", "").toLowerCase();
|
|
78
|
-
}
|
|
79
|
-
return code.toLowerCase();
|
|
80
|
-
}
|
|
81
|
-
function toShortcutString(event) {
|
|
82
|
-
const { shiftKey, altKey } = event;
|
|
83
|
-
const ctrlKey = isCtrlKeyPressed(event);
|
|
84
|
-
const keys = "key" in event ? [event.key] : [];
|
|
85
|
-
const codes = "code" in event ? [keyboardEventCodeToKey(event.code)] : [];
|
|
86
|
-
const modifiers = [];
|
|
87
|
-
if (shiftKey) {
|
|
88
|
-
modifiers.push("shift");
|
|
89
|
-
}
|
|
90
|
-
if (ctrlKey) {
|
|
91
|
-
modifiers.push("ctrl");
|
|
92
|
-
}
|
|
93
|
-
if (altKey) {
|
|
94
|
-
modifiers.push("alt");
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
byKey: shortcutPartsToString([...modifiers, ...keys]),
|
|
98
|
-
byCode: shortcutPartsToString([...modifiers, ...codes])
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
function onKeyDown(event) {
|
|
102
|
-
if (ignoreKeyPresses.value || isDisabled.value) return;
|
|
103
|
-
const { byKey, byCode } = toShortcutString(event);
|
|
104
|
-
const handler = normalizedKeymap.value[byKey] ?? normalizedKeymap.value[byCode];
|
|
105
|
-
const run = typeof handler === "function" ? handler : handler?.disabled() ? void 0 : handler?.run;
|
|
106
|
-
if (run) {
|
|
107
|
-
event.preventDefault();
|
|
108
|
-
event.stopPropagation();
|
|
109
|
-
run(event);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
useEventListener(pipWindow?.value?.document ?? document, "keydown", onKeyDown);
|
|
113
|
-
};
|
|
114
|
-
export {
|
|
115
|
-
N8nBlockUi as N,
|
|
116
|
-
canvasEventBus as c,
|
|
117
|
-
useKeybindings as u
|
|
118
|
-
};
|