@webx-ui/module-admin 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +290 -284
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as U, useModel as he, openBlock as f, createElementBlock as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { WxHeading as
|
|
4
|
-
import { WxScreenRenderer as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as U, useModel as he, openBlock as f, createElementBlock as x, normalizeClass as le, createBlock as b, unref as d, withCtx as g, createTextVNode as C, toDisplayString as E, createCommentVNode as W, renderSlot as L, Fragment as R, mergeModels as se, inject as G, reactive as oe, computed as S, watch as J, resolveComponent as z, renderList as j, ref as A, watchEffect as $e, onUnmounted as Se, createVNode as y, createElementVNode as M, isRef as Te, createApp as ze, h as O, withModifiers as pe, nextTick as Ee, withKeys as Ae } from "vue";
|
|
2
|
+
import { useRouter as we, useRoute as Ce, createRouter as Le, createWebHistory as We, RouterLink as Ue } from "vue-router";
|
|
3
|
+
import { WxHeading as Re, WxTabs as Me, WxCard as me, WxResult as Ne, useResponsiveShell as Pe, shellLayoutFor as Ve, WxToaster as De, WebxUI as Ie, localesKey as Be, WxAlert as je, WxSkeleton as ge, WxActions as He, WxDropdownItem as Oe, WxAction as ue, WxPopover as Fe, WxInput as Ke, WxButton as X, WxDialog as qe, WxTooltip as Xe, WxText as Y, WxEmpty as Ye, WxAvatar as Ge, WxTextarea as fe, toast as I, confirm as Je } from "@webx-ui/core";
|
|
4
|
+
import { WxScreenRenderer as Qe } from "@webx-ui/schema";
|
|
5
|
+
const Ze = ["data-wx-fill"], et = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "wx-list-screen__head"
|
|
8
|
-
},
|
|
8
|
+
}, tt = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "wx-list-screen__actions"
|
|
11
|
-
},
|
|
11
|
+
}, nt = /* @__PURE__ */ U({
|
|
12
12
|
__name: "ListScreen",
|
|
13
13
|
props: /* @__PURE__ */ se({
|
|
14
14
|
title: { default: void 0 },
|
|
@@ -24,26 +24,26 @@ const Je = ["data-wx-fill"], Qe = {
|
|
|
24
24
|
emits: ["update:view"],
|
|
25
25
|
setup(e) {
|
|
26
26
|
const t = he(e, "view");
|
|
27
|
-
return (n, a) => (f(),
|
|
27
|
+
return (n, a) => (f(), x("div", {
|
|
28
28
|
class: le(["wx-list-screen", { "is-fill": e.fill }]),
|
|
29
29
|
"data-wx-fill": e.fill ? "" : void 0
|
|
30
30
|
}, [
|
|
31
|
-
e.title || n.$slots.actions ? (f(),
|
|
32
|
-
e.title ? (f(),
|
|
31
|
+
e.title || n.$slots.actions ? (f(), x("div", et, [
|
|
32
|
+
e.title ? (f(), b(d(Re), {
|
|
33
33
|
key: 0,
|
|
34
34
|
level: 2,
|
|
35
35
|
class: "wx-list-screen__title"
|
|
36
36
|
}, {
|
|
37
|
-
default:
|
|
38
|
-
|
|
37
|
+
default: g(() => [
|
|
38
|
+
C(E(e.title), 1)
|
|
39
39
|
]),
|
|
40
40
|
_: 1
|
|
41
|
-
})) :
|
|
42
|
-
n.$slots.actions ? (f(),
|
|
43
|
-
|
|
44
|
-
])) :
|
|
45
|
-
])) :
|
|
46
|
-
e.views && e.views.length > 0 ? (f(),
|
|
41
|
+
})) : W("", !0),
|
|
42
|
+
n.$slots.actions ? (f(), x("div", tt, [
|
|
43
|
+
L(n.$slots, "actions", {}, void 0, !0)
|
|
44
|
+
])) : W("", !0)
|
|
45
|
+
])) : W("", !0),
|
|
46
|
+
e.views && e.views.length > 0 ? (f(), b(d(Me), {
|
|
47
47
|
key: 1,
|
|
48
48
|
modelValue: t.value,
|
|
49
49
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => t.value = r),
|
|
@@ -52,40 +52,40 @@ const Je = ["data-wx-fill"], Qe = {
|
|
|
52
52
|
"collapse-below": e.collapseBelow,
|
|
53
53
|
"aria-label": e.title
|
|
54
54
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
e.card ? (f(),
|
|
55
|
+
default: g(() => [
|
|
56
|
+
e.card ? (f(), b(d(me), {
|
|
57
57
|
key: 0,
|
|
58
58
|
class: "wx-list-screen__card",
|
|
59
59
|
padding: e.padding
|
|
60
60
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
|
|
61
|
+
default: g(() => [
|
|
62
|
+
L(n.$slots, "default", {}, void 0, !0)
|
|
63
63
|
]),
|
|
64
64
|
_: 3
|
|
65
|
-
}, 8, ["padding"])) :
|
|
65
|
+
}, 8, ["padding"])) : L(n.$slots, "default", {}, void 0, !0, 1)
|
|
66
66
|
]),
|
|
67
67
|
_: 3
|
|
68
|
-
}, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (f(),
|
|
69
|
-
e.card ? (f(),
|
|
68
|
+
}, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (f(), x(R, { key: 2 }, [
|
|
69
|
+
e.card ? (f(), b(d(me), {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "wx-list-screen__card",
|
|
72
72
|
padding: e.padding
|
|
73
73
|
}, {
|
|
74
|
-
default:
|
|
75
|
-
|
|
74
|
+
default: g(() => [
|
|
75
|
+
L(n.$slots, "default", {}, void 0, !0)
|
|
76
76
|
]),
|
|
77
77
|
_: 3
|
|
78
|
-
}, 8, ["padding"])) :
|
|
78
|
+
}, 8, ["padding"])) : L(n.$slots, "default", {}, void 0, !0, 1)
|
|
79
79
|
], 64))
|
|
80
|
-
], 10,
|
|
80
|
+
], 10, Ze));
|
|
81
81
|
}
|
|
82
|
-
}),
|
|
82
|
+
}), B = (e, t) => {
|
|
83
83
|
const n = e.__vccOpts || e;
|
|
84
84
|
for (const [a, r] of t)
|
|
85
85
|
n[a] = r;
|
|
86
86
|
return n;
|
|
87
|
-
},
|
|
88
|
-
"wx-list": { component:
|
|
87
|
+
}, at = /* @__PURE__ */ B(nt, [["__scopeId", "data-v-7586ed04"]]), lt = {
|
|
88
|
+
"wx-list": { component: at, kind: "layout", labelProp: "title" }
|
|
89
89
|
}, ye = /* @__PURE__ */ Symbol("webx-admin");
|
|
90
90
|
function H() {
|
|
91
91
|
const e = G(ye, null);
|
|
@@ -93,7 +93,7 @@ function H() {
|
|
|
93
93
|
throw new Error("useAdmin() was called outside a panel created by createAdmin().");
|
|
94
94
|
return e;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function st(e) {
|
|
97
97
|
const t = oe({
|
|
98
98
|
status: "loading",
|
|
99
99
|
manifest: null,
|
|
@@ -105,10 +105,10 @@ function at(e) {
|
|
|
105
105
|
return [];
|
|
106
106
|
const v = [];
|
|
107
107
|
for (const h of l.modules) {
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
108
|
+
const w = e.modules.find((_) => _.id === h.id);
|
|
109
|
+
if (w === void 0)
|
|
110
110
|
continue;
|
|
111
|
-
const p =
|
|
111
|
+
const p = w.path ?? w.routes?.[0]?.path;
|
|
112
112
|
p !== void 0 && v.push({
|
|
113
113
|
id: h.id,
|
|
114
114
|
title: h.title,
|
|
@@ -120,21 +120,21 @@ function at(e) {
|
|
|
120
120
|
return v;
|
|
121
121
|
}), a = S(() => {
|
|
122
122
|
const l = t.manifest?.groups ?? [], v = [], h = /* @__PURE__ */ new Map();
|
|
123
|
-
for (const
|
|
124
|
-
if (
|
|
125
|
-
const p = h.get(
|
|
126
|
-
p.push(
|
|
123
|
+
for (const w of n.value)
|
|
124
|
+
if (w.group !== null && l.some((p) => p.id === w.group)) {
|
|
125
|
+
const p = h.get(w.group) ?? [];
|
|
126
|
+
p.push(w), h.set(w.group, p);
|
|
127
127
|
} else
|
|
128
|
-
v.push(
|
|
128
|
+
v.push(w);
|
|
129
129
|
return {
|
|
130
130
|
top: v,
|
|
131
|
-
groups: l.filter((
|
|
132
|
-
id:
|
|
133
|
-
title:
|
|
134
|
-
entries: h.get(
|
|
131
|
+
groups: l.filter((w) => h.has(w.id)).map((w) => ({
|
|
132
|
+
id: w.id,
|
|
133
|
+
title: w.title,
|
|
134
|
+
entries: h.get(w.id) ?? []
|
|
135
135
|
}))
|
|
136
136
|
};
|
|
137
|
-
}), r = { ...
|
|
137
|
+
}), r = { ...lt };
|
|
138
138
|
for (const l of e.modules)
|
|
139
139
|
Object.assign(r, l.types);
|
|
140
140
|
Object.assign(r, e.types);
|
|
@@ -142,8 +142,8 @@ function at(e) {
|
|
|
142
142
|
async function s(l) {
|
|
143
143
|
const v = `${e.i18n.state.locale}:${l}`;
|
|
144
144
|
let h = o.get(v);
|
|
145
|
-
return h === void 0 && (h = e.http.get(`${e.apiPath}/screens/${l}`).then((
|
|
146
|
-
throw o.delete(v),
|
|
145
|
+
return h === void 0 && (h = e.http.get(`${e.apiPath}/screens/${l}`).then((w) => w.data.root).catch((w) => {
|
|
146
|
+
throw o.delete(v), w;
|
|
147
147
|
}), o.set(v, h)), h;
|
|
148
148
|
}
|
|
149
149
|
let u = null;
|
|
@@ -157,7 +157,7 @@ function at(e) {
|
|
|
157
157
|
const l = await e.loadManifest();
|
|
158
158
|
t.manifest = l, e.i18n.state.contentLocales = l.locales ?? [], e.i18n.state.panelLocales = l.panelLocales ?? e.i18n.state.panelLocales, l.locale !== void 0 && l.locale !== e.i18n.state.locale && await m(l.locale), t.status = "ready";
|
|
159
159
|
} catch (l) {
|
|
160
|
-
if (
|
|
160
|
+
if (it(l)) {
|
|
161
161
|
t.manifest = null, t.user = null, t.status = "unauthenticated";
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
@@ -207,14 +207,14 @@ function at(e) {
|
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function ot(e, t) {
|
|
211
211
|
e.provide(ye, t);
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function it(e) {
|
|
214
214
|
return typeof e == "object" && e !== null && "status" in e && e.status === 401;
|
|
215
215
|
}
|
|
216
216
|
const Q = /* @__PURE__ */ Symbol("webx-i18n");
|
|
217
|
-
function
|
|
217
|
+
function dn() {
|
|
218
218
|
const e = G(Q, null);
|
|
219
219
|
if (e === null)
|
|
220
220
|
throw new Error("useI18n() was called outside a panel created by createAdmin().");
|
|
@@ -224,7 +224,7 @@ function N(e) {
|
|
|
224
224
|
const t = G(Q, null);
|
|
225
225
|
return t === null ? de().scope(e) : t.scope(e);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function rt(e, t) {
|
|
228
228
|
e.provide(Q, t);
|
|
229
229
|
}
|
|
230
230
|
function de(e = {}) {
|
|
@@ -247,7 +247,7 @@ function de(e = {}) {
|
|
|
247
247
|
const [m, l] = i.includes("::") ? i.split("::", 2) : [u, i], v = l.split("."), h = o(r.value, m, v) ?? o(a, m, v) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
|
|
248
248
|
// label says nothing to anybody trying to fix it.
|
|
249
249
|
i;
|
|
250
|
-
return c === void 0 ? h :
|
|
250
|
+
return c === void 0 ? h : ut(h, c);
|
|
251
251
|
}
|
|
252
252
|
return {
|
|
253
253
|
state: n,
|
|
@@ -263,19 +263,19 @@ function de(e = {}) {
|
|
|
263
263
|
t: (u, i) => s("", u, i)
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function ut(e, t) {
|
|
267
267
|
let n = e;
|
|
268
268
|
for (const [a, r] of Object.entries(t))
|
|
269
269
|
n = n.replaceAll(`:${a}`, String(r));
|
|
270
270
|
return n;
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const dt = /* @__PURE__ */ U({
|
|
273
273
|
__name: "AdminLanding",
|
|
274
274
|
props: {
|
|
275
275
|
landing: { default: null }
|
|
276
276
|
},
|
|
277
277
|
setup(e) {
|
|
278
|
-
const t = e, n = H(), a =
|
|
278
|
+
const t = e, n = H(), a = we(), r = N("webx-admin"), o = S(() => {
|
|
279
279
|
const s = n.nav.value;
|
|
280
280
|
return s.length === 0 ? null : ((t.landing === null ? void 0 : s.find((i) => i.path === t.landing)) ?? s[0])?.path ?? null;
|
|
281
281
|
});
|
|
@@ -285,21 +285,21 @@ const rt = /* @__PURE__ */ U({
|
|
|
285
285
|
s !== null && a.replace(s);
|
|
286
286
|
},
|
|
287
287
|
{ immediate: !0 }
|
|
288
|
-
), (s, u) => o.value === null && d(n).state.status === "ready" ? (f(),
|
|
288
|
+
), (s, u) => o.value === null && d(n).state.status === "ready" ? (f(), b(d(Ne), {
|
|
289
289
|
key: 0,
|
|
290
290
|
status: "info",
|
|
291
291
|
title: d(r)("shell.empty-title"),
|
|
292
292
|
description: d(r)("shell.empty-description")
|
|
293
|
-
}, null, 8, ["title", "description"])) :
|
|
293
|
+
}, null, 8, ["title", "description"])) : W("", !0);
|
|
294
294
|
}
|
|
295
|
-
}),
|
|
295
|
+
}), ct = /* @__PURE__ */ U({
|
|
296
296
|
__name: "AdminNav",
|
|
297
297
|
props: {
|
|
298
298
|
collapsed: { type: Boolean }
|
|
299
299
|
},
|
|
300
300
|
emits: ["select"],
|
|
301
301
|
setup(e, { emit: t }) {
|
|
302
|
-
const n = t, a = H(), r = N("webx-admin"), o =
|
|
302
|
+
const n = t, a = H(), r = N("webx-admin"), o = we(), s = Ce(), u = S({
|
|
303
303
|
get: () => a.nav.value.find((c) => s.path.startsWith(c.path))?.id ?? "",
|
|
304
304
|
set: (i) => {
|
|
305
305
|
const c = a.nav.value.find((m) => m.id === i);
|
|
@@ -308,32 +308,32 @@ const rt = /* @__PURE__ */ U({
|
|
|
308
308
|
});
|
|
309
309
|
return (i, c) => {
|
|
310
310
|
const m = z("wx-menu-item"), l = z("wx-submenu"), v = z("wx-menu");
|
|
311
|
-
return f(),
|
|
311
|
+
return f(), b(v, {
|
|
312
312
|
modelValue: u.value,
|
|
313
313
|
"onUpdate:modelValue": c[0] || (c[0] = (h) => u.value = h),
|
|
314
314
|
collapsed: e.collapsed,
|
|
315
315
|
label: d(r)("nav.sections"),
|
|
316
316
|
onSelect: c[1] || (c[1] = (h) => n("select"))
|
|
317
317
|
}, {
|
|
318
|
-
default:
|
|
319
|
-
(f(!0),
|
|
318
|
+
default: g(() => [
|
|
319
|
+
(f(!0), x(R, null, j(d(a).groups.value.top, (h) => (f(), b(m, {
|
|
320
320
|
key: h.id,
|
|
321
321
|
value: h.id,
|
|
322
322
|
icon: h.icon ?? void 0,
|
|
323
323
|
label: h.title
|
|
324
324
|
}, null, 8, ["value", "icon", "label"]))), 128)),
|
|
325
|
-
(f(!0),
|
|
325
|
+
(f(!0), x(R, null, j(d(a).groups.value.groups, (h) => (f(), b(l, {
|
|
326
326
|
key: h.id,
|
|
327
327
|
value: `group:${h.id}`,
|
|
328
328
|
title: h.title,
|
|
329
329
|
icon: "gear"
|
|
330
330
|
}, {
|
|
331
|
-
default:
|
|
332
|
-
(f(!0),
|
|
333
|
-
key:
|
|
334
|
-
value:
|
|
335
|
-
icon:
|
|
336
|
-
label:
|
|
331
|
+
default: g(() => [
|
|
332
|
+
(f(!0), x(R, null, j(h.entries, (w) => (f(), b(m, {
|
|
333
|
+
key: w.id,
|
|
334
|
+
value: w.id,
|
|
335
|
+
icon: w.icon ?? void 0,
|
|
336
|
+
label: w.title
|
|
337
337
|
}, null, 8, ["value", "icon", "label"]))), 128))
|
|
338
338
|
]),
|
|
339
339
|
_: 2
|
|
@@ -343,64 +343,68 @@ const rt = /* @__PURE__ */ U({
|
|
|
343
343
|
}, 8, ["modelValue", "collapsed", "label"]);
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
}),
|
|
346
|
+
}), mt = {
|
|
347
347
|
key: 0,
|
|
348
348
|
class: "wx-root wx-admin-plain"
|
|
349
|
-
},
|
|
349
|
+
}, ft = {
|
|
350
350
|
key: 1,
|
|
351
351
|
class: "wx-root wx-admin-plain"
|
|
352
|
-
},
|
|
352
|
+
}, vt = {
|
|
353
353
|
key: 2,
|
|
354
354
|
class: "wx-root wx-admin-plain"
|
|
355
|
-
},
|
|
355
|
+
}, ht = ["src", "alt", "width", "height"], pt = ["src", "alt", "width", "height"], wt = ["src", "alt"], gt = { class: "wx-admin__user" }, yt = { class: "wx-admin__user wx-admin__user--drawer" }, xt = /* @__PURE__ */ U({
|
|
356
356
|
__name: "AdminShell",
|
|
357
357
|
setup(e) {
|
|
358
|
-
const t = H(), n = N("webx-admin"), a =
|
|
358
|
+
const t = H(), n = N("webx-admin"), a = A(null), { width: r, layout: o, collapsed: s, showAside: u, drawerOpen: i, toggle: c, close: m } = Pe(
|
|
359
359
|
a,
|
|
360
360
|
{ persist: "webx-admin-shell" }
|
|
361
|
-
), l = S(() => t.state.manifest?.title ?? ""), v = S(() => t.state.manifest?.branding?.logo ?? null), h = S(() => t.state.manifest?.branding?.mark ?? null),
|
|
362
|
-
return (
|
|
361
|
+
), l = S(() => t.state.manifest?.title ?? ""), v = S(() => t.state.manifest?.branding?.logo ?? null), h = S(() => t.state.manifest?.branding?.mark ?? null), w = S(() => Ve(r.value, null));
|
|
362
|
+
return $e(() => {
|
|
363
|
+
typeof document > "u" || (document.documentElement.dataset.wxShell = w.value);
|
|
364
|
+
}), Se(() => {
|
|
365
|
+
typeof document < "u" && delete document.documentElement.dataset.wxShell;
|
|
366
|
+
}), (p, _) => {
|
|
363
367
|
const V = z("router-view"), Z = z("wx-loading"), ee = z("wx-button"), te = z("wx-result"), D = z("wx-action"), k = z("wx-text"), T = z("wx-header"), $ = z("wx-aside"), P = z("wx-main"), _e = z("wx-container"), ke = z("wx-drawer");
|
|
364
|
-
return f(),
|
|
365
|
-
y(d(
|
|
366
|
-
d(t).state.status === "unauthenticated" ? (f(),
|
|
368
|
+
return f(), x(R, null, [
|
|
369
|
+
y(d(De)),
|
|
370
|
+
d(t).state.status === "unauthenticated" ? (f(), x("div", mt, [
|
|
367
371
|
y(V)
|
|
368
|
-
])) : d(t).state.status === "loading" ? (f(),
|
|
372
|
+
])) : d(t).state.status === "loading" ? (f(), x("div", ft, [
|
|
369
373
|
y(Z, {
|
|
370
374
|
label: d(n)("shell.loading")
|
|
371
375
|
}, null, 8, ["label"])
|
|
372
|
-
])) : d(t).state.status === "error" ? (f(),
|
|
376
|
+
])) : d(t).state.status === "error" ? (f(), x("div", vt, [
|
|
373
377
|
y(te, {
|
|
374
378
|
status: "error",
|
|
375
379
|
title: d(n)("shell.error-title"),
|
|
376
380
|
description: d(t).state.error
|
|
377
381
|
}, {
|
|
378
|
-
default:
|
|
382
|
+
default: g(() => [
|
|
379
383
|
y(ee, {
|
|
380
384
|
type: "primary",
|
|
381
385
|
onClick: _[0] || (_[0] = (ce) => d(t).reload())
|
|
382
386
|
}, {
|
|
383
|
-
default:
|
|
384
|
-
|
|
387
|
+
default: g(() => [
|
|
388
|
+
C(E(d(n)("shell.retry")), 1)
|
|
385
389
|
]),
|
|
386
390
|
_: 1
|
|
387
391
|
})
|
|
388
392
|
]),
|
|
389
393
|
_: 1
|
|
390
394
|
}, 8, ["title", "description"])
|
|
391
|
-
])) : (f(),
|
|
395
|
+
])) : (f(), x("div", {
|
|
392
396
|
key: 3,
|
|
393
397
|
ref_key: "shellEl",
|
|
394
398
|
ref: a,
|
|
395
|
-
class: le(["wx-root wx-admin", `wx-admin--${
|
|
399
|
+
class: le(["wx-root wx-admin", `wx-admin--${w.value}`])
|
|
396
400
|
}, [
|
|
397
401
|
y(_e, {
|
|
398
402
|
direction: d(o) === "drawer" ? "vertical" : "horizontal",
|
|
399
403
|
"full-height": "",
|
|
400
404
|
class: "wx-admin__frame"
|
|
401
405
|
}, {
|
|
402
|
-
default:
|
|
403
|
-
d(o) === "drawer" ? (f(),
|
|
406
|
+
default: g(() => [
|
|
407
|
+
d(o) === "drawer" ? (f(), b(T, {
|
|
404
408
|
key: 0,
|
|
405
409
|
class: "wx-admin__header",
|
|
406
410
|
floating: "",
|
|
@@ -409,38 +413,38 @@ const rt = /* @__PURE__ */ U({
|
|
|
409
413
|
padding: "sm",
|
|
410
414
|
height: "var(--wx-admin-header-height)"
|
|
411
415
|
}, {
|
|
412
|
-
end:
|
|
413
|
-
|
|
416
|
+
end: g(() => [
|
|
417
|
+
L(p.$slots, "user", { expanded: !1 }, void 0, !0)
|
|
414
418
|
]),
|
|
415
|
-
default:
|
|
419
|
+
default: g(() => [
|
|
416
420
|
y(D, {
|
|
417
421
|
icon: "menu",
|
|
418
422
|
title: d(n)("nav.menu"),
|
|
419
423
|
onClick: d(c)
|
|
420
424
|
}, null, 8, ["title", "onClick"]),
|
|
421
|
-
|
|
422
|
-
v.value ? (f(),
|
|
425
|
+
L(p.$slots, "brand", {}, () => [
|
|
426
|
+
v.value ? (f(), x("img", {
|
|
423
427
|
key: 0,
|
|
424
428
|
class: "wx-admin__logo",
|
|
425
429
|
src: v.value.url,
|
|
426
430
|
alt: l.value,
|
|
427
431
|
width: v.value.width ?? void 0,
|
|
428
432
|
height: v.value.height ?? void 0
|
|
429
|
-
}, null, 8,
|
|
433
|
+
}, null, 8, ht)) : (f(), b(k, {
|
|
430
434
|
key: 1,
|
|
431
435
|
weight: "semibold",
|
|
432
436
|
truncate: ""
|
|
433
437
|
}, {
|
|
434
|
-
default:
|
|
435
|
-
|
|
438
|
+
default: g(() => [
|
|
439
|
+
C(E(l.value), 1)
|
|
436
440
|
]),
|
|
437
441
|
_: 1
|
|
438
442
|
}))
|
|
439
443
|
], !0)
|
|
440
444
|
]),
|
|
441
445
|
_: 3
|
|
442
|
-
})) :
|
|
443
|
-
d(u) ? (f(),
|
|
446
|
+
})) : W("", !0),
|
|
447
|
+
d(u) ? (f(), b($, {
|
|
444
448
|
key: 1,
|
|
445
449
|
class: "wx-admin__aside",
|
|
446
450
|
sticky: "",
|
|
@@ -451,31 +455,31 @@ const rt = /* @__PURE__ */ U({
|
|
|
451
455
|
width: 220,
|
|
452
456
|
"collapsed-width": 56
|
|
453
457
|
}, {
|
|
454
|
-
top:
|
|
458
|
+
top: g(() => [
|
|
455
459
|
M("div", {
|
|
456
460
|
class: le(["wx-admin__brand", { "wx-admin__brand--stacked": d(s) && h.value }])
|
|
457
461
|
}, [
|
|
458
|
-
d(s) ? h.value ? (f(),
|
|
462
|
+
d(s) ? h.value ? (f(), x("img", {
|
|
459
463
|
key: 1,
|
|
460
464
|
class: "wx-admin__mark",
|
|
461
465
|
src: h.value.url,
|
|
462
466
|
alt: l.value
|
|
463
|
-
}, null, 8,
|
|
464
|
-
v.value ? (f(),
|
|
467
|
+
}, null, 8, wt)) : W("", !0) : L(p.$slots, "brand", {}, () => [
|
|
468
|
+
v.value ? (f(), x("img", {
|
|
465
469
|
key: 0,
|
|
466
470
|
class: "wx-admin__logo",
|
|
467
471
|
src: v.value.url,
|
|
468
472
|
alt: l.value,
|
|
469
473
|
width: v.value.width ?? void 0,
|
|
470
474
|
height: v.value.height ?? void 0
|
|
471
|
-
}, null, 8,
|
|
475
|
+
}, null, 8, pt)) : (f(), b(k, {
|
|
472
476
|
key: 1,
|
|
473
477
|
weight: "semibold",
|
|
474
478
|
truncate: "",
|
|
475
479
|
class: "wx-admin__title"
|
|
476
480
|
}, {
|
|
477
|
-
default:
|
|
478
|
-
|
|
481
|
+
default: g(() => [
|
|
482
|
+
C(E(l.value), 1)
|
|
479
483
|
]),
|
|
480
484
|
_: 1
|
|
481
485
|
}))
|
|
@@ -487,23 +491,23 @@ const rt = /* @__PURE__ */ U({
|
|
|
487
491
|
}, null, 8, ["title", "onClick"])
|
|
488
492
|
], 2)
|
|
489
493
|
]),
|
|
490
|
-
bottom:
|
|
491
|
-
M("div",
|
|
492
|
-
|
|
494
|
+
bottom: g(() => [
|
|
495
|
+
M("div", gt, [
|
|
496
|
+
L(p.$slots, "user", {
|
|
493
497
|
expanded: !d(s)
|
|
494
498
|
}, void 0, !0)
|
|
495
499
|
])
|
|
496
500
|
]),
|
|
497
|
-
default:
|
|
498
|
-
|
|
501
|
+
default: g(() => [
|
|
502
|
+
L(p.$slots, "nav", { collapsed: d(s) }, void 0, !0)
|
|
499
503
|
]),
|
|
500
504
|
_: 3
|
|
501
|
-
}, 8, ["collapsed"])) :
|
|
505
|
+
}, 8, ["collapsed"])) : W("", !0),
|
|
502
506
|
y(P, {
|
|
503
507
|
padding: "none",
|
|
504
508
|
class: "wx-admin__screen"
|
|
505
509
|
}, {
|
|
506
|
-
default:
|
|
510
|
+
default: g(() => [
|
|
507
511
|
y(V)
|
|
508
512
|
]),
|
|
509
513
|
_: 1
|
|
@@ -513,20 +517,21 @@ const rt = /* @__PURE__ */ U({
|
|
|
513
517
|
}, 8, ["direction"]),
|
|
514
518
|
y(ke, {
|
|
515
519
|
open: d(i),
|
|
516
|
-
"onUpdate:open": _[1] || (_[1] = (ce) =>
|
|
520
|
+
"onUpdate:open": _[1] || (_[1] = (ce) => Te(i) ? i.value = ce : null),
|
|
521
|
+
class: "wx-admin__drawer",
|
|
517
522
|
title: l.value === "" ? d(n)("nav.menu") : l.value,
|
|
518
523
|
side: "left",
|
|
519
524
|
size: 260,
|
|
520
525
|
"full-screen": !1,
|
|
521
526
|
closable: ""
|
|
522
527
|
}, {
|
|
523
|
-
footer:
|
|
524
|
-
M("div",
|
|
525
|
-
|
|
528
|
+
footer: g(() => [
|
|
529
|
+
M("div", yt, [
|
|
530
|
+
L(p.$slots, "user", { expanded: !0 }, void 0, !0)
|
|
526
531
|
])
|
|
527
532
|
]),
|
|
528
|
-
default:
|
|
529
|
-
|
|
533
|
+
default: g(() => [
|
|
534
|
+
L(p.$slots, "nav", {
|
|
530
535
|
collapsed: !1,
|
|
531
536
|
select: d(m)
|
|
532
537
|
}, void 0, !0)
|
|
@@ -537,7 +542,7 @@ const rt = /* @__PURE__ */ U({
|
|
|
537
542
|
], 64);
|
|
538
543
|
};
|
|
539
544
|
}
|
|
540
|
-
}),
|
|
545
|
+
}), bt = /* @__PURE__ */ B(xt, [["__scopeId", "data-v-5baa6cbf"]]);
|
|
541
546
|
class ie extends Error {
|
|
542
547
|
constructor(t, n, a = {}, r = null, o = null) {
|
|
543
548
|
super(t), this.status = n, this.errors = a, this.retryAfter = r, this.body = o, this.name = "HttpError";
|
|
@@ -557,16 +562,16 @@ class ie extends Error {
|
|
|
557
562
|
return this.status === 429;
|
|
558
563
|
}
|
|
559
564
|
}
|
|
560
|
-
const
|
|
561
|
-
function
|
|
565
|
+
const _t = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
|
|
566
|
+
function kt(e = {}) {
|
|
562
567
|
const t = (e.baseUrl ?? "").replace(/\/$/, ""), n = e.csrfUrl ?? "/sanctum/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis), r = e.onUnauthenticated, o = e.headers;
|
|
563
568
|
let s = !1;
|
|
564
569
|
async function u(c = !1) {
|
|
565
570
|
s && !c && ve("XSRF-TOKEN") !== null || (await a(n, { credentials: "same-origin" }), s = !0);
|
|
566
571
|
}
|
|
567
572
|
async function i(c, m, l, v = {}, h = !1) {
|
|
568
|
-
const
|
|
569
|
-
|
|
573
|
+
const w = _t.has(c);
|
|
574
|
+
w && await u();
|
|
570
575
|
const p = {
|
|
571
576
|
Accept: "application/json",
|
|
572
577
|
"X-Requested-With": "XMLHttpRequest",
|
|
@@ -574,22 +579,22 @@ function xt(e = {}) {
|
|
|
574
579
|
...o?.(),
|
|
575
580
|
...v.headers
|
|
576
581
|
};
|
|
577
|
-
if (
|
|
582
|
+
if (w) {
|
|
578
583
|
const V = ve("XSRF-TOKEN");
|
|
579
584
|
V !== null && (p["X-XSRF-TOKEN"] = V);
|
|
580
585
|
}
|
|
581
586
|
l !== void 0 && (p["Content-Type"] = "application/json");
|
|
582
|
-
const _ = await a(
|
|
587
|
+
const _ = await a(St(t, m, v.query), {
|
|
583
588
|
method: c,
|
|
584
589
|
credentials: "same-origin",
|
|
585
590
|
headers: p,
|
|
586
591
|
signal: v.signal,
|
|
587
592
|
body: l === void 0 ? void 0 : JSON.stringify(l)
|
|
588
593
|
});
|
|
589
|
-
if (_.status === 419 &&
|
|
594
|
+
if (_.status === 419 && w && !h)
|
|
590
595
|
return await u(!0), i(c, m, l, v, !0);
|
|
591
596
|
if (_.status === 401 && r?.(), !_.ok)
|
|
592
|
-
throw await
|
|
597
|
+
throw await $t(_);
|
|
593
598
|
if (_.status !== 204)
|
|
594
599
|
return await _.json();
|
|
595
600
|
}
|
|
@@ -601,7 +606,7 @@ function xt(e = {}) {
|
|
|
601
606
|
delete: (c, m) => i("DELETE", c, void 0, m)
|
|
602
607
|
};
|
|
603
608
|
}
|
|
604
|
-
async function
|
|
609
|
+
async function $t(e) {
|
|
605
610
|
let t = null;
|
|
606
611
|
try {
|
|
607
612
|
t = await e.json();
|
|
@@ -616,7 +621,7 @@ async function _t(e) {
|
|
|
616
621
|
t
|
|
617
622
|
);
|
|
618
623
|
}
|
|
619
|
-
function
|
|
624
|
+
function St(e, t, n) {
|
|
620
625
|
const r = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
|
|
621
626
|
if (n === void 0)
|
|
622
627
|
return r;
|
|
@@ -636,7 +641,7 @@ function ve(e) {
|
|
|
636
641
|
}
|
|
637
642
|
return null;
|
|
638
643
|
}
|
|
639
|
-
const
|
|
644
|
+
const xe = {
|
|
640
645
|
shell: {
|
|
641
646
|
loading: "Loading the panel…",
|
|
642
647
|
"error-title": "The panel could not start",
|
|
@@ -710,9 +715,9 @@ const be = {
|
|
|
710
715
|
forbidden: "You may not read the notes of this record.",
|
|
711
716
|
"not-yours": "A note is edited by whoever wrote it."
|
|
712
717
|
}
|
|
713
|
-
},
|
|
714
|
-
function
|
|
715
|
-
const t = e.manifestUrl ??
|
|
718
|
+
}, be = "webx.locale";
|
|
719
|
+
function cn(e = {}) {
|
|
720
|
+
const t = e.manifestUrl ?? Lt() ?? "/api/cms/manifest", n = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), a = e.basePath ?? "/cms", r = e.modules ?? [], o = [...e.routes ?? []];
|
|
716
721
|
for (const p of r)
|
|
717
722
|
o.push(...p.routes ?? []);
|
|
718
723
|
if (!o.some((p) => p.path === "/")) {
|
|
@@ -720,14 +725,14 @@ function rn(e = {}) {
|
|
|
720
725
|
o.push({
|
|
721
726
|
path: "/",
|
|
722
727
|
name: "webx.home",
|
|
723
|
-
component:
|
|
728
|
+
component: dt,
|
|
724
729
|
props: { landing: p?.path ?? p?.routes?.[0]?.path ?? null }
|
|
725
730
|
});
|
|
726
731
|
}
|
|
727
|
-
const s =
|
|
728
|
-
history:
|
|
732
|
+
const s = Le({
|
|
733
|
+
history: We(a),
|
|
729
734
|
routes: o
|
|
730
|
-
}), u = de({ locale: e.locale ??
|
|
735
|
+
}), u = de({ locale: e.locale ?? zt() }), i = e.http ?? kt({
|
|
731
736
|
baseUrl: "",
|
|
732
737
|
onUnauthenticated: () => {
|
|
733
738
|
m.setUser(null), m.state.status = "unauthenticated";
|
|
@@ -738,12 +743,12 @@ function rn(e = {}) {
|
|
|
738
743
|
// signing in on a Russian sign-in screen lands in an English panel.
|
|
739
744
|
headers: () => ({ "X-Webx-Locale": u.state.locale })
|
|
740
745
|
});
|
|
741
|
-
u.defaults("webx-admin",
|
|
746
|
+
u.defaults("webx-admin", xe);
|
|
742
747
|
async function c(p) {
|
|
743
748
|
const _ = await i.get(`${n}/translations/${p}`);
|
|
744
|
-
u.load(_.data.namespaces, _.data.locale, _.data.fallback),
|
|
749
|
+
u.load(_.data.namespaces, _.data.locale, _.data.fallback), Et(_.data.locale), Ct(_.data.locale, u.state.panelLocales);
|
|
745
750
|
}
|
|
746
|
-
const m =
|
|
751
|
+
const m = st({
|
|
747
752
|
http: i,
|
|
748
753
|
basePath: a,
|
|
749
754
|
apiPath: n,
|
|
@@ -753,10 +758,10 @@ function rn(e = {}) {
|
|
|
753
758
|
types: e.types,
|
|
754
759
|
screens: e.screens,
|
|
755
760
|
loadManifest: async () => (await i.get(t)).data
|
|
756
|
-
}), l =
|
|
757
|
-
l.use(
|
|
758
|
-
const v =
|
|
759
|
-
l.provide(
|
|
761
|
+
}), l = ze(Tt(e));
|
|
762
|
+
l.use(Ie), ot(l, m), rt(l, u);
|
|
763
|
+
const v = A("");
|
|
764
|
+
l.provide(Be, {
|
|
760
765
|
list: S(
|
|
761
766
|
() => u.state.contentLocales.map((p) => ({
|
|
762
767
|
code: p.code,
|
|
@@ -776,11 +781,11 @@ function rn(e = {}) {
|
|
|
776
781
|
context: m,
|
|
777
782
|
i18n: u,
|
|
778
783
|
async mount() {
|
|
779
|
-
await Promise.all([
|
|
784
|
+
await Promise.all([w(), c(u.state.locale)]).catch(() => {
|
|
780
785
|
}), l.mount(e.el ?? "#webx-app"), await m.reload();
|
|
781
786
|
}
|
|
782
787
|
};
|
|
783
|
-
async function
|
|
788
|
+
async function w() {
|
|
784
789
|
const p = await i.get(`${n}/locales`);
|
|
785
790
|
u.state.panelLocales = p.data.panel, u.state.contentLocales = p.data.content;
|
|
786
791
|
}
|
|
@@ -788,40 +793,40 @@ function rn(e = {}) {
|
|
|
788
793
|
p.install(h);
|
|
789
794
|
return l.use(s), h;
|
|
790
795
|
}
|
|
791
|
-
function
|
|
796
|
+
function Tt(e) {
|
|
792
797
|
const t = {
|
|
793
798
|
// The menu is the panel's own: it is the manifest, drawn.
|
|
794
799
|
// The shell hands in what a choice means where it drew the menu — in the drawer it is what
|
|
795
800
|
// closes it, and a drawer that stays open over the section it just opened is a drawer the
|
|
796
801
|
// reader has to dismiss by hand.
|
|
797
|
-
nav: (n) => O(
|
|
802
|
+
nav: (n) => O(ct, { collapsed: n.collapsed === !0, onSelect: n.select })
|
|
798
803
|
};
|
|
799
|
-
return e.brand !== void 0 && (t.brand = () => O(e.brand)), e.userMenu !== void 0 && (t.user = (n) => O(e.userMenu, { expanded: n.expanded === !0 })), { render: () => O(
|
|
804
|
+
return e.brand !== void 0 && (t.brand = () => O(e.brand)), e.userMenu !== void 0 && (t.user = (n) => O(e.userMenu, { expanded: n.expanded === !0 })), { render: () => O(bt, null, t) };
|
|
800
805
|
}
|
|
801
|
-
function
|
|
802
|
-
const e =
|
|
806
|
+
function zt() {
|
|
807
|
+
const e = At(be);
|
|
803
808
|
return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
|
|
804
809
|
}
|
|
805
|
-
function
|
|
810
|
+
function Et(e) {
|
|
806
811
|
try {
|
|
807
|
-
localStorage.setItem(
|
|
812
|
+
localStorage.setItem(be, e);
|
|
808
813
|
} catch {
|
|
809
814
|
}
|
|
810
815
|
}
|
|
811
|
-
function
|
|
816
|
+
function At(e) {
|
|
812
817
|
try {
|
|
813
818
|
return localStorage.getItem(e);
|
|
814
819
|
} catch {
|
|
815
820
|
return null;
|
|
816
821
|
}
|
|
817
822
|
}
|
|
818
|
-
function
|
|
823
|
+
function Ct(e, t) {
|
|
819
824
|
typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((n) => n.code === e)?.direction ?? "ltr");
|
|
820
825
|
}
|
|
821
|
-
function
|
|
826
|
+
function Lt() {
|
|
822
827
|
return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
|
|
823
828
|
}
|
|
824
|
-
function
|
|
829
|
+
function Wt(e) {
|
|
825
830
|
const t = e.replace(/\r\n?/g, `
|
|
826
831
|
`).split(`
|
|
827
832
|
`), n = [];
|
|
@@ -886,7 +891,7 @@ function ne(e) {
|
|
|
886
891
|
function re(e) {
|
|
887
892
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
888
893
|
}
|
|
889
|
-
function
|
|
894
|
+
function Ut(e) {
|
|
890
895
|
const t = e.scope("webx-admin"), n = /* @__PURE__ */ new Map();
|
|
891
896
|
function a(o, s, u) {
|
|
892
897
|
const i = e.state.locale, c = `${i}:${o}`;
|
|
@@ -899,7 +904,7 @@ function Wt(e) {
|
|
|
899
904
|
const s = ae(o);
|
|
900
905
|
if (s === null)
|
|
901
906
|
return t("dates.never");
|
|
902
|
-
const u = /* @__PURE__ */ new Date(), i =
|
|
907
|
+
const u = /* @__PURE__ */ new Date(), i = Nt(s, u);
|
|
903
908
|
return i === 0 ? t("dates.today", { time: r(s) }) : i === -1 ? t("dates.yesterday", { time: r(s) }) : s.getFullYear() === u.getFullYear() ? a(
|
|
904
909
|
"this-year",
|
|
905
910
|
{
|
|
@@ -922,13 +927,13 @@ function Wt(e) {
|
|
|
922
927
|
}
|
|
923
928
|
};
|
|
924
929
|
}
|
|
925
|
-
function
|
|
930
|
+
function Rt() {
|
|
926
931
|
const e = G(Q, null);
|
|
927
|
-
return
|
|
932
|
+
return Ut(e ?? Mt());
|
|
928
933
|
}
|
|
929
934
|
let q = null;
|
|
930
|
-
function
|
|
931
|
-
return q === null && (q = de(), q.defaults("webx-admin",
|
|
935
|
+
function Mt() {
|
|
936
|
+
return q === null && (q = de(), q.defaults("webx-admin", xe)), q;
|
|
932
937
|
}
|
|
933
938
|
function ae(e) {
|
|
934
939
|
if (e == null || e === "")
|
|
@@ -936,14 +941,14 @@ function ae(e) {
|
|
|
936
941
|
const t = e instanceof Date ? e : new Date(e);
|
|
937
942
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
938
943
|
}
|
|
939
|
-
function
|
|
944
|
+
function Nt(e, t) {
|
|
940
945
|
const n = (a) => Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
|
|
941
946
|
return Math.round((n(e) - n(t)) / 864e5);
|
|
942
947
|
}
|
|
943
|
-
function
|
|
944
|
-
const a = e instanceof ie ? e.status :
|
|
948
|
+
function Pt(e, t, n) {
|
|
949
|
+
const a = e instanceof ie ? e.status : Dt(e);
|
|
945
950
|
if (a === 422)
|
|
946
|
-
return
|
|
951
|
+
return It(e) ?? n ?? t("errors.unknown");
|
|
947
952
|
if (a === 401) return t("errors.signed-out");
|
|
948
953
|
if (a === 403) return t("errors.forbidden");
|
|
949
954
|
if (a === 404) return t("errors.gone");
|
|
@@ -954,19 +959,19 @@ function Mt(e, t, n) {
|
|
|
954
959
|
}
|
|
955
960
|
return a !== null && a >= 500 ? t("errors.server") : a === null ? t("errors.offline") : n ?? t("errors.unknown");
|
|
956
961
|
}
|
|
957
|
-
function
|
|
962
|
+
function Vt() {
|
|
958
963
|
const e = N("webx-admin");
|
|
959
|
-
return (t, n) =>
|
|
964
|
+
return (t, n) => Pt(t, e, n);
|
|
960
965
|
}
|
|
961
|
-
function
|
|
966
|
+
function Dt(e) {
|
|
962
967
|
const t = e?.status;
|
|
963
968
|
return typeof t == "number" ? t : null;
|
|
964
969
|
}
|
|
965
|
-
function
|
|
970
|
+
function It(e) {
|
|
966
971
|
const n = e?.body?.message;
|
|
967
972
|
return typeof n == "string" && n !== "" ? n : null;
|
|
968
973
|
}
|
|
969
|
-
function
|
|
974
|
+
function Bt(e, t, n) {
|
|
970
975
|
const a = `${e.apiPath}/entities/${t}/${n}/notes`, r = (s) => `${e.apiPath}/notes/${s}`, o = (s) => s.data;
|
|
971
976
|
return {
|
|
972
977
|
list: () => e.http.get(a).then(o),
|
|
@@ -976,7 +981,7 @@ function Dt(e, t, n) {
|
|
|
976
981
|
})
|
|
977
982
|
};
|
|
978
983
|
}
|
|
979
|
-
const
|
|
984
|
+
const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
980
985
|
__name: "Screen",
|
|
981
986
|
props: /* @__PURE__ */ se({
|
|
982
987
|
name: {},
|
|
@@ -991,7 +996,7 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
991
996
|
}),
|
|
992
997
|
emits: /* @__PURE__ */ se(["loaded"], ["update:modelValue"]),
|
|
993
998
|
setup(e, { expose: t, emit: n }) {
|
|
994
|
-
const a = e, r = n, o = he(e, "modelValue"), s = H(), u = N("webx-admin"), i =
|
|
999
|
+
const a = e, r = n, o = he(e, "modelValue"), s = H(), u = N("webx-admin"), i = A(null), c = A(null);
|
|
995
1000
|
async function m() {
|
|
996
1001
|
i.value = null, c.value = null;
|
|
997
1002
|
try {
|
|
@@ -1003,16 +1008,16 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1003
1008
|
}
|
|
1004
1009
|
return J([() => a.name, () => s.i18n.state.locale], () => {
|
|
1005
1010
|
m();
|
|
1006
|
-
}, { immediate: !0 }), t({ reload: m }), (l, v) => (f(),
|
|
1007
|
-
c.value ? (f(),
|
|
1011
|
+
}, { immediate: !0 }), t({ reload: m }), (l, v) => (f(), x("div", jt, [
|
|
1012
|
+
c.value ? (f(), b(d(je), {
|
|
1008
1013
|
key: 0,
|
|
1009
1014
|
type: "danger",
|
|
1010
1015
|
title: d(u)("shell.error-title"),
|
|
1011
1016
|
description: c.value
|
|
1012
|
-
}, null, 8, ["title", "description"])) : i.value === null ? (f(),
|
|
1017
|
+
}, null, 8, ["title", "description"])) : i.value === null ? (f(), b(d(ge), {
|
|
1013
1018
|
key: 1,
|
|
1014
1019
|
rows: 4
|
|
1015
|
-
})) : (f(),
|
|
1020
|
+
})) : (f(), b(d(Qe), {
|
|
1016
1021
|
key: 2,
|
|
1017
1022
|
modelValue: o.value,
|
|
1018
1023
|
"onUpdate:modelValue": v[0] || (v[0] = (h) => o.value = h),
|
|
@@ -1029,10 +1034,10 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1029
1034
|
}, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
|
|
1030
1035
|
]));
|
|
1031
1036
|
}
|
|
1032
|
-
}),
|
|
1037
|
+
}), Ht = {
|
|
1033
1038
|
key: 0,
|
|
1034
1039
|
class: "wx-dropdown__divider"
|
|
1035
|
-
},
|
|
1040
|
+
}, Ot = /* @__PURE__ */ U({
|
|
1036
1041
|
__name: "RowMenu",
|
|
1037
1042
|
props: {
|
|
1038
1043
|
actions: {},
|
|
@@ -1047,8 +1052,9 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1047
1052
|
const r = n.value.find((o) => o.danger);
|
|
1048
1053
|
return r && n.value[0] !== r ? r.key : null;
|
|
1049
1054
|
});
|
|
1050
|
-
return (r, o) => n.value.length > 0 ? (f(),
|
|
1055
|
+
return (r, o) => n.value.length > 0 ? (f(), b(d(He), {
|
|
1051
1056
|
key: 0,
|
|
1057
|
+
class: "wx-row-menu",
|
|
1052
1058
|
collapse: "always",
|
|
1053
1059
|
align: "end",
|
|
1054
1060
|
size: e.size,
|
|
@@ -1056,12 +1062,12 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1056
1062
|
onClick: o[0] || (o[0] = pe(() => {
|
|
1057
1063
|
}, ["stop"]))
|
|
1058
1064
|
}, {
|
|
1059
|
-
collapsed:
|
|
1060
|
-
(f(!0),
|
|
1065
|
+
collapsed: g(() => [
|
|
1066
|
+
(f(!0), x(R, null, j(n.value, (s) => (f(), x(R, {
|
|
1061
1067
|
key: s.key
|
|
1062
1068
|
}, [
|
|
1063
|
-
s.key === a.value ? (f(),
|
|
1064
|
-
y(d(
|
|
1069
|
+
s.key === a.value ? (f(), x("hr", Ht)) : W("", !0),
|
|
1070
|
+
y(d(Oe), {
|
|
1065
1071
|
icon: s.icon,
|
|
1066
1072
|
tone: s.danger ? "danger" : "default",
|
|
1067
1073
|
href: s.href,
|
|
@@ -1069,17 +1075,17 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1069
1075
|
disabled: s.disabled,
|
|
1070
1076
|
onClick: (u) => s.run?.()
|
|
1071
1077
|
}, {
|
|
1072
|
-
default:
|
|
1073
|
-
|
|
1078
|
+
default: g(() => [
|
|
1079
|
+
C(E(s.label), 1)
|
|
1074
1080
|
]),
|
|
1075
1081
|
_: 2
|
|
1076
1082
|
}, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
|
|
1077
1083
|
], 64))), 128))
|
|
1078
1084
|
]),
|
|
1079
1085
|
_: 1
|
|
1080
|
-
}, 8, ["size", "aria-label"])) :
|
|
1086
|
+
}, 8, ["size", "aria-label"])) : W("", !0);
|
|
1081
1087
|
}
|
|
1082
|
-
}),
|
|
1088
|
+
}), Ft = /* @__PURE__ */ B(Ot, [["__scopeId", "data-v-4a08eb39"]]), fn = /* @__PURE__ */ U({
|
|
1083
1089
|
__name: "BackButton",
|
|
1084
1090
|
props: {
|
|
1085
1091
|
to: {},
|
|
@@ -1088,17 +1094,17 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1088
1094
|
},
|
|
1089
1095
|
setup(e) {
|
|
1090
1096
|
const t = e, n = N("webx-admin"), a = S(() => t.label ?? n("editor.back"));
|
|
1091
|
-
return (r, o) => (f(),
|
|
1097
|
+
return (r, o) => (f(), b(d(ue), {
|
|
1092
1098
|
icon: "arrow-left",
|
|
1093
1099
|
class: "wx-back-button",
|
|
1094
|
-
as: d(
|
|
1100
|
+
as: d(Ue),
|
|
1095
1101
|
to: e.to,
|
|
1096
1102
|
title: a.value,
|
|
1097
1103
|
size: e.size,
|
|
1098
1104
|
"tooltip-side": "bottom"
|
|
1099
1105
|
}, null, 8, ["as", "to", "title", "size"]));
|
|
1100
1106
|
}
|
|
1101
|
-
}),
|
|
1107
|
+
}), Kt = { class: "wx-rename__footer" }, qt = /* @__PURE__ */ U({
|
|
1102
1108
|
__name: "RenameButton",
|
|
1103
1109
|
props: {
|
|
1104
1110
|
name: { default: "" },
|
|
@@ -1109,9 +1115,9 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1109
1115
|
},
|
|
1110
1116
|
emits: ["rename"],
|
|
1111
1117
|
setup(e, { emit: t }) {
|
|
1112
|
-
const n = e, a = t, r = N("webx-admin"), o =
|
|
1118
|
+
const n = e, a = t, r = N("webx-admin"), o = A(!1), s = A(n.name), u = A(null), i = S(() => n.label ?? r("editor.rename"));
|
|
1113
1119
|
J(o, async (m) => {
|
|
1114
|
-
m && (s.value = n.name, await
|
|
1120
|
+
m && (s.value = n.name, await Ee(), u.value?.focus(), u.value?.select());
|
|
1115
1121
|
});
|
|
1116
1122
|
function c() {
|
|
1117
1123
|
const m = s.value.trim();
|
|
@@ -1121,7 +1127,7 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1121
1127
|
}
|
|
1122
1128
|
a("rename", m), o.value = !1;
|
|
1123
1129
|
}
|
|
1124
|
-
return (m, l) => (f(),
|
|
1130
|
+
return (m, l) => (f(), b(d(Fe), {
|
|
1125
1131
|
open: o.value,
|
|
1126
1132
|
"onUpdate:open": l[2] || (l[2] = (v) => o.value = v),
|
|
1127
1133
|
title: i.value,
|
|
@@ -1130,7 +1136,7 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1130
1136
|
align: "start",
|
|
1131
1137
|
teleport: ""
|
|
1132
1138
|
}, {
|
|
1133
|
-
trigger:
|
|
1139
|
+
trigger: g(() => [
|
|
1134
1140
|
y(d(ue), {
|
|
1135
1141
|
type: "edit",
|
|
1136
1142
|
title: i.value,
|
|
@@ -1138,28 +1144,28 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1138
1144
|
disabled: e.disabled
|
|
1139
1145
|
}, null, 8, ["title", "size", "disabled"])
|
|
1140
1146
|
]),
|
|
1141
|
-
default:
|
|
1147
|
+
default: g(() => [
|
|
1142
1148
|
M("form", {
|
|
1143
1149
|
class: "wx-rename",
|
|
1144
1150
|
onSubmit: pe(c, ["prevent"])
|
|
1145
1151
|
}, [
|
|
1146
|
-
y(d(
|
|
1152
|
+
y(d(Ke), {
|
|
1147
1153
|
ref_key: "field",
|
|
1148
1154
|
ref: u,
|
|
1149
1155
|
modelValue: s.value,
|
|
1150
1156
|
"onUpdate:modelValue": l[0] || (l[0] = (v) => s.value = v),
|
|
1151
1157
|
"aria-label": i.value,
|
|
1152
1158
|
placeholder: e.placeholder,
|
|
1153
|
-
onKeydown: l[1] || (l[1] =
|
|
1159
|
+
onKeydown: l[1] || (l[1] = Ae((v) => o.value = !1, ["esc"]))
|
|
1154
1160
|
}, null, 8, ["modelValue", "aria-label", "placeholder"]),
|
|
1155
|
-
M("div",
|
|
1161
|
+
M("div", Kt, [
|
|
1156
1162
|
y(d(X), {
|
|
1157
1163
|
type: "primary",
|
|
1158
1164
|
size: "sm",
|
|
1159
1165
|
"native-type": "submit"
|
|
1160
1166
|
}, {
|
|
1161
|
-
default:
|
|
1162
|
-
|
|
1167
|
+
default: g(() => [
|
|
1168
|
+
C(E(d(r)("editor.save")), 1)
|
|
1163
1169
|
]),
|
|
1164
1170
|
_: 1
|
|
1165
1171
|
})
|
|
@@ -1169,7 +1175,7 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1169
1175
|
_: 1
|
|
1170
1176
|
}, 8, ["open", "title"]));
|
|
1171
1177
|
}
|
|
1172
|
-
}),
|
|
1178
|
+
}), vn = /* @__PURE__ */ B(qt, [["__scopeId", "data-v-d879e8d3"]]), Xt = ["innerHTML"], Yt = /* @__PURE__ */ U({
|
|
1173
1179
|
__name: "HelpButton",
|
|
1174
1180
|
props: {
|
|
1175
1181
|
body: {},
|
|
@@ -1179,8 +1185,8 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1179
1185
|
width: { default: 720 }
|
|
1180
1186
|
},
|
|
1181
1187
|
setup(e) {
|
|
1182
|
-
const t = e, n = N("webx-admin"), a =
|
|
1183
|
-
return (s, u) => (f(),
|
|
1188
|
+
const t = e, n = N("webx-admin"), a = A(!1), r = S(() => t.title ?? n("help.title")), o = S(() => Wt(t.body));
|
|
1189
|
+
return (s, u) => (f(), x(R, null, [
|
|
1184
1190
|
y(d(ue), {
|
|
1185
1191
|
type: "details",
|
|
1186
1192
|
icon: "question",
|
|
@@ -1189,23 +1195,23 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1189
1195
|
title: e.label ?? r.value,
|
|
1190
1196
|
onClick: u[0] || (u[0] = (i) => a.value = !0)
|
|
1191
1197
|
}, null, 8, ["size", "title"]),
|
|
1192
|
-
y(d(
|
|
1198
|
+
y(d(qe), {
|
|
1193
1199
|
open: a.value,
|
|
1194
1200
|
"onUpdate:open": u[1] || (u[1] = (i) => a.value = i),
|
|
1195
1201
|
title: r.value,
|
|
1196
1202
|
width: e.width
|
|
1197
1203
|
}, {
|
|
1198
|
-
default:
|
|
1204
|
+
default: g(() => [
|
|
1199
1205
|
M("div", {
|
|
1200
1206
|
class: "wx-help",
|
|
1201
1207
|
innerHTML: o.value
|
|
1202
|
-
}, null, 8,
|
|
1208
|
+
}, null, 8, Xt)
|
|
1203
1209
|
]),
|
|
1204
1210
|
_: 1
|
|
1205
1211
|
}, 8, ["open", "title", "width"])
|
|
1206
1212
|
], 64));
|
|
1207
1213
|
}
|
|
1208
|
-
}),
|
|
1214
|
+
}), hn = /* @__PURE__ */ B(Yt, [["__scopeId", "data-v-6c280d42"]]), Gt = /* @__PURE__ */ U({
|
|
1209
1215
|
name: "WxDate",
|
|
1210
1216
|
__name: "DateText",
|
|
1211
1217
|
props: {
|
|
@@ -1214,46 +1220,46 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1214
1220
|
tone: { default: "muted" }
|
|
1215
1221
|
},
|
|
1216
1222
|
setup(e) {
|
|
1217
|
-
const t = e, n =
|
|
1218
|
-
return (s, u) => r.value ? (f(),
|
|
1223
|
+
const t = e, n = Rt(), a = S(() => n.short(t.value)), r = S(() => n.exact(t.value)), o = S(() => n.iso(t.value));
|
|
1224
|
+
return (s, u) => r.value ? (f(), b(d(Xe), {
|
|
1219
1225
|
key: 0,
|
|
1220
1226
|
content: r.value
|
|
1221
1227
|
}, {
|
|
1222
|
-
default:
|
|
1228
|
+
default: g(() => [
|
|
1223
1229
|
y(d(Y), {
|
|
1224
1230
|
as: "time",
|
|
1225
1231
|
datetime: o.value,
|
|
1226
1232
|
size: e.size,
|
|
1227
1233
|
tone: e.tone
|
|
1228
1234
|
}, {
|
|
1229
|
-
default:
|
|
1230
|
-
|
|
1235
|
+
default: g(() => [
|
|
1236
|
+
C(E(a.value), 1)
|
|
1231
1237
|
]),
|
|
1232
1238
|
_: 1
|
|
1233
1239
|
}, 8, ["datetime", "size", "tone"])
|
|
1234
1240
|
]),
|
|
1235
1241
|
_: 1
|
|
1236
|
-
}, 8, ["content"])) : (f(),
|
|
1242
|
+
}, 8, ["content"])) : (f(), b(d(Y), {
|
|
1237
1243
|
key: 1,
|
|
1238
1244
|
size: e.size,
|
|
1239
1245
|
tone: e.tone
|
|
1240
1246
|
}, {
|
|
1241
|
-
default:
|
|
1242
|
-
|
|
1247
|
+
default: g(() => [
|
|
1248
|
+
C(E(a.value), 1)
|
|
1243
1249
|
]),
|
|
1244
1250
|
_: 1
|
|
1245
1251
|
}, 8, ["size", "tone"]));
|
|
1246
1252
|
}
|
|
1247
|
-
}),
|
|
1253
|
+
}), Jt = { class: "wx-notes" }, Qt = {
|
|
1248
1254
|
key: 3,
|
|
1249
1255
|
class: "wx-notes__list"
|
|
1250
|
-
},
|
|
1256
|
+
}, Zt = { class: "wx-note__body" }, en = { class: "wx-note__head" }, tn = { class: "wx-note__buttons" }, nn = {
|
|
1251
1257
|
key: 1,
|
|
1252
1258
|
class: "wx-note__text"
|
|
1253
|
-
},
|
|
1259
|
+
}, an = {
|
|
1254
1260
|
key: 4,
|
|
1255
1261
|
class: "wx-notes__new"
|
|
1256
|
-
},
|
|
1262
|
+
}, ln = /* @__PURE__ */ U({
|
|
1257
1263
|
name: "WxNotes",
|
|
1258
1264
|
__name: "NotesFeed",
|
|
1259
1265
|
props: {
|
|
@@ -1264,13 +1270,13 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1264
1270
|
},
|
|
1265
1271
|
emits: ["change"],
|
|
1266
1272
|
setup(e, { emit: t }) {
|
|
1267
|
-
const n = e, a = t, r = H(), o = N("webx-admin"), s =
|
|
1273
|
+
const n = e, a = t, r = H(), o = N("webx-admin"), s = Vt(), u = A([]), i = A(!0), c = A(""), m = A(!1), l = A(null), v = A(""), h = S(() => Bt(r, n.type, n.id)), w = S(() => n.title ?? o("notes.title"));
|
|
1268
1274
|
async function p() {
|
|
1269
1275
|
i.value = !0;
|
|
1270
1276
|
try {
|
|
1271
1277
|
u.value = await h.value.list();
|
|
1272
1278
|
} catch (k) {
|
|
1273
|
-
|
|
1279
|
+
I.danger(s(k));
|
|
1274
1280
|
} finally {
|
|
1275
1281
|
i.value = !1;
|
|
1276
1282
|
}
|
|
@@ -1289,7 +1295,7 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1289
1295
|
try {
|
|
1290
1296
|
u.value = [...u.value, await h.value.add(k)], c.value = "", a("change");
|
|
1291
1297
|
} catch (T) {
|
|
1292
|
-
|
|
1298
|
+
I.danger(s(T));
|
|
1293
1299
|
} finally {
|
|
1294
1300
|
m.value = !1;
|
|
1295
1301
|
}
|
|
@@ -1303,13 +1309,13 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1303
1309
|
if (T !== "")
|
|
1304
1310
|
try {
|
|
1305
1311
|
const $ = await h.value.save(k.id, T);
|
|
1306
|
-
u.value = u.value.map((P) => P.id === $.id ? $ : P), l.value = null,
|
|
1312
|
+
u.value = u.value.map((P) => P.id === $.id ? $ : P), l.value = null, I.success(o("notes.saved")), a("change");
|
|
1307
1313
|
} catch ($) {
|
|
1308
|
-
|
|
1314
|
+
I.danger(s($));
|
|
1309
1315
|
}
|
|
1310
1316
|
}
|
|
1311
1317
|
async function ee(k) {
|
|
1312
|
-
if (await
|
|
1318
|
+
if (await Je({
|
|
1313
1319
|
title: o("notes.delete-title"),
|
|
1314
1320
|
message: o("notes.delete-text"),
|
|
1315
1321
|
confirmText: o("notes.delete"),
|
|
@@ -1317,9 +1323,9 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1317
1323
|
tone: "danger"
|
|
1318
1324
|
}))
|
|
1319
1325
|
try {
|
|
1320
|
-
await h.value.remove(k.id), u.value = u.value.filter(($) => $.id !== k.id),
|
|
1326
|
+
await h.value.remove(k.id), u.value = u.value.filter(($) => $.id !== k.id), I.success(o("notes.deleted")), a("change");
|
|
1321
1327
|
} catch ($) {
|
|
1322
|
-
|
|
1328
|
+
I.danger(s($));
|
|
1323
1329
|
}
|
|
1324
1330
|
}
|
|
1325
1331
|
function te(k) {
|
|
@@ -1339,68 +1345,68 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1339
1345
|
function D(k) {
|
|
1340
1346
|
return k.author?.name ?? o("notes.unknown-author");
|
|
1341
1347
|
}
|
|
1342
|
-
return (k, T) => (f(),
|
|
1343
|
-
|
|
1348
|
+
return (k, T) => (f(), x("section", Jt, [
|
|
1349
|
+
w.value ? (f(), b(d(Y), {
|
|
1344
1350
|
key: 0,
|
|
1345
1351
|
weight: "medium",
|
|
1346
1352
|
class: "wx-notes__title"
|
|
1347
1353
|
}, {
|
|
1348
|
-
default:
|
|
1349
|
-
|
|
1354
|
+
default: g(() => [
|
|
1355
|
+
C(E(w.value), 1)
|
|
1350
1356
|
]),
|
|
1351
1357
|
_: 1
|
|
1352
|
-
})) :
|
|
1353
|
-
i.value ? (f(),
|
|
1358
|
+
})) : W("", !0),
|
|
1359
|
+
i.value ? (f(), b(d(ge), {
|
|
1354
1360
|
key: 1,
|
|
1355
1361
|
rows: 2
|
|
1356
|
-
})) : u.value.length === 0 ? (f(),
|
|
1362
|
+
})) : u.value.length === 0 ? (f(), b(d(Ye), {
|
|
1357
1363
|
key: 2,
|
|
1358
1364
|
size: "sm",
|
|
1359
1365
|
description: d(o)("notes.empty")
|
|
1360
|
-
}, null, 8, ["description"])) : (f(),
|
|
1361
|
-
(f(!0),
|
|
1366
|
+
}, null, 8, ["description"])) : (f(), x("ul", Qt, [
|
|
1367
|
+
(f(!0), x(R, null, j(u.value, ($) => (f(), x("li", {
|
|
1362
1368
|
key: $.id,
|
|
1363
1369
|
class: "wx-note"
|
|
1364
1370
|
}, [
|
|
1365
|
-
y(d(
|
|
1371
|
+
y(d(Ge), {
|
|
1366
1372
|
name: D($),
|
|
1367
1373
|
size: "sm",
|
|
1368
1374
|
tone: "auto"
|
|
1369
1375
|
}, null, 8, ["name"]),
|
|
1370
|
-
M("div",
|
|
1371
|
-
M("div",
|
|
1376
|
+
M("div", Zt, [
|
|
1377
|
+
M("div", en, [
|
|
1372
1378
|
y(d(Y), {
|
|
1373
1379
|
size: "sm",
|
|
1374
1380
|
weight: "medium",
|
|
1375
1381
|
truncate: ""
|
|
1376
1382
|
}, {
|
|
1377
|
-
default:
|
|
1378
|
-
|
|
1383
|
+
default: g(() => [
|
|
1384
|
+
C(E(D($)), 1)
|
|
1379
1385
|
]),
|
|
1380
1386
|
_: 2
|
|
1381
1387
|
}, 1024),
|
|
1382
|
-
y(
|
|
1388
|
+
y(Gt, {
|
|
1383
1389
|
value: $.created_at
|
|
1384
1390
|
}, null, 8, ["value"]),
|
|
1385
|
-
y(
|
|
1391
|
+
y(Ft, {
|
|
1386
1392
|
actions: te($),
|
|
1387
1393
|
label: D($)
|
|
1388
1394
|
}, null, 8, ["actions", "label"])
|
|
1389
1395
|
]),
|
|
1390
|
-
l.value === $.id ? (f(),
|
|
1396
|
+
l.value === $.id ? (f(), x(R, { key: 0 }, [
|
|
1391
1397
|
y(d(fe), {
|
|
1392
1398
|
modelValue: v.value,
|
|
1393
1399
|
"onUpdate:modelValue": T[0] || (T[0] = (P) => v.value = P),
|
|
1394
1400
|
autosize: { minRows: 2, maxRows: 10 }
|
|
1395
1401
|
}, null, 8, ["modelValue"]),
|
|
1396
|
-
M("div",
|
|
1402
|
+
M("div", tn, [
|
|
1397
1403
|
y(d(X), {
|
|
1398
1404
|
size: "sm",
|
|
1399
1405
|
type: "primary",
|
|
1400
1406
|
onClick: (P) => Z($)
|
|
1401
1407
|
}, {
|
|
1402
|
-
default:
|
|
1403
|
-
|
|
1408
|
+
default: g(() => [
|
|
1409
|
+
C(E(d(o)("notes.save")), 1)
|
|
1404
1410
|
]),
|
|
1405
1411
|
_: 1
|
|
1406
1412
|
}, 8, ["onClick"]),
|
|
@@ -1409,17 +1415,17 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1409
1415
|
variant: "text",
|
|
1410
1416
|
onClick: T[1] || (T[1] = (P) => l.value = null)
|
|
1411
1417
|
}, {
|
|
1412
|
-
default:
|
|
1413
|
-
|
|
1418
|
+
default: g(() => [
|
|
1419
|
+
C(E(d(o)("notes.cancel")), 1)
|
|
1414
1420
|
]),
|
|
1415
1421
|
_: 1
|
|
1416
1422
|
})
|
|
1417
1423
|
])
|
|
1418
|
-
], 64)) : (f(),
|
|
1424
|
+
], 64)) : (f(), x("p", nn, E($.body), 1))
|
|
1419
1425
|
])
|
|
1420
1426
|
]))), 128))
|
|
1421
1427
|
])),
|
|
1422
|
-
e.can ? (f(),
|
|
1428
|
+
e.can ? (f(), x("div", an, [
|
|
1423
1429
|
y(d(fe), {
|
|
1424
1430
|
modelValue: c.value,
|
|
1425
1431
|
"onUpdate:modelValue": T[2] || (T[2] = ($) => c.value = $),
|
|
@@ -1433,47 +1439,47 @@ const Bt = { class: "wx-screen-host" }, un = /* @__PURE__ */ U({
|
|
|
1433
1439
|
loading: m.value,
|
|
1434
1440
|
onClick: _
|
|
1435
1441
|
}, {
|
|
1436
|
-
default:
|
|
1437
|
-
|
|
1442
|
+
default: g(() => [
|
|
1443
|
+
C(E(d(o)("notes.add")), 1)
|
|
1438
1444
|
]),
|
|
1439
1445
|
_: 1
|
|
1440
1446
|
}, 8, ["disabled", "loading"])
|
|
1441
|
-
])) :
|
|
1447
|
+
])) : W("", !0)
|
|
1442
1448
|
]));
|
|
1443
1449
|
}
|
|
1444
|
-
}),
|
|
1450
|
+
}), pn = /* @__PURE__ */ B(ln, [["__scopeId", "data-v-71004c1a"]]);
|
|
1445
1451
|
export {
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1452
|
+
dt as AdminLanding,
|
|
1453
|
+
ct as AdminNav,
|
|
1454
|
+
bt as AdminShell,
|
|
1449
1455
|
ie as HttpError,
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1456
|
+
fn as WxBackButton,
|
|
1457
|
+
Gt as WxDate,
|
|
1458
|
+
hn as WxHelpButton,
|
|
1459
|
+
at as WxListScreen,
|
|
1460
|
+
pn as WxNotes,
|
|
1461
|
+
vn as WxRenameButton,
|
|
1462
|
+
Ft as WxRowMenu,
|
|
1463
|
+
mn as WxScreen,
|
|
1458
1464
|
ye as adminKey,
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
+
xe as adminMessages,
|
|
1466
|
+
lt as adminTypes,
|
|
1467
|
+
cn as createAdmin,
|
|
1468
|
+
st as createAdminContext,
|
|
1469
|
+
Ut as createDates,
|
|
1470
|
+
kt as createHttp,
|
|
1465
1471
|
de as createI18n,
|
|
1466
|
-
|
|
1467
|
-
|
|
1472
|
+
Bt as createNotesApi,
|
|
1473
|
+
Pt as errorText,
|
|
1468
1474
|
Q as i18nKey,
|
|
1469
|
-
|
|
1470
|
-
|
|
1475
|
+
ot as provideAdmin,
|
|
1476
|
+
rt as provideI18n,
|
|
1471
1477
|
ve as readCookie,
|
|
1472
|
-
|
|
1478
|
+
Wt as renderMarkdown,
|
|
1473
1479
|
H as useAdmin,
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1480
|
+
Rt as useDates,
|
|
1481
|
+
Vt as useErrorText,
|
|
1482
|
+
dn as useI18n,
|
|
1477
1483
|
N as useTranslate
|
|
1478
1484
|
};
|
|
1479
1485
|
//# sourceMappingURL=index.js.map
|