@webx-ui/module-admin 0.12.2 → 0.14.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/BackButton.d.ts +1 -1
- package/dist/BackupNote.d.ts +2 -0
- package/dist/HelpButton.d.ts +2 -2
- package/dist/LinkField.d.ts +21 -0
- package/dist/LinkPicker.d.ts +21 -0
- package/dist/RenameButton.d.ts +4 -4
- package/dist/RowMenu.d.ts +1 -1
- package/dist/Screen.d.ts +3 -3
- package/dist/admin.d.ts +3 -0
- package/dist/createAdmin.d.ts +3 -0
- package/dist/http.d.ts +4 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1214 -772
- package/dist/index.js.map +1 -1
- package/dist/links.d.ts +69 -0
- package/dist/screenTypes.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/theme.d.ts +39 -0
- package/dist/types.d.ts +23 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,64 +1,335 @@
|
|
|
1
|
-
import { inject as te, reactive as
|
|
2
|
-
import { RouterLink as
|
|
3
|
-
import { WxAction as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { inject as te, reactive as ue, defineComponent as E, useModel as de, ref as C, computed as x, onMounted as je, watch as J, openBlock as f, createElementBlock as $, createVNode as k, unref as o, createBlock as S, createCommentVNode as z, withCtx as g, createTextVNode as R, toDisplayString as W, createElementVNode as M, Fragment as D, renderList as K, mergeModels as ee, mergeProps as Te, withModifiers as Le, useSlots as Ke, useTemplateRef as qe, normalizeClass as G, renderSlot as N, createSlots as Ae, resolveComponent as I, watchEffect as Ye, onUnmounted as Xe, isRef as Ge, createApp as Je, h as le, onBeforeUnmount as Qe, nextTick as Ze, withKeys as et } from "vue";
|
|
2
|
+
import { RouterLink as tt, useRouter as We, useRoute as nt, createRouter as at, createWebHistory as lt } from "vue-router";
|
|
3
|
+
import { WxSegmented as st, WxSelect as ot, WxAutocomplete as ye, WxText as H, WxInput as Ce, WxCheckbox as we, WxAction as ne, WxActions as it, WxDropdownItem as rt, useElementWidth as ut, WxHeading as dt, WxButton as Z, WxIcon as ze, WxTabs as ct, WxCard as xe, WxRichText as mt, WxResult as ft, useResponsiveShell as vt, shellLayoutFor as ht, WxToaster as pt, WebxUI as bt, dateLocaleKey as gt, localesKey as yt, WxAlert as Re, WxSkeleton as Ue, WxBadge as wt, WxPopover as xt, WxDialog as kt, WxTooltip as _t, WxEmpty as $t, WxAvatar as St, WxTextarea as ke, toast as X, confirm as Tt } from "@webx-ui/core";
|
|
4
|
+
import { watchSystemTheme as Lt, applyTheme as At, systemTheme as Wt } from "@webx-ui/tokens";
|
|
5
|
+
import { WxScreenRenderer as Ct } from "@webx-ui/schema";
|
|
6
|
+
const ce = /* @__PURE__ */ Symbol("webx-i18n");
|
|
7
|
+
function zt() {
|
|
8
|
+
const e = te(ce, null);
|
|
8
9
|
if (e === null)
|
|
9
10
|
throw new Error("useI18n() was called outside a panel created by createAdmin().");
|
|
10
11
|
return e;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
return
|
|
13
|
+
function V(e) {
|
|
14
|
+
const t = te(ce, null);
|
|
15
|
+
return t === null ? ge().scope(e) : t.scope(e);
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
e.provide(
|
|
17
|
+
function Rt(e, t) {
|
|
18
|
+
e.provide(ce, t);
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
locale: e.locale ??
|
|
22
|
-
fallback:
|
|
20
|
+
function ge(e = {}) {
|
|
21
|
+
const t = e.fallback ?? "en", n = ue({
|
|
22
|
+
locale: e.locale ?? t,
|
|
23
|
+
fallback: t,
|
|
23
24
|
panelLocales: [],
|
|
24
25
|
contentLocales: []
|
|
25
|
-
}), a = {},
|
|
26
|
-
function s(
|
|
27
|
-
let v =
|
|
28
|
-
for (const
|
|
26
|
+
}), a = {}, i = ue({ value: {} });
|
|
27
|
+
function s(r, u, d) {
|
|
28
|
+
let v = r[u]?.[d[0] ?? ""];
|
|
29
|
+
for (const m of d.slice(1)) {
|
|
29
30
|
if (typeof v != "object" || v === null)
|
|
30
31
|
return null;
|
|
31
|
-
v = v[
|
|
32
|
+
v = v[m];
|
|
32
33
|
}
|
|
33
34
|
return typeof v == "string" ? v : null;
|
|
34
35
|
}
|
|
35
|
-
function l(
|
|
36
|
-
const [v,
|
|
36
|
+
function l(r, u, d) {
|
|
37
|
+
const [v, m] = u.includes("::") ? u.split("::", 2) : [r, u], p = m.split("."), c = s(i.value, v, p) ?? s(a, v, p) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
|
|
37
38
|
// label says nothing to anybody trying to fix it.
|
|
38
|
-
|
|
39
|
-
return
|
|
39
|
+
u;
|
|
40
|
+
return d === void 0 ? c : Ut(c, d);
|
|
40
41
|
}
|
|
41
42
|
return {
|
|
42
|
-
state:
|
|
43
|
-
defaults(
|
|
44
|
-
a[
|
|
43
|
+
state: n,
|
|
44
|
+
defaults(r, u) {
|
|
45
|
+
a[r] = { ...a[r], ...u };
|
|
45
46
|
},
|
|
46
|
-
load(
|
|
47
|
-
|
|
47
|
+
load(r, u, d) {
|
|
48
|
+
i.value = r ?? {}, n.locale = u ?? n.locale, d !== void 0 && (n.fallback = d);
|
|
48
49
|
},
|
|
49
|
-
scope(
|
|
50
|
-
return (
|
|
50
|
+
scope(r) {
|
|
51
|
+
return (u, d) => l(r, u, d);
|
|
51
52
|
},
|
|
52
|
-
t: (
|
|
53
|
+
t: (r, u) => l("", r, u)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function Ut(e, t) {
|
|
57
|
+
let n = e;
|
|
58
|
+
for (const [a, i] of Object.entries(t))
|
|
59
|
+
n = n.replaceAll(`:${a}`, String(i));
|
|
60
|
+
return n;
|
|
61
|
+
}
|
|
62
|
+
function Et() {
|
|
63
|
+
return {
|
|
64
|
+
target: "entity",
|
|
65
|
+
entity_type: null,
|
|
66
|
+
entity_id: null,
|
|
67
|
+
url: null,
|
|
68
|
+
hash: null,
|
|
69
|
+
new_tab: !1,
|
|
70
|
+
rel: []
|
|
53
71
|
};
|
|
54
72
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
73
|
+
function Bt(e) {
|
|
74
|
+
const t = `${e.apiPath}/links`, n = (a) => a.data;
|
|
75
|
+
return {
|
|
76
|
+
sources: () => e.http.get(`${t}/sources`).then(n),
|
|
77
|
+
search: (a, i, s) => e.http.get(`${t}/search`, { query: { type: a, q: i, locale: s } }).then(n),
|
|
78
|
+
resolve: (a, i) => e.http.post(`${t}/resolve`, { links: a, locale: i }).then(n),
|
|
79
|
+
routes: () => e.http.get(`${t}/routes`).then(n)
|
|
80
|
+
};
|
|
60
81
|
}
|
|
61
|
-
const
|
|
82
|
+
const Nt = { class: "wx-link-picker" }, Vt = {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: "wx-link-picker__entity"
|
|
85
|
+
}, It = {
|
|
86
|
+
key: 1,
|
|
87
|
+
class: "wx-link-picker__url"
|
|
88
|
+
}, Dt = {
|
|
89
|
+
key: 2,
|
|
90
|
+
class: "wx-link-picker__hash"
|
|
91
|
+
}, Mt = {
|
|
92
|
+
key: 3,
|
|
93
|
+
class: "wx-link-picker__attributes"
|
|
94
|
+
}, Pt = { class: "wx-link-picker__rel" }, Ft = /* @__PURE__ */ E({
|
|
95
|
+
name: "WxLinkPicker",
|
|
96
|
+
__name: "LinkPicker",
|
|
97
|
+
props: /* @__PURE__ */ ee({
|
|
98
|
+
allowNone: { type: Boolean, default: !0 },
|
|
99
|
+
attributes: { type: Boolean, default: !0 },
|
|
100
|
+
disabled: { type: Boolean, default: !1 }
|
|
101
|
+
}, {
|
|
102
|
+
modelValue: { default: null },
|
|
103
|
+
modelModifiers: {}
|
|
104
|
+
}),
|
|
105
|
+
emits: ["update:modelValue"],
|
|
106
|
+
setup(e) {
|
|
107
|
+
const t = e, n = de(e, "modelValue"), a = q(), i = zt(), s = Bt(a), l = V("webx-admin"), r = C([]), u = C([]), d = C([]), v = C(!1), m = C(null), p = C(""), c = C(null);
|
|
108
|
+
let _ = null;
|
|
109
|
+
const h = x(() => n.value ?? Et()), b = x(() => {
|
|
110
|
+
const y = [
|
|
111
|
+
{ value: "entity", label: l("links.target-entity") },
|
|
112
|
+
{ value: "url", label: l("links.target-url") }
|
|
113
|
+
];
|
|
114
|
+
return t.allowNone ? [...y, { value: "none", label: l("links.target-none") }] : y;
|
|
115
|
+
}), w = x(
|
|
116
|
+
() => r.value.map((y) => ({ value: y.type, label: y.title }))
|
|
117
|
+
), O = x(
|
|
118
|
+
() => u.value.map((y) => ({
|
|
119
|
+
value: y.title,
|
|
120
|
+
description: He(y),
|
|
121
|
+
id: y.id
|
|
122
|
+
}))
|
|
123
|
+
), Q = x(
|
|
124
|
+
() => d.value.map((y) => ({ value: y.path, description: y.name }))
|
|
125
|
+
);
|
|
126
|
+
je(async () => {
|
|
127
|
+
r.value = await s.sources(), m.value = h.value.entity_type ?? r.value[0]?.type ?? null, await Promise.all([Y(), j()]);
|
|
128
|
+
}), J(
|
|
129
|
+
() => [h.value.entity_type, h.value.entity_id].join(":"),
|
|
130
|
+
() => {
|
|
131
|
+
Y();
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
async function Y() {
|
|
135
|
+
const { entity_type: y, entity_id: A } = h.value;
|
|
136
|
+
if (y === null || A === null) {
|
|
137
|
+
c.value = null, p.value = "";
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (c.value?.id === A)
|
|
141
|
+
return;
|
|
142
|
+
const [U] = await s.resolve([{ type: y, id: A }], i.state.locale);
|
|
143
|
+
c.value = U ?? null, p.value = U?.title ?? l("links.missing"), _ = p.value;
|
|
144
|
+
}
|
|
145
|
+
async function j() {
|
|
146
|
+
d.value = await s.routes();
|
|
147
|
+
}
|
|
148
|
+
async function T(y) {
|
|
149
|
+
if (y === _) {
|
|
150
|
+
_ = null;
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (_ = null, m.value !== null) {
|
|
154
|
+
v.value = !0;
|
|
155
|
+
try {
|
|
156
|
+
u.value = await s.search(m.value, y, i.state.locale);
|
|
157
|
+
} finally {
|
|
158
|
+
v.value = !1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function B(y) {
|
|
163
|
+
y !== void 0 && (n.value = { ...h.value, target: y });
|
|
164
|
+
}
|
|
165
|
+
function L(y) {
|
|
166
|
+
m.value = y == null ? null : String(y), u.value = [], T("");
|
|
167
|
+
}
|
|
168
|
+
function P(y) {
|
|
169
|
+
const A = u.value.find((U) => U.id === y.id);
|
|
170
|
+
A === void 0 || m.value === null || (c.value = A, p.value = A.title, n.value = { ...h.value, entity_type: m.value, entity_id: A.id });
|
|
171
|
+
}
|
|
172
|
+
function me() {
|
|
173
|
+
c.value = null, p.value = "", u.value = [], n.value = { ...h.value, entity_type: null, entity_id: null };
|
|
174
|
+
}
|
|
175
|
+
function fe(y) {
|
|
176
|
+
n.value = { ...h.value, url: y === "" ? null : y };
|
|
177
|
+
}
|
|
178
|
+
function ae(y) {
|
|
179
|
+
const A = (typeof y == "string" || typeof y == "number" ? String(y) : "").replace(/^#+/, "").trim();
|
|
180
|
+
n.value = { ...h.value, hash: A === "" ? null : A };
|
|
181
|
+
}
|
|
182
|
+
function Pe(y) {
|
|
183
|
+
n.value = { ...h.value, new_tab: y };
|
|
184
|
+
}
|
|
185
|
+
function Fe(y, A) {
|
|
186
|
+
const U = h.value.rel.filter((ve) => ve !== y);
|
|
187
|
+
n.value = { ...h.value, rel: A ? [...U, y] : U };
|
|
188
|
+
}
|
|
189
|
+
function He(y) {
|
|
190
|
+
const A = [y.hint, y.url ?? void 0].filter(
|
|
191
|
+
(U) => typeof U == "string" && U !== ""
|
|
192
|
+
);
|
|
193
|
+
return y.available || A.push(l("links.unavailable")), A.join(" · ");
|
|
194
|
+
}
|
|
195
|
+
const Oe = ["nofollow", "sponsored", "ugc"];
|
|
196
|
+
return (y, A) => (f(), $("div", Nt, [
|
|
197
|
+
k(o(st), {
|
|
198
|
+
options: b.value,
|
|
199
|
+
"model-value": h.value.target,
|
|
200
|
+
disabled: t.disabled,
|
|
201
|
+
"aria-label": o(l)("links.target-entity"),
|
|
202
|
+
"onUpdate:modelValue": B
|
|
203
|
+
}, null, 8, ["options", "model-value", "disabled", "aria-label"]),
|
|
204
|
+
h.value.target === "entity" ? (f(), $("div", Vt, [
|
|
205
|
+
w.value.length > 1 ? (f(), S(o(ot), {
|
|
206
|
+
key: 0,
|
|
207
|
+
class: "wx-link-picker__section",
|
|
208
|
+
options: w.value,
|
|
209
|
+
"model-value": m.value,
|
|
210
|
+
disabled: t.disabled,
|
|
211
|
+
"aria-label": o(l)("links.section"),
|
|
212
|
+
"onUpdate:modelValue": L
|
|
213
|
+
}, null, 8, ["options", "model-value", "disabled", "aria-label"])) : z("", !0),
|
|
214
|
+
k(o(ye), {
|
|
215
|
+
class: "wx-link-picker__search",
|
|
216
|
+
"model-value": p.value,
|
|
217
|
+
options: O.value,
|
|
218
|
+
remote: "",
|
|
219
|
+
clearable: "",
|
|
220
|
+
loading: v.value,
|
|
221
|
+
"loading-text": o(l)("links.searching"),
|
|
222
|
+
"empty-text": o(l)("links.empty"),
|
|
223
|
+
placeholder: o(l)("links.search"),
|
|
224
|
+
"aria-label": o(l)("links.search"),
|
|
225
|
+
disabled: t.disabled,
|
|
226
|
+
"onUpdate:modelValue": A[0] || (A[0] = (U) => p.value = U),
|
|
227
|
+
onSearch: T,
|
|
228
|
+
onSelect: P,
|
|
229
|
+
onClear: me
|
|
230
|
+
}, null, 8, ["model-value", "options", "loading", "loading-text", "empty-text", "placeholder", "aria-label", "disabled"])
|
|
231
|
+
])) : h.value.target === "url" ? (f(), $("div", It, [
|
|
232
|
+
k(o(ye), {
|
|
233
|
+
"model-value": h.value.url ?? "",
|
|
234
|
+
options: Q.value,
|
|
235
|
+
clearable: "",
|
|
236
|
+
"open-on-focus": "",
|
|
237
|
+
"empty-text": o(l)("links.url-routes"),
|
|
238
|
+
placeholder: o(l)("links.url-placeholder"),
|
|
239
|
+
"aria-label": o(l)("links.url-label"),
|
|
240
|
+
disabled: t.disabled,
|
|
241
|
+
"onUpdate:modelValue": fe
|
|
242
|
+
}, null, 8, ["model-value", "options", "empty-text", "placeholder", "aria-label", "disabled"])
|
|
243
|
+
])) : z("", !0),
|
|
244
|
+
h.value.target !== "none" ? (f(), $("label", Dt, [
|
|
245
|
+
k(o(H), {
|
|
246
|
+
size: "sm",
|
|
247
|
+
tone: "muted"
|
|
248
|
+
}, {
|
|
249
|
+
default: g(() => [
|
|
250
|
+
R(W(o(l)("links.hash")), 1)
|
|
251
|
+
]),
|
|
252
|
+
_: 1
|
|
253
|
+
}),
|
|
254
|
+
A[2] || (A[2] = M("span", {
|
|
255
|
+
class: "wx-link-picker__sign",
|
|
256
|
+
"aria-hidden": "true"
|
|
257
|
+
}, "#", -1)),
|
|
258
|
+
k(o(Ce), {
|
|
259
|
+
"model-value": h.value.hash ?? "",
|
|
260
|
+
placeholder: o(l)("links.hash-placeholder"),
|
|
261
|
+
"aria-label": o(l)("links.hash"),
|
|
262
|
+
disabled: t.disabled,
|
|
263
|
+
clearable: "",
|
|
264
|
+
"onUpdate:modelValue": ae
|
|
265
|
+
}, null, 8, ["model-value", "placeholder", "aria-label", "disabled"])
|
|
266
|
+
])) : z("", !0),
|
|
267
|
+
t.attributes && h.value.target !== "none" ? (f(), $("div", Mt, [
|
|
268
|
+
k(o(we), {
|
|
269
|
+
"model-value": h.value.new_tab,
|
|
270
|
+
disabled: t.disabled,
|
|
271
|
+
"onUpdate:modelValue": A[1] || (A[1] = (U) => Pe(U))
|
|
272
|
+
}, {
|
|
273
|
+
default: g(() => [
|
|
274
|
+
R(W(o(l)("links.new-tab")), 1)
|
|
275
|
+
]),
|
|
276
|
+
_: 1
|
|
277
|
+
}, 8, ["model-value", "disabled"]),
|
|
278
|
+
M("div", Pt, [
|
|
279
|
+
k(o(H), {
|
|
280
|
+
size: "sm",
|
|
281
|
+
tone: "muted"
|
|
282
|
+
}, {
|
|
283
|
+
default: g(() => [
|
|
284
|
+
R(W(o(l)("links.rel")), 1)
|
|
285
|
+
]),
|
|
286
|
+
_: 1
|
|
287
|
+
}),
|
|
288
|
+
(f(), $(D, null, K(Oe, (U) => k(o(we), {
|
|
289
|
+
key: U,
|
|
290
|
+
"model-value": h.value.rel.includes(U),
|
|
291
|
+
disabled: t.disabled,
|
|
292
|
+
"onUpdate:modelValue": (ve) => Fe(U, ve)
|
|
293
|
+
}, {
|
|
294
|
+
default: g(() => [
|
|
295
|
+
R(W(o(l)(`links.rel-${U}`)), 1)
|
|
296
|
+
]),
|
|
297
|
+
_: 2
|
|
298
|
+
}, 1032, ["model-value", "disabled", "onUpdate:modelValue"])), 64))
|
|
299
|
+
])
|
|
300
|
+
])) : z("", !0)
|
|
301
|
+
]));
|
|
302
|
+
}
|
|
303
|
+
}), F = (e, t) => {
|
|
304
|
+
const n = e.__vccOpts || e;
|
|
305
|
+
for (const [a, i] of t)
|
|
306
|
+
n[a] = i;
|
|
307
|
+
return n;
|
|
308
|
+
}, Ht = /* @__PURE__ */ F(Ft, [["__scopeId", "data-v-e54022e5"]]), Ot = /* @__PURE__ */ E({
|
|
309
|
+
name: "WxLinkField",
|
|
310
|
+
inheritAttrs: !1,
|
|
311
|
+
__name: "LinkField",
|
|
312
|
+
props: /* @__PURE__ */ ee({
|
|
313
|
+
allowNone: { type: Boolean, default: !0 },
|
|
314
|
+
attributes: { type: Boolean, default: !0 },
|
|
315
|
+
disabled: { type: Boolean, default: !1 }
|
|
316
|
+
}, {
|
|
317
|
+
modelValue: { default: null },
|
|
318
|
+
modelModifiers: {}
|
|
319
|
+
}),
|
|
320
|
+
emits: ["update:modelValue"],
|
|
321
|
+
setup(e) {
|
|
322
|
+
const t = e, n = de(e, "modelValue");
|
|
323
|
+
return (a, i) => (f(), S(Ht, Te({
|
|
324
|
+
modelValue: n.value,
|
|
325
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => n.value = s)
|
|
326
|
+
}, a.$attrs, {
|
|
327
|
+
"allow-none": t.allowNone,
|
|
328
|
+
attributes: t.attributes,
|
|
329
|
+
disabled: t.disabled
|
|
330
|
+
}), null, 16, ["modelValue", "allow-none", "attributes", "disabled"]));
|
|
331
|
+
}
|
|
332
|
+
}), jt = /* @__PURE__ */ E({
|
|
62
333
|
__name: "BackButton",
|
|
63
334
|
props: {
|
|
64
335
|
to: {},
|
|
@@ -66,21 +337,21 @@ const ft = /* @__PURE__ */ R({
|
|
|
66
337
|
size: { default: "sm" }
|
|
67
338
|
},
|
|
68
339
|
setup(e) {
|
|
69
|
-
const
|
|
70
|
-
return (
|
|
340
|
+
const t = e, n = V("webx-admin"), a = x(() => t.label ?? n("editor.back"));
|
|
341
|
+
return (i, s) => (f(), S(o(ne), {
|
|
71
342
|
icon: "arrow-left",
|
|
72
343
|
class: "wx-back-button",
|
|
73
|
-
as:
|
|
344
|
+
as: o(tt),
|
|
74
345
|
to: e.to,
|
|
75
346
|
title: a.value,
|
|
76
347
|
size: e.size,
|
|
77
348
|
"tooltip-side": "bottom"
|
|
78
349
|
}, null, 8, ["as", "to", "title", "size"]));
|
|
79
350
|
}
|
|
80
|
-
}),
|
|
351
|
+
}), Kt = {
|
|
81
352
|
key: 0,
|
|
82
353
|
class: "wx-dropdown__divider"
|
|
83
|
-
},
|
|
354
|
+
}, qt = /* @__PURE__ */ E({
|
|
84
355
|
__name: "RowMenu",
|
|
85
356
|
props: {
|
|
86
357
|
actions: {},
|
|
@@ -88,45 +359,45 @@ const ft = /* @__PURE__ */ R({
|
|
|
88
359
|
size: { default: "sm" }
|
|
89
360
|
},
|
|
90
361
|
setup(e) {
|
|
91
|
-
const
|
|
92
|
-
...
|
|
93
|
-
...
|
|
94
|
-
]),
|
|
362
|
+
const t = V("webx-admin"), n = e, a = x(() => [
|
|
363
|
+
...n.actions.filter((s) => !s.danger),
|
|
364
|
+
...n.actions.filter((s) => s.danger)
|
|
365
|
+
]), i = x(() => {
|
|
95
366
|
const s = a.value.find((l) => l.danger);
|
|
96
367
|
return s && a.value[0] !== s ? s.key : null;
|
|
97
368
|
});
|
|
98
|
-
return (s, l) => a.value.length > 0 ? (
|
|
369
|
+
return (s, l) => a.value.length > 0 ? (f(), S(o(it), {
|
|
99
370
|
key: 0,
|
|
100
371
|
class: "wx-row-menu",
|
|
101
372
|
collapse: "always",
|
|
102
373
|
align: "end",
|
|
103
374
|
size: e.size,
|
|
104
375
|
"aria-label": e.label,
|
|
105
|
-
onClick: l[0] || (l[0] =
|
|
376
|
+
onClick: l[0] || (l[0] = Le(() => {
|
|
106
377
|
}, ["stop"]))
|
|
107
378
|
}, {
|
|
108
379
|
trigger: g(() => [
|
|
109
|
-
|
|
380
|
+
k(o(ne), {
|
|
110
381
|
type: "more",
|
|
111
382
|
size: e.size,
|
|
112
|
-
title:
|
|
383
|
+
title: o(t)("editor.more")
|
|
113
384
|
}, null, 8, ["size", "title"])
|
|
114
385
|
]),
|
|
115
386
|
collapsed: g(() => [
|
|
116
|
-
(
|
|
117
|
-
key:
|
|
387
|
+
(f(!0), $(D, null, K(a.value, (r) => (f(), $(D, {
|
|
388
|
+
key: r.key
|
|
118
389
|
}, [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
icon:
|
|
122
|
-
tone:
|
|
123
|
-
href:
|
|
124
|
-
target:
|
|
125
|
-
disabled:
|
|
126
|
-
onClick: (
|
|
390
|
+
r.key === i.value ? (f(), $("hr", Kt)) : z("", !0),
|
|
391
|
+
k(o(rt), {
|
|
392
|
+
icon: r.icon,
|
|
393
|
+
tone: r.danger ? "danger" : "default",
|
|
394
|
+
href: r.href,
|
|
395
|
+
target: r.href ? r.target ?? "_blank" : void 0,
|
|
396
|
+
disabled: r.disabled,
|
|
397
|
+
onClick: (u) => r.run?.()
|
|
127
398
|
}, {
|
|
128
399
|
default: g(() => [
|
|
129
|
-
W(
|
|
400
|
+
R(W(r.label), 1)
|
|
130
401
|
]),
|
|
131
402
|
_: 2
|
|
132
403
|
}, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
|
|
@@ -135,18 +406,13 @@ const ft = /* @__PURE__ */ R({
|
|
|
135
406
|
_: 1
|
|
136
407
|
}, 8, ["size", "aria-label"])) : z("", !0);
|
|
137
408
|
}
|
|
138
|
-
}),
|
|
139
|
-
const t = e.__vccOpts || e;
|
|
140
|
-
for (const [a, u] of n)
|
|
141
|
-
t[a] = u;
|
|
142
|
-
return t;
|
|
143
|
-
}, ke = /* @__PURE__ */ N(ht, [["__scopeId", "data-v-cab01f7f"]]), pt = ["data-level"], gt = {
|
|
409
|
+
}), Ee = /* @__PURE__ */ F(qt, [["__scopeId", "data-v-cab01f7f"]]), Yt = ["data-level"], Xt = {
|
|
144
410
|
key: 0,
|
|
145
411
|
class: "wx-screen-head__trail"
|
|
146
|
-
},
|
|
412
|
+
}, Gt = { class: "wx-screen-head__name" }, Jt = {
|
|
147
413
|
key: 4,
|
|
148
414
|
class: "wx-screen-head__actions"
|
|
149
|
-
},
|
|
415
|
+
}, Qt = /* @__PURE__ */ E({
|
|
150
416
|
__name: "ScreenHead",
|
|
151
417
|
props: {
|
|
152
418
|
title: { default: void 0 },
|
|
@@ -159,58 +425,58 @@ const ft = /* @__PURE__ */ R({
|
|
|
159
425
|
divider: { type: Boolean, default: !1 }
|
|
160
426
|
},
|
|
161
427
|
emits: ["back"],
|
|
162
|
-
setup(e, { emit:
|
|
163
|
-
const
|
|
164
|
-
() =>
|
|
165
|
-
),
|
|
166
|
-
() =>
|
|
167
|
-
),
|
|
168
|
-
() =>
|
|
428
|
+
setup(e, { emit: t }) {
|
|
429
|
+
const n = e, a = t, i = V("webx-admin"), s = Ke(), l = qe("root"), r = ut(l), u = x(() => r.value > 0 && r.value < n.collapseBelow), d = x(() => n.actions ?? []), v = x(
|
|
430
|
+
() => d.value.find((h) => h.primary) ?? null
|
|
431
|
+
), m = x(() => u.value ? v.value ? [v.value] : [] : d.value.filter((h) => !h.menu && !h.danger)), p = x(() => u.value ? d.value.filter((h) => h !== v.value) : d.value.filter((h) => h.menu || h.danger)), c = x(
|
|
432
|
+
() => n.back && n.back !== !0 ? n.back : null
|
|
433
|
+
), _ = x(
|
|
434
|
+
() => m.value.length > 0 || p.value.length > 0 || !!s.extra
|
|
169
435
|
);
|
|
170
|
-
return (
|
|
436
|
+
return (h, b) => (f(), $("div", {
|
|
171
437
|
ref_key: "root",
|
|
172
438
|
ref: l,
|
|
173
|
-
class:
|
|
174
|
-
"is-narrow":
|
|
175
|
-
"has-button":
|
|
176
|
-
"has-trail": !!
|
|
439
|
+
class: G(["wx-screen-head", {
|
|
440
|
+
"is-narrow": u.value,
|
|
441
|
+
"has-button": m.value.length > 0,
|
|
442
|
+
"has-trail": !!h.$slots.trail,
|
|
177
443
|
"has-divider": e.divider
|
|
178
444
|
}]),
|
|
179
445
|
"data-level": e.level
|
|
180
446
|
}, [
|
|
181
|
-
|
|
182
|
-
|
|
447
|
+
h.$slots.trail ? (f(), $("div", Xt, [
|
|
448
|
+
N(h.$slots, "trail", {}, void 0, !0)
|
|
183
449
|
])) : z("", !0),
|
|
184
|
-
|
|
450
|
+
c.value ? (f(), S(jt, {
|
|
185
451
|
key: 1,
|
|
186
452
|
class: "wx-screen-head__back",
|
|
187
|
-
to:
|
|
453
|
+
to: c.value,
|
|
188
454
|
label: e.backLabel,
|
|
189
455
|
"tooltip-side": "bottom"
|
|
190
|
-
}, null, 8, ["to", "label"])) : e.back ? (
|
|
456
|
+
}, null, 8, ["to", "label"])) : e.back ? (f(), S(o(ne), {
|
|
191
457
|
key: 2,
|
|
192
458
|
class: "wx-screen-head__back",
|
|
193
459
|
icon: "arrow-left",
|
|
194
460
|
size: "sm",
|
|
195
461
|
"tooltip-side": "bottom",
|
|
196
|
-
title: e.backLabel ?? i
|
|
197
|
-
onClick:
|
|
462
|
+
title: e.backLabel ?? o(i)("editor.back"),
|
|
463
|
+
onClick: b[0] || (b[0] = (w) => a("back"))
|
|
198
464
|
}, null, 8, ["title"])) : z("", !0),
|
|
199
|
-
M("div",
|
|
200
|
-
e.title ? (
|
|
465
|
+
M("div", Gt, [
|
|
466
|
+
e.title ? (f(), S(o(dt), {
|
|
201
467
|
key: 0,
|
|
202
468
|
level: e.level,
|
|
203
469
|
truncate: "",
|
|
204
470
|
class: "wx-screen-head__title"
|
|
205
471
|
}, {
|
|
206
472
|
default: g(() => [
|
|
207
|
-
W(
|
|
473
|
+
R(W(e.title), 1)
|
|
208
474
|
]),
|
|
209
475
|
_: 1
|
|
210
476
|
}, 8, ["level"])) : z("", !0),
|
|
211
|
-
|
|
477
|
+
N(h.$slots, "title-after", {}, void 0, !0)
|
|
212
478
|
]),
|
|
213
|
-
e.subtitle ||
|
|
479
|
+
e.subtitle || h.$slots.subtitle ? (f(), S(o(H), {
|
|
214
480
|
key: 3,
|
|
215
481
|
class: "wx-screen-head__subtitle",
|
|
216
482
|
size: "sm",
|
|
@@ -218,53 +484,53 @@ const ft = /* @__PURE__ */ R({
|
|
|
218
484
|
truncate: ""
|
|
219
485
|
}, {
|
|
220
486
|
default: g(() => [
|
|
221
|
-
|
|
222
|
-
W(
|
|
487
|
+
N(h.$slots, "subtitle", {}, () => [
|
|
488
|
+
R(W(e.subtitle), 1)
|
|
223
489
|
], !0)
|
|
224
490
|
]),
|
|
225
491
|
_: 3
|
|
226
492
|
})) : z("", !0),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
(
|
|
230
|
-
key:
|
|
231
|
-
class:
|
|
232
|
-
type:
|
|
233
|
-
variant:
|
|
234
|
-
loading:
|
|
235
|
-
disabled:
|
|
236
|
-
href:
|
|
237
|
-
target:
|
|
238
|
-
rel:
|
|
239
|
-
onClick: (
|
|
240
|
-
},
|
|
493
|
+
_.value ? (f(), $("div", Jt, [
|
|
494
|
+
N(h.$slots, "extra", {}, void 0, !0),
|
|
495
|
+
(f(!0), $(D, null, K(m.value, (w) => (f(), S(o(Z), {
|
|
496
|
+
key: w.key,
|
|
497
|
+
class: G(["wx-screen-head__button", { "is-primary": w.primary }]),
|
|
498
|
+
type: w.primary ? "primary" : "default",
|
|
499
|
+
variant: w.primary ? "solid" : w.variant ?? "outline",
|
|
500
|
+
loading: w.loading,
|
|
501
|
+
disabled: w.disabled,
|
|
502
|
+
href: w.href,
|
|
503
|
+
target: w.href ? w.target ?? "_blank" : void 0,
|
|
504
|
+
rel: w.href ? "noopener" : void 0,
|
|
505
|
+
onClick: (O) => w.run?.()
|
|
506
|
+
}, Ae({
|
|
241
507
|
default: g(() => [
|
|
242
|
-
|
|
508
|
+
R(" " + W(w.label), 1)
|
|
243
509
|
]),
|
|
244
510
|
_: 2
|
|
245
511
|
}, [
|
|
246
|
-
|
|
512
|
+
w.icon ? {
|
|
247
513
|
name: "icon",
|
|
248
514
|
fn: g(() => [
|
|
249
|
-
|
|
250
|
-
name:
|
|
515
|
+
k(o(ze), {
|
|
516
|
+
name: w.icon
|
|
251
517
|
}, null, 8, ["name"])
|
|
252
518
|
]),
|
|
253
519
|
key: "0"
|
|
254
520
|
} : void 0
|
|
255
521
|
]), 1032, ["class", "type", "variant", "loading", "disabled", "href", "target", "rel", "onClick"]))), 128)),
|
|
256
|
-
|
|
522
|
+
p.value.length > 0 ? (f(), S(Ee, {
|
|
257
523
|
key: 0,
|
|
258
|
-
actions:
|
|
524
|
+
actions: p.value,
|
|
259
525
|
size: "lg",
|
|
260
|
-
label: e.title ?? i
|
|
526
|
+
label: e.title ?? o(i)("editor.more")
|
|
261
527
|
}, null, 8, ["actions", "label"])) : z("", !0)
|
|
262
528
|
])) : z("", !0)
|
|
263
|
-
], 10,
|
|
529
|
+
], 10, Yt));
|
|
264
530
|
}
|
|
265
|
-
}),
|
|
531
|
+
}), Zt = /* @__PURE__ */ F(Qt, [["__scopeId", "data-v-e27d184e"]]), en = ["data-wx-fill"], tn = /* @__PURE__ */ E({
|
|
266
532
|
__name: "ListScreen",
|
|
267
|
-
props: /* @__PURE__ */
|
|
533
|
+
props: /* @__PURE__ */ ee({
|
|
268
534
|
title: { default: void 0 },
|
|
269
535
|
subtitle: { default: void 0 },
|
|
270
536
|
back: { default: void 0 },
|
|
@@ -281,12 +547,12 @@ const ft = /* @__PURE__ */ R({
|
|
|
281
547
|
}),
|
|
282
548
|
emits: ["update:view"],
|
|
283
549
|
setup(e) {
|
|
284
|
-
const
|
|
285
|
-
return (
|
|
286
|
-
class:
|
|
550
|
+
const t = de(e, "view");
|
|
551
|
+
return (n, a) => (f(), $("div", {
|
|
552
|
+
class: G(["wx-list-screen", { "is-fill": e.fill }]),
|
|
287
553
|
"data-wx-fill": e.fill ? "" : void 0
|
|
288
554
|
}, [
|
|
289
|
-
e.title || e.actions ||
|
|
555
|
+
e.title || e.actions || n.$slots.actions ? (f(), S(Zt, {
|
|
290
556
|
key: 0,
|
|
291
557
|
class: "wx-list-screen__head",
|
|
292
558
|
title: e.title,
|
|
@@ -295,293 +561,299 @@ const ft = /* @__PURE__ */ R({
|
|
|
295
561
|
"back-label": e.backLabel,
|
|
296
562
|
actions: e.actions,
|
|
297
563
|
"collapse-below": 480
|
|
298
|
-
},
|
|
299
|
-
|
|
564
|
+
}, Ae({ _: 2 }, [
|
|
565
|
+
n.$slots.actions ? {
|
|
300
566
|
name: "extra",
|
|
301
567
|
fn: g(() => [
|
|
302
|
-
|
|
568
|
+
N(n.$slots, "actions", {}, void 0, !0)
|
|
303
569
|
]),
|
|
304
570
|
key: "0"
|
|
305
571
|
} : void 0
|
|
306
572
|
]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : z("", !0),
|
|
307
|
-
e.views && e.views.length > 0 ? (
|
|
573
|
+
e.views && e.views.length > 0 ? (f(), S(o(ct), {
|
|
308
574
|
key: 1,
|
|
309
|
-
modelValue:
|
|
310
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
575
|
+
modelValue: t.value,
|
|
576
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => t.value = i),
|
|
311
577
|
class: "wx-list-screen__views",
|
|
312
578
|
items: e.views,
|
|
313
579
|
"collapse-below": e.collapseBelow,
|
|
314
580
|
"aria-label": e.title
|
|
315
581
|
}, {
|
|
316
582
|
default: g(() => [
|
|
317
|
-
e.card ? (
|
|
583
|
+
e.card ? (f(), S(o(xe), {
|
|
318
584
|
key: 0,
|
|
319
585
|
class: "wx-list-screen__card",
|
|
320
586
|
padding: e.padding
|
|
321
587
|
}, {
|
|
322
588
|
default: g(() => [
|
|
323
|
-
|
|
589
|
+
N(n.$slots, "default", {}, void 0, !0)
|
|
324
590
|
]),
|
|
325
591
|
_: 3
|
|
326
|
-
}, 8, ["padding"])) :
|
|
592
|
+
}, 8, ["padding"])) : N(n.$slots, "default", {}, void 0, !0, 1)
|
|
327
593
|
]),
|
|
328
594
|
_: 3
|
|
329
|
-
}, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (
|
|
330
|
-
e.card ? (
|
|
595
|
+
}, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (f(), $(D, { key: 2 }, [
|
|
596
|
+
e.card ? (f(), S(o(xe), {
|
|
331
597
|
key: 0,
|
|
332
598
|
class: "wx-list-screen__card",
|
|
333
599
|
padding: e.padding
|
|
334
600
|
}, {
|
|
335
601
|
default: g(() => [
|
|
336
|
-
|
|
602
|
+
N(n.$slots, "default", {}, void 0, !0)
|
|
337
603
|
]),
|
|
338
604
|
_: 3
|
|
339
|
-
}, 8, ["padding"])) :
|
|
605
|
+
}, 8, ["padding"])) : N(n.$slots, "default", {}, void 0, !0, 1)
|
|
340
606
|
], 64))
|
|
341
|
-
], 10,
|
|
607
|
+
], 10, en));
|
|
342
608
|
}
|
|
343
|
-
}),
|
|
609
|
+
}), nn = /* @__PURE__ */ F(tn, [["__scopeId", "data-v-8c7e5ad1"]]), an = /* @__PURE__ */ E({
|
|
344
610
|
name: "WxRichTextField",
|
|
345
611
|
inheritAttrs: !1,
|
|
346
612
|
__name: "RichTextField",
|
|
347
613
|
setup(e) {
|
|
348
|
-
const
|
|
349
|
-
bold:
|
|
350
|
-
italic:
|
|
351
|
-
strike:
|
|
352
|
-
code:
|
|
353
|
-
h2:
|
|
354
|
-
h3:
|
|
355
|
-
h4:
|
|
356
|
-
bulletList:
|
|
357
|
-
orderedList:
|
|
358
|
-
blockquote:
|
|
359
|
-
hr:
|
|
360
|
-
link:
|
|
361
|
-
table:
|
|
362
|
-
image:
|
|
363
|
-
youtube:
|
|
364
|
-
undo:
|
|
365
|
-
redo:
|
|
366
|
-
addRowAfter:
|
|
367
|
-
addRowBefore:
|
|
368
|
-
addColumnAfter:
|
|
369
|
-
addColumnBefore:
|
|
370
|
-
deleteRow:
|
|
371
|
-
deleteColumn:
|
|
372
|
-
mergeOrSplit:
|
|
373
|
-
deleteTable:
|
|
374
|
-
toolbar:
|
|
375
|
-
linkAddress:
|
|
376
|
-
youtubeAddress:
|
|
377
|
-
apply:
|
|
378
|
-
cancel:
|
|
379
|
-
uploading:
|
|
614
|
+
const t = q(), n = V("webx-admin"), a = x(() => t.pickImage ?? void 0), i = x(() => ({
|
|
615
|
+
bold: n("rich-text.bold"),
|
|
616
|
+
italic: n("rich-text.italic"),
|
|
617
|
+
strike: n("rich-text.strike"),
|
|
618
|
+
code: n("rich-text.code"),
|
|
619
|
+
h2: n("rich-text.h2"),
|
|
620
|
+
h3: n("rich-text.h3"),
|
|
621
|
+
h4: n("rich-text.h4"),
|
|
622
|
+
bulletList: n("rich-text.bullet-list"),
|
|
623
|
+
orderedList: n("rich-text.ordered-list"),
|
|
624
|
+
blockquote: n("rich-text.blockquote"),
|
|
625
|
+
hr: n("rich-text.hr"),
|
|
626
|
+
link: n("rich-text.link"),
|
|
627
|
+
table: n("rich-text.table"),
|
|
628
|
+
image: n("rich-text.image"),
|
|
629
|
+
youtube: n("rich-text.youtube"),
|
|
630
|
+
undo: n("rich-text.undo"),
|
|
631
|
+
redo: n("rich-text.redo"),
|
|
632
|
+
addRowAfter: n("rich-text.row-below"),
|
|
633
|
+
addRowBefore: n("rich-text.row-above"),
|
|
634
|
+
addColumnAfter: n("rich-text.column-after"),
|
|
635
|
+
addColumnBefore: n("rich-text.column-before"),
|
|
636
|
+
deleteRow: n("rich-text.delete-row"),
|
|
637
|
+
deleteColumn: n("rich-text.delete-column"),
|
|
638
|
+
mergeOrSplit: n("rich-text.merge-cells"),
|
|
639
|
+
deleteTable: n("rich-text.delete-table"),
|
|
640
|
+
toolbar: n("rich-text.toolbar"),
|
|
641
|
+
linkAddress: n("rich-text.link-address"),
|
|
642
|
+
youtubeAddress: n("rich-text.youtube-address"),
|
|
643
|
+
apply: n("rich-text.apply"),
|
|
644
|
+
cancel: n("rich-text.cancel"),
|
|
645
|
+
uploading: n("rich-text.uploading")
|
|
380
646
|
}));
|
|
381
|
-
return (s, l) => (
|
|
382
|
-
labels:
|
|
647
|
+
return (s, l) => (f(), S(o(mt), Te(s.$attrs, {
|
|
648
|
+
labels: i.value,
|
|
383
649
|
"pick-image": a.value
|
|
384
650
|
}), null, 16, ["labels", "pick-image"]));
|
|
385
651
|
}
|
|
386
|
-
}),
|
|
387
|
-
"wx-list": { component:
|
|
652
|
+
}), ln = {
|
|
653
|
+
"wx-list": { component: nn, kind: "layout", labelProp: "title" },
|
|
388
654
|
// Full width: an editor shares a row with nothing, and a form of two columns would give it
|
|
389
655
|
// half a line to write a page of text in.
|
|
390
|
-
"wx-rich-text": { component:
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
656
|
+
"wx-rich-text": { component: an, kind: "field", wide: !0 },
|
|
657
|
+
// Wide as well: a row of the picker is a segmented switch, a section and a search box, and half
|
|
658
|
+
// a form's width leaves the search box too narrow to read a page title in.
|
|
659
|
+
"wx-link": { component: Ot, kind: "field", wide: !0 }
|
|
660
|
+
}, Be = /* @__PURE__ */ Symbol("webx-admin");
|
|
661
|
+
function q() {
|
|
662
|
+
const e = te(Be, null);
|
|
394
663
|
if (e === null)
|
|
395
664
|
throw new Error("useAdmin() was called outside a panel created by createAdmin().");
|
|
396
665
|
return e;
|
|
397
666
|
}
|
|
398
|
-
function
|
|
399
|
-
const
|
|
667
|
+
function sn(e) {
|
|
668
|
+
const t = ue({
|
|
400
669
|
status: "loading",
|
|
401
670
|
manifest: null,
|
|
402
671
|
user: null,
|
|
403
672
|
error: null
|
|
404
|
-
}),
|
|
405
|
-
const
|
|
406
|
-
if (
|
|
673
|
+
}), n = x(() => {
|
|
674
|
+
const c = t.manifest;
|
|
675
|
+
if (c === null)
|
|
407
676
|
return [];
|
|
408
|
-
const
|
|
409
|
-
for (const
|
|
410
|
-
const
|
|
411
|
-
if (
|
|
677
|
+
const _ = [];
|
|
678
|
+
for (const h of c.modules) {
|
|
679
|
+
const b = e.modules.find((O) => O.id === h.id);
|
|
680
|
+
if (b === void 0)
|
|
412
681
|
continue;
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
id:
|
|
416
|
-
title:
|
|
417
|
-
icon:
|
|
418
|
-
path:
|
|
419
|
-
group:
|
|
682
|
+
const w = b.path ?? b.routes?.[0]?.path;
|
|
683
|
+
w !== void 0 && _.push({
|
|
684
|
+
id: h.id,
|
|
685
|
+
title: h.title,
|
|
686
|
+
icon: h.icon,
|
|
687
|
+
path: w,
|
|
688
|
+
group: h.group ?? null
|
|
420
689
|
});
|
|
421
690
|
}
|
|
422
|
-
return
|
|
691
|
+
return _;
|
|
423
692
|
}), a = x(() => {
|
|
424
|
-
const
|
|
425
|
-
for (const
|
|
426
|
-
if (
|
|
427
|
-
const
|
|
428
|
-
|
|
693
|
+
const c = t.manifest?.groups ?? [], _ = [], h = /* @__PURE__ */ new Map();
|
|
694
|
+
for (const b of n.value)
|
|
695
|
+
if (b.group !== null && c.some((w) => w.id === b.group)) {
|
|
696
|
+
const w = h.get(b.group) ?? [];
|
|
697
|
+
w.push(b), h.set(b.group, w);
|
|
429
698
|
} else
|
|
430
|
-
|
|
699
|
+
_.push(b);
|
|
431
700
|
return {
|
|
432
|
-
top:
|
|
433
|
-
groups:
|
|
434
|
-
id:
|
|
435
|
-
title:
|
|
436
|
-
icon:
|
|
437
|
-
entries:
|
|
701
|
+
top: _,
|
|
702
|
+
groups: c.filter((b) => h.has(b.id)).map((b) => ({
|
|
703
|
+
id: b.id,
|
|
704
|
+
title: b.title,
|
|
705
|
+
icon: b.icon ?? null,
|
|
706
|
+
entries: h.get(b.id) ?? []
|
|
438
707
|
}))
|
|
439
708
|
};
|
|
440
|
-
}),
|
|
441
|
-
for (const
|
|
442
|
-
Object.assign(
|
|
443
|
-
Object.assign(
|
|
444
|
-
const s = e.modules.find((
|
|
445
|
-
async function
|
|
446
|
-
const
|
|
447
|
-
let
|
|
448
|
-
return
|
|
449
|
-
throw l.delete(
|
|
450
|
-
}), l.set(
|
|
709
|
+
}), i = { ...ln };
|
|
710
|
+
for (const c of e.modules)
|
|
711
|
+
Object.assign(i, c.types);
|
|
712
|
+
Object.assign(i, e.types);
|
|
713
|
+
const s = e.modules.find((c) => c.pickImage !== void 0)?.pickImage, l = /* @__PURE__ */ new Map();
|
|
714
|
+
async function r(c) {
|
|
715
|
+
const _ = `${e.i18n.state.locale}:${c}`;
|
|
716
|
+
let h = l.get(_);
|
|
717
|
+
return h === void 0 && (h = e.http.get(`${e.apiPath}/screens/${c}`).then((b) => b.data.root).catch((b) => {
|
|
718
|
+
throw l.delete(_), b;
|
|
719
|
+
}), l.set(_, h)), h;
|
|
451
720
|
}
|
|
452
|
-
let
|
|
453
|
-
async function
|
|
454
|
-
|
|
721
|
+
let u = null;
|
|
722
|
+
async function d() {
|
|
723
|
+
t.status = "loading", t.error = null;
|
|
455
724
|
try {
|
|
456
|
-
if (
|
|
457
|
-
|
|
725
|
+
if (u !== null && (t.user = await u(), m(t.user), t.user === null)) {
|
|
726
|
+
t.manifest = null, t.status = "unauthenticated";
|
|
458
727
|
return;
|
|
459
728
|
}
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
} catch (
|
|
463
|
-
if (
|
|
464
|
-
|
|
729
|
+
const c = await e.loadManifest();
|
|
730
|
+
t.manifest = c, e.i18n.state.contentLocales = c.locales ?? [], e.i18n.state.panelLocales = c.panelLocales ?? e.i18n.state.panelLocales, c.locale !== void 0 && c.locale !== e.i18n.state.locale && await p(c.locale), t.status = "ready";
|
|
731
|
+
} catch (c) {
|
|
732
|
+
if (rn(c)) {
|
|
733
|
+
t.manifest = null, t.user = null, t.status = "unauthenticated";
|
|
465
734
|
return;
|
|
466
735
|
}
|
|
467
|
-
|
|
736
|
+
t.error = c instanceof Error ? c.message : String(c), t.status = "error";
|
|
468
737
|
}
|
|
469
738
|
}
|
|
470
739
|
async function v() {
|
|
471
|
-
if (
|
|
740
|
+
if (t.manifest !== null)
|
|
472
741
|
try {
|
|
473
|
-
|
|
742
|
+
t.manifest = await e.loadManifest();
|
|
474
743
|
} catch {
|
|
475
744
|
}
|
|
476
745
|
}
|
|
477
|
-
|
|
746
|
+
function m(c) {
|
|
747
|
+
c !== null && e.theme?.adopt(c.theme);
|
|
748
|
+
}
|
|
749
|
+
async function p(c) {
|
|
478
750
|
if (e.loadDictionary === void 0) {
|
|
479
|
-
e.i18n.state.locale =
|
|
751
|
+
e.i18n.state.locale = c;
|
|
480
752
|
return;
|
|
481
753
|
}
|
|
482
|
-
await e.loadDictionary(
|
|
754
|
+
await e.loadDictionary(c), await v();
|
|
483
755
|
}
|
|
484
756
|
return {
|
|
485
757
|
http: e.http,
|
|
486
758
|
basePath: e.basePath,
|
|
487
759
|
apiPath: e.apiPath,
|
|
488
|
-
state:
|
|
760
|
+
state: t,
|
|
489
761
|
i18n: e.i18n,
|
|
490
762
|
modules: e.modules,
|
|
491
|
-
nav:
|
|
763
|
+
nav: n,
|
|
492
764
|
groups: a,
|
|
493
|
-
types:
|
|
765
|
+
types: i,
|
|
494
766
|
pickImage: s ?? null,
|
|
495
|
-
reload:
|
|
767
|
+
reload: d,
|
|
496
768
|
refreshManifest: v,
|
|
497
|
-
setLocale:
|
|
498
|
-
setUser(
|
|
499
|
-
|
|
769
|
+
setLocale: p,
|
|
770
|
+
setUser(c) {
|
|
771
|
+
t.user = c, m(c);
|
|
500
772
|
},
|
|
501
|
-
useSessionLoader(
|
|
502
|
-
|
|
773
|
+
useSessionLoader(c) {
|
|
774
|
+
u = c;
|
|
503
775
|
},
|
|
504
|
-
can(
|
|
505
|
-
const
|
|
506
|
-
return
|
|
776
|
+
can(c) {
|
|
777
|
+
const _ = t.user;
|
|
778
|
+
return _ === null ? !1 : _.isSuper || _.permissions.includes(c);
|
|
507
779
|
},
|
|
508
|
-
loadScreen:
|
|
509
|
-
screenPatch(
|
|
510
|
-
return e.screens?.[
|
|
780
|
+
loadScreen: r,
|
|
781
|
+
screenPatch(c) {
|
|
782
|
+
return e.screens?.[c] ?? [];
|
|
511
783
|
}
|
|
512
784
|
};
|
|
513
785
|
}
|
|
514
|
-
function
|
|
515
|
-
e.provide(
|
|
786
|
+
function on(e, t) {
|
|
787
|
+
e.provide(Be, t);
|
|
516
788
|
}
|
|
517
|
-
function
|
|
789
|
+
function rn(e) {
|
|
518
790
|
return typeof e == "object" && e !== null && "status" in e && e.status === 401;
|
|
519
791
|
}
|
|
520
|
-
const
|
|
792
|
+
const un = /* @__PURE__ */ E({
|
|
521
793
|
__name: "AdminLanding",
|
|
522
794
|
props: {
|
|
523
795
|
landing: { default: null }
|
|
524
796
|
},
|
|
525
797
|
setup(e) {
|
|
526
|
-
const
|
|
527
|
-
const l =
|
|
528
|
-
return l.length === 0 ? null : ((
|
|
798
|
+
const t = e, n = q(), a = We(), i = V("webx-admin"), s = x(() => {
|
|
799
|
+
const l = n.nav.value;
|
|
800
|
+
return l.length === 0 ? null : ((t.landing === null ? void 0 : l.find((u) => u.path === t.landing)) ?? l[0])?.path ?? null;
|
|
529
801
|
});
|
|
530
|
-
return
|
|
802
|
+
return J(
|
|
531
803
|
s,
|
|
532
804
|
(l) => {
|
|
533
805
|
l !== null && a.replace(l);
|
|
534
806
|
},
|
|
535
807
|
{ immediate: !0 }
|
|
536
|
-
), (l,
|
|
808
|
+
), (l, r) => s.value === null && o(n).state.status === "ready" ? (f(), S(o(ft), {
|
|
537
809
|
key: 0,
|
|
538
810
|
status: "info",
|
|
539
|
-
title: i
|
|
540
|
-
description: i
|
|
811
|
+
title: o(i)("shell.empty-title"),
|
|
812
|
+
description: o(i)("shell.empty-description")
|
|
541
813
|
}, null, 8, ["title", "description"])) : z("", !0);
|
|
542
814
|
}
|
|
543
|
-
}),
|
|
815
|
+
}), dn = /* @__PURE__ */ E({
|
|
544
816
|
__name: "AdminNav",
|
|
545
817
|
props: {
|
|
546
818
|
collapsed: { type: Boolean }
|
|
547
819
|
},
|
|
548
820
|
emits: ["select"],
|
|
549
|
-
setup(e, { emit:
|
|
550
|
-
const
|
|
551
|
-
get: () => a.nav.value.find((
|
|
552
|
-
set: (
|
|
553
|
-
const
|
|
554
|
-
|
|
821
|
+
setup(e, { emit: t }) {
|
|
822
|
+
const n = t, a = q(), i = V("webx-admin"), s = We(), l = nt(), r = x({
|
|
823
|
+
get: () => a.nav.value.find((d) => l.path.startsWith(d.path))?.id ?? "",
|
|
824
|
+
set: (u) => {
|
|
825
|
+
const d = a.nav.value.find((v) => v.id === u);
|
|
826
|
+
d !== void 0 && s.push(d.path);
|
|
555
827
|
}
|
|
556
828
|
});
|
|
557
|
-
return (
|
|
558
|
-
const v =
|
|
559
|
-
return
|
|
560
|
-
modelValue:
|
|
561
|
-
"onUpdate:modelValue":
|
|
829
|
+
return (u, d) => {
|
|
830
|
+
const v = I("wx-menu-item"), m = I("wx-submenu"), p = I("wx-menu");
|
|
831
|
+
return f(), S(p, {
|
|
832
|
+
modelValue: r.value,
|
|
833
|
+
"onUpdate:modelValue": d[0] || (d[0] = (c) => r.value = c),
|
|
562
834
|
collapsed: e.collapsed,
|
|
563
|
-
label: i
|
|
564
|
-
onSelect:
|
|
835
|
+
label: o(i)("nav.sections"),
|
|
836
|
+
onSelect: d[1] || (d[1] = (c) => n("select"))
|
|
565
837
|
}, {
|
|
566
838
|
default: g(() => [
|
|
567
|
-
(
|
|
568
|
-
key:
|
|
569
|
-
value:
|
|
570
|
-
icon:
|
|
571
|
-
label:
|
|
839
|
+
(f(!0), $(D, null, K(o(a).groups.value.top, (c) => (f(), S(v, {
|
|
840
|
+
key: c.id,
|
|
841
|
+
value: c.id,
|
|
842
|
+
icon: c.icon ?? void 0,
|
|
843
|
+
label: c.title
|
|
572
844
|
}, null, 8, ["value", "icon", "label"]))), 128)),
|
|
573
|
-
(
|
|
574
|
-
key:
|
|
575
|
-
value: `group:${
|
|
576
|
-
title:
|
|
577
|
-
icon:
|
|
845
|
+
(f(!0), $(D, null, K(o(a).groups.value.groups, (c) => (f(), S(m, {
|
|
846
|
+
key: c.id,
|
|
847
|
+
value: `group:${c.id}`,
|
|
848
|
+
title: c.title,
|
|
849
|
+
icon: c.icon ?? "gear"
|
|
578
850
|
}, {
|
|
579
851
|
default: g(() => [
|
|
580
|
-
(
|
|
581
|
-
key:
|
|
582
|
-
value:
|
|
583
|
-
icon:
|
|
584
|
-
label:
|
|
852
|
+
(f(!0), $(D, null, K(c.entries, (_) => (f(), S(v, {
|
|
853
|
+
key: _.id,
|
|
854
|
+
value: _.id,
|
|
855
|
+
icon: _.icon ?? void 0,
|
|
856
|
+
label: _.title
|
|
585
857
|
}, null, 8, ["value", "icon", "label"]))), 128))
|
|
586
858
|
]),
|
|
587
859
|
_: 2
|
|
@@ -591,68 +863,68 @@ const Wt = /* @__PURE__ */ R({
|
|
|
591
863
|
}, 8, ["modelValue", "collapsed", "label"]);
|
|
592
864
|
};
|
|
593
865
|
}
|
|
594
|
-
}),
|
|
866
|
+
}), cn = {
|
|
595
867
|
key: 0,
|
|
596
868
|
class: "wx-root wx-admin-plain"
|
|
597
|
-
},
|
|
869
|
+
}, mn = {
|
|
598
870
|
key: 1,
|
|
599
871
|
class: "wx-root wx-admin-plain"
|
|
600
|
-
},
|
|
872
|
+
}, fn = {
|
|
601
873
|
key: 2,
|
|
602
874
|
class: "wx-root wx-admin-plain"
|
|
603
|
-
},
|
|
875
|
+
}, vn = ["src", "alt", "width", "height"], hn = ["src", "alt", "width", "height"], pn = ["src", "alt"], bn = { class: "wx-admin__user" }, gn = { class: "wx-admin__user wx-admin__user--drawer" }, yn = /* @__PURE__ */ E({
|
|
604
876
|
__name: "AdminShell",
|
|
605
877
|
setup(e) {
|
|
606
|
-
const
|
|
878
|
+
const t = q(), n = V("webx-admin"), a = C(null), { width: i, layout: s, collapsed: l, showAside: r, drawerOpen: u, toggle: d, close: v } = vt(
|
|
607
879
|
a,
|
|
608
880
|
{ persist: "webx-admin-shell" }
|
|
609
|
-
),
|
|
610
|
-
return
|
|
611
|
-
typeof document > "u" || (document.documentElement.dataset.wxShell =
|
|
612
|
-
}),
|
|
881
|
+
), m = x(() => t.state.manifest?.title ?? ""), p = x(() => t.state.manifest?.branding?.logo ?? null), c = x(() => t.state.manifest?.branding?.mark ?? null), _ = x(() => ht(i.value, null));
|
|
882
|
+
return Ye(() => {
|
|
883
|
+
typeof document > "u" || (document.documentElement.dataset.wxShell = _.value);
|
|
884
|
+
}), Xe(() => {
|
|
613
885
|
typeof document < "u" && delete document.documentElement.dataset.wxShell;
|
|
614
|
-
}), (
|
|
615
|
-
const
|
|
616
|
-
return
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
])) :
|
|
621
|
-
|
|
622
|
-
label:
|
|
886
|
+
}), (h, b) => {
|
|
887
|
+
const w = I("router-view"), O = I("wx-loading"), Q = I("wx-button"), Y = I("wx-result"), j = I("wx-action"), T = I("wx-text"), B = I("wx-header"), L = I("wx-aside"), P = I("wx-main"), me = I("wx-container"), fe = I("wx-drawer");
|
|
888
|
+
return f(), $(D, null, [
|
|
889
|
+
k(o(pt)),
|
|
890
|
+
o(t).state.status === "unauthenticated" ? (f(), $("div", cn, [
|
|
891
|
+
k(w)
|
|
892
|
+
])) : o(t).state.status === "loading" ? (f(), $("div", mn, [
|
|
893
|
+
k(O, {
|
|
894
|
+
label: o(n)("shell.loading")
|
|
623
895
|
}, null, 8, ["label"])
|
|
624
|
-
])) :
|
|
625
|
-
|
|
896
|
+
])) : o(t).state.status === "error" ? (f(), $("div", fn, [
|
|
897
|
+
k(Y, {
|
|
626
898
|
status: "error",
|
|
627
|
-
title:
|
|
628
|
-
description:
|
|
899
|
+
title: o(n)("shell.error-title"),
|
|
900
|
+
description: o(t).state.error
|
|
629
901
|
}, {
|
|
630
902
|
default: g(() => [
|
|
631
|
-
|
|
903
|
+
k(Q, {
|
|
632
904
|
type: "primary",
|
|
633
|
-
onClick:
|
|
905
|
+
onClick: b[0] || (b[0] = (ae) => o(t).reload())
|
|
634
906
|
}, {
|
|
635
907
|
default: g(() => [
|
|
636
|
-
W(
|
|
908
|
+
R(W(o(n)("shell.retry")), 1)
|
|
637
909
|
]),
|
|
638
910
|
_: 1
|
|
639
911
|
})
|
|
640
912
|
]),
|
|
641
913
|
_: 1
|
|
642
914
|
}, 8, ["title", "description"])
|
|
643
|
-
])) : (
|
|
915
|
+
])) : (f(), $("div", {
|
|
644
916
|
key: 3,
|
|
645
917
|
ref_key: "shellEl",
|
|
646
918
|
ref: a,
|
|
647
|
-
class:
|
|
919
|
+
class: G(["wx-root wx-admin", `wx-admin--${_.value}`])
|
|
648
920
|
}, [
|
|
649
|
-
|
|
650
|
-
direction:
|
|
921
|
+
k(me, {
|
|
922
|
+
direction: o(s) === "drawer" ? "vertical" : "horizontal",
|
|
651
923
|
"full-height": "",
|
|
652
924
|
class: "wx-admin__frame"
|
|
653
925
|
}, {
|
|
654
926
|
default: g(() => [
|
|
655
|
-
|
|
927
|
+
o(s) === "drawer" ? (f(), S(B, {
|
|
656
928
|
key: 0,
|
|
657
929
|
class: "wx-admin__header",
|
|
658
930
|
floating: "",
|
|
@@ -662,29 +934,29 @@ const Wt = /* @__PURE__ */ R({
|
|
|
662
934
|
height: "var(--wx-admin-header-height)"
|
|
663
935
|
}, {
|
|
664
936
|
end: g(() => [
|
|
665
|
-
|
|
937
|
+
N(h.$slots, "user", { expanded: !1 }, void 0, !0)
|
|
666
938
|
]),
|
|
667
939
|
default: g(() => [
|
|
668
|
-
|
|
940
|
+
k(j, {
|
|
669
941
|
icon: "menu",
|
|
670
|
-
title:
|
|
671
|
-
onClick:
|
|
942
|
+
title: o(n)("nav.menu"),
|
|
943
|
+
onClick: o(d)
|
|
672
944
|
}, null, 8, ["title", "onClick"]),
|
|
673
|
-
|
|
674
|
-
|
|
945
|
+
N(h.$slots, "brand", {}, () => [
|
|
946
|
+
p.value ? (f(), $("img", {
|
|
675
947
|
key: 0,
|
|
676
948
|
class: "wx-admin__logo",
|
|
677
|
-
src:
|
|
678
|
-
alt:
|
|
679
|
-
width:
|
|
680
|
-
height:
|
|
681
|
-
}, null, 8,
|
|
949
|
+
src: p.value.url,
|
|
950
|
+
alt: m.value,
|
|
951
|
+
width: p.value.width ?? void 0,
|
|
952
|
+
height: p.value.height ?? void 0
|
|
953
|
+
}, null, 8, vn)) : (f(), S(T, {
|
|
682
954
|
key: 1,
|
|
683
955
|
weight: "semibold",
|
|
684
956
|
truncate: ""
|
|
685
957
|
}, {
|
|
686
958
|
default: g(() => [
|
|
687
|
-
W(
|
|
959
|
+
R(W(m.value), 1)
|
|
688
960
|
]),
|
|
689
961
|
_: 1
|
|
690
962
|
}))
|
|
@@ -692,96 +964,96 @@ const Wt = /* @__PURE__ */ R({
|
|
|
692
964
|
]),
|
|
693
965
|
_: 3
|
|
694
966
|
})) : z("", !0),
|
|
695
|
-
|
|
967
|
+
o(r) ? (f(), S(L, {
|
|
696
968
|
key: 1,
|
|
697
969
|
class: "wx-admin__aside",
|
|
698
970
|
sticky: "",
|
|
699
971
|
floating: "",
|
|
700
972
|
scroll: "",
|
|
701
973
|
bordered: !1,
|
|
702
|
-
collapsed:
|
|
974
|
+
collapsed: o(l),
|
|
703
975
|
width: 220,
|
|
704
976
|
"collapsed-width": 56
|
|
705
977
|
}, {
|
|
706
978
|
top: g(() => [
|
|
707
979
|
M("div", {
|
|
708
|
-
class:
|
|
980
|
+
class: G(["wx-admin__brand", { "wx-admin__brand--stacked": o(l) && c.value }])
|
|
709
981
|
}, [
|
|
710
|
-
|
|
982
|
+
o(l) ? c.value ? (f(), $("img", {
|
|
711
983
|
key: 1,
|
|
712
984
|
class: "wx-admin__mark",
|
|
713
|
-
src:
|
|
714
|
-
alt:
|
|
715
|
-
}, null, 8,
|
|
716
|
-
|
|
985
|
+
src: c.value.url,
|
|
986
|
+
alt: m.value
|
|
987
|
+
}, null, 8, pn)) : z("", !0) : N(h.$slots, "brand", {}, () => [
|
|
988
|
+
p.value ? (f(), $("img", {
|
|
717
989
|
key: 0,
|
|
718
990
|
class: "wx-admin__logo",
|
|
719
|
-
src:
|
|
720
|
-
alt:
|
|
721
|
-
width:
|
|
722
|
-
height:
|
|
723
|
-
}, null, 8,
|
|
991
|
+
src: p.value.url,
|
|
992
|
+
alt: m.value,
|
|
993
|
+
width: p.value.width ?? void 0,
|
|
994
|
+
height: p.value.height ?? void 0
|
|
995
|
+
}, null, 8, hn)) : (f(), S(T, {
|
|
724
996
|
key: 1,
|
|
725
997
|
weight: "semibold",
|
|
726
998
|
truncate: "",
|
|
727
999
|
class: "wx-admin__title"
|
|
728
1000
|
}, {
|
|
729
1001
|
default: g(() => [
|
|
730
|
-
W(
|
|
1002
|
+
R(W(m.value), 1)
|
|
731
1003
|
]),
|
|
732
1004
|
_: 1
|
|
733
1005
|
}))
|
|
734
1006
|
], !0, 0),
|
|
735
|
-
|
|
1007
|
+
k(j, {
|
|
736
1008
|
icon: "sidebar",
|
|
737
|
-
title:
|
|
738
|
-
onClick:
|
|
1009
|
+
title: o(l) ? o(n)("nav.expand") : o(n)("nav.collapse"),
|
|
1010
|
+
onClick: o(d)
|
|
739
1011
|
}, null, 8, ["title", "onClick"])
|
|
740
1012
|
], 2)
|
|
741
1013
|
]),
|
|
742
1014
|
bottom: g(() => [
|
|
743
|
-
M("div",
|
|
744
|
-
|
|
745
|
-
expanded: !
|
|
1015
|
+
M("div", bn, [
|
|
1016
|
+
N(h.$slots, "user", {
|
|
1017
|
+
expanded: !o(l)
|
|
746
1018
|
}, void 0, !0)
|
|
747
1019
|
])
|
|
748
1020
|
]),
|
|
749
1021
|
default: g(() => [
|
|
750
|
-
|
|
1022
|
+
N(h.$slots, "nav", { collapsed: o(l) }, void 0, !0)
|
|
751
1023
|
]),
|
|
752
1024
|
_: 3
|
|
753
1025
|
}, 8, ["collapsed"])) : z("", !0),
|
|
754
|
-
|
|
1026
|
+
k(P, {
|
|
755
1027
|
padding: "none",
|
|
756
1028
|
class: "wx-admin__screen"
|
|
757
1029
|
}, {
|
|
758
1030
|
default: g(() => [
|
|
759
|
-
|
|
1031
|
+
k(w)
|
|
760
1032
|
]),
|
|
761
1033
|
_: 1
|
|
762
1034
|
})
|
|
763
1035
|
]),
|
|
764
1036
|
_: 3
|
|
765
1037
|
}, 8, ["direction"]),
|
|
766
|
-
|
|
767
|
-
open:
|
|
768
|
-
"onUpdate:open":
|
|
1038
|
+
k(fe, {
|
|
1039
|
+
open: o(u),
|
|
1040
|
+
"onUpdate:open": b[1] || (b[1] = (ae) => Ge(u) ? u.value = ae : null),
|
|
769
1041
|
class: "wx-admin__drawer",
|
|
770
|
-
title:
|
|
1042
|
+
title: m.value === "" ? o(n)("nav.menu") : m.value,
|
|
771
1043
|
side: "left",
|
|
772
1044
|
size: 260,
|
|
773
1045
|
"full-screen": !1,
|
|
774
1046
|
closable: ""
|
|
775
1047
|
}, {
|
|
776
1048
|
footer: g(() => [
|
|
777
|
-
M("div",
|
|
778
|
-
|
|
1049
|
+
M("div", gn, [
|
|
1050
|
+
N(h.$slots, "user", { expanded: !0 }, void 0, !0)
|
|
779
1051
|
])
|
|
780
1052
|
]),
|
|
781
1053
|
default: g(() => [
|
|
782
|
-
|
|
1054
|
+
N(h.$slots, "nav", {
|
|
783
1055
|
collapsed: !1,
|
|
784
|
-
select:
|
|
1056
|
+
select: o(v)
|
|
785
1057
|
}, void 0, !0)
|
|
786
1058
|
]),
|
|
787
1059
|
_: 3
|
|
@@ -790,10 +1062,10 @@ const Wt = /* @__PURE__ */ R({
|
|
|
790
1062
|
], 64);
|
|
791
1063
|
};
|
|
792
1064
|
}
|
|
793
|
-
}),
|
|
794
|
-
class
|
|
795
|
-
constructor(
|
|
796
|
-
super(
|
|
1065
|
+
}), wn = /* @__PURE__ */ F(yn, [["__scopeId", "data-v-309fdb9d"]]);
|
|
1066
|
+
class pe extends Error {
|
|
1067
|
+
constructor(t, n, a = {}, i = null, s = null) {
|
|
1068
|
+
super(t), this.status = n, this.errors = a, this.retryAfter = i, this.body = s, this.name = "HttpError";
|
|
797
1069
|
}
|
|
798
1070
|
status;
|
|
799
1071
|
errors;
|
|
@@ -810,86 +1082,136 @@ class re extends Error {
|
|
|
810
1082
|
return this.status === 429;
|
|
811
1083
|
}
|
|
812
1084
|
}
|
|
813
|
-
const
|
|
814
|
-
function
|
|
815
|
-
const
|
|
1085
|
+
const xn = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
|
|
1086
|
+
function kn(e = {}) {
|
|
1087
|
+
const t = (e.baseUrl ?? "").replace(/\/$/, ""), n = e.csrfUrl ?? "/api/cms/auth/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis), i = e.onUnauthenticated, s = e.headers;
|
|
816
1088
|
let l = !1;
|
|
817
|
-
async function
|
|
818
|
-
l && !
|
|
1089
|
+
async function r(d = !1) {
|
|
1090
|
+
l && !d && _e("XSRF-TOKEN") !== null || (await a(n, { credentials: "same-origin" }), l = !0);
|
|
819
1091
|
}
|
|
820
|
-
async function
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
const
|
|
1092
|
+
async function u(d, v, m, p = {}, c = !1) {
|
|
1093
|
+
const _ = xn.has(d);
|
|
1094
|
+
_ && await r();
|
|
1095
|
+
const h = {
|
|
824
1096
|
Accept: "application/json",
|
|
825
1097
|
"X-Requested-With": "XMLHttpRequest",
|
|
826
1098
|
// Standing headers first, so a caller can still override one for a single request.
|
|
827
1099
|
...s?.(),
|
|
828
|
-
...
|
|
1100
|
+
...p.headers
|
|
829
1101
|
};
|
|
830
|
-
if (
|
|
831
|
-
const
|
|
832
|
-
|
|
1102
|
+
if (_) {
|
|
1103
|
+
const w = _e("XSRF-TOKEN");
|
|
1104
|
+
w !== null && (h["X-XSRF-TOKEN"] = w);
|
|
833
1105
|
}
|
|
834
|
-
|
|
835
|
-
const
|
|
836
|
-
method:
|
|
1106
|
+
m !== void 0 && (h["Content-Type"] = "application/json");
|
|
1107
|
+
const b = await a($n(t, v, p.query), {
|
|
1108
|
+
method: d,
|
|
837
1109
|
credentials: "same-origin",
|
|
838
|
-
headers:
|
|
839
|
-
signal:
|
|
840
|
-
body:
|
|
1110
|
+
headers: h,
|
|
1111
|
+
signal: p.signal,
|
|
1112
|
+
body: m === void 0 ? void 0 : JSON.stringify(m)
|
|
841
1113
|
});
|
|
842
|
-
if (
|
|
843
|
-
return await
|
|
844
|
-
if (
|
|
845
|
-
throw await
|
|
846
|
-
if (
|
|
847
|
-
return await
|
|
1114
|
+
if (b.status === 419 && _ && !c)
|
|
1115
|
+
return await r(!0), u(d, v, m, p, !0);
|
|
1116
|
+
if (b.status === 401 && i?.(), !b.ok)
|
|
1117
|
+
throw await _n(b);
|
|
1118
|
+
if (b.status !== 204)
|
|
1119
|
+
return await b.json();
|
|
848
1120
|
}
|
|
849
1121
|
return {
|
|
850
|
-
get: (
|
|
851
|
-
post: (
|
|
852
|
-
put: (
|
|
853
|
-
patch: (
|
|
854
|
-
delete: (
|
|
1122
|
+
get: (d, v) => u("GET", d, void 0, v),
|
|
1123
|
+
post: (d, v, m) => u("POST", d, v, m),
|
|
1124
|
+
put: (d, v, m) => u("PUT", d, v, m),
|
|
1125
|
+
patch: (d, v, m) => u("PATCH", d, v, m),
|
|
1126
|
+
delete: (d, v) => u("DELETE", d, void 0, v)
|
|
855
1127
|
};
|
|
856
1128
|
}
|
|
857
|
-
async function
|
|
858
|
-
let
|
|
1129
|
+
async function _n(e) {
|
|
1130
|
+
let t = null;
|
|
859
1131
|
try {
|
|
860
|
-
|
|
1132
|
+
t = await e.json();
|
|
861
1133
|
} catch {
|
|
862
1134
|
}
|
|
863
|
-
const
|
|
864
|
-
return new
|
|
1135
|
+
const n = t ?? {}, a = typeof n.message == "string" && n.message !== "" ? n.message : e.statusText || `Request failed with ${e.status}`, i = n.errors !== null && typeof n.errors == "object" ? n.errors : {}, s = e.headers.get("Retry-After"), l = s === null ? null : Number.parseInt(s, 10);
|
|
1136
|
+
return new pe(
|
|
865
1137
|
a,
|
|
866
1138
|
e.status,
|
|
867
|
-
|
|
1139
|
+
i,
|
|
868
1140
|
Number.isFinite(l) ? l : null,
|
|
869
|
-
|
|
1141
|
+
t
|
|
870
1142
|
);
|
|
871
1143
|
}
|
|
872
|
-
function
|
|
873
|
-
const
|
|
874
|
-
if (
|
|
875
|
-
return
|
|
1144
|
+
function $n(e, t, n) {
|
|
1145
|
+
const i = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
|
|
1146
|
+
if (n === void 0)
|
|
1147
|
+
return i;
|
|
876
1148
|
const s = new URLSearchParams();
|
|
877
|
-
for (const [
|
|
878
|
-
|
|
1149
|
+
for (const [r, u] of Object.entries(n))
|
|
1150
|
+
u != null && s.set(r, String(u));
|
|
879
1151
|
const l = s.toString();
|
|
880
|
-
return l === "" ?
|
|
1152
|
+
return l === "" ? i : `${i}${i.includes("?") ? "&" : "?"}${l}`;
|
|
881
1153
|
}
|
|
882
|
-
function
|
|
1154
|
+
function _e(e) {
|
|
883
1155
|
if (typeof document > "u")
|
|
884
1156
|
return null;
|
|
885
|
-
for (const
|
|
886
|
-
const [
|
|
887
|
-
if (
|
|
1157
|
+
for (const t of document.cookie.split(";")) {
|
|
1158
|
+
const [n, ...a] = t.trim().split("=");
|
|
1159
|
+
if (n === e)
|
|
888
1160
|
return decodeURIComponent(a.join("="));
|
|
889
1161
|
}
|
|
890
1162
|
return null;
|
|
891
1163
|
}
|
|
892
|
-
const
|
|
1164
|
+
const Sn = "webx.theme", Ne = /* @__PURE__ */ Symbol("webx-theme");
|
|
1165
|
+
function ma() {
|
|
1166
|
+
const e = te(Ne, null);
|
|
1167
|
+
if (e === null)
|
|
1168
|
+
throw new Error("useTheme() was called outside a panel created by createAdmin().");
|
|
1169
|
+
return e;
|
|
1170
|
+
}
|
|
1171
|
+
function Tn(e, t) {
|
|
1172
|
+
e.provide(Ne, t);
|
|
1173
|
+
}
|
|
1174
|
+
function Ln(e = {}) {
|
|
1175
|
+
const t = e.storageKey === void 0 ? Sn : e.storageKey, n = ue({
|
|
1176
|
+
preference: An(t) ?? "system",
|
|
1177
|
+
resolved: "light"
|
|
1178
|
+
});
|
|
1179
|
+
function a() {
|
|
1180
|
+
At(n.preference), n.resolved = n.preference === "system" ? Wt() : n.preference;
|
|
1181
|
+
}
|
|
1182
|
+
return a(), Lt((i) => {
|
|
1183
|
+
n.preference === "system" && (n.resolved = i);
|
|
1184
|
+
}), {
|
|
1185
|
+
state: n,
|
|
1186
|
+
set(i) {
|
|
1187
|
+
n.preference = i, a(), $e(t, i);
|
|
1188
|
+
},
|
|
1189
|
+
adopt(i) {
|
|
1190
|
+
if (i === void 0)
|
|
1191
|
+
return;
|
|
1192
|
+
const s = i ?? "system";
|
|
1193
|
+
s !== n.preference && (n.preference = s, a(), $e(t, s));
|
|
1194
|
+
}
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
function $e(e, t) {
|
|
1198
|
+
if (e !== null)
|
|
1199
|
+
try {
|
|
1200
|
+
localStorage.setItem(e, t);
|
|
1201
|
+
} catch {
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
function An(e) {
|
|
1205
|
+
if (e === null)
|
|
1206
|
+
return null;
|
|
1207
|
+
try {
|
|
1208
|
+
const t = localStorage.getItem(e);
|
|
1209
|
+
return t === "light" || t === "dark" || t === "system" ? t : null;
|
|
1210
|
+
} catch {
|
|
1211
|
+
return null;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
const Ve = {
|
|
893
1215
|
shell: {
|
|
894
1216
|
loading: "Loading the panel…",
|
|
895
1217
|
"error-title": "The panel could not start",
|
|
@@ -906,6 +1228,15 @@ const $e = {
|
|
|
906
1228
|
// The one menu group the panel names itself; a module's own group is named by the module.
|
|
907
1229
|
system: "System"
|
|
908
1230
|
},
|
|
1231
|
+
// The three words on the theme switch. They belong to the panel rather than to whoever
|
|
1232
|
+
// places the switch: a core component ships English prop defaults and knows nothing about
|
|
1233
|
+
// a dictionary, so the panel is the one that has to say them.
|
|
1234
|
+
theme: {
|
|
1235
|
+
label: "Theme",
|
|
1236
|
+
light: "Light",
|
|
1237
|
+
dark: "Dark",
|
|
1238
|
+
system: "Follow the system"
|
|
1239
|
+
},
|
|
909
1240
|
// What a screen that edits one record offers whatever the record is: the way out of it, and
|
|
910
1241
|
// the way to rename it. A module that opens an editor should not be inventing these.
|
|
911
1242
|
editor: {
|
|
@@ -939,6 +1270,14 @@ const $e = {
|
|
|
939
1270
|
// whether the panel failed to load it.
|
|
940
1271
|
never: "never"
|
|
941
1272
|
},
|
|
1273
|
+
// The one line the panel says about the nightly database dump. It lives at the foot of the
|
|
1274
|
+
// settings screen, and the warning is the whole point of it: a backup whose breakage is
|
|
1275
|
+
// discovered on the day it was needed is not a backup.
|
|
1276
|
+
backup: {
|
|
1277
|
+
title: "Last database snapshot:",
|
|
1278
|
+
stale: "No database snapshot since :date. Check the schedule.",
|
|
1279
|
+
never: "The database has never been backed up. Check the schedule."
|
|
1280
|
+
},
|
|
942
1281
|
// How a request fails, in the panel's words rather than the server's (§13.3). `errors.ts`
|
|
943
1282
|
// decides which of these a status gets.
|
|
944
1283
|
errors: {
|
|
@@ -1009,201 +1348,237 @@ const $e = {
|
|
|
1009
1348
|
missing: "That record no longer exists.",
|
|
1010
1349
|
forbidden: "You may not read the notes of this record.",
|
|
1011
1350
|
"not-yours": "A note is edited by whoever wrote it."
|
|
1351
|
+
},
|
|
1352
|
+
// Where a link goes. The sections of the picker are named by whichever modules registered them;
|
|
1353
|
+
// these are the words around them, plus the six the server says when a link will not do.
|
|
1354
|
+
links: {
|
|
1355
|
+
"target-entity": "This site",
|
|
1356
|
+
"target-url": "An address",
|
|
1357
|
+
"target-none": "Nowhere",
|
|
1358
|
+
section: "Section",
|
|
1359
|
+
search: "Start typing a name",
|
|
1360
|
+
searching: "Searching…",
|
|
1361
|
+
empty: "Nothing found",
|
|
1362
|
+
clear: "Clear the link",
|
|
1363
|
+
unavailable: "Not on the site yet",
|
|
1364
|
+
missing: "What this pointed at is gone",
|
|
1365
|
+
"url-label": "Address",
|
|
1366
|
+
"url-placeholder": "/account or https://example.com",
|
|
1367
|
+
hash: "Anchor",
|
|
1368
|
+
"hash-placeholder": "section-on-the-page",
|
|
1369
|
+
"url-routes": "Addresses of this site",
|
|
1370
|
+
"new-tab": "Open in a new tab",
|
|
1371
|
+
rel: "Relationship",
|
|
1372
|
+
"rel-nofollow": "Pass no link weight",
|
|
1373
|
+
"rel-sponsored": "Paid placement",
|
|
1374
|
+
"rel-ugc": "Written by a visitor",
|
|
1375
|
+
shape: "This field takes a link.",
|
|
1376
|
+
target: "This field does not know that kind of target.",
|
|
1377
|
+
"no-source": "Nothing here can link to that.",
|
|
1378
|
+
"no-entity": "Choose what to link to.",
|
|
1379
|
+
"url-length": "An address may be at most :max characters long.",
|
|
1380
|
+
"url-scheme": "An address has to be a path or start with http, https, mailto or tel.",
|
|
1381
|
+
"hash-length": "An anchor may be at most :max characters long.",
|
|
1382
|
+
"hash-shape": "An anchor is a name on the page: no spaces in it.",
|
|
1383
|
+
"not-localized": "A link is the same in every language and cannot be translated."
|
|
1012
1384
|
}
|
|
1013
|
-
},
|
|
1014
|
-
function
|
|
1015
|
-
const
|
|
1016
|
-
for (const
|
|
1017
|
-
s.push(...
|
|
1018
|
-
if (!s.some((
|
|
1019
|
-
const
|
|
1385
|
+
}, Ie = "webx.locale";
|
|
1386
|
+
function fa(e = {}) {
|
|
1387
|
+
const t = e.manifestUrl ?? En() ?? "/api/cms/manifest", n = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), a = e.basePath ?? "/cms", i = e.modules ?? [], s = [...e.routes ?? []];
|
|
1388
|
+
for (const b of i)
|
|
1389
|
+
s.push(...b.routes ?? []);
|
|
1390
|
+
if (!s.some((b) => b.path === "/")) {
|
|
1391
|
+
const b = i.find((w) => w.landing === !0);
|
|
1020
1392
|
s.push({
|
|
1021
1393
|
path: "/",
|
|
1022
1394
|
name: "webx.home",
|
|
1023
|
-
component:
|
|
1024
|
-
props: { landing:
|
|
1395
|
+
component: un,
|
|
1396
|
+
props: { landing: b?.path ?? b?.routes?.[0]?.path ?? null }
|
|
1025
1397
|
});
|
|
1026
1398
|
}
|
|
1027
|
-
const l =
|
|
1028
|
-
history:
|
|
1399
|
+
const l = at({
|
|
1400
|
+
history: lt(a),
|
|
1029
1401
|
routes: s
|
|
1030
|
-
}),
|
|
1402
|
+
}), r = ge({ locale: e.locale ?? Cn() }), u = Ln(), d = e.http ?? kn({
|
|
1031
1403
|
baseUrl: "",
|
|
1404
|
+
csrfUrl: `${n}/auth/csrf-cookie`,
|
|
1032
1405
|
onUnauthenticated: () => {
|
|
1033
|
-
|
|
1406
|
+
m.setUser(null), m.state.status = "unauthenticated";
|
|
1034
1407
|
},
|
|
1035
1408
|
// Every request says which language the panel is currently showing. It decides what
|
|
1036
1409
|
// the server writes its own messages in — a 422 under a field — for anybody who has
|
|
1037
1410
|
// not stored a preference yet, which is everybody until they choose one. Without it,
|
|
1038
1411
|
// signing in on a Russian sign-in screen lands in an English panel.
|
|
1039
|
-
headers: () => ({ "X-Webx-Locale":
|
|
1412
|
+
headers: () => ({ "X-Webx-Locale": r.state.locale })
|
|
1040
1413
|
});
|
|
1041
|
-
|
|
1042
|
-
async function
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1414
|
+
r.defaults("webx-admin", Ve);
|
|
1415
|
+
async function v(b) {
|
|
1416
|
+
const w = await d.get(`${n}/translations/${b}`);
|
|
1417
|
+
r.load(w.data.namespaces, w.data.locale, w.data.fallback), zn(w.data.locale), Un(w.data.locale, r.state.panelLocales);
|
|
1045
1418
|
}
|
|
1046
|
-
const
|
|
1047
|
-
http:
|
|
1419
|
+
const m = sn({
|
|
1420
|
+
http: d,
|
|
1421
|
+
theme: u,
|
|
1048
1422
|
basePath: a,
|
|
1049
|
-
apiPath:
|
|
1050
|
-
modules:
|
|
1051
|
-
i18n:
|
|
1052
|
-
loadDictionary:
|
|
1423
|
+
apiPath: n,
|
|
1424
|
+
modules: i,
|
|
1425
|
+
i18n: r,
|
|
1426
|
+
loadDictionary: v,
|
|
1053
1427
|
types: e.types,
|
|
1054
1428
|
screens: e.screens,
|
|
1055
|
-
loadManifest: async () => (await
|
|
1056
|
-
}),
|
|
1057
|
-
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
x(() =>
|
|
1062
|
-
),
|
|
1429
|
+
loadManifest: async () => (await d.get(t)).data
|
|
1430
|
+
}), p = Je(Wn(e));
|
|
1431
|
+
p.use(bt), on(p, m), Rt(p, r), Tn(p, u);
|
|
1432
|
+
const c = C("");
|
|
1433
|
+
p.provide(
|
|
1434
|
+
gt,
|
|
1435
|
+
x(() => r.state.locale)
|
|
1436
|
+
), p.provide(yt, {
|
|
1063
1437
|
list: x(
|
|
1064
|
-
() =>
|
|
1065
|
-
code:
|
|
1066
|
-
label:
|
|
1438
|
+
() => r.state.contentLocales.map((b) => ({
|
|
1439
|
+
code: b.code,
|
|
1440
|
+
label: b.code.toUpperCase()
|
|
1067
1441
|
}))
|
|
1068
1442
|
),
|
|
1069
1443
|
active: x({
|
|
1070
|
-
get: () =>
|
|
1071
|
-
set: (
|
|
1072
|
-
|
|
1444
|
+
get: () => c.value || (r.state.contentLocales[0]?.code ?? ""),
|
|
1445
|
+
set: (b) => {
|
|
1446
|
+
c.value = b;
|
|
1073
1447
|
}
|
|
1074
1448
|
})
|
|
1075
1449
|
});
|
|
1076
|
-
const
|
|
1077
|
-
app:
|
|
1450
|
+
const _ = {
|
|
1451
|
+
app: p,
|
|
1078
1452
|
router: l,
|
|
1079
|
-
context:
|
|
1080
|
-
i18n:
|
|
1453
|
+
context: m,
|
|
1454
|
+
i18n: r,
|
|
1455
|
+
theme: u,
|
|
1081
1456
|
async mount() {
|
|
1082
|
-
await Promise.all([
|
|
1083
|
-
}),
|
|
1457
|
+
await Promise.all([h(), v(r.state.locale)]).catch(() => {
|
|
1458
|
+
}), p.mount(e.el ?? "#webx-app"), await m.reload();
|
|
1084
1459
|
}
|
|
1085
1460
|
};
|
|
1086
|
-
async function
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1461
|
+
async function h() {
|
|
1462
|
+
const b = await d.get(`${n}/locales`);
|
|
1463
|
+
r.state.panelLocales = b.data.panel, r.state.contentLocales = b.data.content;
|
|
1089
1464
|
}
|
|
1090
|
-
for (const
|
|
1091
|
-
|
|
1092
|
-
return
|
|
1465
|
+
for (const b of e.plugins ?? [])
|
|
1466
|
+
b.install(_);
|
|
1467
|
+
return p.use(l), _;
|
|
1093
1468
|
}
|
|
1094
|
-
function
|
|
1095
|
-
const
|
|
1469
|
+
function Wn(e) {
|
|
1470
|
+
const t = {
|
|
1096
1471
|
// The menu is the panel's own: it is the manifest, drawn.
|
|
1097
1472
|
// The shell hands in what a choice means where it drew the menu — in the drawer it is what
|
|
1098
1473
|
// closes it, and a drawer that stays open over the section it just opened is a drawer the
|
|
1099
1474
|
// reader has to dismiss by hand.
|
|
1100
|
-
nav: (
|
|
1475
|
+
nav: (n) => le(dn, { collapsed: n.collapsed === !0, onSelect: n.select })
|
|
1101
1476
|
};
|
|
1102
|
-
return e.brand !== void 0 && (
|
|
1477
|
+
return e.brand !== void 0 && (t.brand = () => le(e.brand)), e.userMenu !== void 0 && (t.user = (n) => le(e.userMenu, { expanded: n.expanded === !0 })), { render: () => le(wn, null, t) };
|
|
1103
1478
|
}
|
|
1104
|
-
function
|
|
1105
|
-
const e =
|
|
1479
|
+
function Cn() {
|
|
1480
|
+
const e = Rn(Ie);
|
|
1106
1481
|
return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
|
|
1107
1482
|
}
|
|
1108
|
-
function
|
|
1483
|
+
function zn(e) {
|
|
1109
1484
|
try {
|
|
1110
|
-
localStorage.setItem(
|
|
1485
|
+
localStorage.setItem(Ie, e);
|
|
1111
1486
|
} catch {
|
|
1112
1487
|
}
|
|
1113
1488
|
}
|
|
1114
|
-
function
|
|
1489
|
+
function Rn(e) {
|
|
1115
1490
|
try {
|
|
1116
1491
|
return localStorage.getItem(e);
|
|
1117
1492
|
} catch {
|
|
1118
1493
|
return null;
|
|
1119
1494
|
}
|
|
1120
1495
|
}
|
|
1121
|
-
function
|
|
1122
|
-
typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir =
|
|
1496
|
+
function Un(e, t) {
|
|
1497
|
+
typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((n) => n.code === e)?.direction ?? "ltr");
|
|
1123
1498
|
}
|
|
1124
|
-
function
|
|
1499
|
+
function En() {
|
|
1125
1500
|
return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
|
|
1126
1501
|
}
|
|
1127
|
-
function
|
|
1128
|
-
const
|
|
1502
|
+
function Bn(e) {
|
|
1503
|
+
const t = e.replace(/\r\n?/g, `
|
|
1129
1504
|
`).split(`
|
|
1130
|
-
`),
|
|
1505
|
+
`), n = [];
|
|
1131
1506
|
let a = 0;
|
|
1132
|
-
for (; a <
|
|
1133
|
-
const
|
|
1134
|
-
if (
|
|
1507
|
+
for (; a < t.length; ) {
|
|
1508
|
+
const i = t[a] ?? "";
|
|
1509
|
+
if (i.trim() === "") {
|
|
1135
1510
|
a += 1;
|
|
1136
1511
|
continue;
|
|
1137
1512
|
}
|
|
1138
|
-
if (/^```([\w-]*)\s*$/.exec(
|
|
1139
|
-
const
|
|
1140
|
-
for (a += 1; a <
|
|
1141
|
-
|
|
1142
|
-
a += 1,
|
|
1513
|
+
if (/^```([\w-]*)\s*$/.exec(i)) {
|
|
1514
|
+
const u = [];
|
|
1515
|
+
for (a += 1; a < t.length && !/^```\s*$/.test(t[a] ?? ""); )
|
|
1516
|
+
u.push(t[a] ?? ""), a += 1;
|
|
1517
|
+
a += 1, n.push(`<pre><code>${be(u.join(`
|
|
1143
1518
|
`))}</code></pre>`);
|
|
1144
1519
|
continue;
|
|
1145
1520
|
}
|
|
1146
|
-
const l = /^(#{1,4})\s+(.*)$/.exec(
|
|
1521
|
+
const l = /^(#{1,4})\s+(.*)$/.exec(i);
|
|
1147
1522
|
if (l) {
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1523
|
+
const u = Math.min(l[1].length + 1, 5);
|
|
1524
|
+
n.push(`<h${u}>${he(l[2] ?? "")}</h${u}>`), a += 1;
|
|
1150
1525
|
continue;
|
|
1151
1526
|
}
|
|
1152
|
-
if (
|
|
1153
|
-
const
|
|
1154
|
-
for (; a <
|
|
1155
|
-
for (
|
|
1156
|
-
const
|
|
1157
|
-
if (
|
|
1527
|
+
if (oe(i)) {
|
|
1528
|
+
const u = /^\s*\d+[.)]\s+/.test(i), d = [];
|
|
1529
|
+
for (; a < t.length && oe(t[a] ?? ""); )
|
|
1530
|
+
for (d.push((t[a] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), a += 1; a < t.length; ) {
|
|
1531
|
+
const m = t[a] ?? "";
|
|
1532
|
+
if (m.trim() === "" || oe(m) || /^(#{1,4})\s/.test(m) || /^```/.test(m))
|
|
1158
1533
|
break;
|
|
1159
|
-
|
|
1534
|
+
d[d.length - 1] += ` ${m.trim()}`, a += 1;
|
|
1160
1535
|
}
|
|
1161
|
-
const v =
|
|
1162
|
-
|
|
1536
|
+
const v = u ? "ol" : "ul";
|
|
1537
|
+
n.push(`<${v}>${d.map((m) => `<li>${he(m)}</li>`).join("")}</${v}>`);
|
|
1163
1538
|
continue;
|
|
1164
1539
|
}
|
|
1165
|
-
const
|
|
1166
|
-
for (; a <
|
|
1167
|
-
const
|
|
1168
|
-
if (
|
|
1169
|
-
|
|
1540
|
+
const r = [];
|
|
1541
|
+
for (; a < t.length; ) {
|
|
1542
|
+
const u = t[a] ?? "";
|
|
1543
|
+
if (u.trim() === "" || oe(u) || /^(#{1,4})\s/.test(u) || /^```/.test(u)) break;
|
|
1544
|
+
r.push(u.trim()), a += 1;
|
|
1170
1545
|
}
|
|
1171
|
-
|
|
1546
|
+
n.push(`<p>${he(r.join(" "))}</p>`);
|
|
1172
1547
|
}
|
|
1173
|
-
return
|
|
1548
|
+
return n.join("");
|
|
1174
1549
|
}
|
|
1175
|
-
const
|
|
1176
|
-
function
|
|
1550
|
+
const se = "\0";
|
|
1551
|
+
function oe(e) {
|
|
1177
1552
|
return /^\s*(?:[-*+]|\d+[.)])\s+/.test(e);
|
|
1178
1553
|
}
|
|
1179
|
-
function
|
|
1180
|
-
const
|
|
1181
|
-
return
|
|
1554
|
+
function he(e) {
|
|
1555
|
+
const t = [], n = e.replace(/`([^`]+)`/g, (i, s) => (t.push(`<code>${be(s)}</code>`), `${se}${t.length - 1}${se}`));
|
|
1556
|
+
return be(n).replace(
|
|
1182
1557
|
/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
|
|
1183
1558
|
'<a href="$2" target="_blank" rel="noopener">$1</a>'
|
|
1184
1559
|
).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(
|
|
1185
|
-
new RegExp(`${
|
|
1186
|
-
(
|
|
1560
|
+
new RegExp(`${se}(\\d+)${se}`, "g"),
|
|
1561
|
+
(i, s) => t[Number(s)] ?? ""
|
|
1187
1562
|
);
|
|
1188
1563
|
}
|
|
1189
|
-
function
|
|
1564
|
+
function be(e) {
|
|
1190
1565
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1191
1566
|
}
|
|
1192
|
-
function
|
|
1193
|
-
const
|
|
1194
|
-
function a(s, l,
|
|
1195
|
-
const
|
|
1196
|
-
let v =
|
|
1197
|
-
return v === void 0 && (v = new Intl.DateTimeFormat(
|
|
1567
|
+
function Nn(e) {
|
|
1568
|
+
const t = e.scope("webx-admin"), n = /* @__PURE__ */ new Map();
|
|
1569
|
+
function a(s, l, r) {
|
|
1570
|
+
const u = e.state.locale, d = `${u}:${s}`;
|
|
1571
|
+
let v = n.get(d);
|
|
1572
|
+
return v === void 0 && (v = new Intl.DateTimeFormat(u, l), n.set(d, v)), v.format(r);
|
|
1198
1573
|
}
|
|
1199
|
-
const
|
|
1574
|
+
const i = (s) => a("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, s);
|
|
1200
1575
|
return {
|
|
1201
1576
|
short(s) {
|
|
1202
|
-
const l =
|
|
1577
|
+
const l = re(s);
|
|
1203
1578
|
if (l === null)
|
|
1204
|
-
return
|
|
1205
|
-
const
|
|
1206
|
-
return
|
|
1579
|
+
return t("dates.never");
|
|
1580
|
+
const r = /* @__PURE__ */ new Date(), u = Se(l, r);
|
|
1581
|
+
return u === 0 ? t("dates.today", { time: i(l) }) : u === -1 ? t("dates.yesterday", { time: i(l) }) : l.getFullYear() === r.getFullYear() ? a(
|
|
1207
1582
|
"this-year",
|
|
1208
1583
|
{
|
|
1209
1584
|
day: "numeric",
|
|
@@ -1216,79 +1591,79 @@ function Zt(e) {
|
|
|
1216
1591
|
) : a("earlier", { day: "numeric", month: "long", year: "numeric" }, l);
|
|
1217
1592
|
},
|
|
1218
1593
|
compact(s) {
|
|
1219
|
-
const l =
|
|
1594
|
+
const l = re(s);
|
|
1220
1595
|
if (l === null)
|
|
1221
|
-
return
|
|
1222
|
-
const
|
|
1223
|
-
return
|
|
1596
|
+
return t("dates.never");
|
|
1597
|
+
const r = /* @__PURE__ */ new Date();
|
|
1598
|
+
return Se(l, r) === 0 ? i(l) : l.getFullYear() === r.getFullYear() ? a("compact", { day: "numeric", month: "short" }, l) : a("compact-earlier", { dateStyle: "short" }, l);
|
|
1224
1599
|
},
|
|
1225
1600
|
exact(s) {
|
|
1226
|
-
const l =
|
|
1601
|
+
const l = re(s);
|
|
1227
1602
|
return l === null ? "" : a("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, l);
|
|
1228
1603
|
},
|
|
1229
1604
|
iso(s) {
|
|
1230
|
-
const l =
|
|
1605
|
+
const l = re(s);
|
|
1231
1606
|
return l === null ? "" : l.toISOString();
|
|
1232
1607
|
}
|
|
1233
1608
|
};
|
|
1234
1609
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const e = te(
|
|
1237
|
-
return
|
|
1610
|
+
function De() {
|
|
1611
|
+
const e = te(ce, null);
|
|
1612
|
+
return Nn(e ?? Vn());
|
|
1238
1613
|
}
|
|
1239
|
-
let
|
|
1240
|
-
function
|
|
1241
|
-
return
|
|
1614
|
+
let ie = null;
|
|
1615
|
+
function Vn() {
|
|
1616
|
+
return ie === null && (ie = ge(), ie.defaults("webx-admin", Ve)), ie;
|
|
1242
1617
|
}
|
|
1243
|
-
function
|
|
1618
|
+
function re(e) {
|
|
1244
1619
|
if (e == null || e === "")
|
|
1245
1620
|
return null;
|
|
1246
|
-
const
|
|
1247
|
-
return Number.isNaN(
|
|
1621
|
+
const t = e instanceof Date ? e : new Date(e);
|
|
1622
|
+
return Number.isNaN(t.getTime()) ? null : t;
|
|
1248
1623
|
}
|
|
1249
|
-
function
|
|
1250
|
-
const
|
|
1251
|
-
return Math.round((
|
|
1624
|
+
function Se(e, t) {
|
|
1625
|
+
const n = (a) => Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
|
|
1626
|
+
return Math.round((n(e) - n(t)) / 864e5);
|
|
1252
1627
|
}
|
|
1253
|
-
function
|
|
1254
|
-
const a = e instanceof
|
|
1628
|
+
function In(e, t, n) {
|
|
1629
|
+
const a = e instanceof pe ? e.status : Mn(e);
|
|
1255
1630
|
if (a === 422)
|
|
1256
|
-
return
|
|
1257
|
-
if (a === 401) return
|
|
1258
|
-
if (a === 403) return
|
|
1259
|
-
if (a === 404) return
|
|
1260
|
-
if (a === 409) return
|
|
1631
|
+
return Pn(e) ?? n ?? t("errors.unknown");
|
|
1632
|
+
if (a === 401) return t("errors.signed-out");
|
|
1633
|
+
if (a === 403) return t("errors.forbidden");
|
|
1634
|
+
if (a === 404) return t("errors.gone");
|
|
1635
|
+
if (a === 409) return t("errors.conflict");
|
|
1261
1636
|
if (a === 429) {
|
|
1262
|
-
const
|
|
1263
|
-
return
|
|
1637
|
+
const i = e instanceof pe ? e.retryAfter : null;
|
|
1638
|
+
return i === null ? t("errors.throttled") : t("errors.throttled-in", { seconds: i });
|
|
1264
1639
|
}
|
|
1265
|
-
return a !== null && a >= 500 ?
|
|
1640
|
+
return a !== null && a >= 500 ? t("errors.server") : a === null ? t("errors.offline") : n ?? t("errors.unknown");
|
|
1266
1641
|
}
|
|
1267
|
-
function
|
|
1268
|
-
const e =
|
|
1269
|
-
return (
|
|
1642
|
+
function Dn() {
|
|
1643
|
+
const e = V("webx-admin");
|
|
1644
|
+
return (t, n) => In(t, e, n);
|
|
1270
1645
|
}
|
|
1271
|
-
function
|
|
1272
|
-
const
|
|
1273
|
-
return typeof
|
|
1646
|
+
function Mn(e) {
|
|
1647
|
+
const t = e?.status;
|
|
1648
|
+
return typeof t == "number" ? t : null;
|
|
1274
1649
|
}
|
|
1275
|
-
function
|
|
1276
|
-
const
|
|
1277
|
-
return typeof
|
|
1650
|
+
function Pn(e) {
|
|
1651
|
+
const n = e?.body?.message;
|
|
1652
|
+
return typeof n == "string" && n !== "" ? n : null;
|
|
1278
1653
|
}
|
|
1279
|
-
function
|
|
1280
|
-
const a = `${e.apiPath}/entities/${
|
|
1654
|
+
function Fn(e, t, n) {
|
|
1655
|
+
const a = `${e.apiPath}/entities/${t}/${n}/notes`, i = (l) => `${e.apiPath}/notes/${l}`, s = (l) => l.data;
|
|
1281
1656
|
return {
|
|
1282
1657
|
list: () => e.http.get(a).then(s),
|
|
1283
1658
|
add: (l) => e.http.post(a, { body: l }).then(s),
|
|
1284
|
-
save: (l,
|
|
1285
|
-
remove: (l) => e.http.delete(
|
|
1659
|
+
save: (l, r) => e.http.put(i(l), { body: r }).then(s),
|
|
1660
|
+
remove: (l) => e.http.delete(i(l)).then(() => {
|
|
1286
1661
|
})
|
|
1287
1662
|
};
|
|
1288
1663
|
}
|
|
1289
|
-
const
|
|
1664
|
+
const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
|
|
1290
1665
|
__name: "Screen",
|
|
1291
|
-
props: /* @__PURE__ */
|
|
1666
|
+
props: /* @__PURE__ */ ee({
|
|
1292
1667
|
name: {},
|
|
1293
1668
|
errors: { default: void 0 },
|
|
1294
1669
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -1299,39 +1674,39 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1299
1674
|
modelValue: { default: () => ({}) },
|
|
1300
1675
|
modelModifiers: {}
|
|
1301
1676
|
}),
|
|
1302
|
-
emits: /* @__PURE__ */
|
|
1303
|
-
setup(e, { expose:
|
|
1304
|
-
const a = e,
|
|
1677
|
+
emits: /* @__PURE__ */ ee(["loaded"], ["update:modelValue"]),
|
|
1678
|
+
setup(e, { expose: t, emit: n }) {
|
|
1679
|
+
const a = e, i = n, s = de(e, "modelValue"), l = q(), r = V("webx-admin"), u = C(null), d = C(null);
|
|
1305
1680
|
async function v() {
|
|
1306
|
-
|
|
1681
|
+
u.value = null, d.value = null;
|
|
1307
1682
|
try {
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
} catch (
|
|
1311
|
-
|
|
1683
|
+
const m = await l.loadScreen(a.name);
|
|
1684
|
+
u.value = m, i("loaded", m);
|
|
1685
|
+
} catch (m) {
|
|
1686
|
+
d.value = m instanceof Error ? m.message : String(m);
|
|
1312
1687
|
}
|
|
1313
1688
|
}
|
|
1314
|
-
return
|
|
1689
|
+
return J([() => a.name, () => l.i18n.state.locale], () => {
|
|
1315
1690
|
v();
|
|
1316
|
-
}, { immediate: !0 }),
|
|
1317
|
-
|
|
1691
|
+
}, { immediate: !0 }), t({ reload: v }), (m, p) => (f(), $("div", Hn, [
|
|
1692
|
+
d.value ? (f(), S(o(Re), {
|
|
1318
1693
|
key: 0,
|
|
1319
1694
|
type: "danger",
|
|
1320
|
-
title:
|
|
1321
|
-
description:
|
|
1322
|
-
}, null, 8, ["title", "description"])) :
|
|
1695
|
+
title: o(r)("shell.error-title"),
|
|
1696
|
+
description: d.value
|
|
1697
|
+
}, null, 8, ["title", "description"])) : u.value === null ? (f(), S(o(Ue), {
|
|
1323
1698
|
key: 1,
|
|
1324
1699
|
rows: 4
|
|
1325
|
-
})) : (
|
|
1700
|
+
})) : (f(), S(o(Ct), {
|
|
1326
1701
|
key: 2,
|
|
1327
1702
|
modelValue: s.value,
|
|
1328
|
-
"onUpdate:modelValue":
|
|
1329
|
-
root:
|
|
1330
|
-
patch:
|
|
1331
|
-
types:
|
|
1703
|
+
"onUpdate:modelValue": p[0] || (p[0] = (c) => s.value = c),
|
|
1704
|
+
root: u.value,
|
|
1705
|
+
patch: o(l).screenPatch(e.name),
|
|
1706
|
+
types: o(l).types,
|
|
1332
1707
|
errors: e.errors,
|
|
1333
|
-
translate:
|
|
1334
|
-
can:
|
|
1708
|
+
translate: o(l).i18n.t,
|
|
1709
|
+
can: o(l).can,
|
|
1335
1710
|
disabled: e.disabled,
|
|
1336
1711
|
"label-position": e.labelPosition,
|
|
1337
1712
|
"label-width": e.labelWidth,
|
|
@@ -1339,63 +1714,63 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1339
1714
|
}, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
|
|
1340
1715
|
]));
|
|
1341
1716
|
}
|
|
1342
|
-
}),
|
|
1717
|
+
}), ha = 76, On = {
|
|
1343
1718
|
class: "wx-save-state",
|
|
1344
1719
|
role: "status",
|
|
1345
1720
|
"aria-live": "polite"
|
|
1346
|
-
},
|
|
1721
|
+
}, jn = /* @__PURE__ */ E({
|
|
1347
1722
|
__name: "SaveState",
|
|
1348
1723
|
props: {
|
|
1349
1724
|
state: {},
|
|
1350
1725
|
linger: { default: 2e3 }
|
|
1351
1726
|
},
|
|
1352
1727
|
setup(e) {
|
|
1353
|
-
const
|
|
1354
|
-
let
|
|
1355
|
-
|
|
1356
|
-
() =>
|
|
1357
|
-
(l,
|
|
1358
|
-
|
|
1359
|
-
a.value = !1,
|
|
1360
|
-
},
|
|
1728
|
+
const t = e, n = V("webx-admin"), a = C(!1);
|
|
1729
|
+
let i = null;
|
|
1730
|
+
J(
|
|
1731
|
+
() => t.state,
|
|
1732
|
+
(l, r) => {
|
|
1733
|
+
i !== null && clearTimeout(i), a.value = r === "saving" && l === "saved", a.value && (i = window.setTimeout(() => {
|
|
1734
|
+
a.value = !1, i = null;
|
|
1735
|
+
}, t.linger));
|
|
1361
1736
|
}
|
|
1362
1737
|
);
|
|
1363
1738
|
const s = x(
|
|
1364
|
-
() =>
|
|
1739
|
+
() => t.state === "saving" ? "saving" : a.value ? "saved" : null
|
|
1365
1740
|
);
|
|
1366
|
-
return
|
|
1367
|
-
|
|
1368
|
-
}), (l,
|
|
1369
|
-
s.value ? (
|
|
1741
|
+
return Qe(() => {
|
|
1742
|
+
i !== null && clearTimeout(i);
|
|
1743
|
+
}), (l, r) => (f(), $("span", On, [
|
|
1744
|
+
s.value ? (f(), S(o(ze), {
|
|
1370
1745
|
key: 0,
|
|
1371
|
-
class:
|
|
1746
|
+
class: G(["wx-save-state__mark", { "is-saved": s.value === "saved" }]),
|
|
1372
1747
|
name: s.value === "saving" ? "loader" : "check",
|
|
1373
1748
|
spin: s.value === "saving",
|
|
1374
|
-
label:
|
|
1749
|
+
label: o(n)(`editor.${s.value}`)
|
|
1375
1750
|
}, null, 8, ["class", "name", "spin", "label"])) : z("", !0)
|
|
1376
1751
|
]));
|
|
1377
1752
|
}
|
|
1378
|
-
}),
|
|
1753
|
+
}), pa = /* @__PURE__ */ F(jn, [["__scopeId", "data-v-216e5e44"]]), ba = /* @__PURE__ */ E({
|
|
1379
1754
|
__name: "FilterChips",
|
|
1380
1755
|
props: {
|
|
1381
1756
|
filters: {}
|
|
1382
1757
|
},
|
|
1383
1758
|
setup(e) {
|
|
1384
|
-
return (
|
|
1759
|
+
return (t, n) => (f(!0), $(D, null, K(e.filters, (a) => (f(), S(o(wt), {
|
|
1385
1760
|
key: a.key,
|
|
1386
1761
|
class: "wx-filter-chip",
|
|
1387
1762
|
size: "sm",
|
|
1388
1763
|
round: "",
|
|
1389
1764
|
closable: "",
|
|
1390
|
-
onClose: (
|
|
1765
|
+
onClose: (i) => a.clear()
|
|
1391
1766
|
}, {
|
|
1392
1767
|
default: g(() => [
|
|
1393
|
-
W(
|
|
1768
|
+
R(W(a.label), 1)
|
|
1394
1769
|
]),
|
|
1395
1770
|
_: 2
|
|
1396
1771
|
}, 1032, ["onClose"]))), 128));
|
|
1397
1772
|
}
|
|
1398
|
-
}),
|
|
1773
|
+
}), Kn = { class: "wx-rename__footer" }, qn = /* @__PURE__ */ E({
|
|
1399
1774
|
__name: "RenameButton",
|
|
1400
1775
|
props: {
|
|
1401
1776
|
name: { default: "" },
|
|
@@ -1405,32 +1780,32 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1405
1780
|
size: { default: "sm" }
|
|
1406
1781
|
},
|
|
1407
1782
|
emits: ["rename"],
|
|
1408
|
-
setup(e, { emit:
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
v && (l.value =
|
|
1783
|
+
setup(e, { emit: t }) {
|
|
1784
|
+
const n = e, a = t, i = V("webx-admin"), s = C(!1), l = C(n.name), r = C(null), u = x(() => n.label ?? i("editor.rename"));
|
|
1785
|
+
J(s, async (v) => {
|
|
1786
|
+
v && (l.value = n.name, await Ze(), r.value?.focus(), r.value?.select());
|
|
1412
1787
|
});
|
|
1413
|
-
function
|
|
1788
|
+
function d() {
|
|
1414
1789
|
const v = l.value.trim();
|
|
1415
|
-
if (v === "" || v ===
|
|
1790
|
+
if (v === "" || v === n.name) {
|
|
1416
1791
|
s.value = !1;
|
|
1417
1792
|
return;
|
|
1418
1793
|
}
|
|
1419
1794
|
a("rename", v), s.value = !1;
|
|
1420
1795
|
}
|
|
1421
|
-
return (v,
|
|
1796
|
+
return (v, m) => (f(), S(o(xt), {
|
|
1422
1797
|
open: s.value,
|
|
1423
|
-
"onUpdate:open":
|
|
1424
|
-
title:
|
|
1798
|
+
"onUpdate:open": m[2] || (m[2] = (p) => s.value = p),
|
|
1799
|
+
title: u.value,
|
|
1425
1800
|
width: 320,
|
|
1426
1801
|
side: "bottom",
|
|
1427
1802
|
align: "start",
|
|
1428
1803
|
teleport: ""
|
|
1429
1804
|
}, {
|
|
1430
1805
|
trigger: g(() => [
|
|
1431
|
-
|
|
1806
|
+
k(o(ne), {
|
|
1432
1807
|
type: "edit",
|
|
1433
|
-
title:
|
|
1808
|
+
title: u.value,
|
|
1434
1809
|
size: e.size,
|
|
1435
1810
|
disabled: e.disabled
|
|
1436
1811
|
}, null, 8, ["title", "size", "disabled"])
|
|
@@ -1438,25 +1813,25 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1438
1813
|
default: g(() => [
|
|
1439
1814
|
M("form", {
|
|
1440
1815
|
class: "wx-rename",
|
|
1441
|
-
onSubmit:
|
|
1816
|
+
onSubmit: Le(d, ["prevent"])
|
|
1442
1817
|
}, [
|
|
1443
|
-
|
|
1818
|
+
k(o(Ce), {
|
|
1444
1819
|
ref_key: "field",
|
|
1445
|
-
ref:
|
|
1820
|
+
ref: r,
|
|
1446
1821
|
modelValue: l.value,
|
|
1447
|
-
"onUpdate:modelValue":
|
|
1448
|
-
"aria-label":
|
|
1822
|
+
"onUpdate:modelValue": m[0] || (m[0] = (p) => l.value = p),
|
|
1823
|
+
"aria-label": u.value,
|
|
1449
1824
|
placeholder: e.placeholder,
|
|
1450
|
-
onKeydown:
|
|
1825
|
+
onKeydown: m[1] || (m[1] = et((p) => s.value = !1, ["esc"]))
|
|
1451
1826
|
}, null, 8, ["modelValue", "aria-label", "placeholder"]),
|
|
1452
|
-
M("div",
|
|
1453
|
-
|
|
1827
|
+
M("div", Kn, [
|
|
1828
|
+
k(o(Z), {
|
|
1454
1829
|
type: "primary",
|
|
1455
1830
|
size: "sm",
|
|
1456
1831
|
"native-type": "submit"
|
|
1457
1832
|
}, {
|
|
1458
1833
|
default: g(() => [
|
|
1459
|
-
W(
|
|
1834
|
+
R(W(o(i)("editor.save")), 1)
|
|
1460
1835
|
]),
|
|
1461
1836
|
_: 1
|
|
1462
1837
|
})
|
|
@@ -1466,7 +1841,7 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1466
1841
|
_: 1
|
|
1467
1842
|
}, 8, ["open", "title"]));
|
|
1468
1843
|
}
|
|
1469
|
-
}),
|
|
1844
|
+
}), ga = /* @__PURE__ */ F(qn, [["__scopeId", "data-v-d879e8d3"]]), Yn = ["innerHTML"], Xn = /* @__PURE__ */ E({
|
|
1470
1845
|
__name: "HelpButton",
|
|
1471
1846
|
props: {
|
|
1472
1847
|
body: {},
|
|
@@ -1476,33 +1851,33 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1476
1851
|
width: { default: 720 }
|
|
1477
1852
|
},
|
|
1478
1853
|
setup(e) {
|
|
1479
|
-
const
|
|
1480
|
-
return (l,
|
|
1481
|
-
|
|
1854
|
+
const t = e, n = V("webx-admin"), a = C(!1), i = x(() => t.title ?? n("help.title")), s = x(() => Bn(t.body));
|
|
1855
|
+
return (l, r) => (f(), $(D, null, [
|
|
1856
|
+
k(o(ne), {
|
|
1482
1857
|
type: "details",
|
|
1483
1858
|
icon: "question",
|
|
1484
1859
|
tone: "neutral",
|
|
1485
1860
|
size: e.size,
|
|
1486
|
-
title: e.label ??
|
|
1487
|
-
onClick:
|
|
1861
|
+
title: e.label ?? i.value,
|
|
1862
|
+
onClick: r[0] || (r[0] = (u) => a.value = !0)
|
|
1488
1863
|
}, null, 8, ["size", "title"]),
|
|
1489
|
-
|
|
1864
|
+
k(o(kt), {
|
|
1490
1865
|
open: a.value,
|
|
1491
|
-
"onUpdate:open":
|
|
1492
|
-
title:
|
|
1866
|
+
"onUpdate:open": r[1] || (r[1] = (u) => a.value = u),
|
|
1867
|
+
title: i.value,
|
|
1493
1868
|
width: e.width
|
|
1494
1869
|
}, {
|
|
1495
1870
|
default: g(() => [
|
|
1496
1871
|
M("div", {
|
|
1497
1872
|
class: "wx-help",
|
|
1498
1873
|
innerHTML: s.value
|
|
1499
|
-
}, null, 8,
|
|
1874
|
+
}, null, 8, Yn)
|
|
1500
1875
|
]),
|
|
1501
1876
|
_: 1
|
|
1502
1877
|
}, 8, ["open", "title", "width"])
|
|
1503
1878
|
], 64));
|
|
1504
1879
|
}
|
|
1505
|
-
}),
|
|
1880
|
+
}), ya = /* @__PURE__ */ F(Xn, [["__scopeId", "data-v-6c280d42"]]), Me = /* @__PURE__ */ E({
|
|
1506
1881
|
name: "WxDate",
|
|
1507
1882
|
__name: "DateText",
|
|
1508
1883
|
props: {
|
|
@@ -1512,46 +1887,46 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1512
1887
|
tone: { default: "muted" }
|
|
1513
1888
|
},
|
|
1514
1889
|
setup(e) {
|
|
1515
|
-
const
|
|
1516
|
-
return (l,
|
|
1890
|
+
const t = e, n = De(), a = x(() => t.compact ? n.compact(t.value) : n.short(t.value)), i = x(() => n.exact(t.value)), s = x(() => n.iso(t.value));
|
|
1891
|
+
return (l, r) => i.value ? (f(), S(o(_t), {
|
|
1517
1892
|
key: 0,
|
|
1518
|
-
content:
|
|
1893
|
+
content: i.value
|
|
1519
1894
|
}, {
|
|
1520
1895
|
default: g(() => [
|
|
1521
|
-
|
|
1896
|
+
k(o(H), {
|
|
1522
1897
|
as: "time",
|
|
1523
1898
|
datetime: s.value,
|
|
1524
1899
|
size: e.size,
|
|
1525
1900
|
tone: e.tone
|
|
1526
1901
|
}, {
|
|
1527
1902
|
default: g(() => [
|
|
1528
|
-
W(
|
|
1903
|
+
R(W(a.value), 1)
|
|
1529
1904
|
]),
|
|
1530
1905
|
_: 1
|
|
1531
1906
|
}, 8, ["datetime", "size", "tone"])
|
|
1532
1907
|
]),
|
|
1533
1908
|
_: 1
|
|
1534
|
-
}, 8, ["content"])) : (
|
|
1909
|
+
}, 8, ["content"])) : (f(), S(o(H), {
|
|
1535
1910
|
key: 1,
|
|
1536
1911
|
size: e.size,
|
|
1537
1912
|
tone: e.tone
|
|
1538
1913
|
}, {
|
|
1539
1914
|
default: g(() => [
|
|
1540
|
-
W(
|
|
1915
|
+
R(W(a.value), 1)
|
|
1541
1916
|
]),
|
|
1542
1917
|
_: 1
|
|
1543
1918
|
}, 8, ["size", "tone"]));
|
|
1544
1919
|
}
|
|
1545
|
-
}),
|
|
1920
|
+
}), Gn = { class: "wx-notes" }, Jn = {
|
|
1546
1921
|
key: 3,
|
|
1547
1922
|
class: "wx-notes__list"
|
|
1548
|
-
},
|
|
1923
|
+
}, Qn = { class: "wx-note__body" }, Zn = { class: "wx-note__head" }, ea = { class: "wx-note__buttons" }, ta = {
|
|
1549
1924
|
key: 1,
|
|
1550
1925
|
class: "wx-note__text"
|
|
1551
|
-
},
|
|
1926
|
+
}, na = {
|
|
1552
1927
|
key: 4,
|
|
1553
1928
|
class: "wx-notes__new"
|
|
1554
|
-
},
|
|
1929
|
+
}, aa = /* @__PURE__ */ E({
|
|
1555
1930
|
name: "WxNotes",
|
|
1556
1931
|
__name: "NotesFeed",
|
|
1557
1932
|
props: {
|
|
@@ -1561,53 +1936,53 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1561
1936
|
title: { default: void 0 }
|
|
1562
1937
|
},
|
|
1563
1938
|
emits: ["change"],
|
|
1564
|
-
setup(e, { emit:
|
|
1565
|
-
const
|
|
1566
|
-
async function
|
|
1567
|
-
|
|
1939
|
+
setup(e, { emit: t }) {
|
|
1940
|
+
const n = e, a = t, i = q(), s = V("webx-admin"), l = Dn(), r = C([]), u = C(!0), d = C(""), v = C(!1), m = C(null), p = C(""), c = x(() => Fn(i, n.type, n.id)), _ = x(() => n.title ?? s("notes.title"));
|
|
1941
|
+
async function h() {
|
|
1942
|
+
u.value = !0;
|
|
1568
1943
|
try {
|
|
1569
|
-
|
|
1570
|
-
} catch (
|
|
1571
|
-
|
|
1944
|
+
r.value = await c.value.list();
|
|
1945
|
+
} catch (T) {
|
|
1946
|
+
X.danger(l(T));
|
|
1572
1947
|
} finally {
|
|
1573
|
-
|
|
1948
|
+
u.value = !1;
|
|
1574
1949
|
}
|
|
1575
1950
|
}
|
|
1576
|
-
|
|
1577
|
-
() => [
|
|
1951
|
+
J(
|
|
1952
|
+
() => [n.type, n.id],
|
|
1578
1953
|
() => {
|
|
1579
|
-
|
|
1954
|
+
m.value = null, d.value = "", h();
|
|
1580
1955
|
},
|
|
1581
1956
|
{ immediate: !0 }
|
|
1582
1957
|
);
|
|
1583
|
-
async function
|
|
1584
|
-
const
|
|
1585
|
-
if (!(
|
|
1958
|
+
async function b() {
|
|
1959
|
+
const T = d.value.trim();
|
|
1960
|
+
if (!(T === "" || v.value)) {
|
|
1586
1961
|
v.value = !0;
|
|
1587
1962
|
try {
|
|
1588
|
-
|
|
1589
|
-
} catch (
|
|
1590
|
-
|
|
1963
|
+
r.value = [...r.value, await c.value.add(T)], d.value = "", a("change");
|
|
1964
|
+
} catch (B) {
|
|
1965
|
+
X.danger(l(B));
|
|
1591
1966
|
} finally {
|
|
1592
1967
|
v.value = !1;
|
|
1593
1968
|
}
|
|
1594
1969
|
}
|
|
1595
1970
|
}
|
|
1596
|
-
function
|
|
1597
|
-
|
|
1971
|
+
function w(T) {
|
|
1972
|
+
m.value = T.id, p.value = T.body;
|
|
1598
1973
|
}
|
|
1599
|
-
async function
|
|
1600
|
-
const
|
|
1601
|
-
if (
|
|
1974
|
+
async function O(T) {
|
|
1975
|
+
const B = p.value.trim();
|
|
1976
|
+
if (B !== "")
|
|
1602
1977
|
try {
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1605
|
-
} catch (
|
|
1606
|
-
|
|
1978
|
+
const L = await c.value.save(T.id, B);
|
|
1979
|
+
r.value = r.value.map((P) => P.id === L.id ? L : P), m.value = null, X.success(s("notes.saved")), a("change");
|
|
1980
|
+
} catch (L) {
|
|
1981
|
+
X.danger(l(L));
|
|
1607
1982
|
}
|
|
1608
1983
|
}
|
|
1609
|
-
async function
|
|
1610
|
-
if (await
|
|
1984
|
+
async function Q(T) {
|
|
1985
|
+
if (await Tt({
|
|
1611
1986
|
title: s("notes.delete-title"),
|
|
1612
1987
|
message: s("notes.delete-text"),
|
|
1613
1988
|
confirmText: s("notes.delete"),
|
|
@@ -1615,168 +1990,235 @@ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
|
|
|
1615
1990
|
tone: "danger"
|
|
1616
1991
|
}))
|
|
1617
1992
|
try {
|
|
1618
|
-
await
|
|
1619
|
-
} catch (
|
|
1620
|
-
|
|
1993
|
+
await c.value.remove(T.id), r.value = r.value.filter((L) => L.id !== T.id), X.success(s("notes.deleted")), a("change");
|
|
1994
|
+
} catch (L) {
|
|
1995
|
+
X.danger(l(L));
|
|
1621
1996
|
}
|
|
1622
1997
|
}
|
|
1623
|
-
function
|
|
1624
|
-
return !
|
|
1625
|
-
{ key: "edit", icon: "edit", label: s("notes.edit"), run: () =>
|
|
1998
|
+
function Y(T) {
|
|
1999
|
+
return !n.can || !T.is_mine ? [] : [
|
|
2000
|
+
{ key: "edit", icon: "edit", label: s("notes.edit"), run: () => w(T) },
|
|
1626
2001
|
{
|
|
1627
2002
|
key: "delete",
|
|
1628
2003
|
icon: "trash",
|
|
1629
2004
|
label: s("notes.delete"),
|
|
1630
2005
|
danger: !0,
|
|
1631
2006
|
run: () => {
|
|
1632
|
-
|
|
2007
|
+
Q(T);
|
|
1633
2008
|
}
|
|
1634
2009
|
}
|
|
1635
2010
|
];
|
|
1636
2011
|
}
|
|
1637
|
-
function
|
|
1638
|
-
return
|
|
2012
|
+
function j(T) {
|
|
2013
|
+
return T.author?.name ?? s("notes.unknown-author");
|
|
1639
2014
|
}
|
|
1640
|
-
return (
|
|
1641
|
-
|
|
2015
|
+
return (T, B) => (f(), $("section", Gn, [
|
|
2016
|
+
_.value ? (f(), S(o(H), {
|
|
1642
2017
|
key: 0,
|
|
1643
2018
|
weight: "medium",
|
|
1644
2019
|
class: "wx-notes__title"
|
|
1645
2020
|
}, {
|
|
1646
2021
|
default: g(() => [
|
|
1647
|
-
W(
|
|
2022
|
+
R(W(_.value), 1)
|
|
1648
2023
|
]),
|
|
1649
2024
|
_: 1
|
|
1650
2025
|
})) : z("", !0),
|
|
1651
|
-
|
|
2026
|
+
u.value ? (f(), S(o(Ue), {
|
|
1652
2027
|
key: 1,
|
|
1653
2028
|
rows: 2
|
|
1654
|
-
})) :
|
|
2029
|
+
})) : r.value.length === 0 ? (f(), S(o($t), {
|
|
1655
2030
|
key: 2,
|
|
1656
2031
|
size: "sm",
|
|
1657
|
-
description:
|
|
1658
|
-
}, null, 8, ["description"])) : (
|
|
1659
|
-
(
|
|
1660
|
-
key:
|
|
2032
|
+
description: o(s)("notes.empty")
|
|
2033
|
+
}, null, 8, ["description"])) : (f(), $("ul", Jn, [
|
|
2034
|
+
(f(!0), $(D, null, K(r.value, (L) => (f(), $("li", {
|
|
2035
|
+
key: L.id,
|
|
1661
2036
|
class: "wx-note"
|
|
1662
2037
|
}, [
|
|
1663
|
-
|
|
1664
|
-
name:
|
|
2038
|
+
k(o(St), {
|
|
2039
|
+
name: j(L),
|
|
1665
2040
|
size: "sm",
|
|
1666
2041
|
tone: "auto"
|
|
1667
2042
|
}, null, 8, ["name"]),
|
|
1668
|
-
M("div",
|
|
1669
|
-
M("div",
|
|
1670
|
-
|
|
2043
|
+
M("div", Qn, [
|
|
2044
|
+
M("div", Zn, [
|
|
2045
|
+
k(o(H), {
|
|
1671
2046
|
size: "sm",
|
|
1672
2047
|
weight: "medium",
|
|
1673
2048
|
truncate: ""
|
|
1674
2049
|
}, {
|
|
1675
2050
|
default: g(() => [
|
|
1676
|
-
W(
|
|
2051
|
+
R(W(j(L)), 1)
|
|
1677
2052
|
]),
|
|
1678
2053
|
_: 2
|
|
1679
2054
|
}, 1024),
|
|
1680
|
-
|
|
1681
|
-
value:
|
|
2055
|
+
k(Me, {
|
|
2056
|
+
value: L.created_at
|
|
1682
2057
|
}, null, 8, ["value"]),
|
|
1683
|
-
|
|
1684
|
-
actions:
|
|
1685
|
-
label:
|
|
2058
|
+
k(Ee, {
|
|
2059
|
+
actions: Y(L),
|
|
2060
|
+
label: j(L)
|
|
1686
2061
|
}, null, 8, ["actions", "label"])
|
|
1687
2062
|
]),
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
modelValue:
|
|
1691
|
-
"onUpdate:modelValue":
|
|
2063
|
+
m.value === L.id ? (f(), $(D, { key: 0 }, [
|
|
2064
|
+
k(o(ke), {
|
|
2065
|
+
modelValue: p.value,
|
|
2066
|
+
"onUpdate:modelValue": B[0] || (B[0] = (P) => p.value = P),
|
|
1692
2067
|
autosize: { minRows: 2, maxRows: 10 }
|
|
1693
2068
|
}, null, 8, ["modelValue"]),
|
|
1694
|
-
M("div",
|
|
1695
|
-
|
|
2069
|
+
M("div", ea, [
|
|
2070
|
+
k(o(Z), {
|
|
1696
2071
|
size: "sm",
|
|
1697
2072
|
type: "primary",
|
|
1698
|
-
onClick: (
|
|
2073
|
+
onClick: (P) => O(L)
|
|
1699
2074
|
}, {
|
|
1700
2075
|
default: g(() => [
|
|
1701
|
-
W(
|
|
2076
|
+
R(W(o(s)("notes.save")), 1)
|
|
1702
2077
|
]),
|
|
1703
2078
|
_: 1
|
|
1704
2079
|
}, 8, ["onClick"]),
|
|
1705
|
-
|
|
2080
|
+
k(o(Z), {
|
|
1706
2081
|
size: "sm",
|
|
1707
2082
|
variant: "text",
|
|
1708
|
-
onClick:
|
|
2083
|
+
onClick: B[1] || (B[1] = (P) => m.value = null)
|
|
1709
2084
|
}, {
|
|
1710
2085
|
default: g(() => [
|
|
1711
|
-
W(
|
|
2086
|
+
R(W(o(s)("notes.cancel")), 1)
|
|
1712
2087
|
]),
|
|
1713
2088
|
_: 1
|
|
1714
2089
|
})
|
|
1715
2090
|
])
|
|
1716
|
-
], 64)) : (
|
|
2091
|
+
], 64)) : (f(), $("p", ta, W(L.body), 1))
|
|
1717
2092
|
])
|
|
1718
2093
|
]))), 128))
|
|
1719
2094
|
])),
|
|
1720
|
-
e.can ? (
|
|
1721
|
-
|
|
1722
|
-
modelValue:
|
|
1723
|
-
"onUpdate:modelValue":
|
|
1724
|
-
placeholder:
|
|
2095
|
+
e.can ? (f(), $("div", na, [
|
|
2096
|
+
k(o(ke), {
|
|
2097
|
+
modelValue: d.value,
|
|
2098
|
+
"onUpdate:modelValue": B[2] || (B[2] = (L) => d.value = L),
|
|
2099
|
+
placeholder: o(s)("notes.placeholder"),
|
|
1725
2100
|
autosize: { minRows: 2, maxRows: 8 }
|
|
1726
2101
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
1727
|
-
|
|
2102
|
+
k(o(Z), {
|
|
1728
2103
|
size: "sm",
|
|
1729
2104
|
type: "primary",
|
|
1730
|
-
disabled:
|
|
2105
|
+
disabled: d.value.trim() === "",
|
|
1731
2106
|
loading: v.value,
|
|
1732
|
-
onClick:
|
|
2107
|
+
onClick: b
|
|
1733
2108
|
}, {
|
|
1734
2109
|
default: g(() => [
|
|
1735
|
-
W(
|
|
2110
|
+
R(W(o(s)("notes.add")), 1)
|
|
1736
2111
|
]),
|
|
1737
2112
|
_: 1
|
|
1738
2113
|
}, 8, ["disabled", "loading"])
|
|
1739
2114
|
])) : z("", !0)
|
|
1740
2115
|
]));
|
|
1741
2116
|
}
|
|
1742
|
-
}),
|
|
2117
|
+
}), wa = /* @__PURE__ */ F(aa, [["__scopeId", "data-v-71004c1a"]]), la = {
|
|
2118
|
+
key: 1,
|
|
2119
|
+
class: "wx-backup-note"
|
|
2120
|
+
}, sa = 48, oa = /* @__PURE__ */ E({
|
|
2121
|
+
name: "WxBackupNote",
|
|
2122
|
+
__name: "BackupNote",
|
|
2123
|
+
setup(e) {
|
|
2124
|
+
const t = q(), n = De(), a = V("webx-admin"), i = x(() => t.state.manifest?.backup ?? null), s = x(() => i.value !== null && t.can("settings.view")), l = x(() => {
|
|
2125
|
+
const d = i.value?.at;
|
|
2126
|
+
if (d == null) return !0;
|
|
2127
|
+
const v = new Date(d).getTime();
|
|
2128
|
+
return Number.isNaN(v) || Date.now() - v > sa * 36e5;
|
|
2129
|
+
}), r = x(() => {
|
|
2130
|
+
const d = i.value?.bytes;
|
|
2131
|
+
if (d == null) return "";
|
|
2132
|
+
const v = ["byte", "kilobyte", "megabyte", "gigabyte", "terabyte"];
|
|
2133
|
+
let m = d, p = 0;
|
|
2134
|
+
for (; m >= 1024 && p < v.length - 1; )
|
|
2135
|
+
m /= 1024, p++;
|
|
2136
|
+
return new Intl.NumberFormat(t.i18n.state.locale, {
|
|
2137
|
+
style: "unit",
|
|
2138
|
+
unit: v[p],
|
|
2139
|
+
unitDisplay: "short",
|
|
2140
|
+
maximumFractionDigits: m >= 10 || p === 0 ? 0 : 1
|
|
2141
|
+
}).format(m);
|
|
2142
|
+
}), u = x(
|
|
2143
|
+
() => i.value?.at == null ? a("backup.never") : a("backup.stale", { date: n.short(i.value.at) })
|
|
2144
|
+
);
|
|
2145
|
+
return (d, v) => s.value && l.value ? (f(), S(o(Re), {
|
|
2146
|
+
key: 0,
|
|
2147
|
+
type: "warning",
|
|
2148
|
+
variant: "soft",
|
|
2149
|
+
description: u.value
|
|
2150
|
+
}, null, 8, ["description"])) : s.value ? (f(), $("p", la, [
|
|
2151
|
+
k(o(H), {
|
|
2152
|
+
size: "sm",
|
|
2153
|
+
tone: "muted"
|
|
2154
|
+
}, {
|
|
2155
|
+
default: g(() => [
|
|
2156
|
+
R(W(o(a)("backup.title")), 1)
|
|
2157
|
+
]),
|
|
2158
|
+
_: 1
|
|
2159
|
+
}),
|
|
2160
|
+
k(Me, {
|
|
2161
|
+
value: i.value?.at
|
|
2162
|
+
}, null, 8, ["value"]),
|
|
2163
|
+
r.value ? (f(), S(o(H), {
|
|
2164
|
+
key: 0,
|
|
2165
|
+
size: "sm",
|
|
2166
|
+
tone: "muted"
|
|
2167
|
+
}, {
|
|
2168
|
+
default: g(() => [
|
|
2169
|
+
R("· " + W(r.value), 1)
|
|
2170
|
+
]),
|
|
2171
|
+
_: 1
|
|
2172
|
+
})) : z("", !0)
|
|
2173
|
+
])) : z("", !0);
|
|
2174
|
+
}
|
|
2175
|
+
}), xa = /* @__PURE__ */ F(oa, [["__scopeId", "data-v-beeee67e"]]);
|
|
1743
2176
|
export {
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
2177
|
+
un as AdminLanding,
|
|
2178
|
+
dn as AdminNav,
|
|
2179
|
+
wn as AdminShell,
|
|
2180
|
+
pe as HttpError,
|
|
2181
|
+
jt as WxBackButton,
|
|
2182
|
+
xa as WxBackupNote,
|
|
2183
|
+
Me as WxDate,
|
|
2184
|
+
ba as WxFilterChips,
|
|
2185
|
+
ya as WxHelpButton,
|
|
2186
|
+
Ot as WxLinkField,
|
|
2187
|
+
Ht as WxLinkPicker,
|
|
2188
|
+
nn as WxListScreen,
|
|
2189
|
+
wa as WxNotes,
|
|
2190
|
+
ga as WxRenameButton,
|
|
2191
|
+
an as WxRichTextField,
|
|
2192
|
+
Ee as WxRowMenu,
|
|
2193
|
+
pa as WxSaveState,
|
|
2194
|
+
va as WxScreen,
|
|
2195
|
+
Zt as WxScreenHead,
|
|
2196
|
+
Be as adminKey,
|
|
2197
|
+
Ve as adminMessages,
|
|
2198
|
+
ln as adminTypes,
|
|
2199
|
+
fa as createAdmin,
|
|
2200
|
+
sn as createAdminContext,
|
|
2201
|
+
Nn as createDates,
|
|
2202
|
+
kn as createHttp,
|
|
2203
|
+
ge as createI18n,
|
|
2204
|
+
Bt as createLinksApi,
|
|
2205
|
+
Fn as createNotesApi,
|
|
2206
|
+
Ln as createTheme,
|
|
2207
|
+
Et as emptyLink,
|
|
2208
|
+
In as errorText,
|
|
2209
|
+
ce as i18nKey,
|
|
2210
|
+
on as provideAdmin,
|
|
2211
|
+
Rt as provideI18n,
|
|
2212
|
+
Tn as provideTheme,
|
|
2213
|
+
_e as readCookie,
|
|
2214
|
+
Bn as renderMarkdown,
|
|
2215
|
+
ha as rowMenuWidth,
|
|
2216
|
+
Ne as themeKey,
|
|
2217
|
+
q as useAdmin,
|
|
2218
|
+
De as useDates,
|
|
2219
|
+
Dn as useErrorText,
|
|
2220
|
+
zt as useI18n,
|
|
2221
|
+
ma as useTheme,
|
|
2222
|
+
V as useTranslate
|
|
1781
2223
|
};
|
|
1782
2224
|
//# sourceMappingURL=index.js.map
|