@webx-ui/module-admin 0.6.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/AdminLanding.d.ts +21 -0
- package/dist/NotesFeed.d.ts +30 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +806 -535
- package/dist/index.js.map +1 -1
- package/dist/notes.d.ts +34 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +9 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent 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
|
-
props: /* @__PURE__ */
|
|
13
|
+
props: /* @__PURE__ */ se({
|
|
14
14
|
title: { default: void 0 },
|
|
15
15
|
views: { default: void 0 },
|
|
16
16
|
card: { type: Boolean, default: !0 },
|
|
@@ -23,160 +23,160 @@ const Fe = ["data-wx-fill"], Ke = {
|
|
|
23
23
|
}),
|
|
24
24
|
emits: ["update:view"],
|
|
25
25
|
setup(e) {
|
|
26
|
-
const t =
|
|
27
|
-
return (n, a) => (
|
|
28
|
-
class:
|
|
26
|
+
const t = he(e, "view");
|
|
27
|
+
return (n, a) => (f(), x("div", {
|
|
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 ? (
|
|
32
|
-
e.title ? (
|
|
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 ? (
|
|
43
|
-
|
|
44
|
-
])) :
|
|
45
|
-
])) :
|
|
46
|
-
e.views && e.views.length > 0 ? (
|
|
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
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
49
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => t.value = r),
|
|
50
50
|
class: "wx-list-screen__views",
|
|
51
51
|
items: e.views,
|
|
52
52
|
"collapse-below": e.collapseBelow,
|
|
53
53
|
"aria-label": e.title
|
|
54
54
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
e.card ? (
|
|
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"])) : (
|
|
69
|
-
e.card ? (
|
|
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
|
-
for (const [a,
|
|
85
|
-
n[a] =
|
|
84
|
+
for (const [a, r] of t)
|
|
85
|
+
n[a] = r;
|
|
86
86
|
return n;
|
|
87
|
-
},
|
|
88
|
-
"wx-list": { component:
|
|
89
|
-
},
|
|
90
|
-
function
|
|
91
|
-
const e =
|
|
87
|
+
}, at = /* @__PURE__ */ B(nt, [["__scopeId", "data-v-7586ed04"]]), lt = {
|
|
88
|
+
"wx-list": { component: at, kind: "layout", labelProp: "title" }
|
|
89
|
+
}, ye = /* @__PURE__ */ Symbol("webx-admin");
|
|
90
|
+
function H() {
|
|
91
|
+
const e = G(ye, null);
|
|
92
92
|
if (e === null)
|
|
93
93
|
throw new Error("useAdmin() was called outside a panel created by createAdmin().");
|
|
94
94
|
return e;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
const t =
|
|
96
|
+
function st(e) {
|
|
97
|
+
const t = oe({
|
|
98
98
|
status: "loading",
|
|
99
99
|
manifest: null,
|
|
100
100
|
user: null,
|
|
101
101
|
error: null
|
|
102
|
-
}), n =
|
|
102
|
+
}), n = S(() => {
|
|
103
103
|
const l = t.manifest;
|
|
104
104
|
if (l === null)
|
|
105
105
|
return [];
|
|
106
|
-
const
|
|
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
|
|
112
|
-
|
|
111
|
+
const p = w.path ?? w.routes?.[0]?.path;
|
|
112
|
+
p !== void 0 && v.push({
|
|
113
113
|
id: h.id,
|
|
114
114
|
title: h.title,
|
|
115
115
|
icon: h.icon,
|
|
116
|
-
path:
|
|
116
|
+
path: p,
|
|
117
117
|
group: h.group ?? null
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
return
|
|
121
|
-
}), a =
|
|
122
|
-
const l = t.manifest?.groups ?? [],
|
|
123
|
-
for (const
|
|
124
|
-
if (
|
|
125
|
-
const
|
|
126
|
-
|
|
120
|
+
return v;
|
|
121
|
+
}), a = S(() => {
|
|
122
|
+
const l = t.manifest?.groups ?? [], v = [], h = /* @__PURE__ */ new Map();
|
|
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
|
-
|
|
128
|
+
v.push(w);
|
|
129
129
|
return {
|
|
130
|
-
top:
|
|
131
|
-
groups: l.filter((
|
|
132
|
-
id:
|
|
133
|
-
title:
|
|
134
|
-
entries: h.get(
|
|
130
|
+
top: v,
|
|
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
|
-
}),
|
|
137
|
+
}), r = { ...lt };
|
|
138
138
|
for (const l of e.modules)
|
|
139
|
-
Object.assign(
|
|
140
|
-
Object.assign(
|
|
141
|
-
const
|
|
142
|
-
async function
|
|
143
|
-
const
|
|
144
|
-
let h =
|
|
145
|
-
return h === void 0 && (h = e.http.get(`${e.apiPath}/screens/${l}`).then((
|
|
146
|
-
throw
|
|
147
|
-
}),
|
|
139
|
+
Object.assign(r, l.types);
|
|
140
|
+
Object.assign(r, e.types);
|
|
141
|
+
const o = /* @__PURE__ */ new Map();
|
|
142
|
+
async function s(l) {
|
|
143
|
+
const v = `${e.i18n.state.locale}:${l}`;
|
|
144
|
+
let h = o.get(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
|
+
}), o.set(v, h)), h;
|
|
148
148
|
}
|
|
149
|
-
let
|
|
150
|
-
async function
|
|
149
|
+
let u = null;
|
|
150
|
+
async function i() {
|
|
151
151
|
t.status = "loading", t.error = null;
|
|
152
152
|
try {
|
|
153
|
-
if (
|
|
153
|
+
if (u !== null && (t.user = await u(), t.user === null)) {
|
|
154
154
|
t.manifest = null, t.status = "unauthenticated";
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
157
|
const l = await e.loadManifest();
|
|
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
|
|
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
|
}
|
|
164
164
|
t.error = l instanceof Error ? l.message : String(l), t.status = "error";
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
async function
|
|
167
|
+
async function c() {
|
|
168
168
|
if (t.manifest !== null)
|
|
169
169
|
try {
|
|
170
170
|
t.manifest = await e.loadManifest();
|
|
171
171
|
} catch {
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
async function
|
|
174
|
+
async function m(l) {
|
|
175
175
|
if (e.loadDictionary === void 0) {
|
|
176
176
|
e.i18n.state.locale = l;
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
await e.loadDictionary(l), await
|
|
179
|
+
await e.loadDictionary(l), await c();
|
|
180
180
|
}
|
|
181
181
|
return {
|
|
182
182
|
http: e.http,
|
|
@@ -187,130 +187,153 @@ function Je(e) {
|
|
|
187
187
|
modules: e.modules,
|
|
188
188
|
nav: n,
|
|
189
189
|
groups: a,
|
|
190
|
-
types:
|
|
191
|
-
reload:
|
|
192
|
-
refreshManifest:
|
|
193
|
-
setLocale:
|
|
190
|
+
types: r,
|
|
191
|
+
reload: i,
|
|
192
|
+
refreshManifest: c,
|
|
193
|
+
setLocale: m,
|
|
194
194
|
setUser(l) {
|
|
195
195
|
t.user = l;
|
|
196
196
|
},
|
|
197
197
|
useSessionLoader(l) {
|
|
198
|
-
|
|
198
|
+
u = l;
|
|
199
199
|
},
|
|
200
200
|
can(l) {
|
|
201
|
-
const
|
|
202
|
-
return
|
|
201
|
+
const v = t.user;
|
|
202
|
+
return v === null ? !1 : v.isSuper || v.permissions.includes(l);
|
|
203
203
|
},
|
|
204
|
-
loadScreen:
|
|
204
|
+
loadScreen: s,
|
|
205
205
|
screenPatch(l) {
|
|
206
206
|
return e.screens?.[l] ?? [];
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
e.provide(
|
|
210
|
+
function ot(e, t) {
|
|
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
|
-
const
|
|
217
|
-
function
|
|
218
|
-
const e =
|
|
216
|
+
const Q = /* @__PURE__ */ Symbol("webx-i18n");
|
|
217
|
+
function dn() {
|
|
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().");
|
|
221
221
|
return e;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
const t =
|
|
225
|
-
return t === null ?
|
|
223
|
+
function N(e) {
|
|
224
|
+
const t = G(Q, null);
|
|
225
|
+
return t === null ? de().scope(e) : t.scope(e);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
e.provide(
|
|
227
|
+
function rt(e, t) {
|
|
228
|
+
e.provide(Q, t);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
const t = e.fallback ?? "en", n =
|
|
230
|
+
function de(e = {}) {
|
|
231
|
+
const t = e.fallback ?? "en", n = oe({
|
|
232
232
|
locale: e.locale ?? t,
|
|
233
233
|
fallback: t,
|
|
234
234
|
panelLocales: [],
|
|
235
235
|
contentLocales: []
|
|
236
|
-
}), a = {},
|
|
237
|
-
function
|
|
238
|
-
let
|
|
239
|
-
for (const l of
|
|
240
|
-
if (typeof
|
|
236
|
+
}), a = {}, r = oe({ value: {} });
|
|
237
|
+
function o(u, i, c) {
|
|
238
|
+
let m = u[i]?.[c[0] ?? ""];
|
|
239
|
+
for (const l of c.slice(1)) {
|
|
240
|
+
if (typeof m != "object" || m === null)
|
|
241
241
|
return null;
|
|
242
|
-
|
|
242
|
+
m = m[l];
|
|
243
243
|
}
|
|
244
|
-
return typeof
|
|
244
|
+
return typeof m == "string" ? m : null;
|
|
245
245
|
}
|
|
246
|
-
function
|
|
247
|
-
const [
|
|
246
|
+
function s(u, i, c) {
|
|
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
|
-
|
|
250
|
-
return
|
|
249
|
+
i;
|
|
250
|
+
return c === void 0 ? h : ut(h, c);
|
|
251
251
|
}
|
|
252
252
|
return {
|
|
253
253
|
state: n,
|
|
254
|
-
defaults(
|
|
255
|
-
a[
|
|
254
|
+
defaults(u, i) {
|
|
255
|
+
a[u] = { ...a[u], ...i };
|
|
256
256
|
},
|
|
257
|
-
load(
|
|
258
|
-
|
|
257
|
+
load(u, i, c) {
|
|
258
|
+
r.value = u ?? {}, n.locale = i ?? n.locale, c !== void 0 && (n.fallback = c);
|
|
259
259
|
},
|
|
260
|
-
scope(
|
|
261
|
-
return (
|
|
260
|
+
scope(u) {
|
|
261
|
+
return (i, c) => s(u, i, c);
|
|
262
262
|
},
|
|
263
|
-
t: (
|
|
263
|
+
t: (u, i) => s("", u, i)
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function ut(e, t) {
|
|
267
267
|
let n = e;
|
|
268
|
-
for (const [a,
|
|
269
|
-
n = n.replaceAll(`:${a}`, String(
|
|
268
|
+
for (const [a, r] of Object.entries(t))
|
|
269
|
+
n = n.replaceAll(`:${a}`, String(r));
|
|
270
270
|
return n;
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const dt = /* @__PURE__ */ U({
|
|
273
|
+
__name: "AdminLanding",
|
|
274
|
+
props: {
|
|
275
|
+
landing: { default: null }
|
|
276
|
+
},
|
|
277
|
+
setup(e) {
|
|
278
|
+
const t = e, n = H(), a = we(), r = N("webx-admin"), o = S(() => {
|
|
279
|
+
const s = n.nav.value;
|
|
280
|
+
return s.length === 0 ? null : ((t.landing === null ? void 0 : s.find((i) => i.path === t.landing)) ?? s[0])?.path ?? null;
|
|
281
|
+
});
|
|
282
|
+
return J(
|
|
283
|
+
o,
|
|
284
|
+
(s) => {
|
|
285
|
+
s !== null && a.replace(s);
|
|
286
|
+
},
|
|
287
|
+
{ immediate: !0 }
|
|
288
|
+
), (s, u) => o.value === null && d(n).state.status === "ready" ? (f(), b(d(Ne), {
|
|
289
|
+
key: 0,
|
|
290
|
+
status: "info",
|
|
291
|
+
title: d(r)("shell.empty-title"),
|
|
292
|
+
description: d(r)("shell.empty-description")
|
|
293
|
+
}, null, 8, ["title", "description"])) : W("", !0);
|
|
294
|
+
}
|
|
295
|
+
}), ct = /* @__PURE__ */ U({
|
|
273
296
|
__name: "AdminNav",
|
|
274
297
|
props: {
|
|
275
298
|
collapsed: { type: Boolean }
|
|
276
299
|
},
|
|
277
300
|
emits: ["select"],
|
|
278
301
|
setup(e, { emit: t }) {
|
|
279
|
-
const n = t, a =
|
|
280
|
-
get: () => a.nav.value.find((
|
|
281
|
-
set: (
|
|
282
|
-
const
|
|
283
|
-
|
|
302
|
+
const n = t, a = H(), r = N("webx-admin"), o = we(), s = Ce(), u = S({
|
|
303
|
+
get: () => a.nav.value.find((c) => s.path.startsWith(c.path))?.id ?? "",
|
|
304
|
+
set: (i) => {
|
|
305
|
+
const c = a.nav.value.find((m) => m.id === i);
|
|
306
|
+
c !== void 0 && o.push(c.path);
|
|
284
307
|
}
|
|
285
308
|
});
|
|
286
|
-
return (
|
|
287
|
-
const
|
|
288
|
-
return
|
|
289
|
-
modelValue:
|
|
290
|
-
"onUpdate:modelValue":
|
|
309
|
+
return (i, c) => {
|
|
310
|
+
const m = z("wx-menu-item"), l = z("wx-submenu"), v = z("wx-menu");
|
|
311
|
+
return f(), b(v, {
|
|
312
|
+
modelValue: u.value,
|
|
313
|
+
"onUpdate:modelValue": c[0] || (c[0] = (h) => u.value = h),
|
|
291
314
|
collapsed: e.collapsed,
|
|
292
|
-
label:
|
|
293
|
-
onSelect:
|
|
315
|
+
label: d(r)("nav.sections"),
|
|
316
|
+
onSelect: c[1] || (c[1] = (h) => n("select"))
|
|
294
317
|
}, {
|
|
295
|
-
default:
|
|
296
|
-
(
|
|
318
|
+
default: g(() => [
|
|
319
|
+
(f(!0), x(R, null, j(d(a).groups.value.top, (h) => (f(), b(m, {
|
|
297
320
|
key: h.id,
|
|
298
321
|
value: h.id,
|
|
299
322
|
icon: h.icon ?? void 0,
|
|
300
323
|
label: h.title
|
|
301
324
|
}, null, 8, ["value", "icon", "label"]))), 128)),
|
|
302
|
-
(
|
|
325
|
+
(f(!0), x(R, null, j(d(a).groups.value.groups, (h) => (f(), b(l, {
|
|
303
326
|
key: h.id,
|
|
304
327
|
value: `group:${h.id}`,
|
|
305
328
|
title: h.title,
|
|
306
329
|
icon: "gear"
|
|
307
330
|
}, {
|
|
308
|
-
default:
|
|
309
|
-
(
|
|
310
|
-
key:
|
|
311
|
-
value:
|
|
312
|
-
icon:
|
|
313
|
-
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
|
|
314
337
|
}, null, 8, ["value", "icon", "label"]))), 128))
|
|
315
338
|
]),
|
|
316
339
|
_: 2
|
|
@@ -320,64 +343,68 @@ const nt = /* @__PURE__ */ T({
|
|
|
320
343
|
}, 8, ["modelValue", "collapsed", "label"]);
|
|
321
344
|
};
|
|
322
345
|
}
|
|
323
|
-
}),
|
|
346
|
+
}), mt = {
|
|
324
347
|
key: 0,
|
|
325
348
|
class: "wx-root wx-admin-plain"
|
|
326
|
-
},
|
|
349
|
+
}, ft = {
|
|
327
350
|
key: 1,
|
|
328
351
|
class: "wx-root wx-admin-plain"
|
|
329
|
-
},
|
|
352
|
+
}, vt = {
|
|
330
353
|
key: 2,
|
|
331
354
|
class: "wx-root wx-admin-plain"
|
|
332
|
-
},
|
|
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({
|
|
333
356
|
__name: "AdminShell",
|
|
334
357
|
setup(e) {
|
|
335
|
-
const t =
|
|
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(
|
|
336
359
|
a,
|
|
337
360
|
{ persist: "webx-admin-shell" }
|
|
338
|
-
), l =
|
|
339
|
-
return (
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
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, _) => {
|
|
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");
|
|
368
|
+
return f(), x(R, null, [
|
|
369
|
+
y(d(De)),
|
|
370
|
+
d(t).state.status === "unauthenticated" ? (f(), x("div", mt, [
|
|
371
|
+
y(V)
|
|
372
|
+
])) : d(t).state.status === "loading" ? (f(), x("div", ft, [
|
|
373
|
+
y(Z, {
|
|
374
|
+
label: d(n)("shell.loading")
|
|
348
375
|
}, null, 8, ["label"])
|
|
349
|
-
])) :
|
|
350
|
-
|
|
376
|
+
])) : d(t).state.status === "error" ? (f(), x("div", vt, [
|
|
377
|
+
y(te, {
|
|
351
378
|
status: "error",
|
|
352
|
-
title:
|
|
353
|
-
description:
|
|
379
|
+
title: d(n)("shell.error-title"),
|
|
380
|
+
description: d(t).state.error
|
|
354
381
|
}, {
|
|
355
|
-
default:
|
|
356
|
-
|
|
382
|
+
default: g(() => [
|
|
383
|
+
y(ee, {
|
|
357
384
|
type: "primary",
|
|
358
|
-
onClick:
|
|
385
|
+
onClick: _[0] || (_[0] = (ce) => d(t).reload())
|
|
359
386
|
}, {
|
|
360
|
-
default:
|
|
361
|
-
|
|
387
|
+
default: g(() => [
|
|
388
|
+
C(E(d(n)("shell.retry")), 1)
|
|
362
389
|
]),
|
|
363
390
|
_: 1
|
|
364
391
|
})
|
|
365
392
|
]),
|
|
366
393
|
_: 1
|
|
367
394
|
}, 8, ["title", "description"])
|
|
368
|
-
])) : (
|
|
395
|
+
])) : (f(), x("div", {
|
|
369
396
|
key: 3,
|
|
370
397
|
ref_key: "shellEl",
|
|
371
398
|
ref: a,
|
|
372
|
-
class:
|
|
399
|
+
class: le(["wx-root wx-admin", `wx-admin--${w.value}`])
|
|
373
400
|
}, [
|
|
374
|
-
|
|
375
|
-
direction:
|
|
401
|
+
y(_e, {
|
|
402
|
+
direction: d(o) === "drawer" ? "vertical" : "horizontal",
|
|
376
403
|
"full-height": "",
|
|
377
404
|
class: "wx-admin__frame"
|
|
378
405
|
}, {
|
|
379
|
-
default:
|
|
380
|
-
|
|
406
|
+
default: g(() => [
|
|
407
|
+
d(o) === "drawer" ? (f(), b(T, {
|
|
381
408
|
key: 0,
|
|
382
409
|
class: "wx-admin__header",
|
|
383
410
|
floating: "",
|
|
@@ -386,126 +413,127 @@ const nt = /* @__PURE__ */ T({
|
|
|
386
413
|
padding: "sm",
|
|
387
414
|
height: "var(--wx-admin-header-height)"
|
|
388
415
|
}, {
|
|
389
|
-
end:
|
|
390
|
-
|
|
416
|
+
end: g(() => [
|
|
417
|
+
L(p.$slots, "user", { expanded: !1 }, void 0, !0)
|
|
391
418
|
]),
|
|
392
|
-
default:
|
|
393
|
-
|
|
419
|
+
default: g(() => [
|
|
420
|
+
y(D, {
|
|
394
421
|
icon: "menu",
|
|
395
|
-
title:
|
|
396
|
-
onClick:
|
|
422
|
+
title: d(n)("nav.menu"),
|
|
423
|
+
onClick: d(c)
|
|
397
424
|
}, null, 8, ["title", "onClick"]),
|
|
398
|
-
|
|
399
|
-
|
|
425
|
+
L(p.$slots, "brand", {}, () => [
|
|
426
|
+
v.value ? (f(), x("img", {
|
|
400
427
|
key: 0,
|
|
401
428
|
class: "wx-admin__logo",
|
|
402
|
-
src:
|
|
429
|
+
src: v.value.url,
|
|
403
430
|
alt: l.value,
|
|
404
|
-
width:
|
|
405
|
-
height:
|
|
406
|
-
}, null, 8,
|
|
431
|
+
width: v.value.width ?? void 0,
|
|
432
|
+
height: v.value.height ?? void 0
|
|
433
|
+
}, null, 8, ht)) : (f(), b(k, {
|
|
407
434
|
key: 1,
|
|
408
435
|
weight: "semibold",
|
|
409
436
|
truncate: ""
|
|
410
437
|
}, {
|
|
411
|
-
default:
|
|
412
|
-
|
|
438
|
+
default: g(() => [
|
|
439
|
+
C(E(l.value), 1)
|
|
413
440
|
]),
|
|
414
441
|
_: 1
|
|
415
442
|
}))
|
|
416
443
|
], !0)
|
|
417
444
|
]),
|
|
418
445
|
_: 3
|
|
419
|
-
})) :
|
|
420
|
-
|
|
446
|
+
})) : W("", !0),
|
|
447
|
+
d(u) ? (f(), b($, {
|
|
421
448
|
key: 1,
|
|
422
449
|
class: "wx-admin__aside",
|
|
423
450
|
sticky: "",
|
|
424
451
|
floating: "",
|
|
425
452
|
scroll: "",
|
|
426
453
|
bordered: !1,
|
|
427
|
-
collapsed:
|
|
454
|
+
collapsed: d(s),
|
|
428
455
|
width: 220,
|
|
429
456
|
"collapsed-width": 56
|
|
430
457
|
}, {
|
|
431
|
-
top:
|
|
432
|
-
|
|
433
|
-
class:
|
|
458
|
+
top: g(() => [
|
|
459
|
+
M("div", {
|
|
460
|
+
class: le(["wx-admin__brand", { "wx-admin__brand--stacked": d(s) && h.value }])
|
|
434
461
|
}, [
|
|
435
|
-
|
|
462
|
+
d(s) ? h.value ? (f(), x("img", {
|
|
436
463
|
key: 1,
|
|
437
464
|
class: "wx-admin__mark",
|
|
438
465
|
src: h.value.url,
|
|
439
466
|
alt: l.value
|
|
440
|
-
}, null, 8,
|
|
441
|
-
|
|
467
|
+
}, null, 8, wt)) : W("", !0) : L(p.$slots, "brand", {}, () => [
|
|
468
|
+
v.value ? (f(), x("img", {
|
|
442
469
|
key: 0,
|
|
443
470
|
class: "wx-admin__logo",
|
|
444
|
-
src:
|
|
471
|
+
src: v.value.url,
|
|
445
472
|
alt: l.value,
|
|
446
|
-
width:
|
|
447
|
-
height:
|
|
448
|
-
}, null, 8,
|
|
473
|
+
width: v.value.width ?? void 0,
|
|
474
|
+
height: v.value.height ?? void 0
|
|
475
|
+
}, null, 8, pt)) : (f(), b(k, {
|
|
449
476
|
key: 1,
|
|
450
477
|
weight: "semibold",
|
|
451
478
|
truncate: "",
|
|
452
479
|
class: "wx-admin__title"
|
|
453
480
|
}, {
|
|
454
|
-
default:
|
|
455
|
-
|
|
481
|
+
default: g(() => [
|
|
482
|
+
C(E(l.value), 1)
|
|
456
483
|
]),
|
|
457
484
|
_: 1
|
|
458
485
|
}))
|
|
459
486
|
], !0, 0),
|
|
460
|
-
|
|
487
|
+
y(D, {
|
|
461
488
|
icon: "sidebar",
|
|
462
|
-
title:
|
|
463
|
-
onClick:
|
|
489
|
+
title: d(s) ? d(n)("nav.expand") : d(n)("nav.collapse"),
|
|
490
|
+
onClick: d(c)
|
|
464
491
|
}, null, 8, ["title", "onClick"])
|
|
465
492
|
], 2)
|
|
466
493
|
]),
|
|
467
|
-
bottom:
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
expanded: !
|
|
494
|
+
bottom: g(() => [
|
|
495
|
+
M("div", gt, [
|
|
496
|
+
L(p.$slots, "user", {
|
|
497
|
+
expanded: !d(s)
|
|
471
498
|
}, void 0, !0)
|
|
472
499
|
])
|
|
473
500
|
]),
|
|
474
|
-
default:
|
|
475
|
-
|
|
501
|
+
default: g(() => [
|
|
502
|
+
L(p.$slots, "nav", { collapsed: d(s) }, void 0, !0)
|
|
476
503
|
]),
|
|
477
504
|
_: 3
|
|
478
|
-
}, 8, ["collapsed"])) :
|
|
479
|
-
|
|
505
|
+
}, 8, ["collapsed"])) : W("", !0),
|
|
506
|
+
y(P, {
|
|
480
507
|
padding: "none",
|
|
481
508
|
class: "wx-admin__screen"
|
|
482
509
|
}, {
|
|
483
|
-
default:
|
|
484
|
-
|
|
510
|
+
default: g(() => [
|
|
511
|
+
y(V)
|
|
485
512
|
]),
|
|
486
513
|
_: 1
|
|
487
514
|
})
|
|
488
515
|
]),
|
|
489
516
|
_: 3
|
|
490
517
|
}, 8, ["direction"]),
|
|
491
|
-
|
|
492
|
-
open:
|
|
493
|
-
"onUpdate:open":
|
|
494
|
-
|
|
518
|
+
y(ke, {
|
|
519
|
+
open: d(i),
|
|
520
|
+
"onUpdate:open": _[1] || (_[1] = (ce) => Te(i) ? i.value = ce : null),
|
|
521
|
+
class: "wx-admin__drawer",
|
|
522
|
+
title: l.value === "" ? d(n)("nav.menu") : l.value,
|
|
495
523
|
side: "left",
|
|
496
524
|
size: 260,
|
|
497
525
|
"full-screen": !1,
|
|
498
526
|
closable: ""
|
|
499
527
|
}, {
|
|
500
|
-
footer:
|
|
501
|
-
|
|
502
|
-
|
|
528
|
+
footer: g(() => [
|
|
529
|
+
M("div", yt, [
|
|
530
|
+
L(p.$slots, "user", { expanded: !0 }, void 0, !0)
|
|
503
531
|
])
|
|
504
532
|
]),
|
|
505
|
-
default:
|
|
506
|
-
|
|
533
|
+
default: g(() => [
|
|
534
|
+
L(p.$slots, "nav", {
|
|
507
535
|
collapsed: !1,
|
|
508
|
-
select:
|
|
536
|
+
select: d(m)
|
|
509
537
|
}, void 0, !0)
|
|
510
538
|
]),
|
|
511
539
|
_: 3
|
|
@@ -514,10 +542,10 @@ const nt = /* @__PURE__ */ T({
|
|
|
514
542
|
], 64);
|
|
515
543
|
};
|
|
516
544
|
}
|
|
517
|
-
}),
|
|
518
|
-
class
|
|
519
|
-
constructor(t, n, a = {},
|
|
520
|
-
super(t), this.status = n, this.errors = a, this.retryAfter =
|
|
545
|
+
}), bt = /* @__PURE__ */ B(xt, [["__scopeId", "data-v-5baa6cbf"]]);
|
|
546
|
+
class ie extends Error {
|
|
547
|
+
constructor(t, n, a = {}, r = null, o = null) {
|
|
548
|
+
super(t), this.status = n, this.errors = a, this.retryAfter = r, this.body = o, this.name = "HttpError";
|
|
521
549
|
}
|
|
522
550
|
status;
|
|
523
551
|
errors;
|
|
@@ -534,76 +562,76 @@ class X extends Error {
|
|
|
534
562
|
return this.status === 429;
|
|
535
563
|
}
|
|
536
564
|
}
|
|
537
|
-
const
|
|
538
|
-
function
|
|
539
|
-
const t = (e.baseUrl ?? "").replace(/\/$/, ""), n = e.csrfUrl ?? "/sanctum/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis),
|
|
540
|
-
let
|
|
541
|
-
async function
|
|
542
|
-
|
|
565
|
+
const _t = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
|
|
566
|
+
function kt(e = {}) {
|
|
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;
|
|
568
|
+
let s = !1;
|
|
569
|
+
async function u(c = !1) {
|
|
570
|
+
s && !c && ve("XSRF-TOKEN") !== null || (await a(n, { credentials: "same-origin" }), s = !0);
|
|
543
571
|
}
|
|
544
|
-
async function
|
|
545
|
-
const
|
|
546
|
-
|
|
547
|
-
const
|
|
572
|
+
async function i(c, m, l, v = {}, h = !1) {
|
|
573
|
+
const w = _t.has(c);
|
|
574
|
+
w && await u();
|
|
575
|
+
const p = {
|
|
548
576
|
Accept: "application/json",
|
|
549
577
|
"X-Requested-With": "XMLHttpRequest",
|
|
550
578
|
// Standing headers first, so a caller can still override one for a single request.
|
|
551
|
-
...
|
|
552
|
-
...
|
|
579
|
+
...o?.(),
|
|
580
|
+
...v.headers
|
|
553
581
|
};
|
|
554
|
-
if (
|
|
555
|
-
const
|
|
556
|
-
|
|
582
|
+
if (w) {
|
|
583
|
+
const V = ve("XSRF-TOKEN");
|
|
584
|
+
V !== null && (p["X-XSRF-TOKEN"] = V);
|
|
557
585
|
}
|
|
558
|
-
l !== void 0 && (
|
|
559
|
-
const
|
|
560
|
-
method:
|
|
586
|
+
l !== void 0 && (p["Content-Type"] = "application/json");
|
|
587
|
+
const _ = await a(St(t, m, v.query), {
|
|
588
|
+
method: c,
|
|
561
589
|
credentials: "same-origin",
|
|
562
|
-
headers:
|
|
563
|
-
signal:
|
|
590
|
+
headers: p,
|
|
591
|
+
signal: v.signal,
|
|
564
592
|
body: l === void 0 ? void 0 : JSON.stringify(l)
|
|
565
593
|
});
|
|
566
|
-
if (
|
|
567
|
-
return await
|
|
568
|
-
if (
|
|
569
|
-
throw await
|
|
570
|
-
if (
|
|
571
|
-
return await
|
|
594
|
+
if (_.status === 419 && w && !h)
|
|
595
|
+
return await u(!0), i(c, m, l, v, !0);
|
|
596
|
+
if (_.status === 401 && r?.(), !_.ok)
|
|
597
|
+
throw await $t(_);
|
|
598
|
+
if (_.status !== 204)
|
|
599
|
+
return await _.json();
|
|
572
600
|
}
|
|
573
601
|
return {
|
|
574
|
-
get: (
|
|
575
|
-
post: (
|
|
576
|
-
put: (
|
|
577
|
-
patch: (
|
|
578
|
-
delete: (
|
|
602
|
+
get: (c, m) => i("GET", c, void 0, m),
|
|
603
|
+
post: (c, m, l) => i("POST", c, m, l),
|
|
604
|
+
put: (c, m, l) => i("PUT", c, m, l),
|
|
605
|
+
patch: (c, m, l) => i("PATCH", c, m, l),
|
|
606
|
+
delete: (c, m) => i("DELETE", c, void 0, m)
|
|
579
607
|
};
|
|
580
608
|
}
|
|
581
|
-
async function
|
|
609
|
+
async function $t(e) {
|
|
582
610
|
let t = null;
|
|
583
611
|
try {
|
|
584
612
|
t = await e.json();
|
|
585
613
|
} catch {
|
|
586
614
|
}
|
|
587
|
-
const n = t ?? {}, a = typeof n.message == "string" && n.message !== "" ? n.message : e.statusText || `Request failed with ${e.status}`,
|
|
588
|
-
return new
|
|
615
|
+
const n = t ?? {}, a = typeof n.message == "string" && n.message !== "" ? n.message : e.statusText || `Request failed with ${e.status}`, r = n.errors !== null && typeof n.errors == "object" ? n.errors : {}, o = e.headers.get("Retry-After"), s = o === null ? null : Number.parseInt(o, 10);
|
|
616
|
+
return new ie(
|
|
589
617
|
a,
|
|
590
618
|
e.status,
|
|
591
|
-
|
|
592
|
-
Number.isFinite(
|
|
619
|
+
r,
|
|
620
|
+
Number.isFinite(s) ? s : null,
|
|
593
621
|
t
|
|
594
622
|
);
|
|
595
623
|
}
|
|
596
|
-
function
|
|
597
|
-
const
|
|
624
|
+
function St(e, t, n) {
|
|
625
|
+
const r = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
|
|
598
626
|
if (n === void 0)
|
|
599
|
-
return
|
|
600
|
-
const
|
|
601
|
-
for (const [
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
return
|
|
627
|
+
return r;
|
|
628
|
+
const o = new URLSearchParams();
|
|
629
|
+
for (const [u, i] of Object.entries(n))
|
|
630
|
+
i != null && o.set(u, String(i));
|
|
631
|
+
const s = o.toString();
|
|
632
|
+
return s === "" ? r : `${r}${r.includes("?") ? "&" : "?"}${s}`;
|
|
605
633
|
}
|
|
606
|
-
function
|
|
634
|
+
function ve(e) {
|
|
607
635
|
if (typeof document > "u")
|
|
608
636
|
return null;
|
|
609
637
|
for (const t of document.cookie.split(";")) {
|
|
@@ -613,7 +641,7 @@ function le(e) {
|
|
|
613
641
|
}
|
|
614
642
|
return null;
|
|
615
643
|
}
|
|
616
|
-
const
|
|
644
|
+
const xe = {
|
|
617
645
|
shell: {
|
|
618
646
|
loading: "Loading the panel…",
|
|
619
647
|
"error-title": "The panel could not start",
|
|
@@ -663,189 +691,221 @@ const ue = {
|
|
|
663
691
|
server: "The server could not do that. Try again in a moment.",
|
|
664
692
|
offline: "The server did not answer. Check the connection and try again.",
|
|
665
693
|
unknown: "That did not work."
|
|
694
|
+
},
|
|
695
|
+
// What one administrator writes on a record for the next one. Not the property of any
|
|
696
|
+
// section: the same feed hangs off a submission, an order and a client, so the words are
|
|
697
|
+
// the panel's own.
|
|
698
|
+
notes: {
|
|
699
|
+
title: "Notes",
|
|
700
|
+
placeholder: "A note for whoever picks this up next…",
|
|
701
|
+
add: "Add a note",
|
|
702
|
+
empty: "No notes yet.",
|
|
703
|
+
edit: "Edit",
|
|
704
|
+
delete: "Delete",
|
|
705
|
+
save: "Save",
|
|
706
|
+
cancel: "Cancel",
|
|
707
|
+
saved: "Saved.",
|
|
708
|
+
deleted: "Deleted.",
|
|
709
|
+
"delete-title": "Delete this note?",
|
|
710
|
+
"delete-text": "It goes for everybody. This cannot be undone.",
|
|
711
|
+
"unknown-author": "A deleted account",
|
|
712
|
+
// The three the server says and the browser only ever repeats.
|
|
713
|
+
"no-type": "That kind of record does not carry notes.",
|
|
714
|
+
missing: "That record no longer exists.",
|
|
715
|
+
forbidden: "You may not read the notes of this record.",
|
|
716
|
+
"not-yours": "A note is edited by whoever wrote it."
|
|
666
717
|
}
|
|
667
|
-
},
|
|
668
|
-
function
|
|
669
|
-
const t = e.manifestUrl ??
|
|
670
|
-
for (const
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
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 ?? []];
|
|
721
|
+
for (const p of r)
|
|
722
|
+
o.push(...p.routes ?? []);
|
|
723
|
+
if (!o.some((p) => p.path === "/")) {
|
|
724
|
+
const p = r.find((_) => _.landing === !0);
|
|
725
|
+
o.push({
|
|
726
|
+
path: "/",
|
|
727
|
+
name: "webx.home",
|
|
728
|
+
component: dt,
|
|
729
|
+
props: { landing: p?.path ?? p?.routes?.[0]?.path ?? null }
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
const s = Le({
|
|
733
|
+
history: We(a),
|
|
734
|
+
routes: o
|
|
735
|
+
}), u = de({ locale: e.locale ?? zt() }), i = e.http ?? kt({
|
|
676
736
|
baseUrl: "",
|
|
677
737
|
onUnauthenticated: () => {
|
|
678
|
-
|
|
738
|
+
m.setUser(null), m.state.status = "unauthenticated";
|
|
679
739
|
},
|
|
680
740
|
// Every request says which language the panel is currently showing. It decides what
|
|
681
741
|
// the server writes its own messages in — a 422 under a field — for anybody who has
|
|
682
742
|
// not stored a preference yet, which is everybody until they choose one. Without it,
|
|
683
743
|
// signing in on a Russian sign-in screen lands in an English panel.
|
|
684
|
-
headers: () => ({ "X-Webx-Locale":
|
|
744
|
+
headers: () => ({ "X-Webx-Locale": u.state.locale })
|
|
685
745
|
});
|
|
686
|
-
|
|
687
|
-
async function
|
|
688
|
-
const
|
|
689
|
-
|
|
746
|
+
u.defaults("webx-admin", xe);
|
|
747
|
+
async function c(p) {
|
|
748
|
+
const _ = await i.get(`${n}/translations/${p}`);
|
|
749
|
+
u.load(_.data.namespaces, _.data.locale, _.data.fallback), Et(_.data.locale), Ct(_.data.locale, u.state.panelLocales);
|
|
690
750
|
}
|
|
691
|
-
const
|
|
692
|
-
http:
|
|
751
|
+
const m = st({
|
|
752
|
+
http: i,
|
|
693
753
|
basePath: a,
|
|
694
754
|
apiPath: n,
|
|
695
|
-
modules:
|
|
696
|
-
i18n:
|
|
697
|
-
loadDictionary:
|
|
755
|
+
modules: r,
|
|
756
|
+
i18n: u,
|
|
757
|
+
loadDictionary: c,
|
|
698
758
|
types: e.types,
|
|
699
759
|
screens: e.screens,
|
|
700
|
-
loadManifest: async () => (await
|
|
701
|
-
}), l =
|
|
702
|
-
l.use(
|
|
703
|
-
const
|
|
704
|
-
l.provide(
|
|
705
|
-
list:
|
|
706
|
-
() =>
|
|
707
|
-
code:
|
|
708
|
-
label:
|
|
760
|
+
loadManifest: async () => (await i.get(t)).data
|
|
761
|
+
}), l = ze(Tt(e));
|
|
762
|
+
l.use(Ie), ot(l, m), rt(l, u);
|
|
763
|
+
const v = A("");
|
|
764
|
+
l.provide(Be, {
|
|
765
|
+
list: S(
|
|
766
|
+
() => u.state.contentLocales.map((p) => ({
|
|
767
|
+
code: p.code,
|
|
768
|
+
label: p.code.toUpperCase()
|
|
709
769
|
}))
|
|
710
770
|
),
|
|
711
|
-
active:
|
|
712
|
-
get: () =>
|
|
713
|
-
set: (
|
|
714
|
-
|
|
771
|
+
active: S({
|
|
772
|
+
get: () => v.value || (u.state.contentLocales[0]?.code ?? ""),
|
|
773
|
+
set: (p) => {
|
|
774
|
+
v.value = p;
|
|
715
775
|
}
|
|
716
776
|
})
|
|
717
777
|
});
|
|
718
778
|
const h = {
|
|
719
779
|
app: l,
|
|
720
|
-
router:
|
|
721
|
-
context:
|
|
722
|
-
i18n:
|
|
780
|
+
router: s,
|
|
781
|
+
context: m,
|
|
782
|
+
i18n: u,
|
|
723
783
|
async mount() {
|
|
724
|
-
await Promise.all([
|
|
725
|
-
}), l.mount(e.el ?? "#webx-app"), await
|
|
784
|
+
await Promise.all([w(), c(u.state.locale)]).catch(() => {
|
|
785
|
+
}), l.mount(e.el ?? "#webx-app"), await m.reload();
|
|
726
786
|
}
|
|
727
787
|
};
|
|
728
|
-
async function
|
|
729
|
-
const
|
|
730
|
-
|
|
788
|
+
async function w() {
|
|
789
|
+
const p = await i.get(`${n}/locales`);
|
|
790
|
+
u.state.panelLocales = p.data.panel, u.state.contentLocales = p.data.content;
|
|
731
791
|
}
|
|
732
|
-
for (const
|
|
733
|
-
|
|
734
|
-
return l.use(
|
|
792
|
+
for (const p of e.plugins ?? [])
|
|
793
|
+
p.install(h);
|
|
794
|
+
return l.use(s), h;
|
|
735
795
|
}
|
|
736
|
-
function
|
|
796
|
+
function Tt(e) {
|
|
737
797
|
const t = {
|
|
738
798
|
// The menu is the panel's own: it is the manifest, drawn.
|
|
739
799
|
// The shell hands in what a choice means where it drew the menu — in the drawer it is what
|
|
740
800
|
// closes it, and a drawer that stays open over the section it just opened is a drawer the
|
|
741
801
|
// reader has to dismiss by hand.
|
|
742
|
-
nav: (n) =>
|
|
802
|
+
nav: (n) => O(ct, { collapsed: n.collapsed === !0, onSelect: n.select })
|
|
743
803
|
};
|
|
744
|
-
return e.brand !== void 0 && (t.brand = () =>
|
|
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) };
|
|
745
805
|
}
|
|
746
|
-
function
|
|
747
|
-
const e =
|
|
806
|
+
function zt() {
|
|
807
|
+
const e = At(be);
|
|
748
808
|
return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
|
|
749
809
|
}
|
|
750
|
-
function
|
|
810
|
+
function Et(e) {
|
|
751
811
|
try {
|
|
752
|
-
localStorage.setItem(
|
|
812
|
+
localStorage.setItem(be, e);
|
|
753
813
|
} catch {
|
|
754
814
|
}
|
|
755
815
|
}
|
|
756
|
-
function
|
|
816
|
+
function At(e) {
|
|
757
817
|
try {
|
|
758
818
|
return localStorage.getItem(e);
|
|
759
819
|
} catch {
|
|
760
820
|
return null;
|
|
761
821
|
}
|
|
762
822
|
}
|
|
763
|
-
function
|
|
823
|
+
function Ct(e, t) {
|
|
764
824
|
typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((n) => n.code === e)?.direction ?? "ltr");
|
|
765
825
|
}
|
|
766
|
-
function
|
|
826
|
+
function Lt() {
|
|
767
827
|
return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
|
|
768
828
|
}
|
|
769
|
-
function
|
|
829
|
+
function Wt(e) {
|
|
770
830
|
const t = e.replace(/\r\n?/g, `
|
|
771
831
|
`).split(`
|
|
772
832
|
`), n = [];
|
|
773
833
|
let a = 0;
|
|
774
834
|
for (; a < t.length; ) {
|
|
775
|
-
const
|
|
776
|
-
if (
|
|
835
|
+
const r = t[a] ?? "";
|
|
836
|
+
if (r.trim() === "") {
|
|
777
837
|
a += 1;
|
|
778
838
|
continue;
|
|
779
839
|
}
|
|
780
|
-
if (/^```([\w-]*)\s*$/.exec(
|
|
781
|
-
const
|
|
840
|
+
if (/^```([\w-]*)\s*$/.exec(r)) {
|
|
841
|
+
const i = [];
|
|
782
842
|
for (a += 1; a < t.length && !/^```\s*$/.test(t[a] ?? ""); )
|
|
783
|
-
|
|
784
|
-
a += 1, n.push(`<pre><code>${
|
|
843
|
+
i.push(t[a] ?? ""), a += 1;
|
|
844
|
+
a += 1, n.push(`<pre><code>${re(i.join(`
|
|
785
845
|
`))}</code></pre>`);
|
|
786
846
|
continue;
|
|
787
847
|
}
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
791
|
-
n.push(`<h${
|
|
848
|
+
const s = /^(#{1,4})\s+(.*)$/.exec(r);
|
|
849
|
+
if (s) {
|
|
850
|
+
const i = Math.min(s[1].length + 1, 5);
|
|
851
|
+
n.push(`<h${i}>${ne(s[2] ?? "")}</h${i}>`), a += 1;
|
|
792
852
|
continue;
|
|
793
853
|
}
|
|
794
|
-
if (
|
|
795
|
-
const
|
|
796
|
-
for (; a < t.length &&
|
|
797
|
-
for (
|
|
854
|
+
if (K(r)) {
|
|
855
|
+
const i = /^\s*\d+[.)]\s+/.test(r), c = [];
|
|
856
|
+
for (; a < t.length && K(t[a] ?? ""); )
|
|
857
|
+
for (c.push((t[a] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), a += 1; a < t.length; ) {
|
|
798
858
|
const l = t[a] ?? "";
|
|
799
|
-
if (l.trim() === "" ||
|
|
859
|
+
if (l.trim() === "" || K(l) || /^(#{1,4})\s/.test(l) || /^```/.test(l))
|
|
800
860
|
break;
|
|
801
|
-
|
|
861
|
+
c[c.length - 1] += ` ${l.trim()}`, a += 1;
|
|
802
862
|
}
|
|
803
|
-
const
|
|
804
|
-
n.push(`<${
|
|
863
|
+
const m = i ? "ol" : "ul";
|
|
864
|
+
n.push(`<${m}>${c.map((l) => `<li>${ne(l)}</li>`).join("")}</${m}>`);
|
|
805
865
|
continue;
|
|
806
866
|
}
|
|
807
|
-
const
|
|
867
|
+
const u = [];
|
|
808
868
|
for (; a < t.length; ) {
|
|
809
|
-
const
|
|
810
|
-
if (
|
|
811
|
-
|
|
869
|
+
const i = t[a] ?? "";
|
|
870
|
+
if (i.trim() === "" || K(i) || /^(#{1,4})\s/.test(i) || /^```/.test(i)) break;
|
|
871
|
+
u.push(i.trim()), a += 1;
|
|
812
872
|
}
|
|
813
|
-
n.push(`<p>${
|
|
873
|
+
n.push(`<p>${ne(u.join(" "))}</p>`);
|
|
814
874
|
}
|
|
815
875
|
return n.join("");
|
|
816
876
|
}
|
|
817
|
-
const
|
|
818
|
-
function
|
|
877
|
+
const F = "\0";
|
|
878
|
+
function K(e) {
|
|
819
879
|
return /^\s*(?:[-*+]|\d+[.)])\s+/.test(e);
|
|
820
880
|
}
|
|
821
|
-
function
|
|
822
|
-
const t = [], n = e.replace(/`([^`]+)`/g, (
|
|
823
|
-
return
|
|
881
|
+
function ne(e) {
|
|
882
|
+
const t = [], n = e.replace(/`([^`]+)`/g, (r, o) => (t.push(`<code>${re(o)}</code>`), `${F}${t.length - 1}${F}`));
|
|
883
|
+
return re(n).replace(
|
|
824
884
|
/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
|
|
825
885
|
'<a href="$2" target="_blank" rel="noopener">$1</a>'
|
|
826
886
|
).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(
|
|
827
|
-
new RegExp(`${
|
|
828
|
-
(
|
|
887
|
+
new RegExp(`${F}(\\d+)${F}`, "g"),
|
|
888
|
+
(r, o) => t[Number(o)] ?? ""
|
|
829
889
|
);
|
|
830
890
|
}
|
|
831
|
-
function
|
|
891
|
+
function re(e) {
|
|
832
892
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
833
893
|
}
|
|
834
|
-
function
|
|
894
|
+
function Ut(e) {
|
|
835
895
|
const t = e.scope("webx-admin"), n = /* @__PURE__ */ new Map();
|
|
836
|
-
function a(
|
|
837
|
-
const
|
|
838
|
-
let
|
|
839
|
-
return
|
|
896
|
+
function a(o, s, u) {
|
|
897
|
+
const i = e.state.locale, c = `${i}:${o}`;
|
|
898
|
+
let m = n.get(c);
|
|
899
|
+
return m === void 0 && (m = new Intl.DateTimeFormat(i, s), n.set(c, m)), m.format(u);
|
|
840
900
|
}
|
|
841
|
-
const
|
|
901
|
+
const r = (o) => a("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, o);
|
|
842
902
|
return {
|
|
843
|
-
short(
|
|
844
|
-
const
|
|
845
|
-
if (
|
|
903
|
+
short(o) {
|
|
904
|
+
const s = ae(o);
|
|
905
|
+
if (s === null)
|
|
846
906
|
return t("dates.never");
|
|
847
|
-
const
|
|
848
|
-
return
|
|
907
|
+
const u = /* @__PURE__ */ new Date(), i = Nt(s, u);
|
|
908
|
+
return i === 0 ? t("dates.today", { time: r(s) }) : i === -1 ? t("dates.yesterday", { time: r(s) }) : s.getFullYear() === u.getFullYear() ? a(
|
|
849
909
|
"this-year",
|
|
850
910
|
{
|
|
851
911
|
day: "numeric",
|
|
@@ -854,66 +914,76 @@ function $t(e) {
|
|
|
854
914
|
minute: "2-digit",
|
|
855
915
|
hourCycle: "h23"
|
|
856
916
|
},
|
|
857
|
-
|
|
858
|
-
) : a("earlier", { day: "numeric", month: "long", year: "numeric" },
|
|
917
|
+
s
|
|
918
|
+
) : a("earlier", { day: "numeric", month: "long", year: "numeric" }, s);
|
|
859
919
|
},
|
|
860
|
-
exact(
|
|
861
|
-
const
|
|
862
|
-
return
|
|
920
|
+
exact(o) {
|
|
921
|
+
const s = ae(o);
|
|
922
|
+
return s === null ? "" : a("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, s);
|
|
863
923
|
},
|
|
864
|
-
iso(
|
|
865
|
-
const
|
|
866
|
-
return
|
|
924
|
+
iso(o) {
|
|
925
|
+
const s = ae(o);
|
|
926
|
+
return s === null ? "" : s.toISOString();
|
|
867
927
|
}
|
|
868
928
|
};
|
|
869
929
|
}
|
|
870
|
-
function
|
|
871
|
-
const e =
|
|
872
|
-
return
|
|
930
|
+
function Rt() {
|
|
931
|
+
const e = G(Q, null);
|
|
932
|
+
return Ut(e ?? Mt());
|
|
873
933
|
}
|
|
874
|
-
let
|
|
875
|
-
function
|
|
876
|
-
return
|
|
934
|
+
let q = null;
|
|
935
|
+
function Mt() {
|
|
936
|
+
return q === null && (q = de(), q.defaults("webx-admin", xe)), q;
|
|
877
937
|
}
|
|
878
|
-
function
|
|
938
|
+
function ae(e) {
|
|
879
939
|
if (e == null || e === "")
|
|
880
940
|
return null;
|
|
881
941
|
const t = e instanceof Date ? e : new Date(e);
|
|
882
942
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
883
943
|
}
|
|
884
|
-
function
|
|
944
|
+
function Nt(e, t) {
|
|
885
945
|
const n = (a) => Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
|
|
886
946
|
return Math.round((n(e) - n(t)) / 864e5);
|
|
887
947
|
}
|
|
888
|
-
function
|
|
889
|
-
const a = e instanceof
|
|
948
|
+
function Pt(e, t, n) {
|
|
949
|
+
const a = e instanceof ie ? e.status : Dt(e);
|
|
890
950
|
if (a === 422)
|
|
891
|
-
return
|
|
951
|
+
return It(e) ?? n ?? t("errors.unknown");
|
|
892
952
|
if (a === 401) return t("errors.signed-out");
|
|
893
953
|
if (a === 403) return t("errors.forbidden");
|
|
894
954
|
if (a === 404) return t("errors.gone");
|
|
895
955
|
if (a === 409) return t("errors.conflict");
|
|
896
956
|
if (a === 429) {
|
|
897
|
-
const
|
|
898
|
-
return
|
|
957
|
+
const r = e instanceof ie ? e.retryAfter : null;
|
|
958
|
+
return r === null ? t("errors.throttled") : t("errors.throttled-in", { seconds: r });
|
|
899
959
|
}
|
|
900
960
|
return a !== null && a >= 500 ? t("errors.server") : a === null ? t("errors.offline") : n ?? t("errors.unknown");
|
|
901
961
|
}
|
|
902
|
-
function
|
|
903
|
-
const e =
|
|
904
|
-
return (t, n) =>
|
|
962
|
+
function Vt() {
|
|
963
|
+
const e = N("webx-admin");
|
|
964
|
+
return (t, n) => Pt(t, e, n);
|
|
905
965
|
}
|
|
906
|
-
function
|
|
966
|
+
function Dt(e) {
|
|
907
967
|
const t = e?.status;
|
|
908
968
|
return typeof t == "number" ? t : null;
|
|
909
969
|
}
|
|
910
|
-
function
|
|
970
|
+
function It(e) {
|
|
911
971
|
const n = e?.body?.message;
|
|
912
972
|
return typeof n == "string" && n !== "" ? n : null;
|
|
913
973
|
}
|
|
914
|
-
|
|
974
|
+
function Bt(e, t, n) {
|
|
975
|
+
const a = `${e.apiPath}/entities/${t}/${n}/notes`, r = (s) => `${e.apiPath}/notes/${s}`, o = (s) => s.data;
|
|
976
|
+
return {
|
|
977
|
+
list: () => e.http.get(a).then(o),
|
|
978
|
+
add: (s) => e.http.post(a, { body: s }).then(o),
|
|
979
|
+
save: (s, u) => e.http.put(r(s), { body: u }).then(o),
|
|
980
|
+
remove: (s) => e.http.delete(r(s)).then(() => {
|
|
981
|
+
})
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
915
985
|
__name: "Screen",
|
|
916
|
-
props: /* @__PURE__ */
|
|
986
|
+
props: /* @__PURE__ */ se({
|
|
917
987
|
name: {},
|
|
918
988
|
errors: { default: void 0 },
|
|
919
989
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -924,39 +994,39 @@ const Wt = { class: "wx-screen-host" }, Ot = /* @__PURE__ */ T({
|
|
|
924
994
|
modelValue: { default: () => ({}) },
|
|
925
995
|
modelModifiers: {}
|
|
926
996
|
}),
|
|
927
|
-
emits: /* @__PURE__ */
|
|
997
|
+
emits: /* @__PURE__ */ se(["loaded"], ["update:modelValue"]),
|
|
928
998
|
setup(e, { expose: t, emit: n }) {
|
|
929
|
-
const a = e,
|
|
930
|
-
async function
|
|
931
|
-
|
|
999
|
+
const a = e, r = n, o = he(e, "modelValue"), s = H(), u = N("webx-admin"), i = A(null), c = A(null);
|
|
1000
|
+
async function m() {
|
|
1001
|
+
i.value = null, c.value = null;
|
|
932
1002
|
try {
|
|
933
|
-
const l = await
|
|
934
|
-
|
|
1003
|
+
const l = await s.loadScreen(a.name);
|
|
1004
|
+
i.value = l, r("loaded", l);
|
|
935
1005
|
} catch (l) {
|
|
936
|
-
|
|
1006
|
+
c.value = l instanceof Error ? l.message : String(l);
|
|
937
1007
|
}
|
|
938
1008
|
}
|
|
939
|
-
return
|
|
940
|
-
|
|
941
|
-
}, { immediate: !0 }), t({ reload:
|
|
942
|
-
|
|
1009
|
+
return J([() => a.name, () => s.i18n.state.locale], () => {
|
|
1010
|
+
m();
|
|
1011
|
+
}, { immediate: !0 }), t({ reload: m }), (l, v) => (f(), x("div", jt, [
|
|
1012
|
+
c.value ? (f(), b(d(je), {
|
|
943
1013
|
key: 0,
|
|
944
1014
|
type: "danger",
|
|
945
|
-
title:
|
|
946
|
-
description:
|
|
947
|
-
}, null, 8, ["title", "description"])) :
|
|
1015
|
+
title: d(u)("shell.error-title"),
|
|
1016
|
+
description: c.value
|
|
1017
|
+
}, null, 8, ["title", "description"])) : i.value === null ? (f(), b(d(ge), {
|
|
948
1018
|
key: 1,
|
|
949
1019
|
rows: 4
|
|
950
|
-
})) : (
|
|
1020
|
+
})) : (f(), b(d(Qe), {
|
|
951
1021
|
key: 2,
|
|
952
|
-
modelValue:
|
|
953
|
-
"onUpdate:modelValue":
|
|
954
|
-
root:
|
|
955
|
-
patch:
|
|
956
|
-
types:
|
|
1022
|
+
modelValue: o.value,
|
|
1023
|
+
"onUpdate:modelValue": v[0] || (v[0] = (h) => o.value = h),
|
|
1024
|
+
root: i.value,
|
|
1025
|
+
patch: d(s).screenPatch(e.name),
|
|
1026
|
+
types: d(s).types,
|
|
957
1027
|
errors: e.errors,
|
|
958
|
-
translate:
|
|
959
|
-
can:
|
|
1028
|
+
translate: d(s).i18n.t,
|
|
1029
|
+
can: d(s).can,
|
|
960
1030
|
disabled: e.disabled,
|
|
961
1031
|
"label-position": e.labelPosition,
|
|
962
1032
|
"label-width": e.labelWidth,
|
|
@@ -964,10 +1034,10 @@ const Wt = { class: "wx-screen-host" }, Ot = /* @__PURE__ */ T({
|
|
|
964
1034
|
}, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
|
|
965
1035
|
]));
|
|
966
1036
|
}
|
|
967
|
-
}),
|
|
1037
|
+
}), Ht = {
|
|
968
1038
|
key: 0,
|
|
969
1039
|
class: "wx-dropdown__divider"
|
|
970
|
-
},
|
|
1040
|
+
}, Ot = /* @__PURE__ */ U({
|
|
971
1041
|
__name: "RowMenu",
|
|
972
1042
|
props: {
|
|
973
1043
|
actions: {},
|
|
@@ -975,46 +1045,47 @@ const Wt = { class: "wx-screen-host" }, Ot = /* @__PURE__ */ T({
|
|
|
975
1045
|
size: { default: "sm" }
|
|
976
1046
|
},
|
|
977
1047
|
setup(e) {
|
|
978
|
-
const t = e, n =
|
|
979
|
-
...t.actions.filter((
|
|
980
|
-
...t.actions.filter((
|
|
981
|
-
]), a =
|
|
982
|
-
const
|
|
983
|
-
return
|
|
1048
|
+
const t = e, n = S(() => [
|
|
1049
|
+
...t.actions.filter((r) => !r.danger),
|
|
1050
|
+
...t.actions.filter((r) => r.danger)
|
|
1051
|
+
]), a = S(() => {
|
|
1052
|
+
const r = n.value.find((o) => o.danger);
|
|
1053
|
+
return r && n.value[0] !== r ? r.key : null;
|
|
984
1054
|
});
|
|
985
|
-
return (
|
|
1055
|
+
return (r, o) => n.value.length > 0 ? (f(), b(d(He), {
|
|
986
1056
|
key: 0,
|
|
1057
|
+
class: "wx-row-menu",
|
|
987
1058
|
collapse: "always",
|
|
988
1059
|
align: "end",
|
|
989
1060
|
size: e.size,
|
|
990
1061
|
"aria-label": e.label,
|
|
991
|
-
onClick:
|
|
1062
|
+
onClick: o[0] || (o[0] = pe(() => {
|
|
992
1063
|
}, ["stop"]))
|
|
993
1064
|
}, {
|
|
994
|
-
collapsed:
|
|
995
|
-
(
|
|
996
|
-
key:
|
|
1065
|
+
collapsed: g(() => [
|
|
1066
|
+
(f(!0), x(R, null, j(n.value, (s) => (f(), x(R, {
|
|
1067
|
+
key: s.key
|
|
997
1068
|
}, [
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
icon:
|
|
1001
|
-
tone:
|
|
1002
|
-
href:
|
|
1003
|
-
target:
|
|
1004
|
-
disabled:
|
|
1005
|
-
onClick: (
|
|
1069
|
+
s.key === a.value ? (f(), x("hr", Ht)) : W("", !0),
|
|
1070
|
+
y(d(Oe), {
|
|
1071
|
+
icon: s.icon,
|
|
1072
|
+
tone: s.danger ? "danger" : "default",
|
|
1073
|
+
href: s.href,
|
|
1074
|
+
target: s.href ? s.target ?? "_blank" : void 0,
|
|
1075
|
+
disabled: s.disabled,
|
|
1076
|
+
onClick: (u) => s.run?.()
|
|
1006
1077
|
}, {
|
|
1007
|
-
default:
|
|
1008
|
-
|
|
1078
|
+
default: g(() => [
|
|
1079
|
+
C(E(s.label), 1)
|
|
1009
1080
|
]),
|
|
1010
1081
|
_: 2
|
|
1011
1082
|
}, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
|
|
1012
1083
|
], 64))), 128))
|
|
1013
1084
|
]),
|
|
1014
1085
|
_: 1
|
|
1015
|
-
}, 8, ["size", "aria-label"])) :
|
|
1086
|
+
}, 8, ["size", "aria-label"])) : W("", !0);
|
|
1016
1087
|
}
|
|
1017
|
-
}),
|
|
1088
|
+
}), Ft = /* @__PURE__ */ B(Ot, [["__scopeId", "data-v-4a08eb39"]]), fn = /* @__PURE__ */ U({
|
|
1018
1089
|
__name: "BackButton",
|
|
1019
1090
|
props: {
|
|
1020
1091
|
to: {},
|
|
@@ -1022,18 +1093,18 @@ const Wt = { class: "wx-screen-host" }, Ot = /* @__PURE__ */ T({
|
|
|
1022
1093
|
size: { default: "sm" }
|
|
1023
1094
|
},
|
|
1024
1095
|
setup(e) {
|
|
1025
|
-
const t = e, n =
|
|
1026
|
-
return (
|
|
1096
|
+
const t = e, n = N("webx-admin"), a = S(() => t.label ?? n("editor.back"));
|
|
1097
|
+
return (r, o) => (f(), b(d(ue), {
|
|
1027
1098
|
icon: "arrow-left",
|
|
1028
1099
|
class: "wx-back-button",
|
|
1029
|
-
as:
|
|
1100
|
+
as: d(Ue),
|
|
1030
1101
|
to: e.to,
|
|
1031
1102
|
title: a.value,
|
|
1032
1103
|
size: e.size,
|
|
1033
1104
|
"tooltip-side": "bottom"
|
|
1034
1105
|
}, null, 8, ["as", "to", "title", "size"]));
|
|
1035
1106
|
}
|
|
1036
|
-
}),
|
|
1107
|
+
}), Kt = { class: "wx-rename__footer" }, qt = /* @__PURE__ */ U({
|
|
1037
1108
|
__name: "RenameButton",
|
|
1038
1109
|
props: {
|
|
1039
1110
|
name: { default: "" },
|
|
@@ -1044,57 +1115,57 @@ const Wt = { class: "wx-screen-host" }, Ot = /* @__PURE__ */ T({
|
|
|
1044
1115
|
},
|
|
1045
1116
|
emits: ["rename"],
|
|
1046
1117
|
setup(e, { emit: t }) {
|
|
1047
|
-
const n = e, a = t,
|
|
1048
|
-
|
|
1049
|
-
|
|
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"));
|
|
1119
|
+
J(o, async (m) => {
|
|
1120
|
+
m && (s.value = n.name, await Ee(), u.value?.focus(), u.value?.select());
|
|
1050
1121
|
});
|
|
1051
|
-
function
|
|
1052
|
-
const
|
|
1053
|
-
if (
|
|
1054
|
-
|
|
1122
|
+
function c() {
|
|
1123
|
+
const m = s.value.trim();
|
|
1124
|
+
if (m === "" || m === n.name) {
|
|
1125
|
+
o.value = !1;
|
|
1055
1126
|
return;
|
|
1056
1127
|
}
|
|
1057
|
-
a("rename",
|
|
1128
|
+
a("rename", m), o.value = !1;
|
|
1058
1129
|
}
|
|
1059
|
-
return (
|
|
1060
|
-
open:
|
|
1061
|
-
"onUpdate:open": l[2] || (l[2] = (
|
|
1062
|
-
title:
|
|
1130
|
+
return (m, l) => (f(), b(d(Fe), {
|
|
1131
|
+
open: o.value,
|
|
1132
|
+
"onUpdate:open": l[2] || (l[2] = (v) => o.value = v),
|
|
1133
|
+
title: i.value,
|
|
1063
1134
|
width: 320,
|
|
1064
1135
|
side: "bottom",
|
|
1065
1136
|
align: "start",
|
|
1066
1137
|
teleport: ""
|
|
1067
1138
|
}, {
|
|
1068
|
-
trigger:
|
|
1069
|
-
|
|
1139
|
+
trigger: g(() => [
|
|
1140
|
+
y(d(ue), {
|
|
1070
1141
|
type: "edit",
|
|
1071
|
-
title:
|
|
1142
|
+
title: i.value,
|
|
1072
1143
|
size: e.size,
|
|
1073
1144
|
disabled: e.disabled
|
|
1074
1145
|
}, null, 8, ["title", "size", "disabled"])
|
|
1075
1146
|
]),
|
|
1076
|
-
default:
|
|
1077
|
-
|
|
1147
|
+
default: g(() => [
|
|
1148
|
+
M("form", {
|
|
1078
1149
|
class: "wx-rename",
|
|
1079
|
-
onSubmit:
|
|
1150
|
+
onSubmit: pe(c, ["prevent"])
|
|
1080
1151
|
}, [
|
|
1081
|
-
|
|
1152
|
+
y(d(Ke), {
|
|
1082
1153
|
ref_key: "field",
|
|
1083
|
-
ref:
|
|
1084
|
-
modelValue:
|
|
1085
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1086
|
-
"aria-label":
|
|
1154
|
+
ref: u,
|
|
1155
|
+
modelValue: s.value,
|
|
1156
|
+
"onUpdate:modelValue": l[0] || (l[0] = (v) => s.value = v),
|
|
1157
|
+
"aria-label": i.value,
|
|
1087
1158
|
placeholder: e.placeholder,
|
|
1088
|
-
onKeydown: l[1] || (l[1] =
|
|
1159
|
+
onKeydown: l[1] || (l[1] = Ae((v) => o.value = !1, ["esc"]))
|
|
1089
1160
|
}, null, 8, ["modelValue", "aria-label", "placeholder"]),
|
|
1090
|
-
|
|
1091
|
-
|
|
1161
|
+
M("div", Kt, [
|
|
1162
|
+
y(d(X), {
|
|
1092
1163
|
type: "primary",
|
|
1093
1164
|
size: "sm",
|
|
1094
1165
|
"native-type": "submit"
|
|
1095
1166
|
}, {
|
|
1096
|
-
default:
|
|
1097
|
-
|
|
1167
|
+
default: g(() => [
|
|
1168
|
+
C(E(d(r)("editor.save")), 1)
|
|
1098
1169
|
]),
|
|
1099
1170
|
_: 1
|
|
1100
1171
|
})
|
|
@@ -1104,7 +1175,7 @@ const Wt = { class: "wx-screen-host" }, Ot = /* @__PURE__ */ T({
|
|
|
1104
1175
|
_: 1
|
|
1105
1176
|
}, 8, ["open", "title"]));
|
|
1106
1177
|
}
|
|
1107
|
-
}),
|
|
1178
|
+
}), vn = /* @__PURE__ */ B(qt, [["__scopeId", "data-v-d879e8d3"]]), Xt = ["innerHTML"], Yt = /* @__PURE__ */ U({
|
|
1108
1179
|
__name: "HelpButton",
|
|
1109
1180
|
props: {
|
|
1110
1181
|
body: {},
|
|
@@ -1114,33 +1185,33 @@ const Wt = { class: "wx-screen-host" }, Ot = /* @__PURE__ */ T({
|
|
|
1114
1185
|
width: { default: 720 }
|
|
1115
1186
|
},
|
|
1116
1187
|
setup(e) {
|
|
1117
|
-
const t = e, n =
|
|
1118
|
-
return (
|
|
1119
|
-
|
|
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, [
|
|
1190
|
+
y(d(ue), {
|
|
1120
1191
|
type: "details",
|
|
1121
1192
|
icon: "question",
|
|
1122
1193
|
tone: "neutral",
|
|
1123
1194
|
size: e.size,
|
|
1124
|
-
title: e.label ??
|
|
1125
|
-
onClick:
|
|
1195
|
+
title: e.label ?? r.value,
|
|
1196
|
+
onClick: u[0] || (u[0] = (i) => a.value = !0)
|
|
1126
1197
|
}, null, 8, ["size", "title"]),
|
|
1127
|
-
|
|
1198
|
+
y(d(qe), {
|
|
1128
1199
|
open: a.value,
|
|
1129
|
-
"onUpdate:open":
|
|
1130
|
-
title:
|
|
1200
|
+
"onUpdate:open": u[1] || (u[1] = (i) => a.value = i),
|
|
1201
|
+
title: r.value,
|
|
1131
1202
|
width: e.width
|
|
1132
1203
|
}, {
|
|
1133
|
-
default:
|
|
1134
|
-
|
|
1204
|
+
default: g(() => [
|
|
1205
|
+
M("div", {
|
|
1135
1206
|
class: "wx-help",
|
|
1136
|
-
innerHTML:
|
|
1137
|
-
}, null, 8,
|
|
1207
|
+
innerHTML: o.value
|
|
1208
|
+
}, null, 8, Xt)
|
|
1138
1209
|
]),
|
|
1139
1210
|
_: 1
|
|
1140
1211
|
}, 8, ["open", "title", "width"])
|
|
1141
1212
|
], 64));
|
|
1142
1213
|
}
|
|
1143
|
-
}),
|
|
1214
|
+
}), hn = /* @__PURE__ */ B(Yt, [["__scopeId", "data-v-6c280d42"]]), Gt = /* @__PURE__ */ U({
|
|
1144
1215
|
name: "WxDate",
|
|
1145
1216
|
__name: "DateText",
|
|
1146
1217
|
props: {
|
|
@@ -1149,66 +1220,266 @@ const Wt = { class: "wx-screen-host" }, Ot = /* @__PURE__ */ T({
|
|
|
1149
1220
|
tone: { default: "muted" }
|
|
1150
1221
|
},
|
|
1151
1222
|
setup(e) {
|
|
1152
|
-
const t = e, n =
|
|
1153
|
-
return (
|
|
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), {
|
|
1154
1225
|
key: 0,
|
|
1155
|
-
content:
|
|
1226
|
+
content: r.value
|
|
1156
1227
|
}, {
|
|
1157
|
-
default:
|
|
1158
|
-
|
|
1228
|
+
default: g(() => [
|
|
1229
|
+
y(d(Y), {
|
|
1159
1230
|
as: "time",
|
|
1160
|
-
datetime:
|
|
1231
|
+
datetime: o.value,
|
|
1161
1232
|
size: e.size,
|
|
1162
1233
|
tone: e.tone
|
|
1163
1234
|
}, {
|
|
1164
|
-
default:
|
|
1165
|
-
|
|
1235
|
+
default: g(() => [
|
|
1236
|
+
C(E(a.value), 1)
|
|
1166
1237
|
]),
|
|
1167
1238
|
_: 1
|
|
1168
1239
|
}, 8, ["datetime", "size", "tone"])
|
|
1169
1240
|
]),
|
|
1170
1241
|
_: 1
|
|
1171
|
-
}, 8, ["content"])) : (
|
|
1242
|
+
}, 8, ["content"])) : (f(), b(d(Y), {
|
|
1172
1243
|
key: 1,
|
|
1173
1244
|
size: e.size,
|
|
1174
1245
|
tone: e.tone
|
|
1175
1246
|
}, {
|
|
1176
|
-
default:
|
|
1177
|
-
|
|
1247
|
+
default: g(() => [
|
|
1248
|
+
C(E(a.value), 1)
|
|
1178
1249
|
]),
|
|
1179
1250
|
_: 1
|
|
1180
1251
|
}, 8, ["size", "tone"]));
|
|
1181
1252
|
}
|
|
1182
|
-
})
|
|
1253
|
+
}), Jt = { class: "wx-notes" }, Qt = {
|
|
1254
|
+
key: 3,
|
|
1255
|
+
class: "wx-notes__list"
|
|
1256
|
+
}, Zt = { class: "wx-note__body" }, en = { class: "wx-note__head" }, tn = { class: "wx-note__buttons" }, nn = {
|
|
1257
|
+
key: 1,
|
|
1258
|
+
class: "wx-note__text"
|
|
1259
|
+
}, an = {
|
|
1260
|
+
key: 4,
|
|
1261
|
+
class: "wx-notes__new"
|
|
1262
|
+
}, ln = /* @__PURE__ */ U({
|
|
1263
|
+
name: "WxNotes",
|
|
1264
|
+
__name: "NotesFeed",
|
|
1265
|
+
props: {
|
|
1266
|
+
type: {},
|
|
1267
|
+
id: {},
|
|
1268
|
+
can: { type: Boolean, default: !0 },
|
|
1269
|
+
title: { default: void 0 }
|
|
1270
|
+
},
|
|
1271
|
+
emits: ["change"],
|
|
1272
|
+
setup(e, { emit: t }) {
|
|
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"));
|
|
1274
|
+
async function p() {
|
|
1275
|
+
i.value = !0;
|
|
1276
|
+
try {
|
|
1277
|
+
u.value = await h.value.list();
|
|
1278
|
+
} catch (k) {
|
|
1279
|
+
I.danger(s(k));
|
|
1280
|
+
} finally {
|
|
1281
|
+
i.value = !1;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
J(
|
|
1285
|
+
() => [n.type, n.id],
|
|
1286
|
+
() => {
|
|
1287
|
+
l.value = null, c.value = "", p();
|
|
1288
|
+
},
|
|
1289
|
+
{ immediate: !0 }
|
|
1290
|
+
);
|
|
1291
|
+
async function _() {
|
|
1292
|
+
const k = c.value.trim();
|
|
1293
|
+
if (!(k === "" || m.value)) {
|
|
1294
|
+
m.value = !0;
|
|
1295
|
+
try {
|
|
1296
|
+
u.value = [...u.value, await h.value.add(k)], c.value = "", a("change");
|
|
1297
|
+
} catch (T) {
|
|
1298
|
+
I.danger(s(T));
|
|
1299
|
+
} finally {
|
|
1300
|
+
m.value = !1;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
function V(k) {
|
|
1305
|
+
l.value = k.id, v.value = k.body;
|
|
1306
|
+
}
|
|
1307
|
+
async function Z(k) {
|
|
1308
|
+
const T = v.value.trim();
|
|
1309
|
+
if (T !== "")
|
|
1310
|
+
try {
|
|
1311
|
+
const $ = await h.value.save(k.id, T);
|
|
1312
|
+
u.value = u.value.map((P) => P.id === $.id ? $ : P), l.value = null, I.success(o("notes.saved")), a("change");
|
|
1313
|
+
} catch ($) {
|
|
1314
|
+
I.danger(s($));
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
async function ee(k) {
|
|
1318
|
+
if (await Je({
|
|
1319
|
+
title: o("notes.delete-title"),
|
|
1320
|
+
message: o("notes.delete-text"),
|
|
1321
|
+
confirmText: o("notes.delete"),
|
|
1322
|
+
cancelText: o("notes.cancel"),
|
|
1323
|
+
tone: "danger"
|
|
1324
|
+
}))
|
|
1325
|
+
try {
|
|
1326
|
+
await h.value.remove(k.id), u.value = u.value.filter(($) => $.id !== k.id), I.success(o("notes.deleted")), a("change");
|
|
1327
|
+
} catch ($) {
|
|
1328
|
+
I.danger(s($));
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
function te(k) {
|
|
1332
|
+
return !n.can || !k.is_mine ? [] : [
|
|
1333
|
+
{ key: "edit", icon: "edit", label: o("notes.edit"), run: () => V(k) },
|
|
1334
|
+
{
|
|
1335
|
+
key: "delete",
|
|
1336
|
+
icon: "trash",
|
|
1337
|
+
label: o("notes.delete"),
|
|
1338
|
+
danger: !0,
|
|
1339
|
+
run: () => {
|
|
1340
|
+
ee(k);
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
];
|
|
1344
|
+
}
|
|
1345
|
+
function D(k) {
|
|
1346
|
+
return k.author?.name ?? o("notes.unknown-author");
|
|
1347
|
+
}
|
|
1348
|
+
return (k, T) => (f(), x("section", Jt, [
|
|
1349
|
+
w.value ? (f(), b(d(Y), {
|
|
1350
|
+
key: 0,
|
|
1351
|
+
weight: "medium",
|
|
1352
|
+
class: "wx-notes__title"
|
|
1353
|
+
}, {
|
|
1354
|
+
default: g(() => [
|
|
1355
|
+
C(E(w.value), 1)
|
|
1356
|
+
]),
|
|
1357
|
+
_: 1
|
|
1358
|
+
})) : W("", !0),
|
|
1359
|
+
i.value ? (f(), b(d(ge), {
|
|
1360
|
+
key: 1,
|
|
1361
|
+
rows: 2
|
|
1362
|
+
})) : u.value.length === 0 ? (f(), b(d(Ye), {
|
|
1363
|
+
key: 2,
|
|
1364
|
+
size: "sm",
|
|
1365
|
+
description: d(o)("notes.empty")
|
|
1366
|
+
}, null, 8, ["description"])) : (f(), x("ul", Qt, [
|
|
1367
|
+
(f(!0), x(R, null, j(u.value, ($) => (f(), x("li", {
|
|
1368
|
+
key: $.id,
|
|
1369
|
+
class: "wx-note"
|
|
1370
|
+
}, [
|
|
1371
|
+
y(d(Ge), {
|
|
1372
|
+
name: D($),
|
|
1373
|
+
size: "sm",
|
|
1374
|
+
tone: "auto"
|
|
1375
|
+
}, null, 8, ["name"]),
|
|
1376
|
+
M("div", Zt, [
|
|
1377
|
+
M("div", en, [
|
|
1378
|
+
y(d(Y), {
|
|
1379
|
+
size: "sm",
|
|
1380
|
+
weight: "medium",
|
|
1381
|
+
truncate: ""
|
|
1382
|
+
}, {
|
|
1383
|
+
default: g(() => [
|
|
1384
|
+
C(E(D($)), 1)
|
|
1385
|
+
]),
|
|
1386
|
+
_: 2
|
|
1387
|
+
}, 1024),
|
|
1388
|
+
y(Gt, {
|
|
1389
|
+
value: $.created_at
|
|
1390
|
+
}, null, 8, ["value"]),
|
|
1391
|
+
y(Ft, {
|
|
1392
|
+
actions: te($),
|
|
1393
|
+
label: D($)
|
|
1394
|
+
}, null, 8, ["actions", "label"])
|
|
1395
|
+
]),
|
|
1396
|
+
l.value === $.id ? (f(), x(R, { key: 0 }, [
|
|
1397
|
+
y(d(fe), {
|
|
1398
|
+
modelValue: v.value,
|
|
1399
|
+
"onUpdate:modelValue": T[0] || (T[0] = (P) => v.value = P),
|
|
1400
|
+
autosize: { minRows: 2, maxRows: 10 }
|
|
1401
|
+
}, null, 8, ["modelValue"]),
|
|
1402
|
+
M("div", tn, [
|
|
1403
|
+
y(d(X), {
|
|
1404
|
+
size: "sm",
|
|
1405
|
+
type: "primary",
|
|
1406
|
+
onClick: (P) => Z($)
|
|
1407
|
+
}, {
|
|
1408
|
+
default: g(() => [
|
|
1409
|
+
C(E(d(o)("notes.save")), 1)
|
|
1410
|
+
]),
|
|
1411
|
+
_: 1
|
|
1412
|
+
}, 8, ["onClick"]),
|
|
1413
|
+
y(d(X), {
|
|
1414
|
+
size: "sm",
|
|
1415
|
+
variant: "text",
|
|
1416
|
+
onClick: T[1] || (T[1] = (P) => l.value = null)
|
|
1417
|
+
}, {
|
|
1418
|
+
default: g(() => [
|
|
1419
|
+
C(E(d(o)("notes.cancel")), 1)
|
|
1420
|
+
]),
|
|
1421
|
+
_: 1
|
|
1422
|
+
})
|
|
1423
|
+
])
|
|
1424
|
+
], 64)) : (f(), x("p", nn, E($.body), 1))
|
|
1425
|
+
])
|
|
1426
|
+
]))), 128))
|
|
1427
|
+
])),
|
|
1428
|
+
e.can ? (f(), x("div", an, [
|
|
1429
|
+
y(d(fe), {
|
|
1430
|
+
modelValue: c.value,
|
|
1431
|
+
"onUpdate:modelValue": T[2] || (T[2] = ($) => c.value = $),
|
|
1432
|
+
placeholder: d(o)("notes.placeholder"),
|
|
1433
|
+
autosize: { minRows: 2, maxRows: 8 }
|
|
1434
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
1435
|
+
y(d(X), {
|
|
1436
|
+
size: "sm",
|
|
1437
|
+
type: "primary",
|
|
1438
|
+
disabled: c.value.trim() === "",
|
|
1439
|
+
loading: m.value,
|
|
1440
|
+
onClick: _
|
|
1441
|
+
}, {
|
|
1442
|
+
default: g(() => [
|
|
1443
|
+
C(E(d(o)("notes.add")), 1)
|
|
1444
|
+
]),
|
|
1445
|
+
_: 1
|
|
1446
|
+
}, 8, ["disabled", "loading"])
|
|
1447
|
+
])) : W("", !0)
|
|
1448
|
+
]));
|
|
1449
|
+
}
|
|
1450
|
+
}), pn = /* @__PURE__ */ B(ln, [["__scopeId", "data-v-71004c1a"]]);
|
|
1183
1451
|
export {
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1452
|
+
dt as AdminLanding,
|
|
1453
|
+
ct as AdminNav,
|
|
1454
|
+
bt as AdminShell,
|
|
1455
|
+
ie as HttpError,
|
|
1456
|
+
fn as WxBackButton,
|
|
1457
|
+
Gt as WxDate,
|
|
1458
|
+
hn as WxHelpButton,
|
|
1459
|
+
at as WxListScreen,
|
|
1460
|
+
pn as WxNotes,
|
|
1461
|
+
vn as WxRenameButton,
|
|
1192
1462
|
Ft as WxRowMenu,
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1463
|
+
mn as WxScreen,
|
|
1464
|
+
ye as adminKey,
|
|
1465
|
+
xe as adminMessages,
|
|
1466
|
+
lt as adminTypes,
|
|
1467
|
+
cn as createAdmin,
|
|
1468
|
+
st as createAdminContext,
|
|
1469
|
+
Ut as createDates,
|
|
1470
|
+
kt as createHttp,
|
|
1471
|
+
de as createI18n,
|
|
1472
|
+
Bt as createNotesApi,
|
|
1473
|
+
Pt as errorText,
|
|
1474
|
+
Q as i18nKey,
|
|
1475
|
+
ot as provideAdmin,
|
|
1476
|
+
rt as provideI18n,
|
|
1477
|
+
ve as readCookie,
|
|
1478
|
+
Wt as renderMarkdown,
|
|
1479
|
+
H as useAdmin,
|
|
1480
|
+
Rt as useDates,
|
|
1481
|
+
Vt as useErrorText,
|
|
1482
|
+
dn as useI18n,
|
|
1483
|
+
N as useTranslate
|
|
1213
1484
|
};
|
|
1214
1485
|
//# sourceMappingURL=index.js.map
|