n8n-editor-ui 1.65.1 → 1.67.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/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-B4V5qQ9q.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DbabN_I2.js} +2 -2
- package/dist/assets/{AuthView-DDTsGVDI.js → AuthView-DmC24d7S.js} +17 -19
- package/dist/assets/{CanvasControls-BrmZza76.js → CanvasControls-BPXQqeeO.js} +1 -1
- package/dist/assets/{ChangePasswordView-Txc3JLbg.js → ChangePasswordView-SC3n2vJc.js} +2 -2
- package/dist/assets/CollectionParameter-Odk28FRT.js +4 -0
- package/dist/assets/{CredentialsView-4YDBK-zY.js → CredentialsView-B3m9CpEC.js} +14 -11
- package/dist/assets/{ErrorView-CeJF1j4H.js → ErrorView-D6M8WlVP.js} +1 -1
- package/dist/assets/{ExecutionsFilter-BecTg03r.css → ExecutionsFilter-DVxRt-Pz.css} +6 -6
- package/dist/assets/{ExecutionsFilter-ODySTrFf.js → ExecutionsFilter-DlZH8tDW.js} +5 -5
- package/dist/assets/{ExecutionsView-Cfc2bklt.js → ExecutionsView-DaHtYmF4.js} +4 -4
- package/dist/assets/{FileSaver.min-2E3H7obf.js → FileSaver.min-DNytcjKT.js} +1 -1
- package/dist/assets/FixedCollectionParameter-CypxYAFK.js +334 -0
- package/dist/assets/{FixedCollectionParameter-fI2wTyfY.css → FixedCollectionParameter-DzOGMEdq.css} +10 -10
- package/dist/assets/{ForgotMyPasswordView-DY9dxNXM.js → ForgotMyPasswordView-BJ6gd5CS.js} +4 -3
- package/dist/assets/{MainHeader-Bc5G9_Uq.css → MainHeader-D56WYRMG.css} +9 -9
- package/dist/assets/{MainHeader-2746Uag0.js → MainHeader-DniXcGMK.js} +92 -98
- package/dist/assets/{MainSidebar-cNW0UJBC.css → MainSidebar-BRYJRpOA.css} +2 -2
- package/dist/assets/{MainSidebar-Deuxu_ZA.js → MainSidebar-NwOfijmV.js} +7 -6
- package/dist/assets/{NodeCreation-C2dcJSCB.js → NodeCreation-Ce1ct2i3.js} +6 -6
- package/dist/assets/{NodeCreator-DFg5sW0J.css → NodeCreator-CvOLgSO_.css} +4 -4
- package/dist/assets/{NodeCreator-DbLN5EpO.js → NodeCreator-DMLTbzAt.js} +38 -25
- package/dist/assets/{NodeViewSwitcher-C7fT1hjp.js → NodeViewSwitcher-B9JUn3eY.js} +448 -332
- package/dist/assets/{NodeViewSwitcher-Np-f2Pkl.css → NodeViewSwitcher-CnP5aYyg.css} +138 -138
- package/dist/assets/{ProjectCardBadge.vue_vue_type_script_setup_true_lang-1r16lWfz.js → ProjectCardBadge-C3QU-WmO.js} +63 -30
- package/dist/assets/ProjectCardBadge-DPUG4BoB.css +20 -0
- package/dist/assets/{ProjectSettings-B-0hlVBb.js → ProjectSettings-BvcEg3hx.js} +35 -6
- package/dist/assets/{ProjectTabs-BLgXz0GM.js → ProjectTabs-Dve3xFj9.js} +1 -1
- package/dist/assets/PushConnectionTracker.vue_vue_type_script_setup_true_lang-DlJOpf7N.js +39 -0
- package/dist/assets/ResourceListHeader-B2sxe6HT.js +66 -0
- package/dist/assets/ResourceListHeader-DgE1VPUF.css +19 -0
- package/dist/assets/ResourcesListLayout-Bc4__nvw.js +692 -0
- package/dist/assets/{ResourcesListLayout-DAvOygN7.css → ResourcesListLayout-Ci-K1bH3.css} +17 -12
- package/dist/assets/{RunDataAi-DWyv1KtV.js → RunDataAi-BKu1beM6.js} +45 -43
- package/dist/assets/{RunDataJson-BkOB7Mi5.js → RunDataJson-ea5u1EeD.js} +12 -12
- package/dist/assets/{RunDataJsonActions-K_wfkbT2.js → RunDataJsonActions-Dflnt8gK.js} +127 -159
- package/dist/assets/{RunDataSearch-CdIFsfvp.js → RunDataSearch-DKNVmEqa.js} +1 -1
- package/dist/assets/{RunDataTable-CSd24Wzt.js → RunDataTable-DISLWxMc.js} +1 -1
- package/dist/assets/{SamlOnboarding-C7jmImZi.js → SamlOnboarding-CPvGRYUg.js} +2 -2
- package/dist/assets/SettingsApiView-BFj9fDL9.js +227 -0
- package/dist/assets/{SettingsCommunityNodesView-QbJKukss.js → SettingsCommunityNodesView-nJFDrtIR.js} +185 -195
- package/dist/assets/{SettingsExternalSecrets-CBL5kSMf.js → SettingsExternalSecrets-0-mj45K-.js} +3 -3
- package/dist/assets/{SettingsLdapView-CHwYGxkx.js → SettingsLdapView-BhBxX72w.js} +3 -3
- package/dist/assets/SettingsLogStreamingView-CmEJrEOv.js +500 -0
- package/dist/assets/{SettingsPersonalView-BfL80wvU.js → SettingsPersonalView-C__lC8Vv.js} +1 -1
- package/dist/assets/{SettingsSourceControl-CrPjF7Tl.js → SettingsSourceControl-CMoS5B5P.js} +3 -3
- package/dist/assets/{SettingsSso-CoM-3Knf.js → SettingsSso-DJfrl1Rl.js} +3 -3
- package/dist/assets/{SettingsUsageAndPlan-BeHnYh3Q.js → SettingsUsageAndPlan-CWQ5uVrG.js} +7 -6
- package/dist/assets/{SettingsUsageAndPlan-C76Ty5yF.css → SettingsUsageAndPlan-vijI-va0.css} +3 -3
- package/dist/assets/{SettingsUsersView-KIj2fh50.js → SettingsUsersView-Cvr6Digb.js} +4 -3
- package/dist/assets/{SettingsView-Chfmh8Oz.js → SettingsView-DtGga45F.js} +2 -30
- package/dist/assets/{SetupView-Cj9NK5oF.js → SetupView-DkJH96By.js} +2 -2
- package/dist/assets/{SetupWorkflowCredentialsButton-1LXFp3M1.js → SetupWorkflowCredentialsButton-C1Jv_-V5.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-nyPe7OpV.js → SetupWorkflowFromTemplateView-WSzVMgC4.js} +3 -3
- package/dist/assets/{SigninView-TCarjEXK.js → SigninView-xej8y-Vu.js} +4 -3
- package/dist/assets/{SignoutView-Delor5Ax.js → SignoutView-Dc8fBBIm.js} +1 -1
- package/dist/assets/{SignupView-DOREfT5l.js → SignupView-CKA28Xc8.js} +4 -3
- package/dist/assets/TemplateDetails-Pi49rFlS.js +179 -0
- package/dist/assets/TemplateList-BncQL783.js +371 -0
- package/dist/assets/{TemplatesCollectionView-DtaG85Jk.js → TemplatesCollectionView-C9PKPo5y.js} +8 -8
- package/dist/assets/{TemplatesSearchView-CqH8oefx.js → TemplatesSearchView-65taIL-M.js} +530 -577
- package/dist/assets/{TemplatesView-B9Lz_EzK.js → TemplatesView-DkP9JWHk.js} +32 -37
- package/dist/assets/{TemplatesWorkflowView-BfqaXGKg.js → TemplatesWorkflowView-B5uc0BtL.js} +5 -5
- package/dist/assets/{VariablesView-CHXdt5-z.css → VariablesView-BPKo50HJ.css} +18 -18
- package/dist/assets/{VariablesView-BH0opxm_.js → VariablesView-DV1-KgmN.js} +6 -4
- package/dist/assets/WorkerView-5P9lg6ew.js +148 -0
- package/dist/assets/WorkerView-Dm0b18Mh.css +22 -0
- package/dist/assets/{WorkflowActivator-u3HKoT5w.css → WorkflowActivator-D8FiI2jP.css} +2 -2
- package/dist/assets/{WorkflowActivator-ByVmTkYU.js → WorkflowActivator-Dc_Un-Af.js} +15 -4
- package/dist/assets/{WorkflowExecutionsInfoAccordion-BqbBanz6.js → WorkflowExecutionsInfoAccordion-BLyC6lr5.js} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-5u6ZDaFD.js → WorkflowExecutionsLandingPage-Dsa6Bgkn.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-BGb9AU3g.js → WorkflowExecutionsPreview-B_X-enUV.js} +5 -5
- package/dist/assets/{WorkflowExecutionsView-KTlGfaLi.js → WorkflowExecutionsView-Bkz3Sig-.js} +5 -5
- package/dist/assets/{WorkflowHistory-DqXCxz1p.js → WorkflowHistory-BiPMooAv.js} +5 -4
- package/dist/assets/{WorkflowOnboardingView-Cx7hbCo8.js → WorkflowOnboardingView-XHuS6lCs.js} +1 -1
- package/dist/assets/{WorkflowPreview-BTF7OmQM.css → WorkflowPreview-Bpiv2_RO.css} +8 -8
- package/dist/assets/{WorkflowPreview-DAQ7mvNi.js → WorkflowPreview-DxZKd23H.js} +8 -8
- package/dist/assets/{WorkflowsView-ChU_EKMN.js → WorkflowsView-BBaLVqJs.js} +14 -12
- package/dist/assets/{dateFormatter-CfOgAO2k.js → dateFormatter-C53K7zEn.js} +1 -1
- package/dist/assets/{index-BUjeBzRM.js → index-7YFQEQmt.js} +36340 -36753
- package/dist/assets/{index-DoeC8czU.css → index-BFH_KxyA.css} +162 -130
- package/dist/assets/{pushConnection.store-BKOlrr3c.js → pushConnection.store-DbprXL-x.js} +1 -1
- package/dist/assets/{templateActions-BTYgtgDN.js → templateActions-QFQD8amJ.js} +1 -1
- package/dist/assets/{useBugReporting-lkBiyjPH.js → useBugReporting-IgwBNdXI.js} +1 -1
- package/dist/assets/{useExecutionDebugging-C91tSyen.js → useExecutionDebugging-CLORI_Ma.js} +5 -4
- package/dist/assets/{useNodeViewVersionSwitcher-D2zGsXPQ.js → useNodeViewVersionSwitcher-CJLQ5lju.js} +2 -2
- package/dist/assets/{usePushConnection-CQXTn-bO.js → usePushConnection-DjPgTuLw.js} +9 -10
- package/dist/assets/{useWorkflowActivate-DbL83lsy.js → useWorkflowActivate-D_gK841h.js} +1 -1
- package/dist/index.html +3 -2
- package/index.html +1 -0
- package/package.json +1 -1
- package/vite.config.mts +1 -17
- package/dist/assets/CollectionParameter-D35RQT1r.js +0 -4
- package/dist/assets/FixedCollectionParameter-D6dq95nm.js +0 -355
- package/dist/assets/PushConnectionTracker-CGjuGy8P.js +0 -38
- package/dist/assets/ResourcesListLayout-D_C1ZSTp.js +0 -765
- package/dist/assets/SettingsApiView-4M-cLSvs.js +0 -255
- package/dist/assets/SettingsFakeDoorView-CEbWEc6P.js +0 -44
- package/dist/assets/SettingsFakeDoorView-DpKZ4qWG.css +0 -14
- package/dist/assets/SettingsLogStreamingView-DZ71hi2g.js +0 -519
- package/dist/assets/TemplateDetails-rjxog6MY.js +0 -199
- package/dist/assets/TemplateList-DYMX_2qI.js +0 -433
- package/dist/assets/WorkerView-BRiI1Adt.js +0 -825
- package/dist/assets/WorkerView-C_d54L0W.css +0 -181
- package/dist/assets/cloud-CGOqFKZO.js +0 -37
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
import { _ as _export_sfc, c as openBlock, h as createElementBlock, q as renderSlot, j as createBaseVNode, n as normalizeClass, d as defineComponent, f as createCommentVNode, r as ref, a1 as useProjectsStore, p as computed, H as watch, ar as onBeforeMount, e as createBlock, w as withCtx, i as createVNode, as as withDirectives, at as vShow, k as createTextVNode, t as toDisplayString, A as unref, a8 as EnterpriseEditionFeature, iL as ProjectSharing, g as useI18n, l as resolveComponent, U as useRoute, J as useDebounce, u as useUsersStore, o as onMounted, x as nextTick, bR as normalizeProps, bt as guardReactiveProps, F as Fragment, z as renderList, dF as ProjectTypes, ak as useTelemetry } from "./index-7YFQEQmt.js";
|
|
2
|
+
import { R as ResourceListHeader } from "./ResourceListHeader-B2sxe6HT.js";
|
|
3
|
+
const wrapper$1 = "_wrapper_179di_1";
|
|
4
|
+
const content = "_content_179di_12";
|
|
5
|
+
const style0$3 = {
|
|
6
|
+
wrapper: wrapper$1,
|
|
7
|
+
content
|
|
8
|
+
};
|
|
9
|
+
const _sfc_main$3 = {};
|
|
10
|
+
function _sfc_render(_ctx, _cache) {
|
|
11
|
+
return openBlock(), createElementBlock("div", {
|
|
12
|
+
class: normalizeClass(_ctx.$style.wrapper)
|
|
13
|
+
}, [
|
|
14
|
+
renderSlot(_ctx.$slots, "header"),
|
|
15
|
+
createBaseVNode("main", {
|
|
16
|
+
class: normalizeClass(_ctx.$style.content)
|
|
17
|
+
}, [
|
|
18
|
+
renderSlot(_ctx.$slots, "default")
|
|
19
|
+
], 2)
|
|
20
|
+
], 2);
|
|
21
|
+
}
|
|
22
|
+
const cssModules$3 = {
|
|
23
|
+
"$style": style0$3
|
|
24
|
+
};
|
|
25
|
+
const PageViewLayout = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render], ["__cssModules", cssModules$3]]);
|
|
26
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
27
|
+
__name: "PageViewLayoutList",
|
|
28
|
+
props: {
|
|
29
|
+
overflow: { type: Boolean, default: false }
|
|
30
|
+
},
|
|
31
|
+
setup(__props) {
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
return openBlock(), createElementBlock("div", {
|
|
34
|
+
class: normalizeClass({ [_ctx.$style.wrapper]: true, [_ctx.$style.overflow]: _ctx.overflow })
|
|
35
|
+
}, [
|
|
36
|
+
createBaseVNode("div", {
|
|
37
|
+
class: normalizeClass(_ctx.$style.list)
|
|
38
|
+
}, [
|
|
39
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: normalizeClass(_ctx.$style.header)
|
|
42
|
+
}, [
|
|
43
|
+
renderSlot(_ctx.$slots, "header")
|
|
44
|
+
], 2)) : createCommentVNode("", true),
|
|
45
|
+
createBaseVNode("div", {
|
|
46
|
+
class: normalizeClass(_ctx.$style.body)
|
|
47
|
+
}, [
|
|
48
|
+
renderSlot(_ctx.$slots, "default")
|
|
49
|
+
], 2)
|
|
50
|
+
], 2)
|
|
51
|
+
], 2);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const wrapper = "_wrapper_183my_1";
|
|
56
|
+
const overflow = "_overflow_183my_6";
|
|
57
|
+
const list = "_list_183my_6";
|
|
58
|
+
const body = "_body_183my_6";
|
|
59
|
+
const style0$2 = {
|
|
60
|
+
wrapper,
|
|
61
|
+
overflow,
|
|
62
|
+
list,
|
|
63
|
+
body
|
|
64
|
+
};
|
|
65
|
+
const cssModules$2 = {
|
|
66
|
+
"$style": style0$2
|
|
67
|
+
};
|
|
68
|
+
const PageViewLayoutList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
|
|
69
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
70
|
+
__name: "ResourceFiltersDropdown",
|
|
71
|
+
props: {
|
|
72
|
+
modelValue: { default: () => ({}) },
|
|
73
|
+
keys: { default: () => [] },
|
|
74
|
+
shareable: { type: Boolean, default: true },
|
|
75
|
+
reset: { type: Function, default: () => {
|
|
76
|
+
} }
|
|
77
|
+
},
|
|
78
|
+
emits: ["update:modelValue", "update:filtersLength"],
|
|
79
|
+
setup(__props, { emit: __emit }) {
|
|
80
|
+
const props = __props;
|
|
81
|
+
const emit = __emit;
|
|
82
|
+
const selectedProject = ref(null);
|
|
83
|
+
const projectsStore = useProjectsStore();
|
|
84
|
+
const i18n = useI18n();
|
|
85
|
+
const filtersLength = computed(() => {
|
|
86
|
+
let length = 0;
|
|
87
|
+
props.keys.forEach((key) => {
|
|
88
|
+
if (key === "search") {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const value = props.modelValue[key];
|
|
92
|
+
length += (Array.isArray(value) ? value.length > 0 : value !== "") ? 1 : 0;
|
|
93
|
+
});
|
|
94
|
+
return length;
|
|
95
|
+
});
|
|
96
|
+
const hasFilters = computed(() => filtersLength.value > 0);
|
|
97
|
+
const setKeyValue = (key, value) => {
|
|
98
|
+
const filters2 = {
|
|
99
|
+
...props.modelValue,
|
|
100
|
+
[key]: value
|
|
101
|
+
};
|
|
102
|
+
emit("update:modelValue", filters2);
|
|
103
|
+
};
|
|
104
|
+
const resetFilters = () => {
|
|
105
|
+
if (props.reset) {
|
|
106
|
+
props.reset();
|
|
107
|
+
} else {
|
|
108
|
+
const filters2 = { ...props.modelValue };
|
|
109
|
+
props.keys.forEach((key) => {
|
|
110
|
+
filters2[key] = Array.isArray(props.modelValue[key]) ? [] : "";
|
|
111
|
+
});
|
|
112
|
+
emit("update:modelValue", filters2);
|
|
113
|
+
}
|
|
114
|
+
selectedProject.value = null;
|
|
115
|
+
};
|
|
116
|
+
watch(filtersLength, (value) => {
|
|
117
|
+
emit("update:filtersLength", value);
|
|
118
|
+
});
|
|
119
|
+
onBeforeMount(async () => {
|
|
120
|
+
await projectsStore.getAvailableProjects();
|
|
121
|
+
selectedProject.value = projectsStore.availableProjects.find(
|
|
122
|
+
(project) => project.id === props.modelValue.homeProject
|
|
123
|
+
) ?? null;
|
|
124
|
+
});
|
|
125
|
+
return (_ctx, _cache) => {
|
|
126
|
+
const _component_n8n_badge = resolveComponent("n8n-badge");
|
|
127
|
+
const _component_n8n_button = resolveComponent("n8n-button");
|
|
128
|
+
const _component_n8n_input_label = resolveComponent("n8n-input-label");
|
|
129
|
+
const _component_enterprise_edition = resolveComponent("enterprise-edition");
|
|
130
|
+
const _component_n8n_link = resolveComponent("n8n-link");
|
|
131
|
+
const _component_n8n_popover = resolveComponent("n8n-popover");
|
|
132
|
+
return openBlock(), createBlock(_component_n8n_popover, {
|
|
133
|
+
trigger: "click",
|
|
134
|
+
width: "304",
|
|
135
|
+
size: "large"
|
|
136
|
+
}, {
|
|
137
|
+
reference: withCtx(() => [
|
|
138
|
+
createVNode(_component_n8n_button, {
|
|
139
|
+
icon: "filter",
|
|
140
|
+
type: "tertiary",
|
|
141
|
+
active: hasFilters.value,
|
|
142
|
+
class: normalizeClass(_ctx.$style["filter-button"]),
|
|
143
|
+
"data-test-id": "resources-list-filters-trigger"
|
|
144
|
+
}, {
|
|
145
|
+
default: withCtx(() => [
|
|
146
|
+
withDirectives(createVNode(_component_n8n_badge, {
|
|
147
|
+
theme: "primary",
|
|
148
|
+
class: "mr-4xs"
|
|
149
|
+
}, {
|
|
150
|
+
default: withCtx(() => [
|
|
151
|
+
createTextVNode(toDisplayString(filtersLength.value), 1)
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 512), [
|
|
155
|
+
[vShow, filtersLength.value > 0]
|
|
156
|
+
]),
|
|
157
|
+
createTextVNode(" " + toDisplayString(unref(i18n).baseText("forms.resourceFiltersDropdown.filters")), 1)
|
|
158
|
+
]),
|
|
159
|
+
_: 1
|
|
160
|
+
}, 8, ["active", "class"])
|
|
161
|
+
]),
|
|
162
|
+
default: withCtx(() => [
|
|
163
|
+
createBaseVNode("div", {
|
|
164
|
+
class: normalizeClass(_ctx.$style["filters-dropdown"]),
|
|
165
|
+
"data-test-id": "resources-list-filters-dropdown"
|
|
166
|
+
}, [
|
|
167
|
+
renderSlot(_ctx.$slots, "default", {
|
|
168
|
+
filters: _ctx.modelValue,
|
|
169
|
+
setKeyValue
|
|
170
|
+
}),
|
|
171
|
+
_ctx.shareable && unref(projectsStore).isProjectHome ? (openBlock(), createBlock(_component_enterprise_edition, {
|
|
172
|
+
key: 0,
|
|
173
|
+
features: [unref(EnterpriseEditionFeature).Sharing]
|
|
174
|
+
}, {
|
|
175
|
+
default: withCtx(() => [
|
|
176
|
+
createVNode(_component_n8n_input_label, {
|
|
177
|
+
label: unref(i18n).baseText("forms.resourceFiltersDropdown.owner"),
|
|
178
|
+
bold: false,
|
|
179
|
+
size: "small",
|
|
180
|
+
color: "text-base",
|
|
181
|
+
class: "mb-3xs"
|
|
182
|
+
}, null, 8, ["label"]),
|
|
183
|
+
createVNode(ProjectSharing, {
|
|
184
|
+
modelValue: selectedProject.value,
|
|
185
|
+
"onUpdate:modelValue": [
|
|
186
|
+
_cache[0] || (_cache[0] = ($event) => selectedProject.value = $event),
|
|
187
|
+
_cache[1] || (_cache[1] = ($event) => setKeyValue("homeProject", $event.id))
|
|
188
|
+
],
|
|
189
|
+
projects: unref(projectsStore).availableProjects,
|
|
190
|
+
placeholder: unref(i18n).baseText("forms.resourceFiltersDropdown.owner.placeholder"),
|
|
191
|
+
"empty-options-text": unref(i18n).baseText("projects.sharing.noMatchingProjects")
|
|
192
|
+
}, null, 8, ["modelValue", "projects", "placeholder", "empty-options-text"])
|
|
193
|
+
]),
|
|
194
|
+
_: 1
|
|
195
|
+
}, 8, ["features"])) : createCommentVNode("", true),
|
|
196
|
+
hasFilters.value ? (openBlock(), createElementBlock("div", {
|
|
197
|
+
key: 1,
|
|
198
|
+
class: normalizeClass([_ctx.$style["filters-dropdown-footer"], "mt-s"])
|
|
199
|
+
}, [
|
|
200
|
+
createVNode(_component_n8n_link, { onClick: resetFilters }, {
|
|
201
|
+
default: withCtx(() => [
|
|
202
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("forms.resourceFiltersDropdown.reset")), 1)
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
})
|
|
206
|
+
], 2)) : createCommentVNode("", true)
|
|
207
|
+
], 2)
|
|
208
|
+
]),
|
|
209
|
+
_: 3
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
const style0$1 = {
|
|
215
|
+
"filter-button": "_filter-button_i7gly_1",
|
|
216
|
+
"filters-dropdown": "_filters-dropdown_i7gly_6",
|
|
217
|
+
"filters-dropdown-footer": "_filters-dropdown-footer_i7gly_10"
|
|
218
|
+
};
|
|
219
|
+
const cssModules$1 = {
|
|
220
|
+
"$style": style0$1
|
|
221
|
+
};
|
|
222
|
+
const ResourceFiltersDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
|
|
223
|
+
const _hoisted_1 = {
|
|
224
|
+
key: 0,
|
|
225
|
+
class: "resource-list-loading"
|
|
226
|
+
};
|
|
227
|
+
const _hoisted_2 = { key: 0 };
|
|
228
|
+
const _hoisted_3 = {
|
|
229
|
+
key: 0,
|
|
230
|
+
class: "mt-xs"
|
|
231
|
+
};
|
|
232
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
233
|
+
__name: "ResourcesListLayout",
|
|
234
|
+
props: {
|
|
235
|
+
resourceKey: {},
|
|
236
|
+
displayName: { type: Function, default: (resource) => resource.name },
|
|
237
|
+
resources: {},
|
|
238
|
+
disabled: { type: Boolean },
|
|
239
|
+
initialize: { type: Function, default: async () => {
|
|
240
|
+
} },
|
|
241
|
+
filters: { default: () => ({ search: "", homeProject: "" }) },
|
|
242
|
+
additionalFiltersHandler: { type: Function, default: void 0 },
|
|
243
|
+
shareable: { type: Boolean, default: true },
|
|
244
|
+
showFiltersDropdown: { type: Boolean, default: true },
|
|
245
|
+
sortFns: { default: () => ({}) },
|
|
246
|
+
sortOptions: { default: () => ["lastUpdated", "lastCreated", "nameAsc", "nameDesc"] },
|
|
247
|
+
type: { default: "list" },
|
|
248
|
+
typeProps: { default: () => ({ itemSize: 80 }) },
|
|
249
|
+
loading: { type: Boolean, default: true }
|
|
250
|
+
},
|
|
251
|
+
emits: ["update:filters", "click:add", "sort"],
|
|
252
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
253
|
+
const props = __props;
|
|
254
|
+
const emit = __emit;
|
|
255
|
+
const route = useRoute();
|
|
256
|
+
const i18n = useI18n();
|
|
257
|
+
const { callDebounced } = useDebounce();
|
|
258
|
+
const usersStore = useUsersStore();
|
|
259
|
+
const projectsStore = useProjectsStore();
|
|
260
|
+
const telemetry = useTelemetry();
|
|
261
|
+
const sortBy = ref(props.sortOptions[0]);
|
|
262
|
+
const hasFilters = ref(false);
|
|
263
|
+
const filtersModel = ref(props.filters);
|
|
264
|
+
const currentPage = ref(1);
|
|
265
|
+
const rowsPerPage = ref(10);
|
|
266
|
+
const resettingFilters = ref(false);
|
|
267
|
+
const search2 = ref(null);
|
|
268
|
+
const filterKeys = computed(() => {
|
|
269
|
+
return Object.keys(filtersModel.value);
|
|
270
|
+
});
|
|
271
|
+
const filteredAndSortedResources = computed(() => {
|
|
272
|
+
const filtered = props.resources.filter((resource) => {
|
|
273
|
+
let matches = true;
|
|
274
|
+
if (filtersModel.value.homeProject) {
|
|
275
|
+
matches = matches && !!(resource.homeProject && resource.homeProject.id === filtersModel.value.homeProject);
|
|
276
|
+
}
|
|
277
|
+
if (filtersModel.value.search) {
|
|
278
|
+
const searchString = filtersModel.value.search.toLowerCase();
|
|
279
|
+
matches = matches && props.displayName(resource).toLowerCase().includes(searchString);
|
|
280
|
+
}
|
|
281
|
+
if (props.additionalFiltersHandler) {
|
|
282
|
+
matches = props.additionalFiltersHandler(resource, filtersModel.value, matches);
|
|
283
|
+
}
|
|
284
|
+
return matches;
|
|
285
|
+
});
|
|
286
|
+
return filtered.sort((a, b) => {
|
|
287
|
+
switch (sortBy.value) {
|
|
288
|
+
case "lastUpdated":
|
|
289
|
+
return props.sortFns.lastUpdated ? props.sortFns.lastUpdated(a, b) : new Date(b.updatedAt ?? "").valueOf() - new Date(a.updatedAt ?? "").valueOf();
|
|
290
|
+
case "lastCreated":
|
|
291
|
+
return props.sortFns.lastCreated ? props.sortFns.lastCreated(a, b) : new Date(b.createdAt ?? "").valueOf() - new Date(a.createdAt ?? "").valueOf();
|
|
292
|
+
case "nameAsc":
|
|
293
|
+
return props.sortFns.nameAsc ? props.sortFns.nameAsc(a, b) : props.displayName(a).trim().localeCompare(props.displayName(b).trim());
|
|
294
|
+
case "nameDesc":
|
|
295
|
+
return props.sortFns.nameDesc ? props.sortFns.nameDesc(a, b) : props.displayName(b).trim().localeCompare(props.displayName(a).trim());
|
|
296
|
+
default:
|
|
297
|
+
return props.sortFns[sortBy.value] ? props.sortFns[sortBy.value](a, b) : 0;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
const focusSearchInput = () => {
|
|
302
|
+
if (search2.value) {
|
|
303
|
+
search2.value.focus();
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const hasAppliedFilters = () => {
|
|
307
|
+
return !!filterKeys.value.find(
|
|
308
|
+
(key) => key !== "search" && (Array.isArray(props.filters[key]) ? props.filters[key].length > 0 : props.filters[key] !== "")
|
|
309
|
+
);
|
|
310
|
+
};
|
|
311
|
+
const setRowsPerPage = (numberOfRowsPerPage) => {
|
|
312
|
+
rowsPerPage.value = numberOfRowsPerPage;
|
|
313
|
+
};
|
|
314
|
+
const setCurrentPage = (page) => {
|
|
315
|
+
currentPage.value = page;
|
|
316
|
+
};
|
|
317
|
+
__expose({
|
|
318
|
+
currentPage,
|
|
319
|
+
setCurrentPage
|
|
320
|
+
});
|
|
321
|
+
const sendFiltersTelemetry = (source) => {
|
|
322
|
+
if (resettingFilters.value) {
|
|
323
|
+
if (source !== "reset") {
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
setTimeout(() => resettingFilters.value = false, 1500);
|
|
327
|
+
}
|
|
328
|
+
const filters2 = filtersModel.value;
|
|
329
|
+
const filtersSet = [];
|
|
330
|
+
const filterValues = [];
|
|
331
|
+
Object.keys(filters2).forEach((key) => {
|
|
332
|
+
if (filters2[key]) {
|
|
333
|
+
filtersSet.push(key);
|
|
334
|
+
filterValues.push(key === "search" ? null : filters2[key]);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
telemetry.track(`User set filters in ${props.resourceKey} list`, {
|
|
338
|
+
filters_set: filtersSet,
|
|
339
|
+
filter_values: filterValues,
|
|
340
|
+
[`${props.resourceKey}_total_in_view`]: props.resources.length,
|
|
341
|
+
[`${props.resourceKey}_after_filtering`]: filteredAndSortedResources.value.length
|
|
342
|
+
});
|
|
343
|
+
};
|
|
344
|
+
const onAddButtonClick = (e) => {
|
|
345
|
+
emit("click:add", e);
|
|
346
|
+
};
|
|
347
|
+
const onUpdateFilters = (e) => {
|
|
348
|
+
emit("update:filters", e);
|
|
349
|
+
};
|
|
350
|
+
const resetFilters = () => {
|
|
351
|
+
Object.keys(filtersModel.value).forEach((key) => {
|
|
352
|
+
filtersModel.value[key] = Array.isArray(filtersModel.value[key]) ? [] : "";
|
|
353
|
+
});
|
|
354
|
+
resettingFilters.value = true;
|
|
355
|
+
sendFiltersTelemetry("reset");
|
|
356
|
+
emit("update:filters", filtersModel.value);
|
|
357
|
+
};
|
|
358
|
+
const itemSize = () => {
|
|
359
|
+
if ("itemSize" in props.typeProps) {
|
|
360
|
+
return props.typeProps.itemSize;
|
|
361
|
+
}
|
|
362
|
+
return 0;
|
|
363
|
+
};
|
|
364
|
+
const getColumns = () => {
|
|
365
|
+
if ("columns" in props.typeProps) {
|
|
366
|
+
return props.typeProps.columns;
|
|
367
|
+
}
|
|
368
|
+
return {};
|
|
369
|
+
};
|
|
370
|
+
const sendSortingTelemetry = () => {
|
|
371
|
+
telemetry.track(`User changed sorting in ${props.resourceKey} list`, {
|
|
372
|
+
sorting: sortBy.value
|
|
373
|
+
});
|
|
374
|
+
};
|
|
375
|
+
const onUpdateFiltersLength = (length) => {
|
|
376
|
+
hasFilters.value = length > 0;
|
|
377
|
+
};
|
|
378
|
+
const onSearch = (s) => {
|
|
379
|
+
filtersModel.value.search = s;
|
|
380
|
+
emit("update:filters", filtersModel.value);
|
|
381
|
+
};
|
|
382
|
+
watch(
|
|
383
|
+
() => props.filters,
|
|
384
|
+
(value) => {
|
|
385
|
+
filtersModel.value = value;
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
watch(
|
|
389
|
+
() => filtersModel.value.homeProject,
|
|
390
|
+
() => {
|
|
391
|
+
sendFiltersTelemetry("homeProject");
|
|
392
|
+
}
|
|
393
|
+
);
|
|
394
|
+
watch(
|
|
395
|
+
() => filtersModel.value.tags,
|
|
396
|
+
() => {
|
|
397
|
+
sendFiltersTelemetry("tags");
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
watch(
|
|
401
|
+
() => filtersModel.value.type,
|
|
402
|
+
() => {
|
|
403
|
+
sendFiltersTelemetry("type");
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
watch(
|
|
407
|
+
() => filtersModel.value.search,
|
|
408
|
+
() => callDebounced(sendFiltersTelemetry, { debounceTime: 1e3, trailing: true }, "search")
|
|
409
|
+
);
|
|
410
|
+
watch(
|
|
411
|
+
() => sortBy.value,
|
|
412
|
+
(newValue) => {
|
|
413
|
+
emit("sort", newValue);
|
|
414
|
+
sendSortingTelemetry();
|
|
415
|
+
}
|
|
416
|
+
);
|
|
417
|
+
watch(
|
|
418
|
+
() => {
|
|
419
|
+
var _a;
|
|
420
|
+
return (_a = route == null ? void 0 : route.params) == null ? void 0 : _a.projectId;
|
|
421
|
+
},
|
|
422
|
+
() => {
|
|
423
|
+
resetFilters();
|
|
424
|
+
}
|
|
425
|
+
);
|
|
426
|
+
onMounted(async () => {
|
|
427
|
+
await props.initialize();
|
|
428
|
+
await nextTick();
|
|
429
|
+
focusSearchInput();
|
|
430
|
+
if (hasAppliedFilters()) {
|
|
431
|
+
hasFilters.value = true;
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
const headerIcon = computed(() => {
|
|
435
|
+
var _a, _b;
|
|
436
|
+
if (((_a = projectsStore.currentProject) == null ? void 0 : _a.type) === ProjectTypes.Personal) {
|
|
437
|
+
return "user";
|
|
438
|
+
} else if ((_b = projectsStore.currentProject) == null ? void 0 : _b.name) {
|
|
439
|
+
return "layer-group";
|
|
440
|
+
} else {
|
|
441
|
+
return "home";
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
const projectName = computed(() => {
|
|
445
|
+
if (!projectsStore.currentProject) {
|
|
446
|
+
return i18n.baseText("projects.menu.home");
|
|
447
|
+
} else if (projectsStore.currentProject.type === ProjectTypes.Personal) {
|
|
448
|
+
return i18n.baseText("projects.menu.personal");
|
|
449
|
+
} else {
|
|
450
|
+
return projectsStore.currentProject.name;
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
return (_ctx, _cache) => {
|
|
454
|
+
const _component_n8n_loading = resolveComponent("n8n-loading");
|
|
455
|
+
const _component_n8n_action_box = resolveComponent("n8n-action-box");
|
|
456
|
+
const _component_n8n_icon = resolveComponent("n8n-icon");
|
|
457
|
+
const _component_n8n_input = resolveComponent("n8n-input");
|
|
458
|
+
const _component_n8n_option = resolveComponent("n8n-option");
|
|
459
|
+
const _component_n8n_select = resolveComponent("n8n-select");
|
|
460
|
+
const _component_n8n_button = resolveComponent("n8n-button");
|
|
461
|
+
const _component_n8n_link = resolveComponent("n8n-link");
|
|
462
|
+
const _component_n8n_info_tip = resolveComponent("n8n-info-tip");
|
|
463
|
+
const _component_n8n_recycle_scroller = resolveComponent("n8n-recycle-scroller");
|
|
464
|
+
const _component_n8n_datatable = resolveComponent("n8n-datatable");
|
|
465
|
+
const _component_n8n_text = resolveComponent("n8n-text");
|
|
466
|
+
return openBlock(), createBlock(PageViewLayout, null, {
|
|
467
|
+
header: withCtx(() => [
|
|
468
|
+
createVNode(ResourceListHeader, {
|
|
469
|
+
icon: headerIcon.value,
|
|
470
|
+
"data-test-id": "list-layout-header"
|
|
471
|
+
}, {
|
|
472
|
+
title: withCtx(() => [
|
|
473
|
+
createTextVNode(toDisplayString(projectName.value), 1)
|
|
474
|
+
]),
|
|
475
|
+
_: 1
|
|
476
|
+
}, 8, ["icon"]),
|
|
477
|
+
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
478
|
+
]),
|
|
479
|
+
default: withCtx(() => [
|
|
480
|
+
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
481
|
+
createVNode(_component_n8n_loading, {
|
|
482
|
+
rows: 25,
|
|
483
|
+
"shrink-last": false
|
|
484
|
+
})
|
|
485
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
486
|
+
_ctx.resources.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
487
|
+
renderSlot(_ctx.$slots, "empty", {}, () => {
|
|
488
|
+
var _a, _b;
|
|
489
|
+
return [
|
|
490
|
+
createVNode(_component_n8n_action_box, {
|
|
491
|
+
"data-test-id": "empty-resources-list",
|
|
492
|
+
emoji: "👋",
|
|
493
|
+
heading: unref(i18n).baseText(
|
|
494
|
+
((_a = unref(usersStore).currentUser) == null ? void 0 : _a.firstName) ? `${_ctx.resourceKey}.empty.heading` : `${_ctx.resourceKey}.empty.heading.userNotSetup`,
|
|
495
|
+
{
|
|
496
|
+
interpolate: { name: ((_b = unref(usersStore).currentUser) == null ? void 0 : _b.firstName) ?? "" }
|
|
497
|
+
}
|
|
498
|
+
),
|
|
499
|
+
description: unref(i18n).baseText(`${_ctx.resourceKey}.empty.description`),
|
|
500
|
+
"button-text": unref(i18n).baseText(`${_ctx.resourceKey}.empty.button`),
|
|
501
|
+
"button-type": "secondary",
|
|
502
|
+
"button-disabled": _ctx.disabled,
|
|
503
|
+
"onClick:button": onAddButtonClick
|
|
504
|
+
}, {
|
|
505
|
+
disabledButtonTooltip: withCtx(() => [
|
|
506
|
+
createTextVNode(toDisplayString(unref(i18n).baseText(`${_ctx.resourceKey}.empty.button.disabled.tooltip`)), 1)
|
|
507
|
+
]),
|
|
508
|
+
_: 1
|
|
509
|
+
}, 8, ["heading", "description", "button-text", "button-disabled"])
|
|
510
|
+
];
|
|
511
|
+
}, true)
|
|
512
|
+
])) : (openBlock(), createBlock(PageViewLayoutList, {
|
|
513
|
+
key: 1,
|
|
514
|
+
overflow: _ctx.type !== "list"
|
|
515
|
+
}, {
|
|
516
|
+
header: withCtx(() => [
|
|
517
|
+
createBaseVNode("div", {
|
|
518
|
+
class: normalizeClass(_ctx.$style["filters-row"])
|
|
519
|
+
}, [
|
|
520
|
+
createBaseVNode("div", {
|
|
521
|
+
class: normalizeClass(_ctx.$style.filters)
|
|
522
|
+
}, [
|
|
523
|
+
createVNode(_component_n8n_input, {
|
|
524
|
+
ref_key: "search",
|
|
525
|
+
ref: search2,
|
|
526
|
+
"model-value": filtersModel.value.search,
|
|
527
|
+
class: normalizeClass([_ctx.$style["search"], "mr-2xs"]),
|
|
528
|
+
placeholder: unref(i18n).baseText(`${_ctx.resourceKey}.search.placeholder`),
|
|
529
|
+
clearable: "",
|
|
530
|
+
"data-test-id": "resources-list-search",
|
|
531
|
+
"onUpdate:modelValue": onSearch
|
|
532
|
+
}, {
|
|
533
|
+
prefix: withCtx(() => [
|
|
534
|
+
createVNode(_component_n8n_icon, { icon: "search" })
|
|
535
|
+
]),
|
|
536
|
+
_: 1
|
|
537
|
+
}, 8, ["model-value", "class", "placeholder"]),
|
|
538
|
+
_ctx.showFiltersDropdown ? (openBlock(), createBlock(ResourceFiltersDropdown, {
|
|
539
|
+
key: 0,
|
|
540
|
+
keys: filterKeys.value,
|
|
541
|
+
reset: resetFilters,
|
|
542
|
+
"model-value": filtersModel.value,
|
|
543
|
+
shareable: _ctx.shareable,
|
|
544
|
+
"onUpdate:modelValue": onUpdateFilters,
|
|
545
|
+
"onUpdate:filtersLength": onUpdateFiltersLength
|
|
546
|
+
}, {
|
|
547
|
+
default: withCtx((resourceFiltersSlotProps) => [
|
|
548
|
+
renderSlot(_ctx.$slots, "filters", normalizeProps(guardReactiveProps(resourceFiltersSlotProps)), void 0, true)
|
|
549
|
+
]),
|
|
550
|
+
_: 3
|
|
551
|
+
}, 8, ["keys", "model-value", "shareable"])) : createCommentVNode("", true),
|
|
552
|
+
createBaseVNode("div", {
|
|
553
|
+
class: normalizeClass(_ctx.$style["sort-and-filter"])
|
|
554
|
+
}, [
|
|
555
|
+
createVNode(_component_n8n_select, {
|
|
556
|
+
modelValue: sortBy.value,
|
|
557
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sortBy.value = $event),
|
|
558
|
+
"data-test-id": "resources-list-sort"
|
|
559
|
+
}, {
|
|
560
|
+
default: withCtx(() => [
|
|
561
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortOptions, (sortOption) => {
|
|
562
|
+
return openBlock(), createBlock(_component_n8n_option, {
|
|
563
|
+
key: sortOption,
|
|
564
|
+
"data-test-id": "resources-list-sort-item",
|
|
565
|
+
value: sortOption,
|
|
566
|
+
label: unref(i18n).baseText(`${_ctx.resourceKey}.sort.${sortOption}`)
|
|
567
|
+
}, null, 8, ["value", "label"]);
|
|
568
|
+
}), 128))
|
|
569
|
+
]),
|
|
570
|
+
_: 1
|
|
571
|
+
}, 8, ["modelValue"])
|
|
572
|
+
], 2)
|
|
573
|
+
], 2),
|
|
574
|
+
renderSlot(_ctx.$slots, "add-button", { disabled: _ctx.disabled }, () => [
|
|
575
|
+
createVNode(_component_n8n_button, {
|
|
576
|
+
size: "large",
|
|
577
|
+
disabled: _ctx.disabled,
|
|
578
|
+
"data-test-id": "resources-list-add",
|
|
579
|
+
onClick: onAddButtonClick
|
|
580
|
+
}, {
|
|
581
|
+
default: withCtx(() => [
|
|
582
|
+
createTextVNode(toDisplayString(unref(i18n).baseText(`${_ctx.resourceKey}.add`)), 1)
|
|
583
|
+
]),
|
|
584
|
+
_: 1
|
|
585
|
+
}, 8, ["disabled"])
|
|
586
|
+
], true)
|
|
587
|
+
], 2),
|
|
588
|
+
renderSlot(_ctx.$slots, "callout", {}, void 0, true),
|
|
589
|
+
_ctx.showFiltersDropdown ? withDirectives((openBlock(), createElementBlock("div", _hoisted_3, [
|
|
590
|
+
createVNode(_component_n8n_info_tip, { bold: false }, {
|
|
591
|
+
default: withCtx(() => [
|
|
592
|
+
createTextVNode(toDisplayString(unref(i18n).baseText(`${_ctx.resourceKey}.filters.active`)) + " ", 1),
|
|
593
|
+
createVNode(_component_n8n_link, {
|
|
594
|
+
"data-test-id": "workflows-filter-reset",
|
|
595
|
+
size: "small",
|
|
596
|
+
onClick: resetFilters
|
|
597
|
+
}, {
|
|
598
|
+
default: withCtx(() => [
|
|
599
|
+
createTextVNode(toDisplayString(unref(i18n).baseText(`${_ctx.resourceKey}.filters.active.reset`)), 1)
|
|
600
|
+
]),
|
|
601
|
+
_: 1
|
|
602
|
+
})
|
|
603
|
+
]),
|
|
604
|
+
_: 1
|
|
605
|
+
})
|
|
606
|
+
], 512)), [
|
|
607
|
+
[vShow, hasFilters.value]
|
|
608
|
+
]) : createCommentVNode("", true),
|
|
609
|
+
_cache[1] || (_cache[1] = createBaseVNode("div", { class: "pb-xs" }, null, -1))
|
|
610
|
+
]),
|
|
611
|
+
default: withCtx(() => [
|
|
612
|
+
renderSlot(_ctx.$slots, "preamble", {}, void 0, true),
|
|
613
|
+
filteredAndSortedResources.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
614
|
+
key: 0,
|
|
615
|
+
ref: "listWrapperRef",
|
|
616
|
+
class: normalizeClass(_ctx.$style.listWrapper)
|
|
617
|
+
}, [
|
|
618
|
+
_ctx.type === "list" ? (openBlock(), createBlock(_component_n8n_recycle_scroller, {
|
|
619
|
+
key: 0,
|
|
620
|
+
"data-test-id": "resources-list",
|
|
621
|
+
items: filteredAndSortedResources.value,
|
|
622
|
+
"item-size": itemSize(),
|
|
623
|
+
"item-key": "id"
|
|
624
|
+
}, {
|
|
625
|
+
default: withCtx(({ item, updateItemSize }) => [
|
|
626
|
+
renderSlot(_ctx.$slots, "default", {
|
|
627
|
+
data: item,
|
|
628
|
+
updateItemSize
|
|
629
|
+
}, void 0, true)
|
|
630
|
+
]),
|
|
631
|
+
_: 3
|
|
632
|
+
}, 8, ["items", "item-size"])) : createCommentVNode("", true),
|
|
633
|
+
_ctx.type === "datatable" ? (openBlock(), createBlock(_component_n8n_datatable, {
|
|
634
|
+
key: 1,
|
|
635
|
+
"data-test-id": "resources-table",
|
|
636
|
+
class: normalizeClass(_ctx.$style.datatable),
|
|
637
|
+
columns: getColumns(),
|
|
638
|
+
rows: filteredAndSortedResources.value,
|
|
639
|
+
"current-page": currentPage.value,
|
|
640
|
+
"rows-per-page": rowsPerPage.value,
|
|
641
|
+
"onUpdate:currentPage": setCurrentPage,
|
|
642
|
+
"onUpdate:rowsPerPage": setRowsPerPage
|
|
643
|
+
}, {
|
|
644
|
+
row: withCtx(({ columns, row }) => [
|
|
645
|
+
renderSlot(_ctx.$slots, "default", {
|
|
646
|
+
data: row,
|
|
647
|
+
columns
|
|
648
|
+
}, void 0, true)
|
|
649
|
+
]),
|
|
650
|
+
_: 3
|
|
651
|
+
}, 8, ["class", "columns", "rows", "current-page", "rows-per-page"])) : createCommentVNode("", true)
|
|
652
|
+
], 2)) : (openBlock(), createBlock(_component_n8n_text, {
|
|
653
|
+
key: 1,
|
|
654
|
+
color: "text-base",
|
|
655
|
+
size: "medium",
|
|
656
|
+
"data-test-id": "resources-list-empty"
|
|
657
|
+
}, {
|
|
658
|
+
default: withCtx(() => [
|
|
659
|
+
createTextVNode(toDisplayString(unref(i18n).baseText(`${_ctx.resourceKey}.noResults`)), 1)
|
|
660
|
+
]),
|
|
661
|
+
_: 1
|
|
662
|
+
})),
|
|
663
|
+
renderSlot(_ctx.$slots, "postamble", {}, void 0, true)
|
|
664
|
+
]),
|
|
665
|
+
_: 3
|
|
666
|
+
}, 8, ["overflow"]))
|
|
667
|
+
], 64))
|
|
668
|
+
]),
|
|
669
|
+
_: 3
|
|
670
|
+
});
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
const filters = "_filters_eysnt_1";
|
|
675
|
+
const search = "_search_eysnt_16";
|
|
676
|
+
const listWrapper = "_listWrapper_eysnt_20";
|
|
677
|
+
const datatable = "_datatable_eysnt_30";
|
|
678
|
+
const style0 = {
|
|
679
|
+
"filters-row": "_filters-row_eysnt_1",
|
|
680
|
+
filters,
|
|
681
|
+
search,
|
|
682
|
+
listWrapper,
|
|
683
|
+
"sort-and-filter": "_sort-and-filter_eysnt_26",
|
|
684
|
+
datatable
|
|
685
|
+
};
|
|
686
|
+
const cssModules = {
|
|
687
|
+
"$style": style0
|
|
688
|
+
};
|
|
689
|
+
const ResourcesListLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-435f5b47"]]);
|
|
690
|
+
export {
|
|
691
|
+
ResourcesListLayout as R
|
|
692
|
+
};
|