@dskripchenko/laravel-admin 1.1.21 → 1.1.22
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +399 -386
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as R, computed as v, defineComponent as
|
|
1
|
+
import { ref as R, computed as v, defineComponent as P, openBlock as o, createElementBlock as c, createElementVNode as d, createBlock as b, unref as r, withCtx as m, Fragment as M, renderList as D, createTextVNode as S, toDisplayString as h, createCommentVNode as T, createVNode as $, renderSlot as Y, resolveDynamicComponent as se, normalizeClass as ee, createSlots as qe, h as Lt, watch as Q, onBeforeUnmount as Pt, resolveComponent as rt, Transition as Ze, withModifiers as ut, nextTick as _e, onMounted as Re, withKeys as Mt, normalizeProps as Fe, mergeProps as Ue, normalizeStyle as Te, inject as dt, provide as Nt, createApp as Bt, reactive as It } from "vue";
|
|
2
2
|
import { defineStore as ne, createPinia as Dt } from "pinia";
|
|
3
3
|
import { RouterLink as Vt, useRouter as ie, useRoute as be, createWebHistory as ct, createRouter as zt } from "vue-router";
|
|
4
4
|
import { UidMenu as mt, UidMenuItem as Oe, UidMenuSeparator as qt, UidAvatar as ft, UidSidebar as Ot, UidSidebarGroup as Wt, UidSidebarItem as jt, UidSidebarLayout as Kt, UidCard as K, UidButton as z, UidAlert as te, UidInput as de, UidCheckbox as vt, UidSkeleton as We, UidErrorState as Gt, UidEmptyState as Ht, UidTable as je, UidPagination as Xt, UidBadge as Ke, UidSelect as Ee, UidStat as Ce, UidHeatmap as Yt, UidGauge as Jt, UidFormField as ke, UidTextarea as Qt, UidNumberInput as Zt, UidDatePicker as en, UidStack as tn, UidGrid as nn, UidTabs as pt, UidTabPanel as gt, UidTab as Ae, UidDescriptionList as an, UidDescriptionItem as ln, UidDrawer as sn, UidStepper as on, UidFileUpload as rn, UidProgress as un } from "@dskripchenko/ui";
|
|
@@ -54,7 +54,7 @@ const Ge = ne("admin-theme", () => {
|
|
|
54
54
|
applyLocal: a,
|
|
55
55
|
setTheme: l
|
|
56
56
|
};
|
|
57
|
-
}), mn = ["aria-label", "aria-pressed"], fn = ["data-icon"], _t = /* @__PURE__ */
|
|
57
|
+
}), mn = ["aria-label", "aria-pressed"], fn = ["data-icon"], _t = /* @__PURE__ */ P({
|
|
58
58
|
__name: "ThemeToggle",
|
|
59
59
|
setup(e) {
|
|
60
60
|
const t = Ge(), n = v(() => t.current === "dark"), s = v(() => n.value ? "sun" : "moon"), a = v(
|
|
@@ -117,7 +117,7 @@ const Ge = ne("admin-theme", () => {
|
|
|
117
117
|
class: "admin-topbar__icon-btn",
|
|
118
118
|
style: { width: "auto", padding: "0 8px", gap: "4px", "font-size": "12px" },
|
|
119
119
|
"aria-label": "Сменить локаль"
|
|
120
|
-
}, yt = /* @__PURE__ */
|
|
120
|
+
}, yt = /* @__PURE__ */ P({
|
|
121
121
|
__name: "LocaleSwitcher",
|
|
122
122
|
setup(e) {
|
|
123
123
|
const t = He();
|
|
@@ -135,7 +135,7 @@ const Ge = ne("admin-theme", () => {
|
|
|
135
135
|
])
|
|
136
136
|
]),
|
|
137
137
|
default: m(() => [
|
|
138
|
-
(o(!0), c(
|
|
138
|
+
(o(!0), c(M, null, D(r(t).available, (l) => (o(), b(r(Oe), {
|
|
139
139
|
key: l,
|
|
140
140
|
onClick: (i) => n(l)
|
|
141
141
|
}, {
|
|
@@ -175,22 +175,22 @@ const Ge = ne("admin-theme", () => {
|
|
|
175
175
|
}
|
|
176
176
|
async function p(x) {
|
|
177
177
|
await H().post("/notifications/markAsRead", { id: x });
|
|
178
|
-
const
|
|
179
|
-
|
|
178
|
+
const y = e.value.find((g) => g.id === x);
|
|
179
|
+
y && y.read_at === null && (y.read_at = (/* @__PURE__ */ new Date()).toISOString(), t.value = Math.max(0, t.value - 1));
|
|
180
180
|
}
|
|
181
|
-
async function
|
|
181
|
+
async function _() {
|
|
182
182
|
await H().post("/notifications/markAllAsRead");
|
|
183
183
|
const C = (/* @__PURE__ */ new Date()).toISOString();
|
|
184
|
-
for (const
|
|
185
|
-
|
|
184
|
+
for (const y of e.value)
|
|
185
|
+
y.read_at === null && (y.read_at = C);
|
|
186
186
|
t.value = 0;
|
|
187
187
|
}
|
|
188
188
|
async function k(x) {
|
|
189
189
|
await H().post("/notifications/destroy", { id: x });
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
const g = e.value[
|
|
193
|
-
e.value.splice(
|
|
190
|
+
const y = e.value.findIndex((g) => g.id === x);
|
|
191
|
+
if (y !== -1) {
|
|
192
|
+
const g = e.value[y].read_at === null;
|
|
193
|
+
e.value.splice(y, 1), g && (t.value = Math.max(0, t.value - 1));
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
@@ -204,10 +204,10 @@ const Ge = ne("admin-theme", () => {
|
|
|
204
204
|
load: u,
|
|
205
205
|
loadUnread: f,
|
|
206
206
|
markAsRead: p,
|
|
207
|
-
markAllAsRead:
|
|
207
|
+
markAllAsRead: _,
|
|
208
208
|
destroy: k
|
|
209
209
|
};
|
|
210
|
-
}), pn = ["title"], gn = /* @__PURE__ */
|
|
210
|
+
}), pn = ["title"], gn = /* @__PURE__ */ P({
|
|
211
211
|
__name: "NotificationBell",
|
|
212
212
|
setup(e) {
|
|
213
213
|
const t = Xe(), n = v(() => {
|
|
@@ -228,7 +228,7 @@ const Ge = ne("admin-theme", () => {
|
|
|
228
228
|
key: 0,
|
|
229
229
|
class: "admin-topbar__bell-badge",
|
|
230
230
|
title: `Непрочитанных: ${r(t).unreadCount}`
|
|
231
|
-
}, h(n.value), 9, pn)) :
|
|
231
|
+
}, h(n.value), 9, pn)) : T("", !0)
|
|
232
232
|
]),
|
|
233
233
|
_: 1
|
|
234
234
|
}));
|
|
@@ -290,30 +290,30 @@ function et(e, t) {
|
|
|
290
290
|
return new ae(e, t);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
const
|
|
293
|
+
const Z = ne("admin-auth", () => {
|
|
294
294
|
const e = R(null), t = R([]), n = R(null), s = v(() => e.value !== null), a = v(() => n.value !== null);
|
|
295
|
-
function l(
|
|
296
|
-
e.value =
|
|
295
|
+
function l(y) {
|
|
296
|
+
e.value = y.user, t.value = y.permissions;
|
|
297
297
|
}
|
|
298
|
-
function i(
|
|
299
|
-
return t.value.includes("*") || t.value.includes(
|
|
298
|
+
function i(y) {
|
|
299
|
+
return t.value.includes("*") || t.value.includes(y) ? !0 : t.value.some((g) => {
|
|
300
300
|
if (!g.endsWith(".*")) return !1;
|
|
301
301
|
const F = g.slice(0, -1);
|
|
302
|
-
return
|
|
302
|
+
return y.startsWith(F);
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
|
-
function u(
|
|
306
|
-
return
|
|
305
|
+
function u(y) {
|
|
306
|
+
return y.some(i);
|
|
307
307
|
}
|
|
308
|
-
function f(
|
|
309
|
-
return
|
|
308
|
+
function f(y) {
|
|
309
|
+
return y.every(i);
|
|
310
310
|
}
|
|
311
|
-
async function p(
|
|
311
|
+
async function p(y) {
|
|
312
312
|
const g = H();
|
|
313
313
|
try {
|
|
314
314
|
const F = await g.post(
|
|
315
315
|
"/auth/login",
|
|
316
|
-
|
|
316
|
+
y
|
|
317
317
|
);
|
|
318
318
|
return F?.user && (e.value = F.user), Array.isArray(F?.permissions) && (t.value = F.permissions), n.value = null, "authenticated";
|
|
319
319
|
} catch (F) {
|
|
@@ -321,27 +321,27 @@ const Q = ne("admin-auth", () => {
|
|
|
321
321
|
const q = F.payload.challenge_token;
|
|
322
322
|
return n.value = {
|
|
323
323
|
challengeToken: typeof q == "string" ? q : "",
|
|
324
|
-
remember:
|
|
324
|
+
remember: y.remember ?? !1
|
|
325
325
|
}, "two_factor_required";
|
|
326
326
|
}
|
|
327
327
|
throw F;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
async function y
|
|
330
|
+
async function _(y) {
|
|
331
331
|
if (n.value === null)
|
|
332
332
|
throw new Error("No pending 2FA challenge");
|
|
333
333
|
const F = await H().post("/auth/twoFactorChallenge", {
|
|
334
334
|
challenge_token: n.value.challengeToken,
|
|
335
|
-
code:
|
|
335
|
+
code: y
|
|
336
336
|
});
|
|
337
337
|
e.value = F.user, n.value = null;
|
|
338
338
|
}
|
|
339
|
-
async function k(
|
|
339
|
+
async function k(y) {
|
|
340
340
|
if (n.value === null)
|
|
341
341
|
throw new Error("No pending 2FA challenge");
|
|
342
342
|
const F = await H().post("/auth/twoFactorRecovery", {
|
|
343
343
|
challenge_token: n.value.challengeToken,
|
|
344
|
-
recovery_code:
|
|
344
|
+
recovery_code: y
|
|
345
345
|
});
|
|
346
346
|
return e.value = F.user, n.value = null, { remaining: F.recovery_codes_remaining };
|
|
347
347
|
}
|
|
@@ -349,9 +349,9 @@ const Q = ne("admin-auth", () => {
|
|
|
349
349
|
n.value = null;
|
|
350
350
|
}
|
|
351
351
|
async function C() {
|
|
352
|
-
const
|
|
352
|
+
const y = H();
|
|
353
353
|
try {
|
|
354
|
-
await
|
|
354
|
+
await y.post("/auth/logout");
|
|
355
355
|
} finally {
|
|
356
356
|
e.value = null, t.value = [], n.value = null;
|
|
357
357
|
}
|
|
@@ -370,7 +370,7 @@ const Q = ne("admin-auth", () => {
|
|
|
370
370
|
hasAnyPermission: u,
|
|
371
371
|
hasAllPermissions: f,
|
|
372
372
|
login: p,
|
|
373
|
-
twoFactorChallenge:
|
|
373
|
+
twoFactorChallenge: _,
|
|
374
374
|
twoFactorRecovery: k,
|
|
375
375
|
cancelChallenge: x,
|
|
376
376
|
logout: C
|
|
@@ -381,10 +381,10 @@ const Q = ne("admin-auth", () => {
|
|
|
381
381
|
"aria-label": "Меню пользователя",
|
|
382
382
|
"aria-haspopup": "menu",
|
|
383
383
|
style: { width: "auto", padding: "0 4px", gap: "8px" }
|
|
384
|
-
}, bn = /* @__PURE__ */
|
|
384
|
+
}, bn = /* @__PURE__ */ P({
|
|
385
385
|
__name: "UserMenu",
|
|
386
386
|
setup(e) {
|
|
387
|
-
const t =
|
|
387
|
+
const t = Z(), n = ie();
|
|
388
388
|
async function s() {
|
|
389
389
|
try {
|
|
390
390
|
await t.logout();
|
|
@@ -430,7 +430,7 @@ const Q = ne("admin-auth", () => {
|
|
|
430
430
|
}), kn = { class: "admin-topbar" }, wn = { class: "admin-topbar__breadcrumbs" }, $n = {
|
|
431
431
|
key: 0,
|
|
432
432
|
class: "sep"
|
|
433
|
-
}, xn = /* @__PURE__ */
|
|
433
|
+
}, xn = /* @__PURE__ */ P({
|
|
434
434
|
__name: "AdminTopBar",
|
|
435
435
|
props: {
|
|
436
436
|
breadcrumbs: { default: () => [] },
|
|
@@ -451,14 +451,14 @@ const Q = ne("admin-auth", () => {
|
|
|
451
451
|
class: "admin-topbar__icon",
|
|
452
452
|
"data-icon": "panel-left"
|
|
453
453
|
}, null, -1)
|
|
454
|
-
])])) :
|
|
454
|
+
])])) : T("", !0),
|
|
455
455
|
d("div", wn, [
|
|
456
456
|
Y(l.$slots, "breadcrumbs", {}, () => [
|
|
457
|
-
(o(!0), c(
|
|
458
|
-
f > 0 ? (o(), c("span", $n, "›")) :
|
|
457
|
+
(o(!0), c(M, null, D(e.breadcrumbs, (u, f) => (o(), c(M, { key: f }, [
|
|
458
|
+
f > 0 ? (o(), c("span", $n, "›")) : T("", !0),
|
|
459
459
|
(o(), b(se(u.to ? "a" : "span"), {
|
|
460
460
|
href: typeof u.to == "string" ? u.to : void 0,
|
|
461
|
-
class:
|
|
461
|
+
class: ee(f === a.value ? "cur" : "")
|
|
462
462
|
}, {
|
|
463
463
|
default: m(() => [
|
|
464
464
|
S(h(u.label), 1)
|
|
@@ -492,26 +492,26 @@ const Q = ne("admin-auth", () => {
|
|
|
492
492
|
}
|
|
493
493
|
}), kt = ne("admin-menu", () => {
|
|
494
494
|
const e = R([]), t = R(!1), n = R(null), s = R(!1), a = v(() => {
|
|
495
|
-
const p =
|
|
495
|
+
const p = Z(), _ = (k) => {
|
|
496
496
|
if (Array.isArray(k.permissions) && k.permissions.length > 0 && !p.hasAnyPermission(k.permissions))
|
|
497
497
|
return null;
|
|
498
|
-
const x = (k.children ?? []).map(
|
|
498
|
+
const x = (k.children ?? []).map(_).filter((C) => C !== null);
|
|
499
499
|
return { ...k, children: x };
|
|
500
500
|
};
|
|
501
|
-
return e.value.map(
|
|
501
|
+
return e.value.map(_).filter((k) => k !== null);
|
|
502
502
|
}), l = v(() => {
|
|
503
503
|
const p = /* @__PURE__ */ new Map();
|
|
504
504
|
for (const k of a.value) {
|
|
505
505
|
const x = k.group ?? null;
|
|
506
506
|
p.has(x) || p.set(x, []), p.get(x).push(k);
|
|
507
507
|
}
|
|
508
|
-
const
|
|
508
|
+
const _ = [];
|
|
509
509
|
for (const [k, x] of p)
|
|
510
|
-
x.sort((C,
|
|
511
|
-
const g = (C.order ?? 0) - (
|
|
512
|
-
return g !== 0 ? g : C.label.localeCompare(
|
|
513
|
-
}),
|
|
514
|
-
return
|
|
510
|
+
x.sort((C, y) => {
|
|
511
|
+
const g = (C.order ?? 0) - (y.order ?? 0);
|
|
512
|
+
return g !== 0 ? g : C.label.localeCompare(y.label);
|
|
513
|
+
}), _.push({ group: k, items: x });
|
|
514
|
+
return _;
|
|
515
515
|
});
|
|
516
516
|
async function i(p = !1) {
|
|
517
517
|
if (s.value && !p) return e.value;
|
|
@@ -519,8 +519,8 @@ const Q = ne("admin-auth", () => {
|
|
|
519
519
|
try {
|
|
520
520
|
const k = await H().get("/system/menu");
|
|
521
521
|
return e.value = Array.isArray(k.items) ? k.items : [], s.value = !0, e.value;
|
|
522
|
-
} catch (
|
|
523
|
-
throw n.value =
|
|
522
|
+
} catch (_) {
|
|
523
|
+
throw n.value = _ instanceof Error ? _ : new Error(String(_)), _;
|
|
524
524
|
} finally {
|
|
525
525
|
t.value = !1;
|
|
526
526
|
}
|
|
@@ -551,7 +551,7 @@ const Q = ne("admin-auth", () => {
|
|
|
551
551
|
}, Rn = { class: "admin-sidebar-foot" }, Fn = {
|
|
552
552
|
key: 0,
|
|
553
553
|
class: "admin-sidebar-foot__text"
|
|
554
|
-
}, Un = ["href"], Tn = /* @__PURE__ */
|
|
554
|
+
}, Un = ["href"], Tn = /* @__PURE__ */ P({
|
|
555
555
|
__name: "AdminSidebar",
|
|
556
556
|
props: {
|
|
557
557
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -578,20 +578,20 @@ const Q = ne("admin-auth", () => {
|
|
|
578
578
|
header: m(() => [
|
|
579
579
|
d("div", Sn, [
|
|
580
580
|
d("div", Cn, h(e.brandMark), 1),
|
|
581
|
-
e.collapsed ?
|
|
581
|
+
e.collapsed ? T("", !0) : (o(), c("div", An, h(e.brandName), 1))
|
|
582
582
|
]),
|
|
583
583
|
e.tenant && !e.collapsed ? (o(), c("div", En, [
|
|
584
584
|
d("span", null, h(e.tenant.label), 1),
|
|
585
585
|
d("b", null, h(e.tenant.name), 1)
|
|
586
|
-
])) :
|
|
586
|
+
])) : T("", !0)
|
|
587
587
|
]),
|
|
588
588
|
nav: m(() => [
|
|
589
|
-
(o(!0), c(
|
|
590
|
-
key: `grp-${
|
|
589
|
+
(o(!0), c(M, null, D(s.value, (p, _) => (o(), b(r(Wt), {
|
|
590
|
+
key: `grp-${_}`,
|
|
591
591
|
title: p.group ?? void 0
|
|
592
592
|
}, {
|
|
593
593
|
default: m(() => [
|
|
594
|
-
(o(!0), c(
|
|
594
|
+
(o(!0), c(M, null, D(p.items, (k) => (o(), b(r(jt), {
|
|
595
595
|
key: k.key,
|
|
596
596
|
to: i(k),
|
|
597
597
|
active: a(k),
|
|
@@ -620,12 +620,12 @@ const Q = ne("admin-auth", () => {
|
|
|
620
620
|
name: "footer",
|
|
621
621
|
fn: m(() => [
|
|
622
622
|
d("div", Rn, [
|
|
623
|
-
e.version ? (o(), c("span", Fn, h(e.version), 1)) :
|
|
623
|
+
e.version ? (o(), c("span", Fn, h(e.version), 1)) : T("", !0),
|
|
624
624
|
e.docsUrl ? (o(), c("a", {
|
|
625
625
|
key: 1,
|
|
626
626
|
href: e.docsUrl,
|
|
627
627
|
class: "admin-sidebar-foot__text admin-sidebar-foot__link"
|
|
628
|
-
}, " Docs ", 8, Un)) :
|
|
628
|
+
}, " Docs ", 8, Un)) : T("", !0)
|
|
629
629
|
])
|
|
630
630
|
]),
|
|
631
631
|
key: "0"
|
|
@@ -636,7 +636,7 @@ const Q = ne("admin-auth", () => {
|
|
|
636
636
|
key: 0,
|
|
637
637
|
class: "admin-impersonation-banner",
|
|
638
638
|
role: "status"
|
|
639
|
-
}, Ie = "data-admin-impersonating", Mn = /* @__PURE__ */
|
|
639
|
+
}, Ie = "data-admin-impersonating", Mn = /* @__PURE__ */ P({
|
|
640
640
|
__name: "AdminShell",
|
|
641
641
|
props: {
|
|
642
642
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -651,7 +651,7 @@ const Q = ne("admin-auth", () => {
|
|
|
651
651
|
function l() {
|
|
652
652
|
s("exit-impersonation");
|
|
653
653
|
}
|
|
654
|
-
return
|
|
654
|
+
return Q(
|
|
655
655
|
() => n.impersonation,
|
|
656
656
|
(i) => {
|
|
657
657
|
typeof document > "u" || (i !== null ? document.documentElement.setAttribute(Ie, "true") : document.documentElement.removeAttribute(Ie));
|
|
@@ -671,7 +671,7 @@ const Q = ne("admin-auth", () => {
|
|
|
671
671
|
class: "admin-impersonation-banner__exit",
|
|
672
672
|
onClick: l
|
|
673
673
|
}, " Выйти из режима ")
|
|
674
|
-
])) :
|
|
674
|
+
])) : T("", !0),
|
|
675
675
|
$(r(Kt), {
|
|
676
676
|
"model-value": e.collapsed,
|
|
677
677
|
"onUpdate:modelValue": a
|
|
@@ -707,12 +707,12 @@ const Q = ne("admin-auth", () => {
|
|
|
707
707
|
e.value = 0;
|
|
708
708
|
}
|
|
709
709
|
return { pending: e, isLoading: t, start: n, end: s, reset: a };
|
|
710
|
-
}), Nn = /* @__PURE__ */
|
|
710
|
+
}), Nn = /* @__PURE__ */ P({
|
|
711
711
|
__name: "AdminLoadingBar",
|
|
712
712
|
setup(e) {
|
|
713
713
|
const t = Ye(), n = R(!1);
|
|
714
714
|
let s = null;
|
|
715
|
-
|
|
715
|
+
Q(
|
|
716
716
|
() => t.isLoading,
|
|
717
717
|
(l) => {
|
|
718
718
|
l ? (s !== null && (clearTimeout(s), s = null), n.value = !0) : s = setTimeout(() => {
|
|
@@ -726,18 +726,18 @@ const Q = ne("admin-auth", () => {
|
|
|
726
726
|
"admin-loading-bar--visible": n.value
|
|
727
727
|
}));
|
|
728
728
|
return (l, i) => (o(), c("div", {
|
|
729
|
-
class:
|
|
729
|
+
class: ee(a.value),
|
|
730
730
|
role: "progressbar",
|
|
731
731
|
"aria-busy": "true"
|
|
732
732
|
}, null, 2));
|
|
733
733
|
}
|
|
734
|
-
}), Bn = { class: "admin-page-host" }, In = /* @__PURE__ */
|
|
734
|
+
}), Bn = { class: "admin-page-host" }, In = /* @__PURE__ */ P({
|
|
735
735
|
__name: "AdminApp",
|
|
736
736
|
setup(e) {
|
|
737
737
|
const t = be(), n = v(() => !(t.meta?.fullscreen === !0 || t.meta?.kind === "auth" || t.name === "admin.notFound"));
|
|
738
738
|
return (s, a) => {
|
|
739
739
|
const l = rt("router-view");
|
|
740
|
-
return o(), c(
|
|
740
|
+
return o(), c(M, null, [
|
|
741
741
|
$(Nn),
|
|
742
742
|
n.value ? (o(), b(Mn, { key: 0 }, {
|
|
743
743
|
default: m(() => [
|
|
@@ -772,17 +772,17 @@ const Q = ne("admin-auth", () => {
|
|
|
772
772
|
}
|
|
773
773
|
}), oe = ne("admin-manifest", () => {
|
|
774
774
|
const e = R(null), t = R(!1), n = R(null), s = v(() => e.value !== null), a = v(() => e.value?.version ?? null), l = v(() => e.value?.resources ?? []), i = v(() => e.value?.screens ?? []), u = v(() => e.value?.settings ?? []), f = v(() => e.value?.plugins ?? []);
|
|
775
|
-
function p(
|
|
776
|
-
return l.value.find((g) => g.slug ===
|
|
775
|
+
function p(y) {
|
|
776
|
+
return l.value.find((g) => g.slug === y) ?? null;
|
|
777
777
|
}
|
|
778
|
-
function y
|
|
779
|
-
return i.value.find((g) => g.slug ===
|
|
778
|
+
function _(y) {
|
|
779
|
+
return i.value.find((g) => g.slug === y) ?? null;
|
|
780
780
|
}
|
|
781
|
-
function k(
|
|
782
|
-
return u.value.find((g) => g.slug ===
|
|
781
|
+
function k(y) {
|
|
782
|
+
return u.value.find((g) => g.slug === y) ?? null;
|
|
783
783
|
}
|
|
784
|
-
async function x(
|
|
785
|
-
if (e.value !== null && !
|
|
784
|
+
async function x(y = !1) {
|
|
785
|
+
if (e.value !== null && !y)
|
|
786
786
|
return e.value;
|
|
787
787
|
t.value = !0, n.value = null;
|
|
788
788
|
try {
|
|
@@ -811,7 +811,7 @@ const Q = ne("admin-auth", () => {
|
|
|
811
811
|
plugins: f,
|
|
812
812
|
// actions
|
|
813
813
|
getResource: p,
|
|
814
|
-
getScreen:
|
|
814
|
+
getScreen: _,
|
|
815
815
|
getSettings: k,
|
|
816
816
|
load: x,
|
|
817
817
|
reset: C
|
|
@@ -819,10 +819,10 @@ const Q = ne("admin-auth", () => {
|
|
|
819
819
|
}), Dn = { class: "admin-home" }, Vn = { class: "admin-home__title" }, zn = {
|
|
820
820
|
key: 0,
|
|
821
821
|
class: "admin-home__resources"
|
|
822
|
-
}, qn = { class: "admin-home__grid" }, On = ["onClick"], Wn = { class: "admin-home__card-label" }, jn = { class: "admin-home__card-slug" }, Kn = /* @__PURE__ */
|
|
822
|
+
}, qn = { class: "admin-home__grid" }, On = ["onClick"], Wn = { class: "admin-home__card-label" }, jn = { class: "admin-home__card-slug" }, Kn = /* @__PURE__ */ P({
|
|
823
823
|
__name: "HomePage",
|
|
824
824
|
setup(e) {
|
|
825
|
-
const t = oe(), n =
|
|
825
|
+
const t = oe(), n = Z(), s = ie(), a = v(() => n.user?.name ?? ""), l = v(() => t.manifest?.resources ?? []);
|
|
826
826
|
return (i, u) => (o(), c("div", Dn, [
|
|
827
827
|
$(r(K), {
|
|
828
828
|
padding: "lg",
|
|
@@ -837,7 +837,7 @@ const Q = ne("admin-auth", () => {
|
|
|
837
837
|
l.value.length ? (o(), c("section", zn, [
|
|
838
838
|
u[1] || (u[1] = d("h2", { class: "admin-home__heading" }, "Ресурсы", -1)),
|
|
839
839
|
d("ul", qn, [
|
|
840
|
-
(o(!0), c(
|
|
840
|
+
(o(!0), c(M, null, D(l.value, (f) => (o(), c("li", {
|
|
841
841
|
key: f.slug
|
|
842
842
|
}, [
|
|
843
843
|
d("button", {
|
|
@@ -850,10 +850,10 @@ const Q = ne("admin-auth", () => {
|
|
|
850
850
|
], 8, On)
|
|
851
851
|
]))), 128))
|
|
852
852
|
])
|
|
853
|
-
])) :
|
|
853
|
+
])) : T("", !0)
|
|
854
854
|
]));
|
|
855
855
|
}
|
|
856
|
-
}), Gn = { class: "admin-status-page" }, Hn = /* @__PURE__ */
|
|
856
|
+
}), Gn = { class: "admin-status-page" }, Hn = /* @__PURE__ */ P({
|
|
857
857
|
__name: "ForbiddenPage",
|
|
858
858
|
setup(e) {
|
|
859
859
|
const t = ie();
|
|
@@ -879,7 +879,7 @@ const Q = ne("admin-auth", () => {
|
|
|
879
879
|
})
|
|
880
880
|
]));
|
|
881
881
|
}
|
|
882
|
-
}), Xn = { class: "admin-status-page" }, Yn = /* @__PURE__ */
|
|
882
|
+
}), Xn = { class: "admin-status-page" }, Yn = /* @__PURE__ */ P({
|
|
883
883
|
__name: "NotFoundPage",
|
|
884
884
|
setup(e) {
|
|
885
885
|
const t = ie();
|
|
@@ -911,7 +911,7 @@ const Q = ne("admin-auth", () => {
|
|
|
911
911
|
}, ea = {
|
|
912
912
|
key: 1,
|
|
913
913
|
class: "admin-settings-page__debug"
|
|
914
|
-
}, ta = /* @__PURE__ */
|
|
914
|
+
}, ta = /* @__PURE__ */ P({
|
|
915
915
|
__name: "SettingsPage",
|
|
916
916
|
setup(e) {
|
|
917
917
|
const t = be(), n = oe(), s = v(() => String(t.params.slug ?? "")), a = v(() => n.manifest?.settings?.find((l) => l.slug === s.value) ?? null);
|
|
@@ -925,7 +925,7 @@ const Q = ne("admin-auth", () => {
|
|
|
925
925
|
})
|
|
926
926
|
]));
|
|
927
927
|
}
|
|
928
|
-
}), na = { class: "admin-status-page" }, aa = { class: "admin-status-page__title" }, la = { class: "admin-status-page__hint" }, sa = /* @__PURE__ */
|
|
928
|
+
}), na = { class: "admin-status-page" }, aa = { class: "admin-status-page__title" }, la = { class: "admin-status-page__hint" }, sa = /* @__PURE__ */ P({
|
|
929
929
|
__name: "UnknownScreenPage",
|
|
930
930
|
setup(e) {
|
|
931
931
|
const t = be(), n = v(() => String(t.params.slug ?? "")), s = v(() => String(t.meta?.title ?? n.value));
|
|
@@ -949,7 +949,7 @@ const Q = ne("admin-auth", () => {
|
|
|
949
949
|
}), ia = { class: "admin-auth-card__row" }, oa = ["href"], ra = {
|
|
950
950
|
key: 1,
|
|
951
951
|
style: { "text-align": "center", "font-size": "var(--uid-font-size-xs)", color: "var(--uid-text-secondary)", "padding-top": "4px" }
|
|
952
|
-
}, ua = ["href"], da = /* @__PURE__ */
|
|
952
|
+
}, ua = ["href"], da = /* @__PURE__ */ P({
|
|
953
953
|
__name: "LoginForm",
|
|
954
954
|
props: {
|
|
955
955
|
forgotUrl: { default: null },
|
|
@@ -958,7 +958,7 @@ const Q = ne("admin-auth", () => {
|
|
|
958
958
|
},
|
|
959
959
|
emits: ["success"],
|
|
960
960
|
setup(e, { emit: t }) {
|
|
961
|
-
const n = t, s =
|
|
961
|
+
const n = t, s = Z(), a = R(""), l = R(""), i = R(!1), u = R(!1), f = R(null), p = R({}), _ = v(() => p.value.email?.[0]), k = v(() => p.value.password?.[0]);
|
|
962
962
|
async function x() {
|
|
963
963
|
if (!u.value) {
|
|
964
964
|
u.value = !0, f.value = null, p.value = {};
|
|
@@ -976,7 +976,7 @@ const Q = ne("admin-auth", () => {
|
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
return (C,
|
|
979
|
+
return (C, y) => (o(), c("form", {
|
|
980
980
|
class: "admin-auth-card__bd",
|
|
981
981
|
novalidate: "",
|
|
982
982
|
onSubmit: ut(x, ["prevent"])
|
|
@@ -991,22 +991,22 @@ const Q = ne("admin-auth", () => {
|
|
|
991
991
|
S(h(f.value), 1)
|
|
992
992
|
]),
|
|
993
993
|
_: 1
|
|
994
|
-
})) :
|
|
994
|
+
})) : T("", !0),
|
|
995
995
|
$(r(de), {
|
|
996
996
|
modelValue: a.value,
|
|
997
|
-
"onUpdate:modelValue":
|
|
997
|
+
"onUpdate:modelValue": y[0] || (y[0] = (g) => a.value = g),
|
|
998
998
|
type: "email",
|
|
999
999
|
label: "Email",
|
|
1000
1000
|
placeholder: "you@company.com",
|
|
1001
1001
|
autocomplete: "username",
|
|
1002
1002
|
required: !0,
|
|
1003
1003
|
disabled: u.value,
|
|
1004
|
-
error:
|
|
1004
|
+
error: _.value,
|
|
1005
1005
|
name: "email"
|
|
1006
1006
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
1007
1007
|
$(r(de), {
|
|
1008
1008
|
modelValue: l.value,
|
|
1009
|
-
"onUpdate:modelValue":
|
|
1009
|
+
"onUpdate:modelValue": y[1] || (y[1] = (g) => l.value = g),
|
|
1010
1010
|
type: "password",
|
|
1011
1011
|
label: "Пароль",
|
|
1012
1012
|
autocomplete: "current-password",
|
|
@@ -1018,10 +1018,10 @@ const Q = ne("admin-auth", () => {
|
|
|
1018
1018
|
d("div", ia, [
|
|
1019
1019
|
$(r(vt), {
|
|
1020
1020
|
modelValue: i.value,
|
|
1021
|
-
"onUpdate:modelValue":
|
|
1021
|
+
"onUpdate:modelValue": y[2] || (y[2] = (g) => i.value = g),
|
|
1022
1022
|
disabled: u.value
|
|
1023
1023
|
}, {
|
|
1024
|
-
default: m(() => [...
|
|
1024
|
+
default: m(() => [...y[3] || (y[3] = [
|
|
1025
1025
|
S(" Запомнить меня ", -1)
|
|
1026
1026
|
])]),
|
|
1027
1027
|
_: 1
|
|
@@ -1030,7 +1030,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1030
1030
|
key: 0,
|
|
1031
1031
|
href: e.forgotUrl,
|
|
1032
1032
|
class: "admin-auth-card__link"
|
|
1033
|
-
}, " Забыли пароль? ", 8, oa)) :
|
|
1033
|
+
}, " Забыли пароль? ", 8, oa)) : T("", !0)
|
|
1034
1034
|
]),
|
|
1035
1035
|
$(r(z), {
|
|
1036
1036
|
type: "submit",
|
|
@@ -1045,23 +1045,23 @@ const Q = ne("admin-auth", () => {
|
|
|
1045
1045
|
_: 1
|
|
1046
1046
|
}, 8, ["loading", "disabled"]),
|
|
1047
1047
|
e.ssoLinkLabel && e.ssoUrl ? (o(), c("div", ra, [
|
|
1048
|
-
|
|
1048
|
+
y[4] || (y[4] = S(" или войдите через ", -1)),
|
|
1049
1049
|
d("a", {
|
|
1050
1050
|
href: e.ssoUrl,
|
|
1051
1051
|
class: "admin-auth-card__link"
|
|
1052
1052
|
}, h(e.ssoLinkLabel), 9, ua)
|
|
1053
|
-
])) :
|
|
1053
|
+
])) : T("", !0)
|
|
1054
1054
|
], 32));
|
|
1055
1055
|
}
|
|
1056
|
-
}), ca = ["value", "disabled", "aria-label", "onInput", "onKeydown"], ma = { class: "admin-auth-card__row" }, fa = /* @__PURE__ */
|
|
1056
|
+
}), ca = ["value", "disabled", "aria-label", "onInput", "onKeydown"], ma = { class: "admin-auth-card__row" }, fa = /* @__PURE__ */ P({
|
|
1057
1057
|
__name: "TwoFactorForm",
|
|
1058
1058
|
emits: ["success", "cancel"],
|
|
1059
1059
|
setup(e, { emit: t }) {
|
|
1060
|
-
const n = t, s =
|
|
1060
|
+
const n = t, s = Z(), a = R("totp"), l = R(["", "", "", "", "", ""]), i = R(""), u = R([]), f = R(!1), p = R(null), _ = R(null), k = v(() => l.value.join("")), x = v(() => a.value === "totp" ? k.value.length === 6 : i.value.trim().length > 0);
|
|
1061
1061
|
function C(w, V) {
|
|
1062
1062
|
V instanceof HTMLInputElement && (u.value[w] = V);
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function y(w, V) {
|
|
1065
1065
|
const W = V.target, G = W.value.replace(/\D/g, "").slice(-1);
|
|
1066
1066
|
l.value[w] = G, W.value = G, G && w < l.value.length - 1 && _e(() => u.value[w + 1]?.focus()), k.value.length === l.value.length && q();
|
|
1067
1067
|
}
|
|
@@ -1087,7 +1087,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1087
1087
|
await s.twoFactorChallenge(k.value);
|
|
1088
1088
|
else {
|
|
1089
1089
|
const w = await s.twoFactorRecovery(i.value.trim());
|
|
1090
|
-
|
|
1090
|
+
_.value = w.remaining;
|
|
1091
1091
|
}
|
|
1092
1092
|
n("success");
|
|
1093
1093
|
} catch (w) {
|
|
@@ -1097,10 +1097,10 @@ const Q = ne("admin-auth", () => {
|
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function L() {
|
|
1101
1101
|
s.cancelChallenge(), n("cancel");
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function U() {
|
|
1104
1104
|
a.value = a.value === "totp" ? "recovery" : "totp", p.value = null;
|
|
1105
1105
|
}
|
|
1106
1106
|
return (w, V) => (o(), c("form", {
|
|
@@ -1118,24 +1118,24 @@ const Q = ne("admin-auth", () => {
|
|
|
1118
1118
|
S(h(p.value), 1)
|
|
1119
1119
|
]),
|
|
1120
1120
|
_: 1
|
|
1121
|
-
})) :
|
|
1122
|
-
|
|
1121
|
+
})) : T("", !0),
|
|
1122
|
+
_.value !== null ? (o(), b(r(te), {
|
|
1123
1123
|
key: 1,
|
|
1124
1124
|
variant: "info",
|
|
1125
1125
|
class: "admin-auth-card__alert",
|
|
1126
1126
|
role: "status"
|
|
1127
1127
|
}, {
|
|
1128
1128
|
default: m(() => [
|
|
1129
|
-
S(" Использован recovery-код. Осталось: " + h(
|
|
1129
|
+
S(" Использован recovery-код. Осталось: " + h(_.value), 1)
|
|
1130
1130
|
]),
|
|
1131
1131
|
_: 1
|
|
1132
|
-
})) :
|
|
1132
|
+
})) : T("", !0),
|
|
1133
1133
|
a.value === "totp" ? (o(), c("div", {
|
|
1134
1134
|
key: 2,
|
|
1135
1135
|
class: "admin-code-input",
|
|
1136
1136
|
onPaste: F
|
|
1137
1137
|
}, [
|
|
1138
|
-
(o(!0), c(
|
|
1138
|
+
(o(!0), c(M, null, D(l.value, (W, G) => (o(), c("input", {
|
|
1139
1139
|
key: G,
|
|
1140
1140
|
ref_for: !0,
|
|
1141
1141
|
ref: (A) => C(G, A),
|
|
@@ -1146,7 +1146,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1146
1146
|
maxlength: "1",
|
|
1147
1147
|
disabled: f.value,
|
|
1148
1148
|
"aria-label": `Цифра ${G + 1}`,
|
|
1149
|
-
onInput: (A) =>
|
|
1149
|
+
onInput: (A) => y(G, A),
|
|
1150
1150
|
onKeydown: (A) => g(G, A)
|
|
1151
1151
|
}, null, 40, ca))), 128))
|
|
1152
1152
|
], 32)) : (o(), b(r(de), {
|
|
@@ -1175,18 +1175,18 @@ const Q = ne("admin-auth", () => {
|
|
|
1175
1175
|
d("button", {
|
|
1176
1176
|
type: "button",
|
|
1177
1177
|
class: "admin-auth-card__link",
|
|
1178
|
-
onClick:
|
|
1178
|
+
onClick: U
|
|
1179
1179
|
}, [
|
|
1180
|
-
a.value === "totp" ? (o(), c(
|
|
1180
|
+
a.value === "totp" ? (o(), c(M, { key: 0 }, [
|
|
1181
1181
|
S("Использовать recovery-код")
|
|
1182
|
-
], 64)) : (o(), c(
|
|
1182
|
+
], 64)) : (o(), c(M, { key: 1 }, [
|
|
1183
1183
|
S("Вернуться к коду из приложения")
|
|
1184
1184
|
], 64))
|
|
1185
1185
|
]),
|
|
1186
1186
|
d("button", {
|
|
1187
1187
|
type: "button",
|
|
1188
1188
|
class: "admin-auth-card__link",
|
|
1189
|
-
onClick:
|
|
1189
|
+
onClick: L
|
|
1190
1190
|
}, " Отмена ")
|
|
1191
1191
|
])
|
|
1192
1192
|
], 32));
|
|
@@ -1197,7 +1197,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1197
1197
|
}, ga = { class: "admin-auth-card__hd" }, ha = ["src", "alt"], _a = {
|
|
1198
1198
|
key: 1,
|
|
1199
1199
|
"aria-hidden": "true"
|
|
1200
|
-
}, ya = { key: 2 }, ba = { class: "admin-auth-card__title" }, ka = { class: "admin-auth-card__sub" }, wa = /* @__PURE__ */
|
|
1200
|
+
}, ya = { key: 2 }, ba = { class: "admin-auth-card__title" }, ka = { class: "admin-auth-card__sub" }, wa = /* @__PURE__ */ P({
|
|
1201
1201
|
__name: "LoginPage",
|
|
1202
1202
|
props: {
|
|
1203
1203
|
brandName: { default: "Laravel Admin" },
|
|
@@ -1211,7 +1211,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1211
1211
|
showCornerActions: { type: Boolean, default: !0 }
|
|
1212
1212
|
},
|
|
1213
1213
|
setup(e) {
|
|
1214
|
-
const t = e, n =
|
|
1214
|
+
const t = e, n = Z(), s = ie(), a = be();
|
|
1215
1215
|
async function l() {
|
|
1216
1216
|
const i = a.query[t.redirectQueryKey];
|
|
1217
1217
|
if (typeof i == "string" && i.length > 0 && i.startsWith("/")) {
|
|
@@ -1220,7 +1220,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1220
1220
|
}
|
|
1221
1221
|
await s.push({ name: t.homeRouteName });
|
|
1222
1222
|
}
|
|
1223
|
-
return
|
|
1223
|
+
return Q(
|
|
1224
1224
|
() => n.isAuthenticated,
|
|
1225
1225
|
(i) => {
|
|
1226
1226
|
i && l();
|
|
@@ -1231,15 +1231,15 @@ const Q = ne("admin-auth", () => {
|
|
|
1231
1231
|
e.showCornerActions ? (o(), c("div", pa, [
|
|
1232
1232
|
$(_t),
|
|
1233
1233
|
$(yt)
|
|
1234
|
-
])) :
|
|
1234
|
+
])) : T("", !0),
|
|
1235
1235
|
$(r(K), {
|
|
1236
|
-
class:
|
|
1236
|
+
class: ee(["admin-auth-card", r(n).isChallengePending ? "admin-auth-card--wide" : ""]),
|
|
1237
1237
|
padding: "none"
|
|
1238
1238
|
}, {
|
|
1239
1239
|
default: m(() => [
|
|
1240
1240
|
d("div", ga, [
|
|
1241
1241
|
d("div", {
|
|
1242
|
-
class:
|
|
1242
|
+
class: ee(["admin-auth-card__logo", r(n).isChallengePending ? "admin-auth-card__logo--accent" : ""])
|
|
1243
1243
|
}, [
|
|
1244
1244
|
e.brandLogo && !r(n).isChallengePending ? (o(), c("img", {
|
|
1245
1245
|
key: 0,
|
|
@@ -1248,16 +1248,16 @@ const Q = ne("admin-auth", () => {
|
|
|
1248
1248
|
}, null, 8, ha)) : r(n).isChallengePending ? (o(), c("span", _a, "🛡")) : (o(), c("span", ya, h(e.brandMark), 1))
|
|
1249
1249
|
], 2),
|
|
1250
1250
|
d("div", ba, [
|
|
1251
|
-
r(n).isChallengePending ? (o(), c(
|
|
1251
|
+
r(n).isChallengePending ? (o(), c(M, { key: 0 }, [
|
|
1252
1252
|
S("Двухфакторная проверка")
|
|
1253
|
-
], 64)) : (o(), c(
|
|
1253
|
+
], 64)) : (o(), c(M, { key: 1 }, [
|
|
1254
1254
|
S(h(e.brandName), 1)
|
|
1255
1255
|
], 64))
|
|
1256
1256
|
]),
|
|
1257
1257
|
d("div", ka, [
|
|
1258
|
-
r(n).isChallengePending ? (o(), c(
|
|
1258
|
+
r(n).isChallengePending ? (o(), c(M, { key: 0 }, [
|
|
1259
1259
|
S(" Введите 6-значный код из приложения-аутентификатора ")
|
|
1260
|
-
], 64)) : (o(), c(
|
|
1260
|
+
], 64)) : (o(), c(M, { key: 1 }, [
|
|
1261
1261
|
S("Войдите, чтобы продолжить работу")
|
|
1262
1262
|
], 64))
|
|
1263
1263
|
])
|
|
@@ -1284,15 +1284,15 @@ const Q = ne("admin-auth", () => {
|
|
|
1284
1284
|
}), tt = { page: 1, per_page: 20, total: 0, last_page: 1 }, wt = ne("admin-resource-index", () => {
|
|
1285
1285
|
const e = R(null), t = R([]), n = R({ ...tt }), s = R(!1), a = R(!1), l = R(null);
|
|
1286
1286
|
let i = null;
|
|
1287
|
-
const u = 200, f = R(""), p = R({}),
|
|
1288
|
-
function
|
|
1287
|
+
const u = 200, f = R(""), p = R({}), _ = R(null), k = R(null), x = R(/* @__PURE__ */ new Set()), C = v(() => !s.value && l.value === null && t.value.length === 0), y = v(() => x.value.size), g = v(() => x.value.size > 0), F = v(() => l.value !== null), q = v(() => x.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((j) => x.value.has(L(j))) ? "all" : "mixed");
|
|
1288
|
+
function L(B) {
|
|
1289
1289
|
return B.id ?? B.key ?? "";
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function U(B) {
|
|
1292
1292
|
e.value !== B && (e.value = B, w(), s.value = !0);
|
|
1293
1293
|
}
|
|
1294
1294
|
function w() {
|
|
1295
|
-
t.value = [], n.value = { ...tt }, s.value = !1, l.value = null, f.value = "", p.value = {},
|
|
1295
|
+
t.value = [], n.value = { ...tt }, s.value = !1, l.value = null, f.value = "", p.value = {}, _.value = null, k.value = null, x.value = /* @__PURE__ */ new Set();
|
|
1296
1296
|
}
|
|
1297
1297
|
function V(B = {}) {
|
|
1298
1298
|
const j = {
|
|
@@ -1300,7 +1300,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1300
1300
|
per_page: B.per_page ?? n.value.per_page
|
|
1301
1301
|
}, $e = B.search ?? f.value;
|
|
1302
1302
|
$e && (j.q = $e);
|
|
1303
|
-
const ge = B.sort ??
|
|
1303
|
+
const ge = B.sort ?? _.value, Qe = B.direction ?? k.value;
|
|
1304
1304
|
ge && Qe !== null && (j.order = [{ column: ge, direction: Qe }]);
|
|
1305
1305
|
const Ut = B.filters ?? p.value, Be = {};
|
|
1306
1306
|
for (const [Tt, re] of Object.entries(Ut))
|
|
@@ -1332,10 +1332,10 @@ const Q = ne("admin-auth", () => {
|
|
|
1332
1332
|
p.value = {}, n.value.page = 1, await W();
|
|
1333
1333
|
}
|
|
1334
1334
|
async function N(B, j = "asc") {
|
|
1335
|
-
|
|
1335
|
+
_.value = B, k.value = j, await W();
|
|
1336
1336
|
}
|
|
1337
1337
|
async function O(B) {
|
|
1338
|
-
|
|
1338
|
+
_.value === B ? k.value === "asc" ? k.value = "desc" : k.value === "desc" ? (_.value = null, k.value = null) : k.value = "asc" : (_.value = B, k.value = "asc"), await W();
|
|
1339
1339
|
}
|
|
1340
1340
|
async function X(B) {
|
|
1341
1341
|
n.value.page = B, await W();
|
|
@@ -1350,7 +1350,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1350
1350
|
return;
|
|
1351
1351
|
}
|
|
1352
1352
|
const B = new Set(x.value);
|
|
1353
|
-
for (const j of t.value) B.add(
|
|
1353
|
+
for (const j of t.value) B.add(L(j));
|
|
1354
1354
|
x.value = B;
|
|
1355
1355
|
}
|
|
1356
1356
|
function Rt() {
|
|
@@ -1369,17 +1369,17 @@ const Q = ne("admin-auth", () => {
|
|
|
1369
1369
|
error: l,
|
|
1370
1370
|
search: f,
|
|
1371
1371
|
filters: p,
|
|
1372
|
-
sortKey:
|
|
1372
|
+
sortKey: _,
|
|
1373
1373
|
sortDirection: k,
|
|
1374
1374
|
selection: x,
|
|
1375
1375
|
// getters
|
|
1376
1376
|
isEmpty: C,
|
|
1377
1377
|
hasError: F,
|
|
1378
1378
|
hasSelection: g,
|
|
1379
|
-
selectedCount:
|
|
1379
|
+
selectedCount: y,
|
|
1380
1380
|
selectionState: q,
|
|
1381
1381
|
// actions
|
|
1382
|
-
setSlug:
|
|
1382
|
+
setSlug: U,
|
|
1383
1383
|
reset: w,
|
|
1384
1384
|
load: W,
|
|
1385
1385
|
setSearch: G,
|
|
@@ -1392,7 +1392,7 @@ const Q = ne("admin-auth", () => {
|
|
|
1392
1392
|
toggleAllOnPage: Et,
|
|
1393
1393
|
clearSelection: Rt,
|
|
1394
1394
|
isSelected: Ft,
|
|
1395
|
-
rowId:
|
|
1395
|
+
rowId: L
|
|
1396
1396
|
};
|
|
1397
1397
|
}), $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1398
1398
|
__proto__: null,
|
|
@@ -1475,7 +1475,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1475
1475
|
}, qa = {
|
|
1476
1476
|
key: 6,
|
|
1477
1477
|
class: "admin-resource-index__footer"
|
|
1478
|
-
}, Oa = /* @__PURE__ */
|
|
1478
|
+
}, Oa = /* @__PURE__ */ P({
|
|
1479
1479
|
__name: "ResourceIndexPage",
|
|
1480
1480
|
props: {
|
|
1481
1481
|
slug: {},
|
|
@@ -1497,7 +1497,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1497
1497
|
align: N.align ?? "left",
|
|
1498
1498
|
width: typeof N.width == "string" ? N.width : void 0
|
|
1499
1499
|
};
|
|
1500
|
-
}).filter((E) => E.key)),
|
|
1500
|
+
}).filter((E) => E.key)), _ = v(() => {
|
|
1501
1501
|
const A = u.value?.columns ?? [], E = {};
|
|
1502
1502
|
for (const N of A) {
|
|
1503
1503
|
const O = N, X = String(O.key ?? O.name ?? "");
|
|
@@ -1509,7 +1509,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1509
1509
|
return E;
|
|
1510
1510
|
});
|
|
1511
1511
|
function k(A, E) {
|
|
1512
|
-
const O = E?.row?.[A], X =
|
|
1512
|
+
const O = E?.row?.[A], X = _.value[A];
|
|
1513
1513
|
return Ca(O, X?.preset, X?.meta ?? {});
|
|
1514
1514
|
}
|
|
1515
1515
|
function x(A) {
|
|
@@ -1517,7 +1517,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1517
1517
|
}
|
|
1518
1518
|
const C = v(
|
|
1519
1519
|
() => a.search !== "" || Object.keys(a.filters).length > 0
|
|
1520
|
-
),
|
|
1520
|
+
), y = v(
|
|
1521
1521
|
() => !a.isEmpty || C.value
|
|
1522
1522
|
), g = v(() => {
|
|
1523
1523
|
const A = a.meta.total;
|
|
@@ -1535,7 +1535,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1535
1535
|
Re(async () => {
|
|
1536
1536
|
a.setSlug(n.slug), l.manifest === null && await l.load().catch(() => {
|
|
1537
1537
|
}), await F();
|
|
1538
|
-
}),
|
|
1538
|
+
}), Q(
|
|
1539
1539
|
() => n.slug,
|
|
1540
1540
|
async (A, E) => {
|
|
1541
1541
|
A !== E && (a.setSlug(A), await F());
|
|
@@ -1544,10 +1544,10 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1544
1544
|
async function q(A) {
|
|
1545
1545
|
await _e(), await a.setSort(A, a.sortDirection);
|
|
1546
1546
|
}
|
|
1547
|
-
async function
|
|
1547
|
+
async function L(A) {
|
|
1548
1548
|
await _e(), await a.setSort(a.sortKey, A);
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function U(A) {
|
|
1551
1551
|
a.selection = A;
|
|
1552
1552
|
}
|
|
1553
1553
|
async function w(A) {
|
|
@@ -1568,16 +1568,16 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1568
1568
|
d("div", Ta, [
|
|
1569
1569
|
d("h1", La, h(f.value), 1),
|
|
1570
1570
|
e.subtitle || g.value ? (o(), c("div", Pa, [
|
|
1571
|
-
e.subtitle ? (o(), c(
|
|
1571
|
+
e.subtitle ? (o(), c(M, { key: 0 }, [
|
|
1572
1572
|
S(h(e.subtitle), 1)
|
|
1573
|
-
], 64)) :
|
|
1574
|
-
e.subtitle && g.value ? (o(), c(
|
|
1573
|
+
], 64)) : T("", !0),
|
|
1574
|
+
e.subtitle && g.value ? (o(), c(M, { key: 1 }, [
|
|
1575
1575
|
S(" · ")
|
|
1576
|
-
], 64)) :
|
|
1577
|
-
g.value ? (o(), c(
|
|
1576
|
+
], 64)) : T("", !0),
|
|
1577
|
+
g.value ? (o(), c(M, { key: 2 }, [
|
|
1578
1578
|
S(h(g.value), 1)
|
|
1579
|
-
], 64)) :
|
|
1580
|
-
])) :
|
|
1579
|
+
], 64)) : T("", !0)
|
|
1580
|
+
])) : T("", !0)
|
|
1581
1581
|
]),
|
|
1582
1582
|
d("div", Ma, [
|
|
1583
1583
|
Y(A.$slots, "actions"),
|
|
@@ -1590,7 +1590,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1590
1590
|
S(h(e.createLabel), 1)
|
|
1591
1591
|
]),
|
|
1592
1592
|
_: 1
|
|
1593
|
-
})) :
|
|
1593
|
+
})) : T("", !0)
|
|
1594
1594
|
])
|
|
1595
1595
|
]),
|
|
1596
1596
|
r(a).hasSelection ? (o(), c("div", Na, [
|
|
@@ -1650,7 +1650,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1650
1650
|
])]),
|
|
1651
1651
|
_: 1
|
|
1652
1652
|
}, 8, ["onClick"])
|
|
1653
|
-
])) :
|
|
1653
|
+
])) : y.value ? (o(), c("div", Ia, [
|
|
1654
1654
|
d("input", {
|
|
1655
1655
|
value: r(a).search,
|
|
1656
1656
|
type: "search",
|
|
@@ -1673,13 +1673,13 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1673
1673
|
S(" Сброс ", -1)
|
|
1674
1674
|
])]),
|
|
1675
1675
|
_: 1
|
|
1676
|
-
}, 8, ["onClick"])) :
|
|
1677
|
-
])) :
|
|
1676
|
+
}, 8, ["onClick"])) : T("", !0)
|
|
1677
|
+
])) : T("", !0),
|
|
1678
1678
|
r(a).loading && r(a).items.length === 0 ? (o(), c("div", Va, [
|
|
1679
|
-
r(a).slowLoading ? (o(), c(
|
|
1679
|
+
r(a).slowLoading ? (o(), c(M, { key: 0 }, D(8, (N) => $(r(We), {
|
|
1680
1680
|
key: N,
|
|
1681
1681
|
height: "40px"
|
|
1682
|
-
})), 64)) :
|
|
1682
|
+
})), 64)) : T("", !0)
|
|
1683
1683
|
])) : r(a).hasError ? (o(), b(r(Gt), {
|
|
1684
1684
|
key: 3,
|
|
1685
1685
|
title: "Не удалось загрузить данные",
|
|
@@ -1714,7 +1714,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1714
1714
|
S(h(e.createLabel), 1)
|
|
1715
1715
|
]),
|
|
1716
1716
|
_: 1
|
|
1717
|
-
})) :
|
|
1717
|
+
})) : T("", !0)
|
|
1718
1718
|
]),
|
|
1719
1719
|
_: 1
|
|
1720
1720
|
})) : (o(), c("div", za, [
|
|
@@ -1727,8 +1727,8 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1727
1727
|
selection: r(a).selection,
|
|
1728
1728
|
"row-key": (N) => r(a).rowId(N),
|
|
1729
1729
|
"onUpdate:sortKey": q,
|
|
1730
|
-
"onUpdate:sortDirection":
|
|
1731
|
-
"onUpdate:selection":
|
|
1730
|
+
"onUpdate:sortDirection": L,
|
|
1731
|
+
"onUpdate:selection": U,
|
|
1732
1732
|
onRowClick: V
|
|
1733
1733
|
}, qe({ _: 2 }, [
|
|
1734
1734
|
D(p.value, (N) => ({
|
|
@@ -1750,11 +1750,11 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1750
1750
|
"per-page": r(a).meta.per_page,
|
|
1751
1751
|
"onUpdate:modelValue": w
|
|
1752
1752
|
}, null, 8, ["model-value", "total", "per-page"])
|
|
1753
|
-
])) :
|
|
1753
|
+
])) : T("", !0)
|
|
1754
1754
|
]));
|
|
1755
1755
|
}
|
|
1756
1756
|
}), $t = ne("admin-resource-form", () => {
|
|
1757
|
-
const e = R(null), t = R("create"), n = R(null), s = R({}), a = R({}), l = R({}), i = R(!1), u = R(!1), f = R(!1), p = R(null),
|
|
1757
|
+
const e = R(null), t = R("create"), n = R(null), s = R({}), a = R({}), l = R({}), i = R(!1), u = R(!1), f = R(!1), p = R(null), _ = v(() => t.value === "create"), k = v(() => t.value === "edit"), x = v(() => t.value === "view"), C = v(() => p.value !== null), y = v(() => {
|
|
1758
1758
|
const A = s.value, E = a.value, N = /* @__PURE__ */ new Set([...Object.keys(A), ...Object.keys(E)]);
|
|
1759
1759
|
for (const O of N)
|
|
1760
1760
|
if (!Object.is(A[O], E[O]))
|
|
@@ -1774,7 +1774,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1774
1774
|
function q(A, E = {}) {
|
|
1775
1775
|
e.value = A, t.value = "create", n.value = null, g(s.value, E), g(a.value, E), l.value = {}, p.value = null;
|
|
1776
1776
|
}
|
|
1777
|
-
async function
|
|
1777
|
+
async function L(A, E, N = "edit") {
|
|
1778
1778
|
e.value = A, t.value = N, n.value = E, i.value = !0, p.value = null, l.value = {};
|
|
1779
1779
|
try {
|
|
1780
1780
|
const X = await H().get(`/${A}/read`, {
|
|
@@ -1787,7 +1787,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1787
1787
|
i.value = !1;
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function U(A, E) {
|
|
1791
1791
|
if (s.value[A] = E, l.value[A]) {
|
|
1792
1792
|
const N = { ...l.value };
|
|
1793
1793
|
delete N[A], l.value = N;
|
|
@@ -1840,16 +1840,16 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
|
|
|
1840
1840
|
deleting: f,
|
|
1841
1841
|
error: p,
|
|
1842
1842
|
// getters
|
|
1843
|
-
isCreate:
|
|
1843
|
+
isCreate: _,
|
|
1844
1844
|
isEdit: k,
|
|
1845
1845
|
isView: x,
|
|
1846
|
-
isDirty:
|
|
1846
|
+
isDirty: y,
|
|
1847
1847
|
hasError: C,
|
|
1848
1848
|
// actions
|
|
1849
1849
|
reset: F,
|
|
1850
1850
|
prepareCreate: q,
|
|
1851
|
-
load:
|
|
1852
|
-
setField:
|
|
1851
|
+
load: L,
|
|
1852
|
+
setField: U,
|
|
1853
1853
|
setErrors: w,
|
|
1854
1854
|
clearErrors: V,
|
|
1855
1855
|
save: W,
|
|
@@ -1887,7 +1887,7 @@ function so() {
|
|
|
1887
1887
|
function Wa(e) {
|
|
1888
1888
|
e.fields && me.registerBundle(e.fields), e.layouts && fe.registerBundle(e.layouts);
|
|
1889
1889
|
}
|
|
1890
|
-
const St = /* @__PURE__ */
|
|
1890
|
+
const St = /* @__PURE__ */ P({
|
|
1891
1891
|
__name: "UnknownField",
|
|
1892
1892
|
props: {
|
|
1893
1893
|
type: {},
|
|
@@ -1899,17 +1899,17 @@ const St = /* @__PURE__ */ L({
|
|
|
1899
1899
|
S("Неизвестный тип поля: " + h(e.type), 1)
|
|
1900
1900
|
]),
|
|
1901
1901
|
default: m(() => [
|
|
1902
|
-
e.name ? (o(), c(
|
|
1902
|
+
e.name ? (o(), c(M, { key: 0 }, [
|
|
1903
1903
|
d("code", null, h(e.name), 1),
|
|
1904
1904
|
n[0] || (n[0] = S(" — зарегистрируйте field-компонент через ", -1)),
|
|
1905
1905
|
d("code", null, "registerField('" + h(e.type) + "', YourComponent)", 1),
|
|
1906
1906
|
n[1] || (n[1] = S(". ", -1))
|
|
1907
|
-
], 64)) :
|
|
1907
|
+
], 64)) : T("", !0)
|
|
1908
1908
|
]),
|
|
1909
1909
|
_: 1
|
|
1910
1910
|
}));
|
|
1911
1911
|
}
|
|
1912
|
-
}), Ct = /* @__PURE__ */
|
|
1912
|
+
}), Ct = /* @__PURE__ */ P({
|
|
1913
1913
|
__name: "FieldRenderer",
|
|
1914
1914
|
props: {
|
|
1915
1915
|
node: {}
|
|
@@ -1925,7 +1925,7 @@ const St = /* @__PURE__ */ L({
|
|
|
1925
1925
|
name: e.node.name
|
|
1926
1926
|
}, null, 8, ["type", "name"]));
|
|
1927
1927
|
}
|
|
1928
|
-
}), we = /* @__PURE__ */
|
|
1928
|
+
}), we = /* @__PURE__ */ P({
|
|
1929
1929
|
__name: "LayoutRenderer",
|
|
1930
1930
|
props: {
|
|
1931
1931
|
node: {}
|
|
@@ -1959,7 +1959,7 @@ const St = /* @__PURE__ */ L({
|
|
|
1959
1959
|
}, Ja = {
|
|
1960
1960
|
key: 3,
|
|
1961
1961
|
class: "admin-resource-form__savebar"
|
|
1962
|
-
}, lt = /* @__PURE__ */
|
|
1962
|
+
}, lt = /* @__PURE__ */ P({
|
|
1963
1963
|
__name: "ResourceFormPage",
|
|
1964
1964
|
props: {
|
|
1965
1965
|
slug: {},
|
|
@@ -1968,18 +1968,18 @@ const St = /* @__PURE__ */ L({
|
|
|
1968
1968
|
},
|
|
1969
1969
|
setup(e) {
|
|
1970
1970
|
const t = e, n = $t(), s = oe(), a = ie(), l = ht(n.state, n.errors);
|
|
1971
|
-
|
|
1971
|
+
Q(
|
|
1972
1972
|
() => n.errors,
|
|
1973
|
-
(
|
|
1974
|
-
l.setErrors({ ...
|
|
1973
|
+
(y) => {
|
|
1974
|
+
l.setErrors({ ...y });
|
|
1975
1975
|
}
|
|
1976
1976
|
);
|
|
1977
1977
|
const i = v(() => s.getResource(t.slug)), u = v(
|
|
1978
1978
|
() => i.value?.fields ?? []
|
|
1979
1979
|
), f = v(() => n.isCreate ? `Создать: ${i.value?.label ?? t.slug}` : `${i.value?.label ?? t.slug}: запись #${t.id}`), p = v(() => {
|
|
1980
|
-
const
|
|
1981
|
-
return typeof
|
|
1982
|
-
}),
|
|
1980
|
+
const y = n.state.status;
|
|
1981
|
+
return typeof y == "string" ? y : null;
|
|
1982
|
+
}), _ = v(() => {
|
|
1983
1983
|
switch (p.value) {
|
|
1984
1984
|
case "published":
|
|
1985
1985
|
return "success";
|
|
@@ -1996,19 +1996,19 @@ const St = /* @__PURE__ */ L({
|
|
|
1996
1996
|
s.manifest === null && await s.load().catch(() => {
|
|
1997
1997
|
}), t.id !== null && t.id !== void 0 ? await n.load(t.slug, t.id, "edit").catch(() => {
|
|
1998
1998
|
}) : n.prepareCreate(t.slug);
|
|
1999
|
-
}),
|
|
1999
|
+
}), Q(
|
|
2000
2000
|
() => [t.slug, t.id],
|
|
2001
|
-
async ([
|
|
2002
|
-
g != null ? await n.load(
|
|
2003
|
-
}) : n.prepareCreate(
|
|
2001
|
+
async ([y, g]) => {
|
|
2002
|
+
g != null ? await n.load(y, g, "edit").catch(() => {
|
|
2003
|
+
}) : n.prepareCreate(y);
|
|
2004
2004
|
}
|
|
2005
2005
|
);
|
|
2006
2006
|
async function k() {
|
|
2007
2007
|
try {
|
|
2008
|
-
const
|
|
2008
|
+
const y = await n.save();
|
|
2009
2009
|
n.isCreate && a.push({
|
|
2010
2010
|
name: `admin.resource.${t.slug}.edit`,
|
|
2011
|
-
params: { id:
|
|
2011
|
+
params: { id: y }
|
|
2012
2012
|
}).catch(() => {
|
|
2013
2013
|
});
|
|
2014
2014
|
} catch {
|
|
@@ -2023,7 +2023,7 @@ const St = /* @__PURE__ */ L({
|
|
|
2023
2023
|
n.isDirty && !confirm("Несохранённые изменения будут потеряны. Продолжить?") || a.push({ name: t.indexRouteName }).catch(() => {
|
|
2024
2024
|
});
|
|
2025
2025
|
}
|
|
2026
|
-
return (
|
|
2026
|
+
return (y, g) => (o(), c("section", ja, [
|
|
2027
2027
|
d("header", Ka, [
|
|
2028
2028
|
d("div", Ga, [
|
|
2029
2029
|
d("a", {
|
|
@@ -2033,13 +2033,13 @@ const St = /* @__PURE__ */ L({
|
|
|
2033
2033
|
d("h1", Ha, h(f.value), 1),
|
|
2034
2034
|
p.value ? (o(), b(r(Ke), {
|
|
2035
2035
|
key: 0,
|
|
2036
|
-
variant:
|
|
2036
|
+
variant: _.value
|
|
2037
2037
|
}, {
|
|
2038
2038
|
default: m(() => [
|
|
2039
2039
|
S(h(p.value), 1)
|
|
2040
2040
|
]),
|
|
2041
2041
|
_: 1
|
|
2042
|
-
}, 8, ["variant"])) :
|
|
2042
|
+
}, 8, ["variant"])) : T("", !0)
|
|
2043
2043
|
]),
|
|
2044
2044
|
d("div", Xa, [
|
|
2045
2045
|
$(r(z), {
|
|
@@ -2063,7 +2063,7 @@ const St = /* @__PURE__ */ L({
|
|
|
2063
2063
|
S(" Удалить ", -1)
|
|
2064
2064
|
])]),
|
|
2065
2065
|
_: 1
|
|
2066
|
-
}, 8, ["disabled", "loading"])) :
|
|
2066
|
+
}, 8, ["disabled", "loading"])) : T("", !0),
|
|
2067
2067
|
$(r(z), {
|
|
2068
2068
|
variant: "primary",
|
|
2069
2069
|
disabled: r(n).saving || r(n).loading,
|
|
@@ -2087,9 +2087,9 @@ const St = /* @__PURE__ */ L({
|
|
|
2087
2087
|
S(h(r(n).error?.message ?? "Не удалось сохранить запись"), 1)
|
|
2088
2088
|
]),
|
|
2089
2089
|
_: 1
|
|
2090
|
-
})) :
|
|
2090
|
+
})) : T("", !0),
|
|
2091
2091
|
r(n).loading ? (o(), c("div", Ya, [
|
|
2092
|
-
(o(), c(
|
|
2092
|
+
(o(), c(M, null, D(6, (F) => $(r(We), {
|
|
2093
2093
|
key: F,
|
|
2094
2094
|
height: "40px"
|
|
2095
2095
|
})), 64))
|
|
@@ -2099,7 +2099,7 @@ const St = /* @__PURE__ */ L({
|
|
|
2099
2099
|
class: "admin-resource-form__body"
|
|
2100
2100
|
}, {
|
|
2101
2101
|
default: m(() => [
|
|
2102
|
-
(o(!0), c(
|
|
2102
|
+
(o(!0), c(M, null, D(u.value, (F, q) => (o(), b(we, {
|
|
2103
2103
|
key: q,
|
|
2104
2104
|
node: F
|
|
2105
2105
|
}, null, 8, ["node"]))), 128))
|
|
@@ -2130,10 +2130,10 @@ const St = /* @__PURE__ */ L({
|
|
|
2130
2130
|
])]),
|
|
2131
2131
|
_: 1
|
|
2132
2132
|
}, 8, ["loading", "disabled"])
|
|
2133
|
-
])) :
|
|
2133
|
+
])) : T("", !0)
|
|
2134
2134
|
]));
|
|
2135
2135
|
}
|
|
2136
|
-
}), ve = Me(), io = ve.register, st = ve.get, oo = ve.has, ro = ve.list, uo = ve.clear, Qa = ve.registerBundle, Za = /* @__PURE__ */
|
|
2136
|
+
}), ve = Me(), io = ve.register, st = ve.get, oo = ve.has, ro = ve.list, uo = ve.clear, Qa = ve.registerBundle, Za = /* @__PURE__ */ P({
|
|
2137
2137
|
__name: "UnknownEntry",
|
|
2138
2138
|
props: {
|
|
2139
2139
|
type: {},
|
|
@@ -2176,7 +2176,7 @@ const St = /* @__PURE__ */ L({
|
|
|
2176
2176
|
}, rl = {
|
|
2177
2177
|
class: "admin-infolist-tabs__list",
|
|
2178
2178
|
role: "tablist"
|
|
2179
|
-
}, ul = { class: "admin-infolist-tabs__panel" }, dl = /* @__PURE__ */
|
|
2179
|
+
}, ul = { class: "admin-infolist-tabs__panel" }, dl = /* @__PURE__ */ P({
|
|
2180
2180
|
__name: "InfolistRenderer",
|
|
2181
2181
|
props: {
|
|
2182
2182
|
node: {}
|
|
@@ -2191,29 +2191,29 @@ const St = /* @__PURE__ */ L({
|
|
|
2191
2191
|
return n.has(t.node.type) ? { kind: "layout", layoutType: t.node.type } : { kind: "unknown" };
|
|
2192
2192
|
if (n.has(t.node.type))
|
|
2193
2193
|
return { kind: "layout", layoutType: t.node.type };
|
|
2194
|
-
const
|
|
2195
|
-
return
|
|
2194
|
+
const _ = st(t.node.type);
|
|
2195
|
+
return _ ? { kind: "entry", component: _ } : { kind: "unknown" };
|
|
2196
2196
|
}), a = v(() => {
|
|
2197
|
-
const { type:
|
|
2197
|
+
const { type: _, kind: k, items: x, ...C } = t.node;
|
|
2198
2198
|
return C;
|
|
2199
2199
|
}), l = v(
|
|
2200
2200
|
() => t.node.items ?? []
|
|
2201
2201
|
), i = v(() => t.node.title ?? null), u = v(
|
|
2202
2202
|
() => t.node.description ?? null
|
|
2203
2203
|
), f = v(() => {
|
|
2204
|
-
const
|
|
2205
|
-
return typeof
|
|
2204
|
+
const _ = t.node.active;
|
|
2205
|
+
return typeof _ == "number" ? _ : 0;
|
|
2206
2206
|
}), p = v(() => t.node.items ?? []);
|
|
2207
|
-
return (
|
|
2207
|
+
return (_, k) => {
|
|
2208
2208
|
const x = rt("InfolistRenderer", !0);
|
|
2209
2209
|
return s.value.kind === "entry" ? (o(), b(se(s.value.component), Fe(Ue({ key: 0 }, a.value)), null, 16)) : s.value.kind === "layout" && s.value.layoutType === "rows" ? (o(), c("div", el, [
|
|
2210
|
-
(o(!0), c(
|
|
2211
|
-
key:
|
|
2210
|
+
(o(!0), c(M, null, D(l.value, (C, y) => (o(), b(x, {
|
|
2211
|
+
key: y,
|
|
2212
2212
|
node: C
|
|
2213
2213
|
}, null, 8, ["node"]))), 128))
|
|
2214
2214
|
])) : s.value.kind === "layout" && s.value.layoutType === "columns" ? (o(), c("div", tl, [
|
|
2215
|
-
(o(!0), c(
|
|
2216
|
-
key:
|
|
2215
|
+
(o(!0), c(M, null, D(l.value, (C, y) => (o(), c("div", {
|
|
2216
|
+
key: y,
|
|
2217
2217
|
class: "admin-infolist-cols__item",
|
|
2218
2218
|
style: Te({
|
|
2219
2219
|
gridColumn: `span ${typeof C.span == "number" ? C.span : Math.max(1, Math.floor(12 / l.value.length))}`
|
|
@@ -2223,28 +2223,28 @@ const St = /* @__PURE__ */ L({
|
|
|
2223
2223
|
], 4))), 128))
|
|
2224
2224
|
])) : s.value.kind === "layout" && (s.value.layoutType === "section" || s.value.layoutType === "block") ? (o(), c("section", nl, [
|
|
2225
2225
|
i.value || u.value ? (o(), c("header", al, [
|
|
2226
|
-
i.value ? (o(), c("h3", ll, h(i.value), 1)) :
|
|
2227
|
-
u.value ? (o(), c("p", sl, h(u.value), 1)) :
|
|
2228
|
-
])) :
|
|
2226
|
+
i.value ? (o(), c("h3", ll, h(i.value), 1)) : T("", !0),
|
|
2227
|
+
u.value ? (o(), c("p", sl, h(u.value), 1)) : T("", !0)
|
|
2228
|
+
])) : T("", !0),
|
|
2229
2229
|
d("div", il, [
|
|
2230
|
-
(o(!0), c(
|
|
2231
|
-
key:
|
|
2230
|
+
(o(!0), c(M, null, D(l.value, (C, y) => (o(), b(x, {
|
|
2231
|
+
key: y,
|
|
2232
2232
|
node: C
|
|
2233
2233
|
}, null, 8, ["node"]))), 128))
|
|
2234
2234
|
])
|
|
2235
2235
|
])) : s.value.kind === "layout" && s.value.layoutType === "tabs" ? (o(), c("div", ol, [
|
|
2236
2236
|
d("ul", rl, [
|
|
2237
|
-
(o(!0), c(
|
|
2238
|
-
key: C.key ??
|
|
2239
|
-
class:
|
|
2237
|
+
(o(!0), c(M, null, D(p.value, (C, y) => (o(), c("li", {
|
|
2238
|
+
key: C.key ?? y,
|
|
2239
|
+
class: ee([
|
|
2240
2240
|
"admin-infolist-tabs__tab",
|
|
2241
|
-
{ "admin-infolist-tabs__tab--active":
|
|
2241
|
+
{ "admin-infolist-tabs__tab--active": y === f.value }
|
|
2242
2242
|
])
|
|
2243
2243
|
}, h(C.label), 3))), 128))
|
|
2244
2244
|
]),
|
|
2245
2245
|
d("div", ul, [
|
|
2246
|
-
(o(!0), c(
|
|
2247
|
-
key:
|
|
2246
|
+
(o(!0), c(M, null, D(p.value[f.value]?.items ?? [], (C, y) => (o(), b(x, {
|
|
2247
|
+
key: y,
|
|
2248
2248
|
node: C
|
|
2249
2249
|
}, null, 8, ["node"]))), 128))
|
|
2250
2250
|
])
|
|
@@ -2271,7 +2271,7 @@ function Ne() {
|
|
|
2271
2271
|
const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-page__hd" }, vl = { class: "admin-page__title-wrap" }, pl = { class: "admin-page__title" }, gl = { class: "admin-page__actions" }, hl = {
|
|
2272
2272
|
key: 1,
|
|
2273
2273
|
class: "admin-resource-view__loading"
|
|
2274
|
-
}, _l = /* @__PURE__ */
|
|
2274
|
+
}, _l = /* @__PURE__ */ P({
|
|
2275
2275
|
__name: "ResourceViewPage",
|
|
2276
2276
|
props: {
|
|
2277
2277
|
slug: {},
|
|
@@ -2291,10 +2291,10 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2291
2291
|
s.manifest === null && await s.load().catch(() => {
|
|
2292
2292
|
}), await n.load(t.slug, t.id, "view").catch(() => {
|
|
2293
2293
|
});
|
|
2294
|
-
}),
|
|
2294
|
+
}), Q(
|
|
2295
2295
|
() => [t.slug, t.id],
|
|
2296
|
-
async ([
|
|
2297
|
-
await n.load(
|
|
2296
|
+
async ([_, k]) => {
|
|
2297
|
+
await n.load(_, k, "view").catch(() => {
|
|
2298
2298
|
});
|
|
2299
2299
|
}
|
|
2300
2300
|
);
|
|
@@ -2312,7 +2312,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2312
2312
|
}), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
|
|
2313
2313
|
}));
|
|
2314
2314
|
}
|
|
2315
|
-
return (
|
|
2315
|
+
return (_, k) => (o(), c("section", ml, [
|
|
2316
2316
|
d("header", fl, [
|
|
2317
2317
|
d("div", vl, [
|
|
2318
2318
|
d("h1", pl, h(u.value), 1)
|
|
@@ -2350,9 +2350,9 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2350
2350
|
S(h(r(n).error?.message ?? "Не удалось загрузить запись"), 1)
|
|
2351
2351
|
]),
|
|
2352
2352
|
_: 1
|
|
2353
|
-
})) :
|
|
2353
|
+
})) : T("", !0),
|
|
2354
2354
|
r(n).loading ? (o(), c("div", hl, [
|
|
2355
|
-
(o(), c(
|
|
2355
|
+
(o(), c(M, null, D(8, (x) => $(r(We), {
|
|
2356
2356
|
key: x,
|
|
2357
2357
|
height: "24px"
|
|
2358
2358
|
})), 64))
|
|
@@ -2362,7 +2362,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2362
2362
|
class: "admin-resource-view__body"
|
|
2363
2363
|
}, {
|
|
2364
2364
|
default: m(() => [
|
|
2365
|
-
(o(!0), c(
|
|
2365
|
+
(o(!0), c(M, null, D(i.value, (x, C) => (o(), b(dl, {
|
|
2366
2366
|
key: C,
|
|
2367
2367
|
node: x
|
|
2368
2368
|
}, null, 8, ["node"]))), 128))
|
|
@@ -2380,7 +2380,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2380
2380
|
}, Bl = {
|
|
2381
2381
|
key: 1,
|
|
2382
2382
|
class: "admin-profile__hint"
|
|
2383
|
-
}, Il = { class: "admin-profile__card-ft" }, Dl = { class: "admin-profile__hint" }, Vl = /* @__PURE__ */
|
|
2383
|
+
}, Il = { class: "admin-profile__card-ft" }, Dl = { class: "admin-profile__hint" }, Vl = /* @__PURE__ */ P({
|
|
2384
2384
|
__name: "ProfilePage",
|
|
2385
2385
|
props: {
|
|
2386
2386
|
title: { default: "Profile" },
|
|
@@ -2389,29 +2389,42 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2389
2389
|
},
|
|
2390
2390
|
emits: ["update:section", "avatar-replace", "two-factor-disable", "two-factor-regenerate", "save"],
|
|
2391
2391
|
setup(e, { emit: t }) {
|
|
2392
|
-
const n = e, s = t, a =
|
|
2392
|
+
const n = e, s = t, a = Z(), l = Ge(), i = He(), u = [
|
|
2393
2393
|
{ id: "general", label: "Основное", icon: "user" },
|
|
2394
2394
|
{ id: "security", label: "Безопасность", icon: "shield" },
|
|
2395
2395
|
{ id: "tokens", label: "API токены", icon: "key" },
|
|
2396
2396
|
{ id: "sessions", label: "Сессии", icon: "monitor" }
|
|
2397
2397
|
], f = R(n.section);
|
|
2398
|
-
function p(
|
|
2399
|
-
f.value =
|
|
2398
|
+
function p(L) {
|
|
2399
|
+
f.value = L, s("update:section", L);
|
|
2400
2400
|
}
|
|
2401
|
-
const
|
|
2401
|
+
const _ = R({
|
|
2402
2402
|
name: a.user?.name ?? "",
|
|
2403
2403
|
email: a.user?.email ?? "",
|
|
2404
2404
|
locale: i.current,
|
|
2405
2405
|
theme: l.current
|
|
2406
2406
|
}), k = v(
|
|
2407
|
-
() => i.available.map((
|
|
2407
|
+
() => i.available.map((L) => ({ value: L, label: L.toUpperCase() }))
|
|
2408
2408
|
), x = v(
|
|
2409
|
-
() => l.available.map((
|
|
2409
|
+
() => l.available.map((L) => ({ value: L, label: L === "dark" ? "Тёмная" : L === "light" ? "Светлая" : L }))
|
|
2410
|
+
);
|
|
2411
|
+
Q(
|
|
2412
|
+
() => _.value.locale,
|
|
2413
|
+
(L, U) => {
|
|
2414
|
+
L === U || !L || i.setLocale(L).catch(() => {
|
|
2415
|
+
});
|
|
2416
|
+
}
|
|
2417
|
+
), Q(
|
|
2418
|
+
() => _.value.theme,
|
|
2419
|
+
(L, U) => {
|
|
2420
|
+
L === U || !L || l.setTheme(L).catch(() => {
|
|
2421
|
+
});
|
|
2422
|
+
}
|
|
2410
2423
|
);
|
|
2411
2424
|
function C() {
|
|
2412
|
-
s("save", { ...
|
|
2425
|
+
s("save", { ..._.value });
|
|
2413
2426
|
}
|
|
2414
|
-
function
|
|
2427
|
+
function y() {
|
|
2415
2428
|
s("avatar-replace");
|
|
2416
2429
|
}
|
|
2417
2430
|
function g() {
|
|
@@ -2421,7 +2434,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2421
2434
|
s("two-factor-regenerate");
|
|
2422
2435
|
}
|
|
2423
2436
|
const q = v(() => !!a.user?.twoFactorEnabled);
|
|
2424
|
-
return (
|
|
2437
|
+
return (L, U) => (o(), c("section", yl, [
|
|
2425
2438
|
d("header", bl, [
|
|
2426
2439
|
d("div", kl, [
|
|
2427
2440
|
d("h1", wl, h(e.title), 1),
|
|
@@ -2430,10 +2443,10 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2430
2443
|
]),
|
|
2431
2444
|
d("div", xl, [
|
|
2432
2445
|
d("nav", Sl, [
|
|
2433
|
-
(o(), c(
|
|
2446
|
+
(o(), c(M, null, D(u, (w) => d("button", {
|
|
2434
2447
|
key: w.id,
|
|
2435
2448
|
type: "button",
|
|
2436
|
-
class:
|
|
2449
|
+
class: ee([
|
|
2437
2450
|
"admin-profile__nav-item",
|
|
2438
2451
|
{ "admin-profile__nav-item--active": f.value === w.id }
|
|
2439
2452
|
]),
|
|
@@ -2452,7 +2465,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2452
2465
|
padding: "md"
|
|
2453
2466
|
}, {
|
|
2454
2467
|
default: m(() => [
|
|
2455
|
-
|
|
2468
|
+
U[7] || (U[7] = d("header", { class: "admin-profile__card-hd" }, [
|
|
2456
2469
|
d("h3", { class: "admin-profile__card-title" }, "Профиль")
|
|
2457
2470
|
], -1)),
|
|
2458
2471
|
d("div", Rl, [
|
|
@@ -2465,13 +2478,13 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2465
2478
|
d("div", Ul, h(r(a).user?.name ?? "—"), 1),
|
|
2466
2479
|
d("div", Tl, h(r(a).user?.email ?? "—"), 1)
|
|
2467
2480
|
]),
|
|
2468
|
-
|
|
2481
|
+
U[5] || (U[5] = d("div", { style: { flex: "1" } }, null, -1)),
|
|
2469
2482
|
$(r(z), {
|
|
2470
2483
|
variant: "ghost",
|
|
2471
2484
|
size: "sm",
|
|
2472
|
-
onClick:
|
|
2485
|
+
onClick: y
|
|
2473
2486
|
}, {
|
|
2474
|
-
default: m(() => [...
|
|
2487
|
+
default: m(() => [...U[4] || (U[4] = [
|
|
2475
2488
|
S(" Заменить ", -1)
|
|
2476
2489
|
])]),
|
|
2477
2490
|
_: 1
|
|
@@ -2479,27 +2492,27 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2479
2492
|
]),
|
|
2480
2493
|
d("div", Ll, [
|
|
2481
2494
|
$(r(de), {
|
|
2482
|
-
modelValue:
|
|
2483
|
-
"onUpdate:modelValue":
|
|
2495
|
+
modelValue: _.value.name,
|
|
2496
|
+
"onUpdate:modelValue": U[0] || (U[0] = (w) => _.value.name = w),
|
|
2484
2497
|
label: "Имя",
|
|
2485
2498
|
name: "name"
|
|
2486
2499
|
}, null, 8, ["modelValue"]),
|
|
2487
2500
|
$(r(de), {
|
|
2488
|
-
modelValue:
|
|
2489
|
-
"onUpdate:modelValue":
|
|
2501
|
+
modelValue: _.value.email,
|
|
2502
|
+
"onUpdate:modelValue": U[1] || (U[1] = (w) => _.value.email = w),
|
|
2490
2503
|
label: "Email",
|
|
2491
2504
|
type: "email",
|
|
2492
2505
|
name: "email"
|
|
2493
2506
|
}, null, 8, ["modelValue"]),
|
|
2494
2507
|
$(r(Ee), {
|
|
2495
|
-
modelValue:
|
|
2496
|
-
"onUpdate:modelValue":
|
|
2508
|
+
modelValue: _.value.locale,
|
|
2509
|
+
"onUpdate:modelValue": U[2] || (U[2] = (w) => _.value.locale = w),
|
|
2497
2510
|
options: k.value,
|
|
2498
2511
|
label: "Язык"
|
|
2499
2512
|
}, null, 8, ["modelValue", "options"]),
|
|
2500
2513
|
$(r(Ee), {
|
|
2501
|
-
modelValue:
|
|
2502
|
-
"onUpdate:modelValue":
|
|
2514
|
+
modelValue: _.value.theme,
|
|
2515
|
+
"onUpdate:modelValue": U[3] || (U[3] = (w) => _.value.theme = w),
|
|
2503
2516
|
options: x.value,
|
|
2504
2517
|
label: "Тема"
|
|
2505
2518
|
}, null, 8, ["modelValue", "options"])
|
|
@@ -2509,7 +2522,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2509
2522
|
variant: "primary",
|
|
2510
2523
|
onClick: C
|
|
2511
2524
|
}, {
|
|
2512
|
-
default: m(() => [...
|
|
2525
|
+
default: m(() => [...U[6] || (U[6] = [
|
|
2513
2526
|
S("Сохранить", -1)
|
|
2514
2527
|
])]),
|
|
2515
2528
|
_: 1
|
|
@@ -2523,7 +2536,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2523
2536
|
}, {
|
|
2524
2537
|
default: m(() => [
|
|
2525
2538
|
d("header", Ml, [
|
|
2526
|
-
|
|
2539
|
+
U[8] || (U[8] = d("h3", { class: "admin-profile__card-title" }, "Двухфакторная аутентификация", -1)),
|
|
2527
2540
|
$(r(Ke), {
|
|
2528
2541
|
variant: q.value ? "success" : "default"
|
|
2529
2542
|
}, {
|
|
@@ -2535,13 +2548,13 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2535
2548
|
]),
|
|
2536
2549
|
q.value ? (o(), c("p", Nl, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (o(), c("p", Bl, " Включите 2FA для дополнительной защиты аккаунта. ")),
|
|
2537
2550
|
d("footer", Il, [
|
|
2538
|
-
q.value ? (o(), c(
|
|
2551
|
+
q.value ? (o(), c(M, { key: 0 }, [
|
|
2539
2552
|
$(r(z), {
|
|
2540
2553
|
variant: "ghost",
|
|
2541
2554
|
size: "sm",
|
|
2542
2555
|
onClick: F
|
|
2543
2556
|
}, {
|
|
2544
|
-
default: m(() => [...
|
|
2557
|
+
default: m(() => [...U[9] || (U[9] = [
|
|
2545
2558
|
S(" Перегенерировать коды ", -1)
|
|
2546
2559
|
])]),
|
|
2547
2560
|
_: 1
|
|
@@ -2551,17 +2564,17 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2551
2564
|
size: "sm",
|
|
2552
2565
|
onClick: g
|
|
2553
2566
|
}, {
|
|
2554
|
-
default: m(() => [...
|
|
2567
|
+
default: m(() => [...U[10] || (U[10] = [
|
|
2555
2568
|
S(" Отключить 2FA ", -1)
|
|
2556
2569
|
])]),
|
|
2557
2570
|
_: 1
|
|
2558
2571
|
})
|
|
2559
|
-
], 64)) : Y(
|
|
2572
|
+
], 64)) : Y(L.$slots, "enable-2fa", { key: 1 }, () => [
|
|
2560
2573
|
$(r(z), {
|
|
2561
2574
|
variant: "primary",
|
|
2562
2575
|
disabled: ""
|
|
2563
2576
|
}, {
|
|
2564
|
-
default: m(() => [...
|
|
2577
|
+
default: m(() => [...U[11] || (U[11] = [
|
|
2565
2578
|
S(" Включить 2FA (host customize) ", -1)
|
|
2566
2579
|
])]),
|
|
2567
2580
|
_: 1
|
|
@@ -2570,7 +2583,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2570
2583
|
])
|
|
2571
2584
|
]),
|
|
2572
2585
|
_: 3
|
|
2573
|
-
})) : Y(
|
|
2586
|
+
})) : Y(L.$slots, f.value, {
|
|
2574
2587
|
key: 2,
|
|
2575
2588
|
section: f.value
|
|
2576
2589
|
}, () => [
|
|
@@ -2585,7 +2598,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2585
2598
|
])
|
|
2586
2599
|
]));
|
|
2587
2600
|
}
|
|
2588
|
-
}), pe = Me(), mo = pe.register, zl = pe.get, fo = pe.has, vo = pe.list, po = pe.clear, ql = pe.registerBundle, Ol = /* @__PURE__ */
|
|
2601
|
+
}), pe = Me(), mo = pe.register, zl = pe.get, fo = pe.has, vo = pe.list, po = pe.clear, ql = pe.registerBundle, Ol = /* @__PURE__ */ P({
|
|
2589
2602
|
__name: "UnknownWidget",
|
|
2590
2603
|
props: {
|
|
2591
2604
|
type: {}
|
|
@@ -2603,7 +2616,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2603
2616
|
_: 1
|
|
2604
2617
|
}));
|
|
2605
2618
|
}
|
|
2606
|
-
}), Wl = /* @__PURE__ */
|
|
2619
|
+
}), Wl = /* @__PURE__ */ P({
|
|
2607
2620
|
__name: "WidgetRenderer",
|
|
2608
2621
|
props: {
|
|
2609
2622
|
node: {}
|
|
@@ -2621,7 +2634,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2621
2634
|
}), jl = { class: "admin-page admin-dashboard" }, Kl = { class: "admin-page__hd" }, Gl = { class: "admin-page__title-wrap" }, Hl = { class: "admin-page__title" }, Xl = {
|
|
2622
2635
|
key: 0,
|
|
2623
2636
|
class: "admin-page__count"
|
|
2624
|
-
}, Yl = { class: "admin-page__actions" }, Jl = { class: "admin-dashboard__grid" }, Ql = /* @__PURE__ */
|
|
2637
|
+
}, Yl = { class: "admin-page__actions" }, Jl = { class: "admin-dashboard__grid" }, Ql = /* @__PURE__ */ P({
|
|
2625
2638
|
__name: "DashboardPage",
|
|
2626
2639
|
props: {
|
|
2627
2640
|
slug: { default: void 0 },
|
|
@@ -2643,24 +2656,24 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2643
2656
|
d("header", Kl, [
|
|
2644
2657
|
d("div", Gl, [
|
|
2645
2658
|
d("h1", Hl, h(l.value), 1),
|
|
2646
|
-
i.value ? (o(), c("div", Xl, h(i.value), 1)) :
|
|
2659
|
+
i.value ? (o(), c("div", Xl, h(i.value), 1)) : T("", !0)
|
|
2647
2660
|
]),
|
|
2648
2661
|
d("div", Yl, [
|
|
2649
2662
|
Y(f.$slots, "actions")
|
|
2650
2663
|
])
|
|
2651
2664
|
]),
|
|
2652
2665
|
d("div", Jl, [
|
|
2653
|
-
(o(!0), c(
|
|
2666
|
+
(o(!0), c(M, null, D(a.value, (_, k) => (o(), c("div", {
|
|
2654
2667
|
key: k,
|
|
2655
2668
|
class: "admin-dashboard__cell",
|
|
2656
|
-
style: Te({ gridColumn: `span ${u(
|
|
2669
|
+
style: Te({ gridColumn: `span ${u(_)} / span ${u(_)}` })
|
|
2657
2670
|
}, [
|
|
2658
|
-
$(Wl, { node:
|
|
2671
|
+
$(Wl, { node: _ }, null, 8, ["node"])
|
|
2659
2672
|
], 4))), 128))
|
|
2660
2673
|
])
|
|
2661
2674
|
]));
|
|
2662
2675
|
}
|
|
2663
|
-
}), Zl = /* @__PURE__ */
|
|
2676
|
+
}), Zl = /* @__PURE__ */ P({
|
|
2664
2677
|
__name: "StatWidget",
|
|
2665
2678
|
props: {
|
|
2666
2679
|
title: { default: "" },
|
|
@@ -2700,7 +2713,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2700
2713
|
}, ns = {
|
|
2701
2714
|
key: 1,
|
|
2702
2715
|
class: "admin-widget__desc"
|
|
2703
|
-
}, as = ["viewBox", "height", "aria-label"], ls = ["x", "y", "width", "height", "fill", "data-label", "data-value"], ss = /* @__PURE__ */
|
|
2716
|
+
}, as = ["viewBox", "height", "aria-label"], ls = ["x", "y", "width", "height", "fill", "data-label", "data-value"], ss = /* @__PURE__ */ P({
|
|
2704
2717
|
__name: "BarChartWidget",
|
|
2705
2718
|
props: {
|
|
2706
2719
|
title: { default: "" },
|
|
@@ -2726,9 +2739,9 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2726
2739
|
}, {
|
|
2727
2740
|
default: m(() => [
|
|
2728
2741
|
e.title || e.description ? (o(), c("header", es, [
|
|
2729
|
-
e.title ? (o(), c("h3", ts, h(e.title), 1)) :
|
|
2730
|
-
e.description ? (o(), c("p", ns, h(e.description), 1)) :
|
|
2731
|
-
])) :
|
|
2742
|
+
e.title ? (o(), c("h3", ts, h(e.title), 1)) : T("", !0),
|
|
2743
|
+
e.description ? (o(), c("p", ns, h(e.description), 1)) : T("", !0)
|
|
2744
|
+
])) : T("", !0),
|
|
2732
2745
|
(o(), c("svg", {
|
|
2733
2746
|
class: "admin-widget-bar-chart",
|
|
2734
2747
|
viewBox: `0 0 100 ${e.height}`,
|
|
@@ -2738,7 +2751,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2738
2751
|
role: "img",
|
|
2739
2752
|
"aria-label": e.title || "Bar chart"
|
|
2740
2753
|
}, [
|
|
2741
|
-
(o(!0), c(
|
|
2754
|
+
(o(!0), c(M, null, D(s.value, (i, u) => (o(), c("rect", {
|
|
2742
2755
|
key: u,
|
|
2743
2756
|
x: i.x,
|
|
2744
2757
|
y: e.height - i.heightPct / 100 * e.height,
|
|
@@ -2759,7 +2772,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2759
2772
|
}), is = {
|
|
2760
2773
|
key: 0,
|
|
2761
2774
|
class: "admin-widget__hd"
|
|
2762
|
-
}, os = { class: "admin-widget__title" }, rs = { class: "admin-donut-widget__row" }, us = ["aria-label"], ds = ["d", "fill"], cs = { class: "admin-donut-widget__legend" }, ms = { class: "admin-donut-widget__label" }, fs = { class: "admin-donut-widget__value" }, vs = /* @__PURE__ */
|
|
2775
|
+
}, os = { class: "admin-widget__title" }, rs = { class: "admin-donut-widget__row" }, us = ["aria-label"], ds = ["d", "fill"], cs = { class: "admin-donut-widget__legend" }, ms = { class: "admin-donut-widget__label" }, fs = { class: "admin-donut-widget__value" }, vs = /* @__PURE__ */ P({
|
|
2763
2776
|
__name: "DonutChartWidget",
|
|
2764
2777
|
props: {
|
|
2765
2778
|
title: { default: "" },
|
|
@@ -2777,10 +2790,10 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2777
2790
|
return t.data.map((i, u) => {
|
|
2778
2791
|
const f = l / s.value * 2 * Math.PI;
|
|
2779
2792
|
l += i.value;
|
|
2780
|
-
const p = l / s.value * 2 * Math.PI,
|
|
2793
|
+
const p = l / s.value * 2 * Math.PI, _ = 50, k = 60, x = 60, C = k + _ * Math.cos(f - Math.PI / 2), y = x + _ * Math.sin(f - Math.PI / 2), g = k + _ * Math.cos(p - Math.PI / 2), F = 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 ${C} ${y} A ${_} ${_} 0 ${q} 1 ${g} ${F} Z`;
|
|
2781
2794
|
return {
|
|
2782
2795
|
...i,
|
|
2783
|
-
path:
|
|
2796
|
+
path: L,
|
|
2784
2797
|
color: i.color ?? n[u % n.length],
|
|
2785
2798
|
pct: (i.value / s.value * 100).toFixed(1)
|
|
2786
2799
|
};
|
|
@@ -2793,7 +2806,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2793
2806
|
default: m(() => [
|
|
2794
2807
|
e.title ? (o(), c("header", is, [
|
|
2795
2808
|
d("h3", os, h(e.title), 1)
|
|
2796
|
-
])) :
|
|
2809
|
+
])) : T("", !0),
|
|
2797
2810
|
d("div", rs, [
|
|
2798
2811
|
(o(), c("svg", {
|
|
2799
2812
|
viewBox: "0 0 120 120",
|
|
@@ -2801,7 +2814,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2801
2814
|
role: "img",
|
|
2802
2815
|
"aria-label": e.title
|
|
2803
2816
|
}, [
|
|
2804
|
-
(o(!0), c(
|
|
2817
|
+
(o(!0), c(M, null, D(a.value, (u, f) => (o(), c("path", {
|
|
2805
2818
|
key: f,
|
|
2806
2819
|
d: u.path,
|
|
2807
2820
|
fill: u.color
|
|
@@ -2816,7 +2829,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2816
2829
|
}, null, -1))
|
|
2817
2830
|
], 8, us)),
|
|
2818
2831
|
d("ul", cs, [
|
|
2819
|
-
(o(!0), c(
|
|
2832
|
+
(o(!0), c(M, null, D(a.value, (u, f) => (o(), c("li", { key: f }, [
|
|
2820
2833
|
d("span", {
|
|
2821
2834
|
class: "admin-donut-widget__dot",
|
|
2822
2835
|
style: Te({ background: u.color })
|
|
@@ -2833,7 +2846,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2833
2846
|
}), ps = {
|
|
2834
2847
|
key: 0,
|
|
2835
2848
|
class: "admin-widget__hd"
|
|
2836
|
-
}, gs = { class: "admin-widget__title" }, hs = /* @__PURE__ */
|
|
2849
|
+
}, gs = { class: "admin-widget__title" }, hs = /* @__PURE__ */ P({
|
|
2837
2850
|
__name: "RecentTableWidget",
|
|
2838
2851
|
props: {
|
|
2839
2852
|
title: { default: "" },
|
|
@@ -2849,7 +2862,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2849
2862
|
default: m(() => [
|
|
2850
2863
|
e.title ? (o(), c("header", ps, [
|
|
2851
2864
|
d("h3", gs, h(e.title), 1)
|
|
2852
|
-
])) :
|
|
2865
|
+
])) : T("", !0),
|
|
2853
2866
|
$(r(je), {
|
|
2854
2867
|
columns: e.columns,
|
|
2855
2868
|
data: e.rows,
|
|
@@ -2862,7 +2875,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2862
2875
|
}), _s = {
|
|
2863
2876
|
key: 0,
|
|
2864
2877
|
class: "admin-widget__hd"
|
|
2865
|
-
}, ys = { class: "admin-widget__title" }, bs = /* @__PURE__ */
|
|
2878
|
+
}, ys = { class: "admin-widget__title" }, bs = /* @__PURE__ */ P({
|
|
2866
2879
|
__name: "HeatmapWidget",
|
|
2867
2880
|
props: {
|
|
2868
2881
|
title: { default: "" },
|
|
@@ -2879,7 +2892,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2879
2892
|
default: m(() => [
|
|
2880
2893
|
e.title ? (o(), c("header", _s, [
|
|
2881
2894
|
d("h3", ys, h(e.title), 1)
|
|
2882
|
-
])) :
|
|
2895
|
+
])) : T("", !0),
|
|
2883
2896
|
$(r(Yt), {
|
|
2884
2897
|
data: e.data,
|
|
2885
2898
|
levels: e.levels,
|
|
@@ -2893,7 +2906,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2893
2906
|
}), ks = {
|
|
2894
2907
|
key: 0,
|
|
2895
2908
|
class: "admin-widget__hd"
|
|
2896
|
-
}, ws = { class: "admin-widget__title" }, $s = { style: { display: "flex", "justify-content": "center" } }, xs = /* @__PURE__ */
|
|
2909
|
+
}, ws = { class: "admin-widget__title" }, $s = { style: { display: "flex", "justify-content": "center" } }, xs = /* @__PURE__ */ P({
|
|
2897
2910
|
__name: "GaugeWidget",
|
|
2898
2911
|
props: {
|
|
2899
2912
|
title: { default: "" },
|
|
@@ -2922,7 +2935,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2922
2935
|
default: m(() => [
|
|
2923
2936
|
e.title ? (o(), c("header", ks, [
|
|
2924
2937
|
d("h3", ws, h(e.title), 1)
|
|
2925
|
-
])) :
|
|
2938
|
+
])) : T("", !0),
|
|
2926
2939
|
d("div", $s, [
|
|
2927
2940
|
$(r(Jt), {
|
|
2928
2941
|
value: e.value,
|
|
@@ -2944,7 +2957,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2944
2957
|
}), Ss = {
|
|
2945
2958
|
key: 0,
|
|
2946
2959
|
class: "admin-widget__hd"
|
|
2947
|
-
}, Cs = { class: "admin-widget__title" }, As = { class: "admin-markdown-widget" }, Es = /* @__PURE__ */
|
|
2960
|
+
}, Cs = { class: "admin-widget__title" }, As = { class: "admin-markdown-widget" }, Es = /* @__PURE__ */ P({
|
|
2948
2961
|
__name: "MarkdownWidget",
|
|
2949
2962
|
props: {
|
|
2950
2963
|
title: { default: "" },
|
|
@@ -2958,7 +2971,7 @@ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-pag
|
|
|
2958
2971
|
default: m(() => [
|
|
2959
2972
|
e.title ? (o(), c("header", Ss, [
|
|
2960
2973
|
d("h3", Cs, h(e.title), 1)
|
|
2961
|
-
])) :
|
|
2974
|
+
])) : T("", !0),
|
|
2962
2975
|
d("div", As, h(e.content), 1)
|
|
2963
2976
|
]),
|
|
2964
2977
|
_: 1
|
|
@@ -3172,7 +3185,7 @@ function zs(e = {}) {
|
|
|
3172
3185
|
return (a) => {
|
|
3173
3186
|
if (a.name === t)
|
|
3174
3187
|
return !0;
|
|
3175
|
-
const l =
|
|
3188
|
+
const l = Z();
|
|
3176
3189
|
if (a.meta?.requiresAuth === !0 && !l.isAuthenticated)
|
|
3177
3190
|
return {
|
|
3178
3191
|
name: t,
|
|
@@ -3257,7 +3270,7 @@ function js(e) {
|
|
|
3257
3270
|
l.addRoute(a);
|
|
3258
3271
|
}, l;
|
|
3259
3272
|
}
|
|
3260
|
-
const J = /* @__PURE__ */
|
|
3273
|
+
const J = /* @__PURE__ */ P({
|
|
3261
3274
|
__name: "TextField",
|
|
3262
3275
|
props: {
|
|
3263
3276
|
name: {},
|
|
@@ -3290,7 +3303,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3290
3303
|
"onUpdate:modelValue": l
|
|
3291
3304
|
}, null, 8, ["model-value", "type", "label", "hint", "error", "placeholder", "required", "disabled", "readonly", "name", "autocomplete"]));
|
|
3292
3305
|
}
|
|
3293
|
-
}), Se = /* @__PURE__ */
|
|
3306
|
+
}), Se = /* @__PURE__ */ P({
|
|
3294
3307
|
__name: "TextAreaField",
|
|
3295
3308
|
props: {
|
|
3296
3309
|
name: {},
|
|
@@ -3328,7 +3341,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3328
3341
|
_: 1
|
|
3329
3342
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3330
3343
|
}
|
|
3331
|
-
}), Ve = /* @__PURE__ */
|
|
3344
|
+
}), Ve = /* @__PURE__ */ P({
|
|
3332
3345
|
__name: "NumberField",
|
|
3333
3346
|
props: {
|
|
3334
3347
|
name: {},
|
|
@@ -3373,7 +3386,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3373
3386
|
_: 1
|
|
3374
3387
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3375
3388
|
}
|
|
3376
|
-
}), le = /* @__PURE__ */
|
|
3389
|
+
}), le = /* @__PURE__ */ P({
|
|
3377
3390
|
__name: "SelectField",
|
|
3378
3391
|
props: {
|
|
3379
3392
|
name: {},
|
|
@@ -3417,7 +3430,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3417
3430
|
_: 1
|
|
3418
3431
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3419
3432
|
}
|
|
3420
|
-
}), ze = /* @__PURE__ */
|
|
3433
|
+
}), ze = /* @__PURE__ */ P({
|
|
3421
3434
|
__name: "CheckboxField",
|
|
3422
3435
|
props: {
|
|
3423
3436
|
name: {},
|
|
@@ -3447,9 +3460,9 @@ const J = /* @__PURE__ */ L({
|
|
|
3447
3460
|
"onUpdate:modelValue": l
|
|
3448
3461
|
}, {
|
|
3449
3462
|
default: m(() => [
|
|
3450
|
-
e.inlineLabel ? (o(), c(
|
|
3463
|
+
e.inlineLabel ? (o(), c(M, { key: 0 }, [
|
|
3451
3464
|
S(h(e.inlineLabel), 1)
|
|
3452
|
-
], 64)) :
|
|
3465
|
+
], 64)) : T("", !0)
|
|
3453
3466
|
]),
|
|
3454
3467
|
_: 1
|
|
3455
3468
|
}, 8, ["model-value", "disabled", "name"])
|
|
@@ -3457,7 +3470,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3457
3470
|
_: 1
|
|
3458
3471
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3459
3472
|
}
|
|
3460
|
-
}), ue = /* @__PURE__ */
|
|
3473
|
+
}), ue = /* @__PURE__ */ P({
|
|
3461
3474
|
__name: "DateField",
|
|
3462
3475
|
props: {
|
|
3463
3476
|
name: {},
|
|
@@ -3497,7 +3510,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3497
3510
|
_: 1
|
|
3498
3511
|
}, 8, ["label", "hint", "error", "required", "disabled"]));
|
|
3499
3512
|
}
|
|
3500
|
-
}), it = /* @__PURE__ */
|
|
3513
|
+
}), it = /* @__PURE__ */ P({
|
|
3501
3514
|
__name: "RowsLayout",
|
|
3502
3515
|
props: {
|
|
3503
3516
|
items: {},
|
|
@@ -3510,7 +3523,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3510
3523
|
align: "stretch"
|
|
3511
3524
|
}, {
|
|
3512
3525
|
default: m(() => [
|
|
3513
|
-
(o(!0), c(
|
|
3526
|
+
(o(!0), c(M, null, D(e.items, (s, a) => (o(), b(we, {
|
|
3514
3527
|
key: a,
|
|
3515
3528
|
node: s
|
|
3516
3529
|
}, null, 8, ["node"]))), 128))
|
|
@@ -3518,7 +3531,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3518
3531
|
_: 1
|
|
3519
3532
|
}, 8, ["gap"]));
|
|
3520
3533
|
}
|
|
3521
|
-
}), Ks = /* @__PURE__ */
|
|
3534
|
+
}), Ks = /* @__PURE__ */ P({
|
|
3522
3535
|
__name: "ColumnsLayout",
|
|
3523
3536
|
props: {
|
|
3524
3537
|
items: {},
|
|
@@ -3536,7 +3549,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3536
3549
|
gap: e.gap
|
|
3537
3550
|
}, {
|
|
3538
3551
|
default: m(() => [
|
|
3539
|
-
(o(!0), c(
|
|
3552
|
+
(o(!0), c(M, null, D(e.items, (i, u) => (o(), c("div", {
|
|
3540
3553
|
key: u,
|
|
3541
3554
|
class: "admin-columns__item",
|
|
3542
3555
|
style: Te({ gridColumn: `span ${s(i)} / span ${s(i)}` })
|
|
@@ -3556,7 +3569,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3556
3569
|
}, Xs = {
|
|
3557
3570
|
key: 1,
|
|
3558
3571
|
class: "admin-section__description"
|
|
3559
|
-
}, Ys = { class: "admin-section__body" }, he = /* @__PURE__ */
|
|
3572
|
+
}, Ys = { class: "admin-section__body" }, he = /* @__PURE__ */ P({
|
|
3560
3573
|
__name: "SectionLayout",
|
|
3561
3574
|
props: {
|
|
3562
3575
|
items: {},
|
|
@@ -3570,11 +3583,11 @@ const J = /* @__PURE__ */ L({
|
|
|
3570
3583
|
}, {
|
|
3571
3584
|
default: m(() => [
|
|
3572
3585
|
e.title || e.description ? (o(), c("header", Gs, [
|
|
3573
|
-
e.title ? (o(), c("h3", Hs, h(e.title), 1)) :
|
|
3574
|
-
e.description ? (o(), c("p", Xs, h(e.description), 1)) :
|
|
3575
|
-
])) :
|
|
3586
|
+
e.title ? (o(), c("h3", Hs, h(e.title), 1)) : T("", !0),
|
|
3587
|
+
e.description ? (o(), c("p", Xs, h(e.description), 1)) : T("", !0)
|
|
3588
|
+
])) : T("", !0),
|
|
3576
3589
|
d("div", Ys, [
|
|
3577
|
-
(o(!0), c(
|
|
3590
|
+
(o(!0), c(M, null, D(e.items, (s, a) => (o(), b(we, {
|
|
3578
3591
|
key: a,
|
|
3579
3592
|
node: s
|
|
3580
3593
|
}, null, 8, ["node"]))), 128))
|
|
@@ -3583,7 +3596,7 @@ const J = /* @__PURE__ */ L({
|
|
|
3583
3596
|
_: 1
|
|
3584
3597
|
}));
|
|
3585
3598
|
}
|
|
3586
|
-
}), Js = /* @__PURE__ */
|
|
3599
|
+
}), Js = /* @__PURE__ */ P({
|
|
3587
3600
|
__name: "TabsLayout",
|
|
3588
3601
|
props: {
|
|
3589
3602
|
items: {},
|
|
@@ -3604,9 +3617,9 @@ const J = /* @__PURE__ */ L({
|
|
|
3604
3617
|
"onUpdate:modelValue": i
|
|
3605
3618
|
}, {
|
|
3606
3619
|
list: m(() => [
|
|
3607
|
-
(o(!0), c(
|
|
3608
|
-
key: a(p,
|
|
3609
|
-
value: a(p,
|
|
3620
|
+
(o(!0), c(M, null, D(e.items, (p, _) => (o(), b(r(Ae), {
|
|
3621
|
+
key: a(p, _),
|
|
3622
|
+
value: a(p, _)
|
|
3610
3623
|
}, {
|
|
3611
3624
|
default: m(() => [
|
|
3612
3625
|
S(h(p.label), 1)
|
|
@@ -3615,12 +3628,12 @@ const J = /* @__PURE__ */ L({
|
|
|
3615
3628
|
}, 1032, ["value"]))), 128))
|
|
3616
3629
|
]),
|
|
3617
3630
|
default: m(() => [
|
|
3618
|
-
(o(!0), c(
|
|
3619
|
-
key: `panel-${a(p,
|
|
3620
|
-
value: a(p,
|
|
3631
|
+
(o(!0), c(M, null, D(e.items, (p, _) => (o(), b(r(gt), {
|
|
3632
|
+
key: `panel-${a(p, _)}`,
|
|
3633
|
+
value: a(p, _)
|
|
3621
3634
|
}, {
|
|
3622
3635
|
default: m(() => [
|
|
3623
|
-
(o(!0), c(
|
|
3636
|
+
(o(!0), c(M, null, D(p.items, (k, x) => (o(), b(we, {
|
|
3624
3637
|
key: x,
|
|
3625
3638
|
node: k
|
|
3626
3639
|
}, null, 8, ["node"]))), 128))
|
|
@@ -3690,7 +3703,7 @@ function Qs() {
|
|
|
3690
3703
|
}
|
|
3691
3704
|
});
|
|
3692
3705
|
}
|
|
3693
|
-
const I = /* @__PURE__ */
|
|
3706
|
+
const I = /* @__PURE__ */ P({
|
|
3694
3707
|
__name: "TextEntry",
|
|
3695
3708
|
props: {
|
|
3696
3709
|
name: { default: "" },
|
|
@@ -3705,13 +3718,13 @@ const I = /* @__PURE__ */ L({
|
|
|
3705
3718
|
return a === void 0 && n && t.name && (a = n[t.name]), a == null || a === "" ? t.placeholder : String(a);
|
|
3706
3719
|
});
|
|
3707
3720
|
return (a, l) => (o(), c("span", {
|
|
3708
|
-
class:
|
|
3721
|
+
class: ee(["admin-infolist-text", e.mono ? "admin-infolist-text--mono" : ""])
|
|
3709
3722
|
}, h(s.value), 3));
|
|
3710
3723
|
}
|
|
3711
3724
|
}), Zs = {
|
|
3712
3725
|
key: 1,
|
|
3713
3726
|
class: "admin-infolist-text"
|
|
3714
|
-
}, ei = /* @__PURE__ */
|
|
3727
|
+
}, ei = /* @__PURE__ */ P({
|
|
3715
3728
|
__name: "BadgeEntry",
|
|
3716
3729
|
props: {
|
|
3717
3730
|
name: { default: "" },
|
|
@@ -3735,7 +3748,7 @@ const I = /* @__PURE__ */ L({
|
|
|
3735
3748
|
_: 1
|
|
3736
3749
|
}, 8, ["variant"])) : (o(), c("span", Zs, "—"));
|
|
3737
3750
|
}
|
|
3738
|
-
}), ti = ["data-icon"], ni = { key: 0 }, ai = /* @__PURE__ */
|
|
3751
|
+
}), ti = ["data-icon"], ni = { key: 0 }, ai = /* @__PURE__ */ P({
|
|
3739
3752
|
__name: "IconEntry",
|
|
3740
3753
|
props: {
|
|
3741
3754
|
name: { default: "" },
|
|
@@ -3752,19 +3765,19 @@ const I = /* @__PURE__ */ L({
|
|
|
3752
3765
|
return i === void 0 && n && t.name && (i = n[t.name]), !!i;
|
|
3753
3766
|
}), a = v(() => s.value ? t.trueLabel : t.falseLabel), l = v(() => s.value ? t.trueIcon : t.falseIcon);
|
|
3754
3767
|
return (i, u) => (o(), c("span", {
|
|
3755
|
-
class:
|
|
3768
|
+
class: ee(["admin-infolist-icon", s.value ? "admin-infolist-icon--on" : "admin-infolist-icon--off"])
|
|
3756
3769
|
}, [
|
|
3757
3770
|
d("span", {
|
|
3758
3771
|
class: "admin-infolist-icon__glyph",
|
|
3759
3772
|
"data-icon": l.value
|
|
3760
3773
|
}, null, 8, ti),
|
|
3761
|
-
a.value ? (o(), c("span", ni, h(a.value), 1)) :
|
|
3774
|
+
a.value ? (o(), c("span", ni, h(a.value), 1)) : T("", !0)
|
|
3762
3775
|
], 2));
|
|
3763
3776
|
}
|
|
3764
3777
|
}), li = {
|
|
3765
3778
|
key: 1,
|
|
3766
3779
|
class: "admin-infolist-text"
|
|
3767
|
-
}, ot = /* @__PURE__ */
|
|
3780
|
+
}, ot = /* @__PURE__ */ P({
|
|
3768
3781
|
__name: "KeyValueEntry",
|
|
3769
3782
|
props: {
|
|
3770
3783
|
name: { default: "" },
|
|
@@ -3785,7 +3798,7 @@ const I = /* @__PURE__ */ L({
|
|
|
3785
3798
|
columns: 1
|
|
3786
3799
|
}, {
|
|
3787
3800
|
default: m(() => [
|
|
3788
|
-
(o(!0), c(
|
|
3801
|
+
(o(!0), c(M, null, D(s.value, ([u, f]) => (o(), b(r(ln), {
|
|
3789
3802
|
key: u,
|
|
3790
3803
|
label: u
|
|
3791
3804
|
}, {
|
|
@@ -3852,7 +3865,7 @@ function ho(e, t = {}) {
|
|
|
3852
3865
|
});
|
|
3853
3866
|
cn(a);
|
|
3854
3867
|
const l = Bt(In), i = Dt();
|
|
3855
|
-
l.use(i),
|
|
3868
|
+
l.use(i), Z().hydrate(e), He().hydrate(e), Ge().hydrate(e), Xe().hydrate(e), Qs(), Rs(), si();
|
|
3856
3869
|
const u = js({
|
|
3857
3870
|
base: s,
|
|
3858
3871
|
history: t.router?.history ?? ct(s),
|
|
@@ -3876,19 +3889,19 @@ function ho(e, t = {}) {
|
|
|
3876
3889
|
});
|
|
3877
3890
|
l.use(u);
|
|
3878
3891
|
const f = Ye();
|
|
3879
|
-
if (u.beforeEach((p,
|
|
3880
|
-
p.fullPath !==
|
|
3892
|
+
if (u.beforeEach((p, _, k) => {
|
|
3893
|
+
p.fullPath !== _.fullPath && f.start(), k();
|
|
3881
3894
|
}), u.afterEach(() => {
|
|
3882
3895
|
f.end();
|
|
3883
3896
|
}), u.onError(() => {
|
|
3884
3897
|
f.end();
|
|
3885
|
-
}), u.beforeResolve(async (p,
|
|
3898
|
+
}), u.beforeResolve(async (p, _, k) => {
|
|
3886
3899
|
const x = typeof p.name == "string" ? p.name : null;
|
|
3887
3900
|
if (x && x.startsWith("admin.resource.") && x.endsWith(".index")) {
|
|
3888
3901
|
const C = p.params.slug ?? p.meta.slug;
|
|
3889
3902
|
if (C)
|
|
3890
3903
|
try {
|
|
3891
|
-
const { useResourceIndexStore:
|
|
3904
|
+
const { useResourceIndexStore: y } = await Promise.resolve().then(() => $a), g = y();
|
|
3892
3905
|
(g.slug !== C || g.items.length === 0) && (g.setSlug(C), await g.load().catch(() => {
|
|
3893
3906
|
}));
|
|
3894
3907
|
} catch {
|
|
@@ -3896,20 +3909,20 @@ function ho(e, t = {}) {
|
|
|
3896
3909
|
}
|
|
3897
3910
|
k();
|
|
3898
3911
|
}), !t.skipManifestLoad) {
|
|
3899
|
-
const p = oe(),
|
|
3912
|
+
const p = oe(), _ = Z(), k = kt(), x = () => {
|
|
3900
3913
|
k.load().catch(() => {
|
|
3901
3914
|
}), p.load().then((C) => {
|
|
3902
3915
|
u.replaceManifestRoutes(C);
|
|
3903
|
-
const
|
|
3904
|
-
|
|
3916
|
+
const y = u.currentRoute.value;
|
|
3917
|
+
y.name === "admin.notFound" && y.fullPath !== "/" && u.replace(y.fullPath);
|
|
3905
3918
|
}).catch((C) => {
|
|
3906
3919
|
typeof console < "u" && console.error("[laravel-admin] manifest load failed:", C);
|
|
3907
3920
|
});
|
|
3908
3921
|
};
|
|
3909
|
-
|
|
3910
|
-
() =>
|
|
3911
|
-
(C,
|
|
3912
|
-
C && !
|
|
3922
|
+
_.isAuthenticated && x(), Q(
|
|
3923
|
+
() => _.user,
|
|
3924
|
+
(C, y) => {
|
|
3925
|
+
C && !y && x();
|
|
3913
3926
|
}
|
|
3914
3927
|
);
|
|
3915
3928
|
}
|
|
@@ -3962,7 +3975,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
3962
3975
|
}, bi = { class: "admin-notifs__time" }, ki = {
|
|
3963
3976
|
key: 0,
|
|
3964
3977
|
class: "admin-notifs__text"
|
|
3965
|
-
}, wi = ["onClick"], bo = /* @__PURE__ */
|
|
3978
|
+
}, wi = ["onClick"], bo = /* @__PURE__ */ P({
|
|
3966
3979
|
__name: "NotificationsDrawer",
|
|
3967
3980
|
props: {
|
|
3968
3981
|
open: { type: Boolean }
|
|
@@ -3973,7 +3986,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
3973
3986
|
function l(g) {
|
|
3974
3987
|
s("update:open", g);
|
|
3975
3988
|
}
|
|
3976
|
-
|
|
3989
|
+
Q(
|
|
3977
3990
|
() => n.open,
|
|
3978
3991
|
async (g) => {
|
|
3979
3992
|
g && await a.load(a.lastFilter ?? "all", 1).catch(() => {
|
|
@@ -3994,7 +4007,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
3994
4007
|
s("select-item", g), g.read_at || await a.markAsRead(g.id).catch(() => {
|
|
3995
4008
|
});
|
|
3996
4009
|
}
|
|
3997
|
-
async function
|
|
4010
|
+
async function _(g, F) {
|
|
3998
4011
|
F.stopPropagation(), await a.destroy(g.id).catch(() => {
|
|
3999
4012
|
});
|
|
4000
4013
|
}
|
|
@@ -4008,14 +4021,14 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4008
4021
|
function C(g) {
|
|
4009
4022
|
return g.data.body ?? "";
|
|
4010
4023
|
}
|
|
4011
|
-
function
|
|
4024
|
+
function y(g) {
|
|
4012
4025
|
if (!g) return "";
|
|
4013
|
-
const F = new Date(g), q = Math.max(0, Date.now() - F.getTime()),
|
|
4014
|
-
if (
|
|
4015
|
-
if (
|
|
4016
|
-
const
|
|
4017
|
-
if (
|
|
4018
|
-
const w = Math.floor(
|
|
4026
|
+
const F = new Date(g), q = Math.max(0, Date.now() - F.getTime()), L = Math.floor(q / 6e4);
|
|
4027
|
+
if (L < 1) return "только что";
|
|
4028
|
+
if (L < 60) return `${L} мин назад`;
|
|
4029
|
+
const U = Math.floor(L / 60);
|
|
4030
|
+
if (U < 24) return `${U} ч назад`;
|
|
4031
|
+
const w = Math.floor(U / 24);
|
|
4019
4032
|
return w < 7 ? `${w} д назад` : F.toLocaleDateString("ru-RU");
|
|
4020
4033
|
}
|
|
4021
4034
|
return (g, F) => (o(), b(r(sn), {
|
|
@@ -4029,7 +4042,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4029
4042
|
d("div", ri, [
|
|
4030
4043
|
d("h2", ui, [
|
|
4031
4044
|
F[0] || (F[0] = S(" Уведомления ", -1)),
|
|
4032
|
-
r(a).unreadCount > 0 ? (o(), c("span", di, " (" + h(r(a).unreadCount) + ") ", 1)) :
|
|
4045
|
+
r(a).unreadCount > 0 ? (o(), c("span", di, " (" + h(r(a).unreadCount) + ") ", 1)) : T("", !0)
|
|
4033
4046
|
]),
|
|
4034
4047
|
r(a).unreadCount > 0 ? (o(), b(r(z), {
|
|
4035
4048
|
key: 0,
|
|
@@ -4041,7 +4054,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4041
4054
|
S(" Прочитать все ", -1)
|
|
4042
4055
|
])]),
|
|
4043
4056
|
_: 1
|
|
4044
|
-
})) :
|
|
4057
|
+
})) : T("", !0)
|
|
4045
4058
|
])
|
|
4046
4059
|
]),
|
|
4047
4060
|
default: m(() => [
|
|
@@ -4059,9 +4072,9 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4059
4072
|
$(r(Ae), { value: "unread" }, {
|
|
4060
4073
|
default: m(() => [
|
|
4061
4074
|
F[3] || (F[3] = S(" Непрочитанные", -1)),
|
|
4062
|
-
r(a).unreadCount > 0 ? (o(), c(
|
|
4075
|
+
r(a).unreadCount > 0 ? (o(), c(M, { key: 0 }, [
|
|
4063
4076
|
S(" (" + h(r(a).unreadCount) + ") ", 1)
|
|
4064
|
-
], 64)) :
|
|
4077
|
+
], 64)) : T("", !0)
|
|
4065
4078
|
]),
|
|
4066
4079
|
_: 1
|
|
4067
4080
|
}),
|
|
@@ -4073,38 +4086,38 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4073
4086
|
})
|
|
4074
4087
|
]),
|
|
4075
4088
|
default: m(() => [
|
|
4076
|
-
(o(), c(
|
|
4089
|
+
(o(), c(M, null, D(["all", "unread", "read"], (q) => $(r(gt), {
|
|
4077
4090
|
key: q,
|
|
4078
4091
|
value: q
|
|
4079
4092
|
}, {
|
|
4080
4093
|
default: m(() => [
|
|
4081
4094
|
d("ul", ci, [
|
|
4082
|
-
r(a).loading ? (o(), c("li", mi, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", fi, " Нет уведомлений ")) :
|
|
4083
|
-
(o(!0), c(
|
|
4084
|
-
key:
|
|
4085
|
-
class:
|
|
4095
|
+
r(a).loading ? (o(), c("li", mi, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", fi, " Нет уведомлений ")) : T("", !0),
|
|
4096
|
+
(o(!0), c(M, null, D(r(a).items, (L) => (o(), c("li", {
|
|
4097
|
+
key: L.id,
|
|
4098
|
+
class: ee([
|
|
4086
4099
|
"admin-notifs__item",
|
|
4087
|
-
`admin-notifs__item--${k(
|
|
4088
|
-
{ "admin-notifs__item--unread": !
|
|
4100
|
+
`admin-notifs__item--${k(L)}`,
|
|
4101
|
+
{ "admin-notifs__item--unread": !L.read_at }
|
|
4089
4102
|
]),
|
|
4090
|
-
onClick: (
|
|
4103
|
+
onClick: (U) => p(L)
|
|
4091
4104
|
}, [
|
|
4092
4105
|
d("span", {
|
|
4093
4106
|
class: "admin-notifs__icon",
|
|
4094
|
-
"data-kind": k(
|
|
4107
|
+
"data-kind": k(L)
|
|
4095
4108
|
}, null, 8, pi),
|
|
4096
4109
|
d("div", gi, [
|
|
4097
4110
|
d("div", hi, [
|
|
4098
|
-
|
|
4099
|
-
d("span", bi, h(
|
|
4111
|
+
L.read_at ? (o(), c("span", yi, h(x(L)), 1)) : (o(), c("strong", _i, h(x(L)), 1)),
|
|
4112
|
+
d("span", bi, h(y(L.created_at)), 1)
|
|
4100
4113
|
]),
|
|
4101
|
-
C(
|
|
4114
|
+
C(L) ? (o(), c("p", ki, h(C(L)), 1)) : T("", !0)
|
|
4102
4115
|
]),
|
|
4103
4116
|
d("button", {
|
|
4104
4117
|
type: "button",
|
|
4105
4118
|
class: "admin-notifs__close",
|
|
4106
4119
|
"aria-label": "Удалить",
|
|
4107
|
-
onClick: (
|
|
4120
|
+
onClick: (U) => _(L, U)
|
|
4108
4121
|
}, " × ", 8, wi)
|
|
4109
4122
|
], 10, vi))), 128))
|
|
4110
4123
|
])
|
|
@@ -4133,7 +4146,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4133
4146
|
}, Pi = {
|
|
4134
4147
|
key: 0,
|
|
4135
4148
|
class: "admin-import-wizard__empty"
|
|
4136
|
-
}, Mi = { class: "admin-import-wizard__kpi" }, Ni = { class: "admin-import-wizard__nav" }, ko = /* @__PURE__ */
|
|
4149
|
+
}, Mi = { class: "admin-import-wizard__kpi" }, Ni = { class: "admin-import-wizard__nav" }, ko = /* @__PURE__ */ P({
|
|
4137
4150
|
__name: "ImportWizardPage",
|
|
4138
4151
|
props: {
|
|
4139
4152
|
title: { default: "Импорт" },
|
|
@@ -4152,27 +4165,27 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4152
4165
|
{ label: "Предпросмотр", description: "Проверка первых строк" },
|
|
4153
4166
|
{ label: "Импорт", description: "Запуск + сводка" }
|
|
4154
4167
|
], l = R(0), i = v(() => n.step ?? l.value);
|
|
4155
|
-
function u(
|
|
4156
|
-
n.step === void 0 && (
|
|
4168
|
+
function u(U) {
|
|
4169
|
+
n.step === void 0 && (U < 0 || U >= a.length || (l.value = U));
|
|
4157
4170
|
}
|
|
4158
4171
|
const f = R([]);
|
|
4159
|
-
function p(
|
|
4160
|
-
f.value =
|
|
4172
|
+
function p(U) {
|
|
4173
|
+
f.value = U, U.length > 0 && s("file-uploaded", U[0].file);
|
|
4161
4174
|
}
|
|
4162
|
-
const
|
|
4163
|
-
function k(
|
|
4164
|
-
|
|
4175
|
+
const _ = R({});
|
|
4176
|
+
function k(U, w) {
|
|
4177
|
+
_.value[U] = w === null || w === "" ? null : String(w);
|
|
4165
4178
|
}
|
|
4166
4179
|
function x() {
|
|
4167
|
-
return n.headers.map((
|
|
4168
|
-
source:
|
|
4169
|
-
target:
|
|
4180
|
+
return n.headers.map((U) => ({
|
|
4181
|
+
source: U.key,
|
|
4182
|
+
target: _.value[U.key] ?? null
|
|
4170
4183
|
}));
|
|
4171
4184
|
}
|
|
4172
4185
|
function C() {
|
|
4173
4186
|
s("mapping-submit", x()), u(2);
|
|
4174
4187
|
}
|
|
4175
|
-
function
|
|
4188
|
+
function y() {
|
|
4176
4189
|
s("run-import"), u(3);
|
|
4177
4190
|
}
|
|
4178
4191
|
const g = v(() => i.value > 0), F = v(() => {
|
|
@@ -4180,7 +4193,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4180
4193
|
case 0:
|
|
4181
4194
|
return f.value.length > 0;
|
|
4182
4195
|
case 1:
|
|
4183
|
-
return Object.values(
|
|
4196
|
+
return Object.values(_.value).some((U) => U !== null);
|
|
4184
4197
|
case 2:
|
|
4185
4198
|
return !0;
|
|
4186
4199
|
default:
|
|
@@ -4190,10 +4203,10 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4190
4203
|
{ value: "", label: "Не импортировать" },
|
|
4191
4204
|
...n.fieldOptions
|
|
4192
4205
|
]);
|
|
4193
|
-
function
|
|
4206
|
+
function L() {
|
|
4194
4207
|
s("cancel");
|
|
4195
4208
|
}
|
|
4196
|
-
return (
|
|
4209
|
+
return (U, w) => (o(), c("section", $i, [
|
|
4197
4210
|
d("header", xi, [
|
|
4198
4211
|
d("div", Si, [
|
|
4199
4212
|
d("h1", Ci, h(e.title), 1)
|
|
@@ -4201,7 +4214,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4201
4214
|
d("div", Ai, [
|
|
4202
4215
|
$(r(z), {
|
|
4203
4216
|
variant: "ghost",
|
|
4204
|
-
onClick:
|
|
4217
|
+
onClick: L
|
|
4205
4218
|
}, {
|
|
4206
4219
|
default: m(() => [...w[2] || (w[2] = [
|
|
4207
4220
|
S("Отмена", -1)
|
|
@@ -4246,17 +4259,17 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4246
4259
|
d("p", null, "Выберите поле ресурса для каждой колонки файла")
|
|
4247
4260
|
], -1)),
|
|
4248
4261
|
e.headers.length === 0 ? (o(), c("div", Ei, " Нет данных — host ещё не отдал headers. Загрузите файл сначала. ")) : (o(), c("div", Ri, [
|
|
4249
|
-
(o(!0), c(
|
|
4262
|
+
(o(!0), c(M, null, D(e.headers, (V) => (o(), c("div", {
|
|
4250
4263
|
key: V.key,
|
|
4251
4264
|
class: "admin-import-wizard__map-row"
|
|
4252
4265
|
}, [
|
|
4253
4266
|
d("div", Fi, [
|
|
4254
4267
|
d("strong", null, h(V.label), 1),
|
|
4255
|
-
V.sample ? (o(), c("span", Ui, " «" + h(V.sample) + "» ", 1)) :
|
|
4268
|
+
V.sample ? (o(), c("span", Ui, " «" + h(V.sample) + "» ", 1)) : T("", !0)
|
|
4256
4269
|
]),
|
|
4257
4270
|
w[4] || (w[4] = d("span", { class: "admin-import-wizard__map-arrow" }, "→", -1)),
|
|
4258
4271
|
$(r(Ee), {
|
|
4259
|
-
"model-value":
|
|
4272
|
+
"model-value": _.value[V.key] ?? "",
|
|
4260
4273
|
options: q.value,
|
|
4261
4274
|
placeholder: "Не импортировать",
|
|
4262
4275
|
"onUpdate:modelValue": (W) => k(V.key, W)
|
|
@@ -4284,7 +4297,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4284
4297
|
S(" Часть строк имеет предупреждения — проверьте перед импортом. ", -1)
|
|
4285
4298
|
])]),
|
|
4286
4299
|
_: 1
|
|
4287
|
-
})) :
|
|
4300
|
+
})) : T("", !0),
|
|
4288
4301
|
e.previewColumns.length > 0 ? (o(), b(r(je), {
|
|
4289
4302
|
key: 1,
|
|
4290
4303
|
columns: e.previewColumns,
|
|
@@ -4301,12 +4314,12 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4301
4314
|
w[8] || (w[8] = d("header", { class: "admin-import-wizard__card-hd" }, [
|
|
4302
4315
|
d("h3", null, "4. Импорт")
|
|
4303
4316
|
], -1)),
|
|
4304
|
-
e.progress ? (o(), c(
|
|
4317
|
+
e.progress ? (o(), c(M, { key: 1 }, [
|
|
4305
4318
|
e.progress.total > 0 ? (o(), b(r(un), {
|
|
4306
4319
|
key: 0,
|
|
4307
4320
|
"model-value": e.progress.created + e.progress.updated + e.progress.errors,
|
|
4308
4321
|
max: e.progress.total
|
|
4309
|
-
}, null, 8, ["model-value", "max"])) :
|
|
4322
|
+
}, null, 8, ["model-value", "max"])) : T("", !0),
|
|
4310
4323
|
d("div", Mi, [
|
|
4311
4324
|
$(r(Ce), {
|
|
4312
4325
|
title: "Создано",
|
|
@@ -4338,7 +4351,7 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4338
4351
|
S(" Назад ", -1)
|
|
4339
4352
|
])]),
|
|
4340
4353
|
_: 1
|
|
4341
|
-
})) :
|
|
4354
|
+
})) : T("", !0),
|
|
4342
4355
|
w[13] || (w[13] = d("span", { style: { flex: "1" } }, null, -1)),
|
|
4343
4356
|
i.value === 0 ? (o(), b(r(z), {
|
|
4344
4357
|
key: 1,
|
|
@@ -4363,17 +4376,17 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4363
4376
|
}, 8, ["disabled"])) : i.value === 2 ? (o(), b(r(z), {
|
|
4364
4377
|
key: 3,
|
|
4365
4378
|
variant: "primary",
|
|
4366
|
-
onClick:
|
|
4379
|
+
onClick: y
|
|
4367
4380
|
}, {
|
|
4368
4381
|
default: m(() => [...w[12] || (w[12] = [
|
|
4369
4382
|
S(" Запустить импорт ", -1)
|
|
4370
4383
|
])]),
|
|
4371
4384
|
_: 1
|
|
4372
|
-
})) :
|
|
4385
|
+
})) : T("", !0)
|
|
4373
4386
|
])
|
|
4374
4387
|
]));
|
|
4375
4388
|
}
|
|
4376
|
-
}), Bi = { class: "admin-page admin-field-gallery" }, Ii = { class: "admin-gallery__group-title" }, Di = { class: "admin-gallery__grid" }, Vi = { class: "admin-gallery__card-hd" }, zi = { class: "admin-gallery__card-title" }, qi = { class: "admin-gallery__card-type" }, Oi = { class: "admin-gallery__card-desc" }, Wi = { class: "admin-gallery__card-demo" }, wo = /* @__PURE__ */
|
|
4389
|
+
}), Bi = { class: "admin-page admin-field-gallery" }, Ii = { class: "admin-gallery__group-title" }, Di = { class: "admin-gallery__grid" }, Vi = { class: "admin-gallery__card-hd" }, zi = { class: "admin-gallery__card-title" }, qi = { class: "admin-gallery__card-type" }, Oi = { class: "admin-gallery__card-desc" }, Wi = { class: "admin-gallery__card-demo" }, wo = /* @__PURE__ */ P({
|
|
4377
4390
|
__name: "FieldGalleryPage",
|
|
4378
4391
|
setup(e) {
|
|
4379
4392
|
const t = [
|
|
@@ -4447,13 +4460,13 @@ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" },
|
|
|
4447
4460
|
d("div", { class: "admin-page__count" }, " Каталог встроенных field-компонентов library + примеры использования ")
|
|
4448
4461
|
])
|
|
4449
4462
|
], -1)),
|
|
4450
|
-
(o(!0), c(
|
|
4463
|
+
(o(!0), c(M, null, D(r(n), (i, u) => (o(), c("section", {
|
|
4451
4464
|
key: u,
|
|
4452
4465
|
class: "admin-gallery__group"
|
|
4453
4466
|
}, [
|
|
4454
4467
|
d("h2", Ii, h(u), 1),
|
|
4455
4468
|
d("div", Di, [
|
|
4456
|
-
(o(!0), c(
|
|
4469
|
+
(o(!0), c(M, null, D(i, (f) => (o(), b(r(K), {
|
|
4457
4470
|
key: f.type + f.title,
|
|
4458
4471
|
padding: "md",
|
|
4459
4472
|
class: "admin-gallery__card"
|
|
@@ -4581,7 +4594,7 @@ export {
|
|
|
4581
4594
|
et as toApiError,
|
|
4582
4595
|
So as tryUseFormState,
|
|
4583
4596
|
Ne as tryUseRecord,
|
|
4584
|
-
|
|
4597
|
+
Z as useAuthStore,
|
|
4585
4598
|
ce as useFormState,
|
|
4586
4599
|
He as useLocaleStore,
|
|
4587
4600
|
oe as useManifestStore,
|