@dskripchenko/laravel-admin 1.1.23 → 1.1.24
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/components/infolist/TextEntry.vue.d.ts +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1095 -1080
- package/dist/index.mjs.map +1 -1
- package/dist/stores/manifest.d.ts +38 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { defineStore as ie, createPinia as
|
|
3
|
-
import { RouterLink as
|
|
4
|
-
import { UidMenu as kt, UidMenuItem as Je, UidMenuSeparator as
|
|
5
|
-
import
|
|
1
|
+
import { ref as U, computed as v, defineComponent as T, openBlock as o, createElementBlock as c, createElementVNode as d, createBlock as b, unref as r, withCtx as m, Fragment as M, renderList as V, createTextVNode as C, toDisplayString as h, createCommentVNode as F, createVNode as $, renderSlot as Z, resolveDynamicComponent as ue, normalizeClass as ae, createSlots as Ye, h as Me, watch as te, onBeforeUnmount as zt, resolveComponent as _t, Transition as rt, withModifiers as we, nextTick as $e, onMounted as Ie, withKeys as Vt, normalizeProps as Be, mergeProps as De, normalizeStyle as ze, inject as yt, provide as qt, createApp as Ot, reactive as Wt } from "vue";
|
|
2
|
+
import { defineStore as ie, createPinia as jt } from "pinia";
|
|
3
|
+
import { RouterLink as Kt, useRouter as de, useRoute as Se, createWebHistory as bt, createRouter as Gt } from "vue-router";
|
|
4
|
+
import { UidMenu as kt, UidMenuItem as Je, UidMenuSeparator as Ht, UidAvatar as wt, UidSidebar as Xt, UidSidebarGroup as Yt, UidSidebarItem as Jt, UidSidebarLayout as Qt, UidCard as H, UidButton as O, UidAlert as se, UidInput as ve, UidCheckbox as $t, UidSkeleton as Qe, UidErrorState as Zt, UidEmptyState as en, UidTable as Ze, UidIcon as Ke, UidPagination as tn, UidBadge as et, UidSelect as Ne, UidStat as Te, UidHeatmap as nn, UidGauge as an, UidFormField as Ce, UidTextarea as ln, UidNumberInput as sn, UidDatePicker as on, UidStack as rn, UidGrid as un, UidTabs as xt, UidTabPanel as St, UidTab as Pe, UidDescriptionList as dn, UidDescriptionItem as cn, UidDrawer as mn, UidStepper as fn, UidFileUpload as vn, UidProgress as pn } from "@dskripchenko/ui";
|
|
5
|
+
import gn from "axios";
|
|
6
6
|
import { p as Ct, u as pe } from "./formState-DGNcH1XQ.js";
|
|
7
|
-
import { t as
|
|
7
|
+
import { t as Vo } from "./formState-DGNcH1XQ.js";
|
|
8
8
|
let xe = null;
|
|
9
9
|
function At(e) {
|
|
10
10
|
xe = e;
|
|
@@ -16,27 +16,27 @@ function J() {
|
|
|
16
16
|
);
|
|
17
17
|
return xe;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function hn() {
|
|
20
20
|
xe = null;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function _n() {
|
|
23
23
|
return xe !== null;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26
26
|
__proto__: null,
|
|
27
|
-
clearAdminClient:
|
|
27
|
+
clearAdminClient: hn,
|
|
28
28
|
getAdminClient: J,
|
|
29
|
-
hasAdminClient:
|
|
29
|
+
hasAdminClient: _n,
|
|
30
30
|
setAdminClient: At
|
|
31
31
|
}, Symbol.toStringTag, { value: "Module" })), tt = ie("admin-theme", () => {
|
|
32
|
-
const e =
|
|
33
|
-
function
|
|
34
|
-
e.value = u.theme, t.value = u.availableThemes,
|
|
32
|
+
const e = U("light"), t = U(["light", "dark"]), n = v(() => e.value === "dark");
|
|
33
|
+
function i(u) {
|
|
34
|
+
e.value = u.theme, t.value = u.availableThemes, s(u.theme);
|
|
35
35
|
}
|
|
36
36
|
function a(u) {
|
|
37
37
|
if (!t.value.includes(u))
|
|
38
38
|
throw new Error(`Theme "${u}" is not available`);
|
|
39
|
-
e.value = u,
|
|
39
|
+
e.value = u, s(u);
|
|
40
40
|
}
|
|
41
41
|
async function l(u) {
|
|
42
42
|
if (!t.value.includes(u))
|
|
@@ -49,28 +49,28 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
49
49
|
throw a(f), p;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function s(u) {
|
|
53
53
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", u);
|
|
54
54
|
}
|
|
55
55
|
return {
|
|
56
56
|
current: e,
|
|
57
57
|
available: t,
|
|
58
58
|
isDark: n,
|
|
59
|
-
hydrate:
|
|
59
|
+
hydrate: i,
|
|
60
60
|
applyLocal: a,
|
|
61
61
|
setTheme: l
|
|
62
62
|
};
|
|
63
|
-
}),
|
|
63
|
+
}), bn = ["aria-label", "aria-pressed"], kn = ["data-icon"], Et = /* @__PURE__ */ T({
|
|
64
64
|
__name: "ThemeToggle",
|
|
65
65
|
setup(e) {
|
|
66
|
-
const t = tt(), n = v(() => t.current === "dark"),
|
|
66
|
+
const t = tt(), n = v(() => t.current === "dark"), i = v(() => n.value ? "sun" : "moon"), a = v(
|
|
67
67
|
() => n.value ? "Переключить на светлую тему" : "Переключить на тёмную тему"
|
|
68
68
|
);
|
|
69
69
|
async function l() {
|
|
70
|
-
const
|
|
71
|
-
await t.setTheme(
|
|
70
|
+
const s = n.value ? "light" : "dark";
|
|
71
|
+
await t.setTheme(s);
|
|
72
72
|
}
|
|
73
|
-
return (
|
|
73
|
+
return (s, u) => (o(), c("button", {
|
|
74
74
|
type: "button",
|
|
75
75
|
class: "admin-topbar__icon-btn",
|
|
76
76
|
"aria-label": a.value,
|
|
@@ -79,35 +79,35 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
79
79
|
}, [
|
|
80
80
|
d("span", {
|
|
81
81
|
class: "admin-topbar__icon",
|
|
82
|
-
"data-icon":
|
|
83
|
-
}, null, 8,
|
|
84
|
-
], 8,
|
|
82
|
+
"data-icon": i.value
|
|
83
|
+
}, null, 8, kn)
|
|
84
|
+
], 8, bn));
|
|
85
85
|
}
|
|
86
86
|
}), nt = ie("admin-locale", () => {
|
|
87
|
-
const e =
|
|
88
|
-
function n(
|
|
89
|
-
e.value =
|
|
87
|
+
const e = U("ru"), t = U(["ru", "en"]);
|
|
88
|
+
function n(s) {
|
|
89
|
+
e.value = s.locale, t.value = s.availableLocales, l(s.locale);
|
|
90
90
|
}
|
|
91
|
-
function s
|
|
92
|
-
if (!t.value.includes(
|
|
93
|
-
throw new Error(`Locale "${
|
|
94
|
-
e.value =
|
|
91
|
+
function i(s) {
|
|
92
|
+
if (!t.value.includes(s))
|
|
93
|
+
throw new Error(`Locale "${s}" is not available`);
|
|
94
|
+
e.value = s, l(s);
|
|
95
95
|
}
|
|
96
|
-
async function a(
|
|
97
|
-
if (!t.value.includes(
|
|
98
|
-
throw new Error(`Locale "${
|
|
96
|
+
async function a(s) {
|
|
97
|
+
if (!t.value.includes(s))
|
|
98
|
+
throw new Error(`Locale "${s}" is not available`);
|
|
99
99
|
const u = e.value;
|
|
100
|
-
s
|
|
100
|
+
i(s);
|
|
101
101
|
try {
|
|
102
|
-
await J().post("/system/setLocale", { locale:
|
|
102
|
+
await J().post("/system/setLocale", { locale: s });
|
|
103
103
|
} catch (f) {
|
|
104
|
-
throw
|
|
104
|
+
throw i(u), f;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function l(
|
|
108
|
-
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("lang",
|
|
107
|
+
function l(s) {
|
|
108
|
+
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("lang", s);
|
|
109
109
|
try {
|
|
110
|
-
J().setLocale(
|
|
110
|
+
J().setLocale(s);
|
|
111
111
|
} catch {
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -115,24 +115,24 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
115
115
|
current: e,
|
|
116
116
|
available: t,
|
|
117
117
|
hydrate: n,
|
|
118
|
-
applyLocal:
|
|
118
|
+
applyLocal: i,
|
|
119
119
|
setLocale: a
|
|
120
120
|
};
|
|
121
|
-
}),
|
|
121
|
+
}), wn = {
|
|
122
122
|
type: "button",
|
|
123
123
|
class: "admin-topbar__icon-btn",
|
|
124
124
|
style: { width: "auto", padding: "0 8px", gap: "4px", "font-size": "12px" },
|
|
125
125
|
"aria-label": "Сменить локаль"
|
|
126
|
-
}, Rt = /* @__PURE__ */
|
|
126
|
+
}, Rt = /* @__PURE__ */ T({
|
|
127
127
|
__name: "LocaleSwitcher",
|
|
128
128
|
setup(e) {
|
|
129
129
|
const t = nt();
|
|
130
|
-
async function n(
|
|
131
|
-
|
|
130
|
+
async function n(i) {
|
|
131
|
+
i !== t.current && await t.setLocale(i);
|
|
132
132
|
}
|
|
133
|
-
return (
|
|
133
|
+
return (i, a) => (o(), b(r(kt), null, {
|
|
134
134
|
trigger: m(() => [
|
|
135
|
-
d("button",
|
|
135
|
+
d("button", wn, [
|
|
136
136
|
a[0] || (a[0] = d("span", {
|
|
137
137
|
class: "admin-topbar__icon",
|
|
138
138
|
"data-icon": "globe"
|
|
@@ -141,9 +141,9 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
141
141
|
])
|
|
142
142
|
]),
|
|
143
143
|
default: m(() => [
|
|
144
|
-
(o(!0), c(M, null,
|
|
144
|
+
(o(!0), c(M, null, V(r(t).available, (l) => (o(), b(r(Je), {
|
|
145
145
|
key: l,
|
|
146
|
-
onClick: (
|
|
146
|
+
onClick: (s) => n(l)
|
|
147
147
|
}, {
|
|
148
148
|
default: m(() => [
|
|
149
149
|
C(h(l.toUpperCase()), 1)
|
|
@@ -155,8 +155,8 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
155
155
|
}));
|
|
156
156
|
}
|
|
157
157
|
}), at = ie("admin-notifications", () => {
|
|
158
|
-
const e =
|
|
159
|
-
function
|
|
158
|
+
const e = U([]), t = U(0), n = U(!1), i = U("all"), a = U(null), l = v(() => t.value > 0);
|
|
159
|
+
function s(x) {
|
|
160
160
|
t.value = x.unread_notifications_count;
|
|
161
161
|
}
|
|
162
162
|
async function u(x = "all", S = 1) {
|
|
@@ -168,7 +168,7 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
168
168
|
per_page: g.meta.per_page,
|
|
169
169
|
total: g.meta.total,
|
|
170
170
|
last_page: g.meta.last_page
|
|
171
|
-
},
|
|
171
|
+
}, i.value = x;
|
|
172
172
|
} finally {
|
|
173
173
|
n.value = !1;
|
|
174
174
|
}
|
|
@@ -177,7 +177,7 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
177
177
|
const S = await J().get(
|
|
178
178
|
"/notifications/unread"
|
|
179
179
|
);
|
|
180
|
-
t.value = S.count,
|
|
180
|
+
t.value = S.count, i.value === "unread" && (e.value = S.data);
|
|
181
181
|
}
|
|
182
182
|
async function p(x) {
|
|
183
183
|
await J().post("/notifications/markAsRead", { id: x });
|
|
@@ -204,23 +204,23 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
204
204
|
unreadCount: t,
|
|
205
205
|
loading: n,
|
|
206
206
|
meta: a,
|
|
207
|
-
lastFilter:
|
|
207
|
+
lastFilter: i,
|
|
208
208
|
hasUnread: l,
|
|
209
|
-
hydrate:
|
|
209
|
+
hydrate: s,
|
|
210
210
|
load: u,
|
|
211
211
|
loadUnread: f,
|
|
212
212
|
markAsRead: p,
|
|
213
213
|
markAllAsRead: _,
|
|
214
214
|
destroy: k
|
|
215
215
|
};
|
|
216
|
-
}),
|
|
216
|
+
}), $n = ["title"], xn = /* @__PURE__ */ T({
|
|
217
217
|
__name: "NotificationBell",
|
|
218
218
|
setup(e) {
|
|
219
219
|
const t = at(), n = v(() => {
|
|
220
|
-
const
|
|
221
|
-
return
|
|
220
|
+
const i = t.unreadCount;
|
|
221
|
+
return i <= 0 ? null : i > 99 ? "99+" : String(i);
|
|
222
222
|
});
|
|
223
|
-
return (
|
|
223
|
+
return (i, a) => (o(), b(r(Kt), {
|
|
224
224
|
to: "/notifications",
|
|
225
225
|
class: "admin-topbar__icon-btn",
|
|
226
226
|
"aria-label": "Уведомления"
|
|
@@ -234,7 +234,7 @@ const _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
234
234
|
key: 0,
|
|
235
235
|
class: "admin-topbar__bell-badge",
|
|
236
236
|
title: `Непрочитанных: ${r(t).unreadCount}`
|
|
237
|
-
}, h(n.value), 9,
|
|
237
|
+
}, h(n.value), 9, $n)) : F("", !0)
|
|
238
238
|
]),
|
|
239
239
|
_: 1
|
|
240
240
|
}));
|
|
@@ -253,17 +253,17 @@ class Ut extends oe {
|
|
|
253
253
|
super(401, t), this.name = "UnauthenticatedError";
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
class
|
|
256
|
+
class Sn extends oe {
|
|
257
257
|
constructor(t) {
|
|
258
258
|
super(403, t), this.name = "ForbiddenError";
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
class
|
|
261
|
+
class Cn extends oe {
|
|
262
262
|
constructor(t) {
|
|
263
263
|
super(404, t), this.name = "NotFoundError";
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
class
|
|
266
|
+
class Ve extends oe {
|
|
267
267
|
/** Field-keyed map of error messages. */
|
|
268
268
|
fields;
|
|
269
269
|
constructor(t) {
|
|
@@ -277,7 +277,7 @@ class ze extends oe {
|
|
|
277
277
|
return null;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
class
|
|
280
|
+
class qe extends Error {
|
|
281
281
|
constructor(t = "Network error") {
|
|
282
282
|
super(t), this.name = "NetworkError";
|
|
283
283
|
}
|
|
@@ -287,21 +287,21 @@ function ut(e, t) {
|
|
|
287
287
|
case 401:
|
|
288
288
|
return new Ut(t);
|
|
289
289
|
case 403:
|
|
290
|
-
return new xn(t);
|
|
291
|
-
case 404:
|
|
292
290
|
return new Sn(t);
|
|
291
|
+
case 404:
|
|
292
|
+
return new Cn(t);
|
|
293
293
|
case 422:
|
|
294
|
-
return new
|
|
294
|
+
return new Ve(t);
|
|
295
295
|
default:
|
|
296
296
|
return new oe(e, t);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
const
|
|
300
|
-
const e =
|
|
299
|
+
const le = ie("admin-auth", () => {
|
|
300
|
+
const e = U(null), t = U([]), n = U(null), i = v(() => e.value !== null), a = v(() => n.value !== null);
|
|
301
301
|
function l(y) {
|
|
302
302
|
e.value = y.user, t.value = y.permissions;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function s(y) {
|
|
305
305
|
return t.value.includes("*") || t.value.includes(y) ? !0 : t.value.some((g) => {
|
|
306
306
|
if (!g.endsWith(".*")) return !1;
|
|
307
307
|
const A = g.slice(0, -1);
|
|
@@ -309,10 +309,10 @@ const ae = ie("admin-auth", () => {
|
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
function u(y) {
|
|
312
|
-
return y.some(
|
|
312
|
+
return y.some(s);
|
|
313
313
|
}
|
|
314
314
|
function f(y) {
|
|
315
|
-
return y.every(
|
|
315
|
+
return y.every(s);
|
|
316
316
|
}
|
|
317
317
|
async function p(y) {
|
|
318
318
|
const g = J();
|
|
@@ -324,9 +324,9 @@ const ae = ie("admin-auth", () => {
|
|
|
324
324
|
return A?.user && (e.value = A.user), Array.isArray(A?.permissions) && (t.value = A.permissions), n.value = null, "authenticated";
|
|
325
325
|
} catch (A) {
|
|
326
326
|
if (A instanceof oe && A.errorKey === "two_factor_required") {
|
|
327
|
-
const
|
|
327
|
+
const q = A.payload.challenge_token;
|
|
328
328
|
return n.value = {
|
|
329
|
-
challengeToken: typeof
|
|
329
|
+
challengeToken: typeof q == "string" ? q : "",
|
|
330
330
|
remember: y.remember ?? !1
|
|
331
331
|
}, "two_factor_required";
|
|
332
332
|
}
|
|
@@ -368,11 +368,11 @@ const ae = ie("admin-auth", () => {
|
|
|
368
368
|
permissions: t,
|
|
369
369
|
pendingChallenge: n,
|
|
370
370
|
// getters
|
|
371
|
-
isAuthenticated:
|
|
371
|
+
isAuthenticated: i,
|
|
372
372
|
isChallengePending: a,
|
|
373
373
|
// actions
|
|
374
374
|
hydrate: l,
|
|
375
|
-
hasPermission:
|
|
375
|
+
hasPermission: s,
|
|
376
376
|
hasAnyPermission: u,
|
|
377
377
|
hasAllPermissions: f,
|
|
378
378
|
login: p,
|
|
@@ -381,17 +381,17 @@ const ae = ie("admin-auth", () => {
|
|
|
381
381
|
cancelChallenge: x,
|
|
382
382
|
logout: S
|
|
383
383
|
};
|
|
384
|
-
}),
|
|
384
|
+
}), An = {
|
|
385
385
|
type: "button",
|
|
386
386
|
class: "admin-topbar__icon-btn admin-user-menu__trigger",
|
|
387
387
|
"aria-label": "Меню пользователя",
|
|
388
388
|
"aria-haspopup": "menu",
|
|
389
389
|
style: { width: "auto", padding: "0 4px", gap: "8px" }
|
|
390
|
-
},
|
|
390
|
+
}, En = /* @__PURE__ */ T({
|
|
391
391
|
__name: "UserMenu",
|
|
392
392
|
setup(e) {
|
|
393
|
-
const t =
|
|
394
|
-
async function
|
|
393
|
+
const t = le(), n = de();
|
|
394
|
+
async function i() {
|
|
395
395
|
try {
|
|
396
396
|
await t.logout();
|
|
397
397
|
} finally {
|
|
@@ -401,10 +401,10 @@ const ae = ie("admin-auth", () => {
|
|
|
401
401
|
function a() {
|
|
402
402
|
n.push({ name: "admin.profile" });
|
|
403
403
|
}
|
|
404
|
-
return (l,
|
|
404
|
+
return (l, s) => (o(), b(r(kt), null, {
|
|
405
405
|
trigger: m(() => [
|
|
406
|
-
d("button",
|
|
407
|
-
|
|
406
|
+
d("button", An, [
|
|
407
|
+
$(r(wt), {
|
|
408
408
|
src: r(t).user?.avatar ?? void 0,
|
|
409
409
|
name: r(t).user?.name ?? "?",
|
|
410
410
|
alt: r(t).user?.name ?? "User",
|
|
@@ -413,18 +413,18 @@ const ae = ie("admin-auth", () => {
|
|
|
413
413
|
])
|
|
414
414
|
]),
|
|
415
415
|
default: m(() => [
|
|
416
|
-
|
|
417
|
-
default: m(() => [...
|
|
416
|
+
$(r(Je), { onClick: a }, {
|
|
417
|
+
default: m(() => [...s[0] || (s[0] = [
|
|
418
418
|
C("Профиль", -1)
|
|
419
419
|
])]),
|
|
420
420
|
_: 1
|
|
421
421
|
}),
|
|
422
|
-
|
|
423
|
-
|
|
422
|
+
$(r(Ht)),
|
|
423
|
+
$(r(Je), {
|
|
424
424
|
variant: "danger",
|
|
425
|
-
onClick:
|
|
425
|
+
onClick: i
|
|
426
426
|
}, {
|
|
427
|
-
default: m(() => [...
|
|
427
|
+
default: m(() => [...s[1] || (s[1] = [
|
|
428
428
|
C("Выйти", -1)
|
|
429
429
|
])]),
|
|
430
430
|
_: 1
|
|
@@ -433,10 +433,10 @@ const ae = ie("admin-auth", () => {
|
|
|
433
433
|
_: 1
|
|
434
434
|
}));
|
|
435
435
|
}
|
|
436
|
-
}),
|
|
436
|
+
}), Rn = { class: "admin-topbar" }, Un = { class: "admin-topbar__breadcrumbs" }, Fn = {
|
|
437
437
|
key: 0,
|
|
438
438
|
class: "sep"
|
|
439
|
-
},
|
|
439
|
+
}, Ln = /* @__PURE__ */ T({
|
|
440
440
|
__name: "AdminTopBar",
|
|
441
441
|
props: {
|
|
442
442
|
breadcrumbs: { default: () => [] },
|
|
@@ -444,27 +444,27 @@ const ae = ie("admin-auth", () => {
|
|
|
444
444
|
},
|
|
445
445
|
emits: ["toggle-sidebar"],
|
|
446
446
|
setup(e, { emit: t }) {
|
|
447
|
-
const n = e,
|
|
448
|
-
return (l,
|
|
447
|
+
const n = e, i = t, a = v(() => n.breadcrumbs.length - 1);
|
|
448
|
+
return (l, s) => (o(), c("header", Rn, [
|
|
449
449
|
e.showCollapseToggle ? (o(), c("button", {
|
|
450
450
|
key: 0,
|
|
451
451
|
type: "button",
|
|
452
452
|
class: "admin-topbar__icon-btn",
|
|
453
453
|
"aria-label": "Свернуть меню",
|
|
454
|
-
onClick:
|
|
455
|
-
}, [...
|
|
454
|
+
onClick: s[0] || (s[0] = (u) => i("toggle-sidebar"))
|
|
455
|
+
}, [...s[1] || (s[1] = [
|
|
456
456
|
d("span", {
|
|
457
457
|
class: "admin-topbar__icon",
|
|
458
458
|
"data-icon": "panel-left"
|
|
459
459
|
}, null, -1)
|
|
460
460
|
])])) : F("", !0),
|
|
461
|
-
d("div",
|
|
461
|
+
d("div", Un, [
|
|
462
462
|
Z(l.$slots, "breadcrumbs", {}, () => [
|
|
463
|
-
(o(!0), c(M, null,
|
|
464
|
-
f > 0 ? (o(), c("span",
|
|
463
|
+
(o(!0), c(M, null, V(e.breadcrumbs, (u, f) => (o(), c(M, { key: f }, [
|
|
464
|
+
f > 0 ? (o(), c("span", Fn, "›")) : F("", !0),
|
|
465
465
|
(o(), b(ue(u.to ? "a" : "span"), {
|
|
466
466
|
href: typeof u.to == "string" ? u.to : void 0,
|
|
467
|
-
class:
|
|
467
|
+
class: ae(f === a.value ? "cur" : "")
|
|
468
468
|
}, {
|
|
469
469
|
default: m(() => [
|
|
470
470
|
C(h(u.label), 1)
|
|
@@ -474,9 +474,9 @@ const ae = ie("admin-auth", () => {
|
|
|
474
474
|
], 64))), 128))
|
|
475
475
|
])
|
|
476
476
|
]),
|
|
477
|
-
|
|
477
|
+
s[3] || (s[3] = d("div", { class: "admin-topbar__spacer" }, null, -1)),
|
|
478
478
|
Z(l.$slots, "search", {}, () => [
|
|
479
|
-
|
|
479
|
+
s[2] || (s[2] = d("div", {
|
|
480
480
|
class: "admin-topbar__search",
|
|
481
481
|
role: "button",
|
|
482
482
|
tabindex: "0"
|
|
@@ -490,15 +490,15 @@ const ae = ie("admin-auth", () => {
|
|
|
490
490
|
], -1))
|
|
491
491
|
]),
|
|
492
492
|
Z(l.$slots, "actions"),
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
493
|
+
$(xn),
|
|
494
|
+
$(Et),
|
|
495
|
+
$(Rt),
|
|
496
|
+
$(En)
|
|
497
497
|
]));
|
|
498
498
|
}
|
|
499
499
|
}), Ft = ie("admin-menu", () => {
|
|
500
|
-
const e =
|
|
501
|
-
const p =
|
|
500
|
+
const e = U([]), t = U(!1), n = U(null), i = U(!1), a = v(() => {
|
|
501
|
+
const p = le(), _ = (k) => {
|
|
502
502
|
if (Array.isArray(k.permissions) && k.permissions.length > 0 && !p.hasAnyPermission(k.permissions))
|
|
503
503
|
return null;
|
|
504
504
|
const x = (k.children ?? []).map(_).filter((S) => S !== null);
|
|
@@ -519,12 +519,12 @@ const ae = ie("admin-auth", () => {
|
|
|
519
519
|
}), _.push({ group: k, items: x });
|
|
520
520
|
return _;
|
|
521
521
|
});
|
|
522
|
-
async function
|
|
523
|
-
if (
|
|
522
|
+
async function s(p = !1) {
|
|
523
|
+
if (i.value && !p) return e.value;
|
|
524
524
|
t.value = !0, n.value = null;
|
|
525
525
|
try {
|
|
526
526
|
const k = await J().get("/system/menu");
|
|
527
|
-
return e.value = Array.isArray(k.items) ? k.items : [],
|
|
527
|
+
return e.value = Array.isArray(k.items) ? k.items : [], i.value = !0, e.value;
|
|
528
528
|
} catch (_) {
|
|
529
529
|
throw n.value = _ instanceof Error ? _ : new Error(String(_)), _;
|
|
530
530
|
} finally {
|
|
@@ -532,32 +532,32 @@ const ae = ie("admin-auth", () => {
|
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
function u(p) {
|
|
535
|
-
e.value = p,
|
|
535
|
+
e.value = p, i.value = !0, n.value = null;
|
|
536
536
|
}
|
|
537
537
|
function f() {
|
|
538
|
-
e.value = [],
|
|
538
|
+
e.value = [], i.value = !1, n.value = null, t.value = !1;
|
|
539
539
|
}
|
|
540
540
|
return {
|
|
541
541
|
items: e,
|
|
542
542
|
loading: t,
|
|
543
543
|
error: n,
|
|
544
|
-
isLoaded:
|
|
544
|
+
isLoaded: i,
|
|
545
545
|
visibleItems: a,
|
|
546
546
|
groupedItems: l,
|
|
547
|
-
load:
|
|
547
|
+
load: s,
|
|
548
548
|
setItems: u,
|
|
549
549
|
reset: f
|
|
550
550
|
};
|
|
551
|
-
}), Tn = { class: "admin-sidebar-brand" },
|
|
551
|
+
}), Tn = { class: "admin-sidebar-brand" }, Pn = { class: "admin-sidebar-brand__mark" }, Mn = {
|
|
552
552
|
key: 0,
|
|
553
553
|
class: "admin-sidebar-brand__name"
|
|
554
|
-
},
|
|
554
|
+
}, Nn = {
|
|
555
555
|
key: 0,
|
|
556
556
|
class: "admin-sidebar-tenant"
|
|
557
|
-
},
|
|
557
|
+
}, In = { class: "admin-sidebar-foot" }, Bn = {
|
|
558
558
|
key: 0,
|
|
559
559
|
class: "admin-sidebar-foot__text"
|
|
560
|
-
},
|
|
560
|
+
}, Dn = ["href"], zn = /* @__PURE__ */ T({
|
|
561
561
|
__name: "AdminSidebar",
|
|
562
562
|
props: {
|
|
563
563
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -568,38 +568,38 @@ const ae = ie("admin-auth", () => {
|
|
|
568
568
|
docsUrl: { default: null }
|
|
569
569
|
},
|
|
570
570
|
setup(e) {
|
|
571
|
-
const t = Ft(), n = Se(),
|
|
571
|
+
const t = Ft(), n = Se(), i = v(() => t.groupedItems);
|
|
572
572
|
function a(u) {
|
|
573
573
|
return !!(u.routeName && n.name === u.routeName || u.url && n.path === u.url);
|
|
574
574
|
}
|
|
575
575
|
function l(u) {
|
|
576
576
|
if (u)
|
|
577
|
-
return () =>
|
|
577
|
+
return () => Me("span", { class: "admin-sidebar__icon", "data-icon": u });
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function s(u) {
|
|
580
580
|
if (u.url) return u.url;
|
|
581
581
|
if (u.routeName) return { name: u.routeName };
|
|
582
582
|
}
|
|
583
|
-
return (u, f) => (o(), b(r(
|
|
583
|
+
return (u, f) => (o(), b(r(Xt), { collapsed: e.collapsed }, Ye({
|
|
584
584
|
header: m(() => [
|
|
585
585
|
d("div", Tn, [
|
|
586
|
-
d("div",
|
|
587
|
-
e.collapsed ? F("", !0) : (o(), c("div",
|
|
586
|
+
d("div", Pn, h(e.brandMark), 1),
|
|
587
|
+
e.collapsed ? F("", !0) : (o(), c("div", Mn, h(e.brandName), 1))
|
|
588
588
|
]),
|
|
589
|
-
e.tenant && !e.collapsed ? (o(), c("div",
|
|
589
|
+
e.tenant && !e.collapsed ? (o(), c("div", Nn, [
|
|
590
590
|
d("span", null, h(e.tenant.label), 1),
|
|
591
591
|
d("b", null, h(e.tenant.name), 1)
|
|
592
592
|
])) : F("", !0)
|
|
593
593
|
]),
|
|
594
594
|
nav: m(() => [
|
|
595
|
-
(o(!0), c(M, null,
|
|
595
|
+
(o(!0), c(M, null, V(i.value, (p, _) => (o(), b(r(Yt), {
|
|
596
596
|
key: `grp-${_}`,
|
|
597
597
|
title: p.group ?? void 0
|
|
598
598
|
}, {
|
|
599
599
|
default: m(() => [
|
|
600
|
-
(o(!0), c(M, null,
|
|
600
|
+
(o(!0), c(M, null, V(p.items, (k) => (o(), b(r(Jt), {
|
|
601
601
|
key: k.key,
|
|
602
|
-
to:
|
|
602
|
+
to: s(k),
|
|
603
603
|
active: a(k),
|
|
604
604
|
badge: k.badge ?? void 0
|
|
605
605
|
}, Ye({
|
|
@@ -625,24 +625,24 @@ const ae = ie("admin-auth", () => {
|
|
|
625
625
|
e.version || e.docsUrl ? {
|
|
626
626
|
name: "footer",
|
|
627
627
|
fn: m(() => [
|
|
628
|
-
d("div",
|
|
629
|
-
e.version ? (o(), c("span",
|
|
628
|
+
d("div", In, [
|
|
629
|
+
e.version ? (o(), c("span", Bn, h(e.version), 1)) : F("", !0),
|
|
630
630
|
e.docsUrl ? (o(), c("a", {
|
|
631
631
|
key: 1,
|
|
632
632
|
href: e.docsUrl,
|
|
633
633
|
class: "admin-sidebar-foot__text admin-sidebar-foot__link"
|
|
634
|
-
}, " Docs ", 8,
|
|
634
|
+
}, " Docs ", 8, Dn)) : F("", !0)
|
|
635
635
|
])
|
|
636
636
|
]),
|
|
637
637
|
key: "0"
|
|
638
638
|
} : void 0
|
|
639
639
|
]), 1032, ["collapsed"]));
|
|
640
640
|
}
|
|
641
|
-
}),
|
|
641
|
+
}), Vn = { class: "admin-shell-root" }, qn = {
|
|
642
642
|
key: 0,
|
|
643
643
|
class: "admin-impersonation-banner",
|
|
644
644
|
role: "status"
|
|
645
|
-
},
|
|
645
|
+
}, Ge = "data-admin-impersonating", On = /* @__PURE__ */ T({
|
|
646
646
|
__name: "AdminShell",
|
|
647
647
|
props: {
|
|
648
648
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -650,23 +650,23 @@ const ae = ie("admin-auth", () => {
|
|
|
650
650
|
},
|
|
651
651
|
emits: ["update:collapsed", "exit-impersonation"],
|
|
652
652
|
setup(e, { emit: t }) {
|
|
653
|
-
const n = e,
|
|
654
|
-
function a(
|
|
655
|
-
|
|
653
|
+
const n = e, i = t;
|
|
654
|
+
function a(s) {
|
|
655
|
+
i("update:collapsed", s);
|
|
656
656
|
}
|
|
657
657
|
function l() {
|
|
658
|
-
|
|
658
|
+
i("exit-impersonation");
|
|
659
659
|
}
|
|
660
660
|
return te(
|
|
661
661
|
() => n.impersonation,
|
|
662
|
-
(
|
|
663
|
-
typeof document > "u" || (
|
|
662
|
+
(s) => {
|
|
663
|
+
typeof document > "u" || (s !== null ? document.documentElement.setAttribute(Ge, "true") : document.documentElement.removeAttribute(Ge));
|
|
664
664
|
},
|
|
665
665
|
{ immediate: !0 }
|
|
666
|
-
),
|
|
667
|
-
typeof document < "u" && document.documentElement.removeAttribute(
|
|
668
|
-
}), (
|
|
669
|
-
e.impersonation ? (o(), c("div",
|
|
666
|
+
), zt(() => {
|
|
667
|
+
typeof document < "u" && document.documentElement.removeAttribute(Ge);
|
|
668
|
+
}), (s, u) => (o(), c("div", Vn, [
|
|
669
|
+
e.impersonation ? (o(), c("div", qn, [
|
|
670
670
|
d("span", null, [
|
|
671
671
|
u[1] || (u[1] = C(" Вы вошли как ", -1)),
|
|
672
672
|
d("b", null, h(e.impersonation.asName), 1),
|
|
@@ -678,51 +678,51 @@ const ae = ie("admin-auth", () => {
|
|
|
678
678
|
onClick: l
|
|
679
679
|
}, " Выйти из режима ")
|
|
680
680
|
])) : F("", !0),
|
|
681
|
-
|
|
681
|
+
$(r(Qt), {
|
|
682
682
|
"model-value": e.collapsed,
|
|
683
683
|
"onUpdate:modelValue": a
|
|
684
684
|
}, {
|
|
685
685
|
sidebar: m(() => [
|
|
686
|
-
Z(
|
|
687
|
-
|
|
686
|
+
Z(s.$slots, "sidebar", {}, () => [
|
|
687
|
+
$(zn, { collapsed: e.collapsed }, null, 8, ["collapsed"])
|
|
688
688
|
])
|
|
689
689
|
]),
|
|
690
690
|
header: m(() => [
|
|
691
|
-
Z(
|
|
692
|
-
|
|
691
|
+
Z(s.$slots, "topbar", {}, () => [
|
|
692
|
+
$(Ln, {
|
|
693
693
|
onToggleSidebar: u[0] || (u[0] = (f) => a(!e.collapsed))
|
|
694
694
|
})
|
|
695
695
|
])
|
|
696
696
|
]),
|
|
697
697
|
default: m(() => [
|
|
698
|
-
Z(
|
|
698
|
+
Z(s.$slots, "default")
|
|
699
699
|
]),
|
|
700
700
|
_: 3
|
|
701
701
|
}, 8, ["model-value"])
|
|
702
702
|
]));
|
|
703
703
|
}
|
|
704
704
|
}), lt = ie("admin-navigation", () => {
|
|
705
|
-
const e =
|
|
705
|
+
const e = U(0), t = v(() => e.value > 0);
|
|
706
706
|
function n() {
|
|
707
707
|
e.value += 1;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function i() {
|
|
710
710
|
e.value > 0 && (e.value -= 1);
|
|
711
711
|
}
|
|
712
712
|
function a() {
|
|
713
713
|
e.value = 0;
|
|
714
714
|
}
|
|
715
|
-
return { pending: e, isLoading: t, start: n, end:
|
|
716
|
-
}),
|
|
715
|
+
return { pending: e, isLoading: t, start: n, end: i, reset: a };
|
|
716
|
+
}), Wn = /* @__PURE__ */ T({
|
|
717
717
|
__name: "AdminLoadingBar",
|
|
718
718
|
setup(e) {
|
|
719
|
-
const t = lt(), n =
|
|
720
|
-
let
|
|
719
|
+
const t = lt(), n = U(!1);
|
|
720
|
+
let i = null;
|
|
721
721
|
te(
|
|
722
722
|
() => t.isLoading,
|
|
723
723
|
(l) => {
|
|
724
|
-
l ? (
|
|
725
|
-
n.value = !1,
|
|
724
|
+
l ? (i !== null && (clearTimeout(i), i = null), n.value = !0) : i = setTimeout(() => {
|
|
725
|
+
n.value = !1, i = null;
|
|
726
726
|
}, 120);
|
|
727
727
|
},
|
|
728
728
|
{ immediate: !0 }
|
|
@@ -731,28 +731,28 @@ const ae = ie("admin-auth", () => {
|
|
|
731
731
|
"admin-loading-bar": !0,
|
|
732
732
|
"admin-loading-bar--visible": n.value
|
|
733
733
|
}));
|
|
734
|
-
return (l,
|
|
735
|
-
class:
|
|
734
|
+
return (l, s) => (o(), c("div", {
|
|
735
|
+
class: ae(a.value),
|
|
736
736
|
role: "progressbar",
|
|
737
737
|
"aria-busy": "true"
|
|
738
738
|
}, null, 2));
|
|
739
739
|
}
|
|
740
|
-
}),
|
|
740
|
+
}), jn = { class: "admin-page-host" }, Kn = /* @__PURE__ */ T({
|
|
741
741
|
__name: "AdminApp",
|
|
742
742
|
setup(e) {
|
|
743
743
|
const t = Se(), n = v(() => !(t.meta?.fullscreen === !0 || t.meta?.kind === "auth" || t.name === "admin.notFound"));
|
|
744
|
-
return (
|
|
744
|
+
return (i, a) => {
|
|
745
745
|
const l = _t("router-view");
|
|
746
746
|
return o(), c(M, null, [
|
|
747
|
-
|
|
748
|
-
n.value ? (o(), b(
|
|
747
|
+
$(Wn),
|
|
748
|
+
n.value ? (o(), b(On, { key: 0 }, {
|
|
749
749
|
default: m(() => [
|
|
750
|
-
d("div",
|
|
751
|
-
|
|
752
|
-
default: m(({ Component:
|
|
753
|
-
|
|
750
|
+
d("div", jn, [
|
|
751
|
+
$(l, null, {
|
|
752
|
+
default: m(({ Component: s }) => [
|
|
753
|
+
$(rt, { name: "admin-page" }, {
|
|
754
754
|
default: m(() => [
|
|
755
|
-
(o(), b(ue(
|
|
755
|
+
(o(), b(ue(s)))
|
|
756
756
|
]),
|
|
757
757
|
_: 2
|
|
758
758
|
}, 1024)
|
|
@@ -763,10 +763,10 @@ const ae = ie("admin-auth", () => {
|
|
|
763
763
|
]),
|
|
764
764
|
_: 1
|
|
765
765
|
})) : (o(), b(l, { key: 1 }, {
|
|
766
|
-
default: m(({ Component:
|
|
767
|
-
|
|
766
|
+
default: m(({ Component: s }) => [
|
|
767
|
+
$(rt, { name: "admin-page" }, {
|
|
768
768
|
default: m(() => [
|
|
769
|
-
(o(), b(ue(
|
|
769
|
+
(o(), b(ue(s)))
|
|
770
770
|
]),
|
|
771
771
|
_: 2
|
|
772
772
|
}, 1024)
|
|
@@ -777,12 +777,12 @@ const ae = ie("admin-auth", () => {
|
|
|
777
777
|
};
|
|
778
778
|
}
|
|
779
779
|
}), ce = ie("admin-manifest", () => {
|
|
780
|
-
const e =
|
|
780
|
+
const e = U(null), t = U(!1), n = U(null), i = v(() => e.value !== null), a = v(() => e.value?.version ?? null), l = v(() => e.value?.resources ?? []), s = v(() => e.value?.screens ?? []), u = v(() => e.value?.settings ?? []), f = v(() => e.value?.plugins ?? []);
|
|
781
781
|
function p(y) {
|
|
782
782
|
return l.value.find((g) => g.slug === y) ?? null;
|
|
783
783
|
}
|
|
784
784
|
function _(y) {
|
|
785
|
-
return
|
|
785
|
+
return s.value.find((g) => g.slug === y) ?? null;
|
|
786
786
|
}
|
|
787
787
|
function k(y) {
|
|
788
788
|
return u.value.find((g) => g.slug === y) ?? null;
|
|
@@ -809,10 +809,10 @@ const ae = ie("admin-auth", () => {
|
|
|
809
809
|
loading: t,
|
|
810
810
|
error: n,
|
|
811
811
|
// getters
|
|
812
|
-
isLoaded:
|
|
812
|
+
isLoaded: i,
|
|
813
813
|
version: a,
|
|
814
814
|
resources: l,
|
|
815
|
-
screens:
|
|
815
|
+
screens: s,
|
|
816
816
|
settings: u,
|
|
817
817
|
plugins: f,
|
|
818
818
|
// actions
|
|
@@ -822,60 +822,60 @@ const ae = ie("admin-auth", () => {
|
|
|
822
822
|
load: x,
|
|
823
823
|
reset: S
|
|
824
824
|
};
|
|
825
|
-
}),
|
|
825
|
+
}), Gn = { class: "admin-home" }, Hn = { class: "admin-home__title" }, Xn = {
|
|
826
826
|
key: 0,
|
|
827
827
|
class: "admin-home__resources"
|
|
828
|
-
},
|
|
828
|
+
}, Yn = { class: "admin-home__grid" }, Jn = ["onClick"], Qn = { class: "admin-home__card-label" }, Zn = { class: "admin-home__card-slug" }, ea = /* @__PURE__ */ T({
|
|
829
829
|
__name: "HomePage",
|
|
830
830
|
setup(e) {
|
|
831
|
-
const t = ce(), n =
|
|
832
|
-
return (
|
|
833
|
-
|
|
831
|
+
const t = ce(), n = le(), i = de(), a = v(() => n.user?.name ?? ""), l = v(() => t.manifest?.resources ?? []);
|
|
832
|
+
return (s, u) => (o(), c("div", Gn, [
|
|
833
|
+
$(r(H), {
|
|
834
834
|
padding: "lg",
|
|
835
835
|
class: "admin-home__hero"
|
|
836
836
|
}, {
|
|
837
837
|
default: m(() => [
|
|
838
|
-
d("h1",
|
|
838
|
+
d("h1", Hn, "Добро пожаловать" + h(a.value ? ", " + a.value : ""), 1),
|
|
839
839
|
u[0] || (u[0] = d("p", { class: "admin-home__lead" }, " Админ-панель готова. Воспользуйтесь сайдбаром или переходите к ресурсам ниже. ", -1))
|
|
840
840
|
]),
|
|
841
841
|
_: 1
|
|
842
842
|
}),
|
|
843
|
-
l.value.length ? (o(), c("section",
|
|
843
|
+
l.value.length ? (o(), c("section", Xn, [
|
|
844
844
|
u[1] || (u[1] = d("h2", { class: "admin-home__heading" }, "Ресурсы", -1)),
|
|
845
|
-
d("ul",
|
|
846
|
-
(o(!0), c(M, null,
|
|
845
|
+
d("ul", Yn, [
|
|
846
|
+
(o(!0), c(M, null, V(l.value, (f) => (o(), c("li", {
|
|
847
847
|
key: f.slug
|
|
848
848
|
}, [
|
|
849
849
|
d("button", {
|
|
850
850
|
type: "button",
|
|
851
851
|
class: "admin-home__card",
|
|
852
|
-
onClick: (p) => r(
|
|
852
|
+
onClick: (p) => r(i).push({ name: `admin.resource.${f.slug}.index` })
|
|
853
853
|
}, [
|
|
854
|
-
d("span",
|
|
855
|
-
d("span",
|
|
856
|
-
], 8,
|
|
854
|
+
d("span", Qn, h(f.label), 1),
|
|
855
|
+
d("span", Zn, h(f.slug), 1)
|
|
856
|
+
], 8, Jn)
|
|
857
857
|
]))), 128))
|
|
858
858
|
])
|
|
859
859
|
])) : F("", !0)
|
|
860
860
|
]));
|
|
861
861
|
}
|
|
862
|
-
}),
|
|
862
|
+
}), ta = { class: "admin-status-page" }, na = /* @__PURE__ */ T({
|
|
863
863
|
__name: "ForbiddenPage",
|
|
864
864
|
setup(e) {
|
|
865
865
|
const t = de();
|
|
866
|
-
return (n,
|
|
867
|
-
|
|
866
|
+
return (n, i) => (o(), c("div", ta, [
|
|
867
|
+
$(r(H), {
|
|
868
868
|
padding: "lg",
|
|
869
869
|
class: "admin-status-page__card"
|
|
870
870
|
}, {
|
|
871
871
|
default: m(() => [
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
872
|
+
i[2] || (i[2] = d("h1", { class: "admin-status-page__code" }, "403", -1)),
|
|
873
|
+
i[3] || (i[3] = d("p", { class: "admin-status-page__message" }, "Доступ запрещён.", -1)),
|
|
874
|
+
$(r(O), {
|
|
875
875
|
variant: "ghost",
|
|
876
|
-
onClick:
|
|
876
|
+
onClick: i[0] || (i[0] = (a) => r(t).replace({ name: "admin.home" }))
|
|
877
877
|
}, {
|
|
878
|
-
default: m(() => [...
|
|
878
|
+
default: m(() => [...i[1] || (i[1] = [
|
|
879
879
|
C(" На главную ", -1)
|
|
880
880
|
])]),
|
|
881
881
|
_: 1
|
|
@@ -885,23 +885,23 @@ const ae = ie("admin-auth", () => {
|
|
|
885
885
|
})
|
|
886
886
|
]));
|
|
887
887
|
}
|
|
888
|
-
}),
|
|
888
|
+
}), aa = { class: "admin-status-page" }, la = /* @__PURE__ */ T({
|
|
889
889
|
__name: "NotFoundPage",
|
|
890
890
|
setup(e) {
|
|
891
891
|
const t = de();
|
|
892
|
-
return (n,
|
|
893
|
-
|
|
892
|
+
return (n, i) => (o(), c("div", aa, [
|
|
893
|
+
$(r(H), {
|
|
894
894
|
padding: "lg",
|
|
895
895
|
class: "admin-status-page__card"
|
|
896
896
|
}, {
|
|
897
897
|
default: m(() => [
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
898
|
+
i[2] || (i[2] = d("h1", { class: "admin-status-page__code" }, "404", -1)),
|
|
899
|
+
i[3] || (i[3] = d("p", { class: "admin-status-page__message" }, "Страница не найдена.", -1)),
|
|
900
|
+
$(r(O), {
|
|
901
901
|
variant: "ghost",
|
|
902
|
-
onClick:
|
|
902
|
+
onClick: i[0] || (i[0] = (a) => r(t).replace({ name: "admin.home" }))
|
|
903
903
|
}, {
|
|
904
|
-
default: m(() => [...
|
|
904
|
+
default: m(() => [...i[1] || (i[1] = [
|
|
905
905
|
C(" На главную ", -1)
|
|
906
906
|
])]),
|
|
907
907
|
_: 1
|
|
@@ -911,38 +911,38 @@ const ae = ie("admin-auth", () => {
|
|
|
911
911
|
})
|
|
912
912
|
]));
|
|
913
913
|
}
|
|
914
|
-
}),
|
|
914
|
+
}), sa = { class: "admin-settings-page" }, ia = { class: "admin-settings-page__title" }, oa = {
|
|
915
915
|
key: 0,
|
|
916
916
|
class: "admin-settings-page__hint"
|
|
917
|
-
},
|
|
917
|
+
}, ra = {
|
|
918
918
|
key: 1,
|
|
919
919
|
class: "admin-settings-page__debug"
|
|
920
|
-
},
|
|
920
|
+
}, ua = /* @__PURE__ */ T({
|
|
921
921
|
__name: "SettingsPage",
|
|
922
922
|
setup(e) {
|
|
923
|
-
const t = Se(), n = ce(),
|
|
924
|
-
return (l,
|
|
925
|
-
|
|
923
|
+
const t = Se(), n = ce(), i = v(() => String(t.params.slug ?? "")), a = v(() => n.manifest?.settings?.find((l) => l.slug === i.value) ?? null);
|
|
924
|
+
return (l, s) => (o(), c("div", sa, [
|
|
925
|
+
$(r(H), { padding: "lg" }, {
|
|
926
926
|
default: m(() => [
|
|
927
|
-
d("h1",
|
|
928
|
-
a.value ? (o(), c("pre",
|
|
927
|
+
d("h1", ia, h(a.value?.label ?? i.value), 1),
|
|
928
|
+
a.value ? (o(), c("pre", ra, h(JSON.stringify(a.value.fields, null, 2)), 1)) : (o(), c("p", oa, " Settings «" + h(i.value) + "» не найдено в manifest'е. ", 1))
|
|
929
929
|
]),
|
|
930
930
|
_: 1
|
|
931
931
|
})
|
|
932
932
|
]));
|
|
933
933
|
}
|
|
934
|
-
}),
|
|
934
|
+
}), da = { class: "admin-status-page" }, ca = { class: "admin-status-page__title" }, ma = { class: "admin-status-page__hint" }, fa = /* @__PURE__ */ T({
|
|
935
935
|
__name: "UnknownScreenPage",
|
|
936
936
|
setup(e) {
|
|
937
|
-
const t = Se(), n = v(() => String(t.params.slug ?? "")),
|
|
938
|
-
return (a, l) => (o(), c("div",
|
|
939
|
-
|
|
937
|
+
const t = Se(), n = v(() => String(t.params.slug ?? "")), i = v(() => String(t.meta?.title ?? n.value));
|
|
938
|
+
return (a, l) => (o(), c("div", da, [
|
|
939
|
+
$(r(H), {
|
|
940
940
|
padding: "lg",
|
|
941
941
|
class: "admin-status-page__card"
|
|
942
942
|
}, {
|
|
943
943
|
default: m(() => [
|
|
944
|
-
d("h1",
|
|
945
|
-
d("p",
|
|
944
|
+
d("h1", ca, h(i.value), 1),
|
|
945
|
+
d("p", ma, [
|
|
946
946
|
C(" Это заглушка для screen «" + h(n.value) + "». Передайте свой компонент через ", 1),
|
|
947
947
|
l[0] || (l[0] = d("code", null, "createAdminApp(" + h("{") + " pages: " + h("{") + " screen: MyScreen " + h("}") + " " + h("}") + ")", -1)),
|
|
948
948
|
l[1] || (l[1] = C(". ", -1))
|
|
@@ -952,10 +952,10 @@ const ae = ie("admin-auth", () => {
|
|
|
952
952
|
})
|
|
953
953
|
]));
|
|
954
954
|
}
|
|
955
|
-
}),
|
|
955
|
+
}), va = { class: "admin-auth-card__row" }, pa = ["href"], ga = {
|
|
956
956
|
key: 1,
|
|
957
957
|
style: { "text-align": "center", "font-size": "var(--uid-font-size-xs)", color: "var(--uid-text-secondary)", "padding-top": "4px" }
|
|
958
|
-
},
|
|
958
|
+
}, ha = ["href"], _a = /* @__PURE__ */ T({
|
|
959
959
|
__name: "LoginForm",
|
|
960
960
|
props: {
|
|
961
961
|
forgotUrl: { default: null },
|
|
@@ -964,19 +964,19 @@ const ae = ie("admin-auth", () => {
|
|
|
964
964
|
},
|
|
965
965
|
emits: ["success"],
|
|
966
966
|
setup(e, { emit: t }) {
|
|
967
|
-
const n = t,
|
|
967
|
+
const n = t, i = le(), a = U(""), l = U(""), s = U(!1), u = U(!1), f = U(null), p = U({}), _ = v(() => p.value.email?.[0]), k = v(() => p.value.password?.[0]);
|
|
968
968
|
async function x() {
|
|
969
969
|
if (!u.value) {
|
|
970
970
|
u.value = !0, f.value = null, p.value = {};
|
|
971
971
|
try {
|
|
972
|
-
const S = await
|
|
972
|
+
const S = await i.login({
|
|
973
973
|
email: a.value,
|
|
974
974
|
password: l.value,
|
|
975
|
-
remember:
|
|
975
|
+
remember: s.value
|
|
976
976
|
});
|
|
977
977
|
n("success", S);
|
|
978
978
|
} catch (S) {
|
|
979
|
-
S instanceof
|
|
979
|
+
S instanceof Ve ? (p.value = S.fields, f.value = S.firstFieldMessage()) : S instanceof qe ? f.value = "Нет соединения с сервером" : S instanceof oe ? f.value = S.message || "Не удалось войти" : f.value = S.message;
|
|
980
980
|
} finally {
|
|
981
981
|
u.value = !1;
|
|
982
982
|
}
|
|
@@ -998,7 +998,7 @@ const ae = ie("admin-auth", () => {
|
|
|
998
998
|
]),
|
|
999
999
|
_: 1
|
|
1000
1000
|
})) : F("", !0),
|
|
1001
|
-
|
|
1001
|
+
$(r(ve), {
|
|
1002
1002
|
modelValue: a.value,
|
|
1003
1003
|
"onUpdate:modelValue": y[0] || (y[0] = (g) => a.value = g),
|
|
1004
1004
|
type: "email",
|
|
@@ -1010,7 +1010,7 @@ const ae = ie("admin-auth", () => {
|
|
|
1010
1010
|
error: _.value,
|
|
1011
1011
|
name: "email"
|
|
1012
1012
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
1013
|
-
|
|
1013
|
+
$(r(ve), {
|
|
1014
1014
|
modelValue: l.value,
|
|
1015
1015
|
"onUpdate:modelValue": y[1] || (y[1] = (g) => l.value = g),
|
|
1016
1016
|
type: "password",
|
|
@@ -1021,10 +1021,10 @@ const ae = ie("admin-auth", () => {
|
|
|
1021
1021
|
error: k.value,
|
|
1022
1022
|
name: "password"
|
|
1023
1023
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
1024
|
-
d("div",
|
|
1025
|
-
|
|
1026
|
-
modelValue:
|
|
1027
|
-
"onUpdate:modelValue": y[2] || (y[2] = (g) =>
|
|
1024
|
+
d("div", va, [
|
|
1025
|
+
$(r($t), {
|
|
1026
|
+
modelValue: s.value,
|
|
1027
|
+
"onUpdate:modelValue": y[2] || (y[2] = (g) => s.value = g),
|
|
1028
1028
|
disabled: u.value
|
|
1029
1029
|
}, {
|
|
1030
1030
|
default: m(() => [...y[3] || (y[3] = [
|
|
@@ -1036,9 +1036,9 @@ const ae = ie("admin-auth", () => {
|
|
|
1036
1036
|
key: 0,
|
|
1037
1037
|
href: e.forgotUrl,
|
|
1038
1038
|
class: "admin-auth-card__link"
|
|
1039
|
-
}, " Забыли пароль? ", 8,
|
|
1039
|
+
}, " Забыли пароль? ", 8, pa)) : F("", !0)
|
|
1040
1040
|
]),
|
|
1041
|
-
|
|
1041
|
+
$(r(O), {
|
|
1042
1042
|
type: "submit",
|
|
1043
1043
|
variant: "primary",
|
|
1044
1044
|
size: "lg",
|
|
@@ -1050,69 +1050,69 @@ const ae = ie("admin-auth", () => {
|
|
|
1050
1050
|
]),
|
|
1051
1051
|
_: 1
|
|
1052
1052
|
}, 8, ["loading", "disabled"]),
|
|
1053
|
-
e.ssoLinkLabel && e.ssoUrl ? (o(), c("div",
|
|
1053
|
+
e.ssoLinkLabel && e.ssoUrl ? (o(), c("div", ga, [
|
|
1054
1054
|
y[4] || (y[4] = C(" или войдите через ", -1)),
|
|
1055
1055
|
d("a", {
|
|
1056
1056
|
href: e.ssoUrl,
|
|
1057
1057
|
class: "admin-auth-card__link"
|
|
1058
|
-
}, h(e.ssoLinkLabel), 9,
|
|
1058
|
+
}, h(e.ssoLinkLabel), 9, ha)
|
|
1059
1059
|
])) : F("", !0)
|
|
1060
1060
|
], 32));
|
|
1061
1061
|
}
|
|
1062
|
-
}),
|
|
1062
|
+
}), ya = ["value", "disabled", "aria-label", "onInput", "onKeydown"], ba = { class: "admin-auth-card__row" }, ka = /* @__PURE__ */ T({
|
|
1063
1063
|
__name: "TwoFactorForm",
|
|
1064
1064
|
emits: ["success", "cancel"],
|
|
1065
1065
|
setup(e, { emit: t }) {
|
|
1066
|
-
const n = t,
|
|
1067
|
-
function S(
|
|
1068
|
-
|
|
1066
|
+
const n = t, i = le(), a = U("totp"), l = U(["", "", "", "", "", ""]), s = U(""), u = U([]), f = U(!1), p = U(null), _ = U(null), k = v(() => l.value.join("")), x = v(() => a.value === "totp" ? k.value.length === 6 : s.value.trim().length > 0);
|
|
1067
|
+
function S(w, D) {
|
|
1068
|
+
D instanceof HTMLInputElement && (u.value[w] = D);
|
|
1069
1069
|
}
|
|
1070
|
-
function y(
|
|
1071
|
-
const W =
|
|
1072
|
-
l.value[
|
|
1070
|
+
function y(w, D) {
|
|
1071
|
+
const W = D.target, j = W.value.replace(/\D/g, "").slice(-1);
|
|
1072
|
+
l.value[w] = j, W.value = j, j && w < l.value.length - 1 && $e(() => u.value[w + 1]?.focus()), k.value.length === l.value.length && q();
|
|
1073
1073
|
}
|
|
1074
|
-
function g(
|
|
1075
|
-
|
|
1074
|
+
function g(w, D) {
|
|
1075
|
+
D.key === "Backspace" && !l.value[w] && w > 0 ? $e(() => u.value[w - 1]?.focus()) : D.key === "ArrowLeft" && w > 0 ? (u.value[w - 1]?.focus(), D.preventDefault()) : D.key === "ArrowRight" && w < l.value.length - 1 && (u.value[w + 1]?.focus(), D.preventDefault());
|
|
1076
1076
|
}
|
|
1077
|
-
function A(
|
|
1078
|
-
const W = (
|
|
1077
|
+
function A(w) {
|
|
1078
|
+
const W = (w.clipboardData?.getData("text") ?? "").replace(/\D/g, "").slice(0, l.value.length);
|
|
1079
1079
|
if (W.length !== 0) {
|
|
1080
|
-
|
|
1081
|
-
for (let
|
|
1082
|
-
l.value[
|
|
1080
|
+
w.preventDefault();
|
|
1081
|
+
for (let j = 0; j < l.value.length; j++)
|
|
1082
|
+
l.value[j] = W[j] ?? "";
|
|
1083
1083
|
$e(() => {
|
|
1084
|
-
u.value[Math.min(W.length, l.value.length - 1)]?.focus(), W.length === l.value.length &&
|
|
1084
|
+
u.value[Math.min(W.length, l.value.length - 1)]?.focus(), W.length === l.value.length && q();
|
|
1085
1085
|
});
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
|
-
async function
|
|
1088
|
+
async function q() {
|
|
1089
1089
|
if (!(f.value || !x.value)) {
|
|
1090
1090
|
f.value = !0, p.value = null;
|
|
1091
1091
|
try {
|
|
1092
1092
|
if (a.value === "totp")
|
|
1093
|
-
await
|
|
1093
|
+
await i.twoFactorChallenge(k.value);
|
|
1094
1094
|
else {
|
|
1095
|
-
const
|
|
1096
|
-
_.value =
|
|
1095
|
+
const w = await i.twoFactorRecovery(s.value.trim());
|
|
1096
|
+
_.value = w.remaining;
|
|
1097
1097
|
}
|
|
1098
1098
|
n("success");
|
|
1099
|
-
} catch (
|
|
1100
|
-
|
|
1099
|
+
} catch (w) {
|
|
1100
|
+
w instanceof Ve ? p.value = w.firstFieldMessage() ?? "Неверный код" : w instanceof qe ? p.value = "Нет соединения с сервером" : w instanceof oe ? p.value = w.message || "Не удалось проверить код" : p.value = w.message;
|
|
1101
1101
|
} finally {
|
|
1102
1102
|
f.value = !1;
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1107
|
-
|
|
1106
|
+
function L() {
|
|
1107
|
+
i.cancelChallenge(), n("cancel");
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function E() {
|
|
1110
1110
|
a.value = a.value === "totp" ? "recovery" : "totp", p.value = null;
|
|
1111
1111
|
}
|
|
1112
|
-
return (
|
|
1112
|
+
return (w, D) => (o(), c("form", {
|
|
1113
1113
|
class: "admin-auth-card__bd",
|
|
1114
1114
|
novalidate: "",
|
|
1115
|
-
onSubmit: we(
|
|
1115
|
+
onSubmit: we(q, ["prevent"])
|
|
1116
1116
|
}, [
|
|
1117
1117
|
p.value ? (o(), b(r(se), {
|
|
1118
1118
|
key: 0,
|
|
@@ -1141,31 +1141,31 @@ const ae = ie("admin-auth", () => {
|
|
|
1141
1141
|
class: "admin-code-input",
|
|
1142
1142
|
onPaste: A
|
|
1143
1143
|
}, [
|
|
1144
|
-
(o(!0), c(M, null,
|
|
1145
|
-
key:
|
|
1144
|
+
(o(!0), c(M, null, V(l.value, (W, j) => (o(), c("input", {
|
|
1145
|
+
key: j,
|
|
1146
1146
|
ref_for: !0,
|
|
1147
|
-
ref: (N) => S(
|
|
1148
|
-
value: l.value[
|
|
1147
|
+
ref: (N) => S(j, N),
|
|
1148
|
+
value: l.value[j],
|
|
1149
1149
|
type: "text",
|
|
1150
1150
|
inputmode: "numeric",
|
|
1151
1151
|
autocomplete: "one-time-code",
|
|
1152
1152
|
maxlength: "1",
|
|
1153
1153
|
disabled: f.value,
|
|
1154
|
-
"aria-label": `Цифра ${
|
|
1155
|
-
onInput: (N) => y(
|
|
1156
|
-
onKeydown: (N) => g(
|
|
1157
|
-
}, null, 40,
|
|
1154
|
+
"aria-label": `Цифра ${j + 1}`,
|
|
1155
|
+
onInput: (N) => y(j, N),
|
|
1156
|
+
onKeydown: (N) => g(j, N)
|
|
1157
|
+
}, null, 40, ya))), 128))
|
|
1158
1158
|
], 32)) : (o(), b(r(ve), {
|
|
1159
1159
|
key: 3,
|
|
1160
|
-
modelValue:
|
|
1161
|
-
"onUpdate:modelValue":
|
|
1160
|
+
modelValue: s.value,
|
|
1161
|
+
"onUpdate:modelValue": D[0] || (D[0] = (W) => s.value = W),
|
|
1162
1162
|
type: "text",
|
|
1163
1163
|
label: "Recovery-код",
|
|
1164
1164
|
autocomplete: "one-time-code",
|
|
1165
1165
|
disabled: f.value,
|
|
1166
1166
|
name: "recovery-code"
|
|
1167
1167
|
}, null, 8, ["modelValue", "disabled"])),
|
|
1168
|
-
|
|
1168
|
+
$(r(O), {
|
|
1169
1169
|
type: "submit",
|
|
1170
1170
|
variant: "primary",
|
|
1171
1171
|
size: "lg",
|
|
@@ -1177,11 +1177,11 @@ const ae = ie("admin-auth", () => {
|
|
|
1177
1177
|
]),
|
|
1178
1178
|
_: 1
|
|
1179
1179
|
}, 8, ["loading", "disabled"]),
|
|
1180
|
-
d("div",
|
|
1180
|
+
d("div", ba, [
|
|
1181
1181
|
d("button", {
|
|
1182
1182
|
type: "button",
|
|
1183
1183
|
class: "admin-auth-card__link",
|
|
1184
|
-
onClick:
|
|
1184
|
+
onClick: E
|
|
1185
1185
|
}, [
|
|
1186
1186
|
a.value === "totp" ? (o(), c(M, { key: 0 }, [
|
|
1187
1187
|
C("Использовать recovery-код")
|
|
@@ -1192,18 +1192,18 @@ const ae = ie("admin-auth", () => {
|
|
|
1192
1192
|
d("button", {
|
|
1193
1193
|
type: "button",
|
|
1194
1194
|
class: "admin-auth-card__link",
|
|
1195
|
-
onClick:
|
|
1195
|
+
onClick: L
|
|
1196
1196
|
}, " Отмена ")
|
|
1197
1197
|
])
|
|
1198
1198
|
], 32));
|
|
1199
1199
|
}
|
|
1200
|
-
}),
|
|
1200
|
+
}), wa = { class: "admin-auth-page" }, $a = {
|
|
1201
1201
|
key: 0,
|
|
1202
1202
|
class: "admin-auth-page__corner"
|
|
1203
|
-
},
|
|
1203
|
+
}, xa = { class: "admin-auth-card__hd" }, Sa = ["src", "alt"], Ca = {
|
|
1204
1204
|
key: 1,
|
|
1205
1205
|
"aria-hidden": "true"
|
|
1206
|
-
},
|
|
1206
|
+
}, Aa = { key: 2 }, Ea = { class: "admin-auth-card__title" }, Ra = { class: "admin-auth-card__sub" }, Ua = /* @__PURE__ */ T({
|
|
1207
1207
|
__name: "LoginPage",
|
|
1208
1208
|
props: {
|
|
1209
1209
|
brandName: { default: "Laravel Admin" },
|
|
@@ -1217,50 +1217,50 @@ const ae = ie("admin-auth", () => {
|
|
|
1217
1217
|
showCornerActions: { type: Boolean, default: !0 }
|
|
1218
1218
|
},
|
|
1219
1219
|
setup(e) {
|
|
1220
|
-
const t = e, n =
|
|
1220
|
+
const t = e, n = le(), i = de(), a = Se();
|
|
1221
1221
|
async function l() {
|
|
1222
|
-
const
|
|
1223
|
-
if (typeof
|
|
1224
|
-
await
|
|
1222
|
+
const s = a.query[t.redirectQueryKey];
|
|
1223
|
+
if (typeof s == "string" && s.length > 0 && s.startsWith("/")) {
|
|
1224
|
+
await i.push(s);
|
|
1225
1225
|
return;
|
|
1226
1226
|
}
|
|
1227
|
-
await
|
|
1227
|
+
await i.push({ name: t.homeRouteName });
|
|
1228
1228
|
}
|
|
1229
1229
|
return te(
|
|
1230
1230
|
() => n.isAuthenticated,
|
|
1231
|
-
(
|
|
1232
|
-
|
|
1231
|
+
(s) => {
|
|
1232
|
+
s && l();
|
|
1233
1233
|
}
|
|
1234
|
-
),
|
|
1234
|
+
), Ie(() => {
|
|
1235
1235
|
n.isAuthenticated && l();
|
|
1236
|
-
}), (
|
|
1237
|
-
e.showCornerActions ? (o(), c("div",
|
|
1238
|
-
|
|
1239
|
-
|
|
1236
|
+
}), (s, u) => (o(), c("div", wa, [
|
|
1237
|
+
e.showCornerActions ? (o(), c("div", $a, [
|
|
1238
|
+
$(Et),
|
|
1239
|
+
$(Rt)
|
|
1240
1240
|
])) : F("", !0),
|
|
1241
|
-
|
|
1242
|
-
class:
|
|
1241
|
+
$(r(H), {
|
|
1242
|
+
class: ae(["admin-auth-card", r(n).isChallengePending ? "admin-auth-card--wide" : ""]),
|
|
1243
1243
|
padding: "none"
|
|
1244
1244
|
}, {
|
|
1245
1245
|
default: m(() => [
|
|
1246
|
-
d("div",
|
|
1246
|
+
d("div", xa, [
|
|
1247
1247
|
d("div", {
|
|
1248
|
-
class:
|
|
1248
|
+
class: ae(["admin-auth-card__logo", r(n).isChallengePending ? "admin-auth-card__logo--accent" : ""])
|
|
1249
1249
|
}, [
|
|
1250
1250
|
e.brandLogo && !r(n).isChallengePending ? (o(), c("img", {
|
|
1251
1251
|
key: 0,
|
|
1252
1252
|
src: e.brandLogo,
|
|
1253
1253
|
alt: e.brandName
|
|
1254
|
-
}, null, 8,
|
|
1254
|
+
}, null, 8, Sa)) : r(n).isChallengePending ? (o(), c("span", Ca, "🛡")) : (o(), c("span", Aa, h(e.brandMark), 1))
|
|
1255
1255
|
], 2),
|
|
1256
|
-
d("div",
|
|
1256
|
+
d("div", Ea, [
|
|
1257
1257
|
r(n).isChallengePending ? (o(), c(M, { key: 0 }, [
|
|
1258
1258
|
C("Двухфакторная проверка")
|
|
1259
1259
|
], 64)) : (o(), c(M, { key: 1 }, [
|
|
1260
1260
|
C(h(e.brandName), 1)
|
|
1261
1261
|
], 64))
|
|
1262
1262
|
]),
|
|
1263
|
-
d("div",
|
|
1263
|
+
d("div", Ra, [
|
|
1264
1264
|
r(n).isChallengePending ? (o(), c(M, { key: 0 }, [
|
|
1265
1265
|
C(" Введите 6-значный код из приложения-аутентификатора ")
|
|
1266
1266
|
], 64)) : (o(), c(M, { key: 1 }, [
|
|
@@ -1268,13 +1268,13 @@ const ae = ie("admin-auth", () => {
|
|
|
1268
1268
|
], 64))
|
|
1269
1269
|
])
|
|
1270
1270
|
]),
|
|
1271
|
-
r(n).isChallengePending ? (o(), b(
|
|
1271
|
+
r(n).isChallengePending ? (o(), b(ka, {
|
|
1272
1272
|
key: 0,
|
|
1273
1273
|
onSuccess: u[0] || (u[0] = () => {
|
|
1274
1274
|
}),
|
|
1275
1275
|
onCancel: u[1] || (u[1] = () => {
|
|
1276
1276
|
})
|
|
1277
|
-
})) : (o(), b(
|
|
1277
|
+
})) : (o(), b(_a, {
|
|
1278
1278
|
key: 1,
|
|
1279
1279
|
"forgot-url": e.forgotUrl,
|
|
1280
1280
|
"sso-link-label": e.ssoLinkLabel,
|
|
@@ -1288,7 +1288,7 @@ const ae = ie("admin-auth", () => {
|
|
|
1288
1288
|
]));
|
|
1289
1289
|
}
|
|
1290
1290
|
});
|
|
1291
|
-
const
|
|
1291
|
+
const Fa = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1292
1292
|
var Re = {
|
|
1293
1293
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1294
1294
|
width: 24,
|
|
@@ -1300,27 +1300,27 @@ var Re = {
|
|
|
1300
1300
|
"stroke-linecap": "round",
|
|
1301
1301
|
"stroke-linejoin": "round"
|
|
1302
1302
|
};
|
|
1303
|
-
const
|
|
1303
|
+
const La = ({ size: e, strokeWidth: t = 2, absoluteStrokeWidth: n, color: i, iconNode: a, name: l, class: s, ...u }, { slots: f }) => Me(
|
|
1304
1304
|
"svg",
|
|
1305
1305
|
{
|
|
1306
1306
|
...Re,
|
|
1307
1307
|
width: e || Re.width,
|
|
1308
1308
|
height: e || Re.height,
|
|
1309
|
-
stroke:
|
|
1309
|
+
stroke: i || Re.stroke,
|
|
1310
1310
|
"stroke-width": n ? Number(t) * 24 / Number(e) : t,
|
|
1311
|
-
class: ["lucide", `lucide-${
|
|
1311
|
+
class: ["lucide", `lucide-${Fa(l ?? "icon")}`],
|
|
1312
1312
|
...u
|
|
1313
1313
|
},
|
|
1314
|
-
[...a.map((p) =>
|
|
1314
|
+
[...a.map((p) => Me(...p)), ...f.default ? [f.default()] : []]
|
|
1315
1315
|
);
|
|
1316
|
-
const st = (e, t) => (n, { slots:
|
|
1317
|
-
|
|
1316
|
+
const st = (e, t) => (n, { slots: i }) => Me(
|
|
1317
|
+
La,
|
|
1318
1318
|
{
|
|
1319
1319
|
...n,
|
|
1320
1320
|
iconNode: t,
|
|
1321
1321
|
name: e
|
|
1322
1322
|
},
|
|
1323
|
-
|
|
1323
|
+
i
|
|
1324
1324
|
);
|
|
1325
1325
|
const Ta = st("EyeIcon", [
|
|
1326
1326
|
[
|
|
@@ -1332,7 +1332,7 @@ const Ta = st("EyeIcon", [
|
|
|
1332
1332
|
],
|
|
1333
1333
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
1334
1334
|
]);
|
|
1335
|
-
const
|
|
1335
|
+
const Pa = st("PencilIcon", [
|
|
1336
1336
|
[
|
|
1337
1337
|
"path",
|
|
1338
1338
|
{
|
|
@@ -1342,88 +1342,88 @@ const La = st("PencilIcon", [
|
|
|
1342
1342
|
],
|
|
1343
1343
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
1344
1344
|
]);
|
|
1345
|
-
const
|
|
1345
|
+
const Ma = st("Trash2Icon", [
|
|
1346
1346
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
1347
1347
|
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
|
|
1348
1348
|
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
1349
1349
|
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
|
|
1350
1350
|
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
1351
|
-
]), dt = { page: 1, per_page: 20, total: 0, last_page: 1 },
|
|
1352
|
-
const e =
|
|
1353
|
-
let
|
|
1354
|
-
const u = 200, f =
|
|
1355
|
-
function
|
|
1351
|
+
]), dt = { page: 1, per_page: 20, total: 0, last_page: 1 }, Lt = ie("admin-resource-index", () => {
|
|
1352
|
+
const e = U(null), t = U([]), n = U({ ...dt }), i = U(!1), a = U(!1), l = U(null);
|
|
1353
|
+
let s = null;
|
|
1354
|
+
const u = 200, f = U(""), p = U({}), _ = U(null), k = U(null), x = U(/* @__PURE__ */ new Set()), S = v(() => !i.value && l.value === null && t.value.length === 0), y = v(() => x.value.size), g = v(() => x.value.size > 0), A = v(() => l.value !== null), q = v(() => x.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((K) => x.value.has(L(K))) ? "all" : "mixed");
|
|
1355
|
+
function L(P) {
|
|
1356
1356
|
return P.id ?? P.key ?? "";
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
e.value !== P && (e.value = P,
|
|
1358
|
+
function E(P) {
|
|
1359
|
+
e.value !== P && (e.value = P, w(), i.value = !0);
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1362
|
-
t.value = [], n.value = { ...dt },
|
|
1361
|
+
function w() {
|
|
1362
|
+
t.value = [], n.value = { ...dt }, i.value = !1, l.value = null, f.value = "", p.value = {}, _.value = null, k.value = null, x.value = /* @__PURE__ */ new Set();
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1365
|
-
const
|
|
1364
|
+
function D(P = {}) {
|
|
1365
|
+
const K = {
|
|
1366
1366
|
page: P.page ?? n.value.page,
|
|
1367
1367
|
per_page: P.per_page ?? n.value.per_page
|
|
1368
1368
|
}, Ee = P.search ?? f.value;
|
|
1369
|
-
Ee && (
|
|
1369
|
+
Ee && (K.q = Ee);
|
|
1370
1370
|
const be = P.sort ?? _.value, ot = P.direction ?? k.value;
|
|
1371
|
-
be && ot !== null && (
|
|
1372
|
-
const
|
|
1373
|
-
for (const [
|
|
1374
|
-
me == null || me === "" || (
|
|
1375
|
-
return Object.keys(
|
|
1371
|
+
be && ot !== null && (K.order = [{ column: be, direction: ot }]);
|
|
1372
|
+
const Bt = P.filters ?? p.value, je = {};
|
|
1373
|
+
for (const [Dt, me] of Object.entries(Bt))
|
|
1374
|
+
me == null || me === "" || (je[Dt] = Array.isArray(me) ? me.join(",") : me);
|
|
1375
|
+
return Object.keys(je).length > 0 && (K.filters = je), K;
|
|
1376
1376
|
}
|
|
1377
1377
|
async function W(P = {}) {
|
|
1378
1378
|
if (!e.value)
|
|
1379
1379
|
throw new Error("useResourceIndexStore.load() called before setSlug()");
|
|
1380
|
-
|
|
1380
|
+
i.value = !0, l.value = null, s !== null && clearTimeout(s), s = setTimeout(() => {
|
|
1381
1381
|
a.value = !0;
|
|
1382
1382
|
}, u);
|
|
1383
1383
|
try {
|
|
1384
|
-
const
|
|
1384
|
+
const K = J(), Ee = D(P), be = await K.post(`/${e.value}/search`, Ee);
|
|
1385
1385
|
t.value = be.data, n.value = be.meta;
|
|
1386
|
-
} catch (
|
|
1387
|
-
throw l.value =
|
|
1386
|
+
} catch (K) {
|
|
1387
|
+
throw l.value = K instanceof Error ? K : new Error(String(K)), K;
|
|
1388
1388
|
} finally {
|
|
1389
|
-
|
|
1389
|
+
i.value = !1, a.value = !1, s !== null && (clearTimeout(s), s = null);
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
|
-
async function
|
|
1392
|
+
async function j(P) {
|
|
1393
1393
|
f.value = P, n.value.page = 1, await W();
|
|
1394
1394
|
}
|
|
1395
|
-
async function N(P,
|
|
1396
|
-
|
|
1395
|
+
async function N(P, K) {
|
|
1396
|
+
K == null || K === "" ? delete p.value[P] : p.value[P] = K, n.value.page = 1, await W();
|
|
1397
1397
|
}
|
|
1398
1398
|
async function Y() {
|
|
1399
1399
|
p.value = {}, n.value.page = 1, await W();
|
|
1400
1400
|
}
|
|
1401
|
-
async function Q(P,
|
|
1402
|
-
_.value = P, k.value =
|
|
1401
|
+
async function Q(P, K = "asc") {
|
|
1402
|
+
_.value = P, k.value = K, await W();
|
|
1403
1403
|
}
|
|
1404
|
-
async function
|
|
1404
|
+
async function X(P) {
|
|
1405
1405
|
_.value === P ? k.value === "asc" ? k.value = "desc" : k.value === "desc" ? (_.value = null, k.value = null) : k.value = "asc" : (_.value = P, k.value = "asc"), await W();
|
|
1406
1406
|
}
|
|
1407
1407
|
async function ne(P) {
|
|
1408
1408
|
n.value.page = P, await W();
|
|
1409
1409
|
}
|
|
1410
1410
|
function I(P) {
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1411
|
+
const K = new Set(x.value);
|
|
1412
|
+
K.has(P) ? K.delete(P) : K.add(P), x.value = K;
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
if (
|
|
1414
|
+
function R() {
|
|
1415
|
+
if (q.value === "all") {
|
|
1416
1416
|
x.value = /* @__PURE__ */ new Set();
|
|
1417
1417
|
return;
|
|
1418
1418
|
}
|
|
1419
1419
|
const P = new Set(x.value);
|
|
1420
|
-
for (const
|
|
1420
|
+
for (const K of t.value) P.add(L(K));
|
|
1421
1421
|
x.value = P;
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function z() {
|
|
1424
1424
|
x.value = /* @__PURE__ */ new Set();
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function G(P) {
|
|
1427
1427
|
return x.value.has(P);
|
|
1428
1428
|
}
|
|
1429
1429
|
return {
|
|
@@ -1431,7 +1431,7 @@ const Pa = st("Trash2Icon", [
|
|
|
1431
1431
|
slug: e,
|
|
1432
1432
|
items: t,
|
|
1433
1433
|
meta: n,
|
|
1434
|
-
loading:
|
|
1434
|
+
loading: i,
|
|
1435
1435
|
slowLoading: a,
|
|
1436
1436
|
error: l,
|
|
1437
1437
|
search: f,
|
|
@@ -1444,36 +1444,36 @@ const Pa = st("Trash2Icon", [
|
|
|
1444
1444
|
hasError: A,
|
|
1445
1445
|
hasSelection: g,
|
|
1446
1446
|
selectedCount: y,
|
|
1447
|
-
selectionState:
|
|
1447
|
+
selectionState: q,
|
|
1448
1448
|
// actions
|
|
1449
|
-
setSlug:
|
|
1450
|
-
reset:
|
|
1449
|
+
setSlug: E,
|
|
1450
|
+
reset: w,
|
|
1451
1451
|
load: W,
|
|
1452
|
-
setSearch:
|
|
1452
|
+
setSearch: j,
|
|
1453
1453
|
setFilter: N,
|
|
1454
1454
|
clearFilters: Y,
|
|
1455
1455
|
setSort: Q,
|
|
1456
|
-
toggleSort:
|
|
1456
|
+
toggleSort: X,
|
|
1457
1457
|
setPage: ne,
|
|
1458
1458
|
toggleRow: I,
|
|
1459
|
-
toggleAllOnPage:
|
|
1460
|
-
clearSelection:
|
|
1461
|
-
isSelected:
|
|
1462
|
-
rowId:
|
|
1459
|
+
toggleAllOnPage: R,
|
|
1460
|
+
clearSelection: z,
|
|
1461
|
+
isSelected: G,
|
|
1462
|
+
rowId: L
|
|
1463
1463
|
};
|
|
1464
|
-
}),
|
|
1464
|
+
}), Na = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1465
1465
|
__proto__: null,
|
|
1466
|
-
useResourceIndexStore:
|
|
1467
|
-
}, Symbol.toStringTag, { value: "Module" })), ct = "d.m.Y H:i:s",
|
|
1468
|
-
function
|
|
1466
|
+
useResourceIndexStore: Lt
|
|
1467
|
+
}, Symbol.toStringTag, { value: "Module" })), ct = "d.m.Y H:i:s", Ia = "d.m.Y", Ba = /^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}/;
|
|
1468
|
+
function Tt(e, t, n = {}) {
|
|
1469
1469
|
if (e == null) return "";
|
|
1470
|
-
if (!t && typeof e == "string" &&
|
|
1471
|
-
return
|
|
1470
|
+
if (!t && typeof e == "string" && Ba.test(e))
|
|
1471
|
+
return He(e, ct);
|
|
1472
1472
|
switch (t) {
|
|
1473
1473
|
case "date":
|
|
1474
|
-
return
|
|
1474
|
+
return He(String(e), n.format ?? Ia);
|
|
1475
1475
|
case "datetime":
|
|
1476
|
-
return
|
|
1476
|
+
return He(String(e), n.format ?? ct);
|
|
1477
1477
|
case "money":
|
|
1478
1478
|
return Da(e, n.currency ?? "RUB", n.decimals ?? 2);
|
|
1479
1479
|
case "boolean":
|
|
@@ -1484,28 +1484,28 @@ function Ba(e, t, n = {}) {
|
|
|
1484
1484
|
return String(e);
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function He(e, t) {
|
|
1488
1488
|
const n = new Date(e);
|
|
1489
1489
|
if (isNaN(n.getTime())) return e;
|
|
1490
|
-
const
|
|
1491
|
-
d:
|
|
1492
|
-
m:
|
|
1490
|
+
const i = (s, u = 2) => String(s).padStart(u, "0"), a = {
|
|
1491
|
+
d: i(n.getDate()),
|
|
1492
|
+
m: i(n.getMonth() + 1),
|
|
1493
1493
|
Y: String(n.getFullYear()),
|
|
1494
|
-
y:
|
|
1495
|
-
H:
|
|
1496
|
-
h:
|
|
1497
|
-
i:
|
|
1498
|
-
s:
|
|
1494
|
+
y: i(n.getFullYear() % 100),
|
|
1495
|
+
H: i(n.getHours()),
|
|
1496
|
+
h: i((n.getHours() + 11) % 12 + 1),
|
|
1497
|
+
i: i(n.getMinutes()),
|
|
1498
|
+
s: i(n.getSeconds()),
|
|
1499
1499
|
U: String(Math.floor(n.getTime() / 1e3)),
|
|
1500
1500
|
c: n.toISOString(),
|
|
1501
1501
|
N: String((n.getDay() + 6) % 7 + 1),
|
|
1502
1502
|
w: String(n.getDay())
|
|
1503
1503
|
};
|
|
1504
1504
|
let l = "";
|
|
1505
|
-
for (let
|
|
1506
|
-
const u = t[
|
|
1507
|
-
if (u === "\\" &&
|
|
1508
|
-
l += t[
|
|
1505
|
+
for (let s = 0; s < t.length; s++) {
|
|
1506
|
+
const u = t[s];
|
|
1507
|
+
if (u === "\\" && s + 1 < t.length) {
|
|
1508
|
+
l += t[s + 1], s++;
|
|
1509
1509
|
continue;
|
|
1510
1510
|
}
|
|
1511
1511
|
l += a[u] ?? u;
|
|
@@ -1513,8 +1513,8 @@ function Ge(e, t) {
|
|
|
1513
1513
|
return l;
|
|
1514
1514
|
}
|
|
1515
1515
|
function Da(e, t, n) {
|
|
1516
|
-
const
|
|
1517
|
-
return isNaN(
|
|
1516
|
+
const i = typeof e == "number" ? e : Number(e);
|
|
1517
|
+
return isNaN(i) ? String(e) : `${i.toFixed(n)} ${t}`;
|
|
1518
1518
|
}
|
|
1519
1519
|
function za(e, t, n) {
|
|
1520
1520
|
return e === !0 || e === 1 || e === "1" || e === "true" ? t : n;
|
|
@@ -1545,7 +1545,7 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1545
1545
|
}, tl = ["onClick"], nl = ["onClick"], al = ["onClick"], ll = {
|
|
1546
1546
|
key: 6,
|
|
1547
1547
|
class: "admin-resource-index__footer"
|
|
1548
|
-
}, mt = "__row_actions__", sl = /* @__PURE__ */
|
|
1548
|
+
}, mt = "__row_actions__", sl = /* @__PURE__ */ T({
|
|
1549
1549
|
__name: "ResourceIndexPage",
|
|
1550
1550
|
props: {
|
|
1551
1551
|
slug: {},
|
|
@@ -1556,40 +1556,40 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1556
1556
|
},
|
|
1557
1557
|
emits: ["bulk-action", "row-click"],
|
|
1558
1558
|
setup(e, { emit: t }) {
|
|
1559
|
-
const n = e,
|
|
1559
|
+
const n = e, i = t, a = Lt(), l = ce(), s = lt(), u = de(), f = v(() => l.getResource(n.slug)), p = v(
|
|
1560
1560
|
() => n.title ?? f.value?.label ?? n.slug
|
|
1561
1561
|
), _ = v(() => {
|
|
1562
|
-
const
|
|
1563
|
-
const
|
|
1562
|
+
const R = (f.value?.columns ?? []).map((z) => {
|
|
1563
|
+
const G = z;
|
|
1564
1564
|
return {
|
|
1565
|
-
key: String(
|
|
1566
|
-
label: String(
|
|
1567
|
-
sortable: !!
|
|
1568
|
-
align:
|
|
1569
|
-
width: typeof
|
|
1565
|
+
key: String(G.key ?? G.name ?? ""),
|
|
1566
|
+
label: String(G.label ?? G.name ?? ""),
|
|
1567
|
+
sortable: !!G.sortable,
|
|
1568
|
+
align: G.align ?? "left",
|
|
1569
|
+
width: typeof G.width == "string" ? G.width : void 0
|
|
1570
1570
|
};
|
|
1571
|
-
}).filter((
|
|
1572
|
-
return
|
|
1571
|
+
}).filter((z) => z.key);
|
|
1572
|
+
return R.push({
|
|
1573
1573
|
key: mt,
|
|
1574
1574
|
label: "",
|
|
1575
1575
|
sortable: !1,
|
|
1576
1576
|
align: "right",
|
|
1577
1577
|
width: "120px"
|
|
1578
|
-
}),
|
|
1578
|
+
}), R;
|
|
1579
1579
|
}), k = v(() => {
|
|
1580
|
-
const I = f.value?.columns ?? [],
|
|
1581
|
-
for (const
|
|
1582
|
-
const
|
|
1583
|
-
P && (
|
|
1584
|
-
preset: typeof
|
|
1585
|
-
meta:
|
|
1580
|
+
const I = f.value?.columns ?? [], R = {};
|
|
1581
|
+
for (const z of I) {
|
|
1582
|
+
const G = z, P = String(G.key ?? G.name ?? "");
|
|
1583
|
+
P && (R[P] = {
|
|
1584
|
+
preset: typeof G.preset == "string" ? G.preset : void 0,
|
|
1585
|
+
meta: G.meta ?? {}
|
|
1586
1586
|
});
|
|
1587
1587
|
}
|
|
1588
|
-
return
|
|
1588
|
+
return R;
|
|
1589
1589
|
});
|
|
1590
|
-
function x(I,
|
|
1591
|
-
const
|
|
1592
|
-
return
|
|
1590
|
+
function x(I, R) {
|
|
1591
|
+
const G = R?.row?.[I], P = k.value[I];
|
|
1592
|
+
return Tt(G, P?.preset, P?.meta ?? {});
|
|
1593
1593
|
}
|
|
1594
1594
|
function S(I) {
|
|
1595
1595
|
return I?.row;
|
|
@@ -1602,76 +1602,76 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1602
1602
|
const I = a.meta.total;
|
|
1603
1603
|
return I === 0 ? "" : `${a.items.length} из ${I}`;
|
|
1604
1604
|
});
|
|
1605
|
-
async function
|
|
1606
|
-
|
|
1605
|
+
async function q() {
|
|
1606
|
+
s.start();
|
|
1607
1607
|
try {
|
|
1608
1608
|
await a.load();
|
|
1609
1609
|
} catch {
|
|
1610
1610
|
} finally {
|
|
1611
|
-
|
|
1611
|
+
s.end();
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
|
|
1614
|
+
Ie(async () => {
|
|
1615
1615
|
a.setSlug(n.slug), l.manifest === null && await l.load().catch(() => {
|
|
1616
|
-
}), await
|
|
1616
|
+
}), await q();
|
|
1617
1617
|
}), te(
|
|
1618
1618
|
() => n.slug,
|
|
1619
|
-
async (I,
|
|
1620
|
-
I !==
|
|
1619
|
+
async (I, R) => {
|
|
1620
|
+
I !== R && (a.setSlug(I), await q());
|
|
1621
1621
|
}
|
|
1622
1622
|
);
|
|
1623
|
-
async function
|
|
1623
|
+
async function L(I) {
|
|
1624
1624
|
await $e(), await a.setSort(I, a.sortDirection);
|
|
1625
1625
|
}
|
|
1626
|
-
async function
|
|
1626
|
+
async function E(I) {
|
|
1627
1627
|
await $e(), await a.setSort(a.sortKey, I);
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1629
|
+
function w(I) {
|
|
1630
1630
|
a.selection = I;
|
|
1631
1631
|
}
|
|
1632
|
-
async function
|
|
1632
|
+
async function D(I) {
|
|
1633
1633
|
await a.setPage(I);
|
|
1634
1634
|
}
|
|
1635
1635
|
function W(I) {
|
|
1636
|
-
const
|
|
1637
|
-
return typeof
|
|
1636
|
+
const R = I?.id ?? I?.key;
|
|
1637
|
+
return typeof R == "string" || typeof R == "number" ? R : null;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1640
|
-
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1639
|
+
function j(I) {
|
|
1640
|
+
i("row-click", I);
|
|
1641
|
+
const R = W(I);
|
|
1642
|
+
R !== null && u.push({ name: `admin.resource.${n.slug}.view`, params: { id: String(R) } });
|
|
1643
1643
|
}
|
|
1644
|
-
function N(I,
|
|
1645
|
-
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1644
|
+
function N(I, R) {
|
|
1645
|
+
R?.stopPropagation();
|
|
1646
|
+
const z = W(I);
|
|
1647
|
+
z !== null && u.push({ name: `admin.resource.${n.slug}.view`, params: { id: String(z) } });
|
|
1648
1648
|
}
|
|
1649
|
-
function Y(I,
|
|
1650
|
-
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1649
|
+
function Y(I, R) {
|
|
1650
|
+
R?.stopPropagation();
|
|
1651
|
+
const z = W(I);
|
|
1652
|
+
z !== null && u.push({ name: `admin.resource.${n.slug}.edit`, params: { id: String(z) } });
|
|
1653
1653
|
}
|
|
1654
|
-
async function Q(I,
|
|
1655
|
-
|
|
1656
|
-
const
|
|
1657
|
-
if (
|
|
1654
|
+
async function Q(I, R) {
|
|
1655
|
+
R?.stopPropagation();
|
|
1656
|
+
const z = W(I);
|
|
1657
|
+
if (z !== null && window.confirm("Удалить запись?"))
|
|
1658
1658
|
try {
|
|
1659
|
-
|
|
1660
|
-
const { getAdminClient:
|
|
1661
|
-
await
|
|
1659
|
+
s.start();
|
|
1660
|
+
const { getAdminClient: G } = await Promise.resolve().then(() => yn);
|
|
1661
|
+
await G().post(`/${n.slug}/delete`, { id: z }), await a.load().catch(() => {
|
|
1662
1662
|
});
|
|
1663
1663
|
} finally {
|
|
1664
|
-
|
|
1664
|
+
s.end();
|
|
1665
1665
|
}
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1668
|
-
|
|
1667
|
+
function X(I) {
|
|
1668
|
+
i("bulk-action", I, [...a.selection]);
|
|
1669
1669
|
}
|
|
1670
1670
|
async function ne() {
|
|
1671
1671
|
await a.load().catch(() => {
|
|
1672
1672
|
});
|
|
1673
1673
|
}
|
|
1674
|
-
return (I,
|
|
1674
|
+
return (I, R) => (o(), c("section", qa, [
|
|
1675
1675
|
d("header", Oa, [
|
|
1676
1676
|
d("div", Wa, [
|
|
1677
1677
|
d("h1", ja, h(p.value), 1),
|
|
@@ -1689,10 +1689,10 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1689
1689
|
]),
|
|
1690
1690
|
d("div", Ga, [
|
|
1691
1691
|
Z(I.$slots, "actions"),
|
|
1692
|
-
e.createRouteName ? (o(), b(r(
|
|
1692
|
+
e.createRouteName ? (o(), b(r(O), {
|
|
1693
1693
|
key: 0,
|
|
1694
1694
|
variant: "primary",
|
|
1695
|
-
onClick:
|
|
1695
|
+
onClick: R[0] || (R[0] = (z) => I.$router.push({ name: e.createRouteName }))
|
|
1696
1696
|
}, {
|
|
1697
1697
|
default: m(() => [
|
|
1698
1698
|
C(h(e.createLabel), 1)
|
|
@@ -1703,57 +1703,57 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1703
1703
|
]),
|
|
1704
1704
|
r(a).hasSelection ? (o(), c("div", Ha, [
|
|
1705
1705
|
d("span", Xa, [
|
|
1706
|
-
|
|
1706
|
+
R[7] || (R[7] = C(" Выбрано ", -1)),
|
|
1707
1707
|
d("b", null, h(r(a).selectedCount), 1)
|
|
1708
1708
|
]),
|
|
1709
|
-
|
|
1710
|
-
|
|
1709
|
+
R[13] || (R[13] = d("span", { class: "admin-bulk-toolbar__divider" }, null, -1)),
|
|
1710
|
+
$(r(O), {
|
|
1711
1711
|
size: "sm",
|
|
1712
1712
|
variant: "ghost",
|
|
1713
|
-
onClick:
|
|
1713
|
+
onClick: R[1] || (R[1] = (z) => X("publish"))
|
|
1714
1714
|
}, {
|
|
1715
|
-
default: m(() => [...
|
|
1715
|
+
default: m(() => [...R[8] || (R[8] = [
|
|
1716
1716
|
C("Опубликовать", -1)
|
|
1717
1717
|
])]),
|
|
1718
1718
|
_: 1
|
|
1719
1719
|
}),
|
|
1720
|
-
|
|
1720
|
+
$(r(O), {
|
|
1721
1721
|
size: "sm",
|
|
1722
1722
|
variant: "ghost",
|
|
1723
|
-
onClick:
|
|
1723
|
+
onClick: R[2] || (R[2] = (z) => X("archive"))
|
|
1724
1724
|
}, {
|
|
1725
|
-
default: m(() => [...
|
|
1725
|
+
default: m(() => [...R[9] || (R[9] = [
|
|
1726
1726
|
C("Архивировать", -1)
|
|
1727
1727
|
])]),
|
|
1728
1728
|
_: 1
|
|
1729
1729
|
}),
|
|
1730
|
-
|
|
1730
|
+
$(r(O), {
|
|
1731
1731
|
size: "sm",
|
|
1732
1732
|
variant: "ghost",
|
|
1733
|
-
onClick:
|
|
1733
|
+
onClick: R[3] || (R[3] = (z) => X("export"))
|
|
1734
1734
|
}, {
|
|
1735
|
-
default: m(() => [...
|
|
1735
|
+
default: m(() => [...R[10] || (R[10] = [
|
|
1736
1736
|
C("Экспорт", -1)
|
|
1737
1737
|
])]),
|
|
1738
1738
|
_: 1
|
|
1739
1739
|
}),
|
|
1740
|
-
|
|
1740
|
+
$(r(O), {
|
|
1741
1741
|
size: "sm",
|
|
1742
1742
|
variant: "danger",
|
|
1743
|
-
onClick:
|
|
1743
|
+
onClick: R[4] || (R[4] = (z) => X("delete"))
|
|
1744
1744
|
}, {
|
|
1745
|
-
default: m(() => [...
|
|
1745
|
+
default: m(() => [...R[11] || (R[11] = [
|
|
1746
1746
|
C("Удалить", -1)
|
|
1747
1747
|
])]),
|
|
1748
1748
|
_: 1
|
|
1749
1749
|
}),
|
|
1750
|
-
|
|
1751
|
-
|
|
1750
|
+
R[14] || (R[14] = d("span", { class: "admin-bulk-toolbar__spacer" }, null, -1)),
|
|
1751
|
+
$(r(O), {
|
|
1752
1752
|
size: "sm",
|
|
1753
1753
|
variant: "ghost",
|
|
1754
1754
|
onClick: r(a).clearSelection
|
|
1755
1755
|
}, {
|
|
1756
|
-
default: m(() => [...
|
|
1756
|
+
default: m(() => [...R[12] || (R[12] = [
|
|
1757
1757
|
C(" Снять выделение ", -1)
|
|
1758
1758
|
])]),
|
|
1759
1759
|
_: 1
|
|
@@ -1764,59 +1764,59 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1764
1764
|
type: "search",
|
|
1765
1765
|
placeholder: "Поиск…",
|
|
1766
1766
|
class: "admin-filter-bar__search",
|
|
1767
|
-
onKeydown:
|
|
1767
|
+
onKeydown: R[5] || (R[5] = Vt((z) => r(a).setSearch(z.target.value), ["enter"]))
|
|
1768
1768
|
}, null, 40, Ja),
|
|
1769
1769
|
Z(I.$slots, "filters", {
|
|
1770
1770
|
filters: r(a).filters,
|
|
1771
1771
|
setFilter: r(a).setFilter
|
|
1772
1772
|
}),
|
|
1773
|
-
|
|
1774
|
-
Object.keys(r(a).filters).length > 0 ? (o(), b(r(
|
|
1773
|
+
R[16] || (R[16] = d("span", { class: "admin-filter-bar__spacer" }, null, -1)),
|
|
1774
|
+
Object.keys(r(a).filters).length > 0 ? (o(), b(r(O), {
|
|
1775
1775
|
key: 0,
|
|
1776
1776
|
size: "sm",
|
|
1777
1777
|
variant: "ghost",
|
|
1778
1778
|
onClick: r(a).clearFilters
|
|
1779
1779
|
}, {
|
|
1780
|
-
default: m(() => [...
|
|
1780
|
+
default: m(() => [...R[15] || (R[15] = [
|
|
1781
1781
|
C(" Сброс ", -1)
|
|
1782
1782
|
])]),
|
|
1783
1783
|
_: 1
|
|
1784
1784
|
}, 8, ["onClick"])) : F("", !0)
|
|
1785
1785
|
])) : F("", !0),
|
|
1786
1786
|
r(a).loading && r(a).items.length === 0 ? (o(), c("div", Qa, [
|
|
1787
|
-
r(a).slowLoading ? (o(), c(M, { key: 0 },
|
|
1788
|
-
key:
|
|
1787
|
+
r(a).slowLoading ? (o(), c(M, { key: 0 }, V(8, (z) => $(r(Qe), {
|
|
1788
|
+
key: z,
|
|
1789
1789
|
height: "40px"
|
|
1790
1790
|
})), 64)) : F("", !0)
|
|
1791
|
-
])) : r(a).hasError ? (o(), b(r(
|
|
1791
|
+
])) : r(a).hasError ? (o(), b(r(Zt), {
|
|
1792
1792
|
key: 3,
|
|
1793
1793
|
title: "Не удалось загрузить данные",
|
|
1794
1794
|
description: r(a).error?.message ?? "Попробуйте обновить страницу.",
|
|
1795
1795
|
class: "admin-resource-index__state"
|
|
1796
1796
|
}, {
|
|
1797
1797
|
actions: m(() => [
|
|
1798
|
-
|
|
1798
|
+
$(r(O), {
|
|
1799
1799
|
variant: "primary",
|
|
1800
1800
|
onClick: ne
|
|
1801
1801
|
}, {
|
|
1802
|
-
default: m(() => [...
|
|
1802
|
+
default: m(() => [...R[17] || (R[17] = [
|
|
1803
1803
|
C("Обновить", -1)
|
|
1804
1804
|
])]),
|
|
1805
1805
|
_: 1
|
|
1806
1806
|
})
|
|
1807
1807
|
]),
|
|
1808
1808
|
_: 1
|
|
1809
|
-
}, 8, ["description"])) : r(a).isEmpty ? (o(), b(r(
|
|
1809
|
+
}, 8, ["description"])) : r(a).isEmpty ? (o(), b(r(en), {
|
|
1810
1810
|
key: 4,
|
|
1811
1811
|
title: "Пока пусто",
|
|
1812
1812
|
description: "Создайте первую запись или измените фильтры.",
|
|
1813
1813
|
class: "admin-resource-index__state"
|
|
1814
1814
|
}, {
|
|
1815
1815
|
actions: m(() => [
|
|
1816
|
-
e.createRouteName ? (o(), b(r(
|
|
1816
|
+
e.createRouteName ? (o(), b(r(O), {
|
|
1817
1817
|
key: 0,
|
|
1818
1818
|
variant: "primary",
|
|
1819
|
-
onClick:
|
|
1819
|
+
onClick: R[6] || (R[6] = (z) => I.$router.push({ name: e.createRouteName }))
|
|
1820
1820
|
}, {
|
|
1821
1821
|
default: m(() => [
|
|
1822
1822
|
C(h(e.createLabel), 1)
|
|
@@ -1826,30 +1826,30 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1826
1826
|
]),
|
|
1827
1827
|
_: 1
|
|
1828
1828
|
})) : (o(), c("div", Za, [
|
|
1829
|
-
|
|
1829
|
+
$(r(Ze), {
|
|
1830
1830
|
columns: _.value,
|
|
1831
1831
|
data: r(a).items,
|
|
1832
1832
|
"sort-key": r(a).sortKey,
|
|
1833
1833
|
"sort-direction": r(a).sortDirection,
|
|
1834
1834
|
selectable: "",
|
|
1835
1835
|
selection: r(a).selection,
|
|
1836
|
-
"row-key": (
|
|
1837
|
-
"onUpdate:sortKey":
|
|
1838
|
-
"onUpdate:sortDirection":
|
|
1839
|
-
"onUpdate:selection":
|
|
1840
|
-
onRowClick:
|
|
1836
|
+
"row-key": (z) => r(a).rowId(z),
|
|
1837
|
+
"onUpdate:sortKey": L,
|
|
1838
|
+
"onUpdate:sortDirection": E,
|
|
1839
|
+
"onUpdate:selection": w,
|
|
1840
|
+
onRowClick: j
|
|
1841
1841
|
}, Ye({ _: 2 }, [
|
|
1842
|
-
|
|
1843
|
-
name:
|
|
1844
|
-
fn: m((
|
|
1845
|
-
|
|
1842
|
+
V(_.value, (z) => ({
|
|
1843
|
+
name: z.key,
|
|
1844
|
+
fn: m((G) => [
|
|
1845
|
+
z.key === mt ? (o(), c("div", el, [
|
|
1846
1846
|
d("button", {
|
|
1847
1847
|
type: "button",
|
|
1848
1848
|
class: "admin-resource-index__row-action",
|
|
1849
1849
|
title: "Просмотр",
|
|
1850
|
-
onClick: we((P) => N(S(
|
|
1850
|
+
onClick: we((P) => N(S(G) ?? {}, P), ["stop"])
|
|
1851
1851
|
}, [
|
|
1852
|
-
|
|
1852
|
+
$(r(Ke), {
|
|
1853
1853
|
icon: r(Ta),
|
|
1854
1854
|
size: 16
|
|
1855
1855
|
}, null, 8, ["icon"])
|
|
@@ -1858,10 +1858,10 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1858
1858
|
type: "button",
|
|
1859
1859
|
class: "admin-resource-index__row-action",
|
|
1860
1860
|
title: "Редактировать",
|
|
1861
|
-
onClick: we((P) => Y(S(
|
|
1861
|
+
onClick: we((P) => Y(S(G) ?? {}, P), ["stop"])
|
|
1862
1862
|
}, [
|
|
1863
|
-
|
|
1864
|
-
icon: r(
|
|
1863
|
+
$(r(Ke), {
|
|
1864
|
+
icon: r(Pa),
|
|
1865
1865
|
size: 16
|
|
1866
1866
|
}, null, 8, ["icon"])
|
|
1867
1867
|
], 8, nl),
|
|
@@ -1869,40 +1869,40 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1869
1869
|
type: "button",
|
|
1870
1870
|
class: "admin-resource-index__row-action admin-resource-index__row-action--danger",
|
|
1871
1871
|
title: "Удалить",
|
|
1872
|
-
onClick: we((P) => Q(S(
|
|
1872
|
+
onClick: we((P) => Q(S(G) ?? {}, P), ["stop"])
|
|
1873
1873
|
}, [
|
|
1874
|
-
|
|
1875
|
-
icon: r(
|
|
1874
|
+
$(r(Ke), {
|
|
1875
|
+
icon: r(Ma),
|
|
1876
1876
|
size: 16
|
|
1877
1877
|
}, null, 8, ["icon"])
|
|
1878
1878
|
], 8, al)
|
|
1879
|
-
])) : Z(I.$slots, `cell-${
|
|
1879
|
+
])) : Z(I.$slots, `cell-${z.key}`, {
|
|
1880
1880
|
key: 1,
|
|
1881
|
-
row: S(
|
|
1881
|
+
row: S(G)
|
|
1882
1882
|
}, () => [
|
|
1883
|
-
C(h(x(
|
|
1883
|
+
C(h(x(z.key, G)), 1)
|
|
1884
1884
|
])
|
|
1885
1885
|
])
|
|
1886
1886
|
}))
|
|
1887
1887
|
]), 1032, ["columns", "data", "sort-key", "sort-direction", "selection", "row-key"])
|
|
1888
1888
|
])),
|
|
1889
1889
|
!r(a).loading && !r(a).hasError && !r(a).isEmpty ? (o(), c("footer", ll, [
|
|
1890
|
-
|
|
1890
|
+
$(r(tn), {
|
|
1891
1891
|
"model-value": r(a).meta.page,
|
|
1892
1892
|
total: r(a).meta.total,
|
|
1893
1893
|
"per-page": r(a).meta.per_page,
|
|
1894
|
-
"onUpdate:modelValue":
|
|
1894
|
+
"onUpdate:modelValue": D
|
|
1895
1895
|
}, null, 8, ["model-value", "total", "per-page"])
|
|
1896
1896
|
])) : F("", !0)
|
|
1897
1897
|
]));
|
|
1898
1898
|
}
|
|
1899
|
-
}),
|
|
1900
|
-
const e =
|
|
1901
|
-
const N =
|
|
1902
|
-
for (const
|
|
1903
|
-
if (!Object.is(N[
|
|
1904
|
-
if (typeof N[
|
|
1905
|
-
if (JSON.stringify(N[
|
|
1899
|
+
}), Pt = ie("admin-resource-form", () => {
|
|
1900
|
+
const e = U(null), t = U("create"), n = U(null), i = U({}), a = U({}), l = U({}), s = U(!1), u = U(!1), f = U(!1), p = U(null), _ = v(() => t.value === "create"), k = v(() => t.value === "edit"), x = v(() => t.value === "view"), S = v(() => p.value !== null), y = v(() => {
|
|
1901
|
+
const N = i.value, Y = a.value, Q = /* @__PURE__ */ new Set([...Object.keys(N), ...Object.keys(Y)]);
|
|
1902
|
+
for (const X of Q)
|
|
1903
|
+
if (!Object.is(N[X], Y[X]))
|
|
1904
|
+
if (typeof N[X] == "object" || typeof Y[X] == "object") {
|
|
1905
|
+
if (JSON.stringify(N[X]) !== JSON.stringify(Y[X])) return !0;
|
|
1906
1906
|
} else
|
|
1907
1907
|
return !0;
|
|
1908
1908
|
return !1;
|
|
@@ -1912,34 +1912,34 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1912
1912
|
Object.assign(N, Y);
|
|
1913
1913
|
}
|
|
1914
1914
|
function A() {
|
|
1915
|
-
g(
|
|
1915
|
+
g(i.value, {}), g(a.value, {}), l.value = {}, s.value = !1, u.value = !1, f.value = !1, p.value = null, n.value = null;
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1918
|
-
e.value = N, t.value = "create", n.value = null, g(
|
|
1917
|
+
function q(N, Y = {}) {
|
|
1918
|
+
e.value = N, t.value = "create", n.value = null, g(i.value, Y), g(a.value, Y), l.value = {}, p.value = null;
|
|
1919
1919
|
}
|
|
1920
|
-
async function
|
|
1921
|
-
e.value = N, t.value = Q, n.value = Y,
|
|
1920
|
+
async function L(N, Y, Q = "edit") {
|
|
1921
|
+
e.value = N, t.value = Q, n.value = Y, s.value = !0, p.value = null, l.value = {};
|
|
1922
1922
|
try {
|
|
1923
1923
|
const ne = await J().get(`/${N}/read`, {
|
|
1924
1924
|
params: { id: Y }
|
|
1925
1925
|
});
|
|
1926
|
-
g(
|
|
1927
|
-
} catch (
|
|
1928
|
-
throw p.value =
|
|
1926
|
+
g(i.value, ne.record), g(a.value, ne.record);
|
|
1927
|
+
} catch (X) {
|
|
1928
|
+
throw p.value = X instanceof Error ? X : new Error(String(X)), X;
|
|
1929
1929
|
} finally {
|
|
1930
|
-
|
|
1930
|
+
s.value = !1;
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1934
|
-
if (
|
|
1933
|
+
function E(N, Y) {
|
|
1934
|
+
if (i.value[N] = Y, l.value[N]) {
|
|
1935
1935
|
const Q = { ...l.value };
|
|
1936
1936
|
delete Q[N], l.value = Q;
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function w(N) {
|
|
1940
1940
|
l.value = { ...N };
|
|
1941
1941
|
}
|
|
1942
|
-
function
|
|
1942
|
+
function D() {
|
|
1943
1943
|
l.value = {};
|
|
1944
1944
|
}
|
|
1945
1945
|
async function W() {
|
|
@@ -1947,17 +1947,17 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1947
1947
|
if (u.value) throw new Error("Already saving");
|
|
1948
1948
|
u.value = !0, p.value = null, l.value = {};
|
|
1949
1949
|
try {
|
|
1950
|
-
const N = J(), Y = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, Q = t.value === "create" ?
|
|
1950
|
+
const N = J(), Y = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, Q = t.value === "create" ? i.value : { id: n.value, ...i.value }, X = await N.post(Y, Q), ne = X.record?.id ?? X.id;
|
|
1951
1951
|
if (ne === void 0)
|
|
1952
1952
|
throw new Error("save: backend response does not contain record.id");
|
|
1953
|
-
return n.value = ne, g(a.value, { ...
|
|
1953
|
+
return n.value = ne, g(a.value, { ...i.value }), t.value = "edit", ne;
|
|
1954
1954
|
} catch (N) {
|
|
1955
|
-
throw N instanceof
|
|
1955
|
+
throw N instanceof Ve ? l.value = { ...N.fields } : (N instanceof oe || N instanceof Error) && (p.value = N), N;
|
|
1956
1956
|
} finally {
|
|
1957
1957
|
u.value = !1;
|
|
1958
1958
|
}
|
|
1959
1959
|
}
|
|
1960
|
-
async function
|
|
1960
|
+
async function j() {
|
|
1961
1961
|
if (!e.value || n.value === null)
|
|
1962
1962
|
throw new Error("Nothing to delete");
|
|
1963
1963
|
if (f.value) throw new Error("Already deleting");
|
|
@@ -1975,10 +1975,10 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1975
1975
|
slug: e,
|
|
1976
1976
|
mode: t,
|
|
1977
1977
|
recordId: n,
|
|
1978
|
-
state:
|
|
1978
|
+
state: i,
|
|
1979
1979
|
initial: a,
|
|
1980
1980
|
errors: l,
|
|
1981
|
-
loading:
|
|
1981
|
+
loading: s,
|
|
1982
1982
|
saving: u,
|
|
1983
1983
|
deleting: f,
|
|
1984
1984
|
error: p,
|
|
@@ -1990,16 +1990,16 @@ const qa = { class: "admin-page admin-resource-index" }, Oa = { class: "admin-pa
|
|
|
1990
1990
|
hasError: S,
|
|
1991
1991
|
// actions
|
|
1992
1992
|
reset: A,
|
|
1993
|
-
prepareCreate:
|
|
1994
|
-
load:
|
|
1995
|
-
setField:
|
|
1996
|
-
setErrors:
|
|
1997
|
-
clearErrors:
|
|
1993
|
+
prepareCreate: q,
|
|
1994
|
+
load: L,
|
|
1995
|
+
setField: E,
|
|
1996
|
+
setErrors: w,
|
|
1997
|
+
clearErrors: D,
|
|
1998
1998
|
save: W,
|
|
1999
|
-
destroy:
|
|
1999
|
+
destroy: j
|
|
2000
2000
|
};
|
|
2001
2001
|
});
|
|
2002
|
-
function
|
|
2002
|
+
function Oe() {
|
|
2003
2003
|
const e = /* @__PURE__ */ new Map();
|
|
2004
2004
|
return {
|
|
2005
2005
|
register(t, n) {
|
|
@@ -2018,19 +2018,19 @@ function qe() {
|
|
|
2018
2018
|
e.clear();
|
|
2019
2019
|
},
|
|
2020
2020
|
registerBundle(t) {
|
|
2021
|
-
for (const [n,
|
|
2022
|
-
e.set(n,
|
|
2021
|
+
for (const [n, i] of Object.entries(t))
|
|
2022
|
+
e.set(n, i);
|
|
2023
2023
|
}
|
|
2024
2024
|
};
|
|
2025
2025
|
}
|
|
2026
|
-
const ge =
|
|
2027
|
-
function
|
|
2026
|
+
const ge = Oe(), he = Oe(), go = ge.register, Mt = ge.get, ho = ge.has, _o = ge.list, yo = he.register, ft = he.get, bo = he.has, ko = he.list;
|
|
2027
|
+
function wo() {
|
|
2028
2028
|
ge.clear(), he.clear();
|
|
2029
2029
|
}
|
|
2030
2030
|
function il(e) {
|
|
2031
2031
|
e.fields && ge.registerBundle(e.fields), e.layouts && he.registerBundle(e.layouts);
|
|
2032
2032
|
}
|
|
2033
|
-
const
|
|
2033
|
+
const Nt = /* @__PURE__ */ T({
|
|
2034
2034
|
__name: "UnknownField",
|
|
2035
2035
|
props: {
|
|
2036
2036
|
type: {},
|
|
@@ -2052,23 +2052,23 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2052
2052
|
_: 1
|
|
2053
2053
|
}));
|
|
2054
2054
|
}
|
|
2055
|
-
}),
|
|
2055
|
+
}), It = /* @__PURE__ */ T({
|
|
2056
2056
|
__name: "FieldRenderer",
|
|
2057
2057
|
props: {
|
|
2058
2058
|
node: {}
|
|
2059
2059
|
},
|
|
2060
2060
|
setup(e) {
|
|
2061
|
-
const t = e, n = v(() =>
|
|
2061
|
+
const t = e, n = v(() => Mt(t.node.type)), i = v(() => {
|
|
2062
2062
|
const { type: a, ...l } = t.node;
|
|
2063
2063
|
return l;
|
|
2064
2064
|
});
|
|
2065
|
-
return (a, l) => n.value ? (o(), b(ue(n.value),
|
|
2065
|
+
return (a, l) => n.value ? (o(), b(ue(n.value), Be(De({ key: 0 }, i.value)), null, 16)) : (o(), b(Nt, {
|
|
2066
2066
|
key: 1,
|
|
2067
2067
|
type: e.node.type,
|
|
2068
2068
|
name: e.node.name
|
|
2069
2069
|
}, null, 8, ["type", "name"]));
|
|
2070
2070
|
}
|
|
2071
|
-
}), Ae = /* @__PURE__ */
|
|
2071
|
+
}), Ae = /* @__PURE__ */ T({
|
|
2072
2072
|
__name: "LayoutRenderer",
|
|
2073
2073
|
props: {
|
|
2074
2074
|
node: {}
|
|
@@ -2078,19 +2078,19 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2078
2078
|
if (t.node.kind === "field")
|
|
2079
2079
|
return { kind: "field" };
|
|
2080
2080
|
if (t.node.kind === "layout") {
|
|
2081
|
-
const
|
|
2082
|
-
return
|
|
2081
|
+
const s = ft(t.node.type);
|
|
2082
|
+
return s ? { kind: "layout", component: s } : { kind: "unknown" };
|
|
2083
2083
|
}
|
|
2084
2084
|
const l = ft(t.node.type);
|
|
2085
|
-
return l ? { kind: "layout", component: l } :
|
|
2086
|
-
}),
|
|
2087
|
-
const { type: l, kind:
|
|
2085
|
+
return l ? { kind: "layout", component: l } : Mt(t.node.type) ? { kind: "field" } : { kind: "unknown" };
|
|
2086
|
+
}), i = v(() => {
|
|
2087
|
+
const { type: l, kind: s, ...u } = t.node;
|
|
2088
2088
|
return u;
|
|
2089
2089
|
}), a = v(() => t.node);
|
|
2090
|
-
return (l,
|
|
2090
|
+
return (l, s) => n.value.kind === "layout" && n.value.component ? (o(), b(ue(n.value.component), Be(De({ key: 0 }, i.value)), null, 16)) : n.value.kind === "field" ? (o(), b(It, {
|
|
2091
2091
|
key: 1,
|
|
2092
2092
|
node: a.value
|
|
2093
|
-
}, null, 8, ["node"])) : (o(), b(
|
|
2093
|
+
}, null, 8, ["node"])) : (o(), b(Nt, {
|
|
2094
2094
|
key: 2,
|
|
2095
2095
|
type: e.node.type,
|
|
2096
2096
|
name: e.node.name
|
|
@@ -2102,7 +2102,7 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2102
2102
|
}, fl = {
|
|
2103
2103
|
key: 3,
|
|
2104
2104
|
class: "admin-resource-form__savebar"
|
|
2105
|
-
}, vt = /* @__PURE__ */
|
|
2105
|
+
}, vt = /* @__PURE__ */ T({
|
|
2106
2106
|
__name: "ResourceFormPage",
|
|
2107
2107
|
props: {
|
|
2108
2108
|
slug: {},
|
|
@@ -2110,16 +2110,16 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2110
2110
|
indexRouteName: { default: "admin.home" }
|
|
2111
2111
|
},
|
|
2112
2112
|
setup(e) {
|
|
2113
|
-
const t = e, n =
|
|
2113
|
+
const t = e, n = Pt(), i = ce(), a = de(), l = Ct(n.state, n.errors);
|
|
2114
2114
|
te(
|
|
2115
2115
|
() => n.errors,
|
|
2116
2116
|
(y) => {
|
|
2117
2117
|
l.setErrors({ ...y });
|
|
2118
2118
|
}
|
|
2119
2119
|
);
|
|
2120
|
-
const
|
|
2121
|
-
() =>
|
|
2122
|
-
), f = v(() => n.isCreate ? `Создать: ${
|
|
2120
|
+
const s = v(() => i.getResource(t.slug)), u = v(
|
|
2121
|
+
() => s.value?.fields ?? []
|
|
2122
|
+
), f = v(() => n.isCreate ? `Создать: ${s.value?.label ?? t.slug}` : `${s.value?.label ?? t.slug}: запись #${t.id}`), p = v(() => {
|
|
2123
2123
|
const y = n.state.status;
|
|
2124
2124
|
return typeof y == "string" ? y : null;
|
|
2125
2125
|
}), _ = v(() => {
|
|
@@ -2135,8 +2135,8 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2135
2135
|
return "default";
|
|
2136
2136
|
}
|
|
2137
2137
|
});
|
|
2138
|
-
|
|
2139
|
-
|
|
2138
|
+
Ie(async () => {
|
|
2139
|
+
i.manifest === null && await i.load().catch(() => {
|
|
2140
2140
|
}), t.id !== null && t.id !== void 0 ? await n.load(t.slug, t.id, "edit").catch(() => {
|
|
2141
2141
|
}) : n.prepareCreate(t.slug);
|
|
2142
2142
|
}), te(
|
|
@@ -2185,7 +2185,7 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2185
2185
|
}, 8, ["variant"])) : F("", !0)
|
|
2186
2186
|
]),
|
|
2187
2187
|
d("div", cl, [
|
|
2188
|
-
|
|
2188
|
+
$(r(O), {
|
|
2189
2189
|
variant: "ghost",
|
|
2190
2190
|
disabled: r(n).saving || r(n).deleting,
|
|
2191
2191
|
onClick: S
|
|
@@ -2195,7 +2195,7 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2195
2195
|
])]),
|
|
2196
2196
|
_: 1
|
|
2197
2197
|
}, 8, ["disabled"]),
|
|
2198
|
-
r(n).isEdit ? (o(), b(r(
|
|
2198
|
+
r(n).isEdit ? (o(), b(r(O), {
|
|
2199
2199
|
key: 0,
|
|
2200
2200
|
variant: "danger",
|
|
2201
2201
|
disabled: r(n).saving || r(n).deleting,
|
|
@@ -2207,7 +2207,7 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2207
2207
|
])]),
|
|
2208
2208
|
_: 1
|
|
2209
2209
|
}, 8, ["disabled", "loading"])) : F("", !0),
|
|
2210
|
-
|
|
2210
|
+
$(r(O), {
|
|
2211
2211
|
variant: "primary",
|
|
2212
2212
|
disabled: r(n).saving || r(n).loading,
|
|
2213
2213
|
loading: r(n).saving,
|
|
@@ -2232,18 +2232,18 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2232
2232
|
_: 1
|
|
2233
2233
|
})) : F("", !0),
|
|
2234
2234
|
r(n).loading ? (o(), c("div", ml, [
|
|
2235
|
-
(o(), c(M, null,
|
|
2235
|
+
(o(), c(M, null, V(6, (A) => $(r(Qe), {
|
|
2236
2236
|
key: A,
|
|
2237
2237
|
height: "40px"
|
|
2238
2238
|
})), 64))
|
|
2239
|
-
])) : (o(), b(r(
|
|
2239
|
+
])) : (o(), b(r(H), {
|
|
2240
2240
|
key: 2,
|
|
2241
2241
|
padding: "md",
|
|
2242
2242
|
class: "admin-resource-form__body"
|
|
2243
2243
|
}, {
|
|
2244
2244
|
default: m(() => [
|
|
2245
|
-
(o(!0), c(M, null,
|
|
2246
|
-
key:
|
|
2245
|
+
(o(!0), c(M, null, V(u.value, (A, q) => (o(), b(Ae, {
|
|
2246
|
+
key: q,
|
|
2247
2247
|
node: A
|
|
2248
2248
|
}, null, 8, ["node"]))), 128))
|
|
2249
2249
|
]),
|
|
@@ -2251,7 +2251,7 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2251
2251
|
})),
|
|
2252
2252
|
r(n).isDirty && !r(n).loading ? (o(), c("div", fl, [
|
|
2253
2253
|
g[4] || (g[4] = d("span", { class: "admin-resource-form__savebar-hint" }, " Есть несохранённые изменения ", -1)),
|
|
2254
|
-
|
|
2254
|
+
$(r(O), {
|
|
2255
2255
|
variant: "ghost",
|
|
2256
2256
|
size: "sm",
|
|
2257
2257
|
onClick: S
|
|
@@ -2261,7 +2261,7 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2261
2261
|
])]),
|
|
2262
2262
|
_: 1
|
|
2263
2263
|
}),
|
|
2264
|
-
|
|
2264
|
+
$(r(O), {
|
|
2265
2265
|
variant: "primary",
|
|
2266
2266
|
size: "sm",
|
|
2267
2267
|
loading: r(n).saving,
|
|
@@ -2276,7 +2276,7 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2276
2276
|
])) : F("", !0)
|
|
2277
2277
|
]));
|
|
2278
2278
|
}
|
|
2279
|
-
}), _e =
|
|
2279
|
+
}), _e = Oe(), $o = _e.register, pt = _e.get, xo = _e.has, So = _e.list, Co = _e.clear, vl = _e.registerBundle, pl = /* @__PURE__ */ T({
|
|
2280
2280
|
__name: "UnknownEntry",
|
|
2281
2281
|
props: {
|
|
2282
2282
|
type: {},
|
|
@@ -2319,13 +2319,13 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2319
2319
|
}, xl = {
|
|
2320
2320
|
class: "admin-infolist-tabs__list",
|
|
2321
2321
|
role: "tablist"
|
|
2322
|
-
}, Sl = { class: "admin-infolist-tabs__panel" }, Cl = /* @__PURE__ */
|
|
2322
|
+
}, Sl = { class: "admin-infolist-tabs__panel" }, Cl = /* @__PURE__ */ T({
|
|
2323
2323
|
__name: "InfolistRenderer",
|
|
2324
2324
|
props: {
|
|
2325
2325
|
node: {}
|
|
2326
2326
|
},
|
|
2327
2327
|
setup(e) {
|
|
2328
|
-
const t = e, n = /* @__PURE__ */ new Set(["rows", "columns", "section", "block", "tabs"]),
|
|
2328
|
+
const t = e, n = /* @__PURE__ */ new Set(["rows", "columns", "section", "block", "tabs"]), i = v(() => {
|
|
2329
2329
|
if (t.node.kind === "entry") {
|
|
2330
2330
|
const k = pt(t.node.type);
|
|
2331
2331
|
return k ? { kind: "entry", component: k } : { kind: "unknown" };
|
|
@@ -2337,11 +2337,11 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2337
2337
|
const _ = pt(t.node.type);
|
|
2338
2338
|
return _ ? { kind: "entry", component: _ } : { kind: "unknown" };
|
|
2339
2339
|
}), a = v(() => {
|
|
2340
|
-
const { type: _, kind: k, items: x,
|
|
2341
|
-
return
|
|
2340
|
+
const { type: _, kind: k, items: x, attributes: S, ...y } = t.node, g = S ?? {}, { preset: A, format: q, currency: L, decimals: E, trueLabel: w, falseLabel: D, ...W } = g, j = {};
|
|
2341
|
+
return q !== void 0 && (j.format = q), L !== void 0 && (j.currency = L), E !== void 0 && (j.decimals = E), w !== void 0 && (j.trueLabel = w), D !== void 0 && (j.falseLabel = D), { ...y, ...W, preset: A, meta: j };
|
|
2342
2342
|
}), l = v(
|
|
2343
2343
|
() => t.node.items ?? []
|
|
2344
|
-
),
|
|
2344
|
+
), s = v(() => t.node.title ?? null), u = v(
|
|
2345
2345
|
() => t.node.description ?? null
|
|
2346
2346
|
), f = v(() => {
|
|
2347
2347
|
const _ = t.node.active;
|
|
@@ -2349,44 +2349,44 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2349
2349
|
}), p = v(() => t.node.items ?? []);
|
|
2350
2350
|
return (_, k) => {
|
|
2351
2351
|
const x = _t("InfolistRenderer", !0);
|
|
2352
|
-
return
|
|
2353
|
-
(o(!0), c(M, null,
|
|
2352
|
+
return i.value.kind === "entry" ? (o(), b(ue(i.value.component), Be(De({ key: 0 }, a.value)), null, 16)) : i.value.kind === "layout" && i.value.layoutType === "rows" ? (o(), c("div", gl, [
|
|
2353
|
+
(o(!0), c(M, null, V(l.value, (S, y) => (o(), b(x, {
|
|
2354
2354
|
key: y,
|
|
2355
2355
|
node: S
|
|
2356
2356
|
}, null, 8, ["node"]))), 128))
|
|
2357
|
-
])) :
|
|
2358
|
-
(o(!0), c(M, null,
|
|
2357
|
+
])) : i.value.kind === "layout" && i.value.layoutType === "columns" ? (o(), c("div", hl, [
|
|
2358
|
+
(o(!0), c(M, null, V(l.value, (S, y) => (o(), c("div", {
|
|
2359
2359
|
key: y,
|
|
2360
2360
|
class: "admin-infolist-cols__item",
|
|
2361
|
-
style:
|
|
2361
|
+
style: ze({
|
|
2362
2362
|
gridColumn: `span ${typeof S.span == "number" ? S.span : Math.max(1, Math.floor(12 / l.value.length))}`
|
|
2363
2363
|
})
|
|
2364
2364
|
}, [
|
|
2365
|
-
|
|
2365
|
+
$(x, { node: S }, null, 8, ["node"])
|
|
2366
2366
|
], 4))), 128))
|
|
2367
|
-
])) :
|
|
2368
|
-
|
|
2369
|
-
|
|
2367
|
+
])) : i.value.kind === "layout" && (i.value.layoutType === "section" || i.value.layoutType === "block") ? (o(), c("section", _l, [
|
|
2368
|
+
s.value || u.value ? (o(), c("header", yl, [
|
|
2369
|
+
s.value ? (o(), c("h3", bl, h(s.value), 1)) : F("", !0),
|
|
2370
2370
|
u.value ? (o(), c("p", kl, h(u.value), 1)) : F("", !0)
|
|
2371
2371
|
])) : F("", !0),
|
|
2372
2372
|
d("div", wl, [
|
|
2373
|
-
(o(!0), c(M, null,
|
|
2373
|
+
(o(!0), c(M, null, V(l.value, (S, y) => (o(), b(x, {
|
|
2374
2374
|
key: y,
|
|
2375
2375
|
node: S
|
|
2376
2376
|
}, null, 8, ["node"]))), 128))
|
|
2377
2377
|
])
|
|
2378
|
-
])) :
|
|
2378
|
+
])) : i.value.kind === "layout" && i.value.layoutType === "tabs" ? (o(), c("div", $l, [
|
|
2379
2379
|
d("ul", xl, [
|
|
2380
|
-
(o(!0), c(M, null,
|
|
2380
|
+
(o(!0), c(M, null, V(p.value, (S, y) => (o(), c("li", {
|
|
2381
2381
|
key: S.key ?? y,
|
|
2382
|
-
class:
|
|
2382
|
+
class: ae([
|
|
2383
2383
|
"admin-infolist-tabs__tab",
|
|
2384
2384
|
{ "admin-infolist-tabs__tab--active": y === f.value }
|
|
2385
2385
|
])
|
|
2386
2386
|
}, h(S.label), 3))), 128))
|
|
2387
2387
|
]),
|
|
2388
2388
|
d("div", Sl, [
|
|
2389
|
-
(o(!0), c(M, null,
|
|
2389
|
+
(o(!0), c(M, null, V(p.value[f.value]?.items ?? [], (S, y) => (o(), b(x, {
|
|
2390
2390
|
key: y,
|
|
2391
2391
|
node: S
|
|
2392
2392
|
}, null, 8, ["node"]))), 128))
|
|
@@ -2400,21 +2400,21 @@ const Mt = /* @__PURE__ */ L({
|
|
|
2400
2400
|
}
|
|
2401
2401
|
}), it = /* @__PURE__ */ Symbol("admin.infolist-record");
|
|
2402
2402
|
function Al(e) {
|
|
2403
|
-
|
|
2403
|
+
qt(it, e);
|
|
2404
2404
|
}
|
|
2405
|
-
function
|
|
2405
|
+
function Ao() {
|
|
2406
2406
|
const e = yt(it);
|
|
2407
2407
|
if (!e)
|
|
2408
2408
|
throw new Error("useRecord() called outside of provideRecord() scope");
|
|
2409
2409
|
return e;
|
|
2410
2410
|
}
|
|
2411
|
-
function
|
|
2411
|
+
function We() {
|
|
2412
2412
|
return yt(it, null);
|
|
2413
2413
|
}
|
|
2414
|
-
const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-page__hd" }, Ul = { class: "admin-page__title-wrap" }, Fl = { class: "admin-page__title" },
|
|
2414
|
+
const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-page__hd" }, Ul = { class: "admin-page__title-wrap" }, Fl = { class: "admin-page__title" }, Ll = { class: "admin-page__actions" }, Tl = {
|
|
2415
2415
|
key: 1,
|
|
2416
2416
|
class: "admin-resource-view__loading"
|
|
2417
|
-
}, Pl = /* @__PURE__ */
|
|
2417
|
+
}, Pl = /* @__PURE__ */ T({
|
|
2418
2418
|
__name: "ResourceViewPage",
|
|
2419
2419
|
props: {
|
|
2420
2420
|
slug: {},
|
|
@@ -2423,15 +2423,15 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2423
2423
|
indexRouteName: { default: "admin.home" }
|
|
2424
2424
|
},
|
|
2425
2425
|
setup(e) {
|
|
2426
|
-
const t = e, n =
|
|
2426
|
+
const t = e, n = Pt(), i = ce(), a = de();
|
|
2427
2427
|
Al(n.state);
|
|
2428
|
-
const l = v(() =>
|
|
2429
|
-
() => l.value?.fields ?? []
|
|
2428
|
+
const l = v(() => i.getResource(t.slug)), s = v(
|
|
2429
|
+
() => l.value?.infolist ?? l.value?.fields ?? []
|
|
2430
2430
|
), u = v(
|
|
2431
2431
|
() => `${l.value?.label ?? t.slug}: запись #${t.id}`
|
|
2432
2432
|
);
|
|
2433
|
-
|
|
2434
|
-
|
|
2433
|
+
Ie(async () => {
|
|
2434
|
+
i.manifest === null && await i.load().catch(() => {
|
|
2435
2435
|
}), await n.load(t.slug, t.id, "view").catch(() => {
|
|
2436
2436
|
});
|
|
2437
2437
|
}), te(
|
|
@@ -2460,8 +2460,8 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2460
2460
|
d("div", Ul, [
|
|
2461
2461
|
d("h1", Fl, h(u.value), 1)
|
|
2462
2462
|
]),
|
|
2463
|
-
d("div",
|
|
2464
|
-
|
|
2463
|
+
d("div", Ll, [
|
|
2464
|
+
$(r(O), {
|
|
2465
2465
|
variant: "ghost",
|
|
2466
2466
|
onClick: f
|
|
2467
2467
|
}, {
|
|
@@ -2470,7 +2470,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2470
2470
|
])]),
|
|
2471
2471
|
_: 1
|
|
2472
2472
|
}),
|
|
2473
|
-
|
|
2473
|
+
$(r(O), {
|
|
2474
2474
|
variant: "danger",
|
|
2475
2475
|
loading: r(n).deleting,
|
|
2476
2476
|
disabled: r(n).deleting,
|
|
@@ -2494,18 +2494,18 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2494
2494
|
]),
|
|
2495
2495
|
_: 1
|
|
2496
2496
|
})) : F("", !0),
|
|
2497
|
-
r(n).loading ? (o(), c("div",
|
|
2498
|
-
(o(), c(M, null,
|
|
2497
|
+
r(n).loading ? (o(), c("div", Tl, [
|
|
2498
|
+
(o(), c(M, null, V(8, (x) => $(r(Qe), {
|
|
2499
2499
|
key: x,
|
|
2500
2500
|
height: "24px"
|
|
2501
2501
|
})), 64))
|
|
2502
|
-
])) : (o(), b(r(
|
|
2502
|
+
])) : (o(), b(r(H), {
|
|
2503
2503
|
key: 2,
|
|
2504
2504
|
padding: "md",
|
|
2505
2505
|
class: "admin-resource-view__body"
|
|
2506
2506
|
}, {
|
|
2507
2507
|
default: m(() => [
|
|
2508
|
-
(o(!0), c(M, null,
|
|
2508
|
+
(o(!0), c(M, null, V(s.value, (x, S) => (o(), b(Cl, {
|
|
2509
2509
|
key: S,
|
|
2510
2510
|
node: x
|
|
2511
2511
|
}, null, 8, ["node"]))), 128))
|
|
@@ -2523,7 +2523,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2523
2523
|
}, Zl = {
|
|
2524
2524
|
key: 1,
|
|
2525
2525
|
class: "admin-profile__hint"
|
|
2526
|
-
}, es = { class: "admin-profile__card-ft" }, ts = { class: "admin-profile__hint" }, ns = /* @__PURE__ */
|
|
2526
|
+
}, es = { class: "admin-profile__card-ft" }, ts = { class: "admin-profile__hint" }, ns = /* @__PURE__ */ T({
|
|
2527
2527
|
__name: "ProfilePage",
|
|
2528
2528
|
props: {
|
|
2529
2529
|
title: { default: "Profile" },
|
|
@@ -2532,52 +2532,52 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2532
2532
|
},
|
|
2533
2533
|
emits: ["update:section", "avatar-replace", "two-factor-disable", "two-factor-regenerate", "save"],
|
|
2534
2534
|
setup(e, { emit: t }) {
|
|
2535
|
-
const n = e,
|
|
2535
|
+
const n = e, i = t, a = le(), l = tt(), s = nt(), u = [
|
|
2536
2536
|
{ id: "general", label: "Основное", icon: "user" },
|
|
2537
2537
|
{ id: "security", label: "Безопасность", icon: "shield" },
|
|
2538
2538
|
{ id: "tokens", label: "API токены", icon: "key" },
|
|
2539
2539
|
{ id: "sessions", label: "Сессии", icon: "monitor" }
|
|
2540
|
-
], f =
|
|
2541
|
-
function p(
|
|
2542
|
-
f.value =
|
|
2540
|
+
], f = U(n.section);
|
|
2541
|
+
function p(L) {
|
|
2542
|
+
f.value = L, i("update:section", L);
|
|
2543
2543
|
}
|
|
2544
|
-
const _ =
|
|
2544
|
+
const _ = U({
|
|
2545
2545
|
name: a.user?.name ?? "",
|
|
2546
2546
|
email: a.user?.email ?? "",
|
|
2547
|
-
locale:
|
|
2547
|
+
locale: s.current,
|
|
2548
2548
|
theme: l.current
|
|
2549
2549
|
}), k = v(
|
|
2550
|
-
() =>
|
|
2550
|
+
() => s.available.map((L) => ({ value: L, label: L.toUpperCase() }))
|
|
2551
2551
|
), x = v(
|
|
2552
|
-
() => l.available.map((
|
|
2552
|
+
() => l.available.map((L) => ({ value: L, label: L === "dark" ? "Тёмная" : L === "light" ? "Светлая" : L }))
|
|
2553
2553
|
);
|
|
2554
2554
|
te(
|
|
2555
2555
|
() => _.value.locale,
|
|
2556
|
-
(
|
|
2557
|
-
|
|
2556
|
+
(L, E) => {
|
|
2557
|
+
L === E || !L || s.setLocale(L).catch(() => {
|
|
2558
2558
|
});
|
|
2559
2559
|
}
|
|
2560
2560
|
), te(
|
|
2561
2561
|
() => _.value.theme,
|
|
2562
|
-
(
|
|
2563
|
-
|
|
2562
|
+
(L, E) => {
|
|
2563
|
+
L === E || !L || l.setTheme(L).catch(() => {
|
|
2564
2564
|
});
|
|
2565
2565
|
}
|
|
2566
2566
|
);
|
|
2567
2567
|
function S() {
|
|
2568
|
-
|
|
2568
|
+
i("save", { ..._.value });
|
|
2569
2569
|
}
|
|
2570
2570
|
function y() {
|
|
2571
|
-
|
|
2571
|
+
i("avatar-replace");
|
|
2572
2572
|
}
|
|
2573
2573
|
function g() {
|
|
2574
|
-
|
|
2574
|
+
i("two-factor-disable");
|
|
2575
2575
|
}
|
|
2576
2576
|
function A() {
|
|
2577
|
-
|
|
2577
|
+
i("two-factor-regenerate");
|
|
2578
2578
|
}
|
|
2579
|
-
const
|
|
2580
|
-
return (
|
|
2579
|
+
const q = v(() => !!a.user?.twoFactorEnabled);
|
|
2580
|
+
return (L, E) => (o(), c("section", Ml, [
|
|
2581
2581
|
d("header", Nl, [
|
|
2582
2582
|
d("div", Il, [
|
|
2583
2583
|
d("h1", Bl, h(e.title), 1),
|
|
@@ -2586,33 +2586,33 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2586
2586
|
]),
|
|
2587
2587
|
d("div", zl, [
|
|
2588
2588
|
d("nav", Vl, [
|
|
2589
|
-
(o(), c(M, null,
|
|
2590
|
-
key:
|
|
2589
|
+
(o(), c(M, null, V(u, (w) => d("button", {
|
|
2590
|
+
key: w.id,
|
|
2591
2591
|
type: "button",
|
|
2592
|
-
class:
|
|
2592
|
+
class: ae([
|
|
2593
2593
|
"admin-profile__nav-item",
|
|
2594
|
-
{ "admin-profile__nav-item--active": f.value ===
|
|
2594
|
+
{ "admin-profile__nav-item--active": f.value === w.id }
|
|
2595
2595
|
]),
|
|
2596
|
-
onClick: (
|
|
2596
|
+
onClick: (D) => p(w.id)
|
|
2597
2597
|
}, [
|
|
2598
2598
|
d("span", {
|
|
2599
2599
|
class: "admin-profile__nav-icon",
|
|
2600
|
-
"data-icon":
|
|
2600
|
+
"data-icon": w.icon
|
|
2601
2601
|
}, null, 8, Ol),
|
|
2602
|
-
d("span", null, h(
|
|
2602
|
+
d("span", null, h(w.label), 1)
|
|
2603
2603
|
], 10, ql)), 64))
|
|
2604
2604
|
]),
|
|
2605
2605
|
d("div", Wl, [
|
|
2606
|
-
f.value === "general" ? (o(), b(r(
|
|
2606
|
+
f.value === "general" ? (o(), b(r(H), {
|
|
2607
2607
|
key: 0,
|
|
2608
2608
|
padding: "md"
|
|
2609
2609
|
}, {
|
|
2610
2610
|
default: m(() => [
|
|
2611
|
-
|
|
2611
|
+
E[7] || (E[7] = d("header", { class: "admin-profile__card-hd" }, [
|
|
2612
2612
|
d("h3", { class: "admin-profile__card-title" }, "Профиль")
|
|
2613
2613
|
], -1)),
|
|
2614
2614
|
d("div", jl, [
|
|
2615
|
-
|
|
2615
|
+
$(r(wt), {
|
|
2616
2616
|
src: r(a).user?.avatar ?? void 0,
|
|
2617
2617
|
name: r(a).user?.name ?? "?",
|
|
2618
2618
|
size: "lg"
|
|
@@ -2621,51 +2621,51 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2621
2621
|
d("div", Gl, h(r(a).user?.name ?? "—"), 1),
|
|
2622
2622
|
d("div", Hl, h(r(a).user?.email ?? "—"), 1)
|
|
2623
2623
|
]),
|
|
2624
|
-
|
|
2625
|
-
|
|
2624
|
+
E[5] || (E[5] = d("div", { style: { flex: "1" } }, null, -1)),
|
|
2625
|
+
$(r(O), {
|
|
2626
2626
|
variant: "ghost",
|
|
2627
2627
|
size: "sm",
|
|
2628
2628
|
onClick: y
|
|
2629
2629
|
}, {
|
|
2630
|
-
default: m(() => [...
|
|
2630
|
+
default: m(() => [...E[4] || (E[4] = [
|
|
2631
2631
|
C(" Заменить ", -1)
|
|
2632
2632
|
])]),
|
|
2633
2633
|
_: 1
|
|
2634
2634
|
})
|
|
2635
2635
|
]),
|
|
2636
2636
|
d("div", Xl, [
|
|
2637
|
-
|
|
2637
|
+
$(r(ve), {
|
|
2638
2638
|
modelValue: _.value.name,
|
|
2639
|
-
"onUpdate:modelValue":
|
|
2639
|
+
"onUpdate:modelValue": E[0] || (E[0] = (w) => _.value.name = w),
|
|
2640
2640
|
label: "Имя",
|
|
2641
2641
|
name: "name"
|
|
2642
2642
|
}, null, 8, ["modelValue"]),
|
|
2643
|
-
|
|
2643
|
+
$(r(ve), {
|
|
2644
2644
|
modelValue: _.value.email,
|
|
2645
|
-
"onUpdate:modelValue":
|
|
2645
|
+
"onUpdate:modelValue": E[1] || (E[1] = (w) => _.value.email = w),
|
|
2646
2646
|
label: "Email",
|
|
2647
2647
|
type: "email",
|
|
2648
2648
|
name: "email"
|
|
2649
2649
|
}, null, 8, ["modelValue"]),
|
|
2650
|
-
|
|
2650
|
+
$(r(Ne), {
|
|
2651
2651
|
modelValue: _.value.locale,
|
|
2652
|
-
"onUpdate:modelValue":
|
|
2652
|
+
"onUpdate:modelValue": E[2] || (E[2] = (w) => _.value.locale = w),
|
|
2653
2653
|
options: k.value,
|
|
2654
2654
|
label: "Язык"
|
|
2655
2655
|
}, null, 8, ["modelValue", "options"]),
|
|
2656
|
-
|
|
2656
|
+
$(r(Ne), {
|
|
2657
2657
|
modelValue: _.value.theme,
|
|
2658
|
-
"onUpdate:modelValue":
|
|
2658
|
+
"onUpdate:modelValue": E[3] || (E[3] = (w) => _.value.theme = w),
|
|
2659
2659
|
options: x.value,
|
|
2660
2660
|
label: "Тема"
|
|
2661
2661
|
}, null, 8, ["modelValue", "options"])
|
|
2662
2662
|
]),
|
|
2663
2663
|
d("footer", Yl, [
|
|
2664
|
-
|
|
2664
|
+
$(r(O), {
|
|
2665
2665
|
variant: "primary",
|
|
2666
2666
|
onClick: S
|
|
2667
2667
|
}, {
|
|
2668
|
-
default: m(() => [...
|
|
2668
|
+
default: m(() => [...E[6] || (E[6] = [
|
|
2669
2669
|
C("Сохранить", -1)
|
|
2670
2670
|
])]),
|
|
2671
2671
|
_: 1
|
|
@@ -2673,51 +2673,51 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2673
2673
|
])
|
|
2674
2674
|
]),
|
|
2675
2675
|
_: 1
|
|
2676
|
-
})) : f.value === "security" ? (o(), b(r(
|
|
2676
|
+
})) : f.value === "security" ? (o(), b(r(H), {
|
|
2677
2677
|
key: 1,
|
|
2678
2678
|
padding: "md"
|
|
2679
2679
|
}, {
|
|
2680
2680
|
default: m(() => [
|
|
2681
2681
|
d("header", Jl, [
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
variant:
|
|
2682
|
+
E[8] || (E[8] = d("h3", { class: "admin-profile__card-title" }, "Двухфакторная аутентификация", -1)),
|
|
2683
|
+
$(r(et), {
|
|
2684
|
+
variant: q.value ? "success" : "default"
|
|
2685
2685
|
}, {
|
|
2686
2686
|
default: m(() => [
|
|
2687
|
-
C(h(
|
|
2687
|
+
C(h(q.value ? "Включена" : "Отключена"), 1)
|
|
2688
2688
|
]),
|
|
2689
2689
|
_: 1
|
|
2690
2690
|
}, 8, ["variant"])
|
|
2691
2691
|
]),
|
|
2692
|
-
|
|
2692
|
+
q.value ? (o(), c("p", Ql, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (o(), c("p", Zl, " Включите 2FA для дополнительной защиты аккаунта. ")),
|
|
2693
2693
|
d("footer", es, [
|
|
2694
|
-
|
|
2695
|
-
|
|
2694
|
+
q.value ? (o(), c(M, { key: 0 }, [
|
|
2695
|
+
$(r(O), {
|
|
2696
2696
|
variant: "ghost",
|
|
2697
2697
|
size: "sm",
|
|
2698
2698
|
onClick: A
|
|
2699
2699
|
}, {
|
|
2700
|
-
default: m(() => [...
|
|
2700
|
+
default: m(() => [...E[9] || (E[9] = [
|
|
2701
2701
|
C(" Перегенерировать коды ", -1)
|
|
2702
2702
|
])]),
|
|
2703
2703
|
_: 1
|
|
2704
2704
|
}),
|
|
2705
|
-
|
|
2705
|
+
$(r(O), {
|
|
2706
2706
|
variant: "danger",
|
|
2707
2707
|
size: "sm",
|
|
2708
2708
|
onClick: g
|
|
2709
2709
|
}, {
|
|
2710
|
-
default: m(() => [...
|
|
2710
|
+
default: m(() => [...E[10] || (E[10] = [
|
|
2711
2711
|
C(" Отключить 2FA ", -1)
|
|
2712
2712
|
])]),
|
|
2713
2713
|
_: 1
|
|
2714
2714
|
})
|
|
2715
|
-
], 64)) : Z(
|
|
2716
|
-
|
|
2715
|
+
], 64)) : Z(L.$slots, "enable-2fa", { key: 1 }, () => [
|
|
2716
|
+
$(r(O), {
|
|
2717
2717
|
variant: "primary",
|
|
2718
2718
|
disabled: ""
|
|
2719
2719
|
}, {
|
|
2720
|
-
default: m(() => [...
|
|
2720
|
+
default: m(() => [...E[11] || (E[11] = [
|
|
2721
2721
|
C(" Включить 2FA (host customize) ", -1)
|
|
2722
2722
|
])]),
|
|
2723
2723
|
_: 1
|
|
@@ -2726,11 +2726,11 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2726
2726
|
])
|
|
2727
2727
|
]),
|
|
2728
2728
|
_: 3
|
|
2729
|
-
})) : Z(
|
|
2729
|
+
})) : Z(L.$slots, f.value, {
|
|
2730
2730
|
key: 2,
|
|
2731
2731
|
section: f.value
|
|
2732
2732
|
}, () => [
|
|
2733
|
-
|
|
2733
|
+
$(r(H), { padding: "md" }, {
|
|
2734
2734
|
default: m(() => [
|
|
2735
2735
|
d("p", ts, " Section «" + h(f.value) + "» не реализована библиотекой — host-проект подключает её через slot " + h(f.value) + ". ", 1)
|
|
2736
2736
|
]),
|
|
@@ -2741,7 +2741,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2741
2741
|
])
|
|
2742
2742
|
]));
|
|
2743
2743
|
}
|
|
2744
|
-
}), ye =
|
|
2744
|
+
}), ye = Oe(), Eo = ye.register, as = ye.get, Ro = ye.has, Uo = ye.list, Fo = ye.clear, ls = ye.registerBundle, ss = /* @__PURE__ */ T({
|
|
2745
2745
|
__name: "UnknownWidget",
|
|
2746
2746
|
props: {
|
|
2747
2747
|
type: {}
|
|
@@ -2759,17 +2759,17 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2759
2759
|
_: 1
|
|
2760
2760
|
}));
|
|
2761
2761
|
}
|
|
2762
|
-
}), is = /* @__PURE__ */
|
|
2762
|
+
}), is = /* @__PURE__ */ T({
|
|
2763
2763
|
__name: "WidgetRenderer",
|
|
2764
2764
|
props: {
|
|
2765
2765
|
node: {}
|
|
2766
2766
|
},
|
|
2767
2767
|
setup(e) {
|
|
2768
|
-
const t = e, n = v(() => as(t.node.type)),
|
|
2769
|
-
const { type: a, span: l, ...
|
|
2770
|
-
return
|
|
2768
|
+
const t = e, n = v(() => as(t.node.type)), i = v(() => {
|
|
2769
|
+
const { type: a, span: l, ...s } = t.node;
|
|
2770
|
+
return s;
|
|
2771
2771
|
});
|
|
2772
|
-
return (a, l) => n.value ? (o(), b(ue(n.value),
|
|
2772
|
+
return (a, l) => n.value ? (o(), b(ue(n.value), Be(De({ key: 0 }, i.value)), null, 16)) : (o(), b(ss, {
|
|
2773
2773
|
key: 1,
|
|
2774
2774
|
type: e.node.type
|
|
2775
2775
|
}, null, 8, ["type"]));
|
|
@@ -2777,7 +2777,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2777
2777
|
}), os = { class: "admin-page admin-dashboard" }, rs = { class: "admin-page__hd" }, us = { class: "admin-page__title-wrap" }, ds = { class: "admin-page__title" }, cs = {
|
|
2778
2778
|
key: 0,
|
|
2779
2779
|
class: "admin-page__count"
|
|
2780
|
-
}, ms = { class: "admin-page__actions" }, fs = { class: "admin-dashboard__grid" }, vs = /* @__PURE__ */
|
|
2780
|
+
}, ms = { class: "admin-page__actions" }, fs = { class: "admin-dashboard__grid" }, vs = /* @__PURE__ */ T({
|
|
2781
2781
|
__name: "DashboardPage",
|
|
2782
2782
|
props: {
|
|
2783
2783
|
slug: { default: void 0 },
|
|
@@ -2786,10 +2786,10 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2786
2786
|
subtitle: { default: void 0 }
|
|
2787
2787
|
},
|
|
2788
2788
|
setup(e) {
|
|
2789
|
-
const t = e, n = ce(),
|
|
2790
|
-
() => t.title ??
|
|
2791
|
-
),
|
|
2792
|
-
() => t.subtitle ??
|
|
2789
|
+
const t = e, n = ce(), i = v(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((p) => p.slug === t.slug) ?? null), a = v(() => t.widgets ? t.widgets : i.value ? i.value.widgets ?? [] : []), l = v(
|
|
2790
|
+
() => t.title ?? i.value?.label ?? "Dashboard"
|
|
2791
|
+
), s = v(
|
|
2792
|
+
() => t.subtitle ?? i.value?.description ?? null
|
|
2793
2793
|
);
|
|
2794
2794
|
function u(f) {
|
|
2795
2795
|
const p = typeof f.span == "number" ? f.span : 12;
|
|
@@ -2799,24 +2799,24 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2799
2799
|
d("header", rs, [
|
|
2800
2800
|
d("div", us, [
|
|
2801
2801
|
d("h1", ds, h(l.value), 1),
|
|
2802
|
-
|
|
2802
|
+
s.value ? (o(), c("div", cs, h(s.value), 1)) : F("", !0)
|
|
2803
2803
|
]),
|
|
2804
2804
|
d("div", ms, [
|
|
2805
2805
|
Z(f.$slots, "actions")
|
|
2806
2806
|
])
|
|
2807
2807
|
]),
|
|
2808
2808
|
d("div", fs, [
|
|
2809
|
-
(o(!0), c(M, null,
|
|
2809
|
+
(o(!0), c(M, null, V(a.value, (_, k) => (o(), c("div", {
|
|
2810
2810
|
key: k,
|
|
2811
2811
|
class: "admin-dashboard__cell",
|
|
2812
|
-
style:
|
|
2812
|
+
style: ze({ gridColumn: `span ${u(_)} / span ${u(_)}` })
|
|
2813
2813
|
}, [
|
|
2814
|
-
|
|
2814
|
+
$(is, { node: _ }, null, 8, ["node"])
|
|
2815
2815
|
], 4))), 128))
|
|
2816
2816
|
])
|
|
2817
2817
|
]));
|
|
2818
2818
|
}
|
|
2819
|
-
}), ps = /* @__PURE__ */
|
|
2819
|
+
}), ps = /* @__PURE__ */ T({
|
|
2820
2820
|
__name: "StatWidget",
|
|
2821
2821
|
props: {
|
|
2822
2822
|
title: { default: "" },
|
|
@@ -2835,7 +2835,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2835
2835
|
negative: "danger",
|
|
2836
2836
|
warning: "warning",
|
|
2837
2837
|
info: "info"
|
|
2838
|
-
},
|
|
2838
|
+
}, i = v(() => n[t.tone]);
|
|
2839
2839
|
return (a, l) => (o(), b(r(Te), {
|
|
2840
2840
|
title: e.title,
|
|
2841
2841
|
value: e.value,
|
|
@@ -2843,7 +2843,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2843
2843
|
suffix: e.suffix,
|
|
2844
2844
|
trend: e.trend,
|
|
2845
2845
|
precision: e.precision,
|
|
2846
|
-
tone:
|
|
2846
|
+
tone: i.value,
|
|
2847
2847
|
loading: e.loading
|
|
2848
2848
|
}, null, 8, ["title", "value", "prefix", "suffix", "trend", "precision", "tone", "loading"]));
|
|
2849
2849
|
}
|
|
@@ -2856,7 +2856,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2856
2856
|
}, _s = {
|
|
2857
2857
|
key: 1,
|
|
2858
2858
|
class: "admin-widget__desc"
|
|
2859
|
-
}, ys = ["viewBox", "height", "aria-label"], bs = ["x", "y", "width", "height", "fill", "data-label", "data-value"], ks = /* @__PURE__ */
|
|
2859
|
+
}, ys = ["viewBox", "height", "aria-label"], bs = ["x", "y", "width", "height", "fill", "data-label", "data-value"], ks = /* @__PURE__ */ T({
|
|
2860
2860
|
__name: "BarChartWidget",
|
|
2861
2861
|
props: {
|
|
2862
2862
|
title: { default: "" },
|
|
@@ -2866,17 +2866,17 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2866
2866
|
height: { default: 200 }
|
|
2867
2867
|
},
|
|
2868
2868
|
setup(e) {
|
|
2869
|
-
const t = e, n = v(() => Math.max(1, ...t.data.map((a) => a.value))),
|
|
2869
|
+
const t = e, n = v(() => Math.max(1, ...t.data.map((a) => a.value))), i = v(() => {
|
|
2870
2870
|
const l = 100 / Math.max(1, t.data.length);
|
|
2871
|
-
return t.data.map((
|
|
2872
|
-
label:
|
|
2873
|
-
value:
|
|
2871
|
+
return t.data.map((s, u) => ({
|
|
2872
|
+
label: s.label,
|
|
2873
|
+
value: s.value,
|
|
2874
2874
|
x: u * l + l * 0.1,
|
|
2875
2875
|
width: l * 0.8,
|
|
2876
|
-
heightPct:
|
|
2876
|
+
heightPct: s.value / n.value * 100
|
|
2877
2877
|
}));
|
|
2878
2878
|
});
|
|
2879
|
-
return (a, l) => (o(), b(r(
|
|
2879
|
+
return (a, l) => (o(), b(r(H), {
|
|
2880
2880
|
padding: "md",
|
|
2881
2881
|
class: "admin-widget"
|
|
2882
2882
|
}, {
|
|
@@ -2894,18 +2894,18 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2894
2894
|
role: "img",
|
|
2895
2895
|
"aria-label": e.title || "Bar chart"
|
|
2896
2896
|
}, [
|
|
2897
|
-
(o(!0), c(M, null,
|
|
2897
|
+
(o(!0), c(M, null, V(i.value, (s, u) => (o(), c("rect", {
|
|
2898
2898
|
key: u,
|
|
2899
|
-
x:
|
|
2900
|
-
y: e.height -
|
|
2901
|
-
width:
|
|
2902
|
-
height:
|
|
2899
|
+
x: s.x,
|
|
2900
|
+
y: e.height - s.heightPct / 100 * e.height,
|
|
2901
|
+
width: s.width,
|
|
2902
|
+
height: s.heightPct / 100 * e.height,
|
|
2903
2903
|
fill: e.accent,
|
|
2904
2904
|
rx: "1",
|
|
2905
|
-
"data-label":
|
|
2906
|
-
"data-value":
|
|
2905
|
+
"data-label": s.label,
|
|
2906
|
+
"data-value": s.value
|
|
2907
2907
|
}, [
|
|
2908
|
-
d("title", null, h(
|
|
2908
|
+
d("title", null, h(s.label) + ": " + h(s.value), 1)
|
|
2909
2909
|
], 8, bs))), 128))
|
|
2910
2910
|
], 8, ys))
|
|
2911
2911
|
]),
|
|
@@ -2915,7 +2915,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2915
2915
|
}), ws = {
|
|
2916
2916
|
key: 0,
|
|
2917
2917
|
class: "admin-widget__hd"
|
|
2918
|
-
}, $s = { class: "admin-widget__title" }, xs = { class: "admin-donut-widget__row" }, Ss = ["aria-label"], Cs = ["d", "fill"], As = { class: "admin-donut-widget__legend" }, Es = { class: "admin-donut-widget__label" }, Rs = { class: "admin-donut-widget__value" }, Us = /* @__PURE__ */
|
|
2918
|
+
}, $s = { class: "admin-widget__title" }, xs = { class: "admin-donut-widget__row" }, Ss = ["aria-label"], Cs = ["d", "fill"], As = { class: "admin-donut-widget__legend" }, Es = { class: "admin-donut-widget__label" }, Rs = { class: "admin-donut-widget__value" }, Us = /* @__PURE__ */ T({
|
|
2919
2919
|
__name: "DonutChartWidget",
|
|
2920
2920
|
props: {
|
|
2921
2921
|
title: { default: "" },
|
|
@@ -2928,21 +2928,21 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2928
2928
|
"var(--uid-color-amber-400, #fbbf24)",
|
|
2929
2929
|
"var(--uid-color-rose-400, #fb7185)",
|
|
2930
2930
|
"var(--uid-color-blue-400, #60a5fa)"
|
|
2931
|
-
],
|
|
2931
|
+
], i = v(() => t.data.reduce((l, s) => l + s.value, 0) || 1), a = v(() => {
|
|
2932
2932
|
let l = 0;
|
|
2933
|
-
return t.data.map((
|
|
2934
|
-
const f = l /
|
|
2935
|
-
l +=
|
|
2936
|
-
const p = l /
|
|
2933
|
+
return t.data.map((s, u) => {
|
|
2934
|
+
const f = l / i.value * 2 * Math.PI;
|
|
2935
|
+
l += s.value;
|
|
2936
|
+
const p = l / i.value * 2 * Math.PI, _ = 50, k = 60, x = 60, S = k + _ * Math.cos(f - Math.PI / 2), y = x + _ * Math.sin(f - Math.PI / 2), g = k + _ * Math.cos(p - Math.PI / 2), A = x + _ * Math.sin(p - Math.PI / 2), q = p - f > Math.PI ? 1 : 0, L = t.data.length === 1 ? `M ${k - _} ${x} a ${_} ${_} 0 1 0 ${_ * 2} 0 a ${_} ${_} 0 1 0 ${-_ * 2} 0` : `M ${k} ${x} L ${S} ${y} A ${_} ${_} 0 ${q} 1 ${g} ${A} Z`;
|
|
2937
2937
|
return {
|
|
2938
|
-
...
|
|
2939
|
-
path:
|
|
2940
|
-
color:
|
|
2941
|
-
pct: (
|
|
2938
|
+
...s,
|
|
2939
|
+
path: L,
|
|
2940
|
+
color: s.color ?? n[u % n.length],
|
|
2941
|
+
pct: (s.value / i.value * 100).toFixed(1)
|
|
2942
2942
|
};
|
|
2943
2943
|
});
|
|
2944
2944
|
});
|
|
2945
|
-
return (l,
|
|
2945
|
+
return (l, s) => (o(), b(r(H), {
|
|
2946
2946
|
padding: "md",
|
|
2947
2947
|
class: "admin-widget admin-donut-widget"
|
|
2948
2948
|
}, {
|
|
@@ -2957,14 +2957,14 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2957
2957
|
role: "img",
|
|
2958
2958
|
"aria-label": e.title
|
|
2959
2959
|
}, [
|
|
2960
|
-
(o(!0), c(M, null,
|
|
2960
|
+
(o(!0), c(M, null, V(a.value, (u, f) => (o(), c("path", {
|
|
2961
2961
|
key: f,
|
|
2962
2962
|
d: u.path,
|
|
2963
2963
|
fill: u.color
|
|
2964
2964
|
}, [
|
|
2965
2965
|
d("title", null, h(u.label) + ": " + h(u.value) + " (" + h(u.pct) + "%)", 1)
|
|
2966
2966
|
], 8, Cs))), 128)),
|
|
2967
|
-
|
|
2967
|
+
s[0] || (s[0] = d("circle", {
|
|
2968
2968
|
cx: "60",
|
|
2969
2969
|
cy: "60",
|
|
2970
2970
|
r: "30",
|
|
@@ -2972,10 +2972,10 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2972
2972
|
}, null, -1))
|
|
2973
2973
|
], 8, Ss)),
|
|
2974
2974
|
d("ul", As, [
|
|
2975
|
-
(o(!0), c(M, null,
|
|
2975
|
+
(o(!0), c(M, null, V(a.value, (u, f) => (o(), c("li", { key: f }, [
|
|
2976
2976
|
d("span", {
|
|
2977
2977
|
class: "admin-donut-widget__dot",
|
|
2978
|
-
style:
|
|
2978
|
+
style: ze({ background: u.color })
|
|
2979
2979
|
}, null, 4),
|
|
2980
2980
|
d("span", Es, h(u.label), 1),
|
|
2981
2981
|
d("span", Rs, h(u.pct) + "%", 1)
|
|
@@ -2989,7 +2989,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2989
2989
|
}), Fs = {
|
|
2990
2990
|
key: 0,
|
|
2991
2991
|
class: "admin-widget__hd"
|
|
2992
|
-
},
|
|
2992
|
+
}, Ls = { class: "admin-widget__title" }, Ts = /* @__PURE__ */ T({
|
|
2993
2993
|
__name: "RecentTableWidget",
|
|
2994
2994
|
props: {
|
|
2995
2995
|
title: { default: "" },
|
|
@@ -2998,15 +2998,15 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
2998
2998
|
emptyText: { default: "Нет данных" }
|
|
2999
2999
|
},
|
|
3000
3000
|
setup(e) {
|
|
3001
|
-
return (t, n) => (o(), b(r(
|
|
3001
|
+
return (t, n) => (o(), b(r(H), {
|
|
3002
3002
|
padding: "md",
|
|
3003
3003
|
class: "admin-widget"
|
|
3004
3004
|
}, {
|
|
3005
3005
|
default: m(() => [
|
|
3006
3006
|
e.title ? (o(), c("header", Fs, [
|
|
3007
|
-
d("h3",
|
|
3007
|
+
d("h3", Ls, h(e.title), 1)
|
|
3008
3008
|
])) : F("", !0),
|
|
3009
|
-
|
|
3009
|
+
$(r(Ze), {
|
|
3010
3010
|
columns: e.columns,
|
|
3011
3011
|
data: e.rows,
|
|
3012
3012
|
"empty-text": e.emptyText
|
|
@@ -3018,7 +3018,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
3018
3018
|
}), Ps = {
|
|
3019
3019
|
key: 0,
|
|
3020
3020
|
class: "admin-widget__hd"
|
|
3021
|
-
}, Ms = { class: "admin-widget__title" }, Ns = /* @__PURE__ */
|
|
3021
|
+
}, Ms = { class: "admin-widget__title" }, Ns = /* @__PURE__ */ T({
|
|
3022
3022
|
__name: "HeatmapWidget",
|
|
3023
3023
|
props: {
|
|
3024
3024
|
title: { default: "" },
|
|
@@ -3028,7 +3028,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
3028
3028
|
gap: { default: 2 }
|
|
3029
3029
|
},
|
|
3030
3030
|
setup(e) {
|
|
3031
|
-
return (t, n) => (o(), b(r(
|
|
3031
|
+
return (t, n) => (o(), b(r(H), {
|
|
3032
3032
|
padding: "md",
|
|
3033
3033
|
class: "admin-widget"
|
|
3034
3034
|
}, {
|
|
@@ -3036,7 +3036,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
3036
3036
|
e.title ? (o(), c("header", Ps, [
|
|
3037
3037
|
d("h3", Ms, h(e.title), 1)
|
|
3038
3038
|
])) : F("", !0),
|
|
3039
|
-
|
|
3039
|
+
$(r(nn), {
|
|
3040
3040
|
data: e.data,
|
|
3041
3041
|
levels: e.levels,
|
|
3042
3042
|
color: e.color,
|
|
@@ -3049,7 +3049,7 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
3049
3049
|
}), Is = {
|
|
3050
3050
|
key: 0,
|
|
3051
3051
|
class: "admin-widget__hd"
|
|
3052
|
-
}, Bs = { class: "admin-widget__title" }, Ds = { style: { display: "flex", "justify-content": "center" } }, zs = /* @__PURE__ */
|
|
3052
|
+
}, Bs = { class: "admin-widget__title" }, Ds = { style: { display: "flex", "justify-content": "center" } }, zs = /* @__PURE__ */ T({
|
|
3053
3053
|
__name: "GaugeWidget",
|
|
3054
3054
|
props: {
|
|
3055
3055
|
title: { default: "" },
|
|
@@ -3070,8 +3070,8 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
3070
3070
|
positive: "success",
|
|
3071
3071
|
warning: "warning",
|
|
3072
3072
|
negative: "danger"
|
|
3073
|
-
},
|
|
3074
|
-
return (a, l) => (o(), b(r(
|
|
3073
|
+
}, i = v(() => n[t.tone]);
|
|
3074
|
+
return (a, l) => (o(), b(r(H), {
|
|
3075
3075
|
padding: "md",
|
|
3076
3076
|
class: "admin-widget"
|
|
3077
3077
|
}, {
|
|
@@ -3080,13 +3080,13 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
3080
3080
|
d("h3", Bs, h(e.title), 1)
|
|
3081
3081
|
])) : F("", !0),
|
|
3082
3082
|
d("div", Ds, [
|
|
3083
|
-
|
|
3083
|
+
$(r(an), {
|
|
3084
3084
|
value: e.value,
|
|
3085
3085
|
min: e.min,
|
|
3086
3086
|
max: e.max,
|
|
3087
3087
|
size: e.size,
|
|
3088
3088
|
ranges: e.ranges,
|
|
3089
|
-
tone:
|
|
3089
|
+
tone: i.value,
|
|
3090
3090
|
color: e.color,
|
|
3091
3091
|
label: e.label,
|
|
3092
3092
|
suffix: e.suffix,
|
|
@@ -3100,14 +3100,14 @@ const El = { class: "admin-page admin-resource-view" }, Rl = { class: "admin-pag
|
|
|
3100
3100
|
}), Vs = {
|
|
3101
3101
|
key: 0,
|
|
3102
3102
|
class: "admin-widget__hd"
|
|
3103
|
-
}, qs = { class: "admin-widget__title" }, Os = { class: "admin-markdown-widget" }, Ws = /* @__PURE__ */
|
|
3103
|
+
}, qs = { class: "admin-widget__title" }, Os = { class: "admin-markdown-widget" }, Ws = /* @__PURE__ */ T({
|
|
3104
3104
|
__name: "MarkdownWidget",
|
|
3105
3105
|
props: {
|
|
3106
3106
|
title: { default: "" },
|
|
3107
3107
|
content: {}
|
|
3108
3108
|
},
|
|
3109
3109
|
setup(e) {
|
|
3110
|
-
return (t, n) => (o(), b(r(
|
|
3110
|
+
return (t, n) => (o(), b(r(H), {
|
|
3111
3111
|
padding: "md",
|
|
3112
3112
|
class: "admin-widget"
|
|
3113
3113
|
}, {
|
|
@@ -3126,7 +3126,7 @@ function js() {
|
|
|
3126
3126
|
stat: ps,
|
|
3127
3127
|
"bar-chart": ks,
|
|
3128
3128
|
"donut-chart": Us,
|
|
3129
|
-
"recent-table":
|
|
3129
|
+
"recent-table": Ts,
|
|
3130
3130
|
heatmap: Ns,
|
|
3131
3131
|
gauge: zs,
|
|
3132
3132
|
markdown: Ws
|
|
@@ -3135,11 +3135,11 @@ function js() {
|
|
|
3135
3135
|
function Ks(e) {
|
|
3136
3136
|
return e.success === !0;
|
|
3137
3137
|
}
|
|
3138
|
-
function
|
|
3138
|
+
function Lo(e) {
|
|
3139
3139
|
return e.success === !1;
|
|
3140
3140
|
}
|
|
3141
3141
|
function Gs(e) {
|
|
3142
|
-
const t =
|
|
3142
|
+
const t = gn.create({
|
|
3143
3143
|
baseURL: e.baseURL,
|
|
3144
3144
|
withCredentials: !0,
|
|
3145
3145
|
headers: {
|
|
@@ -3162,23 +3162,23 @@ function Gs(e) {
|
|
|
3162
3162
|
},
|
|
3163
3163
|
(a) => {
|
|
3164
3164
|
if (a.response) {
|
|
3165
|
-
const l = a.response.status,
|
|
3165
|
+
const l = a.response.status, s = a.response.data?.payload ?? {
|
|
3166
3166
|
errorKey: "unknown",
|
|
3167
3167
|
message: a.message
|
|
3168
|
-
}, u = ut(l,
|
|
3168
|
+
}, u = ut(l, s);
|
|
3169
3169
|
return u instanceof Ut && e.onUnauthenticated?.(), Promise.reject(u);
|
|
3170
3170
|
}
|
|
3171
|
-
return Promise.reject(new
|
|
3171
|
+
return Promise.reject(new qe(a.message));
|
|
3172
3172
|
}
|
|
3173
3173
|
);
|
|
3174
|
-
const n = (a, l,
|
|
3174
|
+
const n = (a, l, s) => t[a](l, s).then((u) => u.data), i = (a, l, s, u) => t[a](l, s, u).then((f) => f.data);
|
|
3175
3175
|
return {
|
|
3176
3176
|
raw: t,
|
|
3177
3177
|
get: (a, l) => n("get", a, l),
|
|
3178
3178
|
delete: (a, l) => n("delete", a, l),
|
|
3179
|
-
post: (a, l,
|
|
3180
|
-
put: (a, l,
|
|
3181
|
-
patch: (a, l,
|
|
3179
|
+
post: (a, l, s) => i("post", a, l, s),
|
|
3180
|
+
put: (a, l, s) => i("put", a, l, s),
|
|
3181
|
+
patch: (a, l, s) => i("patch", a, l, s),
|
|
3182
3182
|
setLocale: (a) => {
|
|
3183
3183
|
t.defaults.headers.common["X-Admin-Locale"] = a;
|
|
3184
3184
|
}
|
|
@@ -3204,10 +3204,10 @@ function Js(e) {
|
|
|
3204
3204
|
return Array.isArray(e.permission) ? e.permission : typeof e.permission == "string" && e.permission.length > 0 ? [e.permission] : [];
|
|
3205
3205
|
}
|
|
3206
3206
|
function Qs(e, t) {
|
|
3207
|
-
const n = e.slug,
|
|
3207
|
+
const n = e.slug, i = `/r/${n}`;
|
|
3208
3208
|
return [
|
|
3209
3209
|
{
|
|
3210
|
-
path:
|
|
3210
|
+
path: i,
|
|
3211
3211
|
name: `admin.resource.${n}.index`,
|
|
3212
3212
|
component: t.resourceIndex,
|
|
3213
3213
|
meta: {
|
|
@@ -3223,7 +3223,7 @@ function Qs(e, t) {
|
|
|
3223
3223
|
props: { slug: n }
|
|
3224
3224
|
},
|
|
3225
3225
|
{
|
|
3226
|
-
path: `${
|
|
3226
|
+
path: `${i}/create`,
|
|
3227
3227
|
name: `admin.resource.${n}.create`,
|
|
3228
3228
|
component: t.resourceCreate,
|
|
3229
3229
|
meta: {
|
|
@@ -3236,7 +3236,7 @@ function Qs(e, t) {
|
|
|
3236
3236
|
props: { slug: n }
|
|
3237
3237
|
},
|
|
3238
3238
|
{
|
|
3239
|
-
path: `${
|
|
3239
|
+
path: `${i}/:id/edit`,
|
|
3240
3240
|
name: `admin.resource.${n}.edit`,
|
|
3241
3241
|
component: t.resourceEdit,
|
|
3242
3242
|
meta: {
|
|
@@ -3250,7 +3250,7 @@ function Qs(e, t) {
|
|
|
3250
3250
|
props: (a) => ({ slug: n, id: a.params.id })
|
|
3251
3251
|
},
|
|
3252
3252
|
{
|
|
3253
|
-
path: `${
|
|
3253
|
+
path: `${i}/:id`,
|
|
3254
3254
|
name: `admin.resource.${n}.view`,
|
|
3255
3255
|
component: t.resourceView,
|
|
3256
3256
|
meta: {
|
|
@@ -3294,7 +3294,7 @@ function ei(e, t) {
|
|
|
3294
3294
|
}
|
|
3295
3295
|
function ti(e, t) {
|
|
3296
3296
|
if (typeof e.slug != "string" || e.slug.length === 0) return null;
|
|
3297
|
-
const n = e.permission,
|
|
3297
|
+
const n = e.permission, i = Array.isArray(n) ? n : typeof n == "string" && n.length > 0 ? [n] : [];
|
|
3298
3298
|
return {
|
|
3299
3299
|
path: `/dashboard/${e.slug}`,
|
|
3300
3300
|
name: `admin.dashboard.${e.slug}`,
|
|
@@ -3304,52 +3304,52 @@ function ti(e, t) {
|
|
|
3304
3304
|
kind: "dashboard",
|
|
3305
3305
|
slug: e.slug,
|
|
3306
3306
|
title: e.label ?? "Dashboard",
|
|
3307
|
-
permissions:
|
|
3307
|
+
permissions: i
|
|
3308
3308
|
}
|
|
3309
3309
|
};
|
|
3310
3310
|
}
|
|
3311
3311
|
function ni(e, t) {
|
|
3312
3312
|
if (e === null) return [];
|
|
3313
3313
|
const n = [];
|
|
3314
|
-
for (const
|
|
3315
|
-
n.push(...Qs(
|
|
3316
|
-
for (const
|
|
3317
|
-
n.push(Zs(
|
|
3318
|
-
for (const
|
|
3319
|
-
n.push(ei(
|
|
3320
|
-
for (const
|
|
3321
|
-
const a = ti(
|
|
3314
|
+
for (const i of e.resources)
|
|
3315
|
+
n.push(...Qs(i, t));
|
|
3316
|
+
for (const i of e.screens)
|
|
3317
|
+
n.push(Zs(i, t));
|
|
3318
|
+
for (const i of e.settings)
|
|
3319
|
+
n.push(ei(i, t));
|
|
3320
|
+
for (const i of e.dashboards) {
|
|
3321
|
+
const a = ti(i, t);
|
|
3322
3322
|
a && n.push(a);
|
|
3323
3323
|
}
|
|
3324
3324
|
return n;
|
|
3325
3325
|
}
|
|
3326
3326
|
function ai(e = {}) {
|
|
3327
|
-
const t = e.loginRouteName ?? "admin.login", n = e.forbiddenRouteName ?? "admin.forbidden",
|
|
3327
|
+
const t = e.loginRouteName ?? "admin.login", n = e.forbiddenRouteName ?? "admin.forbidden", i = e.redirectQueryKey ?? "redirect";
|
|
3328
3328
|
return (a) => {
|
|
3329
3329
|
if (a.name === t)
|
|
3330
3330
|
return !0;
|
|
3331
|
-
const l =
|
|
3331
|
+
const l = le();
|
|
3332
3332
|
if (a.meta?.requiresAuth === !0 && !l.isAuthenticated)
|
|
3333
3333
|
return {
|
|
3334
3334
|
name: t,
|
|
3335
|
-
query: { [
|
|
3335
|
+
query: { [i]: a.fullPath }
|
|
3336
3336
|
};
|
|
3337
3337
|
if (l.isChallengePending)
|
|
3338
3338
|
return {
|
|
3339
3339
|
name: t,
|
|
3340
|
-
query: { [
|
|
3340
|
+
query: { [i]: a.fullPath }
|
|
3341
3341
|
};
|
|
3342
3342
|
const u = a.meta?.permissions;
|
|
3343
3343
|
return Array.isArray(u) && u.length > 0 && !l.hasAnyPermission(u) ? { name: n } : !0;
|
|
3344
3344
|
};
|
|
3345
3345
|
}
|
|
3346
3346
|
function li(e = {}) {
|
|
3347
|
-
const t = e.template, n = e.brand ?? "",
|
|
3347
|
+
const t = e.template, n = e.brand ?? "", i = e.fallback ?? "";
|
|
3348
3348
|
return (a) => {
|
|
3349
3349
|
if (typeof document > "u") return;
|
|
3350
|
-
const l = a.meta?.title ??
|
|
3351
|
-
let
|
|
3352
|
-
t ?
|
|
3350
|
+
const l = a.meta?.title ?? i;
|
|
3351
|
+
let s;
|
|
3352
|
+
t ? s = t.replace("{title}", l).replace("{brand}", n) : l && n ? s = `${l} · ${n}` : s = l || n, document.title = s;
|
|
3353
3353
|
};
|
|
3354
3354
|
}
|
|
3355
3355
|
const si = [
|
|
@@ -3362,7 +3362,7 @@ function ii(e) {
|
|
|
3362
3362
|
return typeof e != "string" ? !1 : si.some((t) => e.startsWith(t));
|
|
3363
3363
|
}
|
|
3364
3364
|
function oi(e) {
|
|
3365
|
-
const t = e.base ?? "/admin", n = e.history ?? bt(t),
|
|
3365
|
+
const t = e.base ?? "/admin", n = e.history ?? bt(t), i = [
|
|
3366
3366
|
{
|
|
3367
3367
|
path: "/login",
|
|
3368
3368
|
name: "admin.login",
|
|
@@ -3382,12 +3382,12 @@ function oi(e) {
|
|
|
3382
3382
|
meta: { requiresAuth: !0, kind: "system", title: "403 — доступ запрещён" }
|
|
3383
3383
|
}
|
|
3384
3384
|
];
|
|
3385
|
-
e.components.profile &&
|
|
3385
|
+
e.components.profile && i.push({
|
|
3386
3386
|
path: "/profile",
|
|
3387
3387
|
name: "admin.profile",
|
|
3388
3388
|
component: e.components.profile,
|
|
3389
3389
|
meta: { requiresAuth: !0, kind: "system", title: "Профиль" }
|
|
3390
|
-
}), e.components.notifications &&
|
|
3390
|
+
}), e.components.notifications && i.push({
|
|
3391
3391
|
path: "/notifications",
|
|
3392
3392
|
name: "admin.notifications",
|
|
3393
3393
|
component: e.components.notifications,
|
|
@@ -3398,22 +3398,22 @@ function oi(e) {
|
|
|
3398
3398
|
name: "admin.notFound",
|
|
3399
3399
|
component: e.components.notFound,
|
|
3400
3400
|
meta: { kind: "system", title: "404" }
|
|
3401
|
-
}, l =
|
|
3401
|
+
}, l = Gt({
|
|
3402
3402
|
history: n,
|
|
3403
|
-
routes: [...
|
|
3403
|
+
routes: [...i, ...e.extraRoutes ?? [], a]
|
|
3404
3404
|
});
|
|
3405
|
-
return l.beforeEach(ai(e.authGuard)), l.afterEach(li(e.titleGuard)), l.replaceManifestRoutes = (
|
|
3405
|
+
return l.beforeEach(ai(e.authGuard)), l.afterEach(li(e.titleGuard)), l.replaceManifestRoutes = (s) => {
|
|
3406
3406
|
const u = l.getRoutes();
|
|
3407
3407
|
for (const p of u)
|
|
3408
3408
|
ii(p.name) && l.removeRoute(p.name);
|
|
3409
3409
|
l.hasRoute("admin.notFound") && l.removeRoute("admin.notFound");
|
|
3410
|
-
const f = ni(
|
|
3410
|
+
const f = ni(s, e.components);
|
|
3411
3411
|
for (const p of f)
|
|
3412
3412
|
l.addRoute(p);
|
|
3413
3413
|
l.addRoute(a);
|
|
3414
3414
|
}, l;
|
|
3415
3415
|
}
|
|
3416
|
-
const ee = /* @__PURE__ */
|
|
3416
|
+
const ee = /* @__PURE__ */ T({
|
|
3417
3417
|
__name: "TextField",
|
|
3418
3418
|
props: {
|
|
3419
3419
|
name: {},
|
|
@@ -3427,12 +3427,12 @@ const ee = /* @__PURE__ */ L({
|
|
|
3427
3427
|
autocomplete: { default: null }
|
|
3428
3428
|
},
|
|
3429
3429
|
setup(e) {
|
|
3430
|
-
const t = e, n = pe(),
|
|
3431
|
-
function l(
|
|
3432
|
-
n.setField(t.name,
|
|
3430
|
+
const t = e, n = pe(), i = v(() => n.getField(t.name) ?? ""), a = v(() => n.errors[t.name]?.[0]);
|
|
3431
|
+
function l(s) {
|
|
3432
|
+
n.setField(t.name, s);
|
|
3433
3433
|
}
|
|
3434
|
-
return (
|
|
3435
|
-
"model-value":
|
|
3434
|
+
return (s, u) => (o(), b(r(ve), {
|
|
3435
|
+
"model-value": i.value,
|
|
3436
3436
|
type: e.inputType,
|
|
3437
3437
|
label: e.label ?? void 0,
|
|
3438
3438
|
hint: e.help ?? void 0,
|
|
@@ -3446,7 +3446,7 @@ const ee = /* @__PURE__ */ L({
|
|
|
3446
3446
|
"onUpdate:modelValue": l
|
|
3447
3447
|
}, null, 8, ["model-value", "type", "label", "hint", "error", "placeholder", "required", "disabled", "readonly", "name", "autocomplete"]));
|
|
3448
3448
|
}
|
|
3449
|
-
}), Fe = /* @__PURE__ */
|
|
3449
|
+
}), Fe = /* @__PURE__ */ T({
|
|
3450
3450
|
__name: "TextAreaField",
|
|
3451
3451
|
props: {
|
|
3452
3452
|
name: {},
|
|
@@ -3459,11 +3459,11 @@ const ee = /* @__PURE__ */ L({
|
|
|
3459
3459
|
readonly: { type: Boolean, default: !1 }
|
|
3460
3460
|
},
|
|
3461
3461
|
setup(e) {
|
|
3462
|
-
const t = e, n = pe(),
|
|
3463
|
-
function l(
|
|
3464
|
-
n.setField(t.name,
|
|
3462
|
+
const t = e, n = pe(), i = v(() => n.getField(t.name) ?? ""), a = v(() => n.errors[t.name]?.[0]);
|
|
3463
|
+
function l(s) {
|
|
3464
|
+
n.setField(t.name, s);
|
|
3465
3465
|
}
|
|
3466
|
-
return (
|
|
3466
|
+
return (s, u) => (o(), b(r(Ce), {
|
|
3467
3467
|
label: e.label ?? void 0,
|
|
3468
3468
|
hint: e.help ?? void 0,
|
|
3469
3469
|
error: a.value,
|
|
@@ -3471,8 +3471,8 @@ const ee = /* @__PURE__ */ L({
|
|
|
3471
3471
|
disabled: e.disabled
|
|
3472
3472
|
}, {
|
|
3473
3473
|
default: m(() => [
|
|
3474
|
-
|
|
3475
|
-
"model-value":
|
|
3474
|
+
$(r(ln), {
|
|
3475
|
+
"model-value": i.value,
|
|
3476
3476
|
rows: e.rows,
|
|
3477
3477
|
placeholder: e.placeholder ?? void 0,
|
|
3478
3478
|
disabled: e.disabled,
|
|
@@ -3484,7 +3484,7 @@ const ee = /* @__PURE__ */ L({
|
|
|
3484
3484
|
_: 1
|
|
3485
3485
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3486
3486
|
}
|
|
3487
|
-
}),
|
|
3487
|
+
}), Xe = /* @__PURE__ */ T({
|
|
3488
3488
|
__name: "NumberField",
|
|
3489
3489
|
props: {
|
|
3490
3490
|
name: {},
|
|
@@ -3499,14 +3499,14 @@ const ee = /* @__PURE__ */ L({
|
|
|
3499
3499
|
readonly: { type: Boolean, default: !1 }
|
|
3500
3500
|
},
|
|
3501
3501
|
setup(e) {
|
|
3502
|
-
const t = e, n = pe(),
|
|
3503
|
-
const
|
|
3504
|
-
return
|
|
3502
|
+
const t = e, n = pe(), i = v(() => {
|
|
3503
|
+
const s = n.getField(t.name);
|
|
3504
|
+
return s == null || s === "" ? null : typeof s == "number" ? s : Number(s);
|
|
3505
3505
|
}), a = v(() => n.errors[t.name]?.[0]);
|
|
3506
|
-
function l(
|
|
3507
|
-
n.setField(t.name,
|
|
3506
|
+
function l(s) {
|
|
3507
|
+
n.setField(t.name, s);
|
|
3508
3508
|
}
|
|
3509
|
-
return (
|
|
3509
|
+
return (s, u) => (o(), b(r(Ce), {
|
|
3510
3510
|
label: e.label ?? void 0,
|
|
3511
3511
|
hint: e.help ?? void 0,
|
|
3512
3512
|
error: a.value,
|
|
@@ -3514,8 +3514,8 @@ const ee = /* @__PURE__ */ L({
|
|
|
3514
3514
|
disabled: e.disabled
|
|
3515
3515
|
}, {
|
|
3516
3516
|
default: m(() => [
|
|
3517
|
-
|
|
3518
|
-
"model-value":
|
|
3517
|
+
$(r(sn), {
|
|
3518
|
+
"model-value": i.value,
|
|
3519
3519
|
min: e.min ?? void 0,
|
|
3520
3520
|
max: e.max ?? void 0,
|
|
3521
3521
|
step: e.step ?? void 0,
|
|
@@ -3529,7 +3529,7 @@ const ee = /* @__PURE__ */ L({
|
|
|
3529
3529
|
_: 1
|
|
3530
3530
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3531
3531
|
}
|
|
3532
|
-
}), re = /* @__PURE__ */
|
|
3532
|
+
}), re = /* @__PURE__ */ T({
|
|
3533
3533
|
__name: "SelectField",
|
|
3534
3534
|
props: {
|
|
3535
3535
|
name: {},
|
|
@@ -3544,14 +3544,14 @@ const ee = /* @__PURE__ */ L({
|
|
|
3544
3544
|
size: { default: "md" }
|
|
3545
3545
|
},
|
|
3546
3546
|
setup(e) {
|
|
3547
|
-
const t = e, n = pe(),
|
|
3548
|
-
const
|
|
3549
|
-
return
|
|
3547
|
+
const t = e, n = pe(), i = v(() => {
|
|
3548
|
+
const s = n.getField(t.name);
|
|
3549
|
+
return s == null || s === "" ? null : s;
|
|
3550
3550
|
}), a = v(() => n.errors[t.name]?.[0]);
|
|
3551
|
-
function l(
|
|
3552
|
-
n.setField(t.name,
|
|
3551
|
+
function l(s) {
|
|
3552
|
+
n.setField(t.name, s);
|
|
3553
3553
|
}
|
|
3554
|
-
return (
|
|
3554
|
+
return (s, u) => (o(), b(r(Ce), {
|
|
3555
3555
|
label: e.label ?? void 0,
|
|
3556
3556
|
hint: e.help ?? void 0,
|
|
3557
3557
|
error: a.value,
|
|
@@ -3559,8 +3559,8 @@ const ee = /* @__PURE__ */ L({
|
|
|
3559
3559
|
disabled: e.disabled
|
|
3560
3560
|
}, {
|
|
3561
3561
|
default: m(() => [
|
|
3562
|
-
|
|
3563
|
-
"model-value":
|
|
3562
|
+
$(r(Ne), {
|
|
3563
|
+
"model-value": i.value,
|
|
3564
3564
|
options: e.options,
|
|
3565
3565
|
placeholder: e.placeholder ?? void 0,
|
|
3566
3566
|
disabled: e.disabled,
|
|
@@ -3573,7 +3573,7 @@ const ee = /* @__PURE__ */ L({
|
|
|
3573
3573
|
_: 1
|
|
3574
3574
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3575
3575
|
}
|
|
3576
|
-
}),
|
|
3576
|
+
}), Le = /* @__PURE__ */ T({
|
|
3577
3577
|
__name: "CheckboxField",
|
|
3578
3578
|
props: {
|
|
3579
3579
|
name: {},
|
|
@@ -3584,11 +3584,11 @@ const ee = /* @__PURE__ */ L({
|
|
|
3584
3584
|
disabled: { type: Boolean, default: !1 }
|
|
3585
3585
|
},
|
|
3586
3586
|
setup(e) {
|
|
3587
|
-
const t = e, n = pe(),
|
|
3588
|
-
function l(
|
|
3589
|
-
n.setField(t.name,
|
|
3587
|
+
const t = e, n = pe(), i = v(() => !!n.getField(t.name)), a = v(() => n.errors[t.name]?.[0]);
|
|
3588
|
+
function l(s) {
|
|
3589
|
+
n.setField(t.name, s);
|
|
3590
3590
|
}
|
|
3591
|
-
return (
|
|
3591
|
+
return (s, u) => (o(), b(r(Ce), {
|
|
3592
3592
|
label: e.label ?? void 0,
|
|
3593
3593
|
hint: e.help ?? void 0,
|
|
3594
3594
|
error: a.value,
|
|
@@ -3596,8 +3596,8 @@ const ee = /* @__PURE__ */ L({
|
|
|
3596
3596
|
disabled: e.disabled
|
|
3597
3597
|
}, {
|
|
3598
3598
|
default: m(() => [
|
|
3599
|
-
|
|
3600
|
-
"model-value":
|
|
3599
|
+
$(r($t), {
|
|
3600
|
+
"model-value": i.value,
|
|
3601
3601
|
disabled: e.disabled,
|
|
3602
3602
|
name: e.name,
|
|
3603
3603
|
"onUpdate:modelValue": l
|
|
@@ -3613,7 +3613,7 @@ const ee = /* @__PURE__ */ L({
|
|
|
3613
3613
|
_: 1
|
|
3614
3614
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3615
3615
|
}
|
|
3616
|
-
}), fe = /* @__PURE__ */
|
|
3616
|
+
}), fe = /* @__PURE__ */ T({
|
|
3617
3617
|
__name: "DateField",
|
|
3618
3618
|
props: {
|
|
3619
3619
|
name: {},
|
|
@@ -3626,14 +3626,14 @@ const ee = /* @__PURE__ */ L({
|
|
|
3626
3626
|
disabled: { type: Boolean, default: !1 }
|
|
3627
3627
|
},
|
|
3628
3628
|
setup(e) {
|
|
3629
|
-
const t = e, n = pe(),
|
|
3630
|
-
const
|
|
3631
|
-
return
|
|
3629
|
+
const t = e, n = pe(), i = v(() => {
|
|
3630
|
+
const s = n.getField(t.name);
|
|
3631
|
+
return s == null || s === "" ? null : String(s);
|
|
3632
3632
|
}), a = v(() => n.errors[t.name]?.[0]);
|
|
3633
|
-
function l(
|
|
3634
|
-
n.setField(t.name,
|
|
3633
|
+
function l(s) {
|
|
3634
|
+
n.setField(t.name, s);
|
|
3635
3635
|
}
|
|
3636
|
-
return (
|
|
3636
|
+
return (s, u) => (o(), b(r(Ce), {
|
|
3637
3637
|
label: e.label ?? void 0,
|
|
3638
3638
|
hint: e.help ?? void 0,
|
|
3639
3639
|
error: a.value,
|
|
@@ -3641,8 +3641,8 @@ const ee = /* @__PURE__ */ L({
|
|
|
3641
3641
|
disabled: e.disabled
|
|
3642
3642
|
}, {
|
|
3643
3643
|
default: m(() => [
|
|
3644
|
-
|
|
3645
|
-
"model-value":
|
|
3644
|
+
$(r(on), {
|
|
3645
|
+
"model-value": i.value,
|
|
3646
3646
|
min: e.min ?? void 0,
|
|
3647
3647
|
max: e.max ?? void 0,
|
|
3648
3648
|
disabled: e.disabled,
|
|
@@ -3653,28 +3653,28 @@ const ee = /* @__PURE__ */ L({
|
|
|
3653
3653
|
_: 1
|
|
3654
3654
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3655
3655
|
}
|
|
3656
|
-
}), gt = /* @__PURE__ */
|
|
3656
|
+
}), gt = /* @__PURE__ */ T({
|
|
3657
3657
|
__name: "RowsLayout",
|
|
3658
3658
|
props: {
|
|
3659
3659
|
items: {},
|
|
3660
3660
|
gap: { default: "var(--uid-space-md)" }
|
|
3661
3661
|
},
|
|
3662
3662
|
setup(e) {
|
|
3663
|
-
return (t, n) => (o(), b(r(
|
|
3663
|
+
return (t, n) => (o(), b(r(rn), {
|
|
3664
3664
|
direction: "column",
|
|
3665
3665
|
gap: e.gap,
|
|
3666
3666
|
align: "stretch"
|
|
3667
3667
|
}, {
|
|
3668
3668
|
default: m(() => [
|
|
3669
|
-
(o(!0), c(M, null,
|
|
3669
|
+
(o(!0), c(M, null, V(e.items, (i, a) => (o(), b(Ae, {
|
|
3670
3670
|
key: a,
|
|
3671
|
-
node:
|
|
3671
|
+
node: i
|
|
3672
3672
|
}, null, 8, ["node"]))), 128))
|
|
3673
3673
|
]),
|
|
3674
3674
|
_: 1
|
|
3675
3675
|
}, 8, ["gap"]));
|
|
3676
3676
|
}
|
|
3677
|
-
}), ri = /* @__PURE__ */
|
|
3677
|
+
}), ri = /* @__PURE__ */ T({
|
|
3678
3678
|
__name: "ColumnsLayout",
|
|
3679
3679
|
props: {
|
|
3680
3680
|
items: {},
|
|
@@ -3683,21 +3683,21 @@ const ee = /* @__PURE__ */ L({
|
|
|
3683
3683
|
},
|
|
3684
3684
|
setup(e) {
|
|
3685
3685
|
const t = e, n = v(() => t.items.length === 0 ? t.cols : Math.max(1, Math.floor(t.cols / t.items.length)));
|
|
3686
|
-
function
|
|
3686
|
+
function i(a) {
|
|
3687
3687
|
const l = a.span;
|
|
3688
3688
|
return typeof l == "number" && l > 0 ? Math.min(l, t.cols) : n.value;
|
|
3689
3689
|
}
|
|
3690
|
-
return (a, l) => (o(), b(r(
|
|
3690
|
+
return (a, l) => (o(), b(r(un), {
|
|
3691
3691
|
cols: e.cols,
|
|
3692
3692
|
gap: e.gap
|
|
3693
3693
|
}, {
|
|
3694
3694
|
default: m(() => [
|
|
3695
|
-
(o(!0), c(M, null,
|
|
3695
|
+
(o(!0), c(M, null, V(e.items, (s, u) => (o(), c("div", {
|
|
3696
3696
|
key: u,
|
|
3697
3697
|
class: "admin-columns__item",
|
|
3698
|
-
style:
|
|
3698
|
+
style: ze({ gridColumn: `span ${i(s)} / span ${i(s)}` })
|
|
3699
3699
|
}, [
|
|
3700
|
-
|
|
3700
|
+
$(Ae, { node: s }, null, 8, ["node"])
|
|
3701
3701
|
], 4))), 128))
|
|
3702
3702
|
]),
|
|
3703
3703
|
_: 1
|
|
@@ -3712,7 +3712,7 @@ const ee = /* @__PURE__ */ L({
|
|
|
3712
3712
|
}, ci = {
|
|
3713
3713
|
key: 1,
|
|
3714
3714
|
class: "admin-section__description"
|
|
3715
|
-
}, mi = { class: "admin-section__body" }, ke = /* @__PURE__ */
|
|
3715
|
+
}, mi = { class: "admin-section__body" }, ke = /* @__PURE__ */ T({
|
|
3716
3716
|
__name: "SectionLayout",
|
|
3717
3717
|
props: {
|
|
3718
3718
|
items: {},
|
|
@@ -3720,7 +3720,7 @@ const ee = /* @__PURE__ */ L({
|
|
|
3720
3720
|
description: { default: null }
|
|
3721
3721
|
},
|
|
3722
3722
|
setup(e) {
|
|
3723
|
-
return (t, n) => (o(), b(r(
|
|
3723
|
+
return (t, n) => (o(), b(r(H), {
|
|
3724
3724
|
padding: "md",
|
|
3725
3725
|
class: "admin-section"
|
|
3726
3726
|
}, {
|
|
@@ -3730,16 +3730,16 @@ const ee = /* @__PURE__ */ L({
|
|
|
3730
3730
|
e.description ? (o(), c("p", ci, h(e.description), 1)) : F("", !0)
|
|
3731
3731
|
])) : F("", !0),
|
|
3732
3732
|
d("div", mi, [
|
|
3733
|
-
(o(!0), c(M, null,
|
|
3733
|
+
(o(!0), c(M, null, V(e.items, (i, a) => (o(), b(Ae, {
|
|
3734
3734
|
key: a,
|
|
3735
|
-
node:
|
|
3735
|
+
node: i
|
|
3736
3736
|
}, null, 8, ["node"]))), 128))
|
|
3737
3737
|
])
|
|
3738
3738
|
]),
|
|
3739
3739
|
_: 1
|
|
3740
3740
|
}));
|
|
3741
3741
|
}
|
|
3742
|
-
}), fi = /* @__PURE__ */
|
|
3742
|
+
}), fi = /* @__PURE__ */ T({
|
|
3743
3743
|
__name: "TabsLayout",
|
|
3744
3744
|
props: {
|
|
3745
3745
|
items: {},
|
|
@@ -3747,20 +3747,20 @@ const ee = /* @__PURE__ */ L({
|
|
|
3747
3747
|
},
|
|
3748
3748
|
emits: ["update:active"],
|
|
3749
3749
|
setup(e, { emit: t }) {
|
|
3750
|
-
const n = e,
|
|
3750
|
+
const n = e, i = t;
|
|
3751
3751
|
function a(u, f) {
|
|
3752
3752
|
return u.key ?? f;
|
|
3753
3753
|
}
|
|
3754
|
-
const l =
|
|
3755
|
-
function
|
|
3756
|
-
l.value = u,
|
|
3754
|
+
const l = U(n.active ?? a(n.items[0] ?? {}, 0));
|
|
3755
|
+
function s(u) {
|
|
3756
|
+
l.value = u, i("update:active", u);
|
|
3757
3757
|
}
|
|
3758
3758
|
return (u, f) => (o(), b(r(xt), {
|
|
3759
3759
|
"model-value": l.value,
|
|
3760
|
-
"onUpdate:modelValue":
|
|
3760
|
+
"onUpdate:modelValue": s
|
|
3761
3761
|
}, {
|
|
3762
3762
|
list: m(() => [
|
|
3763
|
-
(o(!0), c(M, null,
|
|
3763
|
+
(o(!0), c(M, null, V(e.items, (p, _) => (o(), b(r(Pe), {
|
|
3764
3764
|
key: a(p, _),
|
|
3765
3765
|
value: a(p, _)
|
|
3766
3766
|
}, {
|
|
@@ -3771,12 +3771,12 @@ const ee = /* @__PURE__ */ L({
|
|
|
3771
3771
|
}, 1032, ["value"]))), 128))
|
|
3772
3772
|
]),
|
|
3773
3773
|
default: m(() => [
|
|
3774
|
-
(o(!0), c(M, null,
|
|
3774
|
+
(o(!0), c(M, null, V(e.items, (p, _) => (o(), b(r(St), {
|
|
3775
3775
|
key: `panel-${a(p, _)}`,
|
|
3776
3776
|
value: a(p, _)
|
|
3777
3777
|
}, {
|
|
3778
3778
|
default: m(() => [
|
|
3779
|
-
(o(!0), c(M, null,
|
|
3779
|
+
(o(!0), c(M, null, V(p.items, (k, x) => (o(), b(Ae, {
|
|
3780
3780
|
key: x,
|
|
3781
3781
|
node: k
|
|
3782
3782
|
}, null, 8, ["node"]))), 128))
|
|
@@ -3811,9 +3811,9 @@ function vi() {
|
|
|
3811
3811
|
wysiwyg: Fe,
|
|
3812
3812
|
markdown: Fe,
|
|
3813
3813
|
code: Fe,
|
|
3814
|
-
number:
|
|
3815
|
-
slider:
|
|
3816
|
-
rating:
|
|
3814
|
+
number: Xe,
|
|
3815
|
+
slider: Xe,
|
|
3816
|
+
rating: Xe,
|
|
3817
3817
|
select: re,
|
|
3818
3818
|
combobox: re,
|
|
3819
3819
|
radio: re,
|
|
@@ -3822,9 +3822,10 @@ function vi() {
|
|
|
3822
3822
|
relation: re,
|
|
3823
3823
|
cascader: re,
|
|
3824
3824
|
"tree-select": re,
|
|
3825
|
-
checkbox:
|
|
3826
|
-
|
|
3827
|
-
|
|
3825
|
+
checkbox: Le,
|
|
3826
|
+
switch: Le,
|
|
3827
|
+
switcher: Le,
|
|
3828
|
+
boolean: Le,
|
|
3828
3829
|
date: fe,
|
|
3829
3830
|
datetime: fe,
|
|
3830
3831
|
datepicker: fe,
|
|
@@ -3846,28 +3847,41 @@ function vi() {
|
|
|
3846
3847
|
}
|
|
3847
3848
|
});
|
|
3848
3849
|
}
|
|
3849
|
-
const
|
|
3850
|
+
const pi = {
|
|
3851
|
+
key: 0,
|
|
3852
|
+
class: "admin-infolist-entry"
|
|
3853
|
+
}, gi = { class: "admin-infolist-entry__label" }, B = /* @__PURE__ */ T({
|
|
3850
3854
|
__name: "TextEntry",
|
|
3851
3855
|
props: {
|
|
3852
3856
|
name: { default: "" },
|
|
3853
3857
|
label: { default: "" },
|
|
3854
3858
|
value: { default: void 0 },
|
|
3855
3859
|
placeholder: { default: "—" },
|
|
3856
|
-
mono: { type: Boolean, default: !1 }
|
|
3860
|
+
mono: { type: Boolean, default: !1 },
|
|
3861
|
+
preset: { default: void 0 },
|
|
3862
|
+
meta: { default: () => ({}) }
|
|
3857
3863
|
},
|
|
3858
3864
|
setup(e) {
|
|
3859
|
-
const t = e, n =
|
|
3860
|
-
let
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3865
|
+
const t = e, n = We(), i = v(() => {
|
|
3866
|
+
let l = t.value;
|
|
3867
|
+
if (l === void 0 && n && t.name && (l = n[t.name]), l == null || l === "") return t.placeholder;
|
|
3868
|
+
const s = Tt(l, t.preset, t.meta);
|
|
3869
|
+
return s === "" ? t.placeholder : s;
|
|
3870
|
+
}), a = v(() => !!t.label);
|
|
3871
|
+
return (l, s) => a.value ? (o(), c("div", pi, [
|
|
3872
|
+
d("span", gi, h(e.label), 1),
|
|
3873
|
+
d("span", {
|
|
3874
|
+
class: ae(["admin-infolist-entry__value", e.mono ? "admin-infolist-entry__value--mono" : ""])
|
|
3875
|
+
}, h(i.value), 3)
|
|
3876
|
+
])) : (o(), c("span", {
|
|
3877
|
+
key: 1,
|
|
3878
|
+
class: ae(["admin-infolist-text", e.mono ? "admin-infolist-text--mono" : ""])
|
|
3879
|
+
}, h(i.value), 3));
|
|
3866
3880
|
}
|
|
3867
|
-
}),
|
|
3881
|
+
}), hi = {
|
|
3868
3882
|
key: 1,
|
|
3869
3883
|
class: "admin-infolist-text"
|
|
3870
|
-
},
|
|
3884
|
+
}, _i = /* @__PURE__ */ T({
|
|
3871
3885
|
__name: "BadgeEntry",
|
|
3872
3886
|
props: {
|
|
3873
3887
|
name: { default: "" },
|
|
@@ -3877,21 +3891,21 @@ const B = /* @__PURE__ */ L({
|
|
|
3877
3891
|
variant: { default: void 0 }
|
|
3878
3892
|
},
|
|
3879
3893
|
setup(e) {
|
|
3880
|
-
const t = e, n =
|
|
3894
|
+
const t = e, n = We(), i = v(() => {
|
|
3881
3895
|
let l = t.value;
|
|
3882
3896
|
return l === void 0 && n && t.name && (l = n[t.name]), l == null ? "" : String(l);
|
|
3883
|
-
}), a = v(() => t.variant ? t.variant : t.map[
|
|
3884
|
-
return (l,
|
|
3897
|
+
}), a = v(() => t.variant ? t.variant : t.map[i.value] ?? "default");
|
|
3898
|
+
return (l, s) => i.value ? (o(), b(r(et), {
|
|
3885
3899
|
key: 0,
|
|
3886
3900
|
variant: a.value
|
|
3887
3901
|
}, {
|
|
3888
3902
|
default: m(() => [
|
|
3889
|
-
C(h(
|
|
3903
|
+
C(h(i.value), 1)
|
|
3890
3904
|
]),
|
|
3891
3905
|
_: 1
|
|
3892
|
-
}, 8, ["variant"])) : (o(), c("span",
|
|
3906
|
+
}, 8, ["variant"])) : (o(), c("span", hi, "—"));
|
|
3893
3907
|
}
|
|
3894
|
-
}),
|
|
3908
|
+
}), yi = ["data-icon"], bi = { key: 0 }, ki = /* @__PURE__ */ T({
|
|
3895
3909
|
__name: "IconEntry",
|
|
3896
3910
|
props: {
|
|
3897
3911
|
name: { default: "" },
|
|
@@ -3903,24 +3917,24 @@ const B = /* @__PURE__ */ L({
|
|
|
3903
3917
|
falseLabel: { default: "" }
|
|
3904
3918
|
},
|
|
3905
3919
|
setup(e) {
|
|
3906
|
-
const t = e, n =
|
|
3907
|
-
let
|
|
3908
|
-
return
|
|
3909
|
-
}), a = v(() =>
|
|
3910
|
-
return (
|
|
3911
|
-
class:
|
|
3920
|
+
const t = e, n = We(), i = v(() => {
|
|
3921
|
+
let s = t.value;
|
|
3922
|
+
return s === void 0 && n && t.name && (s = n[t.name]), !!s;
|
|
3923
|
+
}), a = v(() => i.value ? t.trueLabel : t.falseLabel), l = v(() => i.value ? t.trueIcon : t.falseIcon);
|
|
3924
|
+
return (s, u) => (o(), c("span", {
|
|
3925
|
+
class: ae(["admin-infolist-icon", i.value ? "admin-infolist-icon--on" : "admin-infolist-icon--off"])
|
|
3912
3926
|
}, [
|
|
3913
3927
|
d("span", {
|
|
3914
3928
|
class: "admin-infolist-icon__glyph",
|
|
3915
3929
|
"data-icon": l.value
|
|
3916
|
-
}, null, 8,
|
|
3917
|
-
a.value ? (o(), c("span",
|
|
3930
|
+
}, null, 8, yi),
|
|
3931
|
+
a.value ? (o(), c("span", bi, h(a.value), 1)) : F("", !0)
|
|
3918
3932
|
], 2));
|
|
3919
3933
|
}
|
|
3920
|
-
}),
|
|
3934
|
+
}), wi = {
|
|
3921
3935
|
key: 1,
|
|
3922
3936
|
class: "admin-infolist-text"
|
|
3923
|
-
}, ht = /* @__PURE__ */
|
|
3937
|
+
}, ht = /* @__PURE__ */ T({
|
|
3924
3938
|
__name: "KeyValueEntry",
|
|
3925
3939
|
props: {
|
|
3926
3940
|
name: { default: "" },
|
|
@@ -3928,20 +3942,20 @@ const B = /* @__PURE__ */ L({
|
|
|
3928
3942
|
value: { default: void 0 }
|
|
3929
3943
|
},
|
|
3930
3944
|
setup(e) {
|
|
3931
|
-
const t = e, n =
|
|
3945
|
+
const t = e, n = We(), i = v(() => {
|
|
3932
3946
|
let l = t.value;
|
|
3933
3947
|
return l === void 0 && n && t.name && (l = n[t.name]), l == null ? [] : typeof l != "object" ? [] : Object.entries(l);
|
|
3934
3948
|
});
|
|
3935
3949
|
function a(l) {
|
|
3936
3950
|
return l == null ? "—" : typeof l == "object" ? JSON.stringify(l) : String(l);
|
|
3937
3951
|
}
|
|
3938
|
-
return (l,
|
|
3952
|
+
return (l, s) => i.value.length > 0 ? (o(), b(r(dn), {
|
|
3939
3953
|
key: 0,
|
|
3940
3954
|
direction: "vertical",
|
|
3941
3955
|
columns: 1
|
|
3942
3956
|
}, {
|
|
3943
3957
|
default: m(() => [
|
|
3944
|
-
(o(!0), c(M, null,
|
|
3958
|
+
(o(!0), c(M, null, V(i.value, ([u, f]) => (o(), b(r(cn), {
|
|
3945
3959
|
key: u,
|
|
3946
3960
|
label: u
|
|
3947
3961
|
}, {
|
|
@@ -3952,15 +3966,15 @@ const B = /* @__PURE__ */ L({
|
|
|
3952
3966
|
}, 1032, ["label"]))), 128))
|
|
3953
3967
|
]),
|
|
3954
3968
|
_: 1
|
|
3955
|
-
})) : (o(), c("span",
|
|
3969
|
+
})) : (o(), c("span", wi, "—"));
|
|
3956
3970
|
}
|
|
3957
3971
|
});
|
|
3958
|
-
function
|
|
3972
|
+
function $i() {
|
|
3959
3973
|
vl({
|
|
3960
3974
|
// Дефолтные типы infolist (BadgeEntry::make() и т.п.).
|
|
3961
3975
|
text: B,
|
|
3962
|
-
badge:
|
|
3963
|
-
icon:
|
|
3976
|
+
badge: _i,
|
|
3977
|
+
icon: ki,
|
|
3964
3978
|
keyvalue: ht,
|
|
3965
3979
|
"key-value": ht,
|
|
3966
3980
|
// Маппинг от backend Field::fieldType() → TextEntry для view-режима.
|
|
@@ -3990,6 +4004,7 @@ function ki() {
|
|
|
3990
4004
|
cascader: B,
|
|
3991
4005
|
"tree-select": B,
|
|
3992
4006
|
checkbox: B,
|
|
4007
|
+
switch: B,
|
|
3993
4008
|
switcher: B,
|
|
3994
4009
|
boolean: B,
|
|
3995
4010
|
date: B,
|
|
@@ -4001,30 +4016,30 @@ function ki() {
|
|
|
4001
4016
|
"color-picker": B
|
|
4002
4017
|
});
|
|
4003
4018
|
}
|
|
4004
|
-
function
|
|
4005
|
-
const n = t.pages ?? {},
|
|
4019
|
+
function To(e, t = {}) {
|
|
4020
|
+
const n = t.pages ?? {}, i = t.base ?? xi(e.baseUrl) ?? "/admin", a = Gs({
|
|
4006
4021
|
baseURL: e.apiUrl,
|
|
4007
4022
|
csrfToken: e.csrf
|
|
4008
4023
|
});
|
|
4009
4024
|
At(a);
|
|
4010
|
-
const l =
|
|
4011
|
-
l.use(
|
|
4025
|
+
const l = Ot(Kn), s = jt();
|
|
4026
|
+
l.use(s), le().hydrate(e), nt().hydrate(e), tt().hydrate(e), at().hydrate(e), vi(), js(), $i();
|
|
4012
4027
|
const u = oi({
|
|
4013
|
-
base:
|
|
4014
|
-
history: t.router?.history ?? bt(
|
|
4028
|
+
base: i,
|
|
4029
|
+
history: t.router?.history ?? bt(i),
|
|
4015
4030
|
components: {
|
|
4016
|
-
login: n.login ??
|
|
4017
|
-
home: n.home ??
|
|
4018
|
-
forbidden: n.forbidden ??
|
|
4019
|
-
notFound: n.notFound ??
|
|
4031
|
+
login: n.login ?? Ua,
|
|
4032
|
+
home: n.home ?? ea,
|
|
4033
|
+
forbidden: n.forbidden ?? na,
|
|
4034
|
+
notFound: n.notFound ?? la,
|
|
4020
4035
|
profile: n.profile ?? ns,
|
|
4021
4036
|
resourceIndex: n.resourceIndex ?? sl,
|
|
4022
4037
|
resourceCreate: n.resourceCreate ?? vt,
|
|
4023
4038
|
resourceEdit: n.resourceEdit ?? vt,
|
|
4024
4039
|
resourceView: n.resourceView ?? Pl,
|
|
4025
4040
|
dashboard: n.dashboard ?? vs,
|
|
4026
|
-
settings: n.settings ??
|
|
4027
|
-
screen: n.screen ??
|
|
4041
|
+
settings: n.settings ?? ua,
|
|
4042
|
+
screen: n.screen ?? fa
|
|
4028
4043
|
},
|
|
4029
4044
|
extraRoutes: t.router?.extraRoutes,
|
|
4030
4045
|
authGuard: t.router?.authGuard,
|
|
@@ -4044,7 +4059,7 @@ function Fo(e, t = {}) {
|
|
|
4044
4059
|
const S = p.params.slug ?? p.meta.slug;
|
|
4045
4060
|
if (S)
|
|
4046
4061
|
try {
|
|
4047
|
-
const { useResourceIndexStore: y } = await Promise.resolve().then(() =>
|
|
4062
|
+
const { useResourceIndexStore: y } = await Promise.resolve().then(() => Na), g = y();
|
|
4048
4063
|
(g.slug !== S || g.items.length === 0) && (g.setSlug(S), await g.load().catch(() => {
|
|
4049
4064
|
}));
|
|
4050
4065
|
} catch {
|
|
@@ -4052,7 +4067,7 @@ function Fo(e, t = {}) {
|
|
|
4052
4067
|
}
|
|
4053
4068
|
k();
|
|
4054
4069
|
}), !t.skipManifestLoad) {
|
|
4055
|
-
const p = ce(), _ =
|
|
4070
|
+
const p = ce(), _ = le(), k = Ft(), x = () => {
|
|
4056
4071
|
k.load().catch(() => {
|
|
4057
4072
|
}), p.load().then((S) => {
|
|
4058
4073
|
u.replaceManifestRoutes(S);
|
|
@@ -4071,7 +4086,7 @@ function Fo(e, t = {}) {
|
|
|
4071
4086
|
}
|
|
4072
4087
|
return t.onAppCreated?.(l), { app: l, router: u, client: a };
|
|
4073
4088
|
}
|
|
4074
|
-
function
|
|
4089
|
+
function xi(e) {
|
|
4075
4090
|
if (!e) return null;
|
|
4076
4091
|
try {
|
|
4077
4092
|
return new URL(e).pathname || "/admin";
|
|
@@ -4079,8 +4094,8 @@ function wi(e) {
|
|
|
4079
4094
|
return e.startsWith("/") ? e : null;
|
|
4080
4095
|
}
|
|
4081
4096
|
}
|
|
4082
|
-
async function
|
|
4083
|
-
const t =
|
|
4097
|
+
async function Po(e = {}) {
|
|
4098
|
+
const t = Si();
|
|
4084
4099
|
if (t)
|
|
4085
4100
|
return t;
|
|
4086
4101
|
if (e.client)
|
|
@@ -4088,46 +4103,46 @@ async function To(e = {}) {
|
|
|
4088
4103
|
const n = e.xhrUrl ?? "/system/bootstrap";
|
|
4089
4104
|
return await e.client.get(n);
|
|
4090
4105
|
} catch (n) {
|
|
4091
|
-
if (n instanceof
|
|
4106
|
+
if (n instanceof qe)
|
|
4092
4107
|
return null;
|
|
4093
4108
|
throw n;
|
|
4094
4109
|
}
|
|
4095
4110
|
return null;
|
|
4096
4111
|
}
|
|
4097
|
-
function
|
|
4112
|
+
function Si() {
|
|
4098
4113
|
return typeof window > "u" ? null : window.__ADMIN_BOOTSTRAP__ ?? null;
|
|
4099
4114
|
}
|
|
4100
|
-
function
|
|
4115
|
+
function Mo() {
|
|
4101
4116
|
return typeof document > "u" ? null : document.querySelector('meta[name="csrf-token"]')?.getAttribute("content") ?? null;
|
|
4102
4117
|
}
|
|
4103
|
-
const
|
|
4118
|
+
const Ci = { class: "admin-notifs__hd" }, Ai = { class: "admin-notifs__title" }, Ei = {
|
|
4104
4119
|
key: 0,
|
|
4105
4120
|
class: "admin-notifs__count"
|
|
4106
|
-
},
|
|
4121
|
+
}, Ri = { class: "admin-notifs__list" }, Ui = {
|
|
4107
4122
|
key: 0,
|
|
4108
4123
|
class: "admin-notifs__empty"
|
|
4109
|
-
},
|
|
4124
|
+
}, Fi = {
|
|
4110
4125
|
key: 1,
|
|
4111
4126
|
class: "admin-notifs__empty"
|
|
4112
|
-
},
|
|
4127
|
+
}, Li = ["onClick"], Ti = ["data-kind"], Pi = { class: "admin-notifs__body" }, Mi = { class: "admin-notifs__row1" }, Ni = {
|
|
4113
4128
|
key: 0,
|
|
4114
4129
|
class: "admin-notifs__title-strong"
|
|
4115
|
-
},
|
|
4130
|
+
}, Ii = {
|
|
4116
4131
|
key: 1,
|
|
4117
4132
|
class: "admin-notifs__title-soft"
|
|
4118
|
-
},
|
|
4133
|
+
}, Bi = { class: "admin-notifs__time" }, Di = {
|
|
4119
4134
|
key: 0,
|
|
4120
4135
|
class: "admin-notifs__text"
|
|
4121
|
-
},
|
|
4136
|
+
}, zi = ["onClick"], No = /* @__PURE__ */ T({
|
|
4122
4137
|
__name: "NotificationsDrawer",
|
|
4123
4138
|
props: {
|
|
4124
4139
|
open: { type: Boolean }
|
|
4125
4140
|
},
|
|
4126
4141
|
emits: ["update:open", "select-item"],
|
|
4127
4142
|
setup(e, { emit: t }) {
|
|
4128
|
-
const n = e,
|
|
4143
|
+
const n = e, i = t, a = at();
|
|
4129
4144
|
function l(g) {
|
|
4130
|
-
|
|
4145
|
+
i("update:open", g);
|
|
4131
4146
|
}
|
|
4132
4147
|
te(
|
|
4133
4148
|
() => n.open,
|
|
@@ -4137,7 +4152,7 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4137
4152
|
},
|
|
4138
4153
|
{ immediate: !0 }
|
|
4139
4154
|
);
|
|
4140
|
-
const
|
|
4155
|
+
const s = v(() => a.lastFilter ?? "all");
|
|
4141
4156
|
async function u(g) {
|
|
4142
4157
|
await a.load(g, 1).catch(() => {
|
|
4143
4158
|
});
|
|
@@ -4147,7 +4162,7 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4147
4162
|
});
|
|
4148
4163
|
}
|
|
4149
4164
|
async function p(g) {
|
|
4150
|
-
|
|
4165
|
+
i("select-item", g), g.read_at || await a.markAsRead(g.id).catch(() => {
|
|
4151
4166
|
});
|
|
4152
4167
|
}
|
|
4153
4168
|
async function _(g, A) {
|
|
@@ -4166,15 +4181,15 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4166
4181
|
}
|
|
4167
4182
|
function y(g) {
|
|
4168
4183
|
if (!g) return "";
|
|
4169
|
-
const A = new Date(g),
|
|
4170
|
-
if (
|
|
4171
|
-
if (
|
|
4172
|
-
const
|
|
4173
|
-
if (
|
|
4174
|
-
const
|
|
4175
|
-
return
|
|
4184
|
+
const A = new Date(g), q = Math.max(0, Date.now() - A.getTime()), L = Math.floor(q / 6e4);
|
|
4185
|
+
if (L < 1) return "только что";
|
|
4186
|
+
if (L < 60) return `${L} мин назад`;
|
|
4187
|
+
const E = Math.floor(L / 60);
|
|
4188
|
+
if (E < 24) return `${E} ч назад`;
|
|
4189
|
+
const w = Math.floor(E / 24);
|
|
4190
|
+
return w < 7 ? `${w} д назад` : A.toLocaleDateString("ru-RU");
|
|
4176
4191
|
}
|
|
4177
|
-
return (g, A) => (o(), b(r(
|
|
4192
|
+
return (g, A) => (o(), b(r(mn), {
|
|
4178
4193
|
"model-value": e.open,
|
|
4179
4194
|
side: "right",
|
|
4180
4195
|
width: "400px",
|
|
@@ -4182,12 +4197,12 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4182
4197
|
"onUpdate:modelValue": l
|
|
4183
4198
|
}, {
|
|
4184
4199
|
header: m(() => [
|
|
4185
|
-
d("div",
|
|
4186
|
-
d("h2",
|
|
4200
|
+
d("div", Ci, [
|
|
4201
|
+
d("h2", Ai, [
|
|
4187
4202
|
A[0] || (A[0] = C(" Уведомления ", -1)),
|
|
4188
|
-
r(a).unreadCount > 0 ? (o(), c("span",
|
|
4203
|
+
r(a).unreadCount > 0 ? (o(), c("span", Ei, " (" + h(r(a).unreadCount) + ") ", 1)) : F("", !0)
|
|
4189
4204
|
]),
|
|
4190
|
-
r(a).unreadCount > 0 ? (o(), b(r(
|
|
4205
|
+
r(a).unreadCount > 0 ? (o(), b(r(O), {
|
|
4191
4206
|
key: 0,
|
|
4192
4207
|
variant: "ghost",
|
|
4193
4208
|
size: "sm",
|
|
@@ -4201,18 +4216,18 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4201
4216
|
])
|
|
4202
4217
|
]),
|
|
4203
4218
|
default: m(() => [
|
|
4204
|
-
|
|
4205
|
-
"model-value":
|
|
4219
|
+
$(r(xt), {
|
|
4220
|
+
"model-value": s.value,
|
|
4206
4221
|
"onUpdate:modelValue": u
|
|
4207
4222
|
}, {
|
|
4208
4223
|
list: m(() => [
|
|
4209
|
-
|
|
4224
|
+
$(r(Pe), { value: "all" }, {
|
|
4210
4225
|
default: m(() => [...A[2] || (A[2] = [
|
|
4211
4226
|
C("Все", -1)
|
|
4212
4227
|
])]),
|
|
4213
4228
|
_: 1
|
|
4214
4229
|
}),
|
|
4215
|
-
|
|
4230
|
+
$(r(Pe), { value: "unread" }, {
|
|
4216
4231
|
default: m(() => [
|
|
4217
4232
|
A[3] || (A[3] = C(" Непрочитанные", -1)),
|
|
4218
4233
|
r(a).unreadCount > 0 ? (o(), c(M, { key: 0 }, [
|
|
@@ -4221,7 +4236,7 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4221
4236
|
]),
|
|
4222
4237
|
_: 1
|
|
4223
4238
|
}),
|
|
4224
|
-
|
|
4239
|
+
$(r(Pe), { value: "read" }, {
|
|
4225
4240
|
default: m(() => [...A[4] || (A[4] = [
|
|
4226
4241
|
C("Прочитанные", -1)
|
|
4227
4242
|
])]),
|
|
@@ -4229,40 +4244,40 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4229
4244
|
})
|
|
4230
4245
|
]),
|
|
4231
4246
|
default: m(() => [
|
|
4232
|
-
(o(), c(M, null,
|
|
4233
|
-
key:
|
|
4234
|
-
value:
|
|
4247
|
+
(o(), c(M, null, V(["all", "unread", "read"], (q) => $(r(St), {
|
|
4248
|
+
key: q,
|
|
4249
|
+
value: q
|
|
4235
4250
|
}, {
|
|
4236
4251
|
default: m(() => [
|
|
4237
|
-
d("ul",
|
|
4238
|
-
r(a).loading ? (o(), c("li",
|
|
4239
|
-
(o(!0), c(M, null,
|
|
4240
|
-
key:
|
|
4241
|
-
class:
|
|
4252
|
+
d("ul", Ri, [
|
|
4253
|
+
r(a).loading ? (o(), c("li", Ui, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", Fi, " Нет уведомлений ")) : F("", !0),
|
|
4254
|
+
(o(!0), c(M, null, V(r(a).items, (L) => (o(), c("li", {
|
|
4255
|
+
key: L.id,
|
|
4256
|
+
class: ae([
|
|
4242
4257
|
"admin-notifs__item",
|
|
4243
|
-
`admin-notifs__item--${k(
|
|
4244
|
-
{ "admin-notifs__item--unread": !
|
|
4258
|
+
`admin-notifs__item--${k(L)}`,
|
|
4259
|
+
{ "admin-notifs__item--unread": !L.read_at }
|
|
4245
4260
|
]),
|
|
4246
|
-
onClick: (
|
|
4261
|
+
onClick: (E) => p(L)
|
|
4247
4262
|
}, [
|
|
4248
4263
|
d("span", {
|
|
4249
4264
|
class: "admin-notifs__icon",
|
|
4250
|
-
"data-kind": k(
|
|
4251
|
-
}, null, 8,
|
|
4252
|
-
d("div",
|
|
4253
|
-
d("div",
|
|
4254
|
-
|
|
4255
|
-
d("span",
|
|
4265
|
+
"data-kind": k(L)
|
|
4266
|
+
}, null, 8, Ti),
|
|
4267
|
+
d("div", Pi, [
|
|
4268
|
+
d("div", Mi, [
|
|
4269
|
+
L.read_at ? (o(), c("span", Ii, h(x(L)), 1)) : (o(), c("strong", Ni, h(x(L)), 1)),
|
|
4270
|
+
d("span", Bi, h(y(L.created_at)), 1)
|
|
4256
4271
|
]),
|
|
4257
|
-
S(
|
|
4272
|
+
S(L) ? (o(), c("p", Di, h(S(L)), 1)) : F("", !0)
|
|
4258
4273
|
]),
|
|
4259
4274
|
d("button", {
|
|
4260
4275
|
type: "button",
|
|
4261
4276
|
class: "admin-notifs__close",
|
|
4262
4277
|
"aria-label": "Удалить",
|
|
4263
|
-
onClick: (
|
|
4264
|
-
}, " × ", 8,
|
|
4265
|
-
], 10,
|
|
4278
|
+
onClick: (E) => _(L, E)
|
|
4279
|
+
}, " × ", 8, zi)
|
|
4280
|
+
], 10, Li))), 128))
|
|
4266
4281
|
])
|
|
4267
4282
|
]),
|
|
4268
4283
|
_: 1
|
|
@@ -4274,22 +4289,22 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4274
4289
|
_: 1
|
|
4275
4290
|
}, 8, ["model-value"]));
|
|
4276
4291
|
}
|
|
4277
|
-
}),
|
|
4292
|
+
}), Vi = { class: "admin-page admin-import-wizard" }, qi = { class: "admin-page__hd" }, Oi = { class: "admin-page__title-wrap" }, Wi = { class: "admin-page__title" }, ji = { class: "admin-page__actions" }, Ki = {
|
|
4278
4293
|
key: 0,
|
|
4279
4294
|
class: "admin-import-wizard__empty"
|
|
4280
|
-
},
|
|
4295
|
+
}, Gi = {
|
|
4281
4296
|
key: 1,
|
|
4282
4297
|
class: "admin-import-wizard__mapping"
|
|
4283
|
-
},
|
|
4298
|
+
}, Hi = { class: "admin-import-wizard__map-source" }, Xi = {
|
|
4284
4299
|
key: 0,
|
|
4285
4300
|
class: "admin-import-wizard__map-sample"
|
|
4286
|
-
},
|
|
4301
|
+
}, Yi = { class: "admin-import-wizard__card-hd" }, Ji = {
|
|
4287
4302
|
key: 2,
|
|
4288
4303
|
class: "admin-import-wizard__empty"
|
|
4289
|
-
},
|
|
4304
|
+
}, Qi = {
|
|
4290
4305
|
key: 0,
|
|
4291
4306
|
class: "admin-import-wizard__empty"
|
|
4292
|
-
},
|
|
4307
|
+
}, Zi = { class: "admin-import-wizard__kpi" }, eo = { class: "admin-import-wizard__nav" }, Io = /* @__PURE__ */ T({
|
|
4293
4308
|
__name: "ImportWizardPage",
|
|
4294
4309
|
props: {
|
|
4295
4310
|
title: { default: "Импорт" },
|
|
@@ -4302,85 +4317,85 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4302
4317
|
},
|
|
4303
4318
|
emits: ["file-uploaded", "mapping-submit", "run-import", "cancel"],
|
|
4304
4319
|
setup(e, { emit: t }) {
|
|
4305
|
-
const n = e,
|
|
4320
|
+
const n = e, i = t, a = [
|
|
4306
4321
|
{ label: "Загрузка", description: "CSV / TSV / XLSX" },
|
|
4307
4322
|
{ label: "Сопоставление", description: "Колонки файла → поля" },
|
|
4308
4323
|
{ label: "Предпросмотр", description: "Проверка первых строк" },
|
|
4309
4324
|
{ label: "Импорт", description: "Запуск + сводка" }
|
|
4310
|
-
], l =
|
|
4311
|
-
function u(
|
|
4312
|
-
n.step === void 0 && (
|
|
4325
|
+
], l = U(0), s = v(() => n.step ?? l.value);
|
|
4326
|
+
function u(E) {
|
|
4327
|
+
n.step === void 0 && (E < 0 || E >= a.length || (l.value = E));
|
|
4313
4328
|
}
|
|
4314
|
-
const f =
|
|
4315
|
-
function p(
|
|
4316
|
-
f.value =
|
|
4329
|
+
const f = U([]);
|
|
4330
|
+
function p(E) {
|
|
4331
|
+
f.value = E, E.length > 0 && i("file-uploaded", E[0].file);
|
|
4317
4332
|
}
|
|
4318
|
-
const _ =
|
|
4319
|
-
function k(
|
|
4320
|
-
_.value[
|
|
4333
|
+
const _ = U({});
|
|
4334
|
+
function k(E, w) {
|
|
4335
|
+
_.value[E] = w === null || w === "" ? null : String(w);
|
|
4321
4336
|
}
|
|
4322
4337
|
function x() {
|
|
4323
|
-
return n.headers.map((
|
|
4324
|
-
source:
|
|
4325
|
-
target: _.value[
|
|
4338
|
+
return n.headers.map((E) => ({
|
|
4339
|
+
source: E.key,
|
|
4340
|
+
target: _.value[E.key] ?? null
|
|
4326
4341
|
}));
|
|
4327
4342
|
}
|
|
4328
4343
|
function S() {
|
|
4329
|
-
|
|
4344
|
+
i("mapping-submit", x()), u(2);
|
|
4330
4345
|
}
|
|
4331
4346
|
function y() {
|
|
4332
|
-
|
|
4347
|
+
i("run-import"), u(3);
|
|
4333
4348
|
}
|
|
4334
|
-
const g = v(() =>
|
|
4335
|
-
switch (
|
|
4349
|
+
const g = v(() => s.value > 0), A = v(() => {
|
|
4350
|
+
switch (s.value) {
|
|
4336
4351
|
case 0:
|
|
4337
4352
|
return f.value.length > 0;
|
|
4338
4353
|
case 1:
|
|
4339
|
-
return Object.values(_.value).some((
|
|
4354
|
+
return Object.values(_.value).some((E) => E !== null);
|
|
4340
4355
|
case 2:
|
|
4341
4356
|
return !0;
|
|
4342
4357
|
default:
|
|
4343
4358
|
return !1;
|
|
4344
4359
|
}
|
|
4345
|
-
}),
|
|
4360
|
+
}), q = v(() => [
|
|
4346
4361
|
{ value: "", label: "Не импортировать" },
|
|
4347
4362
|
...n.fieldOptions
|
|
4348
4363
|
]);
|
|
4349
|
-
function
|
|
4350
|
-
|
|
4364
|
+
function L() {
|
|
4365
|
+
i("cancel");
|
|
4351
4366
|
}
|
|
4352
|
-
return (
|
|
4353
|
-
d("header",
|
|
4354
|
-
d("div", Vi, [
|
|
4355
|
-
d("h1", qi, h(e.title), 1)
|
|
4356
|
-
]),
|
|
4367
|
+
return (E, w) => (o(), c("section", Vi, [
|
|
4368
|
+
d("header", qi, [
|
|
4357
4369
|
d("div", Oi, [
|
|
4358
|
-
|
|
4370
|
+
d("h1", Wi, h(e.title), 1)
|
|
4371
|
+
]),
|
|
4372
|
+
d("div", ji, [
|
|
4373
|
+
$(r(O), {
|
|
4359
4374
|
variant: "ghost",
|
|
4360
|
-
onClick:
|
|
4375
|
+
onClick: L
|
|
4361
4376
|
}, {
|
|
4362
|
-
default: m(() => [
|
|
4377
|
+
default: m(() => [...w[2] || (w[2] = [
|
|
4363
4378
|
C("Отмена", -1)
|
|
4364
4379
|
])]),
|
|
4365
4380
|
_: 1
|
|
4366
4381
|
})
|
|
4367
4382
|
])
|
|
4368
4383
|
]),
|
|
4369
|
-
|
|
4384
|
+
$(r(fn), {
|
|
4370
4385
|
steps: a,
|
|
4371
|
-
current:
|
|
4386
|
+
current: s.value
|
|
4372
4387
|
}, null, 8, ["current"]),
|
|
4373
|
-
|
|
4388
|
+
s.value === 0 ? (o(), b(r(H), {
|
|
4374
4389
|
key: 0,
|
|
4375
4390
|
padding: "md",
|
|
4376
4391
|
class: "admin-import-wizard__card"
|
|
4377
4392
|
}, {
|
|
4378
4393
|
default: m(() => [
|
|
4379
|
-
|
|
4394
|
+
w[3] || (w[3] = d("header", { class: "admin-import-wizard__card-hd" }, [
|
|
4380
4395
|
d("h3", null, "1. Загрузите файл"),
|
|
4381
4396
|
d("p", null, "CSV / TSV / XLSX, до 50 MB")
|
|
4382
4397
|
], -1)),
|
|
4383
|
-
|
|
4398
|
+
$(r(vn), {
|
|
4384
4399
|
"model-value": f.value,
|
|
4385
4400
|
accept: ".csv,.tsv,.xlsx",
|
|
4386
4401
|
"max-size": 50 * 1024 * 1024,
|
|
@@ -4391,52 +4406,52 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4391
4406
|
}, null, 8, ["model-value"])
|
|
4392
4407
|
]),
|
|
4393
4408
|
_: 1
|
|
4394
|
-
})) :
|
|
4409
|
+
})) : s.value === 1 ? (o(), b(r(H), {
|
|
4395
4410
|
key: 1,
|
|
4396
4411
|
padding: "md",
|
|
4397
4412
|
class: "admin-import-wizard__card"
|
|
4398
4413
|
}, {
|
|
4399
4414
|
default: m(() => [
|
|
4400
|
-
|
|
4415
|
+
w[5] || (w[5] = d("header", { class: "admin-import-wizard__card-hd" }, [
|
|
4401
4416
|
d("h3", null, "2. Сопоставьте колонки"),
|
|
4402
4417
|
d("p", null, "Выберите поле ресурса для каждой колонки файла")
|
|
4403
4418
|
], -1)),
|
|
4404
|
-
e.headers.length === 0 ? (o(), c("div",
|
|
4405
|
-
(o(!0), c(M, null,
|
|
4406
|
-
key:
|
|
4419
|
+
e.headers.length === 0 ? (o(), c("div", Ki, " Нет данных — host ещё не отдал headers. Загрузите файл сначала. ")) : (o(), c("div", Gi, [
|
|
4420
|
+
(o(!0), c(M, null, V(e.headers, (D) => (o(), c("div", {
|
|
4421
|
+
key: D.key,
|
|
4407
4422
|
class: "admin-import-wizard__map-row"
|
|
4408
4423
|
}, [
|
|
4409
|
-
d("div",
|
|
4410
|
-
d("strong", null, h(
|
|
4411
|
-
|
|
4424
|
+
d("div", Hi, [
|
|
4425
|
+
d("strong", null, h(D.label), 1),
|
|
4426
|
+
D.sample ? (o(), c("span", Xi, " «" + h(D.sample) + "» ", 1)) : F("", !0)
|
|
4412
4427
|
]),
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
"model-value": _.value[
|
|
4416
|
-
options:
|
|
4428
|
+
w[4] || (w[4] = d("span", { class: "admin-import-wizard__map-arrow" }, "→", -1)),
|
|
4429
|
+
$(r(Ne), {
|
|
4430
|
+
"model-value": _.value[D.key] ?? "",
|
|
4431
|
+
options: q.value,
|
|
4417
4432
|
placeholder: "Не импортировать",
|
|
4418
|
-
"onUpdate:modelValue": (W) => k(
|
|
4433
|
+
"onUpdate:modelValue": (W) => k(D.key, W)
|
|
4419
4434
|
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])
|
|
4420
4435
|
]))), 128))
|
|
4421
4436
|
]))
|
|
4422
4437
|
]),
|
|
4423
4438
|
_: 1
|
|
4424
|
-
})) :
|
|
4439
|
+
})) : s.value === 2 ? (o(), b(r(H), {
|
|
4425
4440
|
key: 2,
|
|
4426
4441
|
padding: "md",
|
|
4427
4442
|
class: "admin-import-wizard__card"
|
|
4428
4443
|
}, {
|
|
4429
4444
|
default: m(() => [
|
|
4430
|
-
d("header",
|
|
4431
|
-
|
|
4445
|
+
d("header", Yi, [
|
|
4446
|
+
w[6] || (w[6] = d("h3", null, "3. Предпросмотр", -1)),
|
|
4432
4447
|
d("p", null, "Первые " + h(e.preview.length) + " строк перед импортом", 1)
|
|
4433
4448
|
]),
|
|
4434
|
-
e.preview.some((
|
|
4449
|
+
e.preview.some((D) => D.__warning) ? (o(), b(r(se), {
|
|
4435
4450
|
key: 0,
|
|
4436
4451
|
variant: "warning",
|
|
4437
4452
|
style: { "margin-bottom": "var(--uid-space-md)" }
|
|
4438
4453
|
}, {
|
|
4439
|
-
default: m(() => [
|
|
4454
|
+
default: m(() => [...w[7] || (w[7] = [
|
|
4440
4455
|
C(" Часть строк имеет предупреждения — проверьте перед импортом. ", -1)
|
|
4441
4456
|
])]),
|
|
4442
4457
|
_: 1
|
|
@@ -4445,83 +4460,83 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4445
4460
|
key: 1,
|
|
4446
4461
|
columns: e.previewColumns,
|
|
4447
4462
|
data: e.preview
|
|
4448
|
-
}, null, 8, ["columns", "data"])) : (o(), c("div",
|
|
4463
|
+
}, null, 8, ["columns", "data"])) : (o(), c("div", Ji, " Host не передал previewColumns/preview. "))
|
|
4449
4464
|
]),
|
|
4450
4465
|
_: 1
|
|
4451
|
-
})) : (o(), b(r(
|
|
4466
|
+
})) : (o(), b(r(H), {
|
|
4452
4467
|
key: 3,
|
|
4453
4468
|
padding: "md",
|
|
4454
4469
|
class: "admin-import-wizard__card"
|
|
4455
4470
|
}, {
|
|
4456
4471
|
default: m(() => [
|
|
4457
|
-
|
|
4472
|
+
w[8] || (w[8] = d("header", { class: "admin-import-wizard__card-hd" }, [
|
|
4458
4473
|
d("h3", null, "4. Импорт")
|
|
4459
4474
|
], -1)),
|
|
4460
4475
|
e.progress ? (o(), c(M, { key: 1 }, [
|
|
4461
|
-
e.progress.total > 0 ? (o(), b(r(
|
|
4476
|
+
e.progress.total > 0 ? (o(), b(r(pn), {
|
|
4462
4477
|
key: 0,
|
|
4463
4478
|
"model-value": e.progress.created + e.progress.updated + e.progress.errors,
|
|
4464
4479
|
max: e.progress.total
|
|
4465
4480
|
}, null, 8, ["model-value", "max"])) : F("", !0),
|
|
4466
|
-
d("div",
|
|
4467
|
-
|
|
4481
|
+
d("div", Zi, [
|
|
4482
|
+
$(r(Te), {
|
|
4468
4483
|
title: "Создано",
|
|
4469
4484
|
value: e.progress.created,
|
|
4470
4485
|
tone: "success"
|
|
4471
4486
|
}, null, 8, ["value"]),
|
|
4472
|
-
|
|
4487
|
+
$(r(Te), {
|
|
4473
4488
|
title: "Обновлено",
|
|
4474
4489
|
value: e.progress.updated,
|
|
4475
4490
|
tone: "info"
|
|
4476
4491
|
}, null, 8, ["value"]),
|
|
4477
|
-
|
|
4492
|
+
$(r(Te), {
|
|
4478
4493
|
title: "Ошибки",
|
|
4479
4494
|
value: e.progress.errors,
|
|
4480
4495
|
tone: "danger"
|
|
4481
4496
|
}, null, 8, ["value"])
|
|
4482
4497
|
])
|
|
4483
|
-
], 64)) : (o(), c("div",
|
|
4498
|
+
], 64)) : (o(), c("div", Qi, " Запускается импорт… "))
|
|
4484
4499
|
]),
|
|
4485
4500
|
_: 1
|
|
4486
4501
|
})),
|
|
4487
|
-
d("footer",
|
|
4488
|
-
g.value ? (o(), b(r(
|
|
4502
|
+
d("footer", eo, [
|
|
4503
|
+
g.value ? (o(), b(r(O), {
|
|
4489
4504
|
key: 0,
|
|
4490
4505
|
variant: "ghost",
|
|
4491
|
-
onClick:
|
|
4506
|
+
onClick: w[0] || (w[0] = (D) => u(s.value - 1))
|
|
4492
4507
|
}, {
|
|
4493
|
-
default: m(() => [
|
|
4508
|
+
default: m(() => [...w[9] || (w[9] = [
|
|
4494
4509
|
C(" Назад ", -1)
|
|
4495
4510
|
])]),
|
|
4496
4511
|
_: 1
|
|
4497
4512
|
})) : F("", !0),
|
|
4498
|
-
|
|
4499
|
-
|
|
4513
|
+
w[13] || (w[13] = d("span", { style: { flex: "1" } }, null, -1)),
|
|
4514
|
+
s.value === 0 ? (o(), b(r(O), {
|
|
4500
4515
|
key: 1,
|
|
4501
4516
|
variant: "primary",
|
|
4502
4517
|
disabled: !A.value,
|
|
4503
|
-
onClick:
|
|
4518
|
+
onClick: w[1] || (w[1] = (D) => u(1))
|
|
4504
4519
|
}, {
|
|
4505
|
-
default: m(() => [
|
|
4520
|
+
default: m(() => [...w[10] || (w[10] = [
|
|
4506
4521
|
C(" Далее ", -1)
|
|
4507
4522
|
])]),
|
|
4508
4523
|
_: 1
|
|
4509
|
-
}, 8, ["disabled"])) :
|
|
4524
|
+
}, 8, ["disabled"])) : s.value === 1 ? (o(), b(r(O), {
|
|
4510
4525
|
key: 2,
|
|
4511
4526
|
variant: "primary",
|
|
4512
4527
|
disabled: !A.value,
|
|
4513
4528
|
onClick: S
|
|
4514
4529
|
}, {
|
|
4515
|
-
default: m(() => [
|
|
4530
|
+
default: m(() => [...w[11] || (w[11] = [
|
|
4516
4531
|
C(" Подтвердить mapping ", -1)
|
|
4517
4532
|
])]),
|
|
4518
4533
|
_: 1
|
|
4519
|
-
}, 8, ["disabled"])) :
|
|
4534
|
+
}, 8, ["disabled"])) : s.value === 2 ? (o(), b(r(O), {
|
|
4520
4535
|
key: 3,
|
|
4521
4536
|
variant: "primary",
|
|
4522
4537
|
onClick: y
|
|
4523
4538
|
}, {
|
|
4524
|
-
default: m(() => [
|
|
4539
|
+
default: m(() => [...w[12] || (w[12] = [
|
|
4525
4540
|
C(" Запустить импорт ", -1)
|
|
4526
4541
|
])]),
|
|
4527
4542
|
_: 1
|
|
@@ -4529,7 +4544,7 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4529
4544
|
])
|
|
4530
4545
|
]));
|
|
4531
4546
|
}
|
|
4532
|
-
}),
|
|
4547
|
+
}), to = { class: "admin-page admin-field-gallery" }, no = { class: "admin-gallery__group-title" }, ao = { class: "admin-gallery__grid" }, lo = { class: "admin-gallery__card-hd" }, so = { class: "admin-gallery__card-title" }, io = { class: "admin-gallery__card-type" }, oo = { class: "admin-gallery__card-desc" }, ro = { class: "admin-gallery__card-demo" }, Bo = /* @__PURE__ */ T({
|
|
4533
4548
|
__name: "FieldGalleryPage",
|
|
4534
4549
|
setup(e) {
|
|
4535
4550
|
const t = [
|
|
@@ -4593,35 +4608,35 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4593
4608
|
node: { type: "date", name: "demo_date", label: "Дата публикации", inputType: "date" },
|
|
4594
4609
|
initial: { demo_date: "2026-05-01" }
|
|
4595
4610
|
}
|
|
4596
|
-
], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}),
|
|
4611
|
+
], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}), i = Wt(
|
|
4597
4612
|
t.reduce((a, l) => Object.assign(a, l.initial), {})
|
|
4598
4613
|
);
|
|
4599
|
-
return Ct(
|
|
4614
|
+
return Ct(i), (a, l) => (o(), c("section", to, [
|
|
4600
4615
|
l[0] || (l[0] = d("header", { class: "admin-page__hd" }, [
|
|
4601
4616
|
d("div", { class: "admin-page__title-wrap" }, [
|
|
4602
4617
|
d("h1", { class: "admin-page__title" }, "Field Gallery"),
|
|
4603
4618
|
d("div", { class: "admin-page__count" }, " Каталог встроенных field-компонентов library + примеры использования ")
|
|
4604
4619
|
])
|
|
4605
4620
|
], -1)),
|
|
4606
|
-
(o(!0), c(M, null,
|
|
4621
|
+
(o(!0), c(M, null, V(r(n), (s, u) => (o(), c("section", {
|
|
4607
4622
|
key: u,
|
|
4608
4623
|
class: "admin-gallery__group"
|
|
4609
4624
|
}, [
|
|
4610
|
-
d("h2",
|
|
4611
|
-
d("div",
|
|
4612
|
-
(o(!0), c(M, null,
|
|
4625
|
+
d("h2", no, h(u), 1),
|
|
4626
|
+
d("div", ao, [
|
|
4627
|
+
(o(!0), c(M, null, V(s, (f) => (o(), b(r(H), {
|
|
4613
4628
|
key: f.type + f.title,
|
|
4614
4629
|
padding: "md",
|
|
4615
4630
|
class: "admin-gallery__card"
|
|
4616
4631
|
}, {
|
|
4617
4632
|
default: m(() => [
|
|
4618
|
-
d("header",
|
|
4619
|
-
d("h3",
|
|
4620
|
-
d("code",
|
|
4633
|
+
d("header", lo, [
|
|
4634
|
+
d("h3", so, h(f.title), 1),
|
|
4635
|
+
d("code", io, "type: " + h(f.type), 1)
|
|
4621
4636
|
]),
|
|
4622
|
-
d("p",
|
|
4623
|
-
d("div",
|
|
4624
|
-
|
|
4637
|
+
d("p", oo, h(f.description), 1),
|
|
4638
|
+
d("div", ro, [
|
|
4639
|
+
$(It, {
|
|
4625
4640
|
node: f.node
|
|
4626
4641
|
}, null, 8, ["node"])
|
|
4627
4642
|
])
|
|
@@ -4634,118 +4649,118 @@ const xi = { class: "admin-notifs__hd" }, Si = { class: "admin-notifs__title" },
|
|
|
4634
4649
|
}
|
|
4635
4650
|
});
|
|
4636
4651
|
export {
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4652
|
+
Kn as AdminApp,
|
|
4653
|
+
On as AdminShell,
|
|
4654
|
+
zn as AdminSidebar,
|
|
4655
|
+
Ln as AdminTopBar,
|
|
4641
4656
|
oe as ApiError,
|
|
4642
|
-
|
|
4657
|
+
_i as BadgeEntry,
|
|
4643
4658
|
ks as BarChartWidget,
|
|
4644
|
-
|
|
4659
|
+
Le as CheckboxField,
|
|
4645
4660
|
ri as ColumnsLayout,
|
|
4646
4661
|
vs as DashboardPage,
|
|
4647
4662
|
fe as DateField,
|
|
4648
4663
|
Us as DonutChartWidget,
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4664
|
+
Bo as FieldGalleryPage,
|
|
4665
|
+
It as FieldRenderer,
|
|
4666
|
+
Sn as ForbiddenError,
|
|
4667
|
+
na as ForbiddenPage,
|
|
4653
4668
|
zs as GaugeWidget,
|
|
4654
4669
|
Ns as HeatmapWidget,
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4670
|
+
ea as HomePage,
|
|
4671
|
+
ki as IconEntry,
|
|
4672
|
+
Io as ImportWizardPage,
|
|
4658
4673
|
Cl as InfolistRenderer,
|
|
4659
4674
|
ht as KeyValueEntry,
|
|
4660
4675
|
Ae as LayoutRenderer,
|
|
4661
4676
|
Rt as LocaleSwitcher,
|
|
4662
|
-
|
|
4663
|
-
|
|
4677
|
+
_a as LoginForm,
|
|
4678
|
+
Ua as LoginPage,
|
|
4664
4679
|
Ws as MarkdownWidget,
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4680
|
+
qe as NetworkError,
|
|
4681
|
+
Cn as NotFoundError,
|
|
4682
|
+
la as NotFoundPage,
|
|
4683
|
+
xn as NotificationBell,
|
|
4684
|
+
No as NotificationsDrawer,
|
|
4685
|
+
Xe as NumberField,
|
|
4671
4686
|
ns as ProfilePage,
|
|
4672
|
-
|
|
4687
|
+
Ts as RecentTableWidget,
|
|
4673
4688
|
vt as ResourceFormPage,
|
|
4674
4689
|
sl as ResourceIndexPage,
|
|
4675
4690
|
Pl as ResourceViewPage,
|
|
4676
4691
|
gt as RowsLayout,
|
|
4677
4692
|
ke as SectionLayout,
|
|
4678
4693
|
re as SelectField,
|
|
4679
|
-
|
|
4694
|
+
ua as SettingsPage,
|
|
4680
4695
|
ps as StatWidget,
|
|
4681
4696
|
fi as TabsLayout,
|
|
4682
4697
|
Fe as TextAreaField,
|
|
4683
4698
|
B as TextEntry,
|
|
4684
4699
|
ee as TextField,
|
|
4685
4700
|
Et as ThemeToggle,
|
|
4686
|
-
|
|
4701
|
+
ka as TwoFactorForm,
|
|
4687
4702
|
Ut as UnauthenticatedError,
|
|
4688
4703
|
pl as UnknownEntry,
|
|
4689
|
-
|
|
4690
|
-
|
|
4704
|
+
Nt as UnknownField,
|
|
4705
|
+
fa as UnknownScreenPage,
|
|
4691
4706
|
ss as UnknownWidget,
|
|
4692
|
-
|
|
4693
|
-
|
|
4707
|
+
En as UserMenu,
|
|
4708
|
+
Ve as ValidationError,
|
|
4694
4709
|
is as WidgetRenderer,
|
|
4695
4710
|
ni as buildRoutesFromManifest,
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4711
|
+
hn as clearAdminClient,
|
|
4712
|
+
Co as clearInfolistRegistry,
|
|
4713
|
+
wo as clearRegistry,
|
|
4714
|
+
Fo as clearWidgetRegistry,
|
|
4715
|
+
To as createAdminApp,
|
|
4701
4716
|
Gs as createAdminClient,
|
|
4702
4717
|
oi as createAdminRouter,
|
|
4703
4718
|
ai as createAuthGuard,
|
|
4704
4719
|
li as createTitleGuard,
|
|
4705
4720
|
J as getAdminClient,
|
|
4706
|
-
|
|
4721
|
+
Mt as getField,
|
|
4707
4722
|
pt as getInfolistEntry,
|
|
4708
4723
|
ft as getLayout,
|
|
4709
4724
|
as as getWidget,
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4725
|
+
_n as hasAdminClient,
|
|
4726
|
+
ho as hasField,
|
|
4727
|
+
xo as hasInfolistEntry,
|
|
4728
|
+
bo as hasLayout,
|
|
4729
|
+
Ro as hasWidget,
|
|
4730
|
+
Lo as isError,
|
|
4716
4731
|
Ks as isSuccess,
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4732
|
+
_o as listFields,
|
|
4733
|
+
So as listInfolistEntries,
|
|
4734
|
+
ko as listLayouts,
|
|
4735
|
+
Uo as listWidgets,
|
|
4736
|
+
Po as loadBootstrap,
|
|
4722
4737
|
Ct as provideFormState,
|
|
4723
4738
|
Al as provideRecord,
|
|
4724
|
-
|
|
4725
|
-
|
|
4739
|
+
Mo as readCsrfFromMeta,
|
|
4740
|
+
Si as readInlineBootstrap,
|
|
4726
4741
|
vi as registerBuiltinComponents,
|
|
4727
|
-
|
|
4742
|
+
$i as registerBuiltinInfolistEntries,
|
|
4728
4743
|
js as registerBuiltinWidgets,
|
|
4729
4744
|
il as registerComponents,
|
|
4730
|
-
|
|
4745
|
+
go as registerField,
|
|
4731
4746
|
vl as registerInfolistEntries,
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4747
|
+
$o as registerInfolistEntry,
|
|
4748
|
+
yo as registerLayout,
|
|
4749
|
+
Eo as registerWidget,
|
|
4735
4750
|
ls as registerWidgets,
|
|
4736
4751
|
At as setAdminClient,
|
|
4737
4752
|
ut as toApiError,
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4753
|
+
Vo as tryUseFormState,
|
|
4754
|
+
We as tryUseRecord,
|
|
4755
|
+
le as useAuthStore,
|
|
4741
4756
|
pe as useFormState,
|
|
4742
4757
|
nt as useLocaleStore,
|
|
4743
4758
|
ce as useManifestStore,
|
|
4744
4759
|
Ft as useMenuStore,
|
|
4745
4760
|
at as useNotificationsStore,
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4761
|
+
Ao as useRecord,
|
|
4762
|
+
Pt as useResourceFormStore,
|
|
4763
|
+
Lt as useResourceIndexStore,
|
|
4749
4764
|
tt as useThemeStore
|
|
4750
4765
|
};
|
|
4751
4766
|
//# sourceMappingURL=index.mjs.map
|