n8n-editor-ui 1.92.0 → 1.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AnimatedSpinner-CtKKeDrz.js → AnimatedSpinner-CY5xYI5m.js} +1 -1
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DR6h_xsK.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-BOrzkwPH.js} +1 -1
- package/dist/assets/{AuthView-mKkzBRxh.js → AuthView-BTzGYAnY.js} +2 -2
- package/dist/assets/{CanvasChatSwitch-Bu2VD2kp.js → CanvasChatSwitch-CwpjFCL0.js} +17 -18
- package/dist/assets/{ChangePasswordView-D5UI1v-J.js → ChangePasswordView-BKR2UFVI.js} +3 -3
- package/dist/assets/CollectionParameter-BJtiV9En.js +4 -0
- package/dist/assets/{CredentialsView-B78eNJO5.js → CredentialsView-DVgxfnNi.js} +26 -11
- package/dist/assets/{DemoFooter-DP26HpCu.js → DemoFooter-C1T3Q0NX.js} +7 -8
- package/dist/assets/{ErrorView-C3fvEdCg.js → ErrorView-Cf2Yb8Ea.js} +1 -1
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-BBpwYdHY.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-DUu0UMcW.js} +2 -2
- package/dist/assets/{ExecutionsView-BvlDZwIs.js → ExecutionsView-DjNkfnDh.js} +20 -18
- package/dist/assets/{FileSaver.min-BzAtcQXX.js → FileSaver.min-C1p9Eies.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-CS5zXMAh.js → FixedCollectionParameter-DN_uJhpe.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView-CVQ7pcIG.js → ForgotMyPasswordView-BMQBDIrq.js} +3 -3
- package/dist/assets/{InsightsChartAverageRuntime-Boh0SMb3.js → InsightsChartAverageRuntime-JzBkV6Rc.js} +4 -4
- package/dist/assets/{InsightsChartFailed-IZ-KYOU9.js → InsightsChartFailed-DMD3c7zM.js} +4 -4
- package/dist/assets/{InsightsChartFailureRate-2fWw3p0L.js → InsightsChartFailureRate-D_qeZo4f.js} +4 -4
- package/dist/assets/{InsightsChartTimeSaved-B2pLVys1.js → InsightsChartTimeSaved-Cw2T-Wvp.js} +4 -4
- package/dist/assets/{InsightsChartTotal-2QD4wPLR.js → InsightsChartTotal-DlF47gob.js} +4 -4
- package/dist/assets/{InsightsDashboard-Bx4vx9gz.css → InsightsDashboard-BSrakbzr.css} +42 -8
- package/dist/assets/{InsightsDashboard-CbiFbJ8w.js → InsightsDashboard-CxQ9H296.js} +40 -41
- package/dist/assets/{InsightsPaywall-5d-cSdiS.js → InsightsPaywall-hRkAfeHz.js} +1 -1
- package/dist/assets/InsightsSummary-BcXd-3nU.js +209 -0
- package/dist/assets/{InsightsSummary-CdlaUpAt.css → InsightsSummary-DzGQpM5h.css} +27 -24
- package/dist/assets/{InsightsTableWorkflows-Blv_GPUj.css → InsightsTableWorkflows-DfTZQkWL.css} +3 -4
- package/dist/assets/{InsightsTableWorkflows-_eTCUNCX.js → InsightsTableWorkflows-ybloXdDn.js} +5 -6
- package/dist/assets/{Logo-Dl2xVRIu.js → Logo-BGe7-2Vd.js} +1 -1
- package/dist/assets/{LogsPanel-JnYirDqa.js → LogsPanel-DtTp6kY0.js} +334 -338
- package/dist/assets/{MainHeader-CEPLiR-5.css → MainHeader-Y95RcfHb.css} +24 -17
- package/dist/assets/{MainHeader-Bk29pgmL.js → MainHeader-h2DV-VuD.js} +148 -82
- package/dist/assets/{MainSidebar-BM5ku_wM.js → MainSidebar-AAHHRXFA.js} +28 -11
- package/dist/assets/{MainSidebar-zZpP3qQ0.css → MainSidebar-D1_1YFQZ.css} +2 -2
- package/dist/assets/{NodeCreation-BEjdAYc_.js → NodeCreation-nHiG-Lhi.js} +9 -5
- package/dist/assets/{NodeCreator-D9fmPdS2.css → NodeCreator-D18StsVZ.css} +1021 -174
- package/dist/assets/{NodeCreator-cEUgbAI9.js → NodeCreator-weAzsmlU.js} +862 -418
- package/dist/assets/{NodeDetailsView-D4O9dKTA.js → NodeDetailsView-BsXbcyfb.js} +22 -15
- package/dist/assets/{NodeDetailsView-DsFLtbxi.css → NodeDetailsView-DpO8nTmN.css} +16 -16
- package/dist/assets/{NodeView-DDSOUm8E.js → NodeView-BY1O3wWl.js} +104 -50
- package/dist/assets/{ProjectCardBadge-BNn2hiMe.js → ProjectCardBadge-3xpk5Z4e.js} +38 -2
- package/dist/assets/{ProjectHeader-CaEZ2OPj.js → ProjectHeader-CpoOisjf.js} +106 -64
- package/dist/assets/{ProjectSettings-otA8E-yW.js → ProjectSettings-B__3XaPY.js} +14 -3
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-C3JbZMCk.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-DaoPdG_5.js} +1 -1
- package/dist/assets/{ResourcesListLayout-1d9Ic6VX.js → ResourcesListLayout-DAxou314.js} +156 -53
- package/dist/assets/{ResourcesListLayout-CtGME7aU.css → ResourcesListLayout-DuNjbsMn.css} +8 -8
- package/dist/assets/{RunData-BjlZgIyx.css → RunData-CE5FsU6k.css} +2 -2
- package/dist/assets/{RunData-Bx47sNQp.js → RunData-fnd-jejc.js} +257 -99
- package/dist/assets/{RunDataAi-DOac7nwD.js → RunDataAi-Ck3VGKP_.js} +3 -4
- package/dist/assets/{RunDataJson-Pev6yNEV.js → RunDataJson-B80Z4URL.js} +7 -7
- package/dist/assets/{RunDataJsonActions-Co4xgmVq.js → RunDataJsonActions-CdZi1Qul.js} +1 -1
- package/dist/assets/{RunDataParsedAiContent-D6MNLmT3.js → RunDataParsedAiContent-BczxQ63H.js} +5 -5
- package/dist/assets/{RunDataSearch-C8orcAlP.js → RunDataSearch-C4KmCz4c.js} +1 -1
- package/dist/assets/{RunDataTable-oi_l8dhA.js → RunDataTable-CsLCZIWp.js} +3 -3
- package/dist/assets/{SamlOnboarding-CT5J6dx0.js → SamlOnboarding-DkhjCrPa.js} +3 -3
- package/dist/assets/{SettingsApiView-CupjcI9v.js → SettingsApiView-Ci2-rEpm.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-B5K2VLyJ.js → SettingsCommunityNodesView-_UOppuqS.js} +24 -11
- package/dist/assets/{SettingsExternalSecrets-BidJCf_t.js → SettingsExternalSecrets-DHIkKr53.js} +1 -1
- package/dist/assets/{SettingsLdapView-Cva6akhW.js → SettingsLdapView-B8ezgdqP.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-Cy-rAKUO.js → SettingsLogStreamingView-YP6Xy7Fe.js} +1 -1
- package/dist/assets/{SettingsPersonalView-ZJ1Syok2.js → SettingsPersonalView-BmbFyWPb.js} +1 -1
- package/dist/assets/{SettingsSourceControl-CMtqqlkO.js → SettingsSourceControl-DwaOdDke.js} +1 -1
- package/dist/assets/{SettingsSso-Bi3OpykL.js → SettingsSso-DOC-P2wt.js} +14 -1
- package/dist/assets/{SettingsUsageAndPlan-C5TbwZhP.js → SettingsUsageAndPlan-DVOLlEkG.js} +1 -1
- package/dist/assets/{SettingsUsersView-BHuP5k0A.js → SettingsUsersView-CN_KLeIm.js} +1 -1
- package/dist/assets/{SettingsView-DPIIqaKN.js → SettingsView-DiAhLyco.js} +1 -1
- package/dist/assets/{SetupView-C4V9j6sh.js → SetupView-OE_yCNOU.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-BZ9ILQUp.js → SetupWorkflowCredentialsButton-Dx1IkZgW.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-3uV3zSU2.js → SetupWorkflowFromTemplateView-lQXKgIuL.js} +3 -3
- package/dist/assets/{SigninView-DWZHdCjG.js → SigninView-BWSrzbF7.js} +3 -3
- package/dist/assets/{SignoutView-DbduXAir.js → SignoutView-DxGgFxt2.js} +1 -1
- package/dist/assets/{SignupView-DWq6VACk.js → SignupView-Dtu5bMqF.js} +3 -3
- package/dist/assets/{TemplateDetails-BckqE6GK.js → TemplateDetails-CQ7TYqsP.js} +1 -1
- package/dist/assets/{TemplateList-Bw0JeBMP.js → TemplateList-Cxmv-0p-.js} +1 -1
- package/dist/assets/{TemplatesCollectionView-CAKT-mpV.js → TemplatesCollectionView-xvV6FXib.js} +5 -5
- package/dist/assets/{TemplatesSearchView-I2a5us58.js → TemplatesSearchView-CsECyZ52.js} +3 -3
- package/dist/assets/{TemplatesView-6EwGFFJK.js → TemplatesView-DrEKpZTU.js} +1 -1
- package/dist/assets/{TemplatesWorkflowView-C8xYMhwu.js → TemplatesWorkflowView-iSAL_yol.js} +5 -5
- package/dist/assets/{TestDefinitionEditView-CNd3Cuzq.js → TestDefinitionEditView-C3ohfu_r.js} +6 -7
- package/dist/assets/{TestDefinitionListView-BwTWIaAM.js → TestDefinitionListView-Dwto0jxH.js} +1 -1
- package/dist/assets/{TestDefinitionNewView-BQas0_G1.js → TestDefinitionNewView-9xVUm2ZJ.js} +2 -2
- package/dist/assets/{TestDefinitionRootView-D971MFye.js → TestDefinitionRootView-DLurQ4xl.js} +1 -1
- package/dist/assets/{VariablesView-DcBBuFxh.js → VariablesView-Cg2WSt_e.js} +4 -3
- package/dist/assets/{WorkerView-DSgBNIeb.js → WorkerView-BG-Dl0Ej.js} +6 -6
- package/dist/assets/{WorkflowActivator-DAyH7N29.css → WorkflowActivator-DrMTmuTZ.css} +2 -2
- package/dist/assets/{WorkflowActivator-CPCbgb_n.js → WorkflowActivator-e7wvW1kJ.js} +17 -11
- package/dist/assets/{WorkflowExecutionsInfoAccordion-Bc6vzAZu.js → WorkflowExecutionsInfoAccordion-CijtfO0l.js} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-BPPS4V9i.js → WorkflowExecutionsLandingPage-Do4y1yOx.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-Bbb5MB8Z.js → WorkflowExecutionsPreview-Bqo_3PXl.js} +6 -6
- package/dist/assets/{WorkflowExecutionsView-Pz-7iHJY.js → WorkflowExecutionsView-C1gS45nc.js} +10 -10
- package/dist/assets/{WorkflowHistory-Czo9IuI6.js → WorkflowHistory-CypQw7rC.js} +37 -19
- package/dist/assets/{WorkflowOnboardingView-B8DdkfJ5.js → WorkflowOnboardingView-DoKXpaNj.js} +1 -1
- package/dist/assets/{WorkflowPreview-eVlO1itk.js → WorkflowPreview-Bxs5XzBX.js} +1 -1
- package/dist/assets/{WorkflowsView-Cr2D0vym.js → WorkflowsView-BlvgD3xI.js} +299 -157
- package/dist/assets/{WorkflowsView-B2_HJCJ5.css → WorkflowsView-CQvTAWQ0.css} +24 -13
- package/dist/assets/{chartjs.utils-Dk1WO3Mr.js → chartjs.utils-CuWcgqCr.js} +2 -2
- package/dist/assets/{dateFormatter-C8N5khiG.js → dateFormatter-LbucaaRt.js} +1 -1
- package/dist/assets/{easyAiWorkflowUtils-CLqHnasO.js → easyAiWorkflowUtils-_kvYb5hw.js} +1 -1
- package/dist/assets/{global-link-actions-BvoZh8u9.js → global-link-actions-DG0SjhQE.js} +1 -1
- package/dist/assets/{import-curl-BpxkGYMX.js → import-curl-DQ6uPzZ1.js} +1 -1
- package/dist/assets/{index-DCpy4nCU.css → index-BA8d2DN9.css} +311 -515
- package/dist/assets/{index-B6eunbxp.js → index-hdsPF3tl.js} +61611 -57550
- package/dist/assets/{index-Br8T1Gn6.js → index-vIybYvt3.js} +1 -1
- package/dist/assets/{pickBy-8Urz9lDY.js → pickBy-DmKUpB7M.js} +1 -1
- package/dist/assets/{polyfills-CLZ4X0Ad.js → polyfills-J2x06Gdp.js} +157 -224
- package/dist/assets/{templateActions-DzjysjbQ.js → templateActions-DxoxchKp.js} +1 -1
- package/dist/assets/{typescript.worker-BsxN2afA.js → typescript.worker-B1loTpxy.js} +1 -1
- package/dist/assets/{useBeforeUnload-DxrN8vOO.js → useBeforeUnload-B7JAQiE8.js} +1 -1
- package/dist/assets/{useCanvasMapping-cuXLM-h-.css → useCanvasMapping-CFf4cwnq.css} +6 -5
- package/dist/assets/{useCanvasMapping-C2BQB9QB.js → useCanvasMapping-CvcOHj5p.js} +94 -50
- package/dist/assets/{useClearExecutionButtonVisible-BV-jMf2m.js → useClearExecutionButtonVisible-DFNEJves.js} +1 -2
- package/dist/assets/{useExecutionDebugging-0pPCimcw.js → useExecutionDebugging-DsRIfE0y.js} +1 -1
- package/dist/assets/{useExecutionHelpers-DIvhViMz.js → useExecutionHelpers-CEOL8_vt.js} +3 -3
- package/dist/assets/{useImportCurlCommand-BWf4R83s.js → useImportCurlCommand-DdIN4YaF.js} +2 -2
- package/dist/assets/useProjectPages-OGc-GAxb.js +17 -0
- package/dist/assets/{usePushConnection-Pobjq0U9.js → usePushConnection-DNGIaS0A.js} +29 -127
- package/dist/assets/{useTestDefinitionForm-BA3IS_2B.js → useTestDefinitionForm-Bi6EgFVm.js} +1 -1
- package/dist/assets/{useWorkflowActivate-DFqvrpj6.js → useWorkflowActivate-CJ1hLmv2.js} +1 -1
- package/dist/assets/{useWorkflowSaving-BACesUoL.js → useWorkflowSaving-BuokdhTC.js} +2 -2
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/tsconfig.json +1 -0
- package/vite.config.mts +4 -0
- package/dist/assets/CollectionParameter-BeCTpZ-q.js +0 -4
- package/dist/assets/InsightsSummary-gldDQ9rg.js +0 -207
- package/dist/assets/useCanvasOperations-DaP5jKbH.js +0 -3183
|
@@ -1,62 +1,71 @@
|
|
|
1
|
-
import { d as defineComponent, R as useRoute, r as ref, q as computed, V as VIEWS, c as useI18n, X as watch, h as resolveComponent, e as createBlock, g as openBlock, i as createElementBlock, n as normalizeClass, x as renderSlot, j as createVNode, m as unref,
|
|
1
|
+
import { d as defineComponent, R as useRoute, r as ref, q as computed, V as VIEWS, c as useI18n, X as watch, h as resolveComponent, e as createBlock, g as openBlock, i as createElementBlock, n as normalizeClass, x as renderSlot, j as createVNode, m as unref, fL as N8nActionToggle, w as withCtx, aT as _sfc_main$3, _ as _export_sfc, b as useRouter, a1 as useProjectsStore, a0 as useSourceControlStore, p as useSettingsStore, ab as ProjectTypes, a7 as getResourcePermissions, k as createBaseVNode, f as createCommentVNode, dP as ProjectIcon, l as createTextVNode, t as toDisplayString, bh as N8nButton, b8 as mergeProps, aR as N8nTooltip } from "./index-hdsPF3tl.js";
|
|
2
|
+
import { u as useProjectPages } from "./useProjectPages-OGc-GAxb.js";
|
|
2
3
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3
4
|
__name: "ProjectTabs",
|
|
4
5
|
props: {
|
|
5
|
-
showSettings: { type: Boolean }
|
|
6
|
+
showSettings: { type: Boolean, default: false },
|
|
7
|
+
showExecutions: { type: Boolean, default: true },
|
|
8
|
+
pageType: { default: "project" }
|
|
6
9
|
},
|
|
7
10
|
setup(__props) {
|
|
8
11
|
const props = __props;
|
|
9
12
|
const locale = useI18n();
|
|
10
13
|
const route = useRoute();
|
|
11
14
|
const selectedTab = ref("");
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
name: VIEWS.
|
|
36
|
-
|
|
15
|
+
const projectId = computed(() => {
|
|
16
|
+
return Array.isArray(route?.params?.projectId) ? route.params.projectId[0] : route?.params?.projectId;
|
|
17
|
+
});
|
|
18
|
+
const getRouteConfigs = () => {
|
|
19
|
+
if (projectId.value) {
|
|
20
|
+
return {
|
|
21
|
+
workflows: {
|
|
22
|
+
name: VIEWS.PROJECTS_WORKFLOWS,
|
|
23
|
+
params: { projectId: projectId.value }
|
|
24
|
+
},
|
|
25
|
+
credentials: {
|
|
26
|
+
name: VIEWS.PROJECTS_CREDENTIALS,
|
|
27
|
+
params: { projectId: projectId.value }
|
|
28
|
+
},
|
|
29
|
+
executions: {
|
|
30
|
+
name: VIEWS.PROJECTS_EXECUTIONS,
|
|
31
|
+
params: { projectId: projectId.value }
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (props.pageType === "shared") {
|
|
36
|
+
return {
|
|
37
|
+
workflows: { name: VIEWS.SHARED_WORKFLOWS },
|
|
38
|
+
credentials: { name: VIEWS.SHARED_CREDENTIALS },
|
|
39
|
+
executions: { name: VIEWS.NOT_FOUND }
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
workflows: { name: VIEWS.WORKFLOWS },
|
|
44
|
+
credentials: { name: VIEWS.CREDENTIALS },
|
|
45
|
+
executions: { name: VIEWS.EXECUTIONS }
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const createTab = (label, routeKey, routes) => {
|
|
49
|
+
return {
|
|
50
|
+
label: locale.baseText(label),
|
|
51
|
+
value: routes[routeKey].name,
|
|
52
|
+
to: routes[routeKey]
|
|
37
53
|
};
|
|
54
|
+
};
|
|
55
|
+
const options = computed(() => {
|
|
56
|
+
const routes = getRouteConfigs();
|
|
38
57
|
const tabs = [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
value: to.workflows.name,
|
|
42
|
-
to: to.workflows
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: locale.baseText("mainSidebar.credentials"),
|
|
46
|
-
value: to.credentials.name,
|
|
47
|
-
to: to.credentials
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: locale.baseText("mainSidebar.executions"),
|
|
51
|
-
value: to.executions.name,
|
|
52
|
-
to: to.executions
|
|
53
|
-
}
|
|
58
|
+
createTab("mainSidebar.workflows", "workflows", routes),
|
|
59
|
+
createTab("mainSidebar.credentials", "credentials", routes)
|
|
54
60
|
];
|
|
61
|
+
if (props.showExecutions) {
|
|
62
|
+
tabs.push(createTab("mainSidebar.executions", "executions", routes));
|
|
63
|
+
}
|
|
55
64
|
if (props.showSettings) {
|
|
56
65
|
tabs.push({
|
|
57
66
|
label: locale.baseText("projects.settings"),
|
|
58
67
|
value: VIEWS.PROJECT_SETTINGS,
|
|
59
|
-
to: { name: VIEWS.PROJECT_SETTINGS, params: { projectId } }
|
|
68
|
+
to: { name: VIEWS.PROJECT_SETTINGS, params: { projectId: projectId.value } }
|
|
60
69
|
});
|
|
61
70
|
}
|
|
62
71
|
return tabs;
|
|
@@ -64,7 +73,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
64
73
|
watch(
|
|
65
74
|
() => route?.name,
|
|
66
75
|
() => {
|
|
67
|
-
selectedTab.value = route?.name;
|
|
68
76
|
selectedTab.value = route.name === VIEWS.PROJECTS_FOLDERS ? VIEWS.PROJECTS_WORKFLOWS : route.name;
|
|
69
77
|
},
|
|
70
78
|
{ immediate: true }
|
|
@@ -132,16 +140,6 @@ const cssModules$1 = {
|
|
|
132
140
|
"$style": style0$1
|
|
133
141
|
};
|
|
134
142
|
const ProjectCreateResource = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
|
|
135
|
-
const useOverview = () => {
|
|
136
|
-
const route = useRoute();
|
|
137
|
-
const isOverviewSubPage = computed(
|
|
138
|
-
() => route.name === VIEWS.WORKFLOWS || route.name === VIEWS.HOMEPAGE || route.name === VIEWS.CREDENTIALS || route.name === VIEWS.EXECUTIONS || route.name === VIEWS.FOLDERS
|
|
139
|
-
);
|
|
140
|
-
return reactive({
|
|
141
|
-
isOverviewSubPage
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
const _hoisted_1 = { key: 0 };
|
|
145
143
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
146
144
|
__name: "ProjectHeader",
|
|
147
145
|
emits: ["createFolder"],
|
|
@@ -152,7 +150,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
152
150
|
const projectsStore = useProjectsStore();
|
|
153
151
|
const sourceControlStore = useSourceControlStore();
|
|
154
152
|
const settingsStore = useSettingsStore();
|
|
155
|
-
const
|
|
153
|
+
const projectPages = useProjectPages();
|
|
156
154
|
const emit = __emit;
|
|
157
155
|
const headerIcon = computed(() => {
|
|
158
156
|
if (projectsStore.currentProject?.type === ProjectTypes.Personal) {
|
|
@@ -165,7 +163,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
165
163
|
});
|
|
166
164
|
const projectName = computed(() => {
|
|
167
165
|
if (!projectsStore.currentProject) {
|
|
168
|
-
|
|
166
|
+
if (projectPages.isOverviewSubPage) {
|
|
167
|
+
return i18n.baseText("projects.menu.overview");
|
|
168
|
+
} else if (projectPages.isSharedSubPage) {
|
|
169
|
+
return i18n.baseText("projects.header.shared.title");
|
|
170
|
+
}
|
|
171
|
+
return null;
|
|
169
172
|
} else if (projectsStore.currentProject.type === ProjectTypes.Personal) {
|
|
170
173
|
return i18n.baseText("projects.menu.personal");
|
|
171
174
|
} else {
|
|
@@ -179,6 +182,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
179
182
|
() => !!route?.params?.projectId && !!projectPermissions.value.update && projectsStore.currentProject?.type === ProjectTypes.Team
|
|
180
183
|
);
|
|
181
184
|
const homeProject = computed(() => projectsStore.currentProject ?? projectsStore.personalProject);
|
|
185
|
+
const isPersonalProject = computed(() => {
|
|
186
|
+
return homeProject.value?.type === ProjectTypes.Personal;
|
|
187
|
+
});
|
|
182
188
|
const showFolders = computed(() => {
|
|
183
189
|
return settingsStore.isFoldersFeatureEnabled && [VIEWS.PROJECTS_WORKFLOWS, VIEWS.PROJECTS_FOLDERS].includes(route.name);
|
|
184
190
|
});
|
|
@@ -211,6 +217,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
211
217
|
}
|
|
212
218
|
return items;
|
|
213
219
|
});
|
|
220
|
+
const showProjectIcon = computed(() => {
|
|
221
|
+
return !projectPages.isOverviewSubPage && !projectPages.isSharedSubPage && !isPersonalProject.value;
|
|
222
|
+
});
|
|
214
223
|
const actions2 = {
|
|
215
224
|
[ACTION_TYPES.WORKFLOW]: (projectId) => {
|
|
216
225
|
void router.push({
|
|
@@ -234,6 +243,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
234
243
|
emit("createFolder");
|
|
235
244
|
}
|
|
236
245
|
};
|
|
246
|
+
const pageType = computed(() => {
|
|
247
|
+
if (projectPages.isOverviewSubPage) {
|
|
248
|
+
return "overview";
|
|
249
|
+
} else if (projectPages.isSharedSubPage) {
|
|
250
|
+
return "shared";
|
|
251
|
+
} else {
|
|
252
|
+
return "project";
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
const subtitle = computed(() => {
|
|
256
|
+
if (projectPages.isOverviewSubPage) {
|
|
257
|
+
return i18n.baseText("projects.header.overview.subtitle");
|
|
258
|
+
} else if (projectPages.isSharedSubPage) {
|
|
259
|
+
return i18n.baseText("projects.header.shared.subtitle");
|
|
260
|
+
} else if (isPersonalProject.value) {
|
|
261
|
+
return i18n.baseText("projects.header.personal.subtitle");
|
|
262
|
+
}
|
|
263
|
+
return null;
|
|
264
|
+
});
|
|
237
265
|
const onSelect = (action) => {
|
|
238
266
|
const executableAction = actions2[action];
|
|
239
267
|
if (!homeProject.value) {
|
|
@@ -251,7 +279,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
251
279
|
createBaseVNode("div", {
|
|
252
280
|
class: normalizeClass(_ctx.$style.projectDetails)
|
|
253
281
|
}, [
|
|
254
|
-
|
|
282
|
+
showProjectIcon.value ? (openBlock(), createBlock(ProjectIcon, {
|
|
255
283
|
key: 0,
|
|
256
284
|
icon: headerIcon.value,
|
|
257
285
|
"border-less": true,
|
|
@@ -260,20 +288,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
260
288
|
createBaseVNode("div", {
|
|
261
289
|
class: normalizeClass(_ctx.$style.headerActions)
|
|
262
290
|
}, [
|
|
263
|
-
|
|
291
|
+
projectName.value ? (openBlock(), createBlock(_component_N8nHeading, {
|
|
292
|
+
key: 0,
|
|
264
293
|
bold: "",
|
|
265
294
|
tag: "h2",
|
|
266
|
-
size: "xlarge"
|
|
295
|
+
size: "xlarge",
|
|
296
|
+
"data-test-id": "project-name"
|
|
267
297
|
}, {
|
|
268
298
|
default: withCtx(() => [
|
|
269
299
|
createTextVNode(toDisplayString(projectName.value), 1)
|
|
270
300
|
]),
|
|
271
301
|
_: 1
|
|
272
|
-
}),
|
|
302
|
+
})) : createCommentVNode("", true),
|
|
273
303
|
createVNode(_component_N8nText, { color: "text-light" }, {
|
|
274
304
|
default: withCtx(() => [
|
|
275
305
|
renderSlot(_ctx.$slots, "subtitle", {}, () => [
|
|
276
|
-
|
|
306
|
+
subtitle.value ? (openBlock(), createBlock(_component_N8nText, {
|
|
307
|
+
key: 0,
|
|
308
|
+
color: "text-light",
|
|
309
|
+
"data-test-id": "project-subtitle"
|
|
310
|
+
}, {
|
|
311
|
+
default: withCtx(() => [
|
|
312
|
+
createTextVNode(toDisplayString(subtitle.value), 1)
|
|
313
|
+
]),
|
|
314
|
+
_: 1
|
|
315
|
+
})) : createCommentVNode("", true)
|
|
277
316
|
])
|
|
278
317
|
]),
|
|
279
318
|
_: 3
|
|
@@ -311,7 +350,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
311
350
|
createBaseVNode("div", {
|
|
312
351
|
class: normalizeClass(_ctx.$style.actions)
|
|
313
352
|
}, [
|
|
314
|
-
createVNode(_sfc_main$2, {
|
|
353
|
+
createVNode(_sfc_main$2, {
|
|
354
|
+
"page-type": pageType.value,
|
|
355
|
+
"show-executions": !unref(projectPages).isSharedSubPage,
|
|
356
|
+
"show-settings": showSettings.value
|
|
357
|
+
}, null, 8, ["page-type", "show-executions", "show-settings"])
|
|
315
358
|
], 2)
|
|
316
359
|
]);
|
|
317
360
|
};
|
|
@@ -334,6 +377,5 @@ const cssModules = {
|
|
|
334
377
|
};
|
|
335
378
|
const ProjectHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
336
379
|
export {
|
|
337
|
-
ProjectHeader as P
|
|
338
|
-
useOverview as u
|
|
380
|
+
ProjectHeader as P
|
|
339
381
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { d as defineComponent,
|
|
2
|
-
import { P as ProjectHeader } from "./ProjectHeader-
|
|
1
|
+
import { d as defineComponent, f3 as mergeModels, f4 as useModel, r as ref, q as computed, c as useI18n, h as resolveComponent, e as createBlock, g as openBlock, w as withCtx, j as createVNode, k as createBaseVNode, l as createTextVNode, t as toDisplayString, m as unref, i as createElementBlock, f as createCommentVNode, n as normalizeClass, fq as ProjectSharing, b3 as withModifiers, _ as _export_sfc, a6 as usePageRedirectionHelper, u as useUsersStore, a1 as useProjectsStore, gg as useRolesStore, aI as useCloudPlanStore, a as useToast, b as useRouter, a4 as useDocumentTitle, gh as getAllIconNames, X as watch, az as onBeforeMount, o as onMounted, dp as N8nFormInput, F as Fragment, D as renderList, ct as deepCopy, V as VIEWS, ag as useTelemetry, z as nextTick } from "./index-hdsPF3tl.js";
|
|
2
|
+
import { P as ProjectHeader } from "./ProjectHeader-CpoOisjf.js";
|
|
3
|
+
import "./useProjectPages-OGc-GAxb.js";
|
|
3
4
|
const _hoisted_1$2 = { class: "pt-l" };
|
|
4
5
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "ProjectDeleteDialog",
|
|
@@ -451,6 +452,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
451
452
|
},
|
|
452
453
|
{ immediate: true }
|
|
453
454
|
);
|
|
455
|
+
const relationUsers = computed(
|
|
456
|
+
() => formData.value.relations.map((relation) => {
|
|
457
|
+
const user = usersStore.usersById[relation.id];
|
|
458
|
+
if (!user) return relation;
|
|
459
|
+
return {
|
|
460
|
+
...user,
|
|
461
|
+
...relation
|
|
462
|
+
};
|
|
463
|
+
})
|
|
464
|
+
);
|
|
454
465
|
onBeforeMount(async () => {
|
|
455
466
|
await usersStore.fetchUsers();
|
|
456
467
|
});
|
|
@@ -527,7 +538,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
527
538
|
}, 8, ["users", "current-user-id", "placeholder"]),
|
|
528
539
|
createVNode(_component_N8nUsersList, {
|
|
529
540
|
actions: [],
|
|
530
|
-
users:
|
|
541
|
+
users: relationUsers.value,
|
|
531
542
|
"current-user-id": unref(usersStore).currentUser?.id,
|
|
532
543
|
"delete-label": unref(i18n).baseText("workflows.shareModal.list.delete")
|
|
533
544
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineComponent, P as usePushConnectionStore, q as computed, h as resolveComponent,
|
|
1
|
+
import { d as defineComponent, P as usePushConnectionStore, q as computed, h as resolveComponent, cu as resolveDirective, i as createElementBlock, g as openBlock, x as renderSlot, j as createVNode, w as withCtx, k as createBaseVNode, l as createTextVNode, t as toDisplayString, m as unref, c as useI18n, aA as withDirectives } from "./index-hdsPF3tl.js";
|
|
2
2
|
const _hoisted_1 = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "push-connection-lost primary-color"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { _ as _export_sfc, i as createElementBlock, g as openBlock, x as renderSlot, k as createBaseVNode, n as normalizeClass, d as defineComponent, f as createCommentVNode, a1 as useProjectsStore, q as computed, X as watch, az as onBeforeMount, h as resolveComponent, e as createBlock, w as withCtx, m as unref, aa as EnterpriseEditionFeature, j as createVNode, c as useI18n,
|
|
1
|
+
import { _ as _export_sfc, i as createElementBlock, g as openBlock, x as renderSlot, k as createBaseVNode, n as normalizeClass, d as defineComponent, f as createCommentVNode, a1 as useProjectsStore, q as computed, X as watch, az as onBeforeMount, h as resolveComponent, e as createBlock, w as withCtx, m as unref, aa as EnterpriseEditionFeature, j as createVNode, c as useI18n, fq as ProjectSharing, l as createTextVNode, t as toDisplayString, av as useLocalStorage, fr as LOCAL_STORAGE_WORKFLOW_LIST_PREFERENCES_KEY, R as useRoute, b as useRouter, G as useDebounce, u as useUsersStore, r as ref, eF as useSlots, fs as isSharedResource, ft as isResourceSortableByDate, o as onMounted, z as nextTick, y as onBeforeUnmount, F as Fragment, D as renderList, aA as withDirectives, b5 as normalizeProps, b6 as guardReactiveProps, aB as vShow, ag as useTelemetry } from "./index-hdsPF3tl.js";
|
|
2
|
+
import { u as useProjectPages } from "./useProjectPages-OGc-GAxb.js";
|
|
2
3
|
const wrapper$1 = "_wrapper_1x8n3_123";
|
|
3
4
|
const content = "_content_1x8n3_139";
|
|
4
5
|
const style0$3 = {
|
|
@@ -242,6 +243,46 @@ const cssModules$1 = {
|
|
|
242
243
|
"$style": style0$1
|
|
243
244
|
};
|
|
244
245
|
const ResourceFiltersDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
|
|
246
|
+
function useN8nLocalStorage() {
|
|
247
|
+
const projectPages = useProjectPages();
|
|
248
|
+
const getProjectKey = (projectId) => {
|
|
249
|
+
return projectPages.isOverviewSubPage ? "home" : projectId;
|
|
250
|
+
};
|
|
251
|
+
const saveProjectPreferencesToLocalStorage = (projectId, tabKey, preferences) => {
|
|
252
|
+
const projectKey = getProjectKey(projectId);
|
|
253
|
+
if (!projectKey) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const localStorage = useLocalStorage(
|
|
257
|
+
LOCAL_STORAGE_WORKFLOW_LIST_PREFERENCES_KEY,
|
|
258
|
+
{}
|
|
259
|
+
);
|
|
260
|
+
if (!localStorage.value[projectKey]) {
|
|
261
|
+
localStorage.value[projectKey] = {};
|
|
262
|
+
}
|
|
263
|
+
localStorage.value[projectKey][tabKey] = {
|
|
264
|
+
...localStorage.value[projectKey][tabKey],
|
|
265
|
+
...preferences
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
const loadProjectPreferencesFromLocalStorage = (projectId, tabKey) => {
|
|
269
|
+
const projectKey = getProjectKey(projectId);
|
|
270
|
+
if (!projectKey) {
|
|
271
|
+
return {};
|
|
272
|
+
}
|
|
273
|
+
const localStorage = useLocalStorage(
|
|
274
|
+
LOCAL_STORAGE_WORKFLOW_LIST_PREFERENCES_KEY,
|
|
275
|
+
{}
|
|
276
|
+
);
|
|
277
|
+
const projectPreferences = localStorage.value[projectKey]?.[tabKey] || {};
|
|
278
|
+
return projectPreferences;
|
|
279
|
+
};
|
|
280
|
+
return {
|
|
281
|
+
saveProjectPreferencesToLocalStorage,
|
|
282
|
+
loadProjectPreferencesFromLocalStorage,
|
|
283
|
+
getProjectKey
|
|
284
|
+
};
|
|
285
|
+
}
|
|
245
286
|
const _hoisted_1 = {
|
|
246
287
|
key: 0,
|
|
247
288
|
class: "resource-list-loading"
|
|
@@ -249,7 +290,8 @@ const _hoisted_1 = {
|
|
|
249
290
|
const _hoisted_2 = { key: 0 };
|
|
250
291
|
const _hoisted_3 = {
|
|
251
292
|
key: 0,
|
|
252
|
-
class: "mt-xs"
|
|
293
|
+
class: "mt-xs",
|
|
294
|
+
"data-test-id": "resources-list-filters-applied-info"
|
|
253
295
|
};
|
|
254
296
|
const _hoisted_4 = {
|
|
255
297
|
key: 0,
|
|
@@ -280,7 +322,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
280
322
|
dontPerformSortingAndFiltering: { type: Boolean, default: false },
|
|
281
323
|
hasEmptyState: { type: Boolean, default: true }
|
|
282
324
|
},
|
|
283
|
-
emits: ["update:filters", "click:add", "update:
|
|
325
|
+
emits: ["update:filters", "click:add", "update:pagination-and-sort", "update:search"],
|
|
284
326
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
285
327
|
const route = useRoute();
|
|
286
328
|
const router = useRouter();
|
|
@@ -288,6 +330,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
288
330
|
const { callDebounced } = useDebounce();
|
|
289
331
|
const usersStore = useUsersStore();
|
|
290
332
|
const telemetry = useTelemetry();
|
|
333
|
+
const n8nLocalStorage = useN8nLocalStorage();
|
|
291
334
|
const props = __props;
|
|
292
335
|
const sortBy = ref(props.sortOptions[0]);
|
|
293
336
|
const hasFilters = ref(false);
|
|
@@ -295,6 +338,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
295
338
|
const rowsPerPage = ref(props.customPageSize);
|
|
296
339
|
const resettingFilters = ref(false);
|
|
297
340
|
const search2 = ref(null);
|
|
341
|
+
const preferredPageSize = ref(props.customPageSize);
|
|
342
|
+
const preferredSort = ref(props.sortOptions[0]);
|
|
298
343
|
const emit = __emit;
|
|
299
344
|
useSlots();
|
|
300
345
|
const filtersModel = computed({
|
|
@@ -391,21 +436,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
391
436
|
sendFiltersTelemetry("incomplete");
|
|
392
437
|
}
|
|
393
438
|
);
|
|
394
|
-
watch(
|
|
395
|
-
()
|
|
396
|
-
(
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
);
|
|
401
|
-
watch(
|
|
402
|
-
() => route?.params?.projectId,
|
|
403
|
-
async () => {
|
|
404
|
-
await resetFilters();
|
|
405
|
-
}
|
|
406
|
-
);
|
|
439
|
+
watch([() => route.params?.projectId, () => route.name], async () => {
|
|
440
|
+
await resetFilters();
|
|
441
|
+
await loadPaginationPreferences();
|
|
442
|
+
await props.initialize();
|
|
443
|
+
});
|
|
407
444
|
onMounted(async () => {
|
|
408
|
-
await
|
|
445
|
+
await loadPaginationPreferences();
|
|
409
446
|
await props.initialize();
|
|
410
447
|
await nextTick();
|
|
411
448
|
if (hasAppliedFilters()) {
|
|
@@ -427,32 +464,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
427
464
|
search2.value.focus();
|
|
428
465
|
}
|
|
429
466
|
};
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
467
|
+
const isFilterApplied = (key) => {
|
|
468
|
+
if (key === "search") return false;
|
|
469
|
+
if (typeof props.filters[key] === "boolean") {
|
|
470
|
+
return props.filters[key];
|
|
471
|
+
}
|
|
472
|
+
if (Array.isArray(props.filters[key])) {
|
|
473
|
+
return props.filters[key].length > 0;
|
|
474
|
+
}
|
|
475
|
+
return props.filters[key] !== "";
|
|
476
|
+
};
|
|
477
|
+
const hasOnlyFiltersThatShowMoreResults = computed(() => {
|
|
478
|
+
const activeFilters = filterKeys.value.filter(isFilterApplied);
|
|
479
|
+
const filtersThatShowMoreResults = ["showArchived"];
|
|
480
|
+
return activeFilters.every((filter) => {
|
|
481
|
+
return filtersThatShowMoreResults.includes(filter);
|
|
440
482
|
});
|
|
483
|
+
});
|
|
484
|
+
const hasAppliedFilters = () => {
|
|
485
|
+
return !!filterKeys.value.find(isFilterApplied);
|
|
441
486
|
};
|
|
442
487
|
const setRowsPerPage = async (numberOfRowsPerPage) => {
|
|
443
488
|
rowsPerPage.value = numberOfRowsPerPage;
|
|
444
|
-
await
|
|
445
|
-
emit("update:
|
|
489
|
+
await savePaginationPreferences();
|
|
490
|
+
emit("update:pagination-and-sort", {
|
|
491
|
+
pageSize: numberOfRowsPerPage
|
|
492
|
+
});
|
|
446
493
|
};
|
|
447
|
-
const
|
|
494
|
+
const setSorting = async (sort, persistUpdate = true) => {
|
|
495
|
+
sortBy.value = sort;
|
|
496
|
+
if (persistUpdate) {
|
|
497
|
+
await savePaginationPreferences();
|
|
498
|
+
}
|
|
499
|
+
emit("update:pagination-and-sort", {
|
|
500
|
+
sort
|
|
501
|
+
});
|
|
502
|
+
sendSortingTelemetry();
|
|
503
|
+
};
|
|
504
|
+
const setCurrentPage = async (page, persistUpdate = true) => {
|
|
448
505
|
currentPage.value = page;
|
|
449
|
-
|
|
450
|
-
|
|
506
|
+
if (persistUpdate) {
|
|
507
|
+
await savePaginationPreferences();
|
|
508
|
+
}
|
|
509
|
+
emit("update:pagination-and-sort", {
|
|
510
|
+
page
|
|
511
|
+
});
|
|
451
512
|
};
|
|
452
|
-
__expose({
|
|
453
|
-
currentPage,
|
|
454
|
-
setCurrentPage
|
|
455
|
-
});
|
|
456
513
|
const sendFiltersTelemetry = (source) => {
|
|
457
514
|
if (resettingFilters.value) {
|
|
458
515
|
if (source !== "reset") {
|
|
@@ -486,7 +543,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
486
543
|
Object.keys(filtersModel.value).forEach((key) => {
|
|
487
544
|
filtersModel.value[key] = Array.isArray(filtersModel.value[key]) ? [] : "";
|
|
488
545
|
});
|
|
489
|
-
await setCurrentPage(1);
|
|
546
|
+
await setCurrentPage(1, false);
|
|
490
547
|
resettingFilters.value = true;
|
|
491
548
|
hasFilters.value = false;
|
|
492
549
|
sendFiltersTelemetry("reset");
|
|
@@ -521,7 +578,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
521
578
|
(prev, curr) => Math.abs(curr - size) < Math.abs(prev - size) ? curr : prev
|
|
522
579
|
);
|
|
523
580
|
};
|
|
524
|
-
const
|
|
581
|
+
const savePaginationPreferences = async () => {
|
|
525
582
|
if (props.type !== "list-paginated") {
|
|
526
583
|
return;
|
|
527
584
|
}
|
|
@@ -531,31 +588,75 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
531
588
|
} else {
|
|
532
589
|
delete currentQuery.page;
|
|
533
590
|
}
|
|
534
|
-
if (rowsPerPage.value !==
|
|
591
|
+
if (rowsPerPage.value !== preferredPageSize.value) {
|
|
535
592
|
currentQuery.pageSize = rowsPerPage.value.toString();
|
|
593
|
+
preferredPageSize.value = rowsPerPage.value;
|
|
536
594
|
} else {
|
|
537
595
|
delete currentQuery.pageSize;
|
|
538
596
|
}
|
|
597
|
+
if (sortBy.value !== preferredSort.value) {
|
|
598
|
+
currentQuery.sort = sortBy.value;
|
|
599
|
+
preferredSort.value = sortBy.value;
|
|
600
|
+
} else {
|
|
601
|
+
delete currentQuery.sort;
|
|
602
|
+
}
|
|
603
|
+
n8nLocalStorage.saveProjectPreferencesToLocalStorage(
|
|
604
|
+
route.params.projectId ?? "",
|
|
605
|
+
"workflows",
|
|
606
|
+
{
|
|
607
|
+
sort: sortBy.value,
|
|
608
|
+
pageSize: rowsPerPage.value
|
|
609
|
+
}
|
|
610
|
+
);
|
|
539
611
|
await router.replace({
|
|
540
612
|
query: Object.keys(currentQuery).length ? currentQuery : void 0
|
|
541
613
|
});
|
|
542
614
|
};
|
|
543
|
-
const
|
|
615
|
+
const loadPaginationPreferences = async () => {
|
|
544
616
|
if (props.type !== "list-paginated") {
|
|
545
617
|
return;
|
|
546
618
|
}
|
|
547
|
-
const query =
|
|
619
|
+
const query = route.query;
|
|
620
|
+
const localStorageValues = n8nLocalStorage.loadProjectPreferencesFromLocalStorage(
|
|
621
|
+
route.params.projectId ?? "",
|
|
622
|
+
"workflows"
|
|
623
|
+
);
|
|
624
|
+
const emitPayload = {};
|
|
548
625
|
if (query.page) {
|
|
549
|
-
|
|
626
|
+
const newPage = parseInt(query.page, 10);
|
|
627
|
+
if (newPage > 1) {
|
|
628
|
+
currentPage.value = newPage;
|
|
629
|
+
emitPayload.page = newPage;
|
|
630
|
+
}
|
|
550
631
|
}
|
|
551
|
-
if (query.pageSize) {
|
|
552
|
-
const parsedSize = parseInt(
|
|
553
|
-
|
|
632
|
+
if (query.pageSize ?? localStorageValues.pageSize) {
|
|
633
|
+
const parsedSize = parseInt(
|
|
634
|
+
query.pageSize || String(localStorageValues.pageSize),
|
|
635
|
+
10
|
|
636
|
+
);
|
|
637
|
+
const newPageSize = findNearestPageSize(parsedSize);
|
|
638
|
+
rowsPerPage.value = newPageSize;
|
|
639
|
+
emitPayload.pageSize = newPageSize;
|
|
640
|
+
preferredPageSize.value = newPageSize;
|
|
641
|
+
} else {
|
|
642
|
+
rowsPerPage.value = props.customPageSize;
|
|
643
|
+
emitPayload.pageSize = props.customPageSize;
|
|
554
644
|
}
|
|
555
645
|
if (query.sort) {
|
|
556
|
-
sortBy.value = query.sort;
|
|
646
|
+
sortBy.value = emitPayload.sort = preferredSort.value = query.sort;
|
|
647
|
+
} else if (localStorageValues.sort) {
|
|
648
|
+
await setSorting(localStorageValues.sort, false);
|
|
649
|
+
emitPayload.sort = localStorageValues.sort;
|
|
650
|
+
preferredSort.value = localStorageValues.sort;
|
|
651
|
+
} else {
|
|
652
|
+
sortBy.value = props.sortOptions[0];
|
|
557
653
|
}
|
|
654
|
+
emit("update:pagination-and-sort", emitPayload);
|
|
558
655
|
};
|
|
656
|
+
__expose({
|
|
657
|
+
currentPage,
|
|
658
|
+
setCurrentPage
|
|
659
|
+
});
|
|
559
660
|
return (_ctx, _cache) => {
|
|
560
661
|
const _component_n8n_loading = resolveComponent("n8n-loading");
|
|
561
662
|
const _component_n8n_action_box = resolveComponent("n8n-action-box");
|
|
@@ -635,7 +736,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
635
736
|
modelValue: sortBy.value,
|
|
636
737
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sortBy.value = $event),
|
|
637
738
|
size: "small",
|
|
638
|
-
"data-test-id": "resources-list-sort"
|
|
739
|
+
"data-test-id": "resources-list-sort",
|
|
740
|
+
onChange: _cache[1] || (_cache[1] = ($event) => setSorting(sortBy.value))
|
|
639
741
|
}, {
|
|
640
742
|
default: withCtx(() => [
|
|
641
743
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortOptions, (sortOption) => {
|
|
@@ -676,7 +778,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
676
778
|
_ctx.showFiltersDropdown ? withDirectives((openBlock(), createElementBlock("div", _hoisted_3, [
|
|
677
779
|
createVNode(_component_n8n_info_tip, { bold: false }, {
|
|
678
780
|
default: withCtx(() => [
|
|
679
|
-
createTextVNode(toDisplayString(unref(i18n).baseText(`${_ctx.resourceKey}.filters.active`)) + " ", 1),
|
|
781
|
+
createTextVNode(toDisplayString(hasOnlyFiltersThatShowMoreResults.value ? unref(i18n).baseText(`${_ctx.resourceKey}.filters.active.shortText`) : unref(i18n).baseText(`${_ctx.resourceKey}.filters.active`)) + " ", 1),
|
|
680
782
|
createVNode(_component_n8n_link, {
|
|
681
783
|
"data-test-id": "workflows-filter-reset",
|
|
682
784
|
size: "small",
|
|
@@ -693,7 +795,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
693
795
|
], 512)), [
|
|
694
796
|
[vShow, hasFilters.value]
|
|
695
797
|
]) : createCommentVNode("", true),
|
|
696
|
-
_cache[
|
|
798
|
+
_cache[4] || (_cache[4] = createBaseVNode("div", { class: "pb-xs" }, null, -1))
|
|
697
799
|
]),
|
|
698
800
|
default: withCtx(() => [
|
|
699
801
|
renderSlot(_ctx.$slots, "preamble", {}, void 0, true),
|
|
@@ -724,7 +826,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
724
826
|
_: 3
|
|
725
827
|
}, 8, ["items", "item-size"])) : _ctx.type === "list-paginated" ? (openBlock(), createElementBlock("div", {
|
|
726
828
|
key: 1,
|
|
727
|
-
class: normalizeClass(_ctx.$style.paginatedListWrapper)
|
|
829
|
+
class: normalizeClass(_ctx.$style.paginatedListWrapper),
|
|
830
|
+
"data-test-id": "paginated-list"
|
|
728
831
|
}, [
|
|
729
832
|
createBaseVNode("div", {
|
|
730
833
|
class: normalizeClass(_ctx.$style.listItems)
|
|
@@ -749,11 +852,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
749
852
|
createVNode(_component_el_pagination, {
|
|
750
853
|
"current-page": currentPage.value,
|
|
751
854
|
"onUpdate:currentPage": [
|
|
752
|
-
_cache[
|
|
855
|
+
_cache[2] || (_cache[2] = ($event) => currentPage.value = $event),
|
|
753
856
|
setCurrentPage
|
|
754
857
|
],
|
|
755
858
|
"page-size": rowsPerPage.value,
|
|
756
|
-
"onUpdate:pageSize": _cache[
|
|
859
|
+
"onUpdate:pageSize": _cache[3] || (_cache[3] = ($event) => rowsPerPage.value = $event),
|
|
757
860
|
background: "",
|
|
758
861
|
total: _ctx.totalItems,
|
|
759
862
|
"page-sizes": _ctx.availablePageSizeOptions,
|
|
@@ -823,7 +926,7 @@ const style0 = {
|
|
|
823
926
|
const cssModules = {
|
|
824
927
|
"$style": style0
|
|
825
928
|
};
|
|
826
|
-
const ResourcesListLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-
|
|
929
|
+
const ResourcesListLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-267490a8"]]);
|
|
827
930
|
export {
|
|
828
931
|
ResourcesListLayout as R
|
|
829
932
|
};
|