@webx-ui/module-admin 0.16.0 → 0.16.1
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/index.js +323 -318
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { inject as ne, reactive as pe, defineComponent as
|
|
2
|
-
import { RouterLink as
|
|
3
|
-
import { WxSortableList as
|
|
4
|
-
import { watchSystemTheme as
|
|
5
|
-
import { WxScreenRenderer as
|
|
1
|
+
import { inject as ne, reactive as pe, defineComponent as R, useModel as de, ref as W, watch as ee, computed as x, openBlock as p, createElementBlock as T, createVNode as b, unref as n, withCtx as g, createElementVNode as O, toDisplayString as L, createBlock as $, createTextVNode as V, createCommentVNode as U, mergeModels as oe, onMounted as Le, Fragment as H, renderList as Q, mergeProps as Ke, withModifiers as qe, useSlots as gt, useTemplateRef as Ye, normalizeClass as ae, renderSlot as F, createSlots as Ae, provide as Xe, normalizeProps as yt, guardReactiveProps as bt, resolveComponent as j, watchEffect as wt, onUnmounted as xt, isRef as Ge, createApp as kt, h as re, nextTick as Je, withKeys as Qe, onBeforeUnmount as Ze } from "vue";
|
|
2
|
+
import { RouterLink as _t, useRouter as ge, useRoute as et, createRouter as $t, createWebHistory as Tt, onBeforeRouteLeave as St } from "vue-router";
|
|
3
|
+
import { WxSortableList as tt, WxAction as se, WxBadge as ze, WxSelect as at, WxSegmented as Ct, WxAutocomplete as Be, WxText as G, WxInput as ye, WxCheckbox as Ie, WxActions as Wt, WxDropdownItem as Lt, useElementWidth as At, WxHeading as zt, WxButton as Z, WxIcon as Ve, WxTabs as Vt, WxCard as Se, WxRichText as Et, useLocales as nt, WxAlert as be, WxResult as Ut, useResponsiveShell as Rt, shellLayoutFor as Nt, WxToaster as Bt, WebxUI as It, dateLocaleKey as Pt, localesKey as Dt, useModal as Mt, WxDialog as lt, WxFormItem as Ft, WxSpace as Ot, createModal as Ht, WxSkeleton as ue, WxEmpty as ot, WxTooltip as st, toast as D, confirm as he, localizedValue as jt, WxBreadcrumb as Kt, WxBreadcrumbItem as Pe, WxActionBar as qt, WxPopover as Yt, WxAvatar as Xt, WxTextarea as De } from "@webx-ui/core";
|
|
4
|
+
import { watchSystemTheme as Gt, applyTheme as Jt, systemTheme as Qt } from "@webx-ui/tokens";
|
|
5
|
+
import { WxScreenRenderer as Zt } from "@webx-ui/schema";
|
|
6
6
|
const we = /* @__PURE__ */ Symbol("webx-i18n");
|
|
7
|
-
function
|
|
7
|
+
function ea() {
|
|
8
8
|
const e = ne(we, null);
|
|
9
9
|
if (e === null)
|
|
10
10
|
throw new Error("useI18n() was called outside a panel created by createAdmin().");
|
|
@@ -14,7 +14,7 @@ function P(e) {
|
|
|
14
14
|
const t = ne(we, null);
|
|
15
15
|
return t === null ? Ee().scope(e) : t.scope(e);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function ta(e, t) {
|
|
18
18
|
e.provide(we, t);
|
|
19
19
|
}
|
|
20
20
|
function Ee(e = {}) {
|
|
@@ -37,7 +37,7 @@ function Ee(e = {}) {
|
|
|
37
37
|
const [h, m] = u.includes("::") ? u.split("::", 2) : [r, u], v = m.split("."), d = s(i.value, h, v) ?? s(l, h, v) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
|
|
38
38
|
// label says nothing to anybody trying to fix it.
|
|
39
39
|
u;
|
|
40
|
-
return c === void 0 ? d :
|
|
40
|
+
return c === void 0 ? d : aa(d, c);
|
|
41
41
|
}
|
|
42
42
|
return {
|
|
43
43
|
state: a,
|
|
@@ -53,7 +53,7 @@ function Ee(e = {}) {
|
|
|
53
53
|
t: (r, u) => o("", r, u)
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function aa(e, t) {
|
|
57
57
|
let a = e;
|
|
58
58
|
for (const [l, i] of Object.entries(t))
|
|
59
59
|
a = a.replaceAll(`:${l}`, String(i));
|
|
@@ -76,12 +76,12 @@ function xe(e, t) {
|
|
|
76
76
|
})
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function na(e, t, a, l = null) {
|
|
80
80
|
const i = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`;
|
|
81
81
|
return e.http.post(`${i}/reorder`, l === null ? { ids: a } : { ids: a, category: l }).then(() => {
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
const
|
|
84
|
+
const la = { class: "wx-categories-field" }, oa = { class: "wx-categories-field__name" }, sa = /* @__PURE__ */ R({
|
|
85
85
|
name: "WxCategoriesField",
|
|
86
86
|
__name: "CategoriesField",
|
|
87
87
|
props: /* @__PURE__ */ oe({
|
|
@@ -99,7 +99,7 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
|
|
|
99
99
|
}),
|
|
100
100
|
emits: ["update:modelValue"],
|
|
101
101
|
setup(e) {
|
|
102
|
-
const t = e, a =
|
|
102
|
+
const t = e, a = de(e, "modelValue"), l = X(), i = P("webx-admin"), s = W([]);
|
|
103
103
|
ee(
|
|
104
104
|
() => t.source,
|
|
105
105
|
async (v) => {
|
|
@@ -126,8 +126,8 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
|
|
|
126
126
|
function m(v) {
|
|
127
127
|
a.value = o.value.filter((d) => d !== v);
|
|
128
128
|
}
|
|
129
|
-
return (v, d) => (p(), T("div",
|
|
130
|
-
b(n(
|
|
129
|
+
return (v, d) => (p(), T("div", la, [
|
|
130
|
+
b(n(tt), {
|
|
131
131
|
modelValue: u.value,
|
|
132
132
|
"onUpdate:modelValue": d[0] || (d[0] = (w) => u.value = w),
|
|
133
133
|
plain: "",
|
|
@@ -138,7 +138,7 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
|
|
|
138
138
|
"empty-text": t.emptyText ?? n(i)("categories.field-empty")
|
|
139
139
|
}, {
|
|
140
140
|
default: g(({ item: w, index: f }) => [
|
|
141
|
-
O("span",
|
|
141
|
+
O("span", oa, L(w.name), 1),
|
|
142
142
|
t.main && f === 0 ? (p(), $(n(ze), {
|
|
143
143
|
key: 0,
|
|
144
144
|
type: "primary"
|
|
@@ -160,7 +160,7 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
|
|
|
160
160
|
]),
|
|
161
161
|
_: 1
|
|
162
162
|
}, 8, ["modelValue", "disabled", "empty-text"]),
|
|
163
|
-
b(n(
|
|
163
|
+
b(n(at), {
|
|
164
164
|
"model-value": null,
|
|
165
165
|
options: c.value,
|
|
166
166
|
placeholder: t.addText ?? n(i)("categories.field-add"),
|
|
@@ -178,8 +178,8 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
|
|
|
178
178
|
for (const [l, i] of t)
|
|
179
179
|
a[l] = i;
|
|
180
180
|
return a;
|
|
181
|
-
},
|
|
182
|
-
function
|
|
181
|
+
}, ia = /* @__PURE__ */ Y(sa, [["__scopeId", "data-v-640cd836"]]);
|
|
182
|
+
function ra() {
|
|
183
183
|
return {
|
|
184
184
|
target: "entity",
|
|
185
185
|
entity_type: null,
|
|
@@ -190,7 +190,7 @@ function ia() {
|
|
|
190
190
|
rel: []
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function ua(e) {
|
|
194
194
|
const t = `${e.apiPath}/links`, a = (l) => l.data;
|
|
195
195
|
return {
|
|
196
196
|
sources: () => e.http.get(`${t}/sources`).then(a),
|
|
@@ -199,19 +199,19 @@ function ra(e) {
|
|
|
199
199
|
routes: () => e.http.get(`${t}/routes`).then(a)
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
const
|
|
202
|
+
const da = { class: "wx-link-picker" }, ca = {
|
|
203
203
|
key: 0,
|
|
204
204
|
class: "wx-link-picker__entity"
|
|
205
|
-
},
|
|
205
|
+
}, ma = {
|
|
206
206
|
key: 1,
|
|
207
207
|
class: "wx-link-picker__url"
|
|
208
|
-
},
|
|
208
|
+
}, va = {
|
|
209
209
|
key: 2,
|
|
210
210
|
class: "wx-link-picker__hash"
|
|
211
|
-
},
|
|
211
|
+
}, fa = {
|
|
212
212
|
key: 3,
|
|
213
213
|
class: "wx-link-picker__attributes"
|
|
214
|
-
},
|
|
214
|
+
}, pa = { class: "wx-link-picker__rel" }, ha = /* @__PURE__ */ R({
|
|
215
215
|
name: "WxLinkPicker",
|
|
216
216
|
__name: "LinkPicker",
|
|
217
217
|
props: /* @__PURE__ */ oe({
|
|
@@ -224,9 +224,9 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
224
224
|
}),
|
|
225
225
|
emits: ["update:modelValue"],
|
|
226
226
|
setup(e) {
|
|
227
|
-
const t = e, a =
|
|
227
|
+
const t = e, a = de(e, "modelValue"), l = X(), i = ea(), s = ua(l), o = P("webx-admin"), r = W([]), u = W([]), c = W([]), h = W(!1), m = W(null), v = W(""), d = W(null);
|
|
228
228
|
let w = null;
|
|
229
|
-
const f = x(() => a.value ??
|
|
229
|
+
const f = x(() => a.value ?? ra()), y = x(() => {
|
|
230
230
|
const _ = [
|
|
231
231
|
{ value: "entity", label: o("links.target-entity") },
|
|
232
232
|
{ value: "url", label: o("links.target-url") }
|
|
@@ -252,14 +252,14 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
254
|
async function S() {
|
|
255
|
-
const { entity_type: _, entity_id:
|
|
256
|
-
if (_ === null ||
|
|
255
|
+
const { entity_type: _, entity_id: N } = f.value;
|
|
256
|
+
if (_ === null || N === null) {
|
|
257
257
|
d.value = null, v.value = "";
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
|
-
if (d.value?.id ===
|
|
260
|
+
if (d.value?.id === N)
|
|
261
261
|
return;
|
|
262
|
-
const [I] = await s.resolve([{ type: _, id:
|
|
262
|
+
const [I] = await s.resolve([{ type: _, id: N }], i.state.locale);
|
|
263
263
|
d.value = I ?? null, v.value = I?.title ?? o("links.missing"), w = v.value;
|
|
264
264
|
}
|
|
265
265
|
async function B() {
|
|
@@ -286,8 +286,8 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
286
286
|
m.value = _ == null ? null : String(_), u.value = [], C("");
|
|
287
287
|
}
|
|
288
288
|
function K(_) {
|
|
289
|
-
const
|
|
290
|
-
|
|
289
|
+
const N = u.value.find((I) => I.id === _.id);
|
|
290
|
+
N === void 0 || m.value === null || (d.value = N, v.value = N.title, a.value = { ...f.value, entity_type: m.value, entity_id: N.id });
|
|
291
291
|
}
|
|
292
292
|
function le() {
|
|
293
293
|
d.value = null, v.value = "", u.value = [], a.value = { ...f.value, entity_type: null, entity_id: null };
|
|
@@ -296,33 +296,33 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
296
296
|
a.value = { ...f.value, url: _ === "" ? null : _ };
|
|
297
297
|
}
|
|
298
298
|
function te(_) {
|
|
299
|
-
const
|
|
300
|
-
a.value = { ...f.value, hash:
|
|
299
|
+
const N = (typeof _ == "string" || typeof _ == "number" ? String(_) : "").replace(/^#+/, "").trim();
|
|
300
|
+
a.value = { ...f.value, hash: N === "" ? null : N };
|
|
301
301
|
}
|
|
302
302
|
function ke(_) {
|
|
303
303
|
a.value = { ...f.value, new_tab: _ };
|
|
304
304
|
}
|
|
305
|
-
function _e(_,
|
|
305
|
+
function _e(_, N) {
|
|
306
306
|
const I = f.value.rel.filter(($e) => $e !== _);
|
|
307
|
-
a.value = { ...f.value, rel:
|
|
307
|
+
a.value = { ...f.value, rel: N ? [...I, _] : I };
|
|
308
308
|
}
|
|
309
309
|
function z(_) {
|
|
310
|
-
const
|
|
310
|
+
const N = [_.hint, _.url ?? void 0].filter(
|
|
311
311
|
(I) => typeof I == "string" && I !== ""
|
|
312
312
|
);
|
|
313
|
-
return _.available ||
|
|
313
|
+
return _.available || N.push(o("links.unavailable")), N.join(" · ");
|
|
314
314
|
}
|
|
315
315
|
const q = ["nofollow", "sponsored", "ugc"];
|
|
316
|
-
return (_,
|
|
317
|
-
b(n(
|
|
316
|
+
return (_, N) => (p(), T("div", da, [
|
|
317
|
+
b(n(Ct), {
|
|
318
318
|
options: y.value,
|
|
319
319
|
"model-value": f.value.target,
|
|
320
320
|
disabled: t.disabled,
|
|
321
321
|
"aria-label": n(o)("links.target-entity"),
|
|
322
322
|
"onUpdate:modelValue": A
|
|
323
323
|
}, null, 8, ["options", "model-value", "disabled", "aria-label"]),
|
|
324
|
-
f.value.target === "entity" ? (p(), T("div",
|
|
325
|
-
k.value.length > 1 ? (p(), $(n(
|
|
324
|
+
f.value.target === "entity" ? (p(), T("div", ca, [
|
|
325
|
+
k.value.length > 1 ? (p(), $(n(at), {
|
|
326
326
|
key: 0,
|
|
327
327
|
class: "wx-link-picker__section",
|
|
328
328
|
options: k.value,
|
|
@@ -343,12 +343,12 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
343
343
|
placeholder: n(o)("links.search"),
|
|
344
344
|
"aria-label": n(o)("links.search"),
|
|
345
345
|
disabled: t.disabled,
|
|
346
|
-
"onUpdate:modelValue":
|
|
346
|
+
"onUpdate:modelValue": N[0] || (N[0] = (I) => v.value = I),
|
|
347
347
|
onSearch: C,
|
|
348
348
|
onSelect: K,
|
|
349
349
|
onClear: le
|
|
350
350
|
}, null, 8, ["model-value", "options", "loading", "loading-text", "empty-text", "placeholder", "aria-label", "disabled"])
|
|
351
|
-
])) : f.value.target === "url" ? (p(), T("div",
|
|
351
|
+
])) : f.value.target === "url" ? (p(), T("div", ma, [
|
|
352
352
|
b(n(Be), {
|
|
353
353
|
"model-value": f.value.url ?? "",
|
|
354
354
|
options: J.value,
|
|
@@ -361,7 +361,7 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
361
361
|
"onUpdate:modelValue": ie
|
|
362
362
|
}, null, 8, ["model-value", "options", "empty-text", "placeholder", "aria-label", "disabled"])
|
|
363
363
|
])) : U("", !0),
|
|
364
|
-
f.value.target !== "none" ? (p(), T("label",
|
|
364
|
+
f.value.target !== "none" ? (p(), T("label", va, [
|
|
365
365
|
b(n(G), {
|
|
366
366
|
size: "sm",
|
|
367
367
|
tone: "muted"
|
|
@@ -371,7 +371,7 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
371
371
|
]),
|
|
372
372
|
_: 1
|
|
373
373
|
}),
|
|
374
|
-
|
|
374
|
+
N[2] || (N[2] = O("span", {
|
|
375
375
|
class: "wx-link-picker__sign",
|
|
376
376
|
"aria-hidden": "true"
|
|
377
377
|
}, "#", -1)),
|
|
@@ -384,18 +384,18 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
384
384
|
"onUpdate:modelValue": te
|
|
385
385
|
}, null, 8, ["model-value", "placeholder", "aria-label", "disabled"])
|
|
386
386
|
])) : U("", !0),
|
|
387
|
-
t.attributes && f.value.target !== "none" ? (p(), T("div",
|
|
387
|
+
t.attributes && f.value.target !== "none" ? (p(), T("div", fa, [
|
|
388
388
|
b(n(Ie), {
|
|
389
389
|
"model-value": f.value.new_tab,
|
|
390
390
|
disabled: t.disabled,
|
|
391
|
-
"onUpdate:modelValue":
|
|
391
|
+
"onUpdate:modelValue": N[1] || (N[1] = (I) => ke(I))
|
|
392
392
|
}, {
|
|
393
393
|
default: g(() => [
|
|
394
394
|
V(L(n(o)("links.new-tab")), 1)
|
|
395
395
|
]),
|
|
396
396
|
_: 1
|
|
397
397
|
}, 8, ["model-value", "disabled"]),
|
|
398
|
-
O("div",
|
|
398
|
+
O("div", pa, [
|
|
399
399
|
b(n(G), {
|
|
400
400
|
size: "sm",
|
|
401
401
|
tone: "muted"
|
|
@@ -420,7 +420,7 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
420
420
|
])) : U("", !0)
|
|
421
421
|
]));
|
|
422
422
|
}
|
|
423
|
-
}),
|
|
423
|
+
}), ga = /* @__PURE__ */ Y(ha, [["__scopeId", "data-v-e54022e5"]]), ya = /* @__PURE__ */ R({
|
|
424
424
|
name: "WxLinkField",
|
|
425
425
|
inheritAttrs: !1,
|
|
426
426
|
__name: "LinkField",
|
|
@@ -434,8 +434,8 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
434
434
|
}),
|
|
435
435
|
emits: ["update:modelValue"],
|
|
436
436
|
setup(e) {
|
|
437
|
-
const t = e, a =
|
|
438
|
-
return (l, i) => (p(), $(
|
|
437
|
+
const t = e, a = de(e, "modelValue");
|
|
438
|
+
return (l, i) => (p(), $(ga, Ke({
|
|
439
439
|
modelValue: a.value,
|
|
440
440
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s)
|
|
441
441
|
}, l.$attrs, {
|
|
@@ -444,7 +444,7 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
444
444
|
disabled: t.disabled
|
|
445
445
|
}), null, 16, ["modelValue", "allow-none", "attributes", "disabled"]));
|
|
446
446
|
}
|
|
447
|
-
}),
|
|
447
|
+
}), ba = /* @__PURE__ */ R({
|
|
448
448
|
__name: "BackButton",
|
|
449
449
|
props: {
|
|
450
450
|
to: {},
|
|
@@ -456,17 +456,17 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
456
456
|
return (i, s) => (p(), $(n(se), {
|
|
457
457
|
icon: "arrow-left",
|
|
458
458
|
class: "wx-back-button",
|
|
459
|
-
as: n(
|
|
459
|
+
as: n(_t),
|
|
460
460
|
to: e.to,
|
|
461
461
|
title: l.value,
|
|
462
462
|
size: e.size,
|
|
463
463
|
"tooltip-side": "bottom"
|
|
464
464
|
}, null, 8, ["as", "to", "title", "size"]));
|
|
465
465
|
}
|
|
466
|
-
}),
|
|
466
|
+
}), wa = {
|
|
467
467
|
key: 0,
|
|
468
468
|
class: "wx-dropdown__divider"
|
|
469
|
-
},
|
|
469
|
+
}, xa = /* @__PURE__ */ R({
|
|
470
470
|
__name: "RowMenu",
|
|
471
471
|
props: {
|
|
472
472
|
actions: {},
|
|
@@ -481,14 +481,14 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
481
481
|
const s = l.value.find((o) => o.danger);
|
|
482
482
|
return s && l.value[0] !== s ? s.key : null;
|
|
483
483
|
});
|
|
484
|
-
return (s, o) => l.value.length > 0 ? (p(), $(n(
|
|
484
|
+
return (s, o) => l.value.length > 0 ? (p(), $(n(Wt), {
|
|
485
485
|
key: 0,
|
|
486
486
|
class: "wx-row-menu",
|
|
487
487
|
collapse: "always",
|
|
488
488
|
align: "end",
|
|
489
489
|
size: e.size,
|
|
490
490
|
"aria-label": e.label,
|
|
491
|
-
onClick: o[0] || (o[0] =
|
|
491
|
+
onClick: o[0] || (o[0] = qe(() => {
|
|
492
492
|
}, ["stop"]))
|
|
493
493
|
}, {
|
|
494
494
|
trigger: g(() => [
|
|
@@ -502,8 +502,8 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
502
502
|
(p(!0), T(H, null, Q(l.value, (r) => (p(), T(H, {
|
|
503
503
|
key: r.key
|
|
504
504
|
}, [
|
|
505
|
-
r.key === i.value ? (p(), T("hr",
|
|
506
|
-
b(n(
|
|
505
|
+
r.key === i.value ? (p(), T("hr", wa)) : U("", !0),
|
|
506
|
+
b(n(Lt), {
|
|
507
507
|
icon: r.icon,
|
|
508
508
|
tone: r.danger ? "danger" : "default",
|
|
509
509
|
href: r.href,
|
|
@@ -521,13 +521,13 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
521
521
|
_: 1
|
|
522
522
|
}, 8, ["size", "aria-label"])) : U("", !0);
|
|
523
523
|
}
|
|
524
|
-
}), Ue = /* @__PURE__ */ Y(
|
|
524
|
+
}), Ue = /* @__PURE__ */ Y(xa, [["__scopeId", "data-v-cab01f7f"]]), ka = ["data-level"], _a = {
|
|
525
525
|
key: 0,
|
|
526
526
|
class: "wx-screen-head__trail"
|
|
527
|
-
},
|
|
527
|
+
}, $a = { class: "wx-screen-head__name" }, Ta = {
|
|
528
528
|
key: 4,
|
|
529
529
|
class: "wx-screen-head__actions"
|
|
530
|
-
},
|
|
530
|
+
}, Sa = /* @__PURE__ */ R({
|
|
531
531
|
__name: "ScreenHead",
|
|
532
532
|
props: {
|
|
533
533
|
title: { default: void 0 },
|
|
@@ -541,7 +541,7 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
541
541
|
},
|
|
542
542
|
emits: ["back"],
|
|
543
543
|
setup(e, { emit: t }) {
|
|
544
|
-
const a = e, l = t, i = P("webx-admin"), s =
|
|
544
|
+
const a = e, l = t, i = P("webx-admin"), s = gt(), o = Ye("root"), r = At(o), u = x(() => r.value > 0 && r.value < a.collapseBelow), c = x(() => a.actions ?? []), h = x(
|
|
545
545
|
() => c.value.find((f) => f.primary) ?? null
|
|
546
546
|
), m = x(() => u.value ? h.value ? [h.value] : [] : c.value.filter((f) => !f.menu && !f.danger)), v = x(() => u.value ? c.value.filter((f) => f !== h.value) : c.value.filter((f) => f.menu || f.danger)), d = x(
|
|
547
547
|
() => a.back && a.back !== !0 ? a.back : null
|
|
@@ -559,10 +559,10 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
559
559
|
}]),
|
|
560
560
|
"data-level": e.level
|
|
561
561
|
}, [
|
|
562
|
-
f.$slots.trail ? (p(), T("div",
|
|
562
|
+
f.$slots.trail ? (p(), T("div", _a, [
|
|
563
563
|
F(f.$slots, "trail", {}, void 0, !0)
|
|
564
564
|
])) : U("", !0),
|
|
565
|
-
d.value ? (p(), $(
|
|
565
|
+
d.value ? (p(), $(ba, {
|
|
566
566
|
key: 1,
|
|
567
567
|
class: "wx-screen-head__back",
|
|
568
568
|
to: d.value,
|
|
@@ -577,8 +577,8 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
577
577
|
title: e.backLabel ?? n(i)("editor.back"),
|
|
578
578
|
onClick: y[0] || (y[0] = (k) => l("back"))
|
|
579
579
|
}, null, 8, ["title"])) : U("", !0),
|
|
580
|
-
O("div",
|
|
581
|
-
e.title ? (p(), $(n(
|
|
580
|
+
O("div", $a, [
|
|
581
|
+
e.title ? (p(), $(n(zt), {
|
|
582
582
|
key: 0,
|
|
583
583
|
level: e.level,
|
|
584
584
|
truncate: "",
|
|
@@ -605,7 +605,7 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
605
605
|
]),
|
|
606
606
|
_: 3
|
|
607
607
|
})) : U("", !0),
|
|
608
|
-
w.value ? (p(), T("div",
|
|
608
|
+
w.value ? (p(), T("div", Ta, [
|
|
609
609
|
F(f.$slots, "extra", {}, void 0, !0),
|
|
610
610
|
(p(!0), T(H, null, Q(m.value, (k) => (p(), $(n(Z), {
|
|
611
611
|
key: k.key,
|
|
@@ -641,9 +641,9 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
641
641
|
label: e.title ?? n(i)("editor.more")
|
|
642
642
|
}, null, 8, ["actions", "label"])) : U("", !0)
|
|
643
643
|
])) : U("", !0)
|
|
644
|
-
], 10,
|
|
644
|
+
], 10, ka));
|
|
645
645
|
}
|
|
646
|
-
}),
|
|
646
|
+
}), it = /* @__PURE__ */ Y(Sa, [["__scopeId", "data-v-e27d184e"]]), Ca = ["data-wx-fill"], Wa = /* @__PURE__ */ R({
|
|
647
647
|
__name: "ListScreen",
|
|
648
648
|
props: /* @__PURE__ */ oe({
|
|
649
649
|
title: { default: void 0 },
|
|
@@ -662,12 +662,12 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
662
662
|
}),
|
|
663
663
|
emits: ["update:view"],
|
|
664
664
|
setup(e) {
|
|
665
|
-
const t =
|
|
665
|
+
const t = de(e, "view");
|
|
666
666
|
return (a, l) => (p(), T("div", {
|
|
667
667
|
class: ae(["wx-list-screen", { "is-fill": e.fill }]),
|
|
668
668
|
"data-wx-fill": e.fill ? "" : void 0
|
|
669
669
|
}, [
|
|
670
|
-
e.title || e.actions || a.$slots.actions ? (p(), $(
|
|
670
|
+
e.title || e.actions || a.$slots.actions ? (p(), $(it, {
|
|
671
671
|
key: 0,
|
|
672
672
|
class: "wx-list-screen__head",
|
|
673
673
|
title: e.title,
|
|
@@ -685,7 +685,7 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
685
685
|
key: "0"
|
|
686
686
|
} : void 0
|
|
687
687
|
]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : U("", !0),
|
|
688
|
-
e.views && e.views.length > 0 ? (p(), $(n(
|
|
688
|
+
e.views && e.views.length > 0 ? (p(), $(n(Vt), {
|
|
689
689
|
key: 1,
|
|
690
690
|
modelValue: t.value,
|
|
691
691
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => t.value = i),
|
|
@@ -719,9 +719,9 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
719
719
|
_: 3
|
|
720
720
|
}, 8, ["padding"])) : F(a.$slots, "default", {}, void 0, !0, 1)
|
|
721
721
|
], 64))
|
|
722
|
-
], 10,
|
|
722
|
+
], 10, Ca));
|
|
723
723
|
}
|
|
724
|
-
}),
|
|
724
|
+
}), rt = /* @__PURE__ */ Y(Wa, [["__scopeId", "data-v-8c7e5ad1"]]), La = /* @__PURE__ */ R({
|
|
725
725
|
name: "WxRichTextField",
|
|
726
726
|
inheritAttrs: !1,
|
|
727
727
|
__name: "RichTextField",
|
|
@@ -759,24 +759,24 @@ const ua = { class: "wx-link-picker" }, da = {
|
|
|
759
759
|
cancel: a("rich-text.cancel"),
|
|
760
760
|
uploading: a("rich-text.uploading")
|
|
761
761
|
}));
|
|
762
|
-
return (s, o) => (p(), $(n(
|
|
762
|
+
return (s, o) => (p(), $(n(Et), Ke(s.$attrs, {
|
|
763
763
|
labels: i.value,
|
|
764
764
|
"pick-image": l.value
|
|
765
765
|
}), null, 16, ["labels", "pick-image"]));
|
|
766
766
|
}
|
|
767
|
-
}),
|
|
768
|
-
function
|
|
769
|
-
|
|
767
|
+
}), ut = /* @__PURE__ */ Symbol("wx-record-address");
|
|
768
|
+
function Aa(e) {
|
|
769
|
+
Xe(ut, e);
|
|
770
770
|
}
|
|
771
|
-
function
|
|
772
|
-
return ne(
|
|
771
|
+
function za() {
|
|
772
|
+
return ne(ut, null);
|
|
773
773
|
}
|
|
774
|
-
const
|
|
774
|
+
const Va = { class: "wx-slug" }, Ea = { class: "wx-slug__prefix" }, Ua = /* @__PURE__ */ R({
|
|
775
775
|
name: "WxSlugField",
|
|
776
776
|
inheritAttrs: !1,
|
|
777
777
|
__name: "SlugField",
|
|
778
778
|
setup(e) {
|
|
779
|
-
const t =
|
|
779
|
+
const t = za(), a = nt(), l = x(() => {
|
|
780
780
|
const o = t?.prefix.value ?? "";
|
|
781
781
|
return o === "" ? "/" : `/${o}/`;
|
|
782
782
|
}), i = x(() => {
|
|
@@ -786,10 +786,10 @@ const za = { class: "wx-slug" }, Va = { class: "wx-slug__prefix" }, Ea = /* @__P
|
|
|
786
786
|
const o = t?.path.value;
|
|
787
787
|
return typeof o == "string" && i.value !== "" && `${l.value}${i.value}` != `/${o}`;
|
|
788
788
|
});
|
|
789
|
-
return (o, r) => (p(), T("div",
|
|
790
|
-
b(n(ye),
|
|
789
|
+
return (o, r) => (p(), T("div", Va, [
|
|
790
|
+
b(n(ye), yt(bt(o.$attrs)), {
|
|
791
791
|
prefix: g(() => [
|
|
792
|
-
O("span",
|
|
792
|
+
O("span", Ea, L(l.value), 1)
|
|
793
793
|
]),
|
|
794
794
|
_: 1
|
|
795
795
|
}, 16),
|
|
@@ -801,25 +801,25 @@ const za = { class: "wx-slug" }, Va = { class: "wx-slug__prefix" }, Ea = /* @__P
|
|
|
801
801
|
}, null, 8, ["description"])) : U("", !0)
|
|
802
802
|
]));
|
|
803
803
|
}
|
|
804
|
-
}), Me = /* @__PURE__ */ Y(
|
|
805
|
-
"wx-list": { component:
|
|
804
|
+
}), Me = /* @__PURE__ */ Y(Ua, [["__scopeId", "data-v-5921c0dd"]]), Ra = {
|
|
805
|
+
"wx-list": { component: rt, kind: "layout", labelProp: "title" },
|
|
806
806
|
// Full width: an editor shares a row with nothing, and a form of two columns would give it
|
|
807
807
|
// half a line to write a page of text in.
|
|
808
|
-
"wx-rich-text": { component:
|
|
808
|
+
"wx-rich-text": { component: La, kind: "field", wide: !0 },
|
|
809
809
|
// Wide as well: a row of the picker is a segmented switch, a section and a search box, and half
|
|
810
810
|
// a form's width leaves the search box too narrow to read a page title in.
|
|
811
|
-
"wx-link": { component:
|
|
812
|
-
"wx-categories": { component:
|
|
811
|
+
"wx-link": { component: ya, kind: "field", wide: !0 },
|
|
812
|
+
"wx-categories": { component: ia, kind: "field" },
|
|
813
813
|
"wx-slug": { component: Me, kind: "field" },
|
|
814
814
|
"wx-category-slug": { component: Me, kind: "field" }
|
|
815
|
-
},
|
|
815
|
+
}, dt = /* @__PURE__ */ Symbol("webx-admin");
|
|
816
816
|
function X() {
|
|
817
|
-
const e = ne(
|
|
817
|
+
const e = ne(dt, null);
|
|
818
818
|
if (e === null)
|
|
819
819
|
throw new Error("useAdmin() was called outside a panel created by createAdmin().");
|
|
820
820
|
return e;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function Na(e) {
|
|
823
823
|
const t = pe({
|
|
824
824
|
status: "loading",
|
|
825
825
|
manifest: null,
|
|
@@ -861,7 +861,7 @@ function Ra(e) {
|
|
|
861
861
|
entries: f.get(y.id) ?? []
|
|
862
862
|
}))
|
|
863
863
|
};
|
|
864
|
-
}), i = { ...
|
|
864
|
+
}), i = { ...Ra };
|
|
865
865
|
for (const d of e.modules)
|
|
866
866
|
Object.assign(i, d.types);
|
|
867
867
|
Object.assign(i, e.types);
|
|
@@ -884,7 +884,7 @@ function Ra(e) {
|
|
|
884
884
|
const d = await e.loadManifest();
|
|
885
885
|
t.manifest = d, e.i18n.state.contentLocales = d.locales ?? [], e.i18n.state.panelLocales = d.panelLocales ?? e.i18n.state.panelLocales, d.locale !== void 0 && d.locale !== e.i18n.state.locale && await v(d.locale), t.status = "ready";
|
|
886
886
|
} catch (d) {
|
|
887
|
-
if (
|
|
887
|
+
if (Ia(d)) {
|
|
888
888
|
t.manifest = null, t.user = null, t.status = "unauthenticated";
|
|
889
889
|
return;
|
|
890
890
|
}
|
|
@@ -938,13 +938,13 @@ function Ra(e) {
|
|
|
938
938
|
}
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
e.provide(
|
|
941
|
+
function Ba(e, t) {
|
|
942
|
+
e.provide(dt, t);
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function Ia(e) {
|
|
945
945
|
return typeof e == "object" && e !== null && "status" in e && e.status === 401;
|
|
946
946
|
}
|
|
947
|
-
const
|
|
947
|
+
const Pa = /* @__PURE__ */ R({
|
|
948
948
|
__name: "AdminLanding",
|
|
949
949
|
props: {
|
|
950
950
|
landing: { default: null }
|
|
@@ -960,21 +960,21 @@ const Ia = /* @__PURE__ */ N({
|
|
|
960
960
|
o !== null && l.replace(o);
|
|
961
961
|
},
|
|
962
962
|
{ immediate: !0 }
|
|
963
|
-
), (o, r) => s.value === null && n(a).state.status === "ready" ? (p(), $(n(
|
|
963
|
+
), (o, r) => s.value === null && n(a).state.status === "ready" ? (p(), $(n(Ut), {
|
|
964
964
|
key: 0,
|
|
965
965
|
status: "info",
|
|
966
966
|
title: n(i)("shell.empty-title"),
|
|
967
967
|
description: n(i)("shell.empty-description")
|
|
968
968
|
}, null, 8, ["title", "description"])) : U("", !0);
|
|
969
969
|
}
|
|
970
|
-
}),
|
|
970
|
+
}), Da = /* @__PURE__ */ R({
|
|
971
971
|
__name: "AdminNav",
|
|
972
972
|
props: {
|
|
973
973
|
collapsed: { type: Boolean }
|
|
974
974
|
},
|
|
975
975
|
emits: ["select"],
|
|
976
976
|
setup(e, { emit: t }) {
|
|
977
|
-
const a = t, l = X(), i = P("webx-admin"), s = ge(), o =
|
|
977
|
+
const a = t, l = X(), i = P("webx-admin"), s = ge(), o = et(), r = x({
|
|
978
978
|
/*
|
|
979
979
|
* The longest path that contains this one, on a segment boundary: a section may live inside
|
|
980
980
|
* another's path (`/services/categories` under `/services`), and the first match in the order
|
|
@@ -1023,37 +1023,37 @@ const Ia = /* @__PURE__ */ N({
|
|
|
1023
1023
|
}, 8, ["modelValue", "collapsed", "label"]);
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
|
-
}),
|
|
1026
|
+
}), Ma = {
|
|
1027
1027
|
key: 0,
|
|
1028
1028
|
class: "wx-root wx-admin-plain"
|
|
1029
|
-
},
|
|
1029
|
+
}, Fa = {
|
|
1030
1030
|
key: 1,
|
|
1031
1031
|
class: "wx-root wx-admin-plain"
|
|
1032
|
-
},
|
|
1032
|
+
}, Oa = {
|
|
1033
1033
|
key: 2,
|
|
1034
1034
|
class: "wx-root wx-admin-plain"
|
|
1035
|
-
},
|
|
1035
|
+
}, Ha = ["src", "alt", "width", "height"], ja = ["src", "alt", "width", "height"], Ka = ["src", "alt"], qa = { class: "wx-admin__user" }, Ya = { class: "wx-admin__user wx-admin__user--drawer" }, Xa = /* @__PURE__ */ R({
|
|
1036
1036
|
__name: "AdminShell",
|
|
1037
1037
|
setup(e) {
|
|
1038
|
-
const t = X(), a = P("webx-admin"), l = W(null), { width: i, layout: s, collapsed: o, showAside: r, drawerOpen: u, toggle: c, close: h } =
|
|
1038
|
+
const t = X(), a = P("webx-admin"), l = W(null), { width: i, layout: s, collapsed: o, showAside: r, drawerOpen: u, toggle: c, close: h } = Rt(
|
|
1039
1039
|
l,
|
|
1040
1040
|
{ persist: "webx-admin-shell" }
|
|
1041
|
-
), m = x(() => t.state.manifest?.title ?? ""), v = x(() => t.state.manifest?.branding?.logo ?? null), d = x(() => t.state.manifest?.branding?.mark ?? null), w = x(() =>
|
|
1042
|
-
return
|
|
1041
|
+
), m = x(() => t.state.manifest?.title ?? ""), v = x(() => t.state.manifest?.branding?.logo ?? null), d = x(() => t.state.manifest?.branding?.mark ?? null), w = x(() => Nt(i.value, null));
|
|
1042
|
+
return wt(() => {
|
|
1043
1043
|
typeof document > "u" || (document.documentElement.dataset.wxShell = w.value);
|
|
1044
|
-
}),
|
|
1044
|
+
}), xt(() => {
|
|
1045
1045
|
typeof document < "u" && delete document.documentElement.dataset.wxShell;
|
|
1046
1046
|
}), (f, y) => {
|
|
1047
1047
|
const k = j("router-view"), M = j("wx-loading"), J = j("wx-button"), S = j("wx-result"), B = j("wx-action"), C = j("wx-text"), A = j("wx-header"), E = j("wx-aside"), K = j("wx-main"), le = j("wx-container"), ie = j("wx-drawer");
|
|
1048
1048
|
return p(), T(H, null, [
|
|
1049
|
-
b(n(
|
|
1050
|
-
n(t).state.status === "unauthenticated" ? (p(), T("div",
|
|
1049
|
+
b(n(Bt), { placement: "bottom-center" }),
|
|
1050
|
+
n(t).state.status === "unauthenticated" ? (p(), T("div", Ma, [
|
|
1051
1051
|
b(k)
|
|
1052
|
-
])) : n(t).state.status === "loading" ? (p(), T("div",
|
|
1052
|
+
])) : n(t).state.status === "loading" ? (p(), T("div", Fa, [
|
|
1053
1053
|
b(M, {
|
|
1054
1054
|
label: n(a)("shell.loading")
|
|
1055
1055
|
}, null, 8, ["label"])
|
|
1056
|
-
])) : n(t).state.status === "error" ? (p(), T("div",
|
|
1056
|
+
])) : n(t).state.status === "error" ? (p(), T("div", Oa, [
|
|
1057
1057
|
b(S, {
|
|
1058
1058
|
status: "error",
|
|
1059
1059
|
title: n(a)("shell.error-title"),
|
|
@@ -1110,7 +1110,7 @@ const Ia = /* @__PURE__ */ N({
|
|
|
1110
1110
|
alt: m.value,
|
|
1111
1111
|
width: v.value.width ?? void 0,
|
|
1112
1112
|
height: v.value.height ?? void 0
|
|
1113
|
-
}, null, 8,
|
|
1113
|
+
}, null, 8, Ha)) : (p(), $(C, {
|
|
1114
1114
|
key: 1,
|
|
1115
1115
|
weight: "semibold",
|
|
1116
1116
|
truncate: ""
|
|
@@ -1144,7 +1144,7 @@ const Ia = /* @__PURE__ */ N({
|
|
|
1144
1144
|
class: "wx-admin__mark",
|
|
1145
1145
|
src: d.value.url,
|
|
1146
1146
|
alt: m.value
|
|
1147
|
-
}, null, 8,
|
|
1147
|
+
}, null, 8, Ka)) : U("", !0) : F(f.$slots, "brand", {}, () => [
|
|
1148
1148
|
v.value ? (p(), T("img", {
|
|
1149
1149
|
key: 0,
|
|
1150
1150
|
class: "wx-admin__logo",
|
|
@@ -1152,7 +1152,7 @@ const Ia = /* @__PURE__ */ N({
|
|
|
1152
1152
|
alt: m.value,
|
|
1153
1153
|
width: v.value.width ?? void 0,
|
|
1154
1154
|
height: v.value.height ?? void 0
|
|
1155
|
-
}, null, 8,
|
|
1155
|
+
}, null, 8, ja)) : (p(), $(C, {
|
|
1156
1156
|
key: 1,
|
|
1157
1157
|
weight: "semibold",
|
|
1158
1158
|
truncate: "",
|
|
@@ -1172,7 +1172,7 @@ const Ia = /* @__PURE__ */ N({
|
|
|
1172
1172
|
], 2)
|
|
1173
1173
|
]),
|
|
1174
1174
|
bottom: g(() => [
|
|
1175
|
-
O("div",
|
|
1175
|
+
O("div", qa, [
|
|
1176
1176
|
F(f.$slots, "user", {
|
|
1177
1177
|
expanded: !n(o)
|
|
1178
1178
|
}, void 0, !0)
|
|
@@ -1197,7 +1197,7 @@ const Ia = /* @__PURE__ */ N({
|
|
|
1197
1197
|
}, 8, ["direction"]),
|
|
1198
1198
|
b(ie, {
|
|
1199
1199
|
open: n(u),
|
|
1200
|
-
"onUpdate:open": y[1] || (y[1] = (te) =>
|
|
1200
|
+
"onUpdate:open": y[1] || (y[1] = (te) => Ge(u) ? u.value = te : null),
|
|
1201
1201
|
class: "wx-admin__drawer",
|
|
1202
1202
|
title: m.value === "" ? n(a)("nav.menu") : m.value,
|
|
1203
1203
|
side: "left",
|
|
@@ -1206,7 +1206,7 @@ const Ia = /* @__PURE__ */ N({
|
|
|
1206
1206
|
closable: ""
|
|
1207
1207
|
}, {
|
|
1208
1208
|
footer: g(() => [
|
|
1209
|
-
O("div",
|
|
1209
|
+
O("div", Ya, [
|
|
1210
1210
|
F(f.$slots, "user", { expanded: !0 }, void 0, !0)
|
|
1211
1211
|
])
|
|
1212
1212
|
]),
|
|
@@ -1222,7 +1222,7 @@ const Ia = /* @__PURE__ */ N({
|
|
|
1222
1222
|
], 64);
|
|
1223
1223
|
};
|
|
1224
1224
|
}
|
|
1225
|
-
}),
|
|
1225
|
+
}), Ga = /* @__PURE__ */ Y(Xa, [["__scopeId", "data-v-819885ab"]]);
|
|
1226
1226
|
class Ce extends Error {
|
|
1227
1227
|
constructor(t, a, l = {}, i = null, s = null) {
|
|
1228
1228
|
super(t), this.status = a, this.errors = l, this.retryAfter = i, this.body = s, this.name = "HttpError";
|
|
@@ -1242,15 +1242,15 @@ class Ce extends Error {
|
|
|
1242
1242
|
return this.status === 429;
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
|
-
const
|
|
1246
|
-
function
|
|
1245
|
+
const Ja = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
|
|
1246
|
+
function Qa(e = {}) {
|
|
1247
1247
|
const t = (e.baseUrl ?? "").replace(/\/$/, ""), a = e.csrfUrl ?? "/api/cms/auth/csrf-cookie", l = e.fetch ?? globalThis.fetch.bind(globalThis), i = e.onUnauthenticated, s = e.headers;
|
|
1248
1248
|
let o = !1;
|
|
1249
1249
|
async function r(c = !1) {
|
|
1250
1250
|
o && !c && Fe("XSRF-TOKEN") !== null || (await l(a, { credentials: "same-origin" }), o = !0);
|
|
1251
1251
|
}
|
|
1252
1252
|
async function u(c, h, m, v = {}, d = !1) {
|
|
1253
|
-
const w =
|
|
1253
|
+
const w = Ja.has(c);
|
|
1254
1254
|
w && await r();
|
|
1255
1255
|
const f = {
|
|
1256
1256
|
Accept: "application/json",
|
|
@@ -1264,7 +1264,7 @@ function Ja(e = {}) {
|
|
|
1264
1264
|
k !== null && (f["X-XSRF-TOKEN"] = k);
|
|
1265
1265
|
}
|
|
1266
1266
|
m !== void 0 && (f["Content-Type"] = "application/json");
|
|
1267
|
-
const y = await l(
|
|
1267
|
+
const y = await l(en(t, h, v.query), {
|
|
1268
1268
|
method: c,
|
|
1269
1269
|
credentials: "same-origin",
|
|
1270
1270
|
headers: f,
|
|
@@ -1274,7 +1274,7 @@ function Ja(e = {}) {
|
|
|
1274
1274
|
if (y.status === 419 && w && !d)
|
|
1275
1275
|
return await r(!0), u(c, h, m, v, !0);
|
|
1276
1276
|
if (y.status === 401 && i?.(), !y.ok)
|
|
1277
|
-
throw await
|
|
1277
|
+
throw await Za(y);
|
|
1278
1278
|
if (y.status !== 204)
|
|
1279
1279
|
return await y.json();
|
|
1280
1280
|
}
|
|
@@ -1286,7 +1286,7 @@ function Ja(e = {}) {
|
|
|
1286
1286
|
delete: (c, h) => u("DELETE", c, void 0, h)
|
|
1287
1287
|
};
|
|
1288
1288
|
}
|
|
1289
|
-
async function
|
|
1289
|
+
async function Za(e) {
|
|
1290
1290
|
let t = null;
|
|
1291
1291
|
try {
|
|
1292
1292
|
t = await e.json();
|
|
@@ -1301,7 +1301,7 @@ async function Qa(e) {
|
|
|
1301
1301
|
t
|
|
1302
1302
|
);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function en(e, t, a) {
|
|
1305
1305
|
const i = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
|
|
1306
1306
|
if (a === void 0)
|
|
1307
1307
|
return i;
|
|
@@ -1321,25 +1321,25 @@ function Fe(e) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
return null;
|
|
1323
1323
|
}
|
|
1324
|
-
const
|
|
1325
|
-
function
|
|
1326
|
-
const e = ne(
|
|
1324
|
+
const tn = "webx.theme", ct = /* @__PURE__ */ Symbol("webx-theme");
|
|
1325
|
+
function Jn() {
|
|
1326
|
+
const e = ne(ct, null);
|
|
1327
1327
|
if (e === null)
|
|
1328
1328
|
throw new Error("useTheme() was called outside a panel created by createAdmin().");
|
|
1329
1329
|
return e;
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1332
|
-
e.provide(
|
|
1331
|
+
function an(e, t) {
|
|
1332
|
+
e.provide(ct, t);
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1335
|
-
const t = e.storageKey === void 0 ?
|
|
1336
|
-
preference:
|
|
1334
|
+
function nn(e = {}) {
|
|
1335
|
+
const t = e.storageKey === void 0 ? tn : e.storageKey, a = pe({
|
|
1336
|
+
preference: ln(t) ?? "system",
|
|
1337
1337
|
resolved: "light"
|
|
1338
1338
|
});
|
|
1339
1339
|
function l() {
|
|
1340
|
-
|
|
1340
|
+
Jt(a.preference), a.resolved = a.preference === "system" ? Qt() : a.preference;
|
|
1341
1341
|
}
|
|
1342
|
-
return l(),
|
|
1342
|
+
return l(), Gt((i) => {
|
|
1343
1343
|
a.preference === "system" && (a.resolved = i);
|
|
1344
1344
|
}), {
|
|
1345
1345
|
state: a,
|
|
@@ -1361,7 +1361,7 @@ function Oe(e, t) {
|
|
|
1361
1361
|
} catch {
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function ln(e) {
|
|
1365
1365
|
if (e === null)
|
|
1366
1366
|
return null;
|
|
1367
1367
|
try {
|
|
@@ -1371,7 +1371,7 @@ function nn(e) {
|
|
|
1371
1371
|
return null;
|
|
1372
1372
|
}
|
|
1373
1373
|
}
|
|
1374
|
-
const
|
|
1374
|
+
const mt = {
|
|
1375
1375
|
shell: {
|
|
1376
1376
|
loading: "Loading the panel…",
|
|
1377
1377
|
"error-title": "The panel could not start",
|
|
@@ -1586,9 +1586,9 @@ const ct = {
|
|
|
1586
1586
|
"order-locked": "Clear the search and the filters to change the order — only a whole list, or one category, can be dragged.",
|
|
1587
1587
|
unknown: "One of the chosen categories is not there any more."
|
|
1588
1588
|
}
|
|
1589
|
-
},
|
|
1590
|
-
function
|
|
1591
|
-
const t = e.manifestUrl ??
|
|
1589
|
+
}, vt = "webx.locale";
|
|
1590
|
+
function Qn(e = {}) {
|
|
1591
|
+
const t = e.manifestUrl ?? cn() ?? "/api/cms/manifest", a = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), l = e.basePath ?? "/cms", i = e.modules ?? [], s = [...e.routes ?? []];
|
|
1592
1592
|
for (const y of i)
|
|
1593
1593
|
s.push(...y.routes ?? []);
|
|
1594
1594
|
if (!s.some((y) => y.path === "/")) {
|
|
@@ -1596,14 +1596,14 @@ function Jn(e = {}) {
|
|
|
1596
1596
|
s.push({
|
|
1597
1597
|
path: "/",
|
|
1598
1598
|
name: "webx.home",
|
|
1599
|
-
component:
|
|
1599
|
+
component: Pa,
|
|
1600
1600
|
props: { landing: y?.path ?? y?.routes?.[0]?.path ?? null }
|
|
1601
1601
|
});
|
|
1602
1602
|
}
|
|
1603
|
-
const o =
|
|
1604
|
-
history:
|
|
1603
|
+
const o = $t({
|
|
1604
|
+
history: Tt(l),
|
|
1605
1605
|
routes: s
|
|
1606
|
-
}), r = Ee({ locale: e.locale ??
|
|
1606
|
+
}), r = Ee({ locale: e.locale ?? sn() }), u = nn(), c = e.http ?? Qa({
|
|
1607
1607
|
baseUrl: "",
|
|
1608
1608
|
csrfUrl: `${a}/auth/csrf-cookie`,
|
|
1609
1609
|
onUnauthenticated: () => {
|
|
@@ -1615,12 +1615,12 @@ function Jn(e = {}) {
|
|
|
1615
1615
|
// signing in on a Russian sign-in screen lands in an English panel.
|
|
1616
1616
|
headers: () => ({ "X-Webx-Locale": r.state.locale })
|
|
1617
1617
|
});
|
|
1618
|
-
r.defaults("webx-admin",
|
|
1618
|
+
r.defaults("webx-admin", mt);
|
|
1619
1619
|
async function h(y) {
|
|
1620
1620
|
const k = await c.get(`${a}/translations/${y}`);
|
|
1621
|
-
r.load(k.data.namespaces, k.data.locale, k.data.fallback),
|
|
1621
|
+
r.load(k.data.namespaces, k.data.locale, k.data.fallback), rn(k.data.locale), dn(k.data.locale, r.state.panelLocales);
|
|
1622
1622
|
}
|
|
1623
|
-
const m =
|
|
1623
|
+
const m = Na({
|
|
1624
1624
|
http: c,
|
|
1625
1625
|
theme: u,
|
|
1626
1626
|
basePath: l,
|
|
@@ -1631,13 +1631,13 @@ function Jn(e = {}) {
|
|
|
1631
1631
|
types: e.types,
|
|
1632
1632
|
screens: e.screens,
|
|
1633
1633
|
loadManifest: async () => (await c.get(t)).data
|
|
1634
|
-
}), v =
|
|
1635
|
-
v.use(
|
|
1634
|
+
}), v = kt(on(e));
|
|
1635
|
+
v.use(It), Ba(v, m), ta(v, r), an(v, u);
|
|
1636
1636
|
const d = W("");
|
|
1637
1637
|
v.provide(
|
|
1638
|
-
|
|
1638
|
+
Pt,
|
|
1639
1639
|
x(() => r.state.locale)
|
|
1640
|
-
), v.provide(
|
|
1640
|
+
), v.provide(Dt, {
|
|
1641
1641
|
list: x(
|
|
1642
1642
|
() => r.state.contentLocales.map((y) => ({
|
|
1643
1643
|
code: y.code,
|
|
@@ -1670,40 +1670,40 @@ function Jn(e = {}) {
|
|
|
1670
1670
|
y.install(w);
|
|
1671
1671
|
return v.use(o), w;
|
|
1672
1672
|
}
|
|
1673
|
-
function
|
|
1673
|
+
function on(e) {
|
|
1674
1674
|
const t = {
|
|
1675
1675
|
// The menu is the panel's own: it is the manifest, drawn.
|
|
1676
1676
|
// The shell hands in what a choice means where it drew the menu — in the drawer it is what
|
|
1677
1677
|
// closes it, and a drawer that stays open over the section it just opened is a drawer the
|
|
1678
1678
|
// reader has to dismiss by hand.
|
|
1679
|
-
nav: (a) =>
|
|
1679
|
+
nav: (a) => re(Da, { collapsed: a.collapsed === !0, onSelect: a.select })
|
|
1680
1680
|
};
|
|
1681
|
-
return e.brand !== void 0 && (t.brand = () =>
|
|
1681
|
+
return e.brand !== void 0 && (t.brand = () => re(e.brand)), e.userMenu !== void 0 && (t.user = (a) => re(e.userMenu, { expanded: a.expanded === !0 })), { render: () => re(Ga, null, t) };
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1684
|
-
const e =
|
|
1683
|
+
function sn() {
|
|
1684
|
+
const e = un(vt);
|
|
1685
1685
|
return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
|
|
1686
1686
|
}
|
|
1687
|
-
function
|
|
1687
|
+
function rn(e) {
|
|
1688
1688
|
try {
|
|
1689
|
-
localStorage.setItem(
|
|
1689
|
+
localStorage.setItem(vt, e);
|
|
1690
1690
|
} catch {
|
|
1691
1691
|
}
|
|
1692
1692
|
}
|
|
1693
|
-
function
|
|
1693
|
+
function un(e) {
|
|
1694
1694
|
try {
|
|
1695
1695
|
return localStorage.getItem(e);
|
|
1696
1696
|
} catch {
|
|
1697
1697
|
return null;
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1700
|
+
function dn(e, t) {
|
|
1701
1701
|
typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((a) => a.code === e)?.direction ?? "ltr");
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1703
|
+
function cn() {
|
|
1704
1704
|
return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1706
|
+
function mn(e) {
|
|
1707
1707
|
const t = e.replace(/\r\n?/g, `
|
|
1708
1708
|
`).split(`
|
|
1709
1709
|
`), a = [];
|
|
@@ -1768,7 +1768,7 @@ function Te(e) {
|
|
|
1768
1768
|
function We(e) {
|
|
1769
1769
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function vn(e) {
|
|
1772
1772
|
const t = e.scope("webx-admin"), a = /* @__PURE__ */ new Map();
|
|
1773
1773
|
function l(s, o, r) {
|
|
1774
1774
|
const u = e.state.locale, c = `${u}:${s}`;
|
|
@@ -1811,13 +1811,13 @@ function mn(e) {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
};
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function ft() {
|
|
1815
1815
|
const e = ne(we, null);
|
|
1816
|
-
return
|
|
1816
|
+
return vn(e ?? fn());
|
|
1817
1817
|
}
|
|
1818
1818
|
let ve = null;
|
|
1819
|
-
function
|
|
1820
|
-
return ve === null && (ve = Ee(), ve.defaults("webx-admin",
|
|
1819
|
+
function fn() {
|
|
1820
|
+
return ve === null && (ve = Ee(), ve.defaults("webx-admin", mt)), ve;
|
|
1821
1821
|
}
|
|
1822
1822
|
function fe(e) {
|
|
1823
1823
|
if (e == null || e === "")
|
|
@@ -1829,10 +1829,10 @@ function He(e, t) {
|
|
|
1829
1829
|
const a = (l) => Date.UTC(l.getFullYear(), l.getMonth(), l.getDate());
|
|
1830
1830
|
return Math.round((a(e) - a(t)) / 864e5);
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1833
|
-
const l = e instanceof Ce ? e.status :
|
|
1832
|
+
function pn(e, t, a) {
|
|
1833
|
+
const l = e instanceof Ce ? e.status : hn(e);
|
|
1834
1834
|
if (l === 422)
|
|
1835
|
-
return
|
|
1835
|
+
return gn(e) ?? a ?? t("errors.unknown");
|
|
1836
1836
|
if (l === 401) return t("errors.signed-out");
|
|
1837
1837
|
if (l === 403) return t("errors.forbidden");
|
|
1838
1838
|
if (l === 404) return t("errors.gone");
|
|
@@ -1845,17 +1845,17 @@ function fn(e, t, a) {
|
|
|
1845
1845
|
}
|
|
1846
1846
|
function Re() {
|
|
1847
1847
|
const e = P("webx-admin");
|
|
1848
|
-
return (t, a) =>
|
|
1848
|
+
return (t, a) => pn(t, e, a);
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function hn(e) {
|
|
1851
1851
|
const t = e?.status;
|
|
1852
1852
|
return typeof t == "number" ? t : null;
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1854
|
+
function gn(e) {
|
|
1855
1855
|
const a = e?.body?.message;
|
|
1856
1856
|
return typeof a == "string" && a !== "" ? a : null;
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function yn(e, t, a) {
|
|
1859
1859
|
const l = `${e.apiPath}/entities/${t}/${a}/notes`, i = (o) => `${e.apiPath}/notes/${o}`, s = (o) => o.data;
|
|
1860
1860
|
return {
|
|
1861
1861
|
list: () => e.http.get(l).then(s),
|
|
@@ -1865,39 +1865,39 @@ function gn(e, t, a) {
|
|
|
1865
1865
|
})
|
|
1866
1866
|
};
|
|
1867
1867
|
}
|
|
1868
|
-
const
|
|
1869
|
-
function
|
|
1870
|
-
|
|
1868
|
+
const pt = /* @__PURE__ */ Symbol("wx-category-editor");
|
|
1869
|
+
function bn(e) {
|
|
1870
|
+
Xe(pt, e);
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1873
|
-
return ne(
|
|
1872
|
+
function Zn() {
|
|
1873
|
+
return ne(pt, null);
|
|
1874
1874
|
}
|
|
1875
|
-
function
|
|
1875
|
+
function wn(e) {
|
|
1876
1876
|
return (e.q ?? "").trim() !== "" || e.filtered ? "locked" : e.category == null ? "all" : "category";
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1879
|
-
const a = X(), l = P("webx-admin"), i = x(() =>
|
|
1878
|
+
function el(e, t) {
|
|
1879
|
+
const a = X(), l = P("webx-admin"), i = x(() => wn(t()));
|
|
1880
1880
|
return {
|
|
1881
1881
|
mode: i,
|
|
1882
1882
|
sortable: x(() => i.value !== "locked"),
|
|
1883
1883
|
hint: x(() => l(`categories.order-${i.value}`)),
|
|
1884
|
-
move: (s) =>
|
|
1884
|
+
move: (s) => na(a, e, s, i.value === "category" ? t().category ?? null : null)
|
|
1885
1885
|
};
|
|
1886
1886
|
}
|
|
1887
1887
|
function Ne(e = {}) {
|
|
1888
1888
|
const t = P("webx-admin");
|
|
1889
1889
|
return (a, l) => t(e[a] ?? `webx-admin::categories.${a}`, l);
|
|
1890
1890
|
}
|
|
1891
|
-
const
|
|
1891
|
+
const xn = /* @__PURE__ */ R({
|
|
1892
1892
|
name: "WxCategoryCreateDialog",
|
|
1893
1893
|
__name: "CategoryCreateDialog",
|
|
1894
1894
|
props: {
|
|
1895
1895
|
options: {}
|
|
1896
1896
|
},
|
|
1897
1897
|
setup(e) {
|
|
1898
|
-
const t = e, { open: a, resolve: l, dismiss: i } =
|
|
1898
|
+
const t = e, { open: a, resolve: l, dismiss: i } = Mt(), s = xe(X(), t.options.api), o = Ne(t.options.words), r = W(""), u = W(!1), c = W({}), h = Ye("field");
|
|
1899
1899
|
Le(async () => {
|
|
1900
|
-
await
|
|
1900
|
+
await Je(), h.value?.querySelector("input")?.focus();
|
|
1901
1901
|
});
|
|
1902
1902
|
function m(d) {
|
|
1903
1903
|
const w = Object.keys(c.value).find((f) => f === d || f.startsWith(`${d}.`));
|
|
@@ -1915,14 +1915,14 @@ const wn = /* @__PURE__ */ N({
|
|
|
1915
1915
|
}
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
|
-
return (d, w) => (p(), $(n(
|
|
1918
|
+
return (d, w) => (p(), $(n(lt), {
|
|
1919
1919
|
open: n(a),
|
|
1920
|
-
"onUpdate:open": w[2] || (w[2] = (f) =>
|
|
1920
|
+
"onUpdate:open": w[2] || (w[2] = (f) => Ge(a) ? a.value = f : null),
|
|
1921
1921
|
title: n(o)("new"),
|
|
1922
1922
|
width: 440
|
|
1923
1923
|
}, {
|
|
1924
1924
|
footer: g(() => [
|
|
1925
|
-
b(n(
|
|
1925
|
+
b(n(Ot), { size: "sm" }, {
|
|
1926
1926
|
default: g(() => [
|
|
1927
1927
|
b(n(Z), {
|
|
1928
1928
|
variant: "outline",
|
|
@@ -1949,7 +1949,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
1949
1949
|
})
|
|
1950
1950
|
]),
|
|
1951
1951
|
default: g(() => [
|
|
1952
|
-
b(n(
|
|
1952
|
+
b(n(Ft), {
|
|
1953
1953
|
label: n(o)("field-title"),
|
|
1954
1954
|
error: m("title") ?? m("slug"),
|
|
1955
1955
|
required: ""
|
|
@@ -1963,7 +1963,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
1963
1963
|
modelValue: r.value,
|
|
1964
1964
|
"onUpdate:modelValue": w[0] || (w[0] = (f) => r.value = f),
|
|
1965
1965
|
"aria-label": n(o)("field-title"),
|
|
1966
|
-
onKeyup:
|
|
1966
|
+
onKeyup: Qe(v, ["enter"])
|
|
1967
1967
|
}, null, 8, ["modelValue", "aria-label"])
|
|
1968
1968
|
], 512)
|
|
1969
1969
|
]),
|
|
@@ -1973,7 +1973,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
1973
1973
|
_: 1
|
|
1974
1974
|
}, 8, ["open", "title"]));
|
|
1975
1975
|
}
|
|
1976
|
-
}),
|
|
1976
|
+
}), kn = { class: "wx-category-row__name" }, _n = /* @__PURE__ */ R({
|
|
1977
1977
|
name: "WxCategoriesPage",
|
|
1978
1978
|
__name: "CategoriesPage",
|
|
1979
1979
|
props: {
|
|
@@ -1982,7 +1982,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
1982
1982
|
setup(e) {
|
|
1983
1983
|
const t = e, a = X(), l = xe(a, t.options.api), i = ge(), s = Ne(t.options.words), o = Re(), r = W([]), u = W(!0), c = x(() => a.can(t.options.manage)), h = x(
|
|
1984
1984
|
() => a.state.manifest?.modules.find((S) => S.id === t.options.module)?.title ?? ""
|
|
1985
|
-
), m =
|
|
1985
|
+
), m = Ht(xn), v = x(
|
|
1986
1986
|
() => c.value ? [{ key: "new", label: s("new"), icon: "plus", primary: !0, run: () => {
|
|
1987
1987
|
y();
|
|
1988
1988
|
} }] : []
|
|
@@ -2054,23 +2054,23 @@ const wn = /* @__PURE__ */ N({
|
|
|
2054
2054
|
}
|
|
2055
2055
|
return (S, B) => {
|
|
2056
2056
|
const C = j("router-link");
|
|
2057
|
-
return p(), $(
|
|
2057
|
+
return p(), $(rt, {
|
|
2058
2058
|
class: "wx-categories",
|
|
2059
2059
|
title: h.value,
|
|
2060
2060
|
actions: v.value,
|
|
2061
2061
|
padding: "sm"
|
|
2062
2062
|
}, {
|
|
2063
2063
|
default: g(() => [
|
|
2064
|
-
u.value ? (p(), $(n(
|
|
2064
|
+
u.value ? (p(), $(n(ue), {
|
|
2065
2065
|
key: 0,
|
|
2066
2066
|
class: "wx-categories__loading",
|
|
2067
2067
|
rows: 5
|
|
2068
|
-
})) : r.value.length === 0 ? (p(), $(n(
|
|
2068
|
+
})) : r.value.length === 0 ? (p(), $(n(ot), {
|
|
2069
2069
|
key: 1,
|
|
2070
2070
|
title: n(s)("empty"),
|
|
2071
2071
|
description: n(s)("empty-help")
|
|
2072
2072
|
}, null, 8, ["title", "description"])) : (p(), T(H, { key: 2 }, [
|
|
2073
|
-
b(n(
|
|
2073
|
+
b(n(tt), {
|
|
2074
2074
|
modelValue: r.value,
|
|
2075
2075
|
"onUpdate:modelValue": B[0] || (B[0] = (A) => r.value = A),
|
|
2076
2076
|
class: "wx-categories__list",
|
|
@@ -2086,7 +2086,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
2086
2086
|
to: `${t.options.path}/${A.id}`
|
|
2087
2087
|
}, {
|
|
2088
2088
|
default: g(() => [
|
|
2089
|
-
O("span",
|
|
2089
|
+
O("span", kn, [
|
|
2090
2090
|
b(n(G), {
|
|
2091
2091
|
truncate: "",
|
|
2092
2092
|
weight: "medium"
|
|
@@ -2096,7 +2096,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
2096
2096
|
]),
|
|
2097
2097
|
_: 2
|
|
2098
2098
|
}, 1024),
|
|
2099
|
-
A.is_visible ? U("", !0) : (p(), $(n(
|
|
2099
|
+
A.is_visible ? U("", !0) : (p(), $(n(st), {
|
|
2100
2100
|
key: 0,
|
|
2101
2101
|
content: n(s)("hidden")
|
|
2102
2102
|
}, {
|
|
@@ -2152,11 +2152,11 @@ const wn = /* @__PURE__ */ N({
|
|
|
2152
2152
|
}, 8, ["title", "actions"]);
|
|
2153
2153
|
};
|
|
2154
2154
|
}
|
|
2155
|
-
}),
|
|
2155
|
+
}), $n = {
|
|
2156
2156
|
class: "wx-save-state",
|
|
2157
2157
|
role: "status",
|
|
2158
2158
|
"aria-live": "polite"
|
|
2159
|
-
},
|
|
2159
|
+
}, Tn = /* @__PURE__ */ R({
|
|
2160
2160
|
__name: "SaveState",
|
|
2161
2161
|
props: {
|
|
2162
2162
|
state: {},
|
|
@@ -2176,9 +2176,9 @@ const wn = /* @__PURE__ */ N({
|
|
|
2176
2176
|
const s = x(
|
|
2177
2177
|
() => t.state === "saving" ? "saving" : l.value ? "saved" : null
|
|
2178
2178
|
);
|
|
2179
|
-
return
|
|
2179
|
+
return Ze(() => {
|
|
2180
2180
|
i !== null && clearTimeout(i);
|
|
2181
|
-
}), (o, r) => (p(), T("span",
|
|
2181
|
+
}), (o, r) => (p(), T("span", $n, [
|
|
2182
2182
|
s.value ? (p(), $(n(Ve), {
|
|
2183
2183
|
key: 0,
|
|
2184
2184
|
class: ae(["wx-save-state__mark", { "is-saved": s.value === "saved" }]),
|
|
@@ -2188,7 +2188,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
2188
2188
|
}, null, 8, ["class", "name", "spin", "label"])) : U("", !0)
|
|
2189
2189
|
]));
|
|
2190
2190
|
}
|
|
2191
|
-
}),
|
|
2191
|
+
}), Sn = /* @__PURE__ */ Y(Tn, [["__scopeId", "data-v-216e5e44"]]), Cn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
2192
2192
|
__name: "Screen",
|
|
2193
2193
|
props: /* @__PURE__ */ oe({
|
|
2194
2194
|
name: {},
|
|
@@ -2203,7 +2203,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
2203
2203
|
}),
|
|
2204
2204
|
emits: /* @__PURE__ */ oe(["loaded"], ["update:modelValue"]),
|
|
2205
2205
|
setup(e, { expose: t, emit: a }) {
|
|
2206
|
-
const l = e, i = a, s =
|
|
2206
|
+
const l = e, i = a, s = de(e, "modelValue"), o = X(), r = P("webx-admin"), u = W(null), c = W(null);
|
|
2207
2207
|
async function h() {
|
|
2208
2208
|
u.value = null, c.value = null;
|
|
2209
2209
|
try {
|
|
@@ -2215,16 +2215,16 @@ const wn = /* @__PURE__ */ N({
|
|
|
2215
2215
|
}
|
|
2216
2216
|
return ee([() => l.name, () => o.i18n.state.locale], () => {
|
|
2217
2217
|
h();
|
|
2218
|
-
}, { immediate: !0 }), t({ reload: h }), (m, v) => (p(), T("div",
|
|
2218
|
+
}, { immediate: !0 }), t({ reload: h }), (m, v) => (p(), T("div", Cn, [
|
|
2219
2219
|
c.value ? (p(), $(n(be), {
|
|
2220
2220
|
key: 0,
|
|
2221
2221
|
type: "danger",
|
|
2222
2222
|
title: n(r)("shell.error-title"),
|
|
2223
2223
|
description: c.value
|
|
2224
|
-
}, null, 8, ["title", "description"])) : u.value === null ? (p(), $(n(
|
|
2224
|
+
}, null, 8, ["title", "description"])) : u.value === null ? (p(), $(n(ue), {
|
|
2225
2225
|
key: 1,
|
|
2226
2226
|
rows: 4
|
|
2227
|
-
})) : (p(), $(n(
|
|
2227
|
+
})) : (p(), $(n(Zt), {
|
|
2228
2228
|
key: 2,
|
|
2229
2229
|
modelValue: s.value,
|
|
2230
2230
|
"onUpdate:modelValue": v[0] || (v[0] = (d) => s.value = d),
|
|
@@ -2241,20 +2241,20 @@ const wn = /* @__PURE__ */ N({
|
|
|
2241
2241
|
}, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
|
|
2242
2242
|
]));
|
|
2243
2243
|
}
|
|
2244
|
-
}),
|
|
2244
|
+
}), Ln = /* @__PURE__ */ R({
|
|
2245
2245
|
name: "WxCategoryEditorPage",
|
|
2246
2246
|
__name: "CategoryEditorPage",
|
|
2247
2247
|
props: {
|
|
2248
2248
|
options: {}
|
|
2249
2249
|
},
|
|
2250
2250
|
setup(e) {
|
|
2251
|
-
const t = e, a = X(), l = xe(a, t.options.api), i =
|
|
2251
|
+
const t = e, a = X(), l = xe(a, t.options.api), i = et(), s = ge(), o = nt(), r = Ne(t.options.words), u = Re(), c = x(() => Number(i.params.id)), h = x(() => t.options.path), m = W(null), v = W({}), d = W(null), w = W(""), f = W(!0), y = W(!1), k = W({}), M = x(() => a.can(t.options.manage)), J = x(() => JSON.stringify(v.value)), S = x(() => w.value !== "" && J.value !== w.value), B = x(() => y.value ? "saving" : S.value ? "unsaved" : "saved"), C = x(
|
|
2252
2252
|
() => a.state.manifest?.modules.find((z) => z.id === t.options.module)?.title ?? ""
|
|
2253
2253
|
), A = x(() => {
|
|
2254
2254
|
const z = v.value.title;
|
|
2255
|
-
return
|
|
2255
|
+
return jt(z, o.active.value, m.value?.name ?? "") || r("untitled");
|
|
2256
2256
|
});
|
|
2257
|
-
|
|
2257
|
+
bn({ category: m, values: v, prefix: d, moving: () => r("address-moving") }), Aa({
|
|
2258
2258
|
values: v,
|
|
2259
2259
|
prefix: d,
|
|
2260
2260
|
path: x(() => m.value?.path),
|
|
@@ -2311,9 +2311,9 @@ const wn = /* @__PURE__ */ N({
|
|
|
2311
2311
|
K();
|
|
2312
2312
|
}), Le(() => {
|
|
2313
2313
|
K(), window.addEventListener("beforeunload", te);
|
|
2314
|
-
}),
|
|
2314
|
+
}), Ze(() => {
|
|
2315
2315
|
window.removeEventListener("beforeunload", te);
|
|
2316
|
-
}),
|
|
2316
|
+
}), St(async () => !S.value || !M.value ? !0 : await he({
|
|
2317
2317
|
title: r("leave-title"),
|
|
2318
2318
|
message: r("leave-text"),
|
|
2319
2319
|
confirmText: r("leave"),
|
|
@@ -2338,19 +2338,19 @@ const wn = /* @__PURE__ */ N({
|
|
|
2338
2338
|
onKeydown: ke
|
|
2339
2339
|
}, [
|
|
2340
2340
|
f.value || !m.value ? (p(), T(H, { key: 0 }, [
|
|
2341
|
-
b(n(
|
|
2341
|
+
b(n(ue), {
|
|
2342
2342
|
class: "wx-category-editor__ghost",
|
|
2343
2343
|
title: "",
|
|
2344
2344
|
rows: 1
|
|
2345
2345
|
}),
|
|
2346
2346
|
b(n(Se), null, {
|
|
2347
2347
|
default: g(() => [
|
|
2348
|
-
b(n(
|
|
2348
|
+
b(n(ue), { rows: 6 })
|
|
2349
2349
|
]),
|
|
2350
2350
|
_: 1
|
|
2351
2351
|
})
|
|
2352
2352
|
], 64)) : (p(), T(H, { key: 1 }, [
|
|
2353
|
-
b(
|
|
2353
|
+
b(it, {
|
|
2354
2354
|
divider: "",
|
|
2355
2355
|
back: h.value,
|
|
2356
2356
|
"back-label": C.value,
|
|
@@ -2359,7 +2359,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
2359
2359
|
actions: _e.value
|
|
2360
2360
|
}, Ae({
|
|
2361
2361
|
trail: g(() => [
|
|
2362
|
-
b(n(
|
|
2362
|
+
b(n(Kt), {
|
|
2363
2363
|
size: "sm",
|
|
2364
2364
|
label: n(r)("trail")
|
|
2365
2365
|
}, {
|
|
@@ -2398,16 +2398,16 @@ const wn = /* @__PURE__ */ N({
|
|
|
2398
2398
|
key: "0"
|
|
2399
2399
|
}
|
|
2400
2400
|
]), 1032, ["back", "back-label", "title", "subtitle", "actions"]),
|
|
2401
|
-
b(
|
|
2401
|
+
b(Wn, {
|
|
2402
2402
|
modelValue: v.value,
|
|
2403
2403
|
"onUpdate:modelValue": q[0] || (q[0] = (_) => v.value = _),
|
|
2404
2404
|
name: t.options.screen,
|
|
2405
2405
|
errors: k.value,
|
|
2406
2406
|
disabled: !M.value || y.value
|
|
2407
2407
|
}, null, 8, ["modelValue", "name", "errors", "disabled"]),
|
|
2408
|
-
M.value ? (p(), $(n(
|
|
2408
|
+
M.value ? (p(), $(n(qt), { key: 0 }, {
|
|
2409
2409
|
state: g(() => [
|
|
2410
|
-
b(
|
|
2410
|
+
b(Sn, { state: B.value }, null, 8, ["state"])
|
|
2411
2411
|
]),
|
|
2412
2412
|
default: g(() => [
|
|
2413
2413
|
b(n(Z), {
|
|
@@ -2427,19 +2427,24 @@ const wn = /* @__PURE__ */ N({
|
|
|
2427
2427
|
], 64))
|
|
2428
2428
|
], 32));
|
|
2429
2429
|
}
|
|
2430
|
-
}),
|
|
2431
|
-
function
|
|
2430
|
+
}), An = /* @__PURE__ */ Y(Ln, [["__scopeId", "data-v-86d85f8c"]]);
|
|
2431
|
+
function je(e, t) {
|
|
2432
|
+
return R({
|
|
2433
|
+
name: "WxCategoriesView",
|
|
2434
|
+
setup: () => () => re(e, { options: t })
|
|
2435
|
+
});
|
|
2436
|
+
}
|
|
2437
|
+
function tl(e) {
|
|
2432
2438
|
return [
|
|
2433
|
-
{ path: e.path, name: e.name, component:
|
|
2439
|
+
{ path: e.path, name: e.name, component: je(_n, e) },
|
|
2434
2440
|
{
|
|
2435
2441
|
path: `${e.path}/:id(\\d+)`,
|
|
2436
2442
|
name: `${e.name}.edit`,
|
|
2437
|
-
component:
|
|
2438
|
-
props: { options: e }
|
|
2443
|
+
component: je(An, e)
|
|
2439
2444
|
}
|
|
2440
2445
|
];
|
|
2441
2446
|
}
|
|
2442
|
-
const
|
|
2447
|
+
const al = 76, nl = /* @__PURE__ */ R({
|
|
2443
2448
|
__name: "FilterChips",
|
|
2444
2449
|
props: {
|
|
2445
2450
|
filters: {}
|
|
@@ -2459,7 +2464,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2459
2464
|
_: 2
|
|
2460
2465
|
}, 1032, ["onClose"]))), 128));
|
|
2461
2466
|
}
|
|
2462
|
-
}),
|
|
2467
|
+
}), zn = { class: "wx-rename__footer" }, Vn = /* @__PURE__ */ R({
|
|
2463
2468
|
__name: "RenameButton",
|
|
2464
2469
|
props: {
|
|
2465
2470
|
name: { default: "" },
|
|
@@ -2472,7 +2477,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2472
2477
|
setup(e, { emit: t }) {
|
|
2473
2478
|
const a = e, l = t, i = P("webx-admin"), s = W(!1), o = W(a.name), r = W(null), u = x(() => a.label ?? i("editor.rename"));
|
|
2474
2479
|
ee(s, async (h) => {
|
|
2475
|
-
h && (o.value = a.name, await
|
|
2480
|
+
h && (o.value = a.name, await Je(), r.value?.focus(), r.value?.select());
|
|
2476
2481
|
});
|
|
2477
2482
|
function c() {
|
|
2478
2483
|
const h = o.value.trim();
|
|
@@ -2482,7 +2487,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2482
2487
|
}
|
|
2483
2488
|
l("rename", h), s.value = !1;
|
|
2484
2489
|
}
|
|
2485
|
-
return (h, m) => (p(), $(n(
|
|
2490
|
+
return (h, m) => (p(), $(n(Yt), {
|
|
2486
2491
|
open: s.value,
|
|
2487
2492
|
"onUpdate:open": m[2] || (m[2] = (v) => s.value = v),
|
|
2488
2493
|
title: u.value,
|
|
@@ -2502,7 +2507,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2502
2507
|
default: g(() => [
|
|
2503
2508
|
O("form", {
|
|
2504
2509
|
class: "wx-rename",
|
|
2505
|
-
onSubmit:
|
|
2510
|
+
onSubmit: qe(c, ["prevent"])
|
|
2506
2511
|
}, [
|
|
2507
2512
|
b(n(ye), {
|
|
2508
2513
|
ref_key: "field",
|
|
@@ -2511,9 +2516,9 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2511
2516
|
"onUpdate:modelValue": m[0] || (m[0] = (v) => o.value = v),
|
|
2512
2517
|
"aria-label": u.value,
|
|
2513
2518
|
placeholder: e.placeholder,
|
|
2514
|
-
onKeydown: m[1] || (m[1] =
|
|
2519
|
+
onKeydown: m[1] || (m[1] = Qe((v) => s.value = !1, ["esc"]))
|
|
2515
2520
|
}, null, 8, ["modelValue", "aria-label", "placeholder"]),
|
|
2516
|
-
O("div",
|
|
2521
|
+
O("div", zn, [
|
|
2517
2522
|
b(n(Z), {
|
|
2518
2523
|
type: "primary",
|
|
2519
2524
|
size: "sm",
|
|
@@ -2530,7 +2535,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2530
2535
|
_: 1
|
|
2531
2536
|
}, 8, ["open", "title"]));
|
|
2532
2537
|
}
|
|
2533
|
-
}),
|
|
2538
|
+
}), ll = /* @__PURE__ */ Y(Vn, [["__scopeId", "data-v-d879e8d3"]]), En = ["innerHTML"], Un = /* @__PURE__ */ R({
|
|
2534
2539
|
__name: "HelpButton",
|
|
2535
2540
|
props: {
|
|
2536
2541
|
body: {},
|
|
@@ -2540,7 +2545,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2540
2545
|
width: { default: 720 }
|
|
2541
2546
|
},
|
|
2542
2547
|
setup(e) {
|
|
2543
|
-
const t = e, a = P("webx-admin"), l = W(!1), i = x(() => t.title ?? a("help.title")), s = x(() =>
|
|
2548
|
+
const t = e, a = P("webx-admin"), l = W(!1), i = x(() => t.title ?? a("help.title")), s = x(() => mn(t.body));
|
|
2544
2549
|
return (o, r) => (p(), T(H, null, [
|
|
2545
2550
|
b(n(se), {
|
|
2546
2551
|
type: "details",
|
|
@@ -2550,7 +2555,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2550
2555
|
title: e.label ?? i.value,
|
|
2551
2556
|
onClick: r[0] || (r[0] = (u) => l.value = !0)
|
|
2552
2557
|
}, null, 8, ["size", "title"]),
|
|
2553
|
-
b(n(
|
|
2558
|
+
b(n(lt), {
|
|
2554
2559
|
open: l.value,
|
|
2555
2560
|
"onUpdate:open": r[1] || (r[1] = (u) => l.value = u),
|
|
2556
2561
|
title: i.value,
|
|
@@ -2560,13 +2565,13 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2560
2565
|
O("div", {
|
|
2561
2566
|
class: "wx-help",
|
|
2562
2567
|
innerHTML: s.value
|
|
2563
|
-
}, null, 8,
|
|
2568
|
+
}, null, 8, En)
|
|
2564
2569
|
]),
|
|
2565
2570
|
_: 1
|
|
2566
2571
|
}, 8, ["open", "title", "width"])
|
|
2567
2572
|
], 64));
|
|
2568
2573
|
}
|
|
2569
|
-
}),
|
|
2574
|
+
}), ol = /* @__PURE__ */ Y(Un, [["__scopeId", "data-v-6c280d42"]]), ht = /* @__PURE__ */ R({
|
|
2570
2575
|
name: "WxDate",
|
|
2571
2576
|
__name: "DateText",
|
|
2572
2577
|
props: {
|
|
@@ -2576,8 +2581,8 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2576
2581
|
tone: { default: "muted" }
|
|
2577
2582
|
},
|
|
2578
2583
|
setup(e) {
|
|
2579
|
-
const t = e, a =
|
|
2580
|
-
return (o, r) => i.value ? (p(), $(n(
|
|
2584
|
+
const t = e, a = ft(), l = x(() => t.compact ? a.compact(t.value) : a.short(t.value)), i = x(() => a.exact(t.value)), s = x(() => a.iso(t.value));
|
|
2585
|
+
return (o, r) => i.value ? (p(), $(n(st), {
|
|
2581
2586
|
key: 0,
|
|
2582
2587
|
content: i.value
|
|
2583
2588
|
}, {
|
|
@@ -2606,16 +2611,16 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2606
2611
|
_: 1
|
|
2607
2612
|
}, 8, ["size", "tone"]));
|
|
2608
2613
|
}
|
|
2609
|
-
}),
|
|
2614
|
+
}), Rn = { class: "wx-notes" }, Nn = {
|
|
2610
2615
|
key: 3,
|
|
2611
2616
|
class: "wx-notes__list"
|
|
2612
|
-
},
|
|
2617
|
+
}, Bn = { class: "wx-note__body" }, In = { class: "wx-note__head" }, Pn = { class: "wx-note__buttons" }, Dn = {
|
|
2613
2618
|
key: 1,
|
|
2614
2619
|
class: "wx-note__text"
|
|
2615
|
-
},
|
|
2620
|
+
}, Mn = {
|
|
2616
2621
|
key: 4,
|
|
2617
2622
|
class: "wx-notes__new"
|
|
2618
|
-
},
|
|
2623
|
+
}, Fn = /* @__PURE__ */ R({
|
|
2619
2624
|
name: "WxNotes",
|
|
2620
2625
|
__name: "NotesFeed",
|
|
2621
2626
|
props: {
|
|
@@ -2626,7 +2631,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2626
2631
|
},
|
|
2627
2632
|
emits: ["change"],
|
|
2628
2633
|
setup(e, { emit: t }) {
|
|
2629
|
-
const a = e, l = t, i = X(), s = P("webx-admin"), o = Re(), r = W([]), u = W(!0), c = W(""), h = W(!1), m = W(null), v = W(""), d = x(() =>
|
|
2634
|
+
const a = e, l = t, i = X(), s = P("webx-admin"), o = Re(), r = W([]), u = W(!0), c = W(""), h = W(!1), m = W(null), v = W(""), d = x(() => yn(i, a.type, a.id)), w = x(() => a.title ?? s("notes.title"));
|
|
2630
2635
|
async function f() {
|
|
2631
2636
|
u.value = !0;
|
|
2632
2637
|
try {
|
|
@@ -2701,7 +2706,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2701
2706
|
function B(C) {
|
|
2702
2707
|
return C.author?.name ?? s("notes.unknown-author");
|
|
2703
2708
|
}
|
|
2704
|
-
return (C, A) => (p(), T("section",
|
|
2709
|
+
return (C, A) => (p(), T("section", Rn, [
|
|
2705
2710
|
w.value ? (p(), $(n(G), {
|
|
2706
2711
|
key: 0,
|
|
2707
2712
|
weight: "medium",
|
|
@@ -2712,25 +2717,25 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2712
2717
|
]),
|
|
2713
2718
|
_: 1
|
|
2714
2719
|
})) : U("", !0),
|
|
2715
|
-
u.value ? (p(), $(n(
|
|
2720
|
+
u.value ? (p(), $(n(ue), {
|
|
2716
2721
|
key: 1,
|
|
2717
2722
|
rows: 2
|
|
2718
|
-
})) : r.value.length === 0 ? (p(), $(n(
|
|
2723
|
+
})) : r.value.length === 0 ? (p(), $(n(ot), {
|
|
2719
2724
|
key: 2,
|
|
2720
2725
|
size: "sm",
|
|
2721
2726
|
description: n(s)("notes.empty")
|
|
2722
|
-
}, null, 8, ["description"])) : (p(), T("ul",
|
|
2727
|
+
}, null, 8, ["description"])) : (p(), T("ul", Nn, [
|
|
2723
2728
|
(p(!0), T(H, null, Q(r.value, (E) => (p(), T("li", {
|
|
2724
2729
|
key: E.id,
|
|
2725
2730
|
class: "wx-note"
|
|
2726
2731
|
}, [
|
|
2727
|
-
b(n(
|
|
2732
|
+
b(n(Xt), {
|
|
2728
2733
|
name: B(E),
|
|
2729
2734
|
size: "sm",
|
|
2730
2735
|
tone: "auto"
|
|
2731
2736
|
}, null, 8, ["name"]),
|
|
2732
|
-
O("div",
|
|
2733
|
-
O("div",
|
|
2737
|
+
O("div", Bn, [
|
|
2738
|
+
O("div", In, [
|
|
2734
2739
|
b(n(G), {
|
|
2735
2740
|
size: "sm",
|
|
2736
2741
|
weight: "medium",
|
|
@@ -2741,7 +2746,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2741
2746
|
]),
|
|
2742
2747
|
_: 2
|
|
2743
2748
|
}, 1024),
|
|
2744
|
-
b(
|
|
2749
|
+
b(ht, {
|
|
2745
2750
|
value: E.created_at
|
|
2746
2751
|
}, null, 8, ["value"]),
|
|
2747
2752
|
b(Ue, {
|
|
@@ -2755,7 +2760,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2755
2760
|
"onUpdate:modelValue": A[0] || (A[0] = (K) => v.value = K),
|
|
2756
2761
|
autosize: { minRows: 2, maxRows: 10 }
|
|
2757
2762
|
}, null, 8, ["modelValue"]),
|
|
2758
|
-
O("div",
|
|
2763
|
+
O("div", Pn, [
|
|
2759
2764
|
b(n(Z), {
|
|
2760
2765
|
size: "sm",
|
|
2761
2766
|
type: "primary",
|
|
@@ -2777,11 +2782,11 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2777
2782
|
_: 1
|
|
2778
2783
|
})
|
|
2779
2784
|
])
|
|
2780
|
-
], 64)) : (p(), T("p",
|
|
2785
|
+
], 64)) : (p(), T("p", Dn, L(E.body), 1))
|
|
2781
2786
|
])
|
|
2782
2787
|
]))), 128))
|
|
2783
2788
|
])),
|
|
2784
|
-
e.can ? (p(), T("div",
|
|
2789
|
+
e.can ? (p(), T("div", Mn, [
|
|
2785
2790
|
b(n(De), {
|
|
2786
2791
|
modelValue: c.value,
|
|
2787
2792
|
"onUpdate:modelValue": A[2] || (A[2] = (E) => c.value = E),
|
|
@@ -2803,18 +2808,18 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2803
2808
|
])) : U("", !0)
|
|
2804
2809
|
]));
|
|
2805
2810
|
}
|
|
2806
|
-
}),
|
|
2811
|
+
}), sl = /* @__PURE__ */ Y(Fn, [["__scopeId", "data-v-71004c1a"]]), On = {
|
|
2807
2812
|
key: 1,
|
|
2808
2813
|
class: "wx-backup-note"
|
|
2809
|
-
},
|
|
2814
|
+
}, Hn = 48, jn = /* @__PURE__ */ R({
|
|
2810
2815
|
name: "WxBackupNote",
|
|
2811
2816
|
__name: "BackupNote",
|
|
2812
2817
|
setup(e) {
|
|
2813
|
-
const t = X(), a =
|
|
2818
|
+
const t = X(), a = ft(), l = P("webx-admin"), i = x(() => t.state.manifest?.backup ?? null), s = x(() => i.value !== null && t.can("settings.view")), o = x(() => {
|
|
2814
2819
|
const c = i.value?.at;
|
|
2815
2820
|
if (c == null) return !0;
|
|
2816
2821
|
const h = new Date(c).getTime();
|
|
2817
|
-
return Number.isNaN(h) || Date.now() - h >
|
|
2822
|
+
return Number.isNaN(h) || Date.now() - h > Hn * 36e5;
|
|
2818
2823
|
}), r = x(() => {
|
|
2819
2824
|
const c = i.value?.bytes;
|
|
2820
2825
|
if (c == null) return "";
|
|
@@ -2836,7 +2841,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2836
2841
|
type: "warning",
|
|
2837
2842
|
variant: "soft",
|
|
2838
2843
|
description: u.value
|
|
2839
|
-
}, null, 8, ["description"])) : s.value ? (p(), T("p",
|
|
2844
|
+
}, null, 8, ["description"])) : s.value ? (p(), T("p", On, [
|
|
2840
2845
|
b(n(G), {
|
|
2841
2846
|
size: "sm",
|
|
2842
2847
|
tone: "muted"
|
|
@@ -2846,7 +2851,7 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2846
2851
|
]),
|
|
2847
2852
|
_: 1
|
|
2848
2853
|
}),
|
|
2849
|
-
b(
|
|
2854
|
+
b(ht, {
|
|
2850
2855
|
value: i.value?.at
|
|
2851
2856
|
}, null, 8, ["value"]),
|
|
2852
2857
|
r.value ? (p(), $(n(G), {
|
|
@@ -2861,69 +2866,69 @@ const tl = 76, al = /* @__PURE__ */ N({
|
|
|
2861
2866
|
})) : U("", !0)
|
|
2862
2867
|
])) : U("", !0);
|
|
2863
2868
|
}
|
|
2864
|
-
}),
|
|
2869
|
+
}), il = /* @__PURE__ */ Y(jn, [["__scopeId", "data-v-beeee67e"]]);
|
|
2865
2870
|
export {
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2871
|
+
Pa as AdminLanding,
|
|
2872
|
+
Da as AdminNav,
|
|
2873
|
+
Ga as AdminShell,
|
|
2869
2874
|
Ce as HttpError,
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2875
|
+
ba as WxBackButton,
|
|
2876
|
+
il as WxBackupNote,
|
|
2877
|
+
ia as WxCategoriesField,
|
|
2878
|
+
_n as WxCategoriesPage,
|
|
2879
|
+
xn as WxCategoryCreateDialog,
|
|
2880
|
+
An as WxCategoryEditorPage,
|
|
2876
2881
|
Me as WxCategorySlug,
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2882
|
+
ht as WxDate,
|
|
2883
|
+
nl as WxFilterChips,
|
|
2884
|
+
ol as WxHelpButton,
|
|
2885
|
+
ya as WxLinkField,
|
|
2886
|
+
ga as WxLinkPicker,
|
|
2887
|
+
rt as WxListScreen,
|
|
2888
|
+
sl as WxNotes,
|
|
2889
|
+
ll as WxRenameButton,
|
|
2890
|
+
La as WxRichTextField,
|
|
2886
2891
|
Ue as WxRowMenu,
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2892
|
+
Sn as WxSaveState,
|
|
2893
|
+
Wn as WxScreen,
|
|
2894
|
+
it as WxScreenHead,
|
|
2890
2895
|
Me as WxSlugField,
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2896
|
+
dt as adminKey,
|
|
2897
|
+
mt as adminMessages,
|
|
2898
|
+
Ra as adminTypes,
|
|
2899
|
+
tl as categoryRoutes,
|
|
2900
|
+
Qn as createAdmin,
|
|
2901
|
+
Na as createAdminContext,
|
|
2897
2902
|
xe as createCategoriesApi,
|
|
2898
|
-
|
|
2899
|
-
|
|
2903
|
+
vn as createDates,
|
|
2904
|
+
Qa as createHttp,
|
|
2900
2905
|
Ee as createI18n,
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
+
ua as createLinksApi,
|
|
2907
|
+
yn as createNotesApi,
|
|
2908
|
+
nn as createTheme,
|
|
2909
|
+
ra as emptyLink,
|
|
2910
|
+
pn as errorText,
|
|
2906
2911
|
we as i18nKey,
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
+
wn as itemOrderMode,
|
|
2913
|
+
Ba as provideAdmin,
|
|
2914
|
+
ta as provideI18n,
|
|
2915
|
+
Aa as provideRecordAddress,
|
|
2916
|
+
an as provideTheme,
|
|
2912
2917
|
Fe as readCookie,
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
+
ut as recordAddressKey,
|
|
2919
|
+
mn as renderMarkdown,
|
|
2920
|
+
na as reorderItems,
|
|
2921
|
+
al as rowMenuWidth,
|
|
2922
|
+
ct as themeKey,
|
|
2918
2923
|
X as useAdmin,
|
|
2919
|
-
|
|
2924
|
+
Zn as useCategoryEditor,
|
|
2920
2925
|
Ne as useCategoryWords,
|
|
2921
|
-
|
|
2926
|
+
ft as useDates,
|
|
2922
2927
|
Re as useErrorText,
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2928
|
+
ea as useI18n,
|
|
2929
|
+
el as useItemOrder,
|
|
2930
|
+
za as useRecordAddress,
|
|
2931
|
+
Jn as useTheme,
|
|
2927
2932
|
P as useTranslate
|
|
2928
2933
|
};
|
|
2929
2934
|
//# sourceMappingURL=index.js.map
|