@webx-ui/module-admin 0.8.0 → 0.11.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/AdminNav.d.ts +3 -0
- package/dist/BackButton.d.ts +1 -1
- package/dist/DateText.d.ts +6 -0
- package/dist/FilterChips.d.ts +18 -0
- package/dist/HelpButton.d.ts +2 -2
- package/dist/ListScreen.d.ts +29 -6
- package/dist/RenameButton.d.ts +5 -5
- package/dist/RichTextField.d.ts +2 -0
- package/dist/RowMenu.d.ts +1 -15
- package/dist/Screen.d.ts +1 -1
- package/dist/ScreenHead.d.ts +112 -0
- package/dist/admin.d.ts +6 -1
- package/dist/dates.d.ts +9 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1028 -771
- package/dist/index.js.map +1 -1
- package/dist/rowMenu.d.ts +13 -0
- package/dist/screenTypes.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +68 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,17 +1,275 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useRouter as we, useRoute as
|
|
3
|
-
import { WxHeading as
|
|
4
|
-
import { WxScreenRenderer as
|
|
5
|
-
const
|
|
1
|
+
import { inject as ee, reactive as se, defineComponent as U, computed as x, openBlock as v, createBlock as y, unref as r, withModifiers as pe, withCtx as b, createElementBlock as k, Fragment as B, renderList as N, createCommentVNode as W, createVNode as _, createTextVNode as z, toDisplayString as C, useSlots as Ce, useTemplateRef as Le, normalizeClass as j, renderSlot as L, createElementVNode as M, createSlots as be, useModel as ge, mergeModels as ie, mergeProps as ze, watch as te, resolveComponent as R, ref as E, watchEffect as We, onUnmounted as Ae, isRef as Re, createApp as Ee, h as X, nextTick as Ue, withKeys as Be } from "vue";
|
|
2
|
+
import { RouterLink as Ie, useRouter as we, useRoute as Me, createRouter as De, createWebHistory as Ne } from "vue-router";
|
|
3
|
+
import { WxAction as Y, WxActions as Pe, WxDropdownItem as Ve, useElementWidth as Fe, WxHeading as He, WxText as q, WxButton as O, WxIcon as Oe, WxTabs as je, WxCard as me, WxRichText as qe, WxResult as Ye, useResponsiveShell as Ke, shellLayoutFor as Xe, WxToaster as Ge, WebxUI as Je, dateLocaleKey as Qe, localesKey as Ze, WxAlert as et, WxSkeleton as ye, WxBadge as tt, WxPopover as nt, WxInput as at, WxDialog as lt, WxTooltip as ot, WxEmpty as st, WxAvatar as it, WxTextarea as fe, toast as F, confirm as rt } from "@webx-ui/core";
|
|
4
|
+
import { WxScreenRenderer as ut } from "@webx-ui/schema";
|
|
5
|
+
const ne = /* @__PURE__ */ Symbol("webx-i18n");
|
|
6
|
+
function Tn() {
|
|
7
|
+
const e = ee(ne, null);
|
|
8
|
+
if (e === null)
|
|
9
|
+
throw new Error("useI18n() was called outside a panel created by createAdmin().");
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
function I(e) {
|
|
13
|
+
const n = ee(ne, null);
|
|
14
|
+
return n === null ? de().scope(e) : n.scope(e);
|
|
15
|
+
}
|
|
16
|
+
function dt(e, n) {
|
|
17
|
+
e.provide(ne, n);
|
|
18
|
+
}
|
|
19
|
+
function de(e = {}) {
|
|
20
|
+
const n = e.fallback ?? "en", t = se({
|
|
21
|
+
locale: e.locale ?? n,
|
|
22
|
+
fallback: n,
|
|
23
|
+
panelLocales: [],
|
|
24
|
+
contentLocales: []
|
|
25
|
+
}), a = {}, u = se({ value: {} });
|
|
26
|
+
function o(s, i, m) {
|
|
27
|
+
let h = s[i]?.[m[0] ?? ""];
|
|
28
|
+
for (const f of m.slice(1)) {
|
|
29
|
+
if (typeof h != "object" || h === null)
|
|
30
|
+
return null;
|
|
31
|
+
h = h[f];
|
|
32
|
+
}
|
|
33
|
+
return typeof h == "string" ? h : null;
|
|
34
|
+
}
|
|
35
|
+
function l(s, i, m) {
|
|
36
|
+
const [h, f] = i.includes("::") ? i.split("::", 2) : [s, i], d = f.split("."), p = o(u.value, h, d) ?? o(a, h, d) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
|
|
37
|
+
// label says nothing to anybody trying to fix it.
|
|
38
|
+
i;
|
|
39
|
+
return m === void 0 ? p : ct(p, m);
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
state: t,
|
|
43
|
+
defaults(s, i) {
|
|
44
|
+
a[s] = { ...a[s], ...i };
|
|
45
|
+
},
|
|
46
|
+
load(s, i, m) {
|
|
47
|
+
u.value = s ?? {}, t.locale = i ?? t.locale, m !== void 0 && (t.fallback = m);
|
|
48
|
+
},
|
|
49
|
+
scope(s) {
|
|
50
|
+
return (i, m) => l(s, i, m);
|
|
51
|
+
},
|
|
52
|
+
t: (s, i) => l("", s, i)
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function ct(e, n) {
|
|
56
|
+
let t = e;
|
|
57
|
+
for (const [a, u] of Object.entries(n))
|
|
58
|
+
t = t.replaceAll(`:${a}`, String(u));
|
|
59
|
+
return t;
|
|
60
|
+
}
|
|
61
|
+
const mt = /* @__PURE__ */ U({
|
|
62
|
+
__name: "BackButton",
|
|
63
|
+
props: {
|
|
64
|
+
to: {},
|
|
65
|
+
label: { default: void 0 },
|
|
66
|
+
size: { default: "sm" }
|
|
67
|
+
},
|
|
68
|
+
setup(e) {
|
|
69
|
+
const n = e, t = I("webx-admin"), a = x(() => n.label ?? t("editor.back"));
|
|
70
|
+
return (u, o) => (v(), y(r(Y), {
|
|
71
|
+
icon: "arrow-left",
|
|
72
|
+
class: "wx-back-button",
|
|
73
|
+
as: r(Ie),
|
|
74
|
+
to: e.to,
|
|
75
|
+
title: a.value,
|
|
76
|
+
size: e.size,
|
|
77
|
+
"tooltip-side": "bottom"
|
|
78
|
+
}, null, 8, ["as", "to", "title", "size"]));
|
|
79
|
+
}
|
|
80
|
+
}), ft = {
|
|
6
81
|
key: 0,
|
|
7
|
-
class: "wx-
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
82
|
+
class: "wx-dropdown__divider"
|
|
83
|
+
}, ht = /* @__PURE__ */ U({
|
|
84
|
+
__name: "RowMenu",
|
|
85
|
+
props: {
|
|
86
|
+
actions: {},
|
|
87
|
+
label: { default: void 0 },
|
|
88
|
+
size: { default: "sm" }
|
|
89
|
+
},
|
|
90
|
+
setup(e) {
|
|
91
|
+
const n = I("webx-admin"), t = e, a = x(() => [
|
|
92
|
+
...t.actions.filter((o) => !o.danger),
|
|
93
|
+
...t.actions.filter((o) => o.danger)
|
|
94
|
+
]), u = x(() => {
|
|
95
|
+
const o = a.value.find((l) => l.danger);
|
|
96
|
+
return o && a.value[0] !== o ? o.key : null;
|
|
97
|
+
});
|
|
98
|
+
return (o, l) => a.value.length > 0 ? (v(), y(r(Pe), {
|
|
99
|
+
key: 0,
|
|
100
|
+
class: "wx-row-menu",
|
|
101
|
+
collapse: "always",
|
|
102
|
+
align: "end",
|
|
103
|
+
size: e.size,
|
|
104
|
+
"aria-label": e.label,
|
|
105
|
+
onClick: l[0] || (l[0] = pe(() => {
|
|
106
|
+
}, ["stop"]))
|
|
107
|
+
}, {
|
|
108
|
+
trigger: b(() => [
|
|
109
|
+
_(r(Y), {
|
|
110
|
+
type: "more",
|
|
111
|
+
size: e.size,
|
|
112
|
+
title: r(n)("editor.more")
|
|
113
|
+
}, null, 8, ["size", "title"])
|
|
114
|
+
]),
|
|
115
|
+
collapsed: b(() => [
|
|
116
|
+
(v(!0), k(B, null, N(a.value, (s) => (v(), k(B, {
|
|
117
|
+
key: s.key
|
|
118
|
+
}, [
|
|
119
|
+
s.key === u.value ? (v(), k("hr", ft)) : W("", !0),
|
|
120
|
+
_(r(Ve), {
|
|
121
|
+
icon: s.icon,
|
|
122
|
+
tone: s.danger ? "danger" : "default",
|
|
123
|
+
href: s.href,
|
|
124
|
+
target: s.href ? s.target ?? "_blank" : void 0,
|
|
125
|
+
disabled: s.disabled,
|
|
126
|
+
onClick: (i) => s.run?.()
|
|
127
|
+
}, {
|
|
128
|
+
default: b(() => [
|
|
129
|
+
z(C(s.label), 1)
|
|
130
|
+
]),
|
|
131
|
+
_: 2
|
|
132
|
+
}, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
|
|
133
|
+
], 64))), 128))
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
}, 8, ["size", "aria-label"])) : W("", !0);
|
|
137
|
+
}
|
|
138
|
+
}), P = (e, n) => {
|
|
139
|
+
const t = e.__vccOpts || e;
|
|
140
|
+
for (const [a, u] of n)
|
|
141
|
+
t[a] = u;
|
|
142
|
+
return t;
|
|
143
|
+
}, xe = /* @__PURE__ */ P(ht, [["__scopeId", "data-v-cab01f7f"]]), vt = ["data-level"], pt = {
|
|
144
|
+
key: 0,
|
|
145
|
+
class: "wx-screen-head__trail"
|
|
146
|
+
}, bt = { class: "wx-screen-head__name" }, gt = {
|
|
147
|
+
key: 4,
|
|
148
|
+
class: "wx-screen-head__actions"
|
|
149
|
+
}, wt = /* @__PURE__ */ U({
|
|
150
|
+
__name: "ScreenHead",
|
|
151
|
+
props: {
|
|
152
|
+
title: { default: void 0 },
|
|
153
|
+
subtitle: { default: void 0 },
|
|
154
|
+
back: { type: Boolean, default: void 0 },
|
|
155
|
+
backLabel: { default: void 0 },
|
|
156
|
+
level: { default: 2 },
|
|
157
|
+
actions: { default: void 0 },
|
|
158
|
+
collapseBelow: { default: 720 },
|
|
159
|
+
divider: { type: Boolean, default: !1 }
|
|
160
|
+
},
|
|
161
|
+
emits: ["back"],
|
|
162
|
+
setup(e, { emit: n }) {
|
|
163
|
+
const t = e, a = n, u = I("webx-admin"), o = Ce(), l = Le("root"), s = Fe(l), i = x(() => s.value > 0 && s.value < t.collapseBelow), m = x(() => t.actions ?? []), h = x(
|
|
164
|
+
() => m.value.find((c) => c.primary) ?? null
|
|
165
|
+
), f = x(() => i.value ? h.value ? [h.value] : [] : m.value.filter((c) => !c.menu && !c.danger)), d = x(() => i.value ? m.value.filter((c) => c !== h.value) : m.value.filter((c) => c.menu || c.danger)), p = x(
|
|
166
|
+
() => t.back && t.back !== !0 ? t.back : null
|
|
167
|
+
), g = x(
|
|
168
|
+
() => f.value.length > 0 || d.value.length > 0 || !!o.extra
|
|
169
|
+
);
|
|
170
|
+
return (c, w) => (v(), k("div", {
|
|
171
|
+
ref_key: "root",
|
|
172
|
+
ref: l,
|
|
173
|
+
class: j(["wx-screen-head", {
|
|
174
|
+
"is-narrow": i.value,
|
|
175
|
+
"has-button": f.value.length > 0,
|
|
176
|
+
"has-trail": !!c.$slots.trail,
|
|
177
|
+
"has-divider": e.divider
|
|
178
|
+
}]),
|
|
179
|
+
"data-level": e.level
|
|
180
|
+
}, [
|
|
181
|
+
c.$slots.trail ? (v(), k("div", pt, [
|
|
182
|
+
L(c.$slots, "trail", {}, void 0, !0)
|
|
183
|
+
])) : W("", !0),
|
|
184
|
+
p.value ? (v(), y(mt, {
|
|
185
|
+
key: 1,
|
|
186
|
+
class: "wx-screen-head__back",
|
|
187
|
+
to: p.value,
|
|
188
|
+
label: e.backLabel,
|
|
189
|
+
"tooltip-side": "bottom"
|
|
190
|
+
}, null, 8, ["to", "label"])) : e.back ? (v(), y(r(Y), {
|
|
191
|
+
key: 2,
|
|
192
|
+
class: "wx-screen-head__back",
|
|
193
|
+
icon: "arrow-left",
|
|
194
|
+
size: "sm",
|
|
195
|
+
"tooltip-side": "bottom",
|
|
196
|
+
title: e.backLabel ?? r(u)("editor.back"),
|
|
197
|
+
onClick: w[0] || (w[0] = ($) => a("back"))
|
|
198
|
+
}, null, 8, ["title"])) : W("", !0),
|
|
199
|
+
M("div", bt, [
|
|
200
|
+
e.title ? (v(), y(r(He), {
|
|
201
|
+
key: 0,
|
|
202
|
+
level: e.level,
|
|
203
|
+
truncate: "",
|
|
204
|
+
class: "wx-screen-head__title"
|
|
205
|
+
}, {
|
|
206
|
+
default: b(() => [
|
|
207
|
+
z(C(e.title), 1)
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["level"])) : W("", !0),
|
|
211
|
+
L(c.$slots, "title-after", {}, void 0, !0)
|
|
212
|
+
]),
|
|
213
|
+
e.subtitle || c.$slots.subtitle ? (v(), y(r(q), {
|
|
214
|
+
key: 3,
|
|
215
|
+
class: "wx-screen-head__subtitle",
|
|
216
|
+
size: "sm",
|
|
217
|
+
tone: "muted",
|
|
218
|
+
truncate: ""
|
|
219
|
+
}, {
|
|
220
|
+
default: b(() => [
|
|
221
|
+
L(c.$slots, "subtitle", {}, () => [
|
|
222
|
+
z(C(e.subtitle), 1)
|
|
223
|
+
], !0)
|
|
224
|
+
]),
|
|
225
|
+
_: 3
|
|
226
|
+
})) : W("", !0),
|
|
227
|
+
g.value ? (v(), k("div", gt, [
|
|
228
|
+
L(c.$slots, "extra", {}, void 0, !0),
|
|
229
|
+
(v(!0), k(B, null, N(f.value, ($) => (v(), y(r(O), {
|
|
230
|
+
key: $.key,
|
|
231
|
+
class: j(["wx-screen-head__button", { "is-primary": $.primary }]),
|
|
232
|
+
type: $.primary ? "primary" : "default",
|
|
233
|
+
variant: $.primary ? "solid" : $.variant ?? "outline",
|
|
234
|
+
loading: $.loading,
|
|
235
|
+
disabled: $.disabled,
|
|
236
|
+
href: $.href,
|
|
237
|
+
target: $.href ? $.target ?? "_blank" : void 0,
|
|
238
|
+
rel: $.href ? "noopener" : void 0,
|
|
239
|
+
onClick: (K) => $.run?.()
|
|
240
|
+
}, be({
|
|
241
|
+
default: b(() => [
|
|
242
|
+
z(" " + C($.label), 1)
|
|
243
|
+
]),
|
|
244
|
+
_: 2
|
|
245
|
+
}, [
|
|
246
|
+
$.icon ? {
|
|
247
|
+
name: "icon",
|
|
248
|
+
fn: b(() => [
|
|
249
|
+
_(r(Oe), {
|
|
250
|
+
name: $.icon
|
|
251
|
+
}, null, 8, ["name"])
|
|
252
|
+
]),
|
|
253
|
+
key: "0"
|
|
254
|
+
} : void 0
|
|
255
|
+
]), 1032, ["class", "type", "variant", "loading", "disabled", "href", "target", "rel", "onClick"]))), 128)),
|
|
256
|
+
d.value.length > 0 ? (v(), y(xe, {
|
|
257
|
+
key: 0,
|
|
258
|
+
actions: d.value,
|
|
259
|
+
size: "lg",
|
|
260
|
+
label: e.title ?? r(u)("editor.more")
|
|
261
|
+
}, null, 8, ["actions", "label"])) : W("", !0)
|
|
262
|
+
])) : W("", !0)
|
|
263
|
+
], 10, vt));
|
|
264
|
+
}
|
|
265
|
+
}), yt = /* @__PURE__ */ P(wt, [["__scopeId", "data-v-e27d184e"]]), xt = ["data-wx-fill"], kt = /* @__PURE__ */ U({
|
|
12
266
|
__name: "ListScreen",
|
|
13
|
-
props: /* @__PURE__ */
|
|
267
|
+
props: /* @__PURE__ */ ie({
|
|
14
268
|
title: { default: void 0 },
|
|
269
|
+
subtitle: { default: void 0 },
|
|
270
|
+
back: { default: void 0 },
|
|
271
|
+
backLabel: { default: void 0 },
|
|
272
|
+
actions: { default: void 0 },
|
|
15
273
|
views: { default: void 0 },
|
|
16
274
|
card: { type: Boolean, default: !0 },
|
|
17
275
|
padding: { default: void 0 },
|
|
@@ -23,388 +281,378 @@ const Ze = ["data-wx-fill"], et = {
|
|
|
23
281
|
}),
|
|
24
282
|
emits: ["update:view"],
|
|
25
283
|
setup(e) {
|
|
26
|
-
const
|
|
27
|
-
return (
|
|
28
|
-
class:
|
|
284
|
+
const n = ge(e, "view");
|
|
285
|
+
return (t, a) => (v(), k("div", {
|
|
286
|
+
class: j(["wx-list-screen", { "is-fill": e.fill }]),
|
|
29
287
|
"data-wx-fill": e.fill ? "" : void 0
|
|
30
288
|
}, [
|
|
31
|
-
e.title ||
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
289
|
+
e.title || e.actions || t.$slots.actions ? (v(), y(yt, {
|
|
290
|
+
key: 0,
|
|
291
|
+
class: "wx-list-screen__head",
|
|
292
|
+
title: e.title,
|
|
293
|
+
subtitle: e.subtitle,
|
|
294
|
+
back: e.back,
|
|
295
|
+
"back-label": e.backLabel,
|
|
296
|
+
actions: e.actions,
|
|
297
|
+
"collapse-below": 480
|
|
298
|
+
}, be({ _: 2 }, [
|
|
299
|
+
t.$slots.actions ? {
|
|
300
|
+
name: "extra",
|
|
301
|
+
fn: b(() => [
|
|
302
|
+
L(t.$slots, "actions", {}, void 0, !0)
|
|
39
303
|
]),
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
])) : W("", !0)
|
|
45
|
-
])) : W("", !0),
|
|
46
|
-
e.views && e.views.length > 0 ? (f(), b(d(Me), {
|
|
304
|
+
key: "0"
|
|
305
|
+
} : void 0
|
|
306
|
+
]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : W("", !0),
|
|
307
|
+
e.views && e.views.length > 0 ? (v(), y(r(je), {
|
|
47
308
|
key: 1,
|
|
48
|
-
modelValue:
|
|
49
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
309
|
+
modelValue: n.value,
|
|
310
|
+
"onUpdate:modelValue": a[0] || (a[0] = (u) => n.value = u),
|
|
50
311
|
class: "wx-list-screen__views",
|
|
51
312
|
items: e.views,
|
|
52
313
|
"collapse-below": e.collapseBelow,
|
|
53
314
|
"aria-label": e.title
|
|
54
315
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
e.card ? (
|
|
316
|
+
default: b(() => [
|
|
317
|
+
e.card ? (v(), y(r(me), {
|
|
57
318
|
key: 0,
|
|
58
319
|
class: "wx-list-screen__card",
|
|
59
320
|
padding: e.padding
|
|
60
321
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
L(
|
|
322
|
+
default: b(() => [
|
|
323
|
+
L(t.$slots, "default", {}, void 0, !0)
|
|
63
324
|
]),
|
|
64
325
|
_: 3
|
|
65
|
-
}, 8, ["padding"])) : L(
|
|
326
|
+
}, 8, ["padding"])) : L(t.$slots, "default", {}, void 0, !0, 1)
|
|
66
327
|
]),
|
|
67
328
|
_: 3
|
|
68
|
-
}, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (
|
|
69
|
-
e.card ? (
|
|
329
|
+
}, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (v(), k(B, { key: 2 }, [
|
|
330
|
+
e.card ? (v(), y(r(me), {
|
|
70
331
|
key: 0,
|
|
71
332
|
class: "wx-list-screen__card",
|
|
72
333
|
padding: e.padding
|
|
73
334
|
}, {
|
|
74
|
-
default:
|
|
75
|
-
L(
|
|
335
|
+
default: b(() => [
|
|
336
|
+
L(t.$slots, "default", {}, void 0, !0)
|
|
76
337
|
]),
|
|
77
338
|
_: 3
|
|
78
|
-
}, 8, ["padding"])) : L(
|
|
339
|
+
}, 8, ["padding"])) : L(t.$slots, "default", {}, void 0, !0, 1)
|
|
79
340
|
], 64))
|
|
80
|
-
], 10,
|
|
341
|
+
], 10, xt));
|
|
342
|
+
}
|
|
343
|
+
}), _t = /* @__PURE__ */ P(kt, [["__scopeId", "data-v-8c7e5ad1"]]), $t = /* @__PURE__ */ U({
|
|
344
|
+
name: "WxRichTextField",
|
|
345
|
+
inheritAttrs: !1,
|
|
346
|
+
__name: "RichTextField",
|
|
347
|
+
setup(e) {
|
|
348
|
+
const n = H(), t = I("webx-admin"), a = x(() => n.pickImage ?? void 0), u = x(() => ({
|
|
349
|
+
bold: t("rich-text.bold"),
|
|
350
|
+
italic: t("rich-text.italic"),
|
|
351
|
+
strike: t("rich-text.strike"),
|
|
352
|
+
code: t("rich-text.code"),
|
|
353
|
+
h2: t("rich-text.h2"),
|
|
354
|
+
h3: t("rich-text.h3"),
|
|
355
|
+
h4: t("rich-text.h4"),
|
|
356
|
+
bulletList: t("rich-text.bullet-list"),
|
|
357
|
+
orderedList: t("rich-text.ordered-list"),
|
|
358
|
+
blockquote: t("rich-text.blockquote"),
|
|
359
|
+
hr: t("rich-text.hr"),
|
|
360
|
+
link: t("rich-text.link"),
|
|
361
|
+
table: t("rich-text.table"),
|
|
362
|
+
image: t("rich-text.image"),
|
|
363
|
+
youtube: t("rich-text.youtube"),
|
|
364
|
+
undo: t("rich-text.undo"),
|
|
365
|
+
redo: t("rich-text.redo"),
|
|
366
|
+
addRowAfter: t("rich-text.row-below"),
|
|
367
|
+
addRowBefore: t("rich-text.row-above"),
|
|
368
|
+
addColumnAfter: t("rich-text.column-after"),
|
|
369
|
+
addColumnBefore: t("rich-text.column-before"),
|
|
370
|
+
deleteRow: t("rich-text.delete-row"),
|
|
371
|
+
deleteColumn: t("rich-text.delete-column"),
|
|
372
|
+
mergeOrSplit: t("rich-text.merge-cells"),
|
|
373
|
+
deleteTable: t("rich-text.delete-table"),
|
|
374
|
+
toolbar: t("rich-text.toolbar"),
|
|
375
|
+
linkAddress: t("rich-text.link-address"),
|
|
376
|
+
youtubeAddress: t("rich-text.youtube-address"),
|
|
377
|
+
apply: t("rich-text.apply"),
|
|
378
|
+
cancel: t("rich-text.cancel"),
|
|
379
|
+
uploading: t("rich-text.uploading")
|
|
380
|
+
}));
|
|
381
|
+
return (o, l) => (v(), y(r(qe), ze(o.$attrs, {
|
|
382
|
+
labels: u.value,
|
|
383
|
+
"pick-image": a.value
|
|
384
|
+
}), null, 16, ["labels", "pick-image"]));
|
|
81
385
|
}
|
|
82
|
-
}),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
"wx-list": { component: at, kind: "layout", labelProp: "title" }
|
|
89
|
-
}, ye = /* @__PURE__ */ Symbol("webx-admin");
|
|
386
|
+
}), Tt = {
|
|
387
|
+
"wx-list": { component: _t, kind: "layout", labelProp: "title" },
|
|
388
|
+
// Full width: an editor shares a row with nothing, and a form of two columns would give it
|
|
389
|
+
// half a line to write a page of text in.
|
|
390
|
+
"wx-rich-text": { component: $t, kind: "field", wide: !0 }
|
|
391
|
+
}, ke = /* @__PURE__ */ Symbol("webx-admin");
|
|
90
392
|
function H() {
|
|
91
|
-
const e =
|
|
393
|
+
const e = ee(ke, null);
|
|
92
394
|
if (e === null)
|
|
93
395
|
throw new Error("useAdmin() was called outside a panel created by createAdmin().");
|
|
94
396
|
return e;
|
|
95
397
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
398
|
+
function St(e) {
|
|
399
|
+
const n = se({
|
|
98
400
|
status: "loading",
|
|
99
401
|
manifest: null,
|
|
100
402
|
user: null,
|
|
101
403
|
error: null
|
|
102
|
-
}),
|
|
103
|
-
const
|
|
104
|
-
if (
|
|
404
|
+
}), t = x(() => {
|
|
405
|
+
const d = n.manifest;
|
|
406
|
+
if (d === null)
|
|
105
407
|
return [];
|
|
106
|
-
const
|
|
107
|
-
for (const
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
408
|
+
const p = [];
|
|
409
|
+
for (const g of d.modules) {
|
|
410
|
+
const c = e.modules.find(($) => $.id === g.id);
|
|
411
|
+
if (c === void 0)
|
|
110
412
|
continue;
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
id:
|
|
114
|
-
title:
|
|
115
|
-
icon:
|
|
116
|
-
path:
|
|
117
|
-
group:
|
|
413
|
+
const w = c.path ?? c.routes?.[0]?.path;
|
|
414
|
+
w !== void 0 && p.push({
|
|
415
|
+
id: g.id,
|
|
416
|
+
title: g.title,
|
|
417
|
+
icon: g.icon,
|
|
418
|
+
path: w,
|
|
419
|
+
group: g.group ?? null
|
|
118
420
|
});
|
|
119
421
|
}
|
|
120
|
-
return
|
|
121
|
-
}), a =
|
|
122
|
-
const
|
|
123
|
-
for (const
|
|
124
|
-
if (
|
|
125
|
-
const
|
|
126
|
-
|
|
422
|
+
return p;
|
|
423
|
+
}), a = x(() => {
|
|
424
|
+
const d = n.manifest?.groups ?? [], p = [], g = /* @__PURE__ */ new Map();
|
|
425
|
+
for (const c of t.value)
|
|
426
|
+
if (c.group !== null && d.some((w) => w.id === c.group)) {
|
|
427
|
+
const w = g.get(c.group) ?? [];
|
|
428
|
+
w.push(c), g.set(c.group, w);
|
|
127
429
|
} else
|
|
128
|
-
|
|
430
|
+
p.push(c);
|
|
129
431
|
return {
|
|
130
|
-
top:
|
|
131
|
-
groups:
|
|
132
|
-
id:
|
|
133
|
-
title:
|
|
134
|
-
|
|
432
|
+
top: p,
|
|
433
|
+
groups: d.filter((c) => g.has(c.id)).map((c) => ({
|
|
434
|
+
id: c.id,
|
|
435
|
+
title: c.title,
|
|
436
|
+
icon: c.icon ?? null,
|
|
437
|
+
entries: g.get(c.id) ?? []
|
|
135
438
|
}))
|
|
136
439
|
};
|
|
137
|
-
}),
|
|
138
|
-
for (const
|
|
139
|
-
Object.assign(
|
|
140
|
-
Object.assign(
|
|
141
|
-
const o = /* @__PURE__ */ new Map();
|
|
142
|
-
async function s(
|
|
143
|
-
const
|
|
144
|
-
let
|
|
145
|
-
return
|
|
146
|
-
throw
|
|
147
|
-
}),
|
|
440
|
+
}), u = { ...Tt };
|
|
441
|
+
for (const d of e.modules)
|
|
442
|
+
Object.assign(u, d.types);
|
|
443
|
+
Object.assign(u, e.types);
|
|
444
|
+
const o = e.modules.find((d) => d.pickImage !== void 0)?.pickImage, l = /* @__PURE__ */ new Map();
|
|
445
|
+
async function s(d) {
|
|
446
|
+
const p = `${e.i18n.state.locale}:${d}`;
|
|
447
|
+
let g = l.get(p);
|
|
448
|
+
return g === void 0 && (g = e.http.get(`${e.apiPath}/screens/${d}`).then((c) => c.data.root).catch((c) => {
|
|
449
|
+
throw l.delete(p), c;
|
|
450
|
+
}), l.set(p, g)), g;
|
|
148
451
|
}
|
|
149
|
-
let
|
|
150
|
-
async function
|
|
151
|
-
|
|
452
|
+
let i = null;
|
|
453
|
+
async function m() {
|
|
454
|
+
n.status = "loading", n.error = null;
|
|
152
455
|
try {
|
|
153
|
-
if (
|
|
154
|
-
|
|
456
|
+
if (i !== null && (n.user = await i(), n.user === null)) {
|
|
457
|
+
n.manifest = null, n.status = "unauthenticated";
|
|
155
458
|
return;
|
|
156
459
|
}
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
} catch (
|
|
160
|
-
if (
|
|
161
|
-
|
|
460
|
+
const d = await e.loadManifest();
|
|
461
|
+
n.manifest = d, e.i18n.state.contentLocales = d.locales ?? [], e.i18n.state.panelLocales = d.panelLocales ?? e.i18n.state.panelLocales, d.locale !== void 0 && d.locale !== e.i18n.state.locale && await f(d.locale), n.status = "ready";
|
|
462
|
+
} catch (d) {
|
|
463
|
+
if (Lt(d)) {
|
|
464
|
+
n.manifest = null, n.user = null, n.status = "unauthenticated";
|
|
162
465
|
return;
|
|
163
466
|
}
|
|
164
|
-
|
|
467
|
+
n.error = d instanceof Error ? d.message : String(d), n.status = "error";
|
|
165
468
|
}
|
|
166
469
|
}
|
|
167
|
-
async function
|
|
168
|
-
if (
|
|
470
|
+
async function h() {
|
|
471
|
+
if (n.manifest !== null)
|
|
169
472
|
try {
|
|
170
|
-
|
|
473
|
+
n.manifest = await e.loadManifest();
|
|
171
474
|
} catch {
|
|
172
475
|
}
|
|
173
476
|
}
|
|
174
|
-
async function
|
|
477
|
+
async function f(d) {
|
|
175
478
|
if (e.loadDictionary === void 0) {
|
|
176
|
-
e.i18n.state.locale =
|
|
479
|
+
e.i18n.state.locale = d;
|
|
177
480
|
return;
|
|
178
481
|
}
|
|
179
|
-
await e.loadDictionary(
|
|
482
|
+
await e.loadDictionary(d), await h();
|
|
180
483
|
}
|
|
181
484
|
return {
|
|
182
485
|
http: e.http,
|
|
183
486
|
basePath: e.basePath,
|
|
184
487
|
apiPath: e.apiPath,
|
|
185
|
-
state:
|
|
488
|
+
state: n,
|
|
186
489
|
i18n: e.i18n,
|
|
187
490
|
modules: e.modules,
|
|
188
|
-
nav:
|
|
491
|
+
nav: t,
|
|
189
492
|
groups: a,
|
|
190
|
-
types:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
493
|
+
types: u,
|
|
494
|
+
pickImage: o ?? null,
|
|
495
|
+
reload: m,
|
|
496
|
+
refreshManifest: h,
|
|
497
|
+
setLocale: f,
|
|
498
|
+
setUser(d) {
|
|
499
|
+
n.user = d;
|
|
196
500
|
},
|
|
197
|
-
useSessionLoader(
|
|
198
|
-
|
|
501
|
+
useSessionLoader(d) {
|
|
502
|
+
i = d;
|
|
199
503
|
},
|
|
200
|
-
can(
|
|
201
|
-
const
|
|
202
|
-
return
|
|
504
|
+
can(d) {
|
|
505
|
+
const p = n.user;
|
|
506
|
+
return p === null ? !1 : p.isSuper || p.permissions.includes(d);
|
|
203
507
|
},
|
|
204
508
|
loadScreen: s,
|
|
205
|
-
screenPatch(
|
|
206
|
-
return e.screens?.[
|
|
509
|
+
screenPatch(d) {
|
|
510
|
+
return e.screens?.[d] ?? [];
|
|
207
511
|
}
|
|
208
512
|
};
|
|
209
513
|
}
|
|
210
|
-
function
|
|
211
|
-
e.provide(
|
|
514
|
+
function Ct(e, n) {
|
|
515
|
+
e.provide(ke, n);
|
|
212
516
|
}
|
|
213
|
-
function
|
|
517
|
+
function Lt(e) {
|
|
214
518
|
return typeof e == "object" && e !== null && "status" in e && e.status === 401;
|
|
215
519
|
}
|
|
216
|
-
const
|
|
217
|
-
function dn() {
|
|
218
|
-
const e = G(Q, null);
|
|
219
|
-
if (e === null)
|
|
220
|
-
throw new Error("useI18n() was called outside a panel created by createAdmin().");
|
|
221
|
-
return e;
|
|
222
|
-
}
|
|
223
|
-
function N(e) {
|
|
224
|
-
const t = G(Q, null);
|
|
225
|
-
return t === null ? de().scope(e) : t.scope(e);
|
|
226
|
-
}
|
|
227
|
-
function rt(e, t) {
|
|
228
|
-
e.provide(Q, t);
|
|
229
|
-
}
|
|
230
|
-
function de(e = {}) {
|
|
231
|
-
const t = e.fallback ?? "en", n = oe({
|
|
232
|
-
locale: e.locale ?? t,
|
|
233
|
-
fallback: t,
|
|
234
|
-
panelLocales: [],
|
|
235
|
-
contentLocales: []
|
|
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
|
-
return null;
|
|
242
|
-
m = m[l];
|
|
243
|
-
}
|
|
244
|
-
return typeof m == "string" ? m : null;
|
|
245
|
-
}
|
|
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
|
-
// label says nothing to anybody trying to fix it.
|
|
249
|
-
i;
|
|
250
|
-
return c === void 0 ? h : ut(h, c);
|
|
251
|
-
}
|
|
252
|
-
return {
|
|
253
|
-
state: n,
|
|
254
|
-
defaults(u, i) {
|
|
255
|
-
a[u] = { ...a[u], ...i };
|
|
256
|
-
},
|
|
257
|
-
load(u, i, c) {
|
|
258
|
-
r.value = u ?? {}, n.locale = i ?? n.locale, c !== void 0 && (n.fallback = c);
|
|
259
|
-
},
|
|
260
|
-
scope(u) {
|
|
261
|
-
return (i, c) => s(u, i, c);
|
|
262
|
-
},
|
|
263
|
-
t: (u, i) => s("", u, i)
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
function ut(e, t) {
|
|
267
|
-
let n = e;
|
|
268
|
-
for (const [a, r] of Object.entries(t))
|
|
269
|
-
n = n.replaceAll(`:${a}`, String(r));
|
|
270
|
-
return n;
|
|
271
|
-
}
|
|
272
|
-
const dt = /* @__PURE__ */ U({
|
|
520
|
+
const zt = /* @__PURE__ */ U({
|
|
273
521
|
__name: "AdminLanding",
|
|
274
522
|
props: {
|
|
275
523
|
landing: { default: null }
|
|
276
524
|
},
|
|
277
525
|
setup(e) {
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
return
|
|
526
|
+
const n = e, t = H(), a = we(), u = I("webx-admin"), o = x(() => {
|
|
527
|
+
const l = t.nav.value;
|
|
528
|
+
return l.length === 0 ? null : ((n.landing === null ? void 0 : l.find((i) => i.path === n.landing)) ?? l[0])?.path ?? null;
|
|
281
529
|
});
|
|
282
|
-
return
|
|
530
|
+
return te(
|
|
283
531
|
o,
|
|
284
|
-
(
|
|
285
|
-
|
|
532
|
+
(l) => {
|
|
533
|
+
l !== null && a.replace(l);
|
|
286
534
|
},
|
|
287
535
|
{ immediate: !0 }
|
|
288
|
-
), (
|
|
536
|
+
), (l, s) => o.value === null && r(t).state.status === "ready" ? (v(), y(r(Ye), {
|
|
289
537
|
key: 0,
|
|
290
538
|
status: "info",
|
|
291
|
-
title:
|
|
292
|
-
description:
|
|
539
|
+
title: r(u)("shell.empty-title"),
|
|
540
|
+
description: r(u)("shell.empty-description")
|
|
293
541
|
}, null, 8, ["title", "description"])) : W("", !0);
|
|
294
542
|
}
|
|
295
|
-
}),
|
|
543
|
+
}), Wt = /* @__PURE__ */ U({
|
|
296
544
|
__name: "AdminNav",
|
|
297
545
|
props: {
|
|
298
546
|
collapsed: { type: Boolean }
|
|
299
547
|
},
|
|
300
548
|
emits: ["select"],
|
|
301
|
-
setup(e, { emit:
|
|
302
|
-
const
|
|
303
|
-
get: () => a.nav.value.find((
|
|
549
|
+
setup(e, { emit: n }) {
|
|
550
|
+
const t = n, a = H(), u = I("webx-admin"), o = we(), l = Me(), s = x({
|
|
551
|
+
get: () => a.nav.value.find((m) => l.path.startsWith(m.path))?.id ?? "",
|
|
304
552
|
set: (i) => {
|
|
305
|
-
const
|
|
306
|
-
|
|
553
|
+
const m = a.nav.value.find((h) => h.id === i);
|
|
554
|
+
m !== void 0 && o.push(m.path);
|
|
307
555
|
}
|
|
308
556
|
});
|
|
309
|
-
return (i,
|
|
310
|
-
const
|
|
311
|
-
return
|
|
312
|
-
modelValue:
|
|
313
|
-
"onUpdate:modelValue":
|
|
557
|
+
return (i, m) => {
|
|
558
|
+
const h = R("wx-menu-item"), f = R("wx-submenu"), d = R("wx-menu");
|
|
559
|
+
return v(), y(d, {
|
|
560
|
+
modelValue: s.value,
|
|
561
|
+
"onUpdate:modelValue": m[0] || (m[0] = (p) => s.value = p),
|
|
314
562
|
collapsed: e.collapsed,
|
|
315
|
-
label:
|
|
316
|
-
onSelect:
|
|
563
|
+
label: r(u)("nav.sections"),
|
|
564
|
+
onSelect: m[1] || (m[1] = (p) => t("select"))
|
|
317
565
|
}, {
|
|
318
|
-
default:
|
|
319
|
-
(
|
|
320
|
-
key:
|
|
321
|
-
value:
|
|
322
|
-
icon:
|
|
323
|
-
label:
|
|
566
|
+
default: b(() => [
|
|
567
|
+
(v(!0), k(B, null, N(r(a).groups.value.top, (p) => (v(), y(h, {
|
|
568
|
+
key: p.id,
|
|
569
|
+
value: p.id,
|
|
570
|
+
icon: p.icon ?? void 0,
|
|
571
|
+
label: p.title
|
|
324
572
|
}, null, 8, ["value", "icon", "label"]))), 128)),
|
|
325
|
-
(
|
|
326
|
-
key:
|
|
327
|
-
value: `group:${
|
|
328
|
-
title:
|
|
329
|
-
icon: "gear"
|
|
573
|
+
(v(!0), k(B, null, N(r(a).groups.value.groups, (p) => (v(), y(f, {
|
|
574
|
+
key: p.id,
|
|
575
|
+
value: `group:${p.id}`,
|
|
576
|
+
title: p.title,
|
|
577
|
+
icon: p.icon ?? "gear"
|
|
330
578
|
}, {
|
|
331
|
-
default:
|
|
332
|
-
(
|
|
333
|
-
key:
|
|
334
|
-
value:
|
|
335
|
-
icon:
|
|
336
|
-
label:
|
|
579
|
+
default: b(() => [
|
|
580
|
+
(v(!0), k(B, null, N(p.entries, (g) => (v(), y(h, {
|
|
581
|
+
key: g.id,
|
|
582
|
+
value: g.id,
|
|
583
|
+
icon: g.icon ?? void 0,
|
|
584
|
+
label: g.title
|
|
337
585
|
}, null, 8, ["value", "icon", "label"]))), 128))
|
|
338
586
|
]),
|
|
339
587
|
_: 2
|
|
340
|
-
}, 1032, ["value", "title"]))), 128))
|
|
588
|
+
}, 1032, ["value", "title", "icon"]))), 128))
|
|
341
589
|
]),
|
|
342
590
|
_: 1
|
|
343
591
|
}, 8, ["modelValue", "collapsed", "label"]);
|
|
344
592
|
};
|
|
345
593
|
}
|
|
346
|
-
}),
|
|
594
|
+
}), At = {
|
|
347
595
|
key: 0,
|
|
348
596
|
class: "wx-root wx-admin-plain"
|
|
349
|
-
},
|
|
597
|
+
}, Rt = {
|
|
350
598
|
key: 1,
|
|
351
599
|
class: "wx-root wx-admin-plain"
|
|
352
|
-
},
|
|
600
|
+
}, Et = {
|
|
353
601
|
key: 2,
|
|
354
602
|
class: "wx-root wx-admin-plain"
|
|
355
|
-
},
|
|
603
|
+
}, Ut = ["src", "alt", "width", "height"], Bt = ["src", "alt", "width", "height"], It = ["src", "alt"], Mt = { class: "wx-admin__user" }, Dt = { class: "wx-admin__user wx-admin__user--drawer" }, Nt = /* @__PURE__ */ U({
|
|
356
604
|
__name: "AdminShell",
|
|
357
605
|
setup(e) {
|
|
358
|
-
const
|
|
606
|
+
const n = H(), t = I("webx-admin"), a = E(null), { width: u, layout: o, collapsed: l, showAside: s, drawerOpen: i, toggle: m, close: h } = Ke(
|
|
359
607
|
a,
|
|
360
608
|
{ persist: "webx-admin-shell" }
|
|
361
|
-
),
|
|
362
|
-
return
|
|
363
|
-
typeof document > "u" || (document.documentElement.dataset.wxShell =
|
|
364
|
-
}),
|
|
609
|
+
), f = x(() => n.state.manifest?.title ?? ""), d = x(() => n.state.manifest?.branding?.logo ?? null), p = x(() => n.state.manifest?.branding?.mark ?? null), g = x(() => Xe(u.value, null));
|
|
610
|
+
return We(() => {
|
|
611
|
+
typeof document > "u" || (document.documentElement.dataset.wxShell = g.value);
|
|
612
|
+
}), Ae(() => {
|
|
365
613
|
typeof document < "u" && delete document.documentElement.dataset.wxShell;
|
|
366
|
-
}), (
|
|
367
|
-
const
|
|
368
|
-
return
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
])) :
|
|
373
|
-
|
|
374
|
-
label:
|
|
614
|
+
}), (c, w) => {
|
|
615
|
+
const $ = R("router-view"), K = R("wx-loading"), ae = R("wx-button"), le = R("wx-result"), V = R("wx-action"), T = R("wx-text"), A = R("wx-header"), S = R("wx-aside"), D = R("wx-main"), Te = R("wx-container"), Se = R("wx-drawer");
|
|
616
|
+
return v(), k(B, null, [
|
|
617
|
+
_(r(Ge)),
|
|
618
|
+
r(n).state.status === "unauthenticated" ? (v(), k("div", At, [
|
|
619
|
+
_($)
|
|
620
|
+
])) : r(n).state.status === "loading" ? (v(), k("div", Rt, [
|
|
621
|
+
_(K, {
|
|
622
|
+
label: r(t)("shell.loading")
|
|
375
623
|
}, null, 8, ["label"])
|
|
376
|
-
])) :
|
|
377
|
-
|
|
624
|
+
])) : r(n).state.status === "error" ? (v(), k("div", Et, [
|
|
625
|
+
_(le, {
|
|
378
626
|
status: "error",
|
|
379
|
-
title:
|
|
380
|
-
description:
|
|
627
|
+
title: r(t)("shell.error-title"),
|
|
628
|
+
description: r(n).state.error
|
|
381
629
|
}, {
|
|
382
|
-
default:
|
|
383
|
-
|
|
630
|
+
default: b(() => [
|
|
631
|
+
_(ae, {
|
|
384
632
|
type: "primary",
|
|
385
|
-
onClick:
|
|
633
|
+
onClick: w[0] || (w[0] = (ce) => r(n).reload())
|
|
386
634
|
}, {
|
|
387
|
-
default:
|
|
388
|
-
C(
|
|
635
|
+
default: b(() => [
|
|
636
|
+
z(C(r(t)("shell.retry")), 1)
|
|
389
637
|
]),
|
|
390
638
|
_: 1
|
|
391
639
|
})
|
|
392
640
|
]),
|
|
393
641
|
_: 1
|
|
394
642
|
}, 8, ["title", "description"])
|
|
395
|
-
])) : (
|
|
643
|
+
])) : (v(), k("div", {
|
|
396
644
|
key: 3,
|
|
397
645
|
ref_key: "shellEl",
|
|
398
646
|
ref: a,
|
|
399
|
-
class:
|
|
647
|
+
class: j(["wx-root wx-admin", `wx-admin--${g.value}`])
|
|
400
648
|
}, [
|
|
401
|
-
|
|
402
|
-
direction:
|
|
649
|
+
_(Te, {
|
|
650
|
+
direction: r(o) === "drawer" ? "vertical" : "horizontal",
|
|
403
651
|
"full-height": "",
|
|
404
652
|
class: "wx-admin__frame"
|
|
405
653
|
}, {
|
|
406
|
-
default:
|
|
407
|
-
|
|
654
|
+
default: b(() => [
|
|
655
|
+
r(o) === "drawer" ? (v(), y(A, {
|
|
408
656
|
key: 0,
|
|
409
657
|
class: "wx-admin__header",
|
|
410
658
|
floating: "",
|
|
@@ -413,30 +661,30 @@ const dt = /* @__PURE__ */ U({
|
|
|
413
661
|
padding: "sm",
|
|
414
662
|
height: "var(--wx-admin-header-height)"
|
|
415
663
|
}, {
|
|
416
|
-
end:
|
|
417
|
-
L(
|
|
664
|
+
end: b(() => [
|
|
665
|
+
L(c.$slots, "user", { expanded: !1 }, void 0, !0)
|
|
418
666
|
]),
|
|
419
|
-
default:
|
|
420
|
-
|
|
667
|
+
default: b(() => [
|
|
668
|
+
_(V, {
|
|
421
669
|
icon: "menu",
|
|
422
|
-
title:
|
|
423
|
-
onClick:
|
|
670
|
+
title: r(t)("nav.menu"),
|
|
671
|
+
onClick: r(m)
|
|
424
672
|
}, null, 8, ["title", "onClick"]),
|
|
425
|
-
L(
|
|
426
|
-
|
|
673
|
+
L(c.$slots, "brand", {}, () => [
|
|
674
|
+
d.value ? (v(), k("img", {
|
|
427
675
|
key: 0,
|
|
428
676
|
class: "wx-admin__logo",
|
|
429
|
-
src:
|
|
430
|
-
alt:
|
|
431
|
-
width:
|
|
432
|
-
height:
|
|
433
|
-
}, null, 8,
|
|
677
|
+
src: d.value.url,
|
|
678
|
+
alt: f.value,
|
|
679
|
+
width: d.value.width ?? void 0,
|
|
680
|
+
height: d.value.height ?? void 0
|
|
681
|
+
}, null, 8, Ut)) : (v(), y(T, {
|
|
434
682
|
key: 1,
|
|
435
683
|
weight: "semibold",
|
|
436
684
|
truncate: ""
|
|
437
685
|
}, {
|
|
438
|
-
default:
|
|
439
|
-
C(
|
|
686
|
+
default: b(() => [
|
|
687
|
+
z(C(f.value), 1)
|
|
440
688
|
]),
|
|
441
689
|
_: 1
|
|
442
690
|
}))
|
|
@@ -444,96 +692,96 @@ const dt = /* @__PURE__ */ U({
|
|
|
444
692
|
]),
|
|
445
693
|
_: 3
|
|
446
694
|
})) : W("", !0),
|
|
447
|
-
|
|
695
|
+
r(s) ? (v(), y(S, {
|
|
448
696
|
key: 1,
|
|
449
697
|
class: "wx-admin__aside",
|
|
450
698
|
sticky: "",
|
|
451
699
|
floating: "",
|
|
452
700
|
scroll: "",
|
|
453
701
|
bordered: !1,
|
|
454
|
-
collapsed:
|
|
702
|
+
collapsed: r(l),
|
|
455
703
|
width: 220,
|
|
456
704
|
"collapsed-width": 56
|
|
457
705
|
}, {
|
|
458
|
-
top:
|
|
706
|
+
top: b(() => [
|
|
459
707
|
M("div", {
|
|
460
|
-
class:
|
|
708
|
+
class: j(["wx-admin__brand", { "wx-admin__brand--stacked": r(l) && p.value }])
|
|
461
709
|
}, [
|
|
462
|
-
|
|
710
|
+
r(l) ? p.value ? (v(), k("img", {
|
|
463
711
|
key: 1,
|
|
464
712
|
class: "wx-admin__mark",
|
|
465
|
-
src:
|
|
466
|
-
alt:
|
|
467
|
-
}, null, 8,
|
|
468
|
-
|
|
713
|
+
src: p.value.url,
|
|
714
|
+
alt: f.value
|
|
715
|
+
}, null, 8, It)) : W("", !0) : L(c.$slots, "brand", {}, () => [
|
|
716
|
+
d.value ? (v(), k("img", {
|
|
469
717
|
key: 0,
|
|
470
718
|
class: "wx-admin__logo",
|
|
471
|
-
src:
|
|
472
|
-
alt:
|
|
473
|
-
width:
|
|
474
|
-
height:
|
|
475
|
-
}, null, 8,
|
|
719
|
+
src: d.value.url,
|
|
720
|
+
alt: f.value,
|
|
721
|
+
width: d.value.width ?? void 0,
|
|
722
|
+
height: d.value.height ?? void 0
|
|
723
|
+
}, null, 8, Bt)) : (v(), y(T, {
|
|
476
724
|
key: 1,
|
|
477
725
|
weight: "semibold",
|
|
478
726
|
truncate: "",
|
|
479
727
|
class: "wx-admin__title"
|
|
480
728
|
}, {
|
|
481
|
-
default:
|
|
482
|
-
C(
|
|
729
|
+
default: b(() => [
|
|
730
|
+
z(C(f.value), 1)
|
|
483
731
|
]),
|
|
484
732
|
_: 1
|
|
485
733
|
}))
|
|
486
734
|
], !0, 0),
|
|
487
|
-
|
|
735
|
+
_(V, {
|
|
488
736
|
icon: "sidebar",
|
|
489
|
-
title:
|
|
490
|
-
onClick:
|
|
737
|
+
title: r(l) ? r(t)("nav.expand") : r(t)("nav.collapse"),
|
|
738
|
+
onClick: r(m)
|
|
491
739
|
}, null, 8, ["title", "onClick"])
|
|
492
740
|
], 2)
|
|
493
741
|
]),
|
|
494
|
-
bottom:
|
|
495
|
-
M("div",
|
|
496
|
-
L(
|
|
497
|
-
expanded: !
|
|
742
|
+
bottom: b(() => [
|
|
743
|
+
M("div", Mt, [
|
|
744
|
+
L(c.$slots, "user", {
|
|
745
|
+
expanded: !r(l)
|
|
498
746
|
}, void 0, !0)
|
|
499
747
|
])
|
|
500
748
|
]),
|
|
501
|
-
default:
|
|
502
|
-
L(
|
|
749
|
+
default: b(() => [
|
|
750
|
+
L(c.$slots, "nav", { collapsed: r(l) }, void 0, !0)
|
|
503
751
|
]),
|
|
504
752
|
_: 3
|
|
505
753
|
}, 8, ["collapsed"])) : W("", !0),
|
|
506
|
-
|
|
754
|
+
_(D, {
|
|
507
755
|
padding: "none",
|
|
508
756
|
class: "wx-admin__screen"
|
|
509
757
|
}, {
|
|
510
|
-
default:
|
|
511
|
-
|
|
758
|
+
default: b(() => [
|
|
759
|
+
_($)
|
|
512
760
|
]),
|
|
513
761
|
_: 1
|
|
514
762
|
})
|
|
515
763
|
]),
|
|
516
764
|
_: 3
|
|
517
765
|
}, 8, ["direction"]),
|
|
518
|
-
|
|
519
|
-
open:
|
|
520
|
-
"onUpdate:open":
|
|
766
|
+
_(Se, {
|
|
767
|
+
open: r(i),
|
|
768
|
+
"onUpdate:open": w[1] || (w[1] = (ce) => Re(i) ? i.value = ce : null),
|
|
521
769
|
class: "wx-admin__drawer",
|
|
522
|
-
title:
|
|
770
|
+
title: f.value === "" ? r(t)("nav.menu") : f.value,
|
|
523
771
|
side: "left",
|
|
524
772
|
size: 260,
|
|
525
773
|
"full-screen": !1,
|
|
526
774
|
closable: ""
|
|
527
775
|
}, {
|
|
528
|
-
footer:
|
|
529
|
-
M("div",
|
|
530
|
-
L(
|
|
776
|
+
footer: b(() => [
|
|
777
|
+
M("div", Dt, [
|
|
778
|
+
L(c.$slots, "user", { expanded: !0 }, void 0, !0)
|
|
531
779
|
])
|
|
532
780
|
]),
|
|
533
|
-
default:
|
|
534
|
-
L(
|
|
781
|
+
default: b(() => [
|
|
782
|
+
L(c.$slots, "nav", {
|
|
535
783
|
collapsed: !1,
|
|
536
|
-
select:
|
|
784
|
+
select: r(h)
|
|
537
785
|
}, void 0, !0)
|
|
538
786
|
]),
|
|
539
787
|
_: 3
|
|
@@ -542,10 +790,10 @@ const dt = /* @__PURE__ */ U({
|
|
|
542
790
|
], 64);
|
|
543
791
|
};
|
|
544
792
|
}
|
|
545
|
-
}),
|
|
546
|
-
class
|
|
547
|
-
constructor(
|
|
548
|
-
super(
|
|
793
|
+
}), Pt = /* @__PURE__ */ P(Nt, [["__scopeId", "data-v-5baa6cbf"]]);
|
|
794
|
+
class re extends Error {
|
|
795
|
+
constructor(n, t, a = {}, u = null, o = null) {
|
|
796
|
+
super(n), this.status = t, this.errors = a, this.retryAfter = u, this.body = o, this.name = "HttpError";
|
|
549
797
|
}
|
|
550
798
|
status;
|
|
551
799
|
errors;
|
|
@@ -562,86 +810,86 @@ class ie extends Error {
|
|
|
562
810
|
return this.status === 429;
|
|
563
811
|
}
|
|
564
812
|
}
|
|
565
|
-
const
|
|
566
|
-
function
|
|
567
|
-
const
|
|
568
|
-
let
|
|
569
|
-
async function
|
|
570
|
-
|
|
813
|
+
const Vt = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
|
|
814
|
+
function Ft(e = {}) {
|
|
815
|
+
const n = (e.baseUrl ?? "").replace(/\/$/, ""), t = e.csrfUrl ?? "/sanctum/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis), u = e.onUnauthenticated, o = e.headers;
|
|
816
|
+
let l = !1;
|
|
817
|
+
async function s(m = !1) {
|
|
818
|
+
l && !m && he("XSRF-TOKEN") !== null || (await a(t, { credentials: "same-origin" }), l = !0);
|
|
571
819
|
}
|
|
572
|
-
async function i(
|
|
573
|
-
const
|
|
574
|
-
|
|
575
|
-
const
|
|
820
|
+
async function i(m, h, f, d = {}, p = !1) {
|
|
821
|
+
const g = Vt.has(m);
|
|
822
|
+
g && await s();
|
|
823
|
+
const c = {
|
|
576
824
|
Accept: "application/json",
|
|
577
825
|
"X-Requested-With": "XMLHttpRequest",
|
|
578
826
|
// Standing headers first, so a caller can still override one for a single request.
|
|
579
827
|
...o?.(),
|
|
580
|
-
...
|
|
828
|
+
...d.headers
|
|
581
829
|
};
|
|
582
|
-
if (
|
|
583
|
-
const
|
|
584
|
-
|
|
830
|
+
if (g) {
|
|
831
|
+
const $ = he("XSRF-TOKEN");
|
|
832
|
+
$ !== null && (c["X-XSRF-TOKEN"] = $);
|
|
585
833
|
}
|
|
586
|
-
|
|
587
|
-
const
|
|
588
|
-
method:
|
|
834
|
+
f !== void 0 && (c["Content-Type"] = "application/json");
|
|
835
|
+
const w = await a(Ot(n, h, d.query), {
|
|
836
|
+
method: m,
|
|
589
837
|
credentials: "same-origin",
|
|
590
|
-
headers:
|
|
591
|
-
signal:
|
|
592
|
-
body:
|
|
838
|
+
headers: c,
|
|
839
|
+
signal: d.signal,
|
|
840
|
+
body: f === void 0 ? void 0 : JSON.stringify(f)
|
|
593
841
|
});
|
|
594
|
-
if (
|
|
595
|
-
return await
|
|
596
|
-
if (
|
|
597
|
-
throw await
|
|
598
|
-
if (
|
|
599
|
-
return await
|
|
842
|
+
if (w.status === 419 && g && !p)
|
|
843
|
+
return await s(!0), i(m, h, f, d, !0);
|
|
844
|
+
if (w.status === 401 && u?.(), !w.ok)
|
|
845
|
+
throw await Ht(w);
|
|
846
|
+
if (w.status !== 204)
|
|
847
|
+
return await w.json();
|
|
600
848
|
}
|
|
601
849
|
return {
|
|
602
|
-
get: (
|
|
603
|
-
post: (
|
|
604
|
-
put: (
|
|
605
|
-
patch: (
|
|
606
|
-
delete: (
|
|
850
|
+
get: (m, h) => i("GET", m, void 0, h),
|
|
851
|
+
post: (m, h, f) => i("POST", m, h, f),
|
|
852
|
+
put: (m, h, f) => i("PUT", m, h, f),
|
|
853
|
+
patch: (m, h, f) => i("PATCH", m, h, f),
|
|
854
|
+
delete: (m, h) => i("DELETE", m, void 0, h)
|
|
607
855
|
};
|
|
608
856
|
}
|
|
609
|
-
async function
|
|
610
|
-
let
|
|
857
|
+
async function Ht(e) {
|
|
858
|
+
let n = null;
|
|
611
859
|
try {
|
|
612
|
-
|
|
860
|
+
n = await e.json();
|
|
613
861
|
} catch {
|
|
614
862
|
}
|
|
615
|
-
const
|
|
616
|
-
return new
|
|
863
|
+
const t = n ?? {}, a = typeof t.message == "string" && t.message !== "" ? t.message : e.statusText || `Request failed with ${e.status}`, u = t.errors !== null && typeof t.errors == "object" ? t.errors : {}, o = e.headers.get("Retry-After"), l = o === null ? null : Number.parseInt(o, 10);
|
|
864
|
+
return new re(
|
|
617
865
|
a,
|
|
618
866
|
e.status,
|
|
619
|
-
|
|
620
|
-
Number.isFinite(
|
|
621
|
-
|
|
867
|
+
u,
|
|
868
|
+
Number.isFinite(l) ? l : null,
|
|
869
|
+
n
|
|
622
870
|
);
|
|
623
871
|
}
|
|
624
|
-
function
|
|
625
|
-
const
|
|
626
|
-
if (
|
|
627
|
-
return
|
|
872
|
+
function Ot(e, n, t) {
|
|
873
|
+
const u = /^https?:\/\//i.test(n) ? n : `${e}/${n.replace(/^\//, "")}`;
|
|
874
|
+
if (t === void 0)
|
|
875
|
+
return u;
|
|
628
876
|
const o = new URLSearchParams();
|
|
629
|
-
for (const [
|
|
630
|
-
i != null && o.set(
|
|
631
|
-
const
|
|
632
|
-
return
|
|
877
|
+
for (const [s, i] of Object.entries(t))
|
|
878
|
+
i != null && o.set(s, String(i));
|
|
879
|
+
const l = o.toString();
|
|
880
|
+
return l === "" ? u : `${u}${u.includes("?") ? "&" : "?"}${l}`;
|
|
633
881
|
}
|
|
634
|
-
function
|
|
882
|
+
function he(e) {
|
|
635
883
|
if (typeof document > "u")
|
|
636
884
|
return null;
|
|
637
|
-
for (const
|
|
638
|
-
const [
|
|
639
|
-
if (
|
|
885
|
+
for (const n of document.cookie.split(";")) {
|
|
886
|
+
const [t, ...a] = n.trim().split("=");
|
|
887
|
+
if (t === e)
|
|
640
888
|
return decodeURIComponent(a.join("="));
|
|
641
889
|
}
|
|
642
890
|
return null;
|
|
643
891
|
}
|
|
644
|
-
const
|
|
892
|
+
const _e = {
|
|
645
893
|
shell: {
|
|
646
894
|
loading: "Loading the panel…",
|
|
647
895
|
"error-title": "The panel could not start",
|
|
@@ -662,6 +910,8 @@ const xe = {
|
|
|
662
910
|
// the way to rename it. A module that opens an editor should not be inventing these.
|
|
663
911
|
editor: {
|
|
664
912
|
back: "Back",
|
|
913
|
+
// The head's ··· on a screen that has no name to give the menu.
|
|
914
|
+
more: "More",
|
|
665
915
|
rename: "Rename",
|
|
666
916
|
save: "Save"
|
|
667
917
|
},
|
|
@@ -672,6 +922,13 @@ const xe = {
|
|
|
672
922
|
},
|
|
673
923
|
// When something happened, said the way a person would. The month names and the order of
|
|
674
924
|
// the parts come from `Intl` — only the words that no formatter knows are here.
|
|
925
|
+
// The two words every list needs the moment it has filters: what the funnel is called,
|
|
926
|
+
// and the way out of all of them at once. The names of the filters themselves belong to
|
|
927
|
+
// whatever is being filtered, and travel with that module's own words.
|
|
928
|
+
filters: {
|
|
929
|
+
title: "Filters",
|
|
930
|
+
reset: "Reset all"
|
|
931
|
+
},
|
|
675
932
|
dates: {
|
|
676
933
|
today: "today at :time",
|
|
677
934
|
yesterday: "yesterday at :time",
|
|
@@ -692,6 +949,41 @@ const xe = {
|
|
|
692
949
|
offline: "The server did not answer. Check the connection and try again.",
|
|
693
950
|
unknown: "That did not work."
|
|
694
951
|
},
|
|
952
|
+
// The toolbar of `wx-rich-text`. The editor is a component of the design system and carries
|
|
953
|
+
// English defaults; these are what the panel calls the same buttons.
|
|
954
|
+
"rich-text": {
|
|
955
|
+
bold: "Bold",
|
|
956
|
+
italic: "Italic",
|
|
957
|
+
strike: "Strikethrough",
|
|
958
|
+
code: "Inline code",
|
|
959
|
+
h2: "Heading 2",
|
|
960
|
+
h3: "Heading 3",
|
|
961
|
+
h4: "Heading 4",
|
|
962
|
+
"bullet-list": "Bulleted list",
|
|
963
|
+
"ordered-list": "Numbered list",
|
|
964
|
+
blockquote: "Quote",
|
|
965
|
+
hr: "Divider",
|
|
966
|
+
link: "Link",
|
|
967
|
+
table: "Table",
|
|
968
|
+
image: "Image",
|
|
969
|
+
youtube: "YouTube video",
|
|
970
|
+
undo: "Undo",
|
|
971
|
+
redo: "Redo",
|
|
972
|
+
"row-below": "Row below",
|
|
973
|
+
"row-above": "Row above",
|
|
974
|
+
"column-after": "Column after",
|
|
975
|
+
"column-before": "Column before",
|
|
976
|
+
"delete-row": "Delete row",
|
|
977
|
+
"delete-column": "Delete column",
|
|
978
|
+
"merge-cells": "Merge or split cells",
|
|
979
|
+
"delete-table": "Delete table",
|
|
980
|
+
toolbar: "Text formatting",
|
|
981
|
+
"link-address": "Link address",
|
|
982
|
+
"youtube-address": "YouTube URL",
|
|
983
|
+
apply: "Apply",
|
|
984
|
+
cancel: "Cancel",
|
|
985
|
+
uploading: "Uploading…"
|
|
986
|
+
},
|
|
695
987
|
// What one administrator writes on a record for the next one. Not the property of any
|
|
696
988
|
// section: the same feed hangs off a submission, an order and a client, so the words are
|
|
697
989
|
// the panel's own.
|
|
@@ -715,197 +1007,200 @@ const xe = {
|
|
|
715
1007
|
forbidden: "You may not read the notes of this record.",
|
|
716
1008
|
"not-yours": "A note is edited by whoever wrote it."
|
|
717
1009
|
}
|
|
718
|
-
},
|
|
719
|
-
function
|
|
720
|
-
const
|
|
721
|
-
for (const
|
|
722
|
-
o.push(...
|
|
723
|
-
if (!o.some((
|
|
724
|
-
const
|
|
1010
|
+
}, $e = "webx.locale";
|
|
1011
|
+
function Sn(e = {}) {
|
|
1012
|
+
const n = e.manifestUrl ?? Gt() ?? "/api/cms/manifest", t = e.apiPath ?? n.replace(/\/manifest\/?$/, ""), a = e.basePath ?? "/cms", u = e.modules ?? [], o = [...e.routes ?? []];
|
|
1013
|
+
for (const c of u)
|
|
1014
|
+
o.push(...c.routes ?? []);
|
|
1015
|
+
if (!o.some((c) => c.path === "/")) {
|
|
1016
|
+
const c = u.find((w) => w.landing === !0);
|
|
725
1017
|
o.push({
|
|
726
1018
|
path: "/",
|
|
727
1019
|
name: "webx.home",
|
|
728
|
-
component:
|
|
729
|
-
props: { landing:
|
|
1020
|
+
component: zt,
|
|
1021
|
+
props: { landing: c?.path ?? c?.routes?.[0]?.path ?? null }
|
|
730
1022
|
});
|
|
731
1023
|
}
|
|
732
|
-
const
|
|
733
|
-
history:
|
|
1024
|
+
const l = De({
|
|
1025
|
+
history: Ne(a),
|
|
734
1026
|
routes: o
|
|
735
|
-
}),
|
|
1027
|
+
}), s = de({ locale: e.locale ?? qt() }), i = e.http ?? Ft({
|
|
736
1028
|
baseUrl: "",
|
|
737
1029
|
onUnauthenticated: () => {
|
|
738
|
-
|
|
1030
|
+
h.setUser(null), h.state.status = "unauthenticated";
|
|
739
1031
|
},
|
|
740
1032
|
// Every request says which language the panel is currently showing. It decides what
|
|
741
1033
|
// the server writes its own messages in — a 422 under a field — for anybody who has
|
|
742
1034
|
// not stored a preference yet, which is everybody until they choose one. Without it,
|
|
743
1035
|
// signing in on a Russian sign-in screen lands in an English panel.
|
|
744
|
-
headers: () => ({ "X-Webx-Locale":
|
|
1036
|
+
headers: () => ({ "X-Webx-Locale": s.state.locale })
|
|
745
1037
|
});
|
|
746
|
-
|
|
747
|
-
async function c
|
|
748
|
-
const
|
|
749
|
-
|
|
1038
|
+
s.defaults("webx-admin", _e);
|
|
1039
|
+
async function m(c) {
|
|
1040
|
+
const w = await i.get(`${t}/translations/${c}`);
|
|
1041
|
+
s.load(w.data.namespaces, w.data.locale, w.data.fallback), Yt(w.data.locale), Xt(w.data.locale, s.state.panelLocales);
|
|
750
1042
|
}
|
|
751
|
-
const
|
|
1043
|
+
const h = St({
|
|
752
1044
|
http: i,
|
|
753
1045
|
basePath: a,
|
|
754
|
-
apiPath:
|
|
755
|
-
modules:
|
|
756
|
-
i18n:
|
|
757
|
-
loadDictionary:
|
|
1046
|
+
apiPath: t,
|
|
1047
|
+
modules: u,
|
|
1048
|
+
i18n: s,
|
|
1049
|
+
loadDictionary: m,
|
|
758
1050
|
types: e.types,
|
|
759
1051
|
screens: e.screens,
|
|
760
|
-
loadManifest: async () => (await i.get(
|
|
761
|
-
}),
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
1052
|
+
loadManifest: async () => (await i.get(n)).data
|
|
1053
|
+
}), f = Ee(jt(e));
|
|
1054
|
+
f.use(Je), Ct(f, h), dt(f, s);
|
|
1055
|
+
const d = E("");
|
|
1056
|
+
f.provide(
|
|
1057
|
+
Qe,
|
|
1058
|
+
x(() => s.state.locale)
|
|
1059
|
+
), f.provide(Ze, {
|
|
1060
|
+
list: x(
|
|
1061
|
+
() => s.state.contentLocales.map((c) => ({
|
|
1062
|
+
code: c.code,
|
|
1063
|
+
label: c.code.toUpperCase()
|
|
769
1064
|
}))
|
|
770
1065
|
),
|
|
771
|
-
active:
|
|
772
|
-
get: () =>
|
|
773
|
-
set: (
|
|
774
|
-
|
|
1066
|
+
active: x({
|
|
1067
|
+
get: () => d.value || (s.state.contentLocales[0]?.code ?? ""),
|
|
1068
|
+
set: (c) => {
|
|
1069
|
+
d.value = c;
|
|
775
1070
|
}
|
|
776
1071
|
})
|
|
777
1072
|
});
|
|
778
|
-
const
|
|
779
|
-
app:
|
|
780
|
-
router:
|
|
781
|
-
context:
|
|
782
|
-
i18n:
|
|
1073
|
+
const p = {
|
|
1074
|
+
app: f,
|
|
1075
|
+
router: l,
|
|
1076
|
+
context: h,
|
|
1077
|
+
i18n: s,
|
|
783
1078
|
async mount() {
|
|
784
|
-
await Promise.all([
|
|
785
|
-
}),
|
|
1079
|
+
await Promise.all([g(), m(s.state.locale)]).catch(() => {
|
|
1080
|
+
}), f.mount(e.el ?? "#webx-app"), await h.reload();
|
|
786
1081
|
}
|
|
787
1082
|
};
|
|
788
|
-
async function
|
|
789
|
-
const
|
|
790
|
-
|
|
1083
|
+
async function g() {
|
|
1084
|
+
const c = await i.get(`${t}/locales`);
|
|
1085
|
+
s.state.panelLocales = c.data.panel, s.state.contentLocales = c.data.content;
|
|
791
1086
|
}
|
|
792
|
-
for (const
|
|
793
|
-
|
|
794
|
-
return
|
|
1087
|
+
for (const c of e.plugins ?? [])
|
|
1088
|
+
c.install(p);
|
|
1089
|
+
return f.use(l), p;
|
|
795
1090
|
}
|
|
796
|
-
function
|
|
797
|
-
const
|
|
1091
|
+
function jt(e) {
|
|
1092
|
+
const n = {
|
|
798
1093
|
// The menu is the panel's own: it is the manifest, drawn.
|
|
799
1094
|
// The shell hands in what a choice means where it drew the menu — in the drawer it is what
|
|
800
1095
|
// closes it, and a drawer that stays open over the section it just opened is a drawer the
|
|
801
1096
|
// reader has to dismiss by hand.
|
|
802
|
-
nav: (
|
|
1097
|
+
nav: (t) => X(Wt, { collapsed: t.collapsed === !0, onSelect: t.select })
|
|
803
1098
|
};
|
|
804
|
-
return e.brand !== void 0 && (
|
|
1099
|
+
return e.brand !== void 0 && (n.brand = () => X(e.brand)), e.userMenu !== void 0 && (n.user = (t) => X(e.userMenu, { expanded: t.expanded === !0 })), { render: () => X(Pt, null, n) };
|
|
805
1100
|
}
|
|
806
|
-
function
|
|
807
|
-
const e =
|
|
1101
|
+
function qt() {
|
|
1102
|
+
const e = Kt($e);
|
|
808
1103
|
return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
|
|
809
1104
|
}
|
|
810
|
-
function
|
|
1105
|
+
function Yt(e) {
|
|
811
1106
|
try {
|
|
812
|
-
localStorage.setItem(
|
|
1107
|
+
localStorage.setItem($e, e);
|
|
813
1108
|
} catch {
|
|
814
1109
|
}
|
|
815
1110
|
}
|
|
816
|
-
function
|
|
1111
|
+
function Kt(e) {
|
|
817
1112
|
try {
|
|
818
1113
|
return localStorage.getItem(e);
|
|
819
1114
|
} catch {
|
|
820
1115
|
return null;
|
|
821
1116
|
}
|
|
822
1117
|
}
|
|
823
|
-
function
|
|
824
|
-
typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir =
|
|
1118
|
+
function Xt(e, n) {
|
|
1119
|
+
typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = n.find((t) => t.code === e)?.direction ?? "ltr");
|
|
825
1120
|
}
|
|
826
|
-
function
|
|
1121
|
+
function Gt() {
|
|
827
1122
|
return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
|
|
828
1123
|
}
|
|
829
|
-
function
|
|
830
|
-
const
|
|
1124
|
+
function Jt(e) {
|
|
1125
|
+
const n = e.replace(/\r\n?/g, `
|
|
831
1126
|
`).split(`
|
|
832
|
-
`),
|
|
1127
|
+
`), t = [];
|
|
833
1128
|
let a = 0;
|
|
834
|
-
for (; a <
|
|
835
|
-
const
|
|
836
|
-
if (
|
|
1129
|
+
for (; a < n.length; ) {
|
|
1130
|
+
const u = n[a] ?? "";
|
|
1131
|
+
if (u.trim() === "") {
|
|
837
1132
|
a += 1;
|
|
838
1133
|
continue;
|
|
839
1134
|
}
|
|
840
|
-
if (/^```([\w-]*)\s*$/.exec(
|
|
1135
|
+
if (/^```([\w-]*)\s*$/.exec(u)) {
|
|
841
1136
|
const i = [];
|
|
842
|
-
for (a += 1; a <
|
|
843
|
-
i.push(
|
|
844
|
-
a += 1,
|
|
1137
|
+
for (a += 1; a < n.length && !/^```\s*$/.test(n[a] ?? ""); )
|
|
1138
|
+
i.push(n[a] ?? ""), a += 1;
|
|
1139
|
+
a += 1, t.push(`<pre><code>${ue(i.join(`
|
|
845
1140
|
`))}</code></pre>`);
|
|
846
1141
|
continue;
|
|
847
1142
|
}
|
|
848
|
-
const
|
|
849
|
-
if (
|
|
850
|
-
const i = Math.min(
|
|
851
|
-
|
|
1143
|
+
const l = /^(#{1,4})\s+(.*)$/.exec(u);
|
|
1144
|
+
if (l) {
|
|
1145
|
+
const i = Math.min(l[1].length + 1, 5);
|
|
1146
|
+
t.push(`<h${i}>${oe(l[2] ?? "")}</h${i}>`), a += 1;
|
|
852
1147
|
continue;
|
|
853
1148
|
}
|
|
854
|
-
if (
|
|
855
|
-
const i = /^\s*\d+[.)]\s+/.test(
|
|
856
|
-
for (; a <
|
|
857
|
-
for (
|
|
858
|
-
const
|
|
859
|
-
if (
|
|
1149
|
+
if (J(u)) {
|
|
1150
|
+
const i = /^\s*\d+[.)]\s+/.test(u), m = [];
|
|
1151
|
+
for (; a < n.length && J(n[a] ?? ""); )
|
|
1152
|
+
for (m.push((n[a] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), a += 1; a < n.length; ) {
|
|
1153
|
+
const f = n[a] ?? "";
|
|
1154
|
+
if (f.trim() === "" || J(f) || /^(#{1,4})\s/.test(f) || /^```/.test(f))
|
|
860
1155
|
break;
|
|
861
|
-
|
|
1156
|
+
m[m.length - 1] += ` ${f.trim()}`, a += 1;
|
|
862
1157
|
}
|
|
863
|
-
const
|
|
864
|
-
|
|
1158
|
+
const h = i ? "ol" : "ul";
|
|
1159
|
+
t.push(`<${h}>${m.map((f) => `<li>${oe(f)}</li>`).join("")}</${h}>`);
|
|
865
1160
|
continue;
|
|
866
1161
|
}
|
|
867
|
-
const
|
|
868
|
-
for (; a <
|
|
869
|
-
const i =
|
|
870
|
-
if (i.trim() === "" ||
|
|
871
|
-
|
|
1162
|
+
const s = [];
|
|
1163
|
+
for (; a < n.length; ) {
|
|
1164
|
+
const i = n[a] ?? "";
|
|
1165
|
+
if (i.trim() === "" || J(i) || /^(#{1,4})\s/.test(i) || /^```/.test(i)) break;
|
|
1166
|
+
s.push(i.trim()), a += 1;
|
|
872
1167
|
}
|
|
873
|
-
|
|
1168
|
+
t.push(`<p>${oe(s.join(" "))}</p>`);
|
|
874
1169
|
}
|
|
875
|
-
return
|
|
1170
|
+
return t.join("");
|
|
876
1171
|
}
|
|
877
|
-
const
|
|
878
|
-
function
|
|
1172
|
+
const G = "\0";
|
|
1173
|
+
function J(e) {
|
|
879
1174
|
return /^\s*(?:[-*+]|\d+[.)])\s+/.test(e);
|
|
880
1175
|
}
|
|
881
|
-
function
|
|
882
|
-
const
|
|
883
|
-
return
|
|
1176
|
+
function oe(e) {
|
|
1177
|
+
const n = [], t = e.replace(/`([^`]+)`/g, (u, o) => (n.push(`<code>${ue(o)}</code>`), `${G}${n.length - 1}${G}`));
|
|
1178
|
+
return ue(t).replace(
|
|
884
1179
|
/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
|
|
885
1180
|
'<a href="$2" target="_blank" rel="noopener">$1</a>'
|
|
886
1181
|
).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(
|
|
887
|
-
new RegExp(`${
|
|
888
|
-
(
|
|
1182
|
+
new RegExp(`${G}(\\d+)${G}`, "g"),
|
|
1183
|
+
(u, o) => n[Number(o)] ?? ""
|
|
889
1184
|
);
|
|
890
1185
|
}
|
|
891
|
-
function
|
|
1186
|
+
function ue(e) {
|
|
892
1187
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
893
1188
|
}
|
|
894
|
-
function
|
|
895
|
-
const
|
|
896
|
-
function a(o,
|
|
897
|
-
const i = e.state.locale,
|
|
898
|
-
let
|
|
899
|
-
return
|
|
1189
|
+
function Qt(e) {
|
|
1190
|
+
const n = e.scope("webx-admin"), t = /* @__PURE__ */ new Map();
|
|
1191
|
+
function a(o, l, s) {
|
|
1192
|
+
const i = e.state.locale, m = `${i}:${o}`;
|
|
1193
|
+
let h = t.get(m);
|
|
1194
|
+
return h === void 0 && (h = new Intl.DateTimeFormat(i, l), t.set(m, h)), h.format(s);
|
|
900
1195
|
}
|
|
901
|
-
const
|
|
1196
|
+
const u = (o) => a("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, o);
|
|
902
1197
|
return {
|
|
903
1198
|
short(o) {
|
|
904
|
-
const
|
|
905
|
-
if (
|
|
906
|
-
return
|
|
907
|
-
const
|
|
908
|
-
return i === 0 ?
|
|
1199
|
+
const l = Z(o);
|
|
1200
|
+
if (l === null)
|
|
1201
|
+
return n("dates.never");
|
|
1202
|
+
const s = /* @__PURE__ */ new Date(), i = ve(l, s);
|
|
1203
|
+
return i === 0 ? n("dates.today", { time: u(l) }) : i === -1 ? n("dates.yesterday", { time: u(l) }) : l.getFullYear() === s.getFullYear() ? a(
|
|
909
1204
|
"this-year",
|
|
910
1205
|
{
|
|
911
1206
|
day: "numeric",
|
|
@@ -914,76 +1209,83 @@ function Ut(e) {
|
|
|
914
1209
|
minute: "2-digit",
|
|
915
1210
|
hourCycle: "h23"
|
|
916
1211
|
},
|
|
917
|
-
|
|
918
|
-
) : a("earlier", { day: "numeric", month: "long", year: "numeric" },
|
|
1212
|
+
l
|
|
1213
|
+
) : a("earlier", { day: "numeric", month: "long", year: "numeric" }, l);
|
|
1214
|
+
},
|
|
1215
|
+
compact(o) {
|
|
1216
|
+
const l = Z(o);
|
|
1217
|
+
if (l === null)
|
|
1218
|
+
return n("dates.never");
|
|
1219
|
+
const s = /* @__PURE__ */ new Date();
|
|
1220
|
+
return ve(l, s) === 0 ? u(l) : l.getFullYear() === s.getFullYear() ? a("compact", { day: "numeric", month: "short" }, l) : a("compact-earlier", { dateStyle: "short" }, l);
|
|
919
1221
|
},
|
|
920
1222
|
exact(o) {
|
|
921
|
-
const
|
|
922
|
-
return
|
|
1223
|
+
const l = Z(o);
|
|
1224
|
+
return l === null ? "" : a("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, l);
|
|
923
1225
|
},
|
|
924
1226
|
iso(o) {
|
|
925
|
-
const
|
|
926
|
-
return
|
|
1227
|
+
const l = Z(o);
|
|
1228
|
+
return l === null ? "" : l.toISOString();
|
|
927
1229
|
}
|
|
928
1230
|
};
|
|
929
1231
|
}
|
|
930
|
-
function
|
|
931
|
-
const e =
|
|
932
|
-
return
|
|
1232
|
+
function Zt() {
|
|
1233
|
+
const e = ee(ne, null);
|
|
1234
|
+
return Qt(e ?? en());
|
|
933
1235
|
}
|
|
934
|
-
let
|
|
935
|
-
function
|
|
936
|
-
return
|
|
1236
|
+
let Q = null;
|
|
1237
|
+
function en() {
|
|
1238
|
+
return Q === null && (Q = de(), Q.defaults("webx-admin", _e)), Q;
|
|
937
1239
|
}
|
|
938
|
-
function
|
|
1240
|
+
function Z(e) {
|
|
939
1241
|
if (e == null || e === "")
|
|
940
1242
|
return null;
|
|
941
|
-
const
|
|
942
|
-
return Number.isNaN(
|
|
1243
|
+
const n = e instanceof Date ? e : new Date(e);
|
|
1244
|
+
return Number.isNaN(n.getTime()) ? null : n;
|
|
943
1245
|
}
|
|
944
|
-
function
|
|
945
|
-
const
|
|
946
|
-
return Math.round((
|
|
1246
|
+
function ve(e, n) {
|
|
1247
|
+
const t = (a) => Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
|
|
1248
|
+
return Math.round((t(e) - t(n)) / 864e5);
|
|
947
1249
|
}
|
|
948
|
-
function
|
|
949
|
-
const a = e instanceof
|
|
1250
|
+
function tn(e, n, t) {
|
|
1251
|
+
const a = e instanceof re ? e.status : an(e);
|
|
950
1252
|
if (a === 422)
|
|
951
|
-
return
|
|
952
|
-
if (a === 401) return
|
|
953
|
-
if (a === 403) return
|
|
954
|
-
if (a === 404) return
|
|
955
|
-
if (a === 409) return
|
|
1253
|
+
return ln(e) ?? t ?? n("errors.unknown");
|
|
1254
|
+
if (a === 401) return n("errors.signed-out");
|
|
1255
|
+
if (a === 403) return n("errors.forbidden");
|
|
1256
|
+
if (a === 404) return n("errors.gone");
|
|
1257
|
+
if (a === 409) return n("errors.conflict");
|
|
956
1258
|
if (a === 429) {
|
|
957
|
-
const
|
|
958
|
-
return
|
|
1259
|
+
const u = e instanceof re ? e.retryAfter : null;
|
|
1260
|
+
return u === null ? n("errors.throttled") : n("errors.throttled-in", { seconds: u });
|
|
959
1261
|
}
|
|
960
|
-
return a !== null && a >= 500 ?
|
|
1262
|
+
return a !== null && a >= 500 ? n("errors.server") : a === null ? n("errors.offline") : t ?? n("errors.unknown");
|
|
961
1263
|
}
|
|
962
|
-
function
|
|
963
|
-
const e =
|
|
964
|
-
return (
|
|
1264
|
+
function nn() {
|
|
1265
|
+
const e = I("webx-admin");
|
|
1266
|
+
return (n, t) => tn(n, e, t);
|
|
965
1267
|
}
|
|
966
|
-
function
|
|
967
|
-
const
|
|
968
|
-
return typeof
|
|
1268
|
+
function an(e) {
|
|
1269
|
+
const n = e?.status;
|
|
1270
|
+
return typeof n == "number" ? n : null;
|
|
969
1271
|
}
|
|
970
|
-
function
|
|
971
|
-
const
|
|
972
|
-
return typeof
|
|
1272
|
+
function ln(e) {
|
|
1273
|
+
const t = e?.body?.message;
|
|
1274
|
+
return typeof t == "string" && t !== "" ? t : null;
|
|
973
1275
|
}
|
|
974
|
-
function
|
|
975
|
-
const a = `${e.apiPath}/entities/${
|
|
1276
|
+
function on(e, n, t) {
|
|
1277
|
+
const a = `${e.apiPath}/entities/${n}/${t}/notes`, u = (l) => `${e.apiPath}/notes/${l}`, o = (l) => l.data;
|
|
976
1278
|
return {
|
|
977
1279
|
list: () => e.http.get(a).then(o),
|
|
978
|
-
add: (
|
|
979
|
-
save: (
|
|
980
|
-
remove: (
|
|
1280
|
+
add: (l) => e.http.post(a, { body: l }).then(o),
|
|
1281
|
+
save: (l, s) => e.http.put(u(l), { body: s }).then(o),
|
|
1282
|
+
remove: (l) => e.http.delete(u(l)).then(() => {
|
|
981
1283
|
})
|
|
982
1284
|
};
|
|
983
1285
|
}
|
|
984
|
-
const
|
|
1286
|
+
const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
|
|
985
1287
|
__name: "Screen",
|
|
986
|
-
props: /* @__PURE__ */
|
|
1288
|
+
props: /* @__PURE__ */ ie({
|
|
987
1289
|
name: {},
|
|
988
1290
|
errors: { default: void 0 },
|
|
989
1291
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -994,39 +1296,39 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
|
994
1296
|
modelValue: { default: () => ({}) },
|
|
995
1297
|
modelModifiers: {}
|
|
996
1298
|
}),
|
|
997
|
-
emits: /* @__PURE__ */
|
|
998
|
-
setup(e, { expose:
|
|
999
|
-
const a = e,
|
|
1000
|
-
async function
|
|
1001
|
-
i.value = null,
|
|
1299
|
+
emits: /* @__PURE__ */ ie(["loaded"], ["update:modelValue"]),
|
|
1300
|
+
setup(e, { expose: n, emit: t }) {
|
|
1301
|
+
const a = e, u = t, o = ge(e, "modelValue"), l = H(), s = I("webx-admin"), i = E(null), m = E(null);
|
|
1302
|
+
async function h() {
|
|
1303
|
+
i.value = null, m.value = null;
|
|
1002
1304
|
try {
|
|
1003
|
-
const
|
|
1004
|
-
i.value =
|
|
1005
|
-
} catch (
|
|
1006
|
-
|
|
1305
|
+
const f = await l.loadScreen(a.name);
|
|
1306
|
+
i.value = f, u("loaded", f);
|
|
1307
|
+
} catch (f) {
|
|
1308
|
+
m.value = f instanceof Error ? f.message : String(f);
|
|
1007
1309
|
}
|
|
1008
1310
|
}
|
|
1009
|
-
return
|
|
1010
|
-
|
|
1011
|
-
}, { immediate: !0 }),
|
|
1012
|
-
|
|
1311
|
+
return te([() => a.name, () => l.i18n.state.locale], () => {
|
|
1312
|
+
h();
|
|
1313
|
+
}, { immediate: !0 }), n({ reload: h }), (f, d) => (v(), k("div", sn, [
|
|
1314
|
+
m.value ? (v(), y(r(et), {
|
|
1013
1315
|
key: 0,
|
|
1014
1316
|
type: "danger",
|
|
1015
|
-
title:
|
|
1016
|
-
description:
|
|
1017
|
-
}, null, 8, ["title", "description"])) : i.value === null ? (
|
|
1317
|
+
title: r(s)("shell.error-title"),
|
|
1318
|
+
description: m.value
|
|
1319
|
+
}, null, 8, ["title", "description"])) : i.value === null ? (v(), y(r(ye), {
|
|
1018
1320
|
key: 1,
|
|
1019
1321
|
rows: 4
|
|
1020
|
-
})) : (
|
|
1322
|
+
})) : (v(), y(r(ut), {
|
|
1021
1323
|
key: 2,
|
|
1022
1324
|
modelValue: o.value,
|
|
1023
|
-
"onUpdate:modelValue":
|
|
1325
|
+
"onUpdate:modelValue": d[0] || (d[0] = (p) => o.value = p),
|
|
1024
1326
|
root: i.value,
|
|
1025
|
-
patch:
|
|
1026
|
-
types:
|
|
1327
|
+
patch: r(l).screenPatch(e.name),
|
|
1328
|
+
types: r(l).types,
|
|
1027
1329
|
errors: e.errors,
|
|
1028
|
-
translate:
|
|
1029
|
-
can:
|
|
1330
|
+
translate: r(l).i18n.t,
|
|
1331
|
+
can: r(l).can,
|
|
1030
1332
|
disabled: e.disabled,
|
|
1031
1333
|
"label-position": e.labelPosition,
|
|
1032
1334
|
"label-width": e.labelWidth,
|
|
@@ -1034,77 +1336,27 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
|
1034
1336
|
}, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
|
|
1035
1337
|
]));
|
|
1036
1338
|
}
|
|
1037
|
-
}),
|
|
1038
|
-
|
|
1039
|
-
class: "wx-dropdown__divider"
|
|
1040
|
-
}, Ot = /* @__PURE__ */ U({
|
|
1041
|
-
__name: "RowMenu",
|
|
1339
|
+
}), Ln = 76, zn = /* @__PURE__ */ U({
|
|
1340
|
+
__name: "FilterChips",
|
|
1042
1341
|
props: {
|
|
1043
|
-
|
|
1044
|
-
label: { default: void 0 },
|
|
1045
|
-
size: { default: "sm" }
|
|
1342
|
+
filters: {}
|
|
1046
1343
|
},
|
|
1047
1344
|
setup(e) {
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
return (r, o) => n.value.length > 0 ? (f(), b(d(He), {
|
|
1056
|
-
key: 0,
|
|
1057
|
-
class: "wx-row-menu",
|
|
1058
|
-
collapse: "always",
|
|
1059
|
-
align: "end",
|
|
1060
|
-
size: e.size,
|
|
1061
|
-
"aria-label": e.label,
|
|
1062
|
-
onClick: o[0] || (o[0] = pe(() => {
|
|
1063
|
-
}, ["stop"]))
|
|
1345
|
+
return (n, t) => (v(!0), k(B, null, N(e.filters, (a) => (v(), y(r(tt), {
|
|
1346
|
+
key: a.key,
|
|
1347
|
+
class: "wx-filter-chip",
|
|
1348
|
+
size: "sm",
|
|
1349
|
+
round: "",
|
|
1350
|
+
closable: "",
|
|
1351
|
+
onClose: (u) => a.clear()
|
|
1064
1352
|
}, {
|
|
1065
|
-
|
|
1066
|
-
(
|
|
1067
|
-
key: s.key
|
|
1068
|
-
}, [
|
|
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?.()
|
|
1077
|
-
}, {
|
|
1078
|
-
default: g(() => [
|
|
1079
|
-
C(E(s.label), 1)
|
|
1080
|
-
]),
|
|
1081
|
-
_: 2
|
|
1082
|
-
}, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
|
|
1083
|
-
], 64))), 128))
|
|
1353
|
+
default: b(() => [
|
|
1354
|
+
z(C(a.label), 1)
|
|
1084
1355
|
]),
|
|
1085
|
-
_:
|
|
1086
|
-
},
|
|
1087
|
-
}
|
|
1088
|
-
}), Ft = /* @__PURE__ */ B(Ot, [["__scopeId", "data-v-4a08eb39"]]), fn = /* @__PURE__ */ U({
|
|
1089
|
-
__name: "BackButton",
|
|
1090
|
-
props: {
|
|
1091
|
-
to: {},
|
|
1092
|
-
label: { default: void 0 },
|
|
1093
|
-
size: { default: "sm" }
|
|
1094
|
-
},
|
|
1095
|
-
setup(e) {
|
|
1096
|
-
const t = e, n = N("webx-admin"), a = S(() => t.label ?? n("editor.back"));
|
|
1097
|
-
return (r, o) => (f(), b(d(ue), {
|
|
1098
|
-
icon: "arrow-left",
|
|
1099
|
-
class: "wx-back-button",
|
|
1100
|
-
as: d(Ue),
|
|
1101
|
-
to: e.to,
|
|
1102
|
-
title: a.value,
|
|
1103
|
-
size: e.size,
|
|
1104
|
-
"tooltip-side": "bottom"
|
|
1105
|
-
}, null, 8, ["as", "to", "title", "size"]));
|
|
1356
|
+
_: 2
|
|
1357
|
+
}, 1032, ["onClose"]))), 128));
|
|
1106
1358
|
}
|
|
1107
|
-
}),
|
|
1359
|
+
}), rn = { class: "wx-rename__footer" }, un = /* @__PURE__ */ U({
|
|
1108
1360
|
__name: "RenameButton",
|
|
1109
1361
|
props: {
|
|
1110
1362
|
name: { default: "" },
|
|
@@ -1114,58 +1366,58 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
|
1114
1366
|
size: { default: "sm" }
|
|
1115
1367
|
},
|
|
1116
1368
|
emits: ["rename"],
|
|
1117
|
-
setup(e, { emit:
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
|
|
1369
|
+
setup(e, { emit: n }) {
|
|
1370
|
+
const t = e, a = n, u = I("webx-admin"), o = E(!1), l = E(t.name), s = E(null), i = x(() => t.label ?? u("editor.rename"));
|
|
1371
|
+
te(o, async (h) => {
|
|
1372
|
+
h && (l.value = t.name, await Ue(), s.value?.focus(), s.value?.select());
|
|
1121
1373
|
});
|
|
1122
|
-
function
|
|
1123
|
-
const
|
|
1124
|
-
if (
|
|
1374
|
+
function m() {
|
|
1375
|
+
const h = l.value.trim();
|
|
1376
|
+
if (h === "" || h === t.name) {
|
|
1125
1377
|
o.value = !1;
|
|
1126
1378
|
return;
|
|
1127
1379
|
}
|
|
1128
|
-
a("rename",
|
|
1380
|
+
a("rename", h), o.value = !1;
|
|
1129
1381
|
}
|
|
1130
|
-
return (
|
|
1382
|
+
return (h, f) => (v(), y(r(nt), {
|
|
1131
1383
|
open: o.value,
|
|
1132
|
-
"onUpdate:open":
|
|
1384
|
+
"onUpdate:open": f[2] || (f[2] = (d) => o.value = d),
|
|
1133
1385
|
title: i.value,
|
|
1134
1386
|
width: 320,
|
|
1135
1387
|
side: "bottom",
|
|
1136
1388
|
align: "start",
|
|
1137
1389
|
teleport: ""
|
|
1138
1390
|
}, {
|
|
1139
|
-
trigger:
|
|
1140
|
-
|
|
1391
|
+
trigger: b(() => [
|
|
1392
|
+
_(r(Y), {
|
|
1141
1393
|
type: "edit",
|
|
1142
1394
|
title: i.value,
|
|
1143
1395
|
size: e.size,
|
|
1144
1396
|
disabled: e.disabled
|
|
1145
1397
|
}, null, 8, ["title", "size", "disabled"])
|
|
1146
1398
|
]),
|
|
1147
|
-
default:
|
|
1399
|
+
default: b(() => [
|
|
1148
1400
|
M("form", {
|
|
1149
1401
|
class: "wx-rename",
|
|
1150
|
-
onSubmit: pe(
|
|
1402
|
+
onSubmit: pe(m, ["prevent"])
|
|
1151
1403
|
}, [
|
|
1152
|
-
|
|
1404
|
+
_(r(at), {
|
|
1153
1405
|
ref_key: "field",
|
|
1154
|
-
ref:
|
|
1155
|
-
modelValue:
|
|
1156
|
-
"onUpdate:modelValue":
|
|
1406
|
+
ref: s,
|
|
1407
|
+
modelValue: l.value,
|
|
1408
|
+
"onUpdate:modelValue": f[0] || (f[0] = (d) => l.value = d),
|
|
1157
1409
|
"aria-label": i.value,
|
|
1158
1410
|
placeholder: e.placeholder,
|
|
1159
|
-
onKeydown:
|
|
1411
|
+
onKeydown: f[1] || (f[1] = Be((d) => o.value = !1, ["esc"]))
|
|
1160
1412
|
}, null, 8, ["modelValue", "aria-label", "placeholder"]),
|
|
1161
|
-
M("div",
|
|
1162
|
-
|
|
1413
|
+
M("div", rn, [
|
|
1414
|
+
_(r(O), {
|
|
1163
1415
|
type: "primary",
|
|
1164
1416
|
size: "sm",
|
|
1165
1417
|
"native-type": "submit"
|
|
1166
1418
|
}, {
|
|
1167
|
-
default:
|
|
1168
|
-
C(
|
|
1419
|
+
default: b(() => [
|
|
1420
|
+
z(C(r(u)("editor.save")), 1)
|
|
1169
1421
|
]),
|
|
1170
1422
|
_: 1
|
|
1171
1423
|
})
|
|
@@ -1175,7 +1427,7 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
|
1175
1427
|
_: 1
|
|
1176
1428
|
}, 8, ["open", "title"]));
|
|
1177
1429
|
}
|
|
1178
|
-
}),
|
|
1430
|
+
}), Wn = /* @__PURE__ */ P(un, [["__scopeId", "data-v-d879e8d3"]]), dn = ["innerHTML"], cn = /* @__PURE__ */ U({
|
|
1179
1431
|
__name: "HelpButton",
|
|
1180
1432
|
props: {
|
|
1181
1433
|
body: {},
|
|
@@ -1185,81 +1437,82 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
|
1185
1437
|
width: { default: 720 }
|
|
1186
1438
|
},
|
|
1187
1439
|
setup(e) {
|
|
1188
|
-
const
|
|
1189
|
-
return (
|
|
1190
|
-
|
|
1440
|
+
const n = e, t = I("webx-admin"), a = E(!1), u = x(() => n.title ?? t("help.title")), o = x(() => Jt(n.body));
|
|
1441
|
+
return (l, s) => (v(), k(B, null, [
|
|
1442
|
+
_(r(Y), {
|
|
1191
1443
|
type: "details",
|
|
1192
1444
|
icon: "question",
|
|
1193
1445
|
tone: "neutral",
|
|
1194
1446
|
size: e.size,
|
|
1195
|
-
title: e.label ??
|
|
1196
|
-
onClick:
|
|
1447
|
+
title: e.label ?? u.value,
|
|
1448
|
+
onClick: s[0] || (s[0] = (i) => a.value = !0)
|
|
1197
1449
|
}, null, 8, ["size", "title"]),
|
|
1198
|
-
|
|
1450
|
+
_(r(lt), {
|
|
1199
1451
|
open: a.value,
|
|
1200
|
-
"onUpdate:open":
|
|
1201
|
-
title:
|
|
1452
|
+
"onUpdate:open": s[1] || (s[1] = (i) => a.value = i),
|
|
1453
|
+
title: u.value,
|
|
1202
1454
|
width: e.width
|
|
1203
1455
|
}, {
|
|
1204
|
-
default:
|
|
1456
|
+
default: b(() => [
|
|
1205
1457
|
M("div", {
|
|
1206
1458
|
class: "wx-help",
|
|
1207
1459
|
innerHTML: o.value
|
|
1208
|
-
}, null, 8,
|
|
1460
|
+
}, null, 8, dn)
|
|
1209
1461
|
]),
|
|
1210
1462
|
_: 1
|
|
1211
1463
|
}, 8, ["open", "title", "width"])
|
|
1212
1464
|
], 64));
|
|
1213
1465
|
}
|
|
1214
|
-
}),
|
|
1466
|
+
}), An = /* @__PURE__ */ P(cn, [["__scopeId", "data-v-6c280d42"]]), mn = /* @__PURE__ */ U({
|
|
1215
1467
|
name: "WxDate",
|
|
1216
1468
|
__name: "DateText",
|
|
1217
1469
|
props: {
|
|
1218
1470
|
value: {},
|
|
1471
|
+
compact: { type: Boolean, default: !1 },
|
|
1219
1472
|
size: { default: "sm" },
|
|
1220
1473
|
tone: { default: "muted" }
|
|
1221
1474
|
},
|
|
1222
1475
|
setup(e) {
|
|
1223
|
-
const
|
|
1224
|
-
return (
|
|
1476
|
+
const n = e, t = Zt(), a = x(() => n.compact ? t.compact(n.value) : t.short(n.value)), u = x(() => t.exact(n.value)), o = x(() => t.iso(n.value));
|
|
1477
|
+
return (l, s) => u.value ? (v(), y(r(ot), {
|
|
1225
1478
|
key: 0,
|
|
1226
|
-
content:
|
|
1479
|
+
content: u.value
|
|
1227
1480
|
}, {
|
|
1228
|
-
default:
|
|
1229
|
-
|
|
1481
|
+
default: b(() => [
|
|
1482
|
+
_(r(q), {
|
|
1230
1483
|
as: "time",
|
|
1231
1484
|
datetime: o.value,
|
|
1232
1485
|
size: e.size,
|
|
1233
1486
|
tone: e.tone
|
|
1234
1487
|
}, {
|
|
1235
|
-
default:
|
|
1236
|
-
C(
|
|
1488
|
+
default: b(() => [
|
|
1489
|
+
z(C(a.value), 1)
|
|
1237
1490
|
]),
|
|
1238
1491
|
_: 1
|
|
1239
1492
|
}, 8, ["datetime", "size", "tone"])
|
|
1240
1493
|
]),
|
|
1241
1494
|
_: 1
|
|
1242
|
-
}, 8, ["content"])) : (
|
|
1495
|
+
}, 8, ["content"])) : (v(), y(r(q), {
|
|
1243
1496
|
key: 1,
|
|
1244
1497
|
size: e.size,
|
|
1245
1498
|
tone: e.tone
|
|
1246
1499
|
}, {
|
|
1247
|
-
default:
|
|
1248
|
-
C(
|
|
1500
|
+
default: b(() => [
|
|
1501
|
+
z(C(a.value), 1)
|
|
1249
1502
|
]),
|
|
1250
1503
|
_: 1
|
|
1251
1504
|
}, 8, ["size", "tone"]));
|
|
1252
1505
|
}
|
|
1253
|
-
}),
|
|
1506
|
+
}), fn = { class: "wx-notes" }, hn = {
|
|
1254
1507
|
key: 3,
|
|
1255
1508
|
class: "wx-notes__list"
|
|
1256
|
-
},
|
|
1509
|
+
}, vn = { class: "wx-note__body" }, pn = { class: "wx-note__head" }, bn = { class: "wx-note__buttons" }, gn = {
|
|
1257
1510
|
key: 1,
|
|
1258
1511
|
class: "wx-note__text"
|
|
1259
|
-
},
|
|
1512
|
+
}, wn = {
|
|
1260
1513
|
key: 4,
|
|
1261
1514
|
class: "wx-notes__new"
|
|
1262
|
-
},
|
|
1515
|
+
}, yn = /* @__PURE__ */ U({
|
|
1263
1516
|
name: "WxNotes",
|
|
1264
1517
|
__name: "NotesFeed",
|
|
1265
1518
|
props: {
|
|
@@ -1269,53 +1522,53 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
|
1269
1522
|
title: { default: void 0 }
|
|
1270
1523
|
},
|
|
1271
1524
|
emits: ["change"],
|
|
1272
|
-
setup(e, { emit:
|
|
1273
|
-
const
|
|
1274
|
-
async function
|
|
1525
|
+
setup(e, { emit: n }) {
|
|
1526
|
+
const t = e, a = n, u = H(), o = I("webx-admin"), l = nn(), s = E([]), i = E(!0), m = E(""), h = E(!1), f = E(null), d = E(""), p = x(() => on(u, t.type, t.id)), g = x(() => t.title ?? o("notes.title"));
|
|
1527
|
+
async function c() {
|
|
1275
1528
|
i.value = !0;
|
|
1276
1529
|
try {
|
|
1277
|
-
|
|
1278
|
-
} catch (
|
|
1279
|
-
|
|
1530
|
+
s.value = await p.value.list();
|
|
1531
|
+
} catch (T) {
|
|
1532
|
+
F.danger(l(T));
|
|
1280
1533
|
} finally {
|
|
1281
1534
|
i.value = !1;
|
|
1282
1535
|
}
|
|
1283
1536
|
}
|
|
1284
|
-
|
|
1285
|
-
() => [
|
|
1537
|
+
te(
|
|
1538
|
+
() => [t.type, t.id],
|
|
1286
1539
|
() => {
|
|
1287
|
-
|
|
1540
|
+
f.value = null, m.value = "", c();
|
|
1288
1541
|
},
|
|
1289
1542
|
{ immediate: !0 }
|
|
1290
1543
|
);
|
|
1291
|
-
async function
|
|
1292
|
-
const
|
|
1293
|
-
if (!(
|
|
1294
|
-
|
|
1544
|
+
async function w() {
|
|
1545
|
+
const T = m.value.trim();
|
|
1546
|
+
if (!(T === "" || h.value)) {
|
|
1547
|
+
h.value = !0;
|
|
1295
1548
|
try {
|
|
1296
|
-
|
|
1297
|
-
} catch (
|
|
1298
|
-
|
|
1549
|
+
s.value = [...s.value, await p.value.add(T)], m.value = "", a("change");
|
|
1550
|
+
} catch (A) {
|
|
1551
|
+
F.danger(l(A));
|
|
1299
1552
|
} finally {
|
|
1300
|
-
|
|
1553
|
+
h.value = !1;
|
|
1301
1554
|
}
|
|
1302
1555
|
}
|
|
1303
1556
|
}
|
|
1304
|
-
function
|
|
1305
|
-
|
|
1557
|
+
function $(T) {
|
|
1558
|
+
f.value = T.id, d.value = T.body;
|
|
1306
1559
|
}
|
|
1307
|
-
async function
|
|
1308
|
-
const
|
|
1309
|
-
if (
|
|
1560
|
+
async function K(T) {
|
|
1561
|
+
const A = d.value.trim();
|
|
1562
|
+
if (A !== "")
|
|
1310
1563
|
try {
|
|
1311
|
-
const
|
|
1312
|
-
|
|
1313
|
-
} catch (
|
|
1314
|
-
|
|
1564
|
+
const S = await p.value.save(T.id, A);
|
|
1565
|
+
s.value = s.value.map((D) => D.id === S.id ? S : D), f.value = null, F.success(o("notes.saved")), a("change");
|
|
1566
|
+
} catch (S) {
|
|
1567
|
+
F.danger(l(S));
|
|
1315
1568
|
}
|
|
1316
1569
|
}
|
|
1317
|
-
async function
|
|
1318
|
-
if (await
|
|
1570
|
+
async function ae(T) {
|
|
1571
|
+
if (await rt({
|
|
1319
1572
|
title: o("notes.delete-title"),
|
|
1320
1573
|
message: o("notes.delete-text"),
|
|
1321
1574
|
confirmText: o("notes.delete"),
|
|
@@ -1323,163 +1576,167 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
|
|
|
1323
1576
|
tone: "danger"
|
|
1324
1577
|
}))
|
|
1325
1578
|
try {
|
|
1326
|
-
await
|
|
1327
|
-
} catch (
|
|
1328
|
-
|
|
1579
|
+
await p.value.remove(T.id), s.value = s.value.filter((S) => S.id !== T.id), F.success(o("notes.deleted")), a("change");
|
|
1580
|
+
} catch (S) {
|
|
1581
|
+
F.danger(l(S));
|
|
1329
1582
|
}
|
|
1330
1583
|
}
|
|
1331
|
-
function
|
|
1332
|
-
return !
|
|
1333
|
-
{ key: "edit", icon: "edit", label: o("notes.edit"), run: () =>
|
|
1584
|
+
function le(T) {
|
|
1585
|
+
return !t.can || !T.is_mine ? [] : [
|
|
1586
|
+
{ key: "edit", icon: "edit", label: o("notes.edit"), run: () => $(T) },
|
|
1334
1587
|
{
|
|
1335
1588
|
key: "delete",
|
|
1336
1589
|
icon: "trash",
|
|
1337
1590
|
label: o("notes.delete"),
|
|
1338
1591
|
danger: !0,
|
|
1339
1592
|
run: () => {
|
|
1340
|
-
|
|
1593
|
+
ae(T);
|
|
1341
1594
|
}
|
|
1342
1595
|
}
|
|
1343
1596
|
];
|
|
1344
1597
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return
|
|
1598
|
+
function V(T) {
|
|
1599
|
+
return T.author?.name ?? o("notes.unknown-author");
|
|
1347
1600
|
}
|
|
1348
|
-
return (
|
|
1349
|
-
|
|
1601
|
+
return (T, A) => (v(), k("section", fn, [
|
|
1602
|
+
g.value ? (v(), y(r(q), {
|
|
1350
1603
|
key: 0,
|
|
1351
1604
|
weight: "medium",
|
|
1352
1605
|
class: "wx-notes__title"
|
|
1353
1606
|
}, {
|
|
1354
|
-
default:
|
|
1355
|
-
C(
|
|
1607
|
+
default: b(() => [
|
|
1608
|
+
z(C(g.value), 1)
|
|
1356
1609
|
]),
|
|
1357
1610
|
_: 1
|
|
1358
1611
|
})) : W("", !0),
|
|
1359
|
-
i.value ? (
|
|
1612
|
+
i.value ? (v(), y(r(ye), {
|
|
1360
1613
|
key: 1,
|
|
1361
1614
|
rows: 2
|
|
1362
|
-
})) :
|
|
1615
|
+
})) : s.value.length === 0 ? (v(), y(r(st), {
|
|
1363
1616
|
key: 2,
|
|
1364
1617
|
size: "sm",
|
|
1365
|
-
description:
|
|
1366
|
-
}, null, 8, ["description"])) : (
|
|
1367
|
-
(
|
|
1368
|
-
key:
|
|
1618
|
+
description: r(o)("notes.empty")
|
|
1619
|
+
}, null, 8, ["description"])) : (v(), k("ul", hn, [
|
|
1620
|
+
(v(!0), k(B, null, N(s.value, (S) => (v(), k("li", {
|
|
1621
|
+
key: S.id,
|
|
1369
1622
|
class: "wx-note"
|
|
1370
1623
|
}, [
|
|
1371
|
-
|
|
1372
|
-
name:
|
|
1624
|
+
_(r(it), {
|
|
1625
|
+
name: V(S),
|
|
1373
1626
|
size: "sm",
|
|
1374
1627
|
tone: "auto"
|
|
1375
1628
|
}, null, 8, ["name"]),
|
|
1376
|
-
M("div",
|
|
1377
|
-
M("div",
|
|
1378
|
-
|
|
1629
|
+
M("div", vn, [
|
|
1630
|
+
M("div", pn, [
|
|
1631
|
+
_(r(q), {
|
|
1379
1632
|
size: "sm",
|
|
1380
1633
|
weight: "medium",
|
|
1381
1634
|
truncate: ""
|
|
1382
1635
|
}, {
|
|
1383
|
-
default:
|
|
1384
|
-
C(
|
|
1636
|
+
default: b(() => [
|
|
1637
|
+
z(C(V(S)), 1)
|
|
1385
1638
|
]),
|
|
1386
1639
|
_: 2
|
|
1387
1640
|
}, 1024),
|
|
1388
|
-
|
|
1389
|
-
value:
|
|
1641
|
+
_(mn, {
|
|
1642
|
+
value: S.created_at
|
|
1390
1643
|
}, null, 8, ["value"]),
|
|
1391
|
-
|
|
1392
|
-
actions:
|
|
1393
|
-
label:
|
|
1644
|
+
_(xe, {
|
|
1645
|
+
actions: le(S),
|
|
1646
|
+
label: V(S)
|
|
1394
1647
|
}, null, 8, ["actions", "label"])
|
|
1395
1648
|
]),
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
modelValue:
|
|
1399
|
-
"onUpdate:modelValue":
|
|
1649
|
+
f.value === S.id ? (v(), k(B, { key: 0 }, [
|
|
1650
|
+
_(r(fe), {
|
|
1651
|
+
modelValue: d.value,
|
|
1652
|
+
"onUpdate:modelValue": A[0] || (A[0] = (D) => d.value = D),
|
|
1400
1653
|
autosize: { minRows: 2, maxRows: 10 }
|
|
1401
1654
|
}, null, 8, ["modelValue"]),
|
|
1402
|
-
M("div",
|
|
1403
|
-
|
|
1655
|
+
M("div", bn, [
|
|
1656
|
+
_(r(O), {
|
|
1404
1657
|
size: "sm",
|
|
1405
1658
|
type: "primary",
|
|
1406
|
-
onClick: (
|
|
1659
|
+
onClick: (D) => K(S)
|
|
1407
1660
|
}, {
|
|
1408
|
-
default:
|
|
1409
|
-
C(
|
|
1661
|
+
default: b(() => [
|
|
1662
|
+
z(C(r(o)("notes.save")), 1)
|
|
1410
1663
|
]),
|
|
1411
1664
|
_: 1
|
|
1412
1665
|
}, 8, ["onClick"]),
|
|
1413
|
-
|
|
1666
|
+
_(r(O), {
|
|
1414
1667
|
size: "sm",
|
|
1415
1668
|
variant: "text",
|
|
1416
|
-
onClick:
|
|
1669
|
+
onClick: A[1] || (A[1] = (D) => f.value = null)
|
|
1417
1670
|
}, {
|
|
1418
|
-
default:
|
|
1419
|
-
C(
|
|
1671
|
+
default: b(() => [
|
|
1672
|
+
z(C(r(o)("notes.cancel")), 1)
|
|
1420
1673
|
]),
|
|
1421
1674
|
_: 1
|
|
1422
1675
|
})
|
|
1423
1676
|
])
|
|
1424
|
-
], 64)) : (
|
|
1677
|
+
], 64)) : (v(), k("p", gn, C(S.body), 1))
|
|
1425
1678
|
])
|
|
1426
1679
|
]))), 128))
|
|
1427
1680
|
])),
|
|
1428
|
-
e.can ? (
|
|
1429
|
-
|
|
1430
|
-
modelValue:
|
|
1431
|
-
"onUpdate:modelValue":
|
|
1432
|
-
placeholder:
|
|
1681
|
+
e.can ? (v(), k("div", wn, [
|
|
1682
|
+
_(r(fe), {
|
|
1683
|
+
modelValue: m.value,
|
|
1684
|
+
"onUpdate:modelValue": A[2] || (A[2] = (S) => m.value = S),
|
|
1685
|
+
placeholder: r(o)("notes.placeholder"),
|
|
1433
1686
|
autosize: { minRows: 2, maxRows: 8 }
|
|
1434
1687
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
1435
|
-
|
|
1688
|
+
_(r(O), {
|
|
1436
1689
|
size: "sm",
|
|
1437
1690
|
type: "primary",
|
|
1438
|
-
disabled:
|
|
1439
|
-
loading:
|
|
1440
|
-
onClick:
|
|
1691
|
+
disabled: m.value.trim() === "",
|
|
1692
|
+
loading: h.value,
|
|
1693
|
+
onClick: w
|
|
1441
1694
|
}, {
|
|
1442
|
-
default:
|
|
1443
|
-
C(
|
|
1695
|
+
default: b(() => [
|
|
1696
|
+
z(C(r(o)("notes.add")), 1)
|
|
1444
1697
|
]),
|
|
1445
1698
|
_: 1
|
|
1446
1699
|
}, 8, ["disabled", "loading"])
|
|
1447
1700
|
])) : W("", !0)
|
|
1448
1701
|
]));
|
|
1449
1702
|
}
|
|
1450
|
-
}),
|
|
1703
|
+
}), Rn = /* @__PURE__ */ P(yn, [["__scopeId", "data-v-71004c1a"]]);
|
|
1451
1704
|
export {
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1705
|
+
zt as AdminLanding,
|
|
1706
|
+
Wt as AdminNav,
|
|
1707
|
+
Pt as AdminShell,
|
|
1708
|
+
re as HttpError,
|
|
1709
|
+
mt as WxBackButton,
|
|
1710
|
+
mn as WxDate,
|
|
1711
|
+
zn as WxFilterChips,
|
|
1712
|
+
An as WxHelpButton,
|
|
1713
|
+
_t as WxListScreen,
|
|
1714
|
+
Rn as WxNotes,
|
|
1715
|
+
Wn as WxRenameButton,
|
|
1716
|
+
$t as WxRichTextField,
|
|
1717
|
+
xe as WxRowMenu,
|
|
1718
|
+
Cn as WxScreen,
|
|
1719
|
+
yt as WxScreenHead,
|
|
1720
|
+
ke as adminKey,
|
|
1721
|
+
_e as adminMessages,
|
|
1722
|
+
Tt as adminTypes,
|
|
1723
|
+
Sn as createAdmin,
|
|
1724
|
+
St as createAdminContext,
|
|
1725
|
+
Qt as createDates,
|
|
1726
|
+
Ft as createHttp,
|
|
1471
1727
|
de as createI18n,
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1728
|
+
on as createNotesApi,
|
|
1729
|
+
tn as errorText,
|
|
1730
|
+
ne as i18nKey,
|
|
1731
|
+
Ct as provideAdmin,
|
|
1732
|
+
dt as provideI18n,
|
|
1733
|
+
he as readCookie,
|
|
1734
|
+
Jt as renderMarkdown,
|
|
1735
|
+
Ln as rowMenuWidth,
|
|
1479
1736
|
H as useAdmin,
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1737
|
+
Zt as useDates,
|
|
1738
|
+
nn as useErrorText,
|
|
1739
|
+
Tn as useI18n,
|
|
1740
|
+
I as useTranslate
|
|
1484
1741
|
};
|
|
1485
1742
|
//# sourceMappingURL=index.js.map
|