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