@webx-ui/module-catalog-landings 0.2.2 → 0.2.3
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/{LandingEditorPage-Dt1xmQXl.js → LandingEditorPage-sarEsyTC.js} +2 -2
- package/dist/{LandingEditorPage-Dt1xmQXl.js.map → LandingEditorPage-sarEsyTC.js.map} +1 -1
- package/dist/{LandingsPage-BAIQAJv2.js → LandingsPage-D3IHE6TR.js} +325 -317
- package/dist/LandingsPage-D3IHE6TR.js.map +1 -0
- package/dist/index-CL_q1v5T.js +792 -0
- package/dist/index-CL_q1v5T.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/dist/LandingsPage-BAIQAJv2.js.map +0 -1
- package/dist/index-DEreqbgG.js +0 -768
- package/dist/index-DEreqbgG.js.map +0 -1
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { useAdmin as
|
|
5
|
-
import { useCategoryTree as
|
|
6
|
-
import { c as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as ke, ref as g, onMounted as xe, watch as pe, computed as _, onBeforeUnmount as Ae, openBlock as v, createBlock as W, unref as e, isRef as Le, withCtx as l, createTextVNode as m, toDisplayString as p, createCommentVNode as J, createElementBlock as V, createVNode as t, createElementVNode as P, Fragment as ae, renderList as we } from "vue";
|
|
2
|
+
import { useRoute as Oe, useRouter as Ie } from "vue-router";
|
|
3
|
+
import { useModal as Re, useLocales as Ve, WxDialog as De, WxAlert as ye, WxFormItem as h, WxTreeSelect as We, WxSwitch as K, WxSelect as be, WxInputNumber as Ee, WxText as R, WxInput as ee, WxTable as Ue, WxProgress as Fe, WxSpace as je, WxButton as H, createModal as Ge, WxBadge as le, WxTooltip as He, WxIcon as he, toast as I, localizedValue as _e, confirm as Je } from "@webx-ui/core";
|
|
4
|
+
import { useAdmin as ze, useTranslate as Q, useErrorText as $e, rowMenuWidth as Ke, WxListScreen as Qe, WxRowMenu as Xe, WxDate as Ye, WxFilterChips as Ze } from "@webx-ui/module-admin";
|
|
5
|
+
import { useCategoryTree as qe } from "@webx-ui/module-catalog";
|
|
6
|
+
import { c as Ce, u as Se, N as Te, _ as Ne } from "./index-CL_q1v5T.js";
|
|
7
|
+
const el = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "wx-catalog-landings-generate"
|
|
10
|
-
},
|
|
10
|
+
}, ll = {
|
|
11
11
|
key: 2,
|
|
12
12
|
class: "wx-catalog-landings-generate"
|
|
13
|
-
},
|
|
13
|
+
}, al = { class: "wx-catalog-landings-generate__mono" }, tl = {
|
|
14
14
|
key: 3,
|
|
15
15
|
class: "wx-catalog-landings-generate"
|
|
16
|
-
},
|
|
16
|
+
}, nl = {
|
|
17
17
|
key: 2,
|
|
18
18
|
class: "wx-catalog-landings-generate__errors"
|
|
19
|
-
},
|
|
19
|
+
}, ul = /* @__PURE__ */ ke({
|
|
20
20
|
__name: "GenerateDialog",
|
|
21
|
-
setup(
|
|
22
|
-
const { open: D, resolve: E } =
|
|
23
|
-
|
|
24
|
-
const r =
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
setup(fe) {
|
|
22
|
+
const { open: D, resolve: E } = Re(), A = ze(), T = Ce(A), N = qe(A), X = Ve();
|
|
23
|
+
Se();
|
|
24
|
+
const r = Q(Te), u = Q("webx-admin"), L = Q("webx-catalog"), te = $e(), k = g("form"), B = g([]), F = g(!1), U = g(null), q = g([]), O = g(1), y = g({ slug: "", name: "", h1: "", title: "", description: "" }), C = g(!1), z = g([]), f = g({}), w = g(""), x = g(!1), b = g(null), c = g(null);
|
|
25
|
+
xe(() => {
|
|
26
|
+
N.load().catch(() => {
|
|
27
27
|
});
|
|
28
|
-
}),
|
|
29
|
-
() =>
|
|
28
|
+
}), pe(
|
|
29
|
+
() => B.value[0] ?? null,
|
|
30
30
|
async (d) => {
|
|
31
31
|
if (d === null) {
|
|
32
|
-
|
|
32
|
+
z.value = [];
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
try {
|
|
36
|
-
|
|
37
|
-
} catch (
|
|
38
|
-
|
|
36
|
+
z.value = (await T.facets(d)).filter((s) => s.kind !== "range");
|
|
37
|
+
} catch (s) {
|
|
38
|
+
w.value = te(s);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
const
|
|
43
|
-
() =>
|
|
44
|
-
), ue =
|
|
45
|
-
() => (
|
|
42
|
+
const ne = _(
|
|
43
|
+
() => z.value.map((d) => ({ value: d.key, label: d.label }))
|
|
44
|
+
), ue = _(
|
|
45
|
+
() => (z.value.find((d) => d.key === U.value)?.values ?? []).map((d) => ({
|
|
46
46
|
value: d.value,
|
|
47
47
|
label: `${d.label} (${d.count})`
|
|
48
48
|
}))
|
|
49
49
|
);
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
categories:
|
|
53
|
-
subtree:
|
|
50
|
+
pe(U, () => q.value = []);
|
|
51
|
+
const oe = _(() => ({
|
|
52
|
+
categories: B.value,
|
|
53
|
+
subtree: F.value,
|
|
54
54
|
facet: U.value ?? "",
|
|
55
|
-
values:
|
|
56
|
-
min_products:
|
|
57
|
-
...
|
|
58
|
-
publish:
|
|
59
|
-
})),
|
|
60
|
-
function
|
|
61
|
-
return
|
|
55
|
+
values: q.value.length > 0 ? q.value : null,
|
|
56
|
+
min_products: O.value,
|
|
57
|
+
...y.value,
|
|
58
|
+
publish: C.value
|
|
59
|
+
})), se = _(() => B.value.length > 0 && U.value !== null);
|
|
60
|
+
function M(d) {
|
|
61
|
+
return f.value[d]?.[0];
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
|
|
63
|
+
function ie(d) {
|
|
64
|
+
const s = d.body;
|
|
65
|
+
s?.errors ? f.value = s.errors : w.value = te(d);
|
|
66
66
|
}
|
|
67
67
|
async function re() {
|
|
68
|
-
if (!(!
|
|
69
|
-
|
|
68
|
+
if (!(!se.value || x.value)) {
|
|
69
|
+
x.value = !0, f.value = {}, w.value = "";
|
|
70
70
|
try {
|
|
71
|
-
|
|
71
|
+
b.value = await T.preview(oe.value), k.value = "preview";
|
|
72
72
|
} catch (d) {
|
|
73
|
-
|
|
73
|
+
ie(d);
|
|
74
74
|
} finally {
|
|
75
|
-
|
|
75
|
+
x.value = !1;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
let
|
|
80
|
-
async function
|
|
81
|
-
|
|
79
|
+
let j;
|
|
80
|
+
async function $(d, s = 1500) {
|
|
81
|
+
j = setTimeout(async () => {
|
|
82
82
|
try {
|
|
83
|
-
c.value = await
|
|
83
|
+
c.value = await T.run(d), (c.value.status === "queued" || c.value.status === "running") && $(d);
|
|
84
84
|
} catch {
|
|
85
|
-
|
|
85
|
+
$(d, Math.min(s * 2, 15e3));
|
|
86
86
|
}
|
|
87
|
-
},
|
|
87
|
+
}, s);
|
|
88
88
|
}
|
|
89
|
-
async function
|
|
90
|
-
if (!
|
|
91
|
-
|
|
89
|
+
async function de() {
|
|
90
|
+
if (!x.value) {
|
|
91
|
+
x.value = !0, w.value = "";
|
|
92
92
|
try {
|
|
93
|
-
c.value = await
|
|
93
|
+
c.value = await T.generate(oe.value), k.value = "run", c.value.id !== null && !Y.value && $(c.value.id);
|
|
94
94
|
} catch (d) {
|
|
95
|
-
|
|
95
|
+
ie(d), k.value = "form";
|
|
96
96
|
} finally {
|
|
97
|
-
|
|
97
|
+
x.value = !1;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
function
|
|
101
|
+
Ae(() => clearTimeout(j));
|
|
102
|
+
const Y = _(() => c.value?.status === "done" || c.value?.status === "failed");
|
|
103
|
+
function Z() {
|
|
104
104
|
E(c.value && c.value.done > 0 ? c.value : null);
|
|
105
105
|
}
|
|
106
|
-
const
|
|
106
|
+
const G = (d) => d[X.active.value] ?? Object.values(d)[0] ?? "", ve = _(() => [
|
|
107
107
|
{ key: "address", label: r("generate.column-address"), minWidth: 180 },
|
|
108
108
|
{ key: "title", label: r("generate.column-h1"), minWidth: 180, hideBelow: 560 },
|
|
109
109
|
{ key: "count", label: r("generate.column-count"), width: 100, align: "right" },
|
|
110
110
|
{ key: "conflict", label: r("generate.column-conflict"), minWidth: 180 }
|
|
111
|
-
]),
|
|
112
|
-
() => (
|
|
111
|
+
]), ce = _(
|
|
112
|
+
() => (b.value?.rows ?? []).map((d, s) => ({ ...d, id: s }))
|
|
113
113
|
);
|
|
114
|
-
return (d,
|
|
114
|
+
return (d, s) => (v(), W(e(De), {
|
|
115
115
|
open: e(D),
|
|
116
116
|
"onUpdate:open": [
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
s[12] || (s[12] = (o) => Le(D) ? D.value = o : null),
|
|
118
|
+
s[13] || (s[13] = (o) => !o && Z())
|
|
119
119
|
],
|
|
120
120
|
title: e(r)("generate.title"),
|
|
121
|
-
width:
|
|
121
|
+
width: k.value === "form" ? 600 : 860
|
|
122
122
|
}, {
|
|
123
123
|
footer: l(() => [
|
|
124
|
-
t(e(
|
|
124
|
+
t(e(je), { size: "sm" }, {
|
|
125
125
|
default: l(() => [
|
|
126
|
-
|
|
127
|
-
t(e(
|
|
126
|
+
k.value === "form" ? (v(), V(ae, { key: 0 }, [
|
|
127
|
+
t(e(H), {
|
|
128
128
|
variant: "outline",
|
|
129
|
-
onClick:
|
|
129
|
+
onClick: Z
|
|
130
130
|
}, {
|
|
131
131
|
default: l(() => [
|
|
132
132
|
m(p(e(r)("panel.cancel")), 1)
|
|
133
133
|
]),
|
|
134
134
|
_: 1
|
|
135
135
|
}),
|
|
136
|
-
t(e(
|
|
136
|
+
t(e(H), {
|
|
137
137
|
type: "primary",
|
|
138
|
-
loading:
|
|
139
|
-
disabled: !
|
|
138
|
+
loading: x.value,
|
|
139
|
+
disabled: !se.value,
|
|
140
140
|
onClick: re
|
|
141
141
|
}, {
|
|
142
142
|
default: l(() => [
|
|
@@ -144,32 +144,32 @@ const Ze = {
|
|
|
144
144
|
]),
|
|
145
145
|
_: 1
|
|
146
146
|
}, 8, ["loading", "disabled"])
|
|
147
|
-
], 64)) :
|
|
148
|
-
t(e(
|
|
147
|
+
], 64)) : k.value === "preview" ? (v(), V(ae, { key: 1 }, [
|
|
148
|
+
t(e(H), {
|
|
149
149
|
variant: "outline",
|
|
150
|
-
onClick:
|
|
150
|
+
onClick: s[11] || (s[11] = (o) => k.value = "form")
|
|
151
151
|
}, {
|
|
152
152
|
default: l(() => [
|
|
153
153
|
m(p(e(r)("generate.back")), 1)
|
|
154
154
|
]),
|
|
155
155
|
_: 1
|
|
156
156
|
}),
|
|
157
|
-
t(e(
|
|
157
|
+
t(e(H), {
|
|
158
158
|
type: "primary",
|
|
159
|
-
loading:
|
|
160
|
-
disabled: (
|
|
161
|
-
onClick:
|
|
159
|
+
loading: x.value,
|
|
160
|
+
disabled: (b.value?.free ?? 0) === 0,
|
|
161
|
+
onClick: de
|
|
162
162
|
}, {
|
|
163
163
|
default: l(() => [
|
|
164
|
-
m(p(e(r)("generate.run", { count:
|
|
164
|
+
m(p(e(r)("generate.run", { count: b.value?.free ?? 0 })), 1)
|
|
165
165
|
]),
|
|
166
166
|
_: 1
|
|
167
167
|
}, 8, ["loading", "disabled"])
|
|
168
|
-
], 64)) : (v(),
|
|
168
|
+
], 64)) : (v(), W(e(H), {
|
|
169
169
|
key: 2,
|
|
170
170
|
type: "primary",
|
|
171
|
-
disabled: !
|
|
172
|
-
onClick:
|
|
171
|
+
disabled: !Y.value,
|
|
172
|
+
onClick: Z
|
|
173
173
|
}, {
|
|
174
174
|
default: l(() => [
|
|
175
175
|
m(p(e(r)("generate.close")), 1)
|
|
@@ -181,26 +181,29 @@ const Ze = {
|
|
|
181
181
|
})
|
|
182
182
|
]),
|
|
183
183
|
default: l(() => [
|
|
184
|
-
|
|
184
|
+
w.value ? (v(), W(e(ye), {
|
|
185
185
|
key: 0,
|
|
186
186
|
type: "danger"
|
|
187
187
|
}, {
|
|
188
188
|
default: l(() => [
|
|
189
|
-
m(p(
|
|
189
|
+
m(p(w.value), 1)
|
|
190
190
|
]),
|
|
191
191
|
_: 1
|
|
192
|
-
})) :
|
|
193
|
-
|
|
194
|
-
t(e(
|
|
192
|
+
})) : J("", !0),
|
|
193
|
+
k.value === "form" ? (v(), V("div", el, [
|
|
194
|
+
t(e(h), {
|
|
195
195
|
label: e(r)("generate.bases"),
|
|
196
196
|
help: e(r)("generate.bases-help"),
|
|
197
|
-
error:
|
|
197
|
+
error: M("categories"),
|
|
198
198
|
required: ""
|
|
199
199
|
}, {
|
|
200
200
|
default: l(() => [
|
|
201
|
-
t(e(
|
|
202
|
-
"
|
|
203
|
-
|
|
201
|
+
t(e(We), {
|
|
202
|
+
placeholder: e(L)("panel.pick-categories"),
|
|
203
|
+
"filter-placeholder": e(u)("filters.search"),
|
|
204
|
+
"empty-text": e(u)("filters.nothing-found"),
|
|
205
|
+
"model-value": B.value,
|
|
206
|
+
nodes: e(N).nodes.value ?? [],
|
|
204
207
|
"node-key": "id",
|
|
205
208
|
"label-key": "name",
|
|
206
209
|
"children-key": "children",
|
|
@@ -208,16 +211,16 @@ const Ze = {
|
|
|
208
211
|
"check-strictly": "",
|
|
209
212
|
filterable: "",
|
|
210
213
|
clearable: "",
|
|
211
|
-
"onUpdate:modelValue":
|
|
212
|
-
}, null, 8, ["model-value", "nodes"])
|
|
214
|
+
"onUpdate:modelValue": s[0] || (s[0] = (o) => B.value = Array.isArray(o) ? o.map(Number) : o ? [Number(o)] : [])
|
|
215
|
+
}, null, 8, ["placeholder", "filter-placeholder", "empty-text", "model-value", "nodes"])
|
|
213
216
|
]),
|
|
214
217
|
_: 1
|
|
215
218
|
}, 8, ["label", "help", "error"]),
|
|
216
|
-
t(e(
|
|
219
|
+
t(e(h), null, {
|
|
217
220
|
default: l(() => [
|
|
218
|
-
t(e(
|
|
219
|
-
modelValue:
|
|
220
|
-
"onUpdate:modelValue":
|
|
221
|
+
t(e(K), {
|
|
222
|
+
modelValue: F.value,
|
|
223
|
+
"onUpdate:modelValue": s[1] || (s[1] = (o) => F.value = o)
|
|
221
224
|
}, {
|
|
222
225
|
default: l(() => [
|
|
223
226
|
m(p(e(r)("generate.subtree")), 1)
|
|
@@ -227,48 +230,49 @@ const Ze = {
|
|
|
227
230
|
]),
|
|
228
231
|
_: 1
|
|
229
232
|
}),
|
|
230
|
-
t(e(
|
|
233
|
+
t(e(h), {
|
|
231
234
|
label: e(r)("generate.facet"),
|
|
232
|
-
error:
|
|
235
|
+
error: M("facet"),
|
|
233
236
|
required: ""
|
|
234
237
|
}, {
|
|
235
238
|
default: l(() => [
|
|
236
|
-
t(e(
|
|
239
|
+
t(e(be), {
|
|
237
240
|
modelValue: U.value,
|
|
238
|
-
"onUpdate:modelValue":
|
|
239
|
-
options:
|
|
240
|
-
disabled:
|
|
241
|
+
"onUpdate:modelValue": s[2] || (s[2] = (o) => U.value = o),
|
|
242
|
+
options: ne.value,
|
|
243
|
+
disabled: B.value.length === 0
|
|
241
244
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
242
245
|
]),
|
|
243
246
|
_: 1
|
|
244
247
|
}, 8, ["label", "error"]),
|
|
245
|
-
t(e(
|
|
248
|
+
t(e(h), {
|
|
246
249
|
label: e(r)("generate.values"),
|
|
247
250
|
help: e(r)("generate.values-help")
|
|
248
251
|
}, {
|
|
249
252
|
default: l(() => [
|
|
250
|
-
t(e(
|
|
251
|
-
modelValue:
|
|
252
|
-
"onUpdate:modelValue":
|
|
253
|
+
t(e(be), {
|
|
254
|
+
modelValue: q.value,
|
|
255
|
+
"onUpdate:modelValue": s[3] || (s[3] = (o) => q.value = o),
|
|
256
|
+
"empty-text": e(u)("filters.nothing-found"),
|
|
253
257
|
options: ue.value,
|
|
254
258
|
multiple: "",
|
|
255
259
|
filterable: "",
|
|
256
260
|
clearable: "",
|
|
257
261
|
disabled: U.value === null
|
|
258
|
-
}, null, 8, ["modelValue", "options", "disabled"])
|
|
262
|
+
}, null, 8, ["modelValue", "empty-text", "options", "disabled"])
|
|
259
263
|
]),
|
|
260
264
|
_: 1
|
|
261
265
|
}, 8, ["label", "help"]),
|
|
262
|
-
t(e(
|
|
266
|
+
t(e(h), {
|
|
263
267
|
label: e(r)("generate.min-products"),
|
|
264
268
|
help: e(r)("generate.min-products-help")
|
|
265
269
|
}, {
|
|
266
270
|
default: l(() => [
|
|
267
|
-
t(e(
|
|
268
|
-
modelValue:
|
|
269
|
-
"onUpdate:modelValue":
|
|
271
|
+
t(e(Ee), {
|
|
272
|
+
modelValue: O.value,
|
|
273
|
+
"onUpdate:modelValue": s[4] || (s[4] = (o) => O.value = o),
|
|
270
274
|
min: 0,
|
|
271
|
-
disabled:
|
|
275
|
+
disabled: q.value.length > 0
|
|
272
276
|
}, null, 8, ["modelValue", "disabled"])
|
|
273
277
|
]),
|
|
274
278
|
_: 1
|
|
@@ -288,72 +292,72 @@ const Ze = {
|
|
|
288
292
|
]),
|
|
289
293
|
_: 1
|
|
290
294
|
}),
|
|
291
|
-
t(e(
|
|
295
|
+
t(e(h), {
|
|
292
296
|
label: e(r)("generate.slug"),
|
|
293
|
-
error:
|
|
297
|
+
error: M("slug")
|
|
294
298
|
}, {
|
|
295
299
|
default: l(() => [
|
|
296
|
-
t(e(
|
|
297
|
-
modelValue:
|
|
298
|
-
"onUpdate:modelValue":
|
|
300
|
+
t(e(ee), {
|
|
301
|
+
modelValue: y.value.slug,
|
|
302
|
+
"onUpdate:modelValue": s[5] || (s[5] = (o) => y.value.slug = o),
|
|
299
303
|
placeholder: "{category}-{value}"
|
|
300
304
|
}, null, 8, ["modelValue"])
|
|
301
305
|
]),
|
|
302
306
|
_: 1
|
|
303
307
|
}, 8, ["label", "error"]),
|
|
304
|
-
t(e(
|
|
308
|
+
t(e(h), {
|
|
305
309
|
label: e(r)("generate.name")
|
|
306
310
|
}, {
|
|
307
311
|
default: l(() => [
|
|
308
|
-
t(e(
|
|
309
|
-
modelValue:
|
|
310
|
-
"onUpdate:modelValue":
|
|
312
|
+
t(e(ee), {
|
|
313
|
+
modelValue: y.value.name,
|
|
314
|
+
"onUpdate:modelValue": s[6] || (s[6] = (o) => y.value.name = o),
|
|
311
315
|
placeholder: "{category} {value}"
|
|
312
316
|
}, null, 8, ["modelValue"])
|
|
313
317
|
]),
|
|
314
318
|
_: 1
|
|
315
319
|
}, 8, ["label"]),
|
|
316
|
-
t(e(
|
|
320
|
+
t(e(h), {
|
|
317
321
|
label: e(r)("generate.h1")
|
|
318
322
|
}, {
|
|
319
323
|
default: l(() => [
|
|
320
|
-
t(e(
|
|
321
|
-
modelValue:
|
|
322
|
-
"onUpdate:modelValue":
|
|
324
|
+
t(e(ee), {
|
|
325
|
+
modelValue: y.value.h1,
|
|
326
|
+
"onUpdate:modelValue": s[7] || (s[7] = (o) => y.value.h1 = o),
|
|
323
327
|
placeholder: e(r)("generate.template-empty")
|
|
324
328
|
}, null, 8, ["modelValue", "placeholder"])
|
|
325
329
|
]),
|
|
326
330
|
_: 1
|
|
327
331
|
}, 8, ["label"]),
|
|
328
|
-
t(e(
|
|
332
|
+
t(e(h), {
|
|
329
333
|
label: e(r)("generate.seo-title")
|
|
330
334
|
}, {
|
|
331
335
|
default: l(() => [
|
|
332
|
-
t(e(
|
|
333
|
-
modelValue:
|
|
334
|
-
"onUpdate:modelValue":
|
|
336
|
+
t(e(ee), {
|
|
337
|
+
modelValue: y.value.title,
|
|
338
|
+
"onUpdate:modelValue": s[8] || (s[8] = (o) => y.value.title = o),
|
|
335
339
|
placeholder: e(r)("generate.template-empty")
|
|
336
340
|
}, null, 8, ["modelValue", "placeholder"])
|
|
337
341
|
]),
|
|
338
342
|
_: 1
|
|
339
343
|
}, 8, ["label"]),
|
|
340
|
-
t(e(
|
|
344
|
+
t(e(h), {
|
|
341
345
|
label: e(r)("generate.seo-description")
|
|
342
346
|
}, {
|
|
343
347
|
default: l(() => [
|
|
344
|
-
t(e(
|
|
345
|
-
modelValue:
|
|
346
|
-
"onUpdate:modelValue":
|
|
348
|
+
t(e(ee), {
|
|
349
|
+
modelValue: y.value.description,
|
|
350
|
+
"onUpdate:modelValue": s[9] || (s[9] = (o) => y.value.description = o),
|
|
347
351
|
placeholder: e(r)("generate.template-empty")
|
|
348
352
|
}, null, 8, ["modelValue", "placeholder"])
|
|
349
353
|
]),
|
|
350
354
|
_: 1
|
|
351
355
|
}, 8, ["label"]),
|
|
352
|
-
t(e(
|
|
356
|
+
t(e(h), null, {
|
|
353
357
|
default: l(() => [
|
|
354
|
-
t(e(
|
|
355
|
-
modelValue:
|
|
356
|
-
"onUpdate:modelValue":
|
|
358
|
+
t(e(K), {
|
|
359
|
+
modelValue: C.value,
|
|
360
|
+
"onUpdate:modelValue": s[10] || (s[10] = (o) => C.value = o)
|
|
357
361
|
}, {
|
|
358
362
|
default: l(() => [
|
|
359
363
|
m(p(e(r)("generate.publish")), 1)
|
|
@@ -363,42 +367,42 @@ const Ze = {
|
|
|
363
367
|
]),
|
|
364
368
|
_: 1
|
|
365
369
|
})
|
|
366
|
-
])) :
|
|
370
|
+
])) : k.value === "preview" && b.value ? (v(), V("div", ll, [
|
|
367
371
|
t(e(R), null, {
|
|
368
372
|
default: l(() => [
|
|
369
|
-
m(p(
|
|
373
|
+
m(p(b.value.free > 0 ? e(r)("generate.summary", { free: b.value.free, skipped: b.value.total - b.value.free }) : e(r)("generate.nothing")), 1)
|
|
370
374
|
]),
|
|
371
375
|
_: 1
|
|
372
376
|
}),
|
|
373
|
-
t(e(
|
|
374
|
-
data:
|
|
375
|
-
columns:
|
|
377
|
+
t(e(Ue), {
|
|
378
|
+
data: ce.value,
|
|
379
|
+
columns: ve.value,
|
|
376
380
|
"row-key": "id",
|
|
377
381
|
flush: "",
|
|
378
382
|
layout: "fixed"
|
|
379
383
|
}, {
|
|
380
|
-
"cell-address": l(({ row:
|
|
381
|
-
P("span",
|
|
384
|
+
"cell-address": l(({ row: o }) => [
|
|
385
|
+
P("span", al, "/" + p(G(o.slug)) + "/", 1)
|
|
382
386
|
]),
|
|
383
|
-
"cell-title": l(({ row:
|
|
384
|
-
m(p(
|
|
387
|
+
"cell-title": l(({ row: o }) => [
|
|
388
|
+
m(p(G(Object.keys(o.h1).length > 0 ? o.h1 : o.name)), 1)
|
|
385
389
|
]),
|
|
386
|
-
"cell-conflict": l(({ row:
|
|
387
|
-
|
|
390
|
+
"cell-conflict": l(({ row: o }) => [
|
|
391
|
+
o.conflict ? (v(), W(e(R), {
|
|
388
392
|
key: 0,
|
|
389
393
|
size: "sm",
|
|
390
394
|
tone: "warning"
|
|
391
395
|
}, {
|
|
392
396
|
default: l(() => [
|
|
393
|
-
m(p(
|
|
397
|
+
m(p(o.message), 1)
|
|
394
398
|
]),
|
|
395
399
|
_: 2
|
|
396
|
-
}, 1024)) :
|
|
400
|
+
}, 1024)) : J("", !0)
|
|
397
401
|
]),
|
|
398
402
|
_: 1
|
|
399
403
|
}, 8, ["data", "columns"])
|
|
400
|
-
])) :
|
|
401
|
-
|
|
404
|
+
])) : k.value === "run" && c.value ? (v(), V("div", tl, [
|
|
405
|
+
Y.value ? (v(), W(e(ye), {
|
|
402
406
|
key: 1,
|
|
403
407
|
type: c.value.status === "failed" ? "danger" : "success"
|
|
404
408
|
}, {
|
|
@@ -406,187 +410,187 @@ const Ze = {
|
|
|
406
410
|
m(p(c.value.status === "failed" ? e(r)("generate.failed") : e(r)("generate.done", { done: c.value.done, skipped: c.value.skipped, failed: c.value.failed })), 1)
|
|
407
411
|
]),
|
|
408
412
|
_: 1
|
|
409
|
-
}, 8, ["type"])) : (v(),
|
|
413
|
+
}, 8, ["type"])) : (v(), V(ae, { key: 0 }, [
|
|
410
414
|
t(e(R), null, {
|
|
411
415
|
default: l(() => [
|
|
412
416
|
m(p(e(r)("generate.running")), 1)
|
|
413
417
|
]),
|
|
414
418
|
_: 1
|
|
415
419
|
}),
|
|
416
|
-
t(e(
|
|
420
|
+
t(e(Fe), {
|
|
417
421
|
value: c.value.done + c.value.failed,
|
|
418
422
|
max: Math.max(1, c.value.total - c.value.skipped)
|
|
419
423
|
}, null, 8, ["value", "max"])
|
|
420
424
|
], 64)),
|
|
421
|
-
c.value.errors.length > 0 ? (v(),
|
|
422
|
-
(v(!0),
|
|
423
|
-
P("strong", null, "/" + p(
|
|
424
|
-
m(" — " + p(
|
|
425
|
+
c.value.errors.length > 0 ? (v(), V("ul", nl, [
|
|
426
|
+
(v(!0), V(ae, null, we(c.value.errors, (o, me) => (v(), V("li", { key: me }, [
|
|
427
|
+
P("strong", null, "/" + p(o.slug) + "/", 1),
|
|
428
|
+
m(" — " + p(o.message), 1)
|
|
425
429
|
]))), 128))
|
|
426
|
-
])) :
|
|
427
|
-
])) :
|
|
430
|
+
])) : J("", !0)
|
|
431
|
+
])) : J("", !0)
|
|
428
432
|
]),
|
|
429
433
|
_: 1
|
|
430
434
|
}, 8, ["open", "title", "width"]));
|
|
431
435
|
}
|
|
432
|
-
}),
|
|
436
|
+
}), ol = /* @__PURE__ */ Ne(ul, [["__scopeId", "data-v-5b95e3af"]]), sl = { class: "wx-catalog-landings" }, il = { class: "wx-catalog-landings__name" }, rl = { class: "wx-catalog-landings__title" }, dl = { class: "wx-catalog-landings__slug" }, cl = { class: "wx-catalog-landings__chips" }, pl = {
|
|
433
437
|
key: 2,
|
|
434
438
|
class: "wx-catalog-landings__count"
|
|
435
|
-
},
|
|
439
|
+
}, vl = { class: "wx-catalog-landings__state" }, ml = { class: "wx-catalog-landings__sr" }, ge = "root", gl = /* @__PURE__ */ ke({
|
|
436
440
|
name: "WxCatalogLandingsPage",
|
|
437
441
|
__name: "LandingsPage",
|
|
438
442
|
props: {
|
|
439
443
|
base: { default: "/catalog" }
|
|
440
444
|
},
|
|
441
|
-
setup(
|
|
442
|
-
const D =
|
|
443
|
-
|
|
444
|
-
const u =
|
|
445
|
-
let
|
|
446
|
-
const
|
|
445
|
+
setup(fe) {
|
|
446
|
+
const D = fe, E = ze(), A = Ce(E), T = qe(E), N = Oe(), X = Ie(), r = Ve();
|
|
447
|
+
Se();
|
|
448
|
+
const u = Q(Te), L = Q("webx-admin"), te = Q("webx-catalog"), k = $e(), B = Ge(ol), F = _(() => `${D.base}/landings`), U = _(() => E.can("catalog.manage")), q = g(null), O = g(!0), y = (n) => N.query[n] === "1", C = g(String(N.query.q ?? "")), z = g(Number(N.query.page ?? 1) || 1), f = g(N.query.category ? String(N.query.category) : null), w = g(y("attention")), x = g(y("published")), b = g(y("empty")), c = g(y("trashed"));
|
|
449
|
+
let ne = 25;
|
|
450
|
+
const ue = _(
|
|
447
451
|
() => E.state.manifest?.modules.find((n) => n.id === "catalog-landings")?.title ?? u("module.title")
|
|
448
|
-
), oe =
|
|
452
|
+
), oe = _(() => [
|
|
449
453
|
{
|
|
450
|
-
id:
|
|
454
|
+
id: ge,
|
|
451
455
|
name: u("landing.whole-catalog"),
|
|
452
456
|
parent_id: null,
|
|
453
457
|
children: []
|
|
454
458
|
},
|
|
455
|
-
...
|
|
456
|
-
]),
|
|
459
|
+
...T.nodes.value ?? []
|
|
460
|
+
]), se = _(() => {
|
|
457
461
|
if (f.value === null) return "";
|
|
458
|
-
if (f.value ===
|
|
462
|
+
if (f.value === ge) return u("landing.whole-catalog");
|
|
459
463
|
const n = (i) => i.reduce(
|
|
460
|
-
(a,
|
|
464
|
+
(a, S) => a || (String(S.id) === f.value ? S.name : n(S.children ?? [])),
|
|
461
465
|
""
|
|
462
466
|
);
|
|
463
|
-
return n(
|
|
464
|
-
}),
|
|
467
|
+
return n(T.nodes.value ?? []) || `#${f.value}`;
|
|
468
|
+
}), M = _(() => {
|
|
465
469
|
const n = [];
|
|
466
470
|
f.value !== null && n.push({
|
|
467
471
|
key: "base",
|
|
468
|
-
label: `${u("panel.filter-base")}: ${
|
|
472
|
+
label: `${u("panel.filter-base")}: ${se.value}`,
|
|
469
473
|
clear: () => f.value = null
|
|
470
474
|
});
|
|
471
|
-
for (const [i, a,
|
|
472
|
-
["attention",
|
|
473
|
-
["published",
|
|
474
|
-
["empty",
|
|
475
|
-
["trashed",
|
|
475
|
+
for (const [i, a, S] of [
|
|
476
|
+
["attention", w, "panel.filter-attention"],
|
|
477
|
+
["published", x, "panel.filter-published"],
|
|
478
|
+
["empty", b, "panel.filter-empty"],
|
|
479
|
+
["trashed", c, "panel.filter-trashed"]
|
|
476
480
|
])
|
|
477
|
-
a.value && n.push({ key: i, label: u(
|
|
481
|
+
a.value && n.push({ key: i, label: u(S), clear: () => a.value = !1 });
|
|
478
482
|
return n;
|
|
479
483
|
});
|
|
480
|
-
function
|
|
481
|
-
f.value = null,
|
|
484
|
+
function ie() {
|
|
485
|
+
f.value = null, w.value = !1, x.value = !1, b.value = !1, c.value = !1;
|
|
482
486
|
}
|
|
483
|
-
function
|
|
487
|
+
function re(n) {
|
|
484
488
|
return {
|
|
485
|
-
q: n?.search ??
|
|
489
|
+
q: n?.search ?? C.value,
|
|
486
490
|
category: f.value ?? void 0,
|
|
487
|
-
attention:
|
|
488
|
-
published:
|
|
489
|
-
empty:
|
|
490
|
-
trashed:
|
|
491
|
-
page: n?.page ??
|
|
492
|
-
per_page: n?.perPage ??
|
|
491
|
+
attention: w.value || void 0,
|
|
492
|
+
published: x.value || void 0,
|
|
493
|
+
empty: b.value || void 0,
|
|
494
|
+
trashed: c.value || void 0,
|
|
495
|
+
page: n?.page ?? z.value,
|
|
496
|
+
per_page: n?.perPage ?? ne
|
|
493
497
|
};
|
|
494
498
|
}
|
|
495
|
-
let
|
|
496
|
-
async function
|
|
497
|
-
const i = ++
|
|
498
|
-
|
|
499
|
+
let j = 0;
|
|
500
|
+
async function $(n) {
|
|
501
|
+
const i = ++j;
|
|
502
|
+
O.value = !0;
|
|
499
503
|
try {
|
|
500
|
-
const a = await A.list(
|
|
501
|
-
i ===
|
|
504
|
+
const a = await A.list(re(n));
|
|
505
|
+
i === j && (q.value = a);
|
|
502
506
|
} catch (a) {
|
|
503
|
-
I.danger(
|
|
507
|
+
I.danger(k(a));
|
|
504
508
|
} finally {
|
|
505
|
-
i ===
|
|
509
|
+
i === j && (O.value = !1);
|
|
506
510
|
}
|
|
507
511
|
}
|
|
508
|
-
function
|
|
509
|
-
const n = {}, i =
|
|
512
|
+
function de() {
|
|
513
|
+
const n = {}, i = re();
|
|
510
514
|
i.q && (n.q = i.q), i.category && (n.category = i.category), i.page && i.page > 1 && (n.page = String(i.page));
|
|
511
515
|
for (const a of ["attention", "published", "empty", "trashed"])
|
|
512
516
|
i[a] && (n[a] = "1");
|
|
513
|
-
|
|
517
|
+
X.replace({ query: n });
|
|
514
518
|
}
|
|
515
|
-
function
|
|
516
|
-
|
|
519
|
+
function Y(n) {
|
|
520
|
+
ne = n.perPage, $(n);
|
|
517
521
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}),
|
|
521
|
-
const
|
|
522
|
+
pe([f, w, x, b, c], () => {
|
|
523
|
+
z.value = 1, de(), $();
|
|
524
|
+
}), pe([C, z], de);
|
|
525
|
+
const Z = _(() => [
|
|
522
526
|
{ key: "name", label: u("panel.column-name"), minWidth: 220 },
|
|
523
527
|
{ key: "category", label: u("panel.column-base"), width: 180, hideBelow: 760 },
|
|
524
528
|
{ key: "chips", label: u("panel.column-set"), minWidth: 180, hideBelow: 640 },
|
|
525
529
|
{ key: "products_count", label: u("panel.column-count"), width: 110, align: "right" },
|
|
526
530
|
{ key: "state", label: u("panel.column-state"), width: 170, hideBelow: 900 },
|
|
527
531
|
{ key: "updated_at", label: u("panel.column-updated"), width: 130, hideBelow: 1180 },
|
|
528
|
-
{ key: "actions", label: "", width:
|
|
529
|
-
]),
|
|
530
|
-
function
|
|
531
|
-
|
|
532
|
+
{ key: "actions", label: "", width: Ke, align: "right" }
|
|
533
|
+
]), G = (n) => _e(n.name, r.active.value, "") || `#${n.id}`, ve = (n) => _e(n.slug, r.active.value, "");
|
|
534
|
+
function ce(n) {
|
|
535
|
+
X.push(`${F.value}/${n.id}`);
|
|
532
536
|
}
|
|
533
|
-
async function
|
|
537
|
+
async function d(n, i) {
|
|
534
538
|
try {
|
|
535
|
-
await A.publish(n.id, i), I.success(u(i ? "panel.published-toast" : "panel.unpublished-toast")), await
|
|
539
|
+
await A.publish(n.id, i), I.success(u(i ? "panel.published-toast" : "panel.unpublished-toast")), await $();
|
|
536
540
|
} catch (a) {
|
|
537
|
-
I.danger(
|
|
541
|
+
I.danger(k(a));
|
|
538
542
|
}
|
|
539
543
|
}
|
|
540
544
|
async function s(n) {
|
|
541
|
-
if (await
|
|
542
|
-
title: u("panel.delete-title", { name:
|
|
545
|
+
if (await Je({
|
|
546
|
+
title: u("panel.delete-title", { name: G(n) }),
|
|
543
547
|
message: u("panel.delete-text"),
|
|
544
548
|
confirmText: u("panel.delete"),
|
|
545
549
|
cancelText: u("panel.cancel"),
|
|
546
550
|
tone: "danger"
|
|
547
551
|
}))
|
|
548
552
|
try {
|
|
549
|
-
await A.remove(n.id), I.success(u("panel.deleted")), await
|
|
553
|
+
await A.remove(n.id), I.success(u("panel.deleted")), await $();
|
|
550
554
|
} catch (a) {
|
|
551
|
-
I.danger(
|
|
555
|
+
I.danger(k(a));
|
|
552
556
|
}
|
|
553
557
|
}
|
|
554
|
-
async function
|
|
558
|
+
async function o(n) {
|
|
555
559
|
try {
|
|
556
|
-
await A.restore(n.id), I.success(u("panel.restored")), await
|
|
560
|
+
await A.restore(n.id), I.success(u("panel.restored")), await $();
|
|
557
561
|
} catch (i) {
|
|
558
|
-
I.danger(
|
|
562
|
+
I.danger(k(i));
|
|
559
563
|
}
|
|
560
564
|
}
|
|
561
|
-
function
|
|
565
|
+
function me(n) {
|
|
562
566
|
if (n.deleted_at !== null)
|
|
563
|
-
return
|
|
567
|
+
return U.value ? [
|
|
564
568
|
{
|
|
565
569
|
key: "restore",
|
|
566
570
|
icon: "refresh",
|
|
567
571
|
label: u("panel.restore"),
|
|
568
572
|
run: () => {
|
|
569
|
-
|
|
573
|
+
o(n);
|
|
570
574
|
}
|
|
571
575
|
}
|
|
572
576
|
] : [];
|
|
573
577
|
const i = [
|
|
574
|
-
{ key: "open", icon: "edit", label: u("panel.open"), run: () =>
|
|
578
|
+
{ key: "open", icon: "edit", label: u("panel.open"), run: () => ce(n) }
|
|
575
579
|
];
|
|
576
|
-
return n.url && i.push({ key: "site", icon: "link", label: u("panel.open-site"), href: n.url }),
|
|
580
|
+
return n.url && i.push({ key: "site", icon: "link", label: u("panel.open-site"), href: n.url }), U.value && i.push(
|
|
577
581
|
n.is_published ? {
|
|
578
582
|
key: "unpublish",
|
|
579
583
|
icon: "eye-off",
|
|
580
584
|
label: u("panel.unpublish"),
|
|
581
585
|
run: () => {
|
|
582
|
-
|
|
586
|
+
d(n, !1);
|
|
583
587
|
}
|
|
584
588
|
} : {
|
|
585
589
|
key: "publish",
|
|
586
590
|
icon: "eye",
|
|
587
591
|
label: u("panel.publish"),
|
|
588
592
|
run: () => {
|
|
589
|
-
|
|
593
|
+
d(n, !0);
|
|
590
594
|
}
|
|
591
595
|
},
|
|
592
596
|
{
|
|
@@ -600,67 +604,71 @@ const Ze = {
|
|
|
600
604
|
}
|
|
601
605
|
), i;
|
|
602
606
|
}
|
|
603
|
-
async function
|
|
604
|
-
await
|
|
607
|
+
async function Be() {
|
|
608
|
+
await B({ base: D.base }) && await $();
|
|
605
609
|
}
|
|
606
|
-
const
|
|
607
|
-
() =>
|
|
610
|
+
const Me = _(
|
|
611
|
+
() => U.value ? [
|
|
608
612
|
{
|
|
609
613
|
key: "new",
|
|
610
614
|
label: u("panel.new"),
|
|
611
615
|
icon: "plus",
|
|
612
616
|
primary: !0,
|
|
613
617
|
run: () => {
|
|
614
|
-
|
|
615
|
-
path: `${
|
|
616
|
-
query: f.value && f.value !==
|
|
618
|
+
X.push({
|
|
619
|
+
path: `${F.value}/new`,
|
|
620
|
+
query: f.value && f.value !== ge ? { category: f.value } : {}
|
|
617
621
|
});
|
|
618
622
|
}
|
|
619
623
|
},
|
|
620
624
|
{ key: "generate", label: u("panel.generate"), icon: "grid", run: () => {
|
|
621
|
-
|
|
625
|
+
Be();
|
|
622
626
|
} }
|
|
623
627
|
] : []
|
|
624
|
-
),
|
|
625
|
-
() =>
|
|
628
|
+
), Pe = _(
|
|
629
|
+
() => M.value.length > 0 || C.value ? u("panel.nothing-found") : u("panel.empty")
|
|
626
630
|
);
|
|
627
|
-
return
|
|
628
|
-
|
|
631
|
+
return xe(() => {
|
|
632
|
+
T.load().catch(() => {
|
|
629
633
|
});
|
|
630
|
-
}), (n, i) => (v(),
|
|
631
|
-
t(e(
|
|
632
|
-
title:
|
|
633
|
-
actions:
|
|
634
|
+
}), (n, i) => (v(), V("div", sl, [
|
|
635
|
+
t(e(Qe), {
|
|
636
|
+
title: ue.value,
|
|
637
|
+
actions: Me.value
|
|
634
638
|
}, {
|
|
635
639
|
default: l(() => [
|
|
636
|
-
t(e(
|
|
637
|
-
search:
|
|
638
|
-
"onUpdate:search": i[5] || (i[5] = (a) =>
|
|
639
|
-
page:
|
|
640
|
-
"onUpdate:page": i[6] || (i[6] = (a) =>
|
|
641
|
-
|
|
642
|
-
|
|
640
|
+
t(e(Ue), {
|
|
641
|
+
search: C.value,
|
|
642
|
+
"onUpdate:search": i[5] || (i[5] = (a) => C.value = a),
|
|
643
|
+
page: z.value,
|
|
644
|
+
"onUpdate:page": i[6] || (i[6] = (a) => z.value = a),
|
|
645
|
+
"loading-text": e(L)("filters.loading"),
|
|
646
|
+
data: q.value,
|
|
647
|
+
columns: Z.value,
|
|
643
648
|
"row-key": "id",
|
|
644
649
|
searchable: "",
|
|
645
650
|
clickable: "",
|
|
646
651
|
hover: "",
|
|
647
652
|
flush: "",
|
|
648
|
-
loading:
|
|
653
|
+
loading: O.value,
|
|
649
654
|
layout: "fixed",
|
|
650
|
-
"filters-count":
|
|
651
|
-
"filters-label": e(
|
|
655
|
+
"filters-count": M.value.length,
|
|
656
|
+
"filters-label": e(L)("filters.title"),
|
|
652
657
|
"search-placeholder": e(u)("panel.search"),
|
|
653
|
-
"empty-text":
|
|
654
|
-
"aria-label":
|
|
655
|
-
onRowClick:
|
|
656
|
-
onStateChange:
|
|
658
|
+
"empty-text": Pe.value,
|
|
659
|
+
"aria-label": ue.value,
|
|
660
|
+
onRowClick: ce,
|
|
661
|
+
onStateChange: Y
|
|
657
662
|
}, {
|
|
658
663
|
filters: l(() => [
|
|
659
|
-
t(e(
|
|
664
|
+
t(e(h), {
|
|
660
665
|
label: e(u)("panel.filter-base")
|
|
661
666
|
}, {
|
|
662
667
|
default: l(() => [
|
|
663
|
-
t(e(
|
|
668
|
+
t(e(We), {
|
|
669
|
+
placeholder: e(te)("panel.any"),
|
|
670
|
+
"filter-placeholder": e(L)("filters.search"),
|
|
671
|
+
"empty-text": e(L)("filters.nothing-found"),
|
|
664
672
|
"model-value": f.value,
|
|
665
673
|
nodes: oe.value,
|
|
666
674
|
"node-key": "id",
|
|
@@ -671,77 +679,77 @@ const Ze = {
|
|
|
671
679
|
clearable: "",
|
|
672
680
|
size: "sm",
|
|
673
681
|
"onUpdate:modelValue": i[0] || (i[0] = (a) => f.value = a == null || Array.isArray(a) ? null : String(a))
|
|
674
|
-
}, null, 8, ["model-value", "nodes"])
|
|
682
|
+
}, null, 8, ["placeholder", "filter-placeholder", "empty-text", "model-value", "nodes"])
|
|
675
683
|
]),
|
|
676
684
|
_: 1
|
|
677
685
|
}, 8, ["label"]),
|
|
678
|
-
t(e(
|
|
686
|
+
t(e(h), null, {
|
|
679
687
|
default: l(() => [
|
|
680
|
-
t(e(
|
|
681
|
-
modelValue:
|
|
682
|
-
"onUpdate:modelValue": i[1] || (i[1] = (a) =>
|
|
688
|
+
t(e(K), {
|
|
689
|
+
modelValue: w.value,
|
|
690
|
+
"onUpdate:modelValue": i[1] || (i[1] = (a) => w.value = a),
|
|
683
691
|
size: "sm",
|
|
684
692
|
label: e(u)("panel.filter-attention")
|
|
685
693
|
}, null, 8, ["modelValue", "label"])
|
|
686
694
|
]),
|
|
687
695
|
_: 1
|
|
688
696
|
}),
|
|
689
|
-
t(e(
|
|
697
|
+
t(e(h), null, {
|
|
690
698
|
default: l(() => [
|
|
691
|
-
t(e(
|
|
692
|
-
modelValue:
|
|
693
|
-
"onUpdate:modelValue": i[2] || (i[2] = (a) =>
|
|
699
|
+
t(e(K), {
|
|
700
|
+
modelValue: x.value,
|
|
701
|
+
"onUpdate:modelValue": i[2] || (i[2] = (a) => x.value = a),
|
|
694
702
|
size: "sm",
|
|
695
703
|
label: e(u)("panel.filter-published")
|
|
696
704
|
}, null, 8, ["modelValue", "label"])
|
|
697
705
|
]),
|
|
698
706
|
_: 1
|
|
699
707
|
}),
|
|
700
|
-
t(e(
|
|
708
|
+
t(e(h), null, {
|
|
701
709
|
default: l(() => [
|
|
702
|
-
t(e(
|
|
703
|
-
modelValue:
|
|
704
|
-
"onUpdate:modelValue": i[3] || (i[3] = (a) =>
|
|
710
|
+
t(e(K), {
|
|
711
|
+
modelValue: b.value,
|
|
712
|
+
"onUpdate:modelValue": i[3] || (i[3] = (a) => b.value = a),
|
|
705
713
|
size: "sm",
|
|
706
714
|
label: e(u)("panel.filter-empty")
|
|
707
715
|
}, null, 8, ["modelValue", "label"])
|
|
708
716
|
]),
|
|
709
717
|
_: 1
|
|
710
718
|
}),
|
|
711
|
-
t(e(
|
|
719
|
+
t(e(h), null, {
|
|
712
720
|
default: l(() => [
|
|
713
|
-
t(e(
|
|
714
|
-
modelValue:
|
|
715
|
-
"onUpdate:modelValue": i[4] || (i[4] = (a) =>
|
|
721
|
+
t(e(K), {
|
|
722
|
+
modelValue: c.value,
|
|
723
|
+
"onUpdate:modelValue": i[4] || (i[4] = (a) => c.value = a),
|
|
716
724
|
size: "sm",
|
|
717
725
|
label: e(u)("panel.filter-trashed")
|
|
718
726
|
}, null, 8, ["modelValue", "label"])
|
|
719
727
|
]),
|
|
720
728
|
_: 1
|
|
721
729
|
}),
|
|
722
|
-
|
|
730
|
+
M.value.length > 0 ? (v(), W(e(H), {
|
|
723
731
|
key: 0,
|
|
724
732
|
variant: "text",
|
|
725
733
|
size: "sm",
|
|
726
734
|
block: "",
|
|
727
|
-
onClick:
|
|
735
|
+
onClick: ie
|
|
728
736
|
}, {
|
|
729
737
|
icon: l(() => [
|
|
730
|
-
t(e(
|
|
738
|
+
t(e(he), { name: "close" })
|
|
731
739
|
]),
|
|
732
740
|
default: l(() => [
|
|
733
|
-
m(" " + p(e(
|
|
741
|
+
m(" " + p(e(L)("filters.reset")), 1)
|
|
734
742
|
]),
|
|
735
743
|
_: 1
|
|
736
|
-
})) :
|
|
744
|
+
})) : J("", !0)
|
|
737
745
|
]),
|
|
738
746
|
applied: l(() => [
|
|
739
|
-
t(e(
|
|
747
|
+
t(e(Ze), { filters: M.value }, null, 8, ["filters"])
|
|
740
748
|
]),
|
|
741
749
|
"cell-name": l(({ row: a }) => [
|
|
742
|
-
P("div",
|
|
743
|
-
P("span",
|
|
744
|
-
P("span",
|
|
750
|
+
P("div", il, [
|
|
751
|
+
P("span", rl, p(G(a)), 1),
|
|
752
|
+
P("span", dl, "/" + p(ve(a)) + "/", 1)
|
|
745
753
|
])
|
|
746
754
|
]),
|
|
747
755
|
"cell-category": l(({ row: a }) => [
|
|
@@ -757,21 +765,21 @@ const Ze = {
|
|
|
757
765
|
}, 1032, ["tone"])
|
|
758
766
|
]),
|
|
759
767
|
"cell-chips": l(({ row: a }) => [
|
|
760
|
-
P("div",
|
|
761
|
-
(v(!0),
|
|
762
|
-
key:
|
|
768
|
+
P("div", cl, [
|
|
769
|
+
(v(!0), V(ae, null, we(a.chips, (S) => (v(), W(e(le), {
|
|
770
|
+
key: S.key,
|
|
763
771
|
size: "sm",
|
|
764
772
|
variant: "soft"
|
|
765
773
|
}, {
|
|
766
774
|
default: l(() => [
|
|
767
|
-
m(p(
|
|
775
|
+
m(p(S.label) + ": " + p(S.text), 1)
|
|
768
776
|
]),
|
|
769
777
|
_: 2
|
|
770
778
|
}, 1024))), 128))
|
|
771
779
|
])
|
|
772
780
|
]),
|
|
773
781
|
"cell-products_count": l(({ row: a }) => [
|
|
774
|
-
a.products_count === null ? (v(),
|
|
782
|
+
a.products_count === null ? (v(), W(e(R), {
|
|
775
783
|
key: 0,
|
|
776
784
|
size: "sm",
|
|
777
785
|
tone: "muted"
|
|
@@ -780,7 +788,7 @@ const Ze = {
|
|
|
780
788
|
m(p(e(u)("panel.not-counted")), 1)
|
|
781
789
|
]),
|
|
782
790
|
_: 1
|
|
783
|
-
})) : a.products_count === 0 ? (v(),
|
|
791
|
+
})) : a.products_count === 0 ? (v(), W(e(le), {
|
|
784
792
|
key: 1,
|
|
785
793
|
type: "warning",
|
|
786
794
|
size: "sm",
|
|
@@ -790,11 +798,11 @@ const Ze = {
|
|
|
790
798
|
m("0", -1)
|
|
791
799
|
])]),
|
|
792
800
|
_: 1
|
|
793
|
-
})) : (v(),
|
|
801
|
+
})) : (v(), V("span", pl, p(a.products_count), 1))
|
|
794
802
|
]),
|
|
795
803
|
"cell-state": l(({ row: a }) => [
|
|
796
|
-
P("div",
|
|
797
|
-
a.deleted_at ? (v(),
|
|
804
|
+
P("div", vl, [
|
|
805
|
+
a.deleted_at ? (v(), W(e(le), {
|
|
798
806
|
key: 0,
|
|
799
807
|
dot: "",
|
|
800
808
|
size: "sm"
|
|
@@ -803,7 +811,7 @@ const Ze = {
|
|
|
803
811
|
m(p(e(u)("panel.in-bin")), 1)
|
|
804
812
|
]),
|
|
805
813
|
_: 1
|
|
806
|
-
})) : (v(),
|
|
814
|
+
})) : (v(), W(e(le), {
|
|
807
815
|
key: 1,
|
|
808
816
|
type: a.is_published ? "success" : "default",
|
|
809
817
|
dot: "",
|
|
@@ -814,51 +822,51 @@ const Ze = {
|
|
|
814
822
|
]),
|
|
815
823
|
_: 2
|
|
816
824
|
}, 1032, ["type"])),
|
|
817
|
-
a.attention ? (v(),
|
|
825
|
+
a.attention ? (v(), W(e(He), {
|
|
818
826
|
key: 2,
|
|
819
827
|
content: e(u)(`landing.attention-${a.attention}`)
|
|
820
828
|
}, {
|
|
821
829
|
default: l(() => [
|
|
822
|
-
t(e(
|
|
830
|
+
t(e(le), {
|
|
823
831
|
type: "warning",
|
|
824
832
|
size: "sm",
|
|
825
833
|
round: ""
|
|
826
834
|
}, {
|
|
827
835
|
default: l(() => [
|
|
828
|
-
t(e(
|
|
836
|
+
t(e(he), {
|
|
829
837
|
name: "warning",
|
|
830
838
|
size: "sm"
|
|
831
839
|
}),
|
|
832
|
-
P("span",
|
|
840
|
+
P("span", ml, p(e(u)("landing.attention")), 1)
|
|
833
841
|
]),
|
|
834
842
|
_: 1
|
|
835
843
|
})
|
|
836
844
|
]),
|
|
837
845
|
_: 1
|
|
838
|
-
}, 8, ["content"])) :
|
|
846
|
+
}, 8, ["content"])) : J("", !0)
|
|
839
847
|
])
|
|
840
848
|
]),
|
|
841
849
|
"cell-updated_at": l(({ row: a }) => [
|
|
842
|
-
t(e(
|
|
850
|
+
t(e(Ye), {
|
|
843
851
|
value: a.updated_at,
|
|
844
852
|
compact: ""
|
|
845
853
|
}, null, 8, ["value"])
|
|
846
854
|
]),
|
|
847
855
|
"cell-actions": l(({ row: a }) => [
|
|
848
|
-
t(e(
|
|
849
|
-
actions:
|
|
850
|
-
label:
|
|
856
|
+
t(e(Xe), {
|
|
857
|
+
actions: me(a),
|
|
858
|
+
label: G(a)
|
|
851
859
|
}, null, 8, ["actions", "label"])
|
|
852
860
|
]),
|
|
853
861
|
_: 1
|
|
854
|
-
}, 8, ["search", "page", "data", "columns", "loading", "filters-count", "filters-label", "search-placeholder", "empty-text", "aria-label"])
|
|
862
|
+
}, 8, ["search", "page", "loading-text", "data", "columns", "loading", "filters-count", "filters-label", "search-placeholder", "empty-text", "aria-label"])
|
|
855
863
|
]),
|
|
856
864
|
_: 1
|
|
857
865
|
}, 8, ["title", "actions"])
|
|
858
866
|
]));
|
|
859
867
|
}
|
|
860
|
-
}),
|
|
868
|
+
}), xl = /* @__PURE__ */ Ne(gl, [["__scopeId", "data-v-528d5912"]]);
|
|
861
869
|
export {
|
|
862
|
-
|
|
870
|
+
xl as default
|
|
863
871
|
};
|
|
864
|
-
//# sourceMappingURL=LandingsPage-
|
|
872
|
+
//# sourceMappingURL=LandingsPage-D3IHE6TR.js.map
|