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