@vc-shell/framework 2.0.0-alpha.12 → 2.0.0-alpha.15
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/CHANGELOG.md +23 -0
- package/dist/VcTableAdapter.css +1 -1
- package/dist/ai-agent/index.js +2 -2
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-DdyWhitN.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-B4GDIm57.js} +939 -948
- package/dist/chunks/{VcTableAdapter.vue_vue_type_style_index_0_lang-DC948i43.js → VcTableAdapter.vue_vue_type_style_index_0_lang-CdlLNeu6.js} +2717 -2717
- package/dist/chunks/{index-w6KNzNbs.js → index-C981z9CQ.js} +1 -1
- package/dist/chunks/{index-nypcvCTu.js → index-DO3YFNu1.js} +2 -2
- package/dist/chunks/{vc-toast.vue_vue_type_style_index_0_lang-DcqdH5V3.js → vc-toast.vue_vue_type_style_index_0_lang-DEWdfXsK.js} +1 -1
- package/dist/core/blade-navigation/types/index.d.ts +2 -2
- package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/core/composables/useBlade/index.d.ts +1 -1
- package/dist/core/composables/useBlade/index.d.ts.map +1 -1
- package/dist/core/notifications/store.d.ts +1 -1
- package/dist/core/notifications/store.d.ts.map +1 -1
- package/dist/core/notifications/toast-controller.d.ts +1 -1
- package/dist/core/notifications/toast-controller.d.ts.map +1 -1
- package/dist/framework.js +1191 -1195
- package/dist/index.css +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/modules/assets/components/assets-details/assets-details.vue.d.ts +1 -3
- package/dist/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
- package/dist/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +1 -3
- package/dist/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/composables/useToolbarRegistration.d.ts +2 -2
- package/dist/ui/components/organisms/vc-blade/_internal/composables/useToolbarRegistration.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/toolbar/ToolbarMobile.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/components/mobile/PullToRefresh.vue.d.ts.map +1 -1
- package/dist/ui/index.js +3 -3
- package/globals-augments.d.ts +33 -0
- package/globals.d.ts +12 -29
- package/package.json +6 -4
- package/shims-vue.d.ts +16 -0
- package/typings/shims-vue.d.ts +38 -0
package/dist/framework.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { _ as Oa, a as Ia, b as ya, c as Ra, d as Pa, e as Da, f as Ca, g as Na, h as Va, i as ka, j as Ma, C as Ba, k as $a, l as Fa, m as xa, n as Ga, o as Ha, p as Ua, q as Wa, T as za, r as Ka, s as qa, t as Ya, u as ja, v as Za, w as Xa, x as Ja, V as Qa, y as es, z as ts, A as as, B as ss, D as os, E as ns, F as is, G as rs, H as ls, I as cs, J as ds, K as us, L as fs, M as ms, N as gs, O as ps, P as Es, Q as Ot, R as hs, S as Ss, U as _s, W as As, X as bs, Y as Ts, Z as ws, $ as It, a0 as vs, a1 as Ls, a2 as Os, a3 as Is, a4 as ys, a5 as Rs, a6 as Ps, a7 as yt, a8 as Ds, a9 as Cs, aa as Qe, ab as Ns, ac as Vs, ad as fe, ae as ks, af as Ms, ag as Bs, ah as $s, ai as Fs, aj as xs, ak as Gs, al as Hs, am as Us, an as Ws, ao as zs, ap as Ks, aq as qs, ar as Ys, as as js, at as Zs, au as Xs, av as Js, aw as Qs, ax as eo, ay as Rt, az as to, aA as ao, aB as so, aC as oo, aD as no, aE as io, aF as Pt, aG as ro, aH as lo, aI as co, aJ as uo, aK as fo, aL as mo, aM as go, aN as po, aO as Eo, aQ as ho, aR as So, aT as _o, aU as Ao, aV as bo, aX as To, aY as wo, aZ as vo, a_ as Lo, a$ as Oo, b0 as Io, b1 as yo, b2 as Ro, b3 as Po, b6 as Do, b7 as Co, b8 as Dt, b9 as No, ba as Vo, bb as ko, bc as Mo, bd as Bo, be as $o, bf as Fo, bg as xo, bh as Go } from "./chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { bi as $d, bj as Fd, bk as xd, bl as Gd, bm as Hd, bn as Ud, bo as Wd, bp as zd, bq as Kd, br as qd, bs as Yd, bt as jd, bu as Zd, bv as Xd, bw as Jd, bx as Qd, by as eu, bz as tu, bA as au, bB as su, bC as ou, bD as nu, bE as iu, bF as ru, bG as lu, bH as cu, bI as du, bJ as uu, bK as fu, bL as mu, bM as gu, aP as pu, aS as Eu, bN as hu, bO as Su, bP as _u, bQ as Au, bR as bu, aW as Tu, bS as wu, bT as vu, b4 as Lu, b5 as Ou, bU as Iu } from "./chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import { m as et, p as we, s as Ho, l as
|
|
4
|
-
import { A as Ru, j as Pu, a1 as Du, a2 as Cu, a3 as Nu, a4 as Vu, a5 as ku, a6 as Mu, a7 as Bu, a8 as $u, a9 as Fu, aa as xu, ab as Gu, ac as Hu, k as Uu, ad as Wu, ae as zu, af as Ku, ag as qu, ah as Yu, ai as ju, aj as Zu, ak as Xu, al as Ju, am as Qu, an as ef, ao as tf, ap as af, aq as sf, D as of, ar as nf, as as rf, at as lf, au as cf, av as df, aw as uf, ax as ff, ay as mf, az as gf, aA as pf, aB as Ef, aC as hf, aD as Sf, aE as _f, aF as Af, aG as bf, aH as Tf, aI as wf, aJ as vf, aK as Lf, aL as Of, aM as If, aN as yf, aO as Rf, aP as Pf, aQ as Df, aR as Cf, aS as Nf, aT as Vf, aU as kf, aV as Mf, aW as Bf, aX as $f, aY as Ff, aZ as xf, a_ as Gf, a$ as Hf, b0 as Uf, b1 as Wf, b2 as zf, b3 as Kf, b4 as qf, b5 as Yf, b6 as jf, b7 as Zf, b8 as Xf, b9 as Jf, ba as Qf, bb as em, bc as tm, bd as am, be as sm, bf as om, bg as nm, bh as im, bi as rm, bj as lm, bk as cm, bl as dm, bm as um, bn as fm, bo as mm, bp as gm, bq as pm, br as Em, bs as hm, bt as Sm, bu as _m, bv as Am, bw as bm, bx as Tm, by as wm, bz as vm, bA as Lm, bB as Om, bC as Im, bD as ym, bE as Rm, bF as Pm, bG as Dm, bH as Cm, bI as Nm, bJ as Vm, bK as km, bL as Mm, bM as Bm, bN as $m, bO as Fm, bP as xm, bQ as Gm, bR as Hm, bS as Um, bT as Wm, bU as zm, bV as Km, g as qm, bW as Ym, bW as jm, bX as Zm, bY as Xm, bZ as Jm, b_ as Qm, b$ as eg, c0 as tg, c1 as ag, h as sg, c2 as og, c3 as ng, c4 as ig, c5 as rg, c6 as lg, c7 as cg, c8 as dg, c9 as ug, ca as fg, cb as mg, cc as gg, cd as pg, u as Eg, i as hg, ce as Sg, cf as _g, cg as Ag, ch as bg, ci as Tg, e as wg, cj as vg, f as Lg, ck as Og, cl as Ig } from "./chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-
|
|
5
|
-
import { _ as pn } from "./chunks/vc-toast.vue_vue_type_style_index_0_lang-
|
|
6
|
-
import { getCurrentScope as En, onScopeDispose as hn, computed as
|
|
1
|
+
import { _ as Oa, a as Ia, b as ya, c as Ra, d as Pa, e as Da, f as Ca, g as Na, h as Va, i as ka, j as Ma, C as Ba, k as $a, l as Fa, m as xa, n as Ga, o as Ha, p as Ua, q as Wa, T as za, r as Ka, s as qa, t as Ya, u as ja, v as Za, w as Xa, x as Ja, V as Qa, y as es, z as ts, A as as, B as ss, D as os, E as ns, F as is, G as rs, H as ls, I as cs, J as ds, K as us, L as fs, M as ms, N as gs, O as ps, P as Es, Q as Ot, R as hs, S as Ss, U as _s, W as As, X as bs, Y as Ts, Z as ws, $ as It, a0 as vs, a1 as Ls, a2 as Os, a3 as Is, a4 as ys, a5 as Rs, a6 as Ps, a7 as yt, a8 as Ds, a9 as Cs, aa as Qe, ab as Ns, ac as Vs, ad as fe, ae as ks, af as Ms, ag as Bs, ah as $s, ai as Fs, aj as xs, ak as Gs, al as Hs, am as Us, an as Ws, ao as zs, ap as Ks, aq as qs, ar as Ys, as as js, at as Zs, au as Xs, av as Js, aw as Qs, ax as eo, ay as Rt, az as to, aA as ao, aB as so, aC as oo, aD as no, aE as io, aF as Pt, aG as ro, aH as lo, aI as co, aJ as uo, aK as fo, aL as mo, aM as go, aN as po, aO as Eo, aQ as ho, aR as So, aT as _o, aU as Ao, aV as bo, aX as To, aY as wo, aZ as vo, a_ as Lo, a$ as Oo, b0 as Io, b1 as yo, b2 as Ro, b3 as Po, b6 as Do, b7 as Co, b8 as Dt, b9 as No, ba as Vo, bb as ko, bc as Mo, bd as Bo, be as $o, bf as Fo, bg as xo, bh as Go } from "./chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-CdlLNeu6.js";
|
|
2
|
+
import { bi as $d, bj as Fd, bk as xd, bl as Gd, bm as Hd, bn as Ud, bo as Wd, bp as zd, bq as Kd, br as qd, bs as Yd, bt as jd, bu as Zd, bv as Xd, bw as Jd, bx as Qd, by as eu, bz as tu, bA as au, bB as su, bC as ou, bD as nu, bE as iu, bF as ru, bG as lu, bH as cu, bI as du, bJ as uu, bK as fu, bL as mu, bM as gu, aP as pu, aS as Eu, bN as hu, bO as Su, bP as _u, bQ as Au, bR as bu, aW as Tu, bS as wu, bT as vu, b4 as Lu, b5 as Ou, bU as Iu } from "./chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-CdlLNeu6.js";
|
|
3
|
+
import { m as et, p as we, s as Ho, l as ee, S as Uo, W as Wo, I as Ie, n as tt, o as Ct, q as Nt, r as zo, t as J, v as re, w as Vt, x as kt, B as Ko, _ as qo, a as Mt, b as at, c as Yo, d as Ge, y as jo, z as ce, C as Bt, E as $t, F as Ft, L as Zo, G as Xo, H as Jo, J as Qo, K as en, M as tn, T as an, O as sn, P as on, Q as nn, R as rn, U as ln, V as cn, X as dn, Y as un, Z as fn, $ as mn, a0 as gn } from "./chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-B4GDIm57.js";
|
|
4
|
+
import { A as Ru, j as Pu, a1 as Du, a2 as Cu, a3 as Nu, a4 as Vu, a5 as ku, a6 as Mu, a7 as Bu, a8 as $u, a9 as Fu, aa as xu, ab as Gu, ac as Hu, k as Uu, ad as Wu, ae as zu, af as Ku, ag as qu, ah as Yu, ai as ju, aj as Zu, ak as Xu, al as Ju, am as Qu, an as ef, ao as tf, ap as af, aq as sf, D as of, ar as nf, as as rf, at as lf, au as cf, av as df, aw as uf, ax as ff, ay as mf, az as gf, aA as pf, aB as Ef, aC as hf, aD as Sf, aE as _f, aF as Af, aG as bf, aH as Tf, aI as wf, aJ as vf, aK as Lf, aL as Of, aM as If, aN as yf, aO as Rf, aP as Pf, aQ as Df, aR as Cf, aS as Nf, aT as Vf, aU as kf, aV as Mf, aW as Bf, aX as $f, aY as Ff, aZ as xf, a_ as Gf, a$ as Hf, b0 as Uf, b1 as Wf, b2 as zf, b3 as Kf, b4 as qf, b5 as Yf, b6 as jf, b7 as Zf, b8 as Xf, b9 as Jf, ba as Qf, bb as em, bc as tm, bd as am, be as sm, bf as om, bg as nm, bh as im, bi as rm, bj as lm, bk as cm, bl as dm, bm as um, bn as fm, bo as mm, bp as gm, bq as pm, br as Em, bs as hm, bt as Sm, bu as _m, bv as Am, bw as bm, bx as Tm, by as wm, bz as vm, bA as Lm, bB as Om, bC as Im, bD as ym, bE as Rm, bF as Pm, bG as Dm, bH as Cm, bI as Nm, bJ as Vm, bK as km, bL as Mm, bM as Bm, bN as $m, bO as Fm, bP as xm, bQ as Gm, bR as Hm, bS as Um, bT as Wm, bU as zm, bV as Km, g as qm, bW as Ym, bW as jm, bX as Zm, bY as Xm, bZ as Jm, b_ as Qm, b$ as eg, c0 as tg, c1 as ag, h as sg, c2 as og, c3 as ng, c4 as ig, c5 as rg, c6 as lg, c7 as cg, c8 as dg, c9 as ug, ca as fg, cb as mg, cc as gg, cd as pg, u as Eg, i as hg, ce as Sg, cf as _g, cg as Ag, ch as bg, ci as Tg, e as wg, cj as vg, f as Lg, ck as Og, cl as Ig } from "./chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-B4GDIm57.js";
|
|
5
|
+
import { _ as pn } from "./chunks/vc-toast.vue_vue_type_style_index_0_lang-DEWdfXsK.js";
|
|
6
|
+
import { getCurrentScope as En, onScopeDispose as hn, computed as R, ref as H, readonly as He, onMounted as de, onBeforeMount as Sn, onBeforeUnmount as _n, unref as l, inject as te, onUnmounted as xt, provide as An, toValue as bn, isRef as Tn, watch as le, defineComponent as K, resolveComponent as F, openBlock as m, createBlock as k, withCtx as h, createElementVNode as O, createVNode as A, createTextVNode as W, toDisplayString as N, createCommentVNode as U, resolveDirective as Gt, withDirectives as Ht, createElementBlock as B, withModifiers as ve, Fragment as X, createSlots as wn, renderSlot as Z, renderList as ne, reactive as Se, withKeys as st, mergeProps as oe, nextTick as ot, shallowRef as vn, resolveDynamicComponent as Ln, normalizeClass as Ue, normalizeStyle as nt } from "vue";
|
|
7
7
|
import { b as On, c as In } from "./chunks/vendor-vueuse-core-CPOkeLul.js";
|
|
8
|
-
import { a as yn } from "./chunks/index-
|
|
9
|
-
import { u as Rg } from "./chunks/index-
|
|
8
|
+
import { a as yn } from "./chunks/index-C981z9CQ.js";
|
|
9
|
+
import { u as Rg } from "./chunks/index-C981z9CQ.js";
|
|
10
10
|
import "./chunks/vendor-dompurify-BIuh5IAZ.js";
|
|
11
11
|
import { u as ue } from "./chunks/vendor-vue-i18n-BSCeQYoP.js";
|
|
12
|
-
import { useForm as me, useIsFormValid as _e, useIsFormDirty as it, Field as
|
|
13
|
-
import { c as
|
|
12
|
+
import { useForm as me, useIsFormValid as _e, useIsFormDirty as it, Field as Q } from "vee-validate";
|
|
13
|
+
import { c as se, d as Rn, a as Pn, b as Dn } from "./chunks/vendor-lodash-es-QnNVqiqU.js";
|
|
14
14
|
import { v as Cn } from "./chunks/vendor-vue3-touch-events-DqysuuWh.js";
|
|
15
15
|
import { A as Nn, u as Vn } from "./chunks/vendor-vue3-application-insights-Cq46Q3rj.js";
|
|
16
16
|
import { E as kn, x as Mn, L as Bn, S as $n, $ as Fn } from "./chunks/vendor-web-vitals-vrpLO1bu.js";
|
|
@@ -82,7 +82,7 @@ import { _ as xn } from "./chunks/index-BWc6RmUE.js";
|
|
|
82
82
|
import { E as Dg, d as Cg, u as Ng } from "./chunks/index-BWc6RmUE.js";
|
|
83
83
|
import { G as Gn } from "./chunks/vendor-gridstack-Dkfw452e.js";
|
|
84
84
|
import { S as Ut, z as rt, A as Hn, C as Un, a as ye, w as Wn, b as zn, D as Kn, c as qn, E as Yn } from "./chunks/vendor-unovis-vue-CMGNLXsC.js";
|
|
85
|
-
import { default as kg } from "./chunks/index-
|
|
85
|
+
import { default as kg } from "./chunks/index-DO3YFNu1.js";
|
|
86
86
|
function Yc(e) {
|
|
87
87
|
return e.replace(/[\w]([A-Z])/g, function(t) {
|
|
88
88
|
return t[0] + "_" + t[1];
|
|
@@ -119,8 +119,8 @@ function ze(e) {
|
|
|
119
119
|
}
|
|
120
120
|
function Ke(e, t = 2) {
|
|
121
121
|
if (!e) return "0 Bytes";
|
|
122
|
-
const a = 1024, o = t < 0 ? 0 : t, n = ["Bytes", "KB", "MB", "GB"],
|
|
123
|
-
return `${parseFloat((e / Math.pow(a,
|
|
122
|
+
const a = 1024, o = t < 0 ? 0 : t, n = ["Bytes", "KB", "MB", "GB"], d = Math.floor(Math.log(e) / Math.log(a));
|
|
123
|
+
return `${parseFloat((e / Math.pow(a, d)).toFixed(o))} ${n[d]}`;
|
|
124
124
|
}
|
|
125
125
|
function Jn(e, t) {
|
|
126
126
|
let a = null;
|
|
@@ -166,38 +166,38 @@ function Jc(e) {
|
|
|
166
166
|
handler: e.onMessage
|
|
167
167
|
});
|
|
168
168
|
En() && hn(a);
|
|
169
|
-
const o =
|
|
170
|
-
() => t.realtime.value.filter((
|
|
171
|
-
), n =
|
|
172
|
-
function
|
|
173
|
-
t.markAsRead(
|
|
169
|
+
const o = R(
|
|
170
|
+
() => t.realtime.value.filter((i) => !(!i.notifyType || !e.types.includes(i.notifyType) || !i.isNew || e.filter && !e.filter(i)))
|
|
171
|
+
), n = R(() => o.value.length);
|
|
172
|
+
function d(i) {
|
|
173
|
+
t.markAsRead(i);
|
|
174
174
|
}
|
|
175
175
|
return {
|
|
176
176
|
messages: o,
|
|
177
177
|
unreadCount: n,
|
|
178
|
-
markAsRead:
|
|
178
|
+
markAsRead: d
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
181
|
let Ne;
|
|
182
|
-
const ai =
|
|
182
|
+
const ai = ee("use-async");
|
|
183
183
|
function zt(e, t) {
|
|
184
|
-
const a =
|
|
185
|
-
async function
|
|
184
|
+
const a = H(!1), o = H(null), n = t?.notify !== !1, d = t?.notifyTimeout ?? 8e3;
|
|
185
|
+
async function i(s, ...r) {
|
|
186
186
|
a.value = !0, o.value = null;
|
|
187
187
|
try {
|
|
188
|
-
return await e(s, ...
|
|
189
|
-
} catch (
|
|
190
|
-
const
|
|
191
|
-
if (o.value =
|
|
192
|
-
const
|
|
193
|
-
Ne || (Ne = (await import("./chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-
|
|
194
|
-
timeout:
|
|
195
|
-
notificationId:
|
|
188
|
+
return await e(s, ...r);
|
|
189
|
+
} catch (c) {
|
|
190
|
+
const E = we(c);
|
|
191
|
+
if (o.value = E, ai.error("Async action failed:", c), n && c && typeof c == "object") {
|
|
192
|
+
const p = `async-error-${E.message.slice(0, 80)}`, _ = setTimeout(async () => {
|
|
193
|
+
Ne || (Ne = (await import("./chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-B4GDIm57.js").then((z) => z.cu)).notification), Ne.error(E.message, {
|
|
194
|
+
timeout: d,
|
|
195
|
+
notificationId: p
|
|
196
196
|
});
|
|
197
197
|
}, 0);
|
|
198
|
-
Ho(
|
|
198
|
+
Ho(c, _, p);
|
|
199
199
|
}
|
|
200
|
-
throw
|
|
200
|
+
throw c;
|
|
201
201
|
} finally {
|
|
202
202
|
a.value = !1;
|
|
203
203
|
}
|
|
@@ -205,7 +205,7 @@ function zt(e, t) {
|
|
|
205
205
|
return {
|
|
206
206
|
loading: He(a),
|
|
207
207
|
error: He(o),
|
|
208
|
-
action:
|
|
208
|
+
action: i
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
211
|
function si(e) {
|
|
@@ -217,45 +217,45 @@ function si(e) {
|
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
219
|
function Kt(...e) {
|
|
220
|
-
return
|
|
220
|
+
return R(() => e.some((t) => t.value));
|
|
221
221
|
}
|
|
222
222
|
function be() {
|
|
223
|
-
const e =
|
|
223
|
+
const e = H(), t = H(!1), { getApiClient: a } = si(Uo), { loading: o, action: n } = zt(async () => {
|
|
224
224
|
if (t.value) return;
|
|
225
|
-
const
|
|
225
|
+
const i = await (await a()).getUICustomizationSetting(), s = await JSON.parse(i.defaultValue ?? null);
|
|
226
226
|
s && !e.value && (e.value = {
|
|
227
227
|
contrast_logo: s.contrast_logo,
|
|
228
228
|
logo: s.logo,
|
|
229
229
|
title: s.title
|
|
230
230
|
});
|
|
231
231
|
});
|
|
232
|
-
function
|
|
232
|
+
function d(i) {
|
|
233
233
|
t.value = !0, e.value = {
|
|
234
234
|
...e.value,
|
|
235
|
-
logo:
|
|
236
|
-
title:
|
|
237
|
-
avatar:
|
|
238
|
-
role:
|
|
235
|
+
logo: i.logo,
|
|
236
|
+
title: i.title,
|
|
237
|
+
avatar: i.avatar,
|
|
238
|
+
role: i.role
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
return de(async () => {
|
|
242
242
|
!e.value && !t.value && await n();
|
|
243
243
|
}), {
|
|
244
|
-
uiSettings:
|
|
245
|
-
applySettings:
|
|
244
|
+
uiSettings: R(() => e.value ?? {}),
|
|
245
|
+
applySettings: d,
|
|
246
246
|
loading: Kt(o)
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
const mt =
|
|
249
|
+
const mt = ee("use-assets"), oi = 4;
|
|
250
250
|
async function ni(e, t, a, o) {
|
|
251
251
|
const n = new FormData();
|
|
252
252
|
n.append("file", e);
|
|
253
|
-
const
|
|
253
|
+
const i = await (await fetch(`/api/assets?folderUrl=/${t}`, {
|
|
254
254
|
method: "POST",
|
|
255
255
|
body: n
|
|
256
256
|
})).json();
|
|
257
|
-
if (
|
|
258
|
-
const s =
|
|
257
|
+
if (i?.length) {
|
|
258
|
+
const s = i[0];
|
|
259
259
|
return s.createdDate = /* @__PURE__ */ new Date(), s.sortOrder = o !== void 0 && o >= 0 ? o + a + 1 : 0, s.url = s.url ? decodeURI(s.url) : "", "size" in s && (s.size = e.size), s;
|
|
260
260
|
}
|
|
261
261
|
return null;
|
|
@@ -263,53 +263,53 @@ async function ni(e, t, a, o) {
|
|
|
263
263
|
async function ii(e, t, a) {
|
|
264
264
|
const o = [];
|
|
265
265
|
for (let n = 0; n < e.length; n += a) {
|
|
266
|
-
const
|
|
267
|
-
o.push(...
|
|
266
|
+
const d = e.slice(n, n + a), i = await Promise.all(d.map((s, r) => t(s, n + r)));
|
|
267
|
+
o.push(...i);
|
|
268
268
|
}
|
|
269
269
|
return o;
|
|
270
270
|
}
|
|
271
271
|
function Qc() {
|
|
272
|
-
const e =
|
|
273
|
-
async function t(n,
|
|
272
|
+
const e = H(!1);
|
|
273
|
+
async function t(n, d, i) {
|
|
274
274
|
try {
|
|
275
275
|
e.value = !0;
|
|
276
276
|
const s = Array.from(n);
|
|
277
277
|
return (await ii(
|
|
278
278
|
s,
|
|
279
|
-
(
|
|
279
|
+
(c, E) => ni(c, d, E, i),
|
|
280
280
|
oi
|
|
281
|
-
)).filter((
|
|
281
|
+
)).filter((c) => c !== null);
|
|
282
282
|
} catch (s) {
|
|
283
283
|
throw mt.error("Upload failed:", s), s;
|
|
284
284
|
} finally {
|
|
285
285
|
e.value = !1;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
function a(n,
|
|
288
|
+
function a(n, d, i = "url") {
|
|
289
289
|
try {
|
|
290
290
|
e.value = !0;
|
|
291
|
-
let s =
|
|
292
|
-
return s && s.length && n.length > 0 && (s = Rn(s, n, (
|
|
291
|
+
let s = se(d) || [];
|
|
292
|
+
return s && s.length && n.length > 0 && (s = Rn(s, n, (r, c) => r[i] === c[i])), s;
|
|
293
293
|
} catch (s) {
|
|
294
294
|
throw mt.error("Remove failed:", s), s;
|
|
295
295
|
} finally {
|
|
296
296
|
e.value = !1;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
function o(n,
|
|
300
|
-
if (n.length ===
|
|
299
|
+
function o(n, d) {
|
|
300
|
+
if (n.length === d.length)
|
|
301
301
|
return n.map((s) => ({ ...s }));
|
|
302
|
-
const
|
|
303
|
-
return
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
}),
|
|
302
|
+
const i = se(d) || [];
|
|
303
|
+
return i && i.length && n.forEach((s) => {
|
|
304
|
+
const r = i.findIndex((c) => c.url === s.url);
|
|
305
|
+
r !== -1 && (i[r] = { ...i[r], ...s });
|
|
306
|
+
}), i;
|
|
307
307
|
}
|
|
308
308
|
return {
|
|
309
309
|
upload: t,
|
|
310
310
|
remove: a,
|
|
311
311
|
edit: o,
|
|
312
|
-
loading:
|
|
312
|
+
loading: R(() => e.value)
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
315
|
const ed = (e) => {
|
|
@@ -427,18 +427,18 @@ function ad(e) {
|
|
|
427
427
|
return ri[e];
|
|
428
428
|
}
|
|
429
429
|
function sd() {
|
|
430
|
-
const e =
|
|
430
|
+
const e = te(Wo);
|
|
431
431
|
if (!e)
|
|
432
432
|
throw new Ie("WidgetIdKey");
|
|
433
|
-
const t =
|
|
433
|
+
const t = te(tt);
|
|
434
434
|
if (!t)
|
|
435
435
|
throw new Ie("WidgetService");
|
|
436
|
-
const o =
|
|
437
|
-
function n(
|
|
436
|
+
const o = te(Ct, void 0)?.value.id ?? "";
|
|
437
|
+
function n(d) {
|
|
438
438
|
t.updateWidget({
|
|
439
439
|
id: e,
|
|
440
440
|
bladeId: o,
|
|
441
|
-
widget: { trigger:
|
|
441
|
+
widget: { trigger: d }
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
return { widgetId: e, setTrigger: n };
|
|
@@ -462,21 +462,21 @@ function ci(e) {
|
|
|
462
462
|
return e.valueType === "Color";
|
|
463
463
|
}
|
|
464
464
|
const od = (e, t, a, o) => {
|
|
465
|
-
const { loading: n, action:
|
|
465
|
+
const { loading: n, action: d } = zt(async (u) => {
|
|
466
466
|
if (u)
|
|
467
467
|
return await e(u);
|
|
468
468
|
});
|
|
469
|
-
async function
|
|
469
|
+
async function i(u, g, P) {
|
|
470
470
|
if (!u) return;
|
|
471
|
-
const
|
|
471
|
+
const w = await d({
|
|
472
472
|
propertyIds: [u],
|
|
473
473
|
keyword: g,
|
|
474
474
|
skip: 0
|
|
475
475
|
});
|
|
476
|
-
return !
|
|
477
|
-
const
|
|
476
|
+
return !P || !w ? w : w.map((I) => {
|
|
477
|
+
const M = I.localizedValues?.find((ie) => ie.languageCode === P)?.value;
|
|
478
478
|
return Object.assign(new a(I), {
|
|
479
|
-
value:
|
|
479
|
+
value: M ?? I.alias
|
|
480
480
|
});
|
|
481
481
|
});
|
|
482
482
|
}
|
|
@@ -484,110 +484,110 @@ const od = (e, t, a, o) => {
|
|
|
484
484
|
if (!(!u || !o))
|
|
485
485
|
return await o(u, g);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
const
|
|
487
|
+
function r(u, g) {
|
|
488
|
+
const P = u.values?.find((w) => w.languageCode === g);
|
|
489
489
|
if (gt(u))
|
|
490
|
-
return u.values?.filter((
|
|
491
|
-
if (!
|
|
492
|
-
const
|
|
493
|
-
if (
|
|
490
|
+
return u.values?.filter((w) => w.languageCode === g);
|
|
491
|
+
if (!P) {
|
|
492
|
+
const w = u.values?.find((I) => I.propertyId === u.id);
|
|
493
|
+
if (w) {
|
|
494
494
|
const I = new t({
|
|
495
495
|
propertyName: u.name,
|
|
496
496
|
propertyId: u.id,
|
|
497
497
|
languageCode: g,
|
|
498
|
-
alias:
|
|
498
|
+
alias: w.alias,
|
|
499
499
|
valueType: u.valueType,
|
|
500
|
-
valueId:
|
|
500
|
+
valueId: w.valueId
|
|
501
501
|
});
|
|
502
502
|
u.values?.push(I);
|
|
503
503
|
}
|
|
504
504
|
if (u.valueType === "Boolean")
|
|
505
505
|
return !1;
|
|
506
506
|
}
|
|
507
|
-
return pt(u) ?
|
|
507
|
+
return pt(u) ? P?.valueId : P?.value;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function c(u) {
|
|
510
510
|
if (gt(u))
|
|
511
511
|
return u.values;
|
|
512
512
|
const g = u.values?.[0];
|
|
513
513
|
return g ? pt(u) ? g.valueId : g.value : u.valueType === "Boolean" ? !1 : "";
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
return pe(u) ?
|
|
515
|
+
function E(u, g) {
|
|
516
|
+
return pe(u) ? r(u, g) : c(u);
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function p(u) {
|
|
519
519
|
return new t({
|
|
520
520
|
isInherited: !1,
|
|
521
521
|
...u
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function _(u, g, P) {
|
|
525
525
|
u.values = [
|
|
526
|
-
|
|
526
|
+
p({
|
|
527
527
|
value: g,
|
|
528
|
-
unitOfMeasureId:
|
|
528
|
+
unitOfMeasureId: P
|
|
529
529
|
})
|
|
530
530
|
];
|
|
531
531
|
}
|
|
532
|
-
function f(u, g,
|
|
532
|
+
function f(u, g, P) {
|
|
533
533
|
Array.isArray(g) ? u.values = g.map(
|
|
534
|
-
(
|
|
535
|
-
...
|
|
536
|
-
value:
|
|
537
|
-
colorCode:
|
|
534
|
+
(w) => p({
|
|
535
|
+
...w,
|
|
536
|
+
value: w.value,
|
|
537
|
+
colorCode: w.colorCode
|
|
538
538
|
})
|
|
539
539
|
) : u.values = [
|
|
540
|
-
|
|
540
|
+
p({
|
|
541
541
|
value: g,
|
|
542
|
-
colorCode:
|
|
542
|
+
colorCode: P
|
|
543
543
|
})
|
|
544
544
|
];
|
|
545
545
|
}
|
|
546
|
-
function
|
|
547
|
-
const I =
|
|
548
|
-
pe(u) ?
|
|
546
|
+
function z(u, g, P, w) {
|
|
547
|
+
const I = P.map((M) => new a(M));
|
|
548
|
+
pe(u) ? x(u, g, I, w) : D(u, g, I);
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
Array.isArray(g) ?
|
|
550
|
+
function x(u, g, P, w) {
|
|
551
|
+
Array.isArray(g) ? v(u, g, P) : V(u, g, P, w);
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
u.values = g.flatMap((
|
|
555
|
-
const I =
|
|
553
|
+
function v(u, g, P) {
|
|
554
|
+
u.values = g.flatMap((w) => {
|
|
555
|
+
const I = P.find((M) => M.id === w.valueId || M.id === w.id);
|
|
556
556
|
return I?.localizedValues?.length ? I.localizedValues.map(
|
|
557
|
-
(
|
|
557
|
+
(M) => p({
|
|
558
558
|
propertyId: I.propertyId,
|
|
559
559
|
alias: I.alias,
|
|
560
|
-
languageCode:
|
|
561
|
-
value:
|
|
560
|
+
languageCode: M.languageCode,
|
|
561
|
+
value: M.value ?? I.alias,
|
|
562
562
|
valueId: I.id,
|
|
563
563
|
colorCode: I.colorCode
|
|
564
564
|
})
|
|
565
|
-
) :
|
|
565
|
+
) : p(w);
|
|
566
566
|
});
|
|
567
567
|
}
|
|
568
|
-
function
|
|
569
|
-
const I =
|
|
568
|
+
function V(u, g, P, w) {
|
|
569
|
+
const I = P.find((M) => M.id === g);
|
|
570
570
|
if (!I) {
|
|
571
571
|
u.values = [];
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
574
574
|
if (I.localizedValues?.length)
|
|
575
575
|
u.values = I.localizedValues.map(
|
|
576
|
-
(
|
|
576
|
+
(M) => p({
|
|
577
577
|
propertyId: I.propertyId,
|
|
578
578
|
alias: I.alias,
|
|
579
|
-
languageCode:
|
|
580
|
-
value:
|
|
579
|
+
languageCode: M.languageCode,
|
|
580
|
+
value: M.value ?? I.alias,
|
|
581
581
|
valueId: I.id,
|
|
582
582
|
colorCode: I.colorCode
|
|
583
583
|
})
|
|
584
584
|
);
|
|
585
585
|
else {
|
|
586
|
-
const
|
|
586
|
+
const M = [
|
|
587
587
|
...new Set((u.values ?? []).map((ge) => ge.languageCode).filter(Boolean))
|
|
588
|
-
],
|
|
589
|
-
u.values =
|
|
590
|
-
(ge) =>
|
|
588
|
+
], ie = M.length > 0 ? M : w ? [w] : [];
|
|
589
|
+
u.values = ie.map(
|
|
590
|
+
(ge) => p({
|
|
591
591
|
propertyId: I.propertyId,
|
|
592
592
|
alias: I.alias,
|
|
593
593
|
languageCode: ge,
|
|
@@ -598,147 +598,147 @@ const od = (e, t, a, o) => {
|
|
|
598
598
|
);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
Array.isArray(g) ?
|
|
601
|
+
function D(u, g, P) {
|
|
602
|
+
Array.isArray(g) ? b(
|
|
603
603
|
u,
|
|
604
604
|
g,
|
|
605
|
-
|
|
606
|
-
) :
|
|
605
|
+
P
|
|
606
|
+
) : $(u, g, P);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
u.values = g.flatMap((
|
|
610
|
-
const I =
|
|
611
|
-
return
|
|
608
|
+
function b(u, g, P) {
|
|
609
|
+
u.values = g.flatMap((w) => {
|
|
610
|
+
const I = P.find((M) => M.id === w.valueId || M.id === w.id);
|
|
611
|
+
return p(I ? {
|
|
612
612
|
propertyId: I.propertyId,
|
|
613
613
|
alias: I.alias,
|
|
614
|
-
value:
|
|
614
|
+
value: w.value ?? I.alias,
|
|
615
615
|
valueId: I.id,
|
|
616
616
|
colorCode: I.colorCode
|
|
617
|
-
} :
|
|
617
|
+
} : w);
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function $(u, g, P) {
|
|
621
621
|
if (Ve(g)) {
|
|
622
622
|
u.values = [];
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
|
-
const
|
|
625
|
+
const w = P.find((I) => I.id === g);
|
|
626
626
|
u.values = [
|
|
627
|
-
|
|
628
|
-
propertyId:
|
|
629
|
-
alias:
|
|
630
|
-
value:
|
|
627
|
+
p({
|
|
628
|
+
propertyId: w?.propertyId,
|
|
629
|
+
alias: w?.alias,
|
|
630
|
+
value: w?.value ?? w?.alias,
|
|
631
631
|
valueId: g,
|
|
632
|
-
colorCode:
|
|
632
|
+
colorCode: w?.colorCode
|
|
633
633
|
})
|
|
634
634
|
];
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
pe(u) ?
|
|
636
|
+
function q(u, g, P, w) {
|
|
637
|
+
pe(u) ? Y(u, g, P) : j(u, g, P, w);
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function Y(u, g, P) {
|
|
640
640
|
if (Array.isArray(g))
|
|
641
641
|
u.values = u.values && [
|
|
642
|
-
...u.values.filter((
|
|
642
|
+
...u.values.filter((w) => w.languageCode !== P),
|
|
643
643
|
...g.map(
|
|
644
|
-
(
|
|
644
|
+
(w) => p({ ...w, languageCode: P })
|
|
645
645
|
)
|
|
646
646
|
];
|
|
647
647
|
else {
|
|
648
|
-
const
|
|
649
|
-
|
|
650
|
-
|
|
648
|
+
const w = u.values?.find((I) => I.languageCode === P);
|
|
649
|
+
w ? w.value = g : u.values = [
|
|
650
|
+
p({
|
|
651
651
|
value: g,
|
|
652
|
-
languageCode:
|
|
652
|
+
languageCode: P
|
|
653
653
|
})
|
|
654
654
|
];
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
Array.isArray(g) ? u.values = g.map((I) =>
|
|
657
|
+
function j(u, g, P, w) {
|
|
658
|
+
Array.isArray(g) ? u.values = g.map((I) => p(I)) : L(u, g, P, w);
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
typeof g == "boolean" ?
|
|
660
|
+
function L(u, g, P, w) {
|
|
661
|
+
typeof g == "boolean" ? C(u, g) : Ve(g) ? S(u, g, P, w) : T(u, g);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
u.values?.[0] ? Object.assign(u.values[0], { value: g }) : u.values = [
|
|
663
|
+
function C(u, g, P) {
|
|
664
|
+
u.values?.[0] ? Object.assign(u.values[0], { value: g }) : u.values = [p({ value: g })];
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
const I =
|
|
668
|
-
(
|
|
666
|
+
function S(u, g, P, w) {
|
|
667
|
+
const I = w?.values?.find(
|
|
668
|
+
(ie) => pe(u) ? ie.languageCode === P : !0
|
|
669
669
|
)?.value;
|
|
670
670
|
Ve(I) ? u.values = [
|
|
671
|
-
|
|
671
|
+
p({
|
|
672
672
|
value: g,
|
|
673
|
-
languageCode: pe(u) ?
|
|
673
|
+
languageCode: pe(u) ? P : void 0
|
|
674
674
|
})
|
|
675
675
|
] : u.values = [];
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
u.values?.[0] ? Object.assign(u.values[0], { value: g }) : u.values = [
|
|
677
|
+
function T(u, g) {
|
|
678
|
+
u.values?.[0] ? Object.assign(u.values[0], { value: g }) : u.values = [p({ value: g })];
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
const { property: g, value:
|
|
680
|
+
function y(u) {
|
|
681
|
+
const { property: g, value: P, dictionary: w, locale: I, initialProp: M, unitOfMeasureId: ie, colorCode: ge } = u;
|
|
682
682
|
if (li(g)) {
|
|
683
|
-
|
|
683
|
+
_(g, P, ie);
|
|
684
684
|
return;
|
|
685
685
|
}
|
|
686
|
-
if (ci(g) && !
|
|
687
|
-
f(g,
|
|
686
|
+
if (ci(g) && !w?.length) {
|
|
687
|
+
f(g, P, ge);
|
|
688
688
|
return;
|
|
689
689
|
}
|
|
690
|
-
if (
|
|
691
|
-
|
|
690
|
+
if (w?.length) {
|
|
691
|
+
z(g, P, w, I);
|
|
692
692
|
return;
|
|
693
693
|
}
|
|
694
|
-
|
|
694
|
+
q(g, P, I, M);
|
|
695
695
|
}
|
|
696
696
|
return {
|
|
697
697
|
loading: Kt(n),
|
|
698
|
-
loadDictionaries:
|
|
699
|
-
getPropertyValue:
|
|
700
|
-
setPropertyValue:
|
|
698
|
+
loadDictionaries: i,
|
|
699
|
+
getPropertyValue: E,
|
|
700
|
+
setPropertyValue: y,
|
|
701
701
|
loadMeasurements: s
|
|
702
702
|
};
|
|
703
|
-
}, di =
|
|
703
|
+
}, di = ee("modularity");
|
|
704
704
|
function lt(e) {
|
|
705
705
|
const { blades: t, locales: a, notificationTemplates: o, notifications: n } = e;
|
|
706
706
|
return {
|
|
707
|
-
install(
|
|
708
|
-
const
|
|
707
|
+
install(d) {
|
|
708
|
+
const i = et();
|
|
709
709
|
if (t && Object.keys(t).length > 0) {
|
|
710
|
-
const s =
|
|
710
|
+
const s = d.runWithContext(() => te(Nt));
|
|
711
711
|
if (!s?._registerBladeFn)
|
|
712
712
|
di.error(
|
|
713
713
|
"defineAppModule: BladeRegistry not found. Blade registration will be skipped."
|
|
714
714
|
);
|
|
715
715
|
else
|
|
716
|
-
for (const [
|
|
717
|
-
const
|
|
718
|
-
s._registerBladeFn(
|
|
719
|
-
component:
|
|
720
|
-
route:
|
|
721
|
-
isWorkspace:
|
|
722
|
-
routable:
|
|
723
|
-
permissions:
|
|
724
|
-
}),
|
|
716
|
+
for (const [r, c] of Object.entries(t)) {
|
|
717
|
+
const E = c.name || r;
|
|
718
|
+
s._registerBladeFn(E, {
|
|
719
|
+
component: c,
|
|
720
|
+
route: c.url,
|
|
721
|
+
isWorkspace: c.isWorkspace || !1,
|
|
722
|
+
routable: c.routable !== !1,
|
|
723
|
+
permissions: c.permissions
|
|
724
|
+
}), c.url && c.menuItem && d.runWithContext(() => {
|
|
725
725
|
zo({
|
|
726
|
-
...
|
|
727
|
-
icon:
|
|
728
|
-
url:
|
|
729
|
-
routeId:
|
|
730
|
-
permissions:
|
|
726
|
+
...c.menuItem,
|
|
727
|
+
icon: c.menuItem.icon,
|
|
728
|
+
url: c.url,
|
|
729
|
+
routeId: E,
|
|
730
|
+
permissions: c.permissions || c.menuItem.permissions
|
|
731
731
|
});
|
|
732
732
|
});
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
if (n)
|
|
736
|
-
for (const [s,
|
|
737
|
-
|
|
736
|
+
for (const [s, r] of Object.entries(n))
|
|
737
|
+
i.registerType(s, r);
|
|
738
738
|
if (!n && o)
|
|
739
739
|
for (const s of Object.values(o)) {
|
|
740
|
-
const
|
|
741
|
-
|
|
740
|
+
const r = s.notifyType;
|
|
741
|
+
r && i.registerType(r, {
|
|
742
742
|
template: s,
|
|
743
743
|
toast: { mode: "auto" }
|
|
744
744
|
});
|
|
@@ -746,13 +746,13 @@ function lt(e) {
|
|
|
746
746
|
if (t) {
|
|
747
747
|
for (const s of Object.values(t))
|
|
748
748
|
if (s.notifyType) {
|
|
749
|
-
const
|
|
750
|
-
|
|
751
|
-
types:
|
|
752
|
-
handler: (
|
|
753
|
-
|
|
749
|
+
const r = Array.isArray(s.notifyType) ? s.notifyType : [s.notifyType];
|
|
750
|
+
r.filter((E) => !i.registry.has(E)).length > 0 && i.subscribe({
|
|
751
|
+
types: r,
|
|
752
|
+
handler: (E) => {
|
|
753
|
+
E.title && J(E.title, {
|
|
754
754
|
onClose() {
|
|
755
|
-
|
|
755
|
+
i.markAsRead(E);
|
|
756
756
|
}
|
|
757
757
|
});
|
|
758
758
|
}
|
|
@@ -760,8 +760,8 @@ function lt(e) {
|
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
if (a)
|
|
763
|
-
for (const [s,
|
|
764
|
-
re.global.mergeLocaleMessage(s,
|
|
763
|
+
for (const [s, r] of Object.entries(a))
|
|
764
|
+
re.global.mergeLocaleMessage(s, r);
|
|
765
765
|
}
|
|
766
766
|
};
|
|
767
767
|
}
|
|
@@ -789,12 +789,12 @@ function id(e) {
|
|
|
789
789
|
};
|
|
790
790
|
kn(a), Mn(a), Bn(a), $n(a), Fn(a);
|
|
791
791
|
}
|
|
792
|
-
const fi =
|
|
792
|
+
const fi = ee("use-blade-widgets");
|
|
793
793
|
function rd(e) {
|
|
794
|
-
const t =
|
|
794
|
+
const t = te(tt);
|
|
795
795
|
if (!t)
|
|
796
796
|
throw new Ie("WidgetService");
|
|
797
|
-
const a = t, o =
|
|
797
|
+
const a = t, o = te(Ct, void 0);
|
|
798
798
|
if (!o)
|
|
799
799
|
throw new Error(
|
|
800
800
|
"[vc-shell] useBladeWidgets() requires blade context (BladeDescriptorKey). It must be called inside a blade component rendered by VcBladeSlot."
|
|
@@ -807,16 +807,16 @@ function rd(e) {
|
|
|
807
807
|
for (const s of e)
|
|
808
808
|
a.unregisterWidget(s.id, n);
|
|
809
809
|
});
|
|
810
|
-
function
|
|
811
|
-
const
|
|
812
|
-
|
|
810
|
+
function d(s) {
|
|
811
|
+
const c = a.getWidgets(n).find((E) => E.id === s);
|
|
812
|
+
c?.trigger?.onRefresh ? c.trigger.onRefresh() : fi.warn(`Widget '${s}' has no trigger.onRefresh registered.`);
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function i() {
|
|
815
815
|
const s = a.getWidgets(n);
|
|
816
|
-
for (const
|
|
817
|
-
|
|
816
|
+
for (const r of s)
|
|
817
|
+
r.trigger?.onRefresh && r.trigger.onRefresh();
|
|
818
818
|
}
|
|
819
|
-
return { refresh:
|
|
819
|
+
return { refresh: d, refreshAll: i };
|
|
820
820
|
}
|
|
821
821
|
function mi(e) {
|
|
822
822
|
const t = {
|
|
@@ -836,10 +836,10 @@ function mi(e) {
|
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
838
|
function ld(e) {
|
|
839
|
-
An(kt,
|
|
839
|
+
An(kt, R(() => bn(e)));
|
|
840
840
|
}
|
|
841
841
|
function cd() {
|
|
842
|
-
const e =
|
|
842
|
+
const e = te(kt);
|
|
843
843
|
if (!e)
|
|
844
844
|
throw new Ie("BladeContext");
|
|
845
845
|
return e;
|
|
@@ -853,36 +853,36 @@ function ht(e, t) {
|
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
855
|
function dd(e) {
|
|
856
|
-
const t = (
|
|
856
|
+
const t = (i) => se(l(i)), a = H(t(e)), o = H(t(e)), n = H(!1);
|
|
857
857
|
Tn(e) && le(
|
|
858
858
|
e,
|
|
859
|
-
(
|
|
859
|
+
(i) => {
|
|
860
860
|
const s = !ht(o.value, a.value);
|
|
861
|
-
a.value =
|
|
861
|
+
a.value = se(i), s || (o.value = se(i));
|
|
862
862
|
},
|
|
863
863
|
{ deep: !0 }
|
|
864
864
|
// Deep tracking, if initialValueProp is a Ref to an object/array
|
|
865
865
|
), le(
|
|
866
866
|
[o, a],
|
|
867
867
|
// Track changes in currentValue or pristineValue
|
|
868
|
-
([
|
|
869
|
-
n.value = !ht(
|
|
868
|
+
([i, s]) => {
|
|
869
|
+
n.value = !ht(i, s);
|
|
870
870
|
},
|
|
871
871
|
{ deep: !0 }
|
|
872
872
|
);
|
|
873
|
-
const
|
|
874
|
-
if (
|
|
875
|
-
const s = t(
|
|
876
|
-
a.value = s, o.value =
|
|
873
|
+
const d = (i) => {
|
|
874
|
+
if (i !== void 0) {
|
|
875
|
+
const s = t(i);
|
|
876
|
+
a.value = s, o.value = se(s);
|
|
877
877
|
} else
|
|
878
|
-
a.value =
|
|
878
|
+
a.value = se(o.value);
|
|
879
879
|
n.value = !1;
|
|
880
880
|
};
|
|
881
881
|
return {
|
|
882
882
|
currentValue: o,
|
|
883
883
|
pristineValue: a,
|
|
884
|
-
isModified:
|
|
885
|
-
resetModificationState:
|
|
884
|
+
isModified: R(() => n.value),
|
|
885
|
+
resetModificationState: d
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
888
|
const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1026,7 +1026,7 @@ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1026
1026
|
__proto__: null,
|
|
1027
1027
|
autofocus: pi,
|
|
1028
1028
|
loading: Ei
|
|
1029
|
-
}, Symbol.toStringTag, { value: "Module" })), Si = { class: "tw-flex tw-grow-1 tw-border-t tw-border-solid tw-border-t-[--assets-details-border]" }, _i = { class: "assets-details__content tw-grow tw-basis-0 tw-w-full" }, Ai = { class: "tw-p-4" }, bi = { class: "tw-flex tw-flex-row tw-justify-stretch tw-truncate" }, Ti = { class: "tw-truncate" }, wi = /* @__PURE__ */
|
|
1029
|
+
}, Symbol.toStringTag, { value: "Module" })), Si = { class: "tw-flex tw-grow-1 tw-border-t tw-border-solid tw-border-t-[--assets-details-border]" }, _i = { class: "assets-details__content tw-grow tw-basis-0 tw-w-full" }, Ai = { class: "tw-p-4" }, bi = { class: "tw-flex tw-flex-row tw-justify-stretch tw-truncate" }, Ti = { class: "tw-truncate" }, wi = /* @__PURE__ */ K({
|
|
1030
1030
|
name: "AssetsDetails",
|
|
1031
1031
|
__name: "assets-details",
|
|
1032
1032
|
props: {
|
|
@@ -1035,143 +1035,141 @@ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1035
1035
|
options: {}
|
|
1036
1036
|
},
|
|
1037
1037
|
emits: ["close:blade", "expand:blade", "collapse:blade"],
|
|
1038
|
-
setup(e, {
|
|
1039
|
-
const
|
|
1038
|
+
setup(e, { emit: t }) {
|
|
1039
|
+
const a = e, o = t;
|
|
1040
1040
|
me({ validateOnMount: !1 });
|
|
1041
|
-
const
|
|
1041
|
+
const n = _e(), d = it(), { t: i } = ue({ useScope: "global" }), s = H({ ...a.options?.asset }), r = R(() => a.options?.disabled), c = R({
|
|
1042
1042
|
get() {
|
|
1043
|
-
return
|
|
1043
|
+
return s.value.name?.split(".").shift();
|
|
1044
1044
|
},
|
|
1045
|
-
set(
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1045
|
+
set(x) {
|
|
1046
|
+
const v = s.value.name?.split(".").pop();
|
|
1047
|
+
s.value.name = x + "." + v;
|
|
1048
1048
|
}
|
|
1049
|
-
}), E =
|
|
1049
|
+
}), E = R(() => !d.value || !n.value), p = H([
|
|
1050
1050
|
{
|
|
1051
1051
|
id: "save",
|
|
1052
|
-
title:
|
|
1052
|
+
title: i("ASSETS.PAGES.DETAILS.TOOLBAR.SAVE"),
|
|
1053
1053
|
icon: "lucide-save",
|
|
1054
1054
|
async clickHandler() {
|
|
1055
|
-
|
|
1055
|
+
a.options?.assetEditHandler && typeof a.options?.assetEditHandler == "function" && (await a.options?.assetEditHandler(s.value), o("close:blade"));
|
|
1056
1056
|
},
|
|
1057
|
-
disabled:
|
|
1057
|
+
disabled: R(() => E.value || r.value)
|
|
1058
1058
|
},
|
|
1059
1059
|
{
|
|
1060
1060
|
id: "delete",
|
|
1061
|
-
title:
|
|
1061
|
+
title: i("ASSETS.PAGES.DETAILS.TOOLBAR.DELETE"),
|
|
1062
1062
|
icon: "lucide-trash-2",
|
|
1063
1063
|
async clickHandler() {
|
|
1064
|
-
|
|
1064
|
+
a.options?.assetRemoveHandler && typeof a.options?.assetRemoveHandler == "function" && (await a.options?.assetRemoveHandler(s.value), o("close:blade"));
|
|
1065
1065
|
},
|
|
1066
|
-
disabled:
|
|
1066
|
+
disabled: R(() => r.value)
|
|
1067
1067
|
}
|
|
1068
|
-
]),
|
|
1069
|
-
function
|
|
1070
|
-
|
|
1068
|
+
]), _ = R(() => s.value?.typeId);
|
|
1069
|
+
function f(x) {
|
|
1070
|
+
x && (x.charAt(0) === "/" ? navigator.clipboard?.writeText(`${location.origin}${x}`) : navigator.clipboard?.writeText(x));
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
|
|
1072
|
+
function z(x) {
|
|
1073
|
+
x && (location.href = x);
|
|
1074
1074
|
}
|
|
1075
|
-
return
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
const N = $("VcIcon"), T = $("VcLabel"), x = $("VcHint"), U = $("VcCol"), j = $("VcLink"), Z = $("VcButton"), V = $("VcRow");
|
|
1079
|
-
return p(), M(l(Ot), {
|
|
1075
|
+
return (x, v) => {
|
|
1076
|
+
const V = F("VcIcon"), D = F("VcLabel"), b = F("VcHint"), $ = F("VcCol"), q = F("VcLink"), Y = F("VcButton"), j = F("VcRow");
|
|
1077
|
+
return m(), k(l(Ot), {
|
|
1080
1078
|
title: e.options?.asset?.name,
|
|
1081
|
-
subtitle: l(
|
|
1079
|
+
subtitle: l(i)("ASSETS.PAGES.DETAILS.SUBTITLE"),
|
|
1082
1080
|
expanded: e.expanded,
|
|
1083
1081
|
closable: e.closable,
|
|
1084
|
-
"toolbar-items":
|
|
1085
|
-
onClose:
|
|
1086
|
-
onExpand:
|
|
1087
|
-
onCollapse:
|
|
1082
|
+
"toolbar-items": p.value,
|
|
1083
|
+
onClose: v[5] || (v[5] = (L) => x.$emit("close:blade")),
|
|
1084
|
+
onExpand: v[6] || (v[6] = (L) => x.$emit("expand:blade")),
|
|
1085
|
+
onCollapse: v[7] || (v[7] = (L) => x.$emit("collapse:blade"))
|
|
1088
1086
|
}, {
|
|
1089
1087
|
default: h(() => [
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1088
|
+
O("div", Si, [
|
|
1089
|
+
O("div", _i, [
|
|
1090
|
+
A(l(It), { "no-padding": !0 }, {
|
|
1093
1091
|
default: h(() => [
|
|
1094
|
-
|
|
1095
|
-
|
|
1092
|
+
O("div", Ai, [
|
|
1093
|
+
A(l(yt), null, {
|
|
1096
1094
|
default: h(() => [
|
|
1097
|
-
|
|
1095
|
+
A(j, { class: "tw-mb-4 !tw-flex" }, {
|
|
1098
1096
|
default: h(() => [
|
|
1099
|
-
l(We)(
|
|
1097
|
+
l(We)(s.value.name) ? (m(), k(l(Qe), {
|
|
1100
1098
|
key: 0,
|
|
1101
|
-
src:
|
|
1099
|
+
src: s.value.url,
|
|
1102
1100
|
size: "xl",
|
|
1103
1101
|
bordered: !0,
|
|
1104
1102
|
class: "tw-shrink-0"
|
|
1105
|
-
}, null, 8, ["src"])) : (
|
|
1103
|
+
}, null, 8, ["src"])) : (m(), k(V, {
|
|
1106
1104
|
key: 1,
|
|
1107
|
-
icon: l(ze)(
|
|
1105
|
+
icon: l(ze)(s.value.name),
|
|
1108
1106
|
class: "tw-text-[color:var(--assets-details-thumbnail-color)] tw-text-[128px] tw-shrink-0"
|
|
1109
1107
|
}, null, 8, ["icon"])),
|
|
1110
|
-
|
|
1108
|
+
A($, { class: "tw-ml-6" }, {
|
|
1111
1109
|
default: h(() => [
|
|
1112
|
-
|
|
1110
|
+
A($, null, {
|
|
1113
1111
|
default: h(() => [
|
|
1114
|
-
|
|
1112
|
+
A($, null, {
|
|
1115
1113
|
default: h(() => [
|
|
1116
|
-
|
|
1114
|
+
A(D, null, {
|
|
1117
1115
|
default: h(() => [
|
|
1118
|
-
|
|
1116
|
+
W(N(l(i)("ASSETS.PAGES.DETAILS.FIELDS.SIZE")), 1)
|
|
1119
1117
|
]),
|
|
1120
1118
|
_: 1
|
|
1121
1119
|
}),
|
|
1122
|
-
|
|
1120
|
+
A(b, { class: "tw-text-s" }, {
|
|
1123
1121
|
default: h(() => [
|
|
1124
|
-
|
|
1122
|
+
W(N(l(Ke)(s.value.size)), 1)
|
|
1125
1123
|
]),
|
|
1126
1124
|
_: 1
|
|
1127
1125
|
})
|
|
1128
1126
|
]),
|
|
1129
1127
|
_: 1
|
|
1130
1128
|
}),
|
|
1131
|
-
|
|
1129
|
+
A($, null, {
|
|
1132
1130
|
default: h(() => [
|
|
1133
|
-
|
|
1131
|
+
A(D, null, {
|
|
1134
1132
|
default: h(() => [
|
|
1135
|
-
|
|
1133
|
+
W(N(l(i)("ASSETS.PAGES.DETAILS.FIELDS.CREATED_DATE")), 1)
|
|
1136
1134
|
]),
|
|
1137
1135
|
_: 1
|
|
1138
1136
|
}),
|
|
1139
|
-
|
|
1137
|
+
A(b, { class: "tw-text-s" }, {
|
|
1140
1138
|
default: h(() => [
|
|
1141
|
-
|
|
1139
|
+
W(N(l(Dt)(s.value.createdDate) || "N/A"), 1)
|
|
1142
1140
|
]),
|
|
1143
1141
|
_: 1
|
|
1144
1142
|
})
|
|
1145
1143
|
]),
|
|
1146
1144
|
_: 1
|
|
1147
1145
|
}),
|
|
1148
|
-
|
|
1146
|
+
A($, { class: "tw-w-full" }, {
|
|
1149
1147
|
default: h(() => [
|
|
1150
|
-
|
|
1148
|
+
A(D, null, {
|
|
1151
1149
|
default: h(() => [
|
|
1152
|
-
|
|
1150
|
+
W(N(l(i)("ASSETS.PAGES.DETAILS.FIELDS.URL")), 1)
|
|
1153
1151
|
]),
|
|
1154
1152
|
_: 1
|
|
1155
1153
|
}),
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1154
|
+
O("div", bi, [
|
|
1155
|
+
O("div", Ti, [
|
|
1156
|
+
A(q, {
|
|
1159
1157
|
class: "vc-link tw-text-s tw-truncate tw-w-full",
|
|
1160
|
-
onClick:
|
|
1158
|
+
onClick: v[0] || (v[0] = (L) => z(s.value.url))
|
|
1161
1159
|
}, {
|
|
1162
1160
|
default: h(() => [
|
|
1163
|
-
|
|
1161
|
+
W(N(a.options?.asset.name), 1)
|
|
1164
1162
|
]),
|
|
1165
1163
|
_: 1
|
|
1166
1164
|
})
|
|
1167
1165
|
]),
|
|
1168
|
-
|
|
1166
|
+
A(Y, {
|
|
1169
1167
|
icon: "lucide-copy",
|
|
1170
1168
|
"icon-size": "m",
|
|
1171
1169
|
class: "tw-ml-2",
|
|
1172
1170
|
text: "",
|
|
1173
|
-
title: l(
|
|
1174
|
-
onClick:
|
|
1171
|
+
title: l(i)("ASSETS.PAGES.DETAILS.FIELDS.COPY"),
|
|
1172
|
+
onClick: v[1] || (v[1] = (L) => f(s.value.url))
|
|
1175
1173
|
}, null, 8, ["title"])
|
|
1176
1174
|
])
|
|
1177
1175
|
]),
|
|
@@ -1186,51 +1184,51 @@ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1186
1184
|
]),
|
|
1187
1185
|
_: 1
|
|
1188
1186
|
}),
|
|
1189
|
-
e.options?.hiddenFields?.includes("name") ?
|
|
1187
|
+
e.options?.hiddenFields?.includes("name") ? U("", !0) : (m(), k(l(Q), {
|
|
1190
1188
|
key: 0,
|
|
1191
|
-
label: l(
|
|
1189
|
+
label: l(i)("ASSETS.PAGES.DETAILS.FIELDS.NAME.TITLE"),
|
|
1192
1190
|
name: "asset_name",
|
|
1193
1191
|
rules: "required",
|
|
1194
|
-
"model-value":
|
|
1192
|
+
"model-value": s.value.name
|
|
1195
1193
|
}, {
|
|
1196
|
-
default: h(({ errorMessage: L, handleChange:
|
|
1197
|
-
|
|
1198
|
-
modelValue:
|
|
1194
|
+
default: h(({ errorMessage: L, handleChange: C, errors: S }) => [
|
|
1195
|
+
A(l(fe), {
|
|
1196
|
+
modelValue: c.value,
|
|
1199
1197
|
"onUpdate:modelValue": [
|
|
1200
|
-
|
|
1201
|
-
|
|
1198
|
+
v[2] || (v[2] = (T) => c.value = T),
|
|
1199
|
+
C
|
|
1202
1200
|
],
|
|
1203
1201
|
class: "tw-mb-4",
|
|
1204
|
-
label: l(
|
|
1202
|
+
label: l(i)("ASSETS.PAGES.DETAILS.FIELDS.NAME.TITLE"),
|
|
1205
1203
|
clearable: "",
|
|
1206
1204
|
required: "",
|
|
1207
|
-
error: !!
|
|
1205
|
+
error: !!S.length,
|
|
1208
1206
|
"error-message": L,
|
|
1209
|
-
placeholder: l(
|
|
1210
|
-
disabled:
|
|
1207
|
+
placeholder: l(i)("ASSETS.PAGES.DETAILS.FIELDS.NAME.PLACEHOLDER"),
|
|
1208
|
+
disabled: r.value
|
|
1211
1209
|
}, null, 8, ["modelValue", "label", "error", "error-message", "placeholder", "disabled", "onUpdate:modelValue"])
|
|
1212
1210
|
]),
|
|
1213
1211
|
_: 1
|
|
1214
1212
|
}, 8, ["label", "model-value"])),
|
|
1215
|
-
|
|
1213
|
+
_.value === "Image" && !e.options?.hiddenFields?.includes("altText") ? (m(), k(l(fe), {
|
|
1216
1214
|
key: 1,
|
|
1217
|
-
modelValue:
|
|
1218
|
-
"onUpdate:modelValue":
|
|
1215
|
+
modelValue: s.value.altText,
|
|
1216
|
+
"onUpdate:modelValue": v[3] || (v[3] = (L) => s.value.altText = L),
|
|
1219
1217
|
class: "tw-mb-4",
|
|
1220
|
-
label: l(
|
|
1218
|
+
label: l(i)("ASSETS.PAGES.DETAILS.FIELDS.ALT.TITLE"),
|
|
1221
1219
|
clearable: "",
|
|
1222
|
-
placeholder: l(
|
|
1223
|
-
tooltip: l(
|
|
1224
|
-
disabled:
|
|
1225
|
-
}, null, 8, ["modelValue", "label", "placeholder", "tooltip", "disabled"])) :
|
|
1226
|
-
e.options?.hiddenFields?.includes("description") ?
|
|
1220
|
+
placeholder: l(i)("ASSETS.PAGES.DETAILS.FIELDS.ALT.PLACEHOLDER"),
|
|
1221
|
+
tooltip: l(i)("ASSETS.PAGES.DETAILS.FIELDS.ALT.TOOLTIP"),
|
|
1222
|
+
disabled: r.value
|
|
1223
|
+
}, null, 8, ["modelValue", "label", "placeholder", "tooltip", "disabled"])) : U("", !0),
|
|
1224
|
+
e.options?.hiddenFields?.includes("description") ? U("", !0) : (m(), k(l(Pt), {
|
|
1227
1225
|
key: 2,
|
|
1228
|
-
modelValue:
|
|
1229
|
-
"onUpdate:modelValue":
|
|
1226
|
+
modelValue: s.value.description,
|
|
1227
|
+
"onUpdate:modelValue": v[4] || (v[4] = (L) => s.value.description = L),
|
|
1230
1228
|
class: "tw-mb-4",
|
|
1231
|
-
label: l(
|
|
1232
|
-
placeholder: l(
|
|
1233
|
-
disabled:
|
|
1229
|
+
label: l(i)("ASSETS.PAGES.DETAILS.FIELDS.DESCRIPTION.TITLE"),
|
|
1230
|
+
placeholder: l(i)("ASSETS.PAGES.DETAILS.FIELDS.DESCRIPTION.PLACEHOLDER"),
|
|
1231
|
+
disabled: r.value
|
|
1234
1232
|
}, null, 8, ["modelValue", "label", "placeholder", "disabled"]))
|
|
1235
1233
|
]),
|
|
1236
1234
|
_: 1
|
|
@@ -1255,7 +1253,7 @@ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1255
1253
|
}, Pi = { class: "tw-flex tw-items-center tw-justify-center" }, Di = { class: "tw-border-b tw-border-solid tw-border-b-[--assets-manager-mobile-border] tw-p-3 tw-flex tw-flex-nowrap" }, Ci = {
|
|
1256
1254
|
key: 1,
|
|
1257
1255
|
class: "tw-w-12 tw-flex tw-items-center tw-justify-center"
|
|
1258
|
-
}, Ni = { class: "tw-grow tw-basis-0 tw-ml-3 tw-truncate" }, Vi = { class: "tw-font-bold tw-text-lg tw-truncate" }, ki = { class: "tw-mt-3 tw-w-full tw-flex tw-justify-between" }, Mi = { class: "tw-truncate tw-grow tw-basis-0 tw-mr-2" }, Bi = { class: "tw-truncate tw-mt-1" }, $i = { class: "tw-truncate tw-grow tw-basis-0 tw-mr-2" }, Fi = { class: "tw-truncate tw-mt-1" }, xi = { class: "tw-truncate tw-grow tw-basis-0 tw-mr-2" }, Gi = { class: "tw-truncate tw-mt-1" }, Hi = /* @__PURE__ */
|
|
1256
|
+
}, Ni = { class: "tw-grow tw-basis-0 tw-ml-3 tw-truncate" }, Vi = { class: "tw-font-bold tw-text-lg tw-truncate" }, ki = { class: "tw-mt-3 tw-w-full tw-flex tw-justify-between" }, Mi = { class: "tw-truncate tw-grow tw-basis-0 tw-mr-2" }, Bi = { class: "tw-truncate tw-mt-1" }, $i = { class: "tw-truncate tw-grow tw-basis-0 tw-mr-2" }, Fi = { class: "tw-truncate tw-mt-1" }, xi = { class: "tw-truncate tw-grow tw-basis-0 tw-mr-2" }, Gi = { class: "tw-truncate tw-mt-1" }, Hi = /* @__PURE__ */ K({
|
|
1259
1257
|
name: "AssetsManager",
|
|
1260
1258
|
__name: "assets-manager",
|
|
1261
1259
|
props: {
|
|
@@ -1264,286 +1262,284 @@ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1264
1262
|
options: {}
|
|
1265
1263
|
},
|
|
1266
1264
|
emits: ["parent:call", "close:blade", "expand:blade", "collapse:blade"],
|
|
1267
|
-
setup(e
|
|
1268
|
-
const
|
|
1265
|
+
setup(e) {
|
|
1266
|
+
const t = ee("assets-manager"), a = e, { t: o } = ue({ useScope: "global" }), n = H([]), d = R(() => a.options.title || o("ASSETS_MANAGER.TITLE")), i = H(!1), s = H(), r = H([]), c = R(() => a.options.disabled);
|
|
1269
1267
|
let E;
|
|
1270
|
-
const
|
|
1268
|
+
const p = H(!1), { openBlade: _, resolveBladeByName: f } = jo(), z = H([
|
|
1271
1269
|
{
|
|
1272
1270
|
id: "add",
|
|
1273
|
-
title:
|
|
1271
|
+
title: R(() => o("ASSETS_MANAGER.TOOLBAR.ADD")),
|
|
1274
1272
|
icon: "lucide-plus",
|
|
1275
1273
|
clickHandler() {
|
|
1276
|
-
|
|
1274
|
+
$();
|
|
1277
1275
|
},
|
|
1278
|
-
disabled:
|
|
1279
|
-
isVisible:
|
|
1276
|
+
disabled: R(() => c.value),
|
|
1277
|
+
isVisible: R(() => !c.value)
|
|
1280
1278
|
},
|
|
1281
1279
|
{
|
|
1282
1280
|
id: "delete",
|
|
1283
|
-
title:
|
|
1281
|
+
title: R(() => o("ASSETS_MANAGER.TOOLBAR.DELETE")),
|
|
1284
1282
|
icon: "lucide-trash-2",
|
|
1285
1283
|
async clickHandler() {
|
|
1286
|
-
|
|
1284
|
+
a.options.assetsRemoveHandler && typeof a.options.assetsRemoveHandler == "function" && (n.value = await a.options.assetsRemoveHandler(r.value));
|
|
1287
1285
|
},
|
|
1288
|
-
disabled:
|
|
1289
|
-
isVisible:
|
|
1286
|
+
disabled: R(() => !r.value.length || c.value),
|
|
1287
|
+
isVisible: R(() => !c.value)
|
|
1290
1288
|
}
|
|
1291
|
-
]),
|
|
1289
|
+
]), x = H([
|
|
1292
1290
|
{
|
|
1293
1291
|
id: "url",
|
|
1294
|
-
title:
|
|
1292
|
+
title: R(() => o("ASSETS_MANAGER.TABLE.HEADER.IMAGE")),
|
|
1295
1293
|
width: "10%",
|
|
1296
1294
|
alwaysVisible: !0
|
|
1297
1295
|
},
|
|
1298
1296
|
{
|
|
1299
1297
|
id: "name",
|
|
1300
|
-
title:
|
|
1298
|
+
title: R(() => o("ASSETS_MANAGER.TABLE.HEADER.NAME")),
|
|
1301
1299
|
width: "20%",
|
|
1302
1300
|
alwaysVisible: !0
|
|
1303
1301
|
},
|
|
1304
1302
|
{
|
|
1305
1303
|
id: "size",
|
|
1306
|
-
title:
|
|
1304
|
+
title: R(() => o("ASSETS_MANAGER.TABLE.HEADER.SIZE")),
|
|
1307
1305
|
width: "20%",
|
|
1308
1306
|
alwaysVisible: !0
|
|
1309
1307
|
},
|
|
1310
1308
|
{
|
|
1311
1309
|
id: "sortOrder",
|
|
1312
|
-
title:
|
|
1310
|
+
title: R(() => o("ASSETS_MANAGER.TABLE.HEADER.SORT_ORDER")),
|
|
1313
1311
|
width: "25%",
|
|
1314
1312
|
alwaysVisible: !0
|
|
1315
1313
|
},
|
|
1316
1314
|
{
|
|
1317
1315
|
id: "createdDate",
|
|
1318
|
-
title:
|
|
1316
|
+
title: R(() => o("ASSETS_MANAGER.TABLE.HEADER.CREATED_DATE")),
|
|
1319
1317
|
width: "25%",
|
|
1320
1318
|
alwaysVisible: !0,
|
|
1321
1319
|
type: "date-ago"
|
|
1322
1320
|
}
|
|
1323
1321
|
]);
|
|
1324
1322
|
le(
|
|
1325
|
-
() =>
|
|
1326
|
-
(
|
|
1327
|
-
|
|
1323
|
+
() => n.value,
|
|
1324
|
+
(S) => {
|
|
1325
|
+
p.value = !Dn(S, E);
|
|
1328
1326
|
},
|
|
1329
1327
|
{ deep: !0 }
|
|
1330
1328
|
), de(() => {
|
|
1331
|
-
|
|
1329
|
+
n.value = a.options?.assets, E = se(a.options?.assets);
|
|
1332
1330
|
});
|
|
1333
|
-
async function
|
|
1334
|
-
if (
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1331
|
+
async function v(S) {
|
|
1332
|
+
if (a.options.assetsEditHandler && typeof a.options.assetsEditHandler == "function" && S.dragIndex !== S.dropIndex) {
|
|
1333
|
+
const T = S.value.map((y, G) => (y.sortOrder = G, y));
|
|
1334
|
+
n.value = await a.options.assetsEditHandler(T);
|
|
1337
1335
|
}
|
|
1338
1336
|
}
|
|
1339
|
-
function
|
|
1340
|
-
|
|
1337
|
+
function V() {
|
|
1338
|
+
c.value || (i.value = !0);
|
|
1341
1339
|
}
|
|
1342
|
-
function
|
|
1343
|
-
|
|
1340
|
+
function D() {
|
|
1341
|
+
c.value || (i.value = !1);
|
|
1344
1342
|
}
|
|
1345
|
-
async function
|
|
1346
|
-
if (!
|
|
1347
|
-
const
|
|
1348
|
-
if (
|
|
1343
|
+
async function b(S) {
|
|
1344
|
+
if (!c.value) {
|
|
1345
|
+
const T = S.dataTransfer?.files;
|
|
1346
|
+
if (T && T.length)
|
|
1349
1347
|
try {
|
|
1350
|
-
await
|
|
1351
|
-
} catch (
|
|
1352
|
-
throw
|
|
1348
|
+
await q(T);
|
|
1349
|
+
} catch (y) {
|
|
1350
|
+
throw t.error("Failed to upload dropped files:", y), y;
|
|
1353
1351
|
}
|
|
1354
|
-
|
|
1352
|
+
i.value = !1;
|
|
1355
1353
|
}
|
|
1356
1354
|
}
|
|
1357
|
-
function
|
|
1358
|
-
|
|
1355
|
+
function $() {
|
|
1356
|
+
s.value.value = "", s.value.click();
|
|
1359
1357
|
}
|
|
1360
|
-
async function
|
|
1361
|
-
if (
|
|
1362
|
-
const
|
|
1363
|
-
Array.from(
|
|
1364
|
-
let
|
|
1365
|
-
if (
|
|
1366
|
-
let
|
|
1367
|
-
const
|
|
1368
|
-
for (;
|
|
1369
|
-
|
|
1358
|
+
async function q(S) {
|
|
1359
|
+
if (S && S.length) {
|
|
1360
|
+
const T = [], y = n.value.map((u) => u.name);
|
|
1361
|
+
Array.from(S).forEach((u) => {
|
|
1362
|
+
let g = u.name;
|
|
1363
|
+
if (y.includes(g)) {
|
|
1364
|
+
let w = 1;
|
|
1365
|
+
const I = g.replace(/\.[^/.]+$/, "");
|
|
1366
|
+
for (; y.includes(g); )
|
|
1367
|
+
g = `${I}_${w}.${u.name.split(".").pop()}`, w++;
|
|
1370
1368
|
}
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1369
|
+
const P = new File([u], g, { type: u.type });
|
|
1370
|
+
T.push(P);
|
|
1373
1371
|
});
|
|
1374
|
-
const
|
|
1375
|
-
if (
|
|
1376
|
-
|
|
1377
|
-
}),
|
|
1372
|
+
const G = new DataTransfer();
|
|
1373
|
+
if (T.forEach((u) => {
|
|
1374
|
+
G.items.add(u);
|
|
1375
|
+
}), a.options.assetsUploadHandler && typeof a.options.assetsUploadHandler == "function")
|
|
1378
1376
|
try {
|
|
1379
|
-
|
|
1380
|
-
} catch (
|
|
1381
|
-
throw
|
|
1377
|
+
n.value = await a.options.assetsUploadHandler(G.files);
|
|
1378
|
+
} catch (u) {
|
|
1379
|
+
throw t.error("Failed to upload assets:", u), u;
|
|
1382
1380
|
}
|
|
1383
1381
|
}
|
|
1384
1382
|
}
|
|
1385
|
-
async function
|
|
1386
|
-
const
|
|
1387
|
-
if (
|
|
1383
|
+
async function Y(S) {
|
|
1384
|
+
const y = S.target.files;
|
|
1385
|
+
if (y && y.length)
|
|
1388
1386
|
try {
|
|
1389
|
-
await
|
|
1390
|
-
} catch (
|
|
1391
|
-
throw
|
|
1387
|
+
await q(y);
|
|
1388
|
+
} catch (G) {
|
|
1389
|
+
throw t.error("Failed to upload files:", G), G;
|
|
1392
1390
|
}
|
|
1393
1391
|
}
|
|
1394
|
-
function
|
|
1395
|
-
|
|
1396
|
-
blade:
|
|
1392
|
+
function j(S) {
|
|
1393
|
+
_({
|
|
1394
|
+
blade: f("AssetsDetails"),
|
|
1397
1395
|
options: {
|
|
1398
|
-
asset: l(
|
|
1399
|
-
disabled:
|
|
1400
|
-
hiddenFields:
|
|
1401
|
-
assetEditHandler: (
|
|
1402
|
-
if (
|
|
1403
|
-
|
|
1396
|
+
asset: l(S),
|
|
1397
|
+
disabled: c.value,
|
|
1398
|
+
hiddenFields: a.options.hiddenFields,
|
|
1399
|
+
assetEditHandler: (T) => {
|
|
1400
|
+
if (a.options.assetsEditHandler && typeof a.options.assetsEditHandler == "function")
|
|
1401
|
+
n.value = a.options.assetsEditHandler([T]);
|
|
1404
1402
|
else throw new Error("Asset edit handler is not defined");
|
|
1405
1403
|
},
|
|
1406
|
-
assetRemoveHandler: async (
|
|
1407
|
-
if (
|
|
1408
|
-
|
|
1404
|
+
assetRemoveHandler: async (T) => {
|
|
1405
|
+
if (a.options.assetsRemoveHandler && typeof a.options.assetsRemoveHandler == "function")
|
|
1406
|
+
n.value = await a.options.assetsRemoveHandler([T]);
|
|
1409
1407
|
else throw new Error("Asset remove handler is not defined");
|
|
1410
1408
|
}
|
|
1411
1409
|
}
|
|
1412
1410
|
});
|
|
1413
1411
|
}
|
|
1414
|
-
const L = (
|
|
1415
|
-
|
|
1416
|
-
},
|
|
1417
|
-
const
|
|
1418
|
-
return
|
|
1412
|
+
const L = (S) => {
|
|
1413
|
+
r.value = S;
|
|
1414
|
+
}, C = () => {
|
|
1415
|
+
const S = [];
|
|
1416
|
+
return S.push({
|
|
1419
1417
|
icon: "lucide-trash-2",
|
|
1420
|
-
title:
|
|
1418
|
+
title: R(() => o("ASSETS_MANAGER.TABLE.ACTIONS.DELETE")),
|
|
1421
1419
|
type: "danger",
|
|
1422
|
-
async clickHandler(
|
|
1423
|
-
|
|
1420
|
+
async clickHandler(T) {
|
|
1421
|
+
n.value = await a.options.assetsRemoveHandler([T]), r.value = [];
|
|
1424
1422
|
}
|
|
1425
|
-
}),
|
|
1423
|
+
}), S;
|
|
1426
1424
|
};
|
|
1427
|
-
return
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
return p(), M(I, {
|
|
1432
|
-
title: r.value,
|
|
1425
|
+
return (S, T) => {
|
|
1426
|
+
const y = F("VcIcon"), G = F("VcButton"), u = F("VcImage"), g = F("VcHint"), P = F("VcTable"), w = F("VcBlade"), I = Gt("loading");
|
|
1427
|
+
return m(), k(w, {
|
|
1428
|
+
title: d.value,
|
|
1433
1429
|
expanded: e.expanded,
|
|
1434
1430
|
closable: e.closable,
|
|
1435
|
-
"toolbar-items":
|
|
1431
|
+
"toolbar-items": z.value,
|
|
1436
1432
|
width: "70%",
|
|
1437
|
-
onClose:
|
|
1438
|
-
onExpand:
|
|
1439
|
-
onCollapse:
|
|
1433
|
+
onClose: T[0] || (T[0] = (M) => S.$emit("close:blade")),
|
|
1434
|
+
onExpand: T[1] || (T[1] = (M) => S.$emit("expand:blade")),
|
|
1435
|
+
onCollapse: T[2] || (T[2] = (M) => S.$emit("collapse:blade"))
|
|
1440
1436
|
}, {
|
|
1441
1437
|
default: h(() => [
|
|
1442
|
-
Ht((
|
|
1438
|
+
Ht((m(), B("div", {
|
|
1443
1439
|
class: "tw-relative tw-h-full tw-flex-1",
|
|
1444
|
-
onDragover: ve(
|
|
1445
|
-
onDragleave: ve(
|
|
1446
|
-
onDrop: ve(
|
|
1440
|
+
onDragover: ve(V, ["prevent", "stop"]),
|
|
1441
|
+
onDragleave: ve(D, ["prevent"]),
|
|
1442
|
+
onDrop: ve(b, ["prevent", "stop"])
|
|
1447
1443
|
}, [
|
|
1448
|
-
|
|
1449
|
-
columns:
|
|
1444
|
+
A(P, {
|
|
1445
|
+
columns: x.value,
|
|
1450
1446
|
expanded: e.expanded,
|
|
1451
1447
|
"state-key": "assets_manager",
|
|
1452
|
-
"reorderable-rows": !
|
|
1453
|
-
items:
|
|
1448
|
+
"reorderable-rows": !c.value,
|
|
1449
|
+
items: n.value,
|
|
1454
1450
|
header: !1,
|
|
1455
1451
|
footer: !1,
|
|
1456
|
-
"item-action-builder":
|
|
1457
|
-
"enable-item-actions": !
|
|
1458
|
-
multiselect: !
|
|
1452
|
+
"item-action-builder": c.value ? void 0 : C,
|
|
1453
|
+
"enable-item-actions": !c.value,
|
|
1454
|
+
multiselect: !c.value,
|
|
1459
1455
|
class: "tw-h-full tw-w-full",
|
|
1460
|
-
onItemClick:
|
|
1461
|
-
"onRow:reorder":
|
|
1456
|
+
onItemClick: j,
|
|
1457
|
+
"onRow:reorder": v,
|
|
1462
1458
|
onSelectionChanged: L
|
|
1463
1459
|
}, {
|
|
1464
1460
|
empty: h(() => [
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1461
|
+
O("div", Ii, [
|
|
1462
|
+
c.value ? (m(), B("div", Ri, N(l(o)("ASSETS_MANAGER.EMPTY.NO_ASSETS")), 1)) : (m(), B(X, { key: 0 }, [
|
|
1463
|
+
A(y, {
|
|
1468
1464
|
icon: "lucide-cloud-upload",
|
|
1469
1465
|
class: "tw-text-[100px] tw-text-[color:var(--assets-manager-empty-icon-color)]"
|
|
1470
1466
|
}),
|
|
1471
|
-
|
|
1472
|
-
|
|
1467
|
+
O("div", yi, N(l(o)("ASSETS_MANAGER.EMPTY.UPLOAD_ASSETS")), 1),
|
|
1468
|
+
A(G, { onClick: $ }, {
|
|
1473
1469
|
default: h(() => [
|
|
1474
|
-
|
|
1470
|
+
W(N(l(o)("ASSETS_MANAGER.EMPTY.UPLOAD")), 1)
|
|
1475
1471
|
]),
|
|
1476
1472
|
_: 1
|
|
1477
1473
|
})
|
|
1478
1474
|
], 64))
|
|
1479
1475
|
])
|
|
1480
1476
|
]),
|
|
1481
|
-
item_size: h(({ item:
|
|
1482
|
-
|
|
1477
|
+
item_size: h(({ item: M }) => [
|
|
1478
|
+
O("div", null, N(l(Ke)(M.size ?? 0)), 1)
|
|
1483
1479
|
]),
|
|
1484
|
-
item_url: h(({ item:
|
|
1485
|
-
|
|
1486
|
-
l(We)(
|
|
1480
|
+
item_url: h(({ item: M }) => [
|
|
1481
|
+
O("div", Pi, [
|
|
1482
|
+
l(We)(M.name ?? "") ? (m(), k(u, {
|
|
1487
1483
|
key: 0,
|
|
1488
1484
|
bordered: !0,
|
|
1489
1485
|
size: "s",
|
|
1490
1486
|
aspect: "1x1",
|
|
1491
|
-
src:
|
|
1487
|
+
src: M.url,
|
|
1492
1488
|
background: "contain"
|
|
1493
|
-
}, null, 8, ["src"])) : (
|
|
1489
|
+
}, null, 8, ["src"])) : (m(), k(y, {
|
|
1494
1490
|
key: 1,
|
|
1495
|
-
icon: l(ze)(
|
|
1491
|
+
icon: l(ze)(M.name ?? ""),
|
|
1496
1492
|
class: "tw-text-[color:var(--assets-manager-thumbnail-color)] tw-text-[38px]"
|
|
1497
1493
|
}, null, 8, ["icon"]))
|
|
1498
1494
|
])
|
|
1499
1495
|
]),
|
|
1500
|
-
item_sortOrder: h(({ item:
|
|
1501
|
-
|
|
1496
|
+
item_sortOrder: h(({ item: M }) => [
|
|
1497
|
+
O("div", null, N(M.sortOrder), 1)
|
|
1502
1498
|
]),
|
|
1503
|
-
"mobile-item": h(({ item:
|
|
1504
|
-
|
|
1505
|
-
l(We)(
|
|
1499
|
+
"mobile-item": h(({ item: M }) => [
|
|
1500
|
+
O("div", Di, [
|
|
1501
|
+
l(We)(M.name ?? "") ? (m(), k(u, {
|
|
1506
1502
|
key: 0,
|
|
1507
1503
|
bordered: !0,
|
|
1508
1504
|
size: "s",
|
|
1509
1505
|
aspect: "1x1",
|
|
1510
|
-
src:
|
|
1506
|
+
src: M.url,
|
|
1511
1507
|
background: "contain"
|
|
1512
|
-
}, null, 8, ["src"])) : (
|
|
1513
|
-
|
|
1514
|
-
icon: l(ze)(
|
|
1508
|
+
}, null, 8, ["src"])) : (m(), B("div", Ci, [
|
|
1509
|
+
A(y, {
|
|
1510
|
+
icon: l(ze)(M.name ?? ""),
|
|
1515
1511
|
class: "tw-text-[color:var(--assets-manager-thumbnail-color)] tw-w-12 tw-text-[48px]"
|
|
1516
1512
|
}, null, 8, ["icon"])
|
|
1517
1513
|
])),
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1514
|
+
O("div", Ni, [
|
|
1515
|
+
O("div", Vi, N(M.name), 1),
|
|
1516
|
+
O("div", ki, [
|
|
1517
|
+
O("div", Mi, [
|
|
1518
|
+
A(g, null, {
|
|
1523
1519
|
default: h(() => [
|
|
1524
|
-
|
|
1520
|
+
W(N(l(o)("ASSETS_MANAGER.TABLE.HEADER.SIZE")), 1)
|
|
1525
1521
|
]),
|
|
1526
1522
|
_: 1
|
|
1527
1523
|
}),
|
|
1528
|
-
|
|
1524
|
+
O("div", Bi, N(l(Ke)(M.size ?? 0)), 1)
|
|
1529
1525
|
]),
|
|
1530
|
-
|
|
1531
|
-
|
|
1526
|
+
O("div", $i, [
|
|
1527
|
+
A(g, null, {
|
|
1532
1528
|
default: h(() => [
|
|
1533
|
-
|
|
1529
|
+
W(N(l(o)("ASSETS_MANAGER.TABLE.HEADER.CREATED_DATE")), 1)
|
|
1534
1530
|
]),
|
|
1535
1531
|
_: 1
|
|
1536
1532
|
}),
|
|
1537
|
-
|
|
1533
|
+
O("div", Fi, N(M.createdDate && l(Dt)(M.createdDate)), 1)
|
|
1538
1534
|
]),
|
|
1539
|
-
|
|
1540
|
-
|
|
1535
|
+
O("div", xi, [
|
|
1536
|
+
A(g, null, {
|
|
1541
1537
|
default: h(() => [
|
|
1542
|
-
|
|
1538
|
+
W(N(l(o)("ASSETS_MANAGER.TABLE.HEADER.SORT_ORDER")), 1)
|
|
1543
1539
|
]),
|
|
1544
1540
|
_: 1
|
|
1545
1541
|
}),
|
|
1546
|
-
|
|
1542
|
+
O("div", Gi, N(M.sortOrder), 1)
|
|
1547
1543
|
])
|
|
1548
1544
|
])
|
|
1549
1545
|
])
|
|
@@ -1552,16 +1548,16 @@ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1552
1548
|
_: 1
|
|
1553
1549
|
}, 8, ["columns", "expanded", "reorderable-rows", "items", "item-action-builder", "enable-item-actions", "multiselect"])
|
|
1554
1550
|
], 32)), [
|
|
1555
|
-
[
|
|
1551
|
+
[I, e.options?.loading]
|
|
1556
1552
|
]),
|
|
1557
|
-
|
|
1553
|
+
O("input", {
|
|
1558
1554
|
ref_key: "uploader",
|
|
1559
|
-
ref:
|
|
1555
|
+
ref: s,
|
|
1560
1556
|
type: "file",
|
|
1561
1557
|
hidden: "",
|
|
1562
1558
|
multiple: "",
|
|
1563
1559
|
name: "assets_manager",
|
|
1564
|
-
onChange:
|
|
1560
|
+
onChange: Y
|
|
1565
1561
|
}, null, 544)
|
|
1566
1562
|
]),
|
|
1567
1563
|
_: 1
|
|
@@ -1571,13 +1567,13 @@ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1571
1567
|
}), Ui = Hi, Wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1572
1568
|
__proto__: null,
|
|
1573
1569
|
AssetsManager: Ui
|
|
1574
|
-
}, Symbol.toStringTag, { value: "Module" })), zi = lt({ blades: Wi }), St =
|
|
1570
|
+
}, Symbol.toStringTag, { value: "Module" })), zi = lt({ blades: Wi }), St = ee("connection-status"), _t = "vc-framework-offline-status", At = H(!1), bt = H(!0);
|
|
1575
1571
|
function qt() {
|
|
1576
1572
|
if (!At.value && typeof window < "u") {
|
|
1577
1573
|
At.value = !0;
|
|
1578
1574
|
const { isOnline: e } = On();
|
|
1579
1575
|
le(e, (t) => {
|
|
1580
|
-
bt.value = t, t ? (St.info("Network connection restored"),
|
|
1576
|
+
bt.value = t, t ? (St.info("Network connection restored"), J.remove(_t), document.documentElement.classList.remove("vc-offline")) : (St.warn("Network connection lost"), J.warning(
|
|
1581
1577
|
"You are currently offline. Some features may be unavailable.",
|
|
1582
1578
|
{
|
|
1583
1579
|
notificationId: _t,
|
|
@@ -1590,20 +1586,20 @@ function qt() {
|
|
|
1590
1586
|
isOnline: He(bt)
|
|
1591
1587
|
};
|
|
1592
1588
|
}
|
|
1593
|
-
const ke =
|
|
1589
|
+
const ke = ee("slow-network"), Ki = 5e3, qi = ["slow-2g", "2g"];
|
|
1594
1590
|
let Me = null;
|
|
1595
1591
|
const Yt = "vc-framework-slow-network", Yi = 3e3, ji = "Your network is slow or the server is taking longer than usual. Please be patient.";
|
|
1596
|
-
let
|
|
1592
|
+
let ae = null;
|
|
1597
1593
|
function Tt() {
|
|
1598
|
-
|
|
1594
|
+
J.warning(ji, {
|
|
1599
1595
|
notificationId: Yt,
|
|
1600
1596
|
timeout: !1
|
|
1601
1597
|
});
|
|
1602
1598
|
}
|
|
1603
1599
|
function wt() {
|
|
1604
|
-
|
|
1600
|
+
J.remove(Yt);
|
|
1605
1601
|
}
|
|
1606
|
-
const vt =
|
|
1602
|
+
const vt = H(!1), Re = H(0), qe = H(!1), Pe = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Set(), Be = R(
|
|
1607
1603
|
() => Re.value > 0 || qe.value
|
|
1608
1604
|
);
|
|
1609
1605
|
function Zi(e) {
|
|
@@ -1626,11 +1622,11 @@ function jt() {
|
|
|
1626
1622
|
}, e.addEventListener("change", Me), Me());
|
|
1627
1623
|
const { isOnline: t } = qt();
|
|
1628
1624
|
le(Be, (a) => {
|
|
1629
|
-
a ? (
|
|
1630
|
-
ke.info("Network recovered — hiding notification"), wt(),
|
|
1625
|
+
a ? (ae != null && (clearTimeout(ae), ae = null), t.value && (ke.info("Slow network detected — showing notification"), Tt())) : ae = setTimeout(() => {
|
|
1626
|
+
ke.info("Network recovered — hiding notification"), wt(), ae = null;
|
|
1631
1627
|
}, Yi);
|
|
1632
1628
|
}), le(t, (a) => {
|
|
1633
|
-
a ? Be.value && Tt() : (
|
|
1629
|
+
a ? Be.value && Tt() : (ae != null && (clearTimeout(ae), ae = null), wt());
|
|
1634
1630
|
});
|
|
1635
1631
|
}
|
|
1636
1632
|
return {
|
|
@@ -1639,68 +1635,68 @@ function jt() {
|
|
|
1639
1635
|
untrackRequest: Xi
|
|
1640
1636
|
};
|
|
1641
1637
|
}
|
|
1642
|
-
const $e =
|
|
1638
|
+
const $e = ee("interceptors");
|
|
1643
1639
|
function Ji(e) {
|
|
1644
|
-
const { fetch: t } = window, { signOut: a, isAuthenticated: o } = ce(), { trackRequest: n, untrackRequest:
|
|
1645
|
-
let
|
|
1640
|
+
const { fetch: t } = window, { signOut: a, isAuthenticated: o } = ce(), { trackRequest: n, untrackRequest: d } = jt();
|
|
1641
|
+
let i = 0;
|
|
1646
1642
|
return window.fetch = async (...s) => {
|
|
1647
1643
|
if (window.__DEMO_MODE__)
|
|
1648
|
-
return $e.warn("CANCELLED FETCH WHILE IN __DEMO_MODE__: ", ...s), $e.warn("Please logout and add APP_PLATFORM_URL into .env file of your application to enable API calls"), new Promise((
|
|
1649
|
-
s[0] === "/api/platform/security/login" ?
|
|
1644
|
+
return $e.warn("CANCELLED FETCH WHILE IN __DEMO_MODE__: ", ...s), $e.warn("Please logout and add APP_PLATFORM_URL into .env file of your application to enable API calls"), new Promise((r) => {
|
|
1645
|
+
s[0] === "/api/platform/security/login" ? r({
|
|
1650
1646
|
status: 200,
|
|
1651
1647
|
text: async () => JSON.stringify({ succeeded: !0 })
|
|
1652
|
-
}) : s[0] === "/api/platform/security/currentuser" ? (
|
|
1648
|
+
}) : s[0] === "/api/platform/security/currentuser" ? (J.warning(
|
|
1653
1649
|
`You are currently in DEMO mode until the first page refresh.
|
|
1654
1650
|
All API calls are disabled. Please add APP_PLATFORM_URL to your application's .env file to enable API calls.`,
|
|
1655
1651
|
{
|
|
1656
1652
|
timeout: 1e4
|
|
1657
1653
|
}
|
|
1658
|
-
),
|
|
1654
|
+
), r({
|
|
1659
1655
|
status: 200,
|
|
1660
1656
|
text: async () => JSON.stringify({ id: "demo_user_id", userName: "DEMO_USER" })
|
|
1661
|
-
})) :
|
|
1657
|
+
})) : r({
|
|
1662
1658
|
status: 200,
|
|
1663
1659
|
text: async () => JSON.stringify({})
|
|
1664
1660
|
});
|
|
1665
1661
|
});
|
|
1666
1662
|
{
|
|
1667
|
-
let
|
|
1668
|
-
const
|
|
1663
|
+
let r = function(V) {
|
|
1664
|
+
const D = typeof V == "string" ? V : V instanceof Request ? V.url : V.toString();
|
|
1669
1665
|
try {
|
|
1670
|
-
const
|
|
1671
|
-
return
|
|
1666
|
+
const b = new URL(D, window.location.origin);
|
|
1667
|
+
return b.origin === window.location.origin && b.pathname.startsWith("/api/");
|
|
1672
1668
|
} catch {
|
|
1673
1669
|
return !1;
|
|
1674
1670
|
}
|
|
1675
1671
|
};
|
|
1676
|
-
const [
|
|
1677
|
-
if (!
|
|
1672
|
+
const [c, E] = s;
|
|
1673
|
+
if (!r(c))
|
|
1678
1674
|
return t(...s);
|
|
1679
1675
|
if (!navigator.onLine)
|
|
1680
|
-
return $e.warn("Request blocked: browser is offline",
|
|
1681
|
-
const
|
|
1682
|
-
n(
|
|
1683
|
-
const
|
|
1676
|
+
return $e.warn("Request blocked: browser is offline", c), Promise.reject(new Error("Network unavailable. Please check your connection."));
|
|
1677
|
+
const p = String(++i);
|
|
1678
|
+
n(p);
|
|
1679
|
+
const _ = new AbortController();
|
|
1684
1680
|
let f = !1;
|
|
1685
|
-
const
|
|
1686
|
-
f = !0,
|
|
1687
|
-
}, 3e4),
|
|
1688
|
-
|
|
1681
|
+
const z = setTimeout(() => {
|
|
1682
|
+
f = !0, _.abort();
|
|
1683
|
+
}, 3e4), x = E?.signal, v = () => _.abort();
|
|
1684
|
+
x?.aborted ? v() : x && x.addEventListener("abort", v, { once: !0 });
|
|
1689
1685
|
try {
|
|
1690
|
-
const
|
|
1691
|
-
...
|
|
1692
|
-
signal:
|
|
1686
|
+
const V = await t(c, {
|
|
1687
|
+
...E || {},
|
|
1688
|
+
signal: _.signal
|
|
1693
1689
|
});
|
|
1694
|
-
return
|
|
1695
|
-
Qi(e),
|
|
1690
|
+
return V.status === 401 && o.value && a().then(() => {
|
|
1691
|
+
Qi(e), J.error(
|
|
1696
1692
|
`Access Denied: Your session has expired or you do not have the necessary permissions.
|
|
1697
1693
|
Please log in again or contact the administrator for assistance.`
|
|
1698
1694
|
);
|
|
1699
|
-
}),
|
|
1700
|
-
} catch (
|
|
1701
|
-
throw f ? new Error("Request timed out. Please try again.") :
|
|
1695
|
+
}), V;
|
|
1696
|
+
} catch (V) {
|
|
1697
|
+
throw f ? new Error("Request timed out. Please try again.") : V;
|
|
1702
1698
|
} finally {
|
|
1703
|
-
|
|
1699
|
+
d(p), clearTimeout(z), x && x.removeEventListener("abort", v);
|
|
1704
1700
|
}
|
|
1705
1701
|
}
|
|
1706
1702
|
}, window.fetch;
|
|
@@ -1772,7 +1768,7 @@ const Zt = { THEMES: { LIGHT: "Light", DARK: "Dark" } }, Xt = { USER: { ROLE: {
|
|
|
1772
1768
|
__proto__: null,
|
|
1773
1769
|
de: sr,
|
|
1774
1770
|
en: tr
|
|
1775
|
-
}, Symbol.toStringTag, { value: "Module" })), Fe =
|
|
1771
|
+
}, Symbol.toStringTag, { value: "Module" })), Fe = ee("global-error-handler");
|
|
1776
1772
|
function Le(e) {
|
|
1777
1773
|
return e instanceof Error ? `${e.name}:${e.message}` : String(e);
|
|
1778
1774
|
}
|
|
@@ -1781,48 +1777,48 @@ function xe(e) {
|
|
|
1781
1777
|
const t = Le(e), a = Date.now(), o = Ee.get(t);
|
|
1782
1778
|
if (o && a - o < Lt) return !0;
|
|
1783
1779
|
if (Ee.set(t, a), Ee.size > 50)
|
|
1784
|
-
for (const [n,
|
|
1785
|
-
a -
|
|
1780
|
+
for (const [n, d] of Ee)
|
|
1781
|
+
a - d > Lt && Ee.delete(n);
|
|
1786
1782
|
return !1;
|
|
1787
1783
|
}
|
|
1788
1784
|
function nr(e) {
|
|
1789
1785
|
const t = e.config.errorHandler;
|
|
1790
|
-
if (e.config.errorHandler = (
|
|
1791
|
-
if (Fe.error("Unhandled Vue error:",
|
|
1792
|
-
Info:`, s), !xe(
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1786
|
+
if (e.config.errorHandler = (d, i, s) => {
|
|
1787
|
+
if (Fe.error("Unhandled Vue error:", d, `
|
|
1788
|
+
Info:`, s), !xe(d)) {
|
|
1789
|
+
const r = we(d);
|
|
1790
|
+
J.error(r.message, {
|
|
1795
1791
|
timeout: 8e3,
|
|
1796
|
-
notificationId: `global-vue-${Le(
|
|
1792
|
+
notificationId: `global-vue-${Le(d)}`
|
|
1797
1793
|
});
|
|
1798
1794
|
}
|
|
1799
|
-
t?.(
|
|
1795
|
+
t?.(d, i, s);
|
|
1800
1796
|
}, typeof window > "u") return;
|
|
1801
1797
|
const a = window;
|
|
1802
1798
|
if (a.__VC_GLOBAL_ERROR_HANDLERS_INSTALLED__) return;
|
|
1803
1799
|
a.__VC_GLOBAL_ERROR_HANDLERS_INSTALLED__ = !0;
|
|
1804
|
-
const o = (
|
|
1805
|
-
if (Fe.error("Unhandled rejection:",
|
|
1806
|
-
const
|
|
1807
|
-
|
|
1800
|
+
const o = (d) => {
|
|
1801
|
+
if (Fe.error("Unhandled rejection:", d.reason), !xe(d.reason)) {
|
|
1802
|
+
const i = we(d.reason);
|
|
1803
|
+
J.error(i.message, {
|
|
1808
1804
|
timeout: 8e3,
|
|
1809
|
-
notificationId: `global-rejection-${Le(
|
|
1805
|
+
notificationId: `global-rejection-${Le(d.reason)}`
|
|
1810
1806
|
});
|
|
1811
1807
|
}
|
|
1812
1808
|
};
|
|
1813
1809
|
window.addEventListener("unhandledrejection", o);
|
|
1814
|
-
const n = (
|
|
1815
|
-
if (
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1810
|
+
const n = (d) => {
|
|
1811
|
+
if (d.error && (Fe.error("Uncaught error:", d.error), !xe(d.error))) {
|
|
1812
|
+
const i = we(d.error);
|
|
1813
|
+
J.error(i.message, {
|
|
1818
1814
|
timeout: 8e3,
|
|
1819
|
-
notificationId: `global-error-${Le(
|
|
1815
|
+
notificationId: `global-error-${Le(d.error)}`
|
|
1820
1816
|
});
|
|
1821
1817
|
}
|
|
1822
1818
|
};
|
|
1823
1819
|
window.addEventListener("error", n);
|
|
1824
1820
|
}
|
|
1825
|
-
const ir = /* @__PURE__ */
|
|
1821
|
+
const ir = /* @__PURE__ */ K({
|
|
1826
1822
|
__name: "sidebar",
|
|
1827
1823
|
props: {
|
|
1828
1824
|
position: { default: "right" },
|
|
@@ -1833,76 +1829,76 @@ const ir = /* @__PURE__ */ Y({
|
|
|
1833
1829
|
},
|
|
1834
1830
|
emits: ["close"],
|
|
1835
1831
|
setup(e, { emit: t }) {
|
|
1836
|
-
const a = e, o = t, n =
|
|
1837
|
-
function
|
|
1838
|
-
|
|
1832
|
+
const a = e, o = t, n = te(Bt, H(!1)), d = te($t, H(!1)), i = R(() => a.render === "always" ? !0 : a.render === "mobile" ? n.value : d.value), s = R(() => a.isExpanded && i.value);
|
|
1833
|
+
function r(c) {
|
|
1834
|
+
c || o("close");
|
|
1839
1835
|
}
|
|
1840
|
-
return (
|
|
1836
|
+
return (c, E) => s.value ? (m(), k(l(Rt), {
|
|
1841
1837
|
key: 0,
|
|
1842
1838
|
"model-value": !0,
|
|
1843
1839
|
position: e.position,
|
|
1844
1840
|
title: e.title,
|
|
1845
1841
|
"close-button": e.closeCross,
|
|
1846
|
-
teleport: !l(
|
|
1847
|
-
"onUpdate:modelValue":
|
|
1842
|
+
teleport: !l(d),
|
|
1843
|
+
"onUpdate:modelValue": r
|
|
1848
1844
|
}, wn({
|
|
1849
1845
|
default: h(() => [
|
|
1850
|
-
|
|
1846
|
+
Z(c.$slots, "content")
|
|
1851
1847
|
]),
|
|
1852
1848
|
_: 2
|
|
1853
1849
|
}, [
|
|
1854
|
-
|
|
1850
|
+
c.$slots.header ? {
|
|
1855
1851
|
name: "header",
|
|
1856
|
-
fn: h(({ close:
|
|
1857
|
-
|
|
1852
|
+
fn: h(({ close: p }) => [
|
|
1853
|
+
Z(c.$slots, "header", { close: p })
|
|
1858
1854
|
]),
|
|
1859
1855
|
key: "0"
|
|
1860
1856
|
} : void 0
|
|
1861
|
-
]), 1032, ["position", "title", "close-button", "teleport"])) :
|
|
1857
|
+
]), 1032, ["position", "title", "close-button", "teleport"])) : Z(c.$slots, "content", { key: 1 });
|
|
1862
1858
|
}
|
|
1863
|
-
}), ud = ir, rr = { class: "vc-app-switcher__item" }, lr = ["src", "alt"], cr = { class: "vc-app-switcher__item-title" }, fd = /* @__PURE__ */
|
|
1859
|
+
}), ud = ir, rr = { class: "vc-app-switcher__item" }, lr = ["src", "alt"], cr = { class: "vc-app-switcher__item-title" }, fd = /* @__PURE__ */ K({
|
|
1864
1860
|
__name: "vc-app-switcher",
|
|
1865
1861
|
props: {
|
|
1866
1862
|
appsList: { default: void 0 }
|
|
1867
1863
|
},
|
|
1868
1864
|
emits: ["onClick"],
|
|
1869
1865
|
setup(e, { emit: t }) {
|
|
1870
|
-
const a = t, o = (
|
|
1871
|
-
const s = window.location.pathname.replace(/\/+$/, ""),
|
|
1872
|
-
return
|
|
1873
|
-
},
|
|
1874
|
-
a("onClick",
|
|
1866
|
+
const a = t, o = (i) => i, n = (i) => {
|
|
1867
|
+
const s = window.location.pathname.replace(/\/+$/, ""), r = i.match(s);
|
|
1868
|
+
return r ? !!r[0] : !1;
|
|
1869
|
+
}, d = (i) => {
|
|
1870
|
+
a("onClick", i);
|
|
1875
1871
|
};
|
|
1876
|
-
return (
|
|
1872
|
+
return (i, s) => e.appsList && e.appsList.length ? (m(), B("div", {
|
|
1877
1873
|
key: 0,
|
|
1878
1874
|
ref: "container",
|
|
1879
1875
|
class: "vc-app-switcher",
|
|
1880
1876
|
onContextmenu: s[0] || (s[0] = ve(() => {
|
|
1881
1877
|
}, ["prevent"]))
|
|
1882
1878
|
}, [
|
|
1883
|
-
|
|
1879
|
+
A(l(at), {
|
|
1884
1880
|
"model-value": !0,
|
|
1885
1881
|
items: e.appsList,
|
|
1886
|
-
"is-item-active": (
|
|
1882
|
+
"is-item-active": (r) => n(r.relativeUrl ?? ""),
|
|
1887
1883
|
"max-height": "auto",
|
|
1888
1884
|
padded: !1,
|
|
1889
|
-
onItemClick:
|
|
1885
|
+
onItemClick: d
|
|
1890
1886
|
}, {
|
|
1891
|
-
item: h(({ item:
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
src: o(
|
|
1895
|
-
alt: `icon_${
|
|
1887
|
+
item: h(({ item: r }) => [
|
|
1888
|
+
O("div", rr, [
|
|
1889
|
+
O("img", {
|
|
1890
|
+
src: o(r.iconUrl ?? ""),
|
|
1891
|
+
alt: `icon_${r.id}`,
|
|
1896
1892
|
class: "vc-app-switcher__item-icon"
|
|
1897
1893
|
}, null, 8, lr),
|
|
1898
|
-
|
|
1894
|
+
O("p", cr, N(r.title), 1)
|
|
1899
1895
|
])
|
|
1900
1896
|
]),
|
|
1901
1897
|
_: 1
|
|
1902
1898
|
}, 8, ["items", "is-item-active"])
|
|
1903
|
-
], 544)) :
|
|
1899
|
+
], 544)) : U("", !0);
|
|
1904
1900
|
}
|
|
1905
|
-
}), dr = { class: "tw-flex tw-flex-row tw-items-center tw-gap-2" }, ur = /* @__PURE__ */
|
|
1901
|
+
}), dr = { class: "tw-flex tw-flex-row tw-items-center tw-gap-2" }, ur = /* @__PURE__ */ K({
|
|
1906
1902
|
__name: "external-provider",
|
|
1907
1903
|
props: {
|
|
1908
1904
|
logo: {},
|
|
@@ -1911,39 +1907,39 @@ const ir = /* @__PURE__ */ Y({
|
|
|
1911
1907
|
},
|
|
1912
1908
|
emits: ["signIn"],
|
|
1913
1909
|
setup(e) {
|
|
1914
|
-
const t = e, a =
|
|
1915
|
-
return (o, n) => (
|
|
1910
|
+
const t = e, a = R(() => t.logo && !t.logo.startsWith("data:image") && !t.logo.startsWith("http") ? new URL(t.logo, window.location.origin).toString() : t.logo);
|
|
1911
|
+
return (o, n) => (m(), k(l(Mt), {
|
|
1916
1912
|
variant: "secondary",
|
|
1917
1913
|
class: "vc-external-provider",
|
|
1918
|
-
onClick: n[0] || (n[0] = (
|
|
1914
|
+
onClick: n[0] || (n[0] = (d) => o.$emit("signIn"))
|
|
1919
1915
|
}, {
|
|
1920
1916
|
default: h(() => [
|
|
1921
|
-
|
|
1922
|
-
|
|
1917
|
+
O("div", dr, [
|
|
1918
|
+
A(l(Qe), {
|
|
1923
1919
|
src: a.value,
|
|
1924
1920
|
class: "vc-external-provider__icon",
|
|
1925
1921
|
size: "xxs"
|
|
1926
1922
|
}, null, 8, ["src"]),
|
|
1927
|
-
|
|
1923
|
+
W(N(e.displayName), 1)
|
|
1928
1924
|
])
|
|
1929
1925
|
]),
|
|
1930
1926
|
_: 1
|
|
1931
1927
|
}));
|
|
1932
1928
|
}
|
|
1933
|
-
}), fr = { class: "tw-flex tw-justify-center tw-flex-col tw-gap-4" }, mr = /* @__PURE__ */
|
|
1929
|
+
}), fr = { class: "tw-flex tw-justify-center tw-flex-col tw-gap-4" }, mr = /* @__PURE__ */ K({
|
|
1934
1930
|
__name: "external-providers",
|
|
1935
1931
|
props: {
|
|
1936
1932
|
providers: {}
|
|
1937
1933
|
},
|
|
1938
1934
|
setup(e) {
|
|
1939
1935
|
const { signIn: t } = Ft();
|
|
1940
|
-
return (a, o) => (
|
|
1941
|
-
(
|
|
1936
|
+
return (a, o) => (m(), B("div", fr, [
|
|
1937
|
+
(m(!0), B(X, null, ne(e.providers, (n) => (m(), k(ur, {
|
|
1942
1938
|
key: n.authenticationType,
|
|
1943
1939
|
logo: n.logoUrl,
|
|
1944
1940
|
"display-name": n.displayName,
|
|
1945
1941
|
"authentication-type": n.authenticationType,
|
|
1946
|
-
onSignIn: (
|
|
1942
|
+
onSignIn: (d) => l(t)(n.authenticationType)
|
|
1947
1943
|
}, null, 8, ["logo", "display-name", "authentication-type", "onSignIn"]))), 128))
|
|
1948
1944
|
]));
|
|
1949
1945
|
}
|
|
@@ -1953,7 +1949,7 @@ const ir = /* @__PURE__ */ Y({
|
|
|
1953
1949
|
}, pr = {
|
|
1954
1950
|
key: 0,
|
|
1955
1951
|
class: "vc-login-page__separator-line"
|
|
1956
|
-
}, Er = /* @__PURE__ */
|
|
1952
|
+
}, Er = /* @__PURE__ */ K({
|
|
1957
1953
|
__name: "Login",
|
|
1958
1954
|
props: {
|
|
1959
1955
|
logo: {},
|
|
@@ -1963,147 +1959,147 @@ const ir = /* @__PURE__ */ Y({
|
|
|
1963
1959
|
ssoOnly: { type: Boolean }
|
|
1964
1960
|
},
|
|
1965
1961
|
setup(e) {
|
|
1966
|
-
const t =
|
|
1962
|
+
const t = ee("login-page"), a = e, o = Ae(), { validateField: n } = me({ validateOnMount: !1 }), { uiSettings: d, loading: i } = be(), s = H({ succeeded: !0 }), { signIn: r, loading: c, user: E } = ce(), { getProviders: p } = Ft(), _ = _e(), f = H(), z = H(!1);
|
|
1967
1963
|
de(async () => {
|
|
1968
|
-
f.value = await
|
|
1964
|
+
f.value = await p(), z.value = !0;
|
|
1969
1965
|
});
|
|
1970
|
-
const
|
|
1971
|
-
logo:
|
|
1972
|
-
})),
|
|
1966
|
+
const x = R(() => ({
|
|
1967
|
+
logo: i.value ? "" : d.value?.logo || a.logo
|
|
1968
|
+
})), v = Se({
|
|
1973
1969
|
username: "",
|
|
1974
1970
|
password: ""
|
|
1975
|
-
}),
|
|
1976
|
-
if (
|
|
1977
|
-
if (s.value.error = "", s.value = await
|
|
1971
|
+
}), V = async () => {
|
|
1972
|
+
if (_.value) {
|
|
1973
|
+
if (s.value.error = "", s.value = await r(v.username, v.password), s.value.succeeded && E.value?.passwordExpired) {
|
|
1978
1974
|
await o.push({ name: "ChangePassword" });
|
|
1979
1975
|
return;
|
|
1980
1976
|
}
|
|
1981
1977
|
if (s.value.succeeded) {
|
|
1982
|
-
const
|
|
1983
|
-
localStorage.removeItem("redirectAfterLogin"), await o.push(
|
|
1978
|
+
const b = localStorage.getItem("redirectAfterLogin") || "/";
|
|
1979
|
+
localStorage.removeItem("redirectAfterLogin"), await o.push(b);
|
|
1984
1980
|
return;
|
|
1985
1981
|
}
|
|
1986
|
-
s.value.status === 401 ? s.value.error = "The login or password is incorrect." : s.value.status ? s.value.error = "Authentication error (code: " + s.value.status + ")." : s.value.error ? s.value.error = "Authentication error: " + s.value.error : s.value.error = "The login or password is incorrect.",
|
|
1982
|
+
s.value.status === 401 ? s.value.error = "The login or password is incorrect." : s.value.status ? s.value.error = "Authentication error (code: " + s.value.status + ")." : s.value.error ? s.value.error = "Authentication error: " + s.value.error : s.value.error = "The login or password is incorrect.", v.password = "", n("password");
|
|
1987
1983
|
}
|
|
1988
|
-
},
|
|
1984
|
+
}, D = () => {
|
|
1989
1985
|
o.push({ name: "ForgotPassword" });
|
|
1990
1986
|
};
|
|
1991
|
-
return t.debug("Init login-page"), (
|
|
1992
|
-
const
|
|
1993
|
-
return
|
|
1994
|
-
logo:
|
|
1987
|
+
return t.debug("Init login-page"), (b, $) => {
|
|
1988
|
+
const q = F("VcHint"), Y = F("VcInput"), j = F("VcButton"), L = F("VcForm"), C = F("VcAuthLayout");
|
|
1989
|
+
return m(), k(C, {
|
|
1990
|
+
logo: x.value.logo,
|
|
1995
1991
|
background: e.background,
|
|
1996
|
-
title: e.title ||
|
|
1997
|
-
subtitle: e.subtitle ||
|
|
1992
|
+
title: e.title || b.$t("LOGIN.TITLE"),
|
|
1993
|
+
subtitle: e.subtitle || b.$t("LOGIN.SUBTITLE"),
|
|
1998
1994
|
class: "vc-login-page"
|
|
1999
1995
|
}, {
|
|
2000
1996
|
default: h(() => [
|
|
2001
|
-
f.value && f.value.length ? (
|
|
2002
|
-
|
|
2003
|
-
e.ssoOnly ?
|
|
2004
|
-
])) :
|
|
2005
|
-
e.ssoOnly &&
|
|
1997
|
+
f.value && f.value.length ? (m(), B("div", gr, [
|
|
1998
|
+
A(mr, { providers: f.value }, null, 8, ["providers"]),
|
|
1999
|
+
e.ssoOnly ? U("", !0) : (m(), B("div", pr, N(b.$t("LOGIN.OR")), 1))
|
|
2000
|
+
])) : U("", !0),
|
|
2001
|
+
e.ssoOnly && z.value && !f.value?.length ? (m(), k(q, {
|
|
2006
2002
|
key: 1,
|
|
2007
2003
|
class: "tw-mt-4 tw-text-danger-500"
|
|
2008
2004
|
}, {
|
|
2009
2005
|
default: h(() => [
|
|
2010
|
-
|
|
2006
|
+
W(N(b.$t("LOGIN.SSO_NO_PROVIDERS_ERROR")), 1)
|
|
2011
2007
|
]),
|
|
2012
2008
|
_: 1
|
|
2013
|
-
})) :
|
|
2014
|
-
e.ssoOnly ?
|
|
2015
|
-
|
|
2016
|
-
onSubmit:
|
|
2009
|
+
})) : U("", !0),
|
|
2010
|
+
e.ssoOnly ? U("", !0) : (m(), B(X, { key: 2 }, [
|
|
2011
|
+
A(L, {
|
|
2012
|
+
onSubmit: V,
|
|
2017
2013
|
class: "tw-gap-5"
|
|
2018
2014
|
}, {
|
|
2019
2015
|
default: h(() => [
|
|
2020
|
-
|
|
2021
|
-
label:
|
|
2016
|
+
A(l(Q), {
|
|
2017
|
+
label: b.$t("LOGIN.FIELDS.LOGIN.LABEL"),
|
|
2022
2018
|
name: "username",
|
|
2023
|
-
"model-value":
|
|
2019
|
+
"model-value": v.username,
|
|
2024
2020
|
rules: "required"
|
|
2025
2021
|
}, {
|
|
2026
|
-
default: h(({ errorMessage:
|
|
2027
|
-
|
|
2022
|
+
default: h(({ errorMessage: S, handleChange: T, errors: y }) => [
|
|
2023
|
+
A(Y, {
|
|
2028
2024
|
ref: "loginField",
|
|
2029
|
-
modelValue:
|
|
2025
|
+
modelValue: v.username,
|
|
2030
2026
|
"onUpdate:modelValue": [
|
|
2031
|
-
|
|
2032
|
-
|
|
2027
|
+
$[0] || ($[0] = (G) => v.username = G),
|
|
2028
|
+
T
|
|
2033
2029
|
],
|
|
2034
|
-
label:
|
|
2035
|
-
placeholder:
|
|
2030
|
+
label: b.$t("LOGIN.FIELDS.LOGIN.LABEL"),
|
|
2031
|
+
placeholder: b.$t("LOGIN.FIELDS.LOGIN.PLACEHOLDER"),
|
|
2036
2032
|
required: "",
|
|
2037
|
-
error: !!
|
|
2038
|
-
"error-message":
|
|
2033
|
+
error: !!y.length,
|
|
2034
|
+
"error-message": S
|
|
2039
2035
|
}, null, 8, ["modelValue", "label", "placeholder", "error", "error-message", "onUpdate:modelValue"])
|
|
2040
2036
|
]),
|
|
2041
2037
|
_: 1
|
|
2042
2038
|
}, 8, ["label", "model-value"]),
|
|
2043
|
-
|
|
2044
|
-
label:
|
|
2039
|
+
A(l(Q), {
|
|
2040
|
+
label: b.$t("LOGIN.FIELDS.PASSWORD.LABEL"),
|
|
2045
2041
|
name: "password",
|
|
2046
|
-
"model-value":
|
|
2042
|
+
"model-value": v.password,
|
|
2047
2043
|
rules: "required"
|
|
2048
2044
|
}, {
|
|
2049
|
-
default: h(({ errorMessage:
|
|
2050
|
-
|
|
2045
|
+
default: h(({ errorMessage: S, handleChange: T, errors: y }) => [
|
|
2046
|
+
A(Y, {
|
|
2051
2047
|
ref: "passwordField",
|
|
2052
|
-
modelValue:
|
|
2048
|
+
modelValue: v.password,
|
|
2053
2049
|
"onUpdate:modelValue": [
|
|
2054
|
-
|
|
2055
|
-
|
|
2050
|
+
$[1] || ($[1] = (G) => v.password = G),
|
|
2051
|
+
T
|
|
2056
2052
|
],
|
|
2057
|
-
label:
|
|
2058
|
-
placeholder:
|
|
2053
|
+
label: b.$t("LOGIN.FIELDS.PASSWORD.LABEL"),
|
|
2054
|
+
placeholder: b.$t("LOGIN.FIELDS.PASSWORD.PLACEHOLDER"),
|
|
2059
2055
|
type: "password",
|
|
2060
2056
|
required: "",
|
|
2061
|
-
error: !!
|
|
2062
|
-
"error-message":
|
|
2063
|
-
onKeyup: st(
|
|
2057
|
+
error: !!y.length,
|
|
2058
|
+
"error-message": S,
|
|
2059
|
+
onKeyup: st(V, ["enter"])
|
|
2064
2060
|
}, null, 8, ["modelValue", "label", "placeholder", "error", "error-message", "onUpdate:modelValue"])
|
|
2065
2061
|
]),
|
|
2066
2062
|
_: 1
|
|
2067
2063
|
}, 8, ["label", "model-value"]),
|
|
2068
|
-
|
|
2064
|
+
A(j, {
|
|
2069
2065
|
variant: "primary",
|
|
2070
2066
|
class: "tw-w-full",
|
|
2071
2067
|
icon: "lucide-log-in",
|
|
2072
|
-
disabled: !l(
|
|
2073
|
-
loading: l(
|
|
2074
|
-
onClick:
|
|
2068
|
+
disabled: !l(_),
|
|
2069
|
+
loading: l(c),
|
|
2070
|
+
onClick: V
|
|
2075
2071
|
}, {
|
|
2076
2072
|
default: h(() => [
|
|
2077
|
-
|
|
2073
|
+
W(N(b.$t("LOGIN.BUTTON")), 1)
|
|
2078
2074
|
]),
|
|
2079
2075
|
_: 1
|
|
2080
2076
|
}, 8, ["disabled", "loading"]),
|
|
2081
|
-
|
|
2077
|
+
A(j, {
|
|
2082
2078
|
variant: "link",
|
|
2083
2079
|
class: "tw-w-full tw-justify-center",
|
|
2084
2080
|
type: "button",
|
|
2085
|
-
onClick:
|
|
2081
|
+
onClick: D
|
|
2086
2082
|
}, {
|
|
2087
2083
|
default: h(() => [
|
|
2088
|
-
|
|
2084
|
+
W(N(b.$t("LOGIN.FORGOT_PASSWORD_BUTTON")), 1)
|
|
2089
2085
|
]),
|
|
2090
2086
|
_: 1
|
|
2091
2087
|
})
|
|
2092
2088
|
]),
|
|
2093
2089
|
_: 1
|
|
2094
2090
|
}),
|
|
2095
|
-
|
|
2091
|
+
A(l(xn), {
|
|
2096
2092
|
name: "auth:after-form",
|
|
2097
2093
|
separator: "",
|
|
2098
2094
|
"separator-class": "tw-border-t tw-border-[color:var(--login-separator)] tw-border-solid tw-pb-5",
|
|
2099
2095
|
"wrapper-class": "vc-login-page__separator"
|
|
2100
2096
|
}),
|
|
2101
|
-
s.value.succeeded ?
|
|
2097
|
+
s.value.succeeded ? U("", !0) : (m(), k(q, {
|
|
2102
2098
|
key: 0,
|
|
2103
2099
|
class: "tw-mt-4 tw-text-danger-500"
|
|
2104
2100
|
}, {
|
|
2105
2101
|
default: h(() => [
|
|
2106
|
-
|
|
2102
|
+
W(N(s.value.error), 1)
|
|
2107
2103
|
]),
|
|
2108
2104
|
_: 1
|
|
2109
2105
|
}))
|
|
@@ -2113,7 +2109,7 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2113
2109
|
}, 8, ["logo", "background", "title", "subtitle"]);
|
|
2114
2110
|
};
|
|
2115
2111
|
}
|
|
2116
|
-
}), md = Er, hr = { class: "tw-text-center" }, Sr = { class: "tw-text-center tw-mb-6" }, _r = { class: "tw-text-sm tw-text-neutrals-600" }, Ar = /* @__PURE__ */
|
|
2112
|
+
}), md = Er, hr = { class: "tw-text-center" }, Sr = { class: "tw-text-center tw-mb-6" }, _r = { class: "tw-text-sm tw-text-neutrals-600" }, Ar = /* @__PURE__ */ K({
|
|
2117
2113
|
__name: "ForgotPassword",
|
|
2118
2114
|
props: {
|
|
2119
2115
|
logo: {},
|
|
@@ -2123,107 +2119,107 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2123
2119
|
setup(e) {
|
|
2124
2120
|
const t = e, a = Ae(), { t: o } = ue({ useScope: "global" });
|
|
2125
2121
|
me({ validateOnMount: !1 });
|
|
2126
|
-
const n = _e(), { uiSettings:
|
|
2122
|
+
const n = _e(), { uiSettings: d, loading: i } = be(), s = H(!1), r = H(""), c = H(!1), E = Se({
|
|
2127
2123
|
loginOrEmail: ""
|
|
2128
2124
|
});
|
|
2129
|
-
let
|
|
2125
|
+
let p;
|
|
2130
2126
|
if (t.composable && typeof t.composable == "function")
|
|
2131
|
-
|
|
2127
|
+
p = t.composable().forgotPassword;
|
|
2132
2128
|
else {
|
|
2133
|
-
const { requestPasswordReset:
|
|
2134
|
-
|
|
2135
|
-
await
|
|
2129
|
+
const { requestPasswordReset: v } = ce();
|
|
2130
|
+
p = async (V) => {
|
|
2131
|
+
await v(V.loginOrEmail);
|
|
2136
2132
|
};
|
|
2137
2133
|
}
|
|
2138
|
-
const
|
|
2139
|
-
logo:
|
|
2140
|
-
})), f =
|
|
2141
|
-
const
|
|
2142
|
-
return !
|
|
2143
|
-
}),
|
|
2144
|
-
if (!(!n.value || !
|
|
2134
|
+
const _ = R(() => ({
|
|
2135
|
+
logo: i.value ? "" : d.value?.logo || t.logo
|
|
2136
|
+
})), f = R(() => {
|
|
2137
|
+
const v = E.loginOrEmail, [V, D] = v.split("@");
|
|
2138
|
+
return !V || !D ? v : `${V.length > 2 ? V[0] + "***" + V[V.length - 1] : V[0] + "***"}@${D}`;
|
|
2139
|
+
}), z = async () => {
|
|
2140
|
+
if (!(!n.value || !p))
|
|
2145
2141
|
try {
|
|
2146
|
-
s.value = !0,
|
|
2147
|
-
} catch (
|
|
2148
|
-
|
|
2142
|
+
s.value = !0, r.value = "", await p({ loginOrEmail: E.loginOrEmail }), c.value = !0;
|
|
2143
|
+
} catch (v) {
|
|
2144
|
+
r.value = v instanceof Error ? v.message : String(v);
|
|
2149
2145
|
} finally {
|
|
2150
2146
|
s.value = !1;
|
|
2151
2147
|
}
|
|
2152
|
-
},
|
|
2148
|
+
}, x = () => {
|
|
2153
2149
|
a.push({ name: "Login" });
|
|
2154
2150
|
};
|
|
2155
|
-
return (
|
|
2156
|
-
const
|
|
2157
|
-
return
|
|
2158
|
-
logo:
|
|
2151
|
+
return (v, V) => {
|
|
2152
|
+
const D = F("VcInput"), b = F("VcButton"), $ = F("VcForm"), q = F("VcHint"), Y = F("VcAuthLayout");
|
|
2153
|
+
return m(), k(Y, {
|
|
2154
|
+
logo: _.value.logo,
|
|
2159
2155
|
background: e.background,
|
|
2160
|
-
title:
|
|
2161
|
-
subtitle:
|
|
2156
|
+
title: c.value ? l(o)("FORGOT_PASSWORD.SUCCESS_TITLE") : l(o)("FORGOT_PASSWORD.TITLE"),
|
|
2157
|
+
subtitle: c.value ? void 0 : l(o)("FORGOT_PASSWORD.SUBTITLE")
|
|
2162
2158
|
}, {
|
|
2163
2159
|
default: h(() => [
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2160
|
+
c.value ? (m(), B(X, { key: 1 }, [
|
|
2161
|
+
O("div", Sr, [
|
|
2162
|
+
O("p", _r, N(l(o)("FORGOT_PASSWORD.SUCCESS_TEXT", { email: f.value })), 1)
|
|
2167
2163
|
]),
|
|
2168
|
-
|
|
2164
|
+
A(b, {
|
|
2169
2165
|
variant: "primary",
|
|
2170
2166
|
class: "tw-w-full",
|
|
2171
|
-
onClick:
|
|
2167
|
+
onClick: x
|
|
2172
2168
|
}, {
|
|
2173
2169
|
default: h(() => [
|
|
2174
|
-
|
|
2170
|
+
W(N(l(o)("FORGOT_PASSWORD.BACK_TO_LOGIN")), 1)
|
|
2175
2171
|
]),
|
|
2176
2172
|
_: 1
|
|
2177
2173
|
})
|
|
2178
|
-
], 64)) : (
|
|
2179
|
-
|
|
2174
|
+
], 64)) : (m(), B(X, { key: 0 }, [
|
|
2175
|
+
A($, { onSubmit: z }, {
|
|
2180
2176
|
default: h(() => [
|
|
2181
|
-
|
|
2177
|
+
A(l(Q), {
|
|
2182
2178
|
label: l(o)("FORGOT_PASSWORD.FIELDS.EMAIL.LABEL"),
|
|
2183
2179
|
name: "loginOrEmail",
|
|
2184
|
-
"model-value":
|
|
2180
|
+
"model-value": E.loginOrEmail,
|
|
2185
2181
|
rules: "required|email"
|
|
2186
2182
|
}, {
|
|
2187
|
-
default: h(({ errorMessage:
|
|
2188
|
-
|
|
2183
|
+
default: h(({ errorMessage: j, handleChange: L, errors: C }) => [
|
|
2184
|
+
A(D, {
|
|
2189
2185
|
ref: "emailField",
|
|
2190
|
-
modelValue:
|
|
2186
|
+
modelValue: E.loginOrEmail,
|
|
2191
2187
|
"onUpdate:modelValue": [
|
|
2192
|
-
|
|
2193
|
-
|
|
2188
|
+
V[0] || (V[0] = (S) => E.loginOrEmail = S),
|
|
2189
|
+
L
|
|
2194
2190
|
],
|
|
2195
2191
|
class: "tw-mb-6",
|
|
2196
2192
|
label: l(o)("FORGOT_PASSWORD.FIELDS.EMAIL.LABEL"),
|
|
2197
2193
|
placeholder: l(o)("FORGOT_PASSWORD.FIELDS.EMAIL.PLACEHOLDER"),
|
|
2198
2194
|
required: "",
|
|
2199
|
-
error: !!
|
|
2200
|
-
"error-message":
|
|
2195
|
+
error: !!C.length,
|
|
2196
|
+
"error-message": j
|
|
2201
2197
|
}, null, 8, ["modelValue", "label", "placeholder", "error", "error-message", "onUpdate:modelValue"])
|
|
2202
2198
|
]),
|
|
2203
2199
|
_: 1
|
|
2204
2200
|
}, 8, ["label", "model-value"]),
|
|
2205
|
-
|
|
2201
|
+
A(b, {
|
|
2206
2202
|
variant: "primary",
|
|
2207
2203
|
class: "tw-w-full tw-mb-4",
|
|
2208
2204
|
disabled: !l(n) || s.value,
|
|
2209
2205
|
loading: s.value,
|
|
2210
|
-
onClick:
|
|
2206
|
+
onClick: z
|
|
2211
2207
|
}, {
|
|
2212
2208
|
default: h(() => [
|
|
2213
|
-
|
|
2209
|
+
W(N(l(o)("FORGOT_PASSWORD.SEND_BUTTON")), 1)
|
|
2214
2210
|
]),
|
|
2215
2211
|
_: 1
|
|
2216
2212
|
}, 8, ["disabled", "loading"]),
|
|
2217
|
-
|
|
2218
|
-
|
|
2213
|
+
O("div", hr, [
|
|
2214
|
+
A(b, {
|
|
2219
2215
|
variant: "link",
|
|
2220
2216
|
icon: "lucide-arrow-left",
|
|
2221
2217
|
"icon-size": "xs",
|
|
2222
2218
|
type: "button",
|
|
2223
|
-
onClick:
|
|
2219
|
+
onClick: x
|
|
2224
2220
|
}, {
|
|
2225
2221
|
default: h(() => [
|
|
2226
|
-
|
|
2222
|
+
W(N(l(o)("FORGOT_PASSWORD.BACK_TO_LOGIN")), 1)
|
|
2227
2223
|
]),
|
|
2228
2224
|
_: 1
|
|
2229
2225
|
})
|
|
@@ -2231,22 +2227,22 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2231
2227
|
]),
|
|
2232
2228
|
_: 1
|
|
2233
2229
|
}),
|
|
2234
|
-
|
|
2230
|
+
r.value ? (m(), k(q, {
|
|
2235
2231
|
key: 0,
|
|
2236
2232
|
class: "tw-mt-3 tw-text-danger-500"
|
|
2237
2233
|
}, {
|
|
2238
2234
|
default: h(() => [
|
|
2239
|
-
|
|
2235
|
+
W(N(r.value), 1)
|
|
2240
2236
|
]),
|
|
2241
2237
|
_: 1
|
|
2242
|
-
})) :
|
|
2238
|
+
})) : U("", !0)
|
|
2243
2239
|
], 64))
|
|
2244
2240
|
]),
|
|
2245
2241
|
_: 1
|
|
2246
2242
|
}, 8, ["logo", "background", "title", "subtitle"]);
|
|
2247
2243
|
};
|
|
2248
2244
|
}
|
|
2249
|
-
}), gd = Ar, br = /* @__PURE__ */
|
|
2245
|
+
}), gd = Ar, br = /* @__PURE__ */ K({
|
|
2250
2246
|
__name: "ResetPassword",
|
|
2251
2247
|
props: {
|
|
2252
2248
|
userId: {},
|
|
@@ -2256,7 +2252,7 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2256
2252
|
background: { default: "/assets/background.jpg" }
|
|
2257
2253
|
},
|
|
2258
2254
|
setup(e) {
|
|
2259
|
-
const t = e, { validateToken: a, validatePassword: o, resetPasswordByToken: n, signIn:
|
|
2255
|
+
const t = e, { validateToken: a, validatePassword: o, resetPasswordByToken: n, signIn: d, loading: i } = ce(), s = Ae(), { t: r } = ue({ useScope: "global" }), { validate: c } = me({ validateOnMount: !1 }), { uiSettings: E, loading: p } = be(), _ = Se({
|
|
2260
2256
|
isValid: !1,
|
|
2261
2257
|
tokenIsValid: !1,
|
|
2262
2258
|
errors: [],
|
|
@@ -2264,116 +2260,116 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2264
2260
|
confirmPassword: ""
|
|
2265
2261
|
});
|
|
2266
2262
|
de(async () => {
|
|
2267
|
-
|
|
2263
|
+
_.tokenIsValid = await a(t.userId, t.token), _.tokenIsValid || _.errors.push("Invalid-token");
|
|
2268
2264
|
});
|
|
2269
|
-
const f =
|
|
2270
|
-
if (
|
|
2271
|
-
const
|
|
2272
|
-
|
|
2265
|
+
const f = R(() => i.value || !_.password || !_.confirmPassword || !_.isValid && _.tokenIsValid), z = async () => {
|
|
2266
|
+
if (_.tokenIsValid) {
|
|
2267
|
+
const V = (await o(_.password)).errors;
|
|
2268
|
+
_.errors = V?.map((D) => D.code), _.confirmPassword !== _.password && _.errors.push("Repeat-password"), _.isValid = _.errors.length == 0;
|
|
2273
2269
|
}
|
|
2274
|
-
},
|
|
2275
|
-
const { valid:
|
|
2276
|
-
if (
|
|
2277
|
-
const
|
|
2278
|
-
if (
|
|
2279
|
-
const
|
|
2280
|
-
|
|
2270
|
+
}, x = async () => {
|
|
2271
|
+
const { valid: V } = await c();
|
|
2272
|
+
if (V) {
|
|
2273
|
+
const D = await n(t.userId, _.password, t.token);
|
|
2274
|
+
if (D.succeeded) {
|
|
2275
|
+
const b = await d(t.userName, _.password);
|
|
2276
|
+
b.succeeded ? s.push("/") : _.errors = "error" in b && [b.error] || [];
|
|
2281
2277
|
} else
|
|
2282
|
-
|
|
2278
|
+
_.errors = D.errors;
|
|
2283
2279
|
}
|
|
2284
|
-
},
|
|
2285
|
-
logo:
|
|
2280
|
+
}, v = R(() => ({
|
|
2281
|
+
logo: p.value ? "" : E.value?.logo || t.logo
|
|
2286
2282
|
}));
|
|
2287
|
-
return (
|
|
2288
|
-
const
|
|
2289
|
-
return
|
|
2290
|
-
logo:
|
|
2283
|
+
return (V, D) => {
|
|
2284
|
+
const b = F("VcLoading"), $ = F("VcInput"), q = F("VcButton"), Y = F("VcHint"), j = F("VcForm"), L = F("VcAuthLayout");
|
|
2285
|
+
return m(), k(L, {
|
|
2286
|
+
logo: v.value.logo,
|
|
2291
2287
|
background: e.background,
|
|
2292
|
-
title: l(
|
|
2293
|
-
subtitle: l(
|
|
2288
|
+
title: l(r)("PASSWORDRESET.TITLE"),
|
|
2289
|
+
subtitle: l(r)("PASSWORDRESET.SUBTITLE")
|
|
2294
2290
|
}, {
|
|
2295
2291
|
default: h(() => [
|
|
2296
|
-
l(
|
|
2292
|
+
l(i) ? (m(), k(b, {
|
|
2297
2293
|
key: 0,
|
|
2298
2294
|
active: ""
|
|
2299
|
-
})) :
|
|
2300
|
-
|
|
2295
|
+
})) : U("", !0),
|
|
2296
|
+
A(j, null, {
|
|
2301
2297
|
default: h(() => [
|
|
2302
|
-
|
|
2303
|
-
label: l(
|
|
2298
|
+
A(l(Q), {
|
|
2299
|
+
label: l(r)("PASSWORDRESET.FIELDS.PASSWORD.LABEL"),
|
|
2304
2300
|
name: "password",
|
|
2305
|
-
"model-value":
|
|
2301
|
+
"model-value": _.password,
|
|
2306
2302
|
rules: "required"
|
|
2307
2303
|
}, {
|
|
2308
|
-
default: h(({ field:
|
|
2309
|
-
|
|
2304
|
+
default: h(({ field: C, errorMessage: S, handleChange: T, errors: y }) => [
|
|
2305
|
+
A($, oe(C, {
|
|
2310
2306
|
ref: "passwordField",
|
|
2311
|
-
modelValue:
|
|
2307
|
+
modelValue: _.password,
|
|
2312
2308
|
"onUpdate:modelValue": [
|
|
2313
|
-
|
|
2314
|
-
(
|
|
2315
|
-
|
|
2309
|
+
D[0] || (D[0] = (G) => _.password = G),
|
|
2310
|
+
(G) => {
|
|
2311
|
+
T(G), z();
|
|
2316
2312
|
}
|
|
2317
2313
|
],
|
|
2318
2314
|
class: "tw-mb-4",
|
|
2319
|
-
label: l(
|
|
2320
|
-
placeholder: l(
|
|
2315
|
+
label: l(r)("PASSWORDRESET.FIELDS.PASSWORD.LABEL"),
|
|
2316
|
+
placeholder: l(r)("PASSWORDRESET.FIELDS.PASSWORD.PLACEHOLDER"),
|
|
2321
2317
|
type: "password",
|
|
2322
|
-
disabled: !
|
|
2318
|
+
disabled: !_.tokenIsValid,
|
|
2323
2319
|
required: "",
|
|
2324
|
-
error: !!
|
|
2325
|
-
"error-message":
|
|
2320
|
+
error: !!y.length,
|
|
2321
|
+
"error-message": S
|
|
2326
2322
|
}), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "error-message", "onUpdate:modelValue"])
|
|
2327
2323
|
]),
|
|
2328
2324
|
_: 1
|
|
2329
2325
|
}, 8, ["label", "model-value"]),
|
|
2330
|
-
|
|
2331
|
-
label: l(
|
|
2326
|
+
A(l(Q), {
|
|
2327
|
+
label: l(r)("PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.LABEL"),
|
|
2332
2328
|
name: "confirm_password",
|
|
2333
|
-
"model-value":
|
|
2329
|
+
"model-value": _.confirmPassword,
|
|
2334
2330
|
rules: "required"
|
|
2335
2331
|
}, {
|
|
2336
|
-
default: h(({ field:
|
|
2337
|
-
|
|
2332
|
+
default: h(({ field: C, errorMessage: S, handleChange: T, errors: y }) => [
|
|
2333
|
+
A($, oe(C, {
|
|
2338
2334
|
ref: "confirmPasswordField",
|
|
2339
|
-
modelValue:
|
|
2335
|
+
modelValue: _.confirmPassword,
|
|
2340
2336
|
"onUpdate:modelValue": [
|
|
2341
|
-
|
|
2342
|
-
(
|
|
2343
|
-
|
|
2337
|
+
D[1] || (D[1] = (G) => _.confirmPassword = G),
|
|
2338
|
+
(G) => {
|
|
2339
|
+
T(G), z();
|
|
2344
2340
|
}
|
|
2345
2341
|
],
|
|
2346
2342
|
class: "tw-mb-6",
|
|
2347
|
-
label: l(
|
|
2348
|
-
placeholder: l(
|
|
2349
|
-
disabled: !
|
|
2343
|
+
label: l(r)("PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.LABEL"),
|
|
2344
|
+
placeholder: l(r)("PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER"),
|
|
2345
|
+
disabled: !_.tokenIsValid,
|
|
2350
2346
|
type: "password",
|
|
2351
2347
|
required: "",
|
|
2352
|
-
error: !!
|
|
2353
|
-
"error-message":
|
|
2354
|
-
onKeyup: st(
|
|
2348
|
+
error: !!y.length,
|
|
2349
|
+
"error-message": S,
|
|
2350
|
+
onKeyup: st(x, ["enter"])
|
|
2355
2351
|
}), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "error-message", "onUpdate:modelValue"])
|
|
2356
2352
|
]),
|
|
2357
2353
|
_: 1
|
|
2358
2354
|
}, 8, ["label", "model-value"]),
|
|
2359
|
-
|
|
2355
|
+
A(q, {
|
|
2360
2356
|
variant: "primary",
|
|
2361
2357
|
class: "tw-w-full",
|
|
2362
2358
|
disabled: f.value,
|
|
2363
|
-
loading: l(
|
|
2364
|
-
onClick:
|
|
2359
|
+
loading: l(i),
|
|
2360
|
+
onClick: x
|
|
2365
2361
|
}, {
|
|
2366
2362
|
default: h(() => [
|
|
2367
|
-
|
|
2363
|
+
W(N(l(r)("PASSWORDRESET.SAVE_PASSWORD")), 1)
|
|
2368
2364
|
]),
|
|
2369
2365
|
_: 1
|
|
2370
2366
|
}, 8, ["disabled", "loading"]),
|
|
2371
|
-
(
|
|
2372
|
-
key:
|
|
2367
|
+
(m(!0), B(X, null, ne(_.errors, (C) => (m(), k(Y, {
|
|
2368
|
+
key: C,
|
|
2373
2369
|
class: "tw-mt-3 tw-text-danger-500"
|
|
2374
2370
|
}, {
|
|
2375
2371
|
default: h(() => [
|
|
2376
|
-
|
|
2372
|
+
W(N(l(r)(`PASSWORDRESET.ERRORS.${C}`)), 1)
|
|
2377
2373
|
]),
|
|
2378
2374
|
_: 2
|
|
2379
2375
|
}, 1024))), 128))
|
|
@@ -2385,7 +2381,7 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2385
2381
|
}, 8, ["logo", "background", "title", "subtitle"]);
|
|
2386
2382
|
};
|
|
2387
2383
|
}
|
|
2388
|
-
}), pd = br, Tr = /* @__PURE__ */
|
|
2384
|
+
}), pd = br, Tr = /* @__PURE__ */ K({
|
|
2389
2385
|
__name: "Invite",
|
|
2390
2386
|
props: {
|
|
2391
2387
|
userId: {},
|
|
@@ -2396,124 +2392,124 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2396
2392
|
},
|
|
2397
2393
|
setup(e) {
|
|
2398
2394
|
me({ validateOnMount: !1 });
|
|
2399
|
-
const t = e, { validateToken: a, validatePassword: o, resetPasswordByToken: n, signIn:
|
|
2395
|
+
const t = e, { validateToken: a, validatePassword: o, resetPasswordByToken: n, signIn: d, loading: i } = ce(), s = Ae(), { t: r } = ue({ useScope: "global" }), c = _e(), E = it(), { uiSettings: p, loading: _ } = be(), f = Se({
|
|
2400
2396
|
isValid: !1,
|
|
2401
2397
|
tokenIsValid: !1,
|
|
2402
2398
|
errors: [],
|
|
2403
2399
|
password: "",
|
|
2404
2400
|
confirmPassword: ""
|
|
2405
|
-
}),
|
|
2401
|
+
}), z = R(() => !E.value || !c.value);
|
|
2406
2402
|
de(async () => {
|
|
2407
2403
|
f.tokenIsValid = await a(t.userId, t.token), f.tokenIsValid || f.errors.push("Invalid-token");
|
|
2408
2404
|
});
|
|
2409
|
-
const
|
|
2405
|
+
const x = async () => {
|
|
2410
2406
|
if (f.tokenIsValid) {
|
|
2411
|
-
const
|
|
2412
|
-
f.errors =
|
|
2407
|
+
const D = (await o(f.password)).errors;
|
|
2408
|
+
f.errors = D?.map((b) => b.code), f.confirmPassword && f.confirmPassword !== f.password && f.errors.push("Repeat-password"), f.isValid = f.errors.length == 0 && !z.value;
|
|
2413
2409
|
}
|
|
2414
|
-
},
|
|
2415
|
-
const
|
|
2416
|
-
|
|
2417
|
-
},
|
|
2418
|
-
logo:
|
|
2410
|
+
}, v = async () => {
|
|
2411
|
+
const D = await n(t.userId, f.password, t.token);
|
|
2412
|
+
D.succeeded ? (await d(t.userName, f.password)).succeeded && s.push("/") : f.errors = D.errors;
|
|
2413
|
+
}, V = R(() => ({
|
|
2414
|
+
logo: _.value ? "" : p.value?.logo || t.logo
|
|
2419
2415
|
}));
|
|
2420
|
-
return (
|
|
2421
|
-
const
|
|
2422
|
-
return
|
|
2423
|
-
logo:
|
|
2416
|
+
return (D, b) => {
|
|
2417
|
+
const $ = F("VcLoading"), q = F("VcButton"), Y = F("VcHint"), j = F("VcForm"), L = F("VcAuthLayout");
|
|
2418
|
+
return m(), k(L, {
|
|
2419
|
+
logo: V.value.logo,
|
|
2424
2420
|
background: e.background,
|
|
2425
|
-
title: l(
|
|
2426
|
-
subtitle: l(
|
|
2421
|
+
title: l(r)("INVITATION.TITLE"),
|
|
2422
|
+
subtitle: l(r)("INVITATION.SUBTITLE")
|
|
2427
2423
|
}, {
|
|
2428
2424
|
default: h(() => [
|
|
2429
|
-
l(
|
|
2425
|
+
l(i) ? (m(), k($, {
|
|
2430
2426
|
key: 0,
|
|
2431
2427
|
active: ""
|
|
2432
|
-
})) :
|
|
2433
|
-
|
|
2428
|
+
})) : U("", !0),
|
|
2429
|
+
A(j, null, {
|
|
2434
2430
|
default: h(() => [
|
|
2435
|
-
|
|
2431
|
+
A(l(fe), {
|
|
2436
2432
|
class: "tw-mb-4",
|
|
2437
|
-
label: l(
|
|
2433
|
+
label: l(r)("INVITATION.FIELDS.EMAIL.LABEL"),
|
|
2438
2434
|
"model-value": e.userName,
|
|
2439
2435
|
name: "username",
|
|
2440
2436
|
disabled: ""
|
|
2441
2437
|
}, null, 8, ["label", "model-value"]),
|
|
2442
|
-
|
|
2443
|
-
label: l(
|
|
2438
|
+
A(l(Q), {
|
|
2439
|
+
label: l(r)("INVITATION.FIELDS.PASSWORD.LABEL"),
|
|
2444
2440
|
"model-value": f.password,
|
|
2445
2441
|
rules: "required",
|
|
2446
2442
|
name: "password"
|
|
2447
2443
|
}, {
|
|
2448
|
-
default: h(({ field:
|
|
2449
|
-
|
|
2444
|
+
default: h(({ field: C, errorMessage: S, handleChange: T, errors: y }) => [
|
|
2445
|
+
A(l(fe), oe(C, {
|
|
2450
2446
|
ref: "passwordField",
|
|
2451
2447
|
modelValue: f.password,
|
|
2452
2448
|
"onUpdate:modelValue": [
|
|
2453
|
-
|
|
2454
|
-
(
|
|
2455
|
-
|
|
2449
|
+
b[0] || (b[0] = (G) => f.password = G),
|
|
2450
|
+
(G) => {
|
|
2451
|
+
T(G), x();
|
|
2456
2452
|
}
|
|
2457
2453
|
],
|
|
2458
2454
|
class: "tw-mb-4",
|
|
2459
|
-
label: l(
|
|
2460
|
-
placeholder: l(
|
|
2455
|
+
label: l(r)("INVITATION.FIELDS.PASSWORD.LABEL"),
|
|
2456
|
+
placeholder: l(r)("INVITATION.FIELDS.PASSWORD.PLACEHOLDER"),
|
|
2461
2457
|
type: "password",
|
|
2462
2458
|
disabled: !f.tokenIsValid,
|
|
2463
|
-
error: !!
|
|
2464
|
-
"error-message":
|
|
2459
|
+
error: !!y.length,
|
|
2460
|
+
"error-message": S,
|
|
2465
2461
|
required: ""
|
|
2466
2462
|
}), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "error-message", "onUpdate:modelValue"])
|
|
2467
2463
|
]),
|
|
2468
2464
|
_: 1
|
|
2469
2465
|
}, 8, ["label", "model-value"]),
|
|
2470
|
-
|
|
2471
|
-
label: l(
|
|
2466
|
+
A(l(Q), {
|
|
2467
|
+
label: l(r)("INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL"),
|
|
2472
2468
|
"model-value": f.confirmPassword,
|
|
2473
2469
|
rules: "required",
|
|
2474
2470
|
name: "confirm_password"
|
|
2475
2471
|
}, {
|
|
2476
|
-
default: h(({ field:
|
|
2477
|
-
|
|
2472
|
+
default: h(({ field: C, errorMessage: S, handleChange: T, errors: y }) => [
|
|
2473
|
+
A(l(fe), oe(C, {
|
|
2478
2474
|
ref: "confirmPasswordField",
|
|
2479
2475
|
modelValue: f.confirmPassword,
|
|
2480
2476
|
"onUpdate:modelValue": [
|
|
2481
|
-
|
|
2482
|
-
(
|
|
2483
|
-
|
|
2477
|
+
b[1] || (b[1] = (G) => f.confirmPassword = G),
|
|
2478
|
+
(G) => {
|
|
2479
|
+
T(G), x();
|
|
2484
2480
|
}
|
|
2485
2481
|
],
|
|
2486
2482
|
class: "tw-mb-6",
|
|
2487
|
-
label: l(
|
|
2488
|
-
placeholder: l(
|
|
2483
|
+
label: l(r)("INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL"),
|
|
2484
|
+
placeholder: l(r)("INVITATION.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER"),
|
|
2489
2485
|
disabled: !f.tokenIsValid,
|
|
2490
2486
|
type: "password",
|
|
2491
|
-
error: !!
|
|
2492
|
-
"error-message":
|
|
2487
|
+
error: !!y.length,
|
|
2488
|
+
"error-message": S,
|
|
2493
2489
|
required: "",
|
|
2494
|
-
onKeyup: st(
|
|
2490
|
+
onKeyup: st(v, ["enter"])
|
|
2495
2491
|
}), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "error-message", "onUpdate:modelValue"])
|
|
2496
2492
|
]),
|
|
2497
2493
|
_: 1
|
|
2498
2494
|
}, 8, ["label", "model-value"]),
|
|
2499
|
-
|
|
2495
|
+
A(q, {
|
|
2500
2496
|
variant: "primary",
|
|
2501
2497
|
class: "tw-w-full",
|
|
2502
|
-
disabled: l(
|
|
2503
|
-
loading: l(
|
|
2504
|
-
onClick:
|
|
2498
|
+
disabled: l(i) || !f.isValid || !f.tokenIsValid,
|
|
2499
|
+
loading: l(i),
|
|
2500
|
+
onClick: v
|
|
2505
2501
|
}, {
|
|
2506
2502
|
default: h(() => [
|
|
2507
|
-
|
|
2503
|
+
W(N(l(r)("INVITATION.ACCEPT_INVITATION")), 1)
|
|
2508
2504
|
]),
|
|
2509
2505
|
_: 1
|
|
2510
2506
|
}, 8, ["disabled", "loading"]),
|
|
2511
|
-
(
|
|
2512
|
-
key:
|
|
2507
|
+
(m(!0), B(X, null, ne(f.errors, (C) => (m(), k(Y, {
|
|
2508
|
+
key: C,
|
|
2513
2509
|
class: "tw-mt-3 tw-text-danger-500"
|
|
2514
2510
|
}, {
|
|
2515
2511
|
default: h(() => [
|
|
2516
|
-
|
|
2512
|
+
W(N(l(r)(`INVITATION.ERRORS.${C}`)), 1)
|
|
2517
2513
|
]),
|
|
2518
2514
|
_: 2
|
|
2519
2515
|
}, 1024))), 128))
|
|
@@ -2528,7 +2524,7 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2528
2524
|
}), Ed = Tr, wr = {
|
|
2529
2525
|
key: 0,
|
|
2530
2526
|
class: "tw-mb-4"
|
|
2531
|
-
}, vr = { class: "tw-flex tw-gap-3" }, Lr = /* @__PURE__ */
|
|
2527
|
+
}, vr = { class: "tw-flex tw-gap-3" }, Lr = /* @__PURE__ */ K({
|
|
2532
2528
|
__name: "ChangePassword",
|
|
2533
2529
|
props: {
|
|
2534
2530
|
forced: { type: Boolean },
|
|
@@ -2536,157 +2532,157 @@ const ir = /* @__PURE__ */ Y({
|
|
|
2536
2532
|
background: {}
|
|
2537
2533
|
},
|
|
2538
2534
|
setup(e) {
|
|
2539
|
-
const t = e, { t: a } = ue({ useScope: "global" }), { changeUserPassword: o, loading: n, validatePassword:
|
|
2540
|
-
logo:
|
|
2535
|
+
const t = e, { t: a } = ue({ useScope: "global" }), { changeUserPassword: o, loading: n, validatePassword: d, signOut: i } = ce(), { uiSettings: s, loading: r } = be(), c = R(() => ({
|
|
2536
|
+
logo: r.value ? "" : s.value?.logo || t.logo
|
|
2541
2537
|
}));
|
|
2542
2538
|
me({ validateOnMount: !1 });
|
|
2543
|
-
const
|
|
2539
|
+
const E = _e(), p = it(), _ = Ae(), f = Se({
|
|
2544
2540
|
isValid: !1,
|
|
2545
2541
|
errors: [],
|
|
2546
2542
|
currentPassword: "",
|
|
2547
2543
|
password: "",
|
|
2548
2544
|
confirmPassword: ""
|
|
2549
|
-
}),
|
|
2550
|
-
async function
|
|
2551
|
-
await
|
|
2545
|
+
}), z = R(() => !p.value || !E.value);
|
|
2546
|
+
async function x() {
|
|
2547
|
+
await i(), await _.push("/login");
|
|
2552
2548
|
}
|
|
2553
|
-
async function
|
|
2554
|
-
const
|
|
2555
|
-
|
|
2549
|
+
async function v() {
|
|
2550
|
+
const D = await o(f.currentPassword, f.password);
|
|
2551
|
+
D?.succeeded ? await _.push("/") : D?.errors && (f.errors = D?.errors, f.isValid = f.errors.length == 0);
|
|
2556
2552
|
}
|
|
2557
|
-
function
|
|
2553
|
+
function V() {
|
|
2558
2554
|
ot(async () => {
|
|
2559
|
-
(f.password || f.confirmPassword) && (f.errors = (await
|
|
2555
|
+
(f.password || f.confirmPassword) && (f.errors = (await d(f.password)).errors ?? [], f.confirmPassword !== f.password && f.errors.push({ code: "Repeat-password" }), f.confirmPassword === f.currentPassword && f.password === f.currentPassword && f.errors.push({ code: "Equal-passwords" }), f.isValid = f.errors.length == 0);
|
|
2560
2556
|
});
|
|
2561
2557
|
}
|
|
2562
|
-
return (
|
|
2563
|
-
const
|
|
2564
|
-
return
|
|
2565
|
-
logo:
|
|
2558
|
+
return (D, b) => {
|
|
2559
|
+
const $ = F("VcBanner"), q = F("VcInput"), Y = F("VcButton"), j = F("VcHint"), L = F("VcForm"), C = F("VcAuthLayout");
|
|
2560
|
+
return m(), k(C, {
|
|
2561
|
+
logo: c.value.logo,
|
|
2566
2562
|
background: e.background,
|
|
2567
2563
|
title: e.forced ? l(a)("COMPONENTS.CHANGE_PASSWORD.TITLE_FORCED") : l(a)("COMPONENTS.CHANGE_PASSWORD.TITLE"),
|
|
2568
2564
|
subtitle: e.forced ? l(a)("COMPONENTS.CHANGE_PASSWORD.SUBTITLE_FORCED") : void 0
|
|
2569
2565
|
}, {
|
|
2570
2566
|
default: h(() => [
|
|
2571
|
-
e.forced ? (
|
|
2572
|
-
|
|
2567
|
+
e.forced ? (m(), B("div", wr, [
|
|
2568
|
+
A($, {
|
|
2573
2569
|
variant: "info",
|
|
2574
2570
|
icon: "lucide-lightbulb",
|
|
2575
2571
|
"icon-size": "l"
|
|
2576
2572
|
}, {
|
|
2577
2573
|
default: h(() => [
|
|
2578
|
-
|
|
2574
|
+
W(N(l(a)("COMPONENTS.CHANGE_PASSWORD.FORCED.LABEL")), 1)
|
|
2579
2575
|
]),
|
|
2580
2576
|
_: 1
|
|
2581
2577
|
})
|
|
2582
|
-
])) :
|
|
2583
|
-
|
|
2578
|
+
])) : U("", !0),
|
|
2579
|
+
A(L, null, {
|
|
2584
2580
|
default: h(() => [
|
|
2585
|
-
|
|
2581
|
+
A(l(Q), {
|
|
2586
2582
|
label: l(a)("COMPONENTS.CHANGE_PASSWORD.CURRENT_PASSWORD.LABEL"),
|
|
2587
2583
|
name: "current",
|
|
2588
2584
|
rules: "required|min:6",
|
|
2589
2585
|
"model-value": f.currentPassword
|
|
2590
2586
|
}, {
|
|
2591
|
-
default: h(({ field:
|
|
2592
|
-
|
|
2587
|
+
default: h(({ field: S, errorMessage: T, errors: y }) => [
|
|
2588
|
+
A(q, oe(S, {
|
|
2593
2589
|
ref: "passwordField",
|
|
2594
2590
|
modelValue: f.currentPassword,
|
|
2595
2591
|
"onUpdate:modelValue": [
|
|
2596
|
-
|
|
2597
|
-
|
|
2592
|
+
b[0] || (b[0] = (G) => f.currentPassword = G),
|
|
2593
|
+
V
|
|
2598
2594
|
],
|
|
2599
2595
|
class: "tw-mb-4",
|
|
2600
2596
|
label: l(a)("COMPONENTS.CHANGE_PASSWORD.CURRENT_PASSWORD.LABEL"),
|
|
2601
2597
|
placeholder: l(a)("COMPONENTS.CHANGE_PASSWORD.CURRENT_PASSWORD.PLACEHOLDER"),
|
|
2602
2598
|
type: "password",
|
|
2603
2599
|
required: "",
|
|
2604
|
-
error: !!
|
|
2605
|
-
"error-message":
|
|
2600
|
+
error: !!y.length,
|
|
2601
|
+
"error-message": T
|
|
2606
2602
|
}), null, 16, ["modelValue", "label", "placeholder", "error", "error-message"])
|
|
2607
2603
|
]),
|
|
2608
2604
|
_: 1
|
|
2609
2605
|
}, 8, ["label", "model-value"]),
|
|
2610
|
-
|
|
2606
|
+
A(l(Q), {
|
|
2611
2607
|
label: l(a)("COMPONENTS.CHANGE_PASSWORD.NEW_PASSWORD.LABEL"),
|
|
2612
2608
|
name: "new_pass",
|
|
2613
2609
|
rules: "required|min:6",
|
|
2614
2610
|
"model-value": f.password
|
|
2615
2611
|
}, {
|
|
2616
|
-
default: h(({ field:
|
|
2617
|
-
|
|
2612
|
+
default: h(({ field: S, errorMessage: T, errors: y }) => [
|
|
2613
|
+
A(q, oe(S, {
|
|
2618
2614
|
ref: "newPasswordField",
|
|
2619
2615
|
modelValue: f.password,
|
|
2620
2616
|
"onUpdate:modelValue": [
|
|
2621
|
-
|
|
2622
|
-
|
|
2617
|
+
b[1] || (b[1] = (G) => f.password = G),
|
|
2618
|
+
V
|
|
2623
2619
|
],
|
|
2624
2620
|
class: "tw-mb-4",
|
|
2625
2621
|
label: l(a)("COMPONENTS.CHANGE_PASSWORD.NEW_PASSWORD.LABEL"),
|
|
2626
2622
|
placeholder: l(a)("COMPONENTS.CHANGE_PASSWORD.NEW_PASSWORD.PLACEHOLDER"),
|
|
2627
2623
|
type: "password",
|
|
2628
2624
|
required: "",
|
|
2629
|
-
error: !!
|
|
2630
|
-
"error-message":
|
|
2625
|
+
error: !!y.length,
|
|
2626
|
+
"error-message": T
|
|
2631
2627
|
}), null, 16, ["modelValue", "label", "placeholder", "error", "error-message"])
|
|
2632
2628
|
]),
|
|
2633
2629
|
_: 1
|
|
2634
2630
|
}, 8, ["label", "model-value"]),
|
|
2635
|
-
|
|
2631
|
+
A(l(Q), {
|
|
2636
2632
|
label: l(a)("COMPONENTS.CHANGE_PASSWORD.CONFIRM_PASSWORD.LABEL"),
|
|
2637
2633
|
name: "confirm_pass",
|
|
2638
2634
|
rules: "required|min:6",
|
|
2639
2635
|
"model-value": f.confirmPassword
|
|
2640
2636
|
}, {
|
|
2641
|
-
default: h(({ field:
|
|
2642
|
-
|
|
2637
|
+
default: h(({ field: S, errorMessage: T, errors: y }) => [
|
|
2638
|
+
A(q, oe(S, {
|
|
2643
2639
|
ref: "confirmPasswordField",
|
|
2644
2640
|
modelValue: f.confirmPassword,
|
|
2645
2641
|
"onUpdate:modelValue": [
|
|
2646
|
-
|
|
2647
|
-
|
|
2642
|
+
b[2] || (b[2] = (G) => f.confirmPassword = G),
|
|
2643
|
+
V
|
|
2648
2644
|
],
|
|
2649
2645
|
class: "tw-mb-6",
|
|
2650
2646
|
label: l(a)("COMPONENTS.CHANGE_PASSWORD.CONFIRM_PASSWORD.LABEL"),
|
|
2651
2647
|
placeholder: l(a)("COMPONENTS.CHANGE_PASSWORD.CONFIRM_PASSWORD.PLACEHOLDER"),
|
|
2652
2648
|
type: "password",
|
|
2653
2649
|
required: "",
|
|
2654
|
-
error: !!
|
|
2655
|
-
"error-message":
|
|
2650
|
+
error: !!y.length,
|
|
2651
|
+
"error-message": T
|
|
2656
2652
|
}), null, 16, ["modelValue", "label", "placeholder", "error", "error-message"])
|
|
2657
2653
|
]),
|
|
2658
2654
|
_: 1
|
|
2659
2655
|
}, 8, ["label", "model-value"]),
|
|
2660
|
-
|
|
2661
|
-
|
|
2656
|
+
O("div", vr, [
|
|
2657
|
+
A(Y, {
|
|
2662
2658
|
variant: "secondary",
|
|
2663
2659
|
class: "tw-flex-1",
|
|
2664
|
-
onClick:
|
|
2660
|
+
onClick: x
|
|
2665
2661
|
}, {
|
|
2666
2662
|
default: h(() => [
|
|
2667
|
-
|
|
2663
|
+
W(N(l(a)("COMPONENTS.CHANGE_PASSWORD.CANCEL")), 1)
|
|
2668
2664
|
]),
|
|
2669
2665
|
_: 1
|
|
2670
2666
|
}),
|
|
2671
|
-
|
|
2667
|
+
A(Y, {
|
|
2672
2668
|
variant: "primary",
|
|
2673
2669
|
class: "tw-flex-1",
|
|
2674
|
-
disabled: l(n) || !f.isValid ||
|
|
2670
|
+
disabled: l(n) || !f.isValid || z.value,
|
|
2675
2671
|
loading: l(n),
|
|
2676
|
-
onClick:
|
|
2672
|
+
onClick: v
|
|
2677
2673
|
}, {
|
|
2678
2674
|
default: h(() => [
|
|
2679
|
-
|
|
2675
|
+
W(N(l(a)("COMPONENTS.CHANGE_PASSWORD.SAVE")), 1)
|
|
2680
2676
|
]),
|
|
2681
2677
|
_: 1
|
|
2682
2678
|
}, 8, ["disabled", "loading"])
|
|
2683
2679
|
]),
|
|
2684
|
-
(
|
|
2685
|
-
key:
|
|
2680
|
+
(m(!0), B(X, null, ne(f.errors, (S, T) => (m(), k(j, {
|
|
2681
|
+
key: T,
|
|
2686
2682
|
class: "tw-mt-3 tw-text-danger-500"
|
|
2687
2683
|
}, {
|
|
2688
2684
|
default: h(() => [
|
|
2689
|
-
|
|
2685
|
+
W(N(S.code ? l(a)(`COMPONENTS.CHANGE_PASSWORD.ERRORS.${S.code}`) : S), 1)
|
|
2690
2686
|
]),
|
|
2691
2687
|
_: 2
|
|
2692
2688
|
}, 1024))), 128))
|
|
@@ -2776,33 +2772,33 @@ function Ir() {
|
|
|
2776
2772
|
}
|
|
2777
2773
|
}
|
|
2778
2774
|
function yr(e, t = 12) {
|
|
2779
|
-
const a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), n = (s,
|
|
2780
|
-
for (let
|
|
2781
|
-
const
|
|
2782
|
-
for (let f = s; f < s +
|
|
2783
|
-
if (
|
|
2775
|
+
const a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), n = (s, r, c, E) => {
|
|
2776
|
+
for (let p = r; p < r + E; p++) {
|
|
2777
|
+
const _ = o.get(p) || [];
|
|
2778
|
+
for (let f = s; f < s + c; f++)
|
|
2779
|
+
if (_.includes(f)) return !1;
|
|
2784
2780
|
}
|
|
2785
2781
|
return !0;
|
|
2786
|
-
},
|
|
2787
|
-
for (let
|
|
2788
|
-
const
|
|
2789
|
-
for (let f = s; f < s +
|
|
2790
|
-
|
|
2791
|
-
o.set(
|
|
2782
|
+
}, d = (s, r, c, E) => {
|
|
2783
|
+
for (let p = r; p < r + E; p++) {
|
|
2784
|
+
const _ = o.get(p) || [];
|
|
2785
|
+
for (let f = s; f < s + c; f++)
|
|
2786
|
+
_.push(f);
|
|
2787
|
+
o.set(p, _);
|
|
2792
2788
|
}
|
|
2793
|
-
},
|
|
2794
|
-
let
|
|
2789
|
+
}, i = (s, r) => {
|
|
2790
|
+
let c = 0;
|
|
2795
2791
|
for (; ; ) {
|
|
2796
|
-
for (let
|
|
2797
|
-
if (n(
|
|
2798
|
-
return { x:
|
|
2799
|
-
if (
|
|
2792
|
+
for (let E = 0; E <= t - s; E++)
|
|
2793
|
+
if (n(E, c, s, r))
|
|
2794
|
+
return { x: E, y: c };
|
|
2795
|
+
if (c++, c > 100) break;
|
|
2800
2796
|
}
|
|
2801
|
-
return { x: 0, y:
|
|
2797
|
+
return { x: 0, y: c };
|
|
2802
2798
|
};
|
|
2803
2799
|
for (const s of e) {
|
|
2804
|
-
const
|
|
2805
|
-
a.set(s.id,
|
|
2800
|
+
const r = i(s.size.width, s.size.height);
|
|
2801
|
+
a.set(s.id, r), d(r.x, r.y, s.size.width, s.size.height);
|
|
2806
2802
|
}
|
|
2807
2803
|
return a;
|
|
2808
2804
|
}
|
|
@@ -2810,7 +2806,7 @@ function Je(e, t) {
|
|
|
2810
2806
|
if (t && t.size > 0) {
|
|
2811
2807
|
const o = /* @__PURE__ */ new Map();
|
|
2812
2808
|
for (const n of e) {
|
|
2813
|
-
const
|
|
2809
|
+
const d = t.get(n.id), i = n.position, s = d ?? i ?? { x: 0, y: 0 };
|
|
2814
2810
|
o.set(n.id, s);
|
|
2815
2811
|
}
|
|
2816
2812
|
return o;
|
|
@@ -2847,116 +2843,116 @@ function Pr(e, t = {}) {
|
|
|
2847
2843
|
gridOptions: a = {},
|
|
2848
2844
|
resizable: o = !1,
|
|
2849
2845
|
autoSave: n = !0,
|
|
2850
|
-
onLayoutChange:
|
|
2851
|
-
} = t,
|
|
2846
|
+
onLayoutChange: d
|
|
2847
|
+
} = t, i = vn(null), s = H(/* @__PURE__ */ new Map()), r = H(!1), c = H(!1), E = {
|
|
2852
2848
|
...Rr,
|
|
2853
2849
|
...a,
|
|
2854
2850
|
disableResize: !o
|
|
2855
|
-
},
|
|
2856
|
-
if (
|
|
2851
|
+
}, p = (L) => {
|
|
2852
|
+
if (i.value) {
|
|
2857
2853
|
console.warn("[useGridstack] Grid already initialized");
|
|
2858
2854
|
return;
|
|
2859
2855
|
}
|
|
2860
|
-
const
|
|
2861
|
-
s.value = Je(e.value,
|
|
2862
|
-
const
|
|
2863
|
-
const
|
|
2864
|
-
return je(
|
|
2856
|
+
const C = Xe();
|
|
2857
|
+
s.value = Je(e.value, C), i.value = Gn.init(E, L), i.value.on("change", _), i.value.on("added", f), i.value.on("removed", z);
|
|
2858
|
+
const S = e.value.map((T) => {
|
|
2859
|
+
const y = s.value.get(T.id);
|
|
2860
|
+
return je(T, y);
|
|
2865
2861
|
});
|
|
2866
|
-
|
|
2867
|
-
},
|
|
2868
|
-
if (!
|
|
2869
|
-
for (const
|
|
2870
|
-
const { id:
|
|
2871
|
-
|
|
2862
|
+
i.value.load(S), r.value = !0;
|
|
2863
|
+
}, _ = (L, C) => {
|
|
2864
|
+
if (!c.value) {
|
|
2865
|
+
for (const S of C) {
|
|
2866
|
+
const { id: T, position: y } = Ze(S);
|
|
2867
|
+
T && s.value.set(T, y);
|
|
2872
2868
|
}
|
|
2873
|
-
s.value = new Map(s.value),
|
|
2869
|
+
s.value = new Map(s.value), d?.(s.value), n && b();
|
|
2874
2870
|
}
|
|
2875
|
-
}, f = (
|
|
2876
|
-
for (const
|
|
2877
|
-
const { id:
|
|
2878
|
-
|
|
2871
|
+
}, f = (L, C) => {
|
|
2872
|
+
for (const S of C) {
|
|
2873
|
+
const { id: T, position: y } = Ze(S);
|
|
2874
|
+
T && !s.value.has(T) && s.value.set(T, y);
|
|
2879
2875
|
}
|
|
2880
2876
|
s.value = new Map(s.value);
|
|
2881
|
-
},
|
|
2882
|
-
for (const
|
|
2883
|
-
|
|
2877
|
+
}, z = (L, C) => {
|
|
2878
|
+
for (const S of C)
|
|
2879
|
+
S.id && s.value.delete(S.id);
|
|
2884
2880
|
s.value = new Map(s.value);
|
|
2885
|
-
}, H = () => {
|
|
2886
|
-
r.value && (r.value.off("change"), r.value.off("added"), r.value.off("removed"), r.value.destroy(!1), r.value = null, i.value = !1);
|
|
2887
|
-
}, R = (V) => {
|
|
2888
|
-
if (!r.value) return;
|
|
2889
|
-
const L = s.value.get(V.id) ?? V.position, D = je(V, L), b = document.querySelector(`[gs-id="${V.id}"]`);
|
|
2890
|
-
b && r.value.makeWidget(b, D);
|
|
2891
|
-
}, A = (V) => {
|
|
2892
|
-
if (!r.value) return;
|
|
2893
|
-
const L = document.querySelector(`[gs-id="${V}"]`);
|
|
2894
|
-
L && r.value.removeWidget(L, !1), s.value.delete(V);
|
|
2895
|
-
}, N = (V, L) => {
|
|
2896
|
-
if (!r.value) return;
|
|
2897
|
-
const D = document.querySelector(`[gs-id="${V}"]`);
|
|
2898
|
-
D && (d.value = !0, r.value.update(D, { x: L.x, y: L.y }), s.value.set(V, L), s.value = new Map(s.value), d.value = !1);
|
|
2899
|
-
}, T = () => {
|
|
2900
|
-
Ta(e.value, s.value);
|
|
2901
2881
|
}, x = () => {
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2882
|
+
i.value && (i.value.off("change"), i.value.off("added"), i.value.off("removed"), i.value.destroy(!1), i.value = null, r.value = !1);
|
|
2883
|
+
}, v = (L) => {
|
|
2884
|
+
if (!i.value) return;
|
|
2885
|
+
const C = s.value.get(L.id) ?? L.position, S = je(L, C), T = document.querySelector(`[gs-id="${L.id}"]`);
|
|
2886
|
+
T && i.value.makeWidget(T, S);
|
|
2887
|
+
}, V = (L) => {
|
|
2888
|
+
if (!i.value) return;
|
|
2889
|
+
const C = document.querySelector(`[gs-id="${L}"]`);
|
|
2890
|
+
C && i.value.removeWidget(C, !1), s.value.delete(L);
|
|
2891
|
+
}, D = (L, C) => {
|
|
2892
|
+
if (!i.value) return;
|
|
2893
|
+
const S = document.querySelector(`[gs-id="${L}"]`);
|
|
2894
|
+
S && (c.value = !0, i.value.update(S, { x: C.x, y: C.y }), s.value.set(L, C), s.value = new Map(s.value), c.value = !1);
|
|
2895
|
+
}, b = () => {
|
|
2896
|
+
Ta(e.value, s.value);
|
|
2897
|
+
}, $ = () => {
|
|
2898
|
+
const L = Xe();
|
|
2899
|
+
L && (s.value = Je(e.value, L), Y());
|
|
2900
|
+
}, q = () => {
|
|
2905
2901
|
s.value = /* @__PURE__ */ new Map();
|
|
2906
|
-
for (const
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
},
|
|
2910
|
-
if (
|
|
2911
|
-
|
|
2912
|
-
for (const
|
|
2913
|
-
const
|
|
2914
|
-
if (
|
|
2915
|
-
const
|
|
2916
|
-
|
|
2917
|
-
x:
|
|
2918
|
-
y:
|
|
2902
|
+
for (const L of e.value)
|
|
2903
|
+
L.position && s.value.set(L.id, { ...L.position });
|
|
2904
|
+
Y(), b();
|
|
2905
|
+
}, Y = () => {
|
|
2906
|
+
if (i.value) {
|
|
2907
|
+
c.value = !0, i.value.batchUpdate();
|
|
2908
|
+
for (const L of e.value) {
|
|
2909
|
+
const C = s.value.get(L.id);
|
|
2910
|
+
if (C) {
|
|
2911
|
+
const S = document.querySelector(`[gs-id="${L.id}"]`);
|
|
2912
|
+
S && i.value.update(S, {
|
|
2913
|
+
x: C.x,
|
|
2914
|
+
y: C.y
|
|
2919
2915
|
});
|
|
2920
2916
|
}
|
|
2921
2917
|
}
|
|
2922
|
-
|
|
2918
|
+
i.value.batchUpdate(!1), c.value = !1;
|
|
2923
2919
|
}
|
|
2924
|
-
},
|
|
2925
|
-
if (!
|
|
2926
|
-
|
|
2920
|
+
}, j = (L) => {
|
|
2921
|
+
if (!i.value) {
|
|
2922
|
+
L();
|
|
2927
2923
|
return;
|
|
2928
2924
|
}
|
|
2929
|
-
|
|
2925
|
+
c.value = !0, i.value.batchUpdate(), L(), i.value.batchUpdate(!1), c.value = !1;
|
|
2930
2926
|
};
|
|
2931
2927
|
return le(
|
|
2932
2928
|
e,
|
|
2933
|
-
async (
|
|
2934
|
-
if (!
|
|
2929
|
+
async (L, C) => {
|
|
2930
|
+
if (!i.value || !r.value) return;
|
|
2935
2931
|
await ot();
|
|
2936
|
-
const
|
|
2937
|
-
(
|
|
2938
|
-
),
|
|
2939
|
-
for (const
|
|
2940
|
-
|
|
2941
|
-
for (const
|
|
2942
|
-
|
|
2932
|
+
const S = L.filter(
|
|
2933
|
+
(y) => !C?.some((G) => G.id === y.id)
|
|
2934
|
+
), T = C?.filter((y) => !L.some((G) => G.id === y.id)).map((y) => y.id) ?? [];
|
|
2935
|
+
for (const y of T)
|
|
2936
|
+
V(y);
|
|
2937
|
+
for (const y of S)
|
|
2938
|
+
v(y);
|
|
2943
2939
|
},
|
|
2944
2940
|
{ deep: !1 }
|
|
2945
2941
|
), xt(() => {
|
|
2946
|
-
|
|
2942
|
+
x();
|
|
2947
2943
|
}), {
|
|
2948
|
-
grid:
|
|
2944
|
+
grid: i,
|
|
2949
2945
|
layout: s,
|
|
2950
|
-
isInitialized:
|
|
2951
|
-
initGrid:
|
|
2952
|
-
destroyGrid:
|
|
2953
|
-
addWidget:
|
|
2954
|
-
removeWidget:
|
|
2955
|
-
updateWidgetPosition:
|
|
2956
|
-
saveLayout:
|
|
2957
|
-
loadLayout:
|
|
2958
|
-
resetToDefaults:
|
|
2959
|
-
batchUpdate:
|
|
2946
|
+
isInitialized: r,
|
|
2947
|
+
initGrid: p,
|
|
2948
|
+
destroyGrid: x,
|
|
2949
|
+
addWidget: v,
|
|
2950
|
+
removeWidget: V,
|
|
2951
|
+
updateWidgetPosition: D,
|
|
2952
|
+
saveLayout: b,
|
|
2953
|
+
loadLayout: $,
|
|
2954
|
+
resetToDefaults: q,
|
|
2955
|
+
batchUpdate: j
|
|
2960
2956
|
};
|
|
2961
2957
|
}
|
|
2962
2958
|
const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-label"], Nr = { class: "grid-stack-item-content" }, Vr = {
|
|
@@ -2968,7 +2964,7 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
2968
2964
|
role: "status",
|
|
2969
2965
|
"aria-live": "polite",
|
|
2970
2966
|
"aria-atomic": "true"
|
|
2971
|
-
}, Mr = /* @__PURE__ */
|
|
2967
|
+
}, Mr = /* @__PURE__ */ K({
|
|
2972
2968
|
__name: "GridstackDashboard",
|
|
2973
2969
|
props: {
|
|
2974
2970
|
showDragHandles: { type: Boolean, default: !1 },
|
|
@@ -2976,13 +2972,13 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
2976
2972
|
ariaLabel: { default: "Dashboard widgets. Drag widgets to rearrange." }
|
|
2977
2973
|
},
|
|
2978
2974
|
setup(e, { expose: t }) {
|
|
2979
|
-
const a = e, o =
|
|
2975
|
+
const a = e, o = H(null), n = H(""), d = No(), i = R(() => d.getWidgets()), {
|
|
2980
2976
|
layout: s,
|
|
2981
|
-
isInitialized:
|
|
2982
|
-
initGrid:
|
|
2983
|
-
saveLayout:
|
|
2984
|
-
resetToDefaults:
|
|
2985
|
-
} = Pr(
|
|
2977
|
+
isInitialized: r,
|
|
2978
|
+
initGrid: c,
|
|
2979
|
+
saveLayout: E,
|
|
2980
|
+
resetToDefaults: p
|
|
2981
|
+
} = Pr(i, {
|
|
2986
2982
|
resizable: a.resizable,
|
|
2987
2983
|
autoSave: !0,
|
|
2988
2984
|
gridOptions: {
|
|
@@ -2990,101 +2986,101 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
2990
2986
|
handle: a.showDragHandles ? ".vc-gridstack-dashboard__drag-handle" : ".grid-stack-item-content"
|
|
2991
2987
|
}
|
|
2992
2988
|
},
|
|
2993
|
-
onLayoutChange: (
|
|
2994
|
-
for (const [
|
|
2995
|
-
|
|
2996
|
-
|
|
2989
|
+
onLayoutChange: (D) => {
|
|
2990
|
+
for (const [b, $] of D)
|
|
2991
|
+
d.updateWidgetPosition(b, $);
|
|
2992
|
+
z("Widget positions updated");
|
|
2997
2993
|
}
|
|
2998
|
-
}),
|
|
2999
|
-
n.value =
|
|
2994
|
+
}), _ = (D) => s.value.get(D), f = (D, b) => `${D.name || D.id}, widget ${b + 1} of ${i.value.length}. Drag to reorder.`, z = (D) => {
|
|
2995
|
+
n.value = D, setTimeout(() => {
|
|
3000
2996
|
n.value = "";
|
|
3001
2997
|
}, 1e3);
|
|
3002
2998
|
};
|
|
3003
2999
|
return de(async () => {
|
|
3004
|
-
await ot(), o.value && !
|
|
3000
|
+
await ot(), o.value && !r.value && c(o.value);
|
|
3005
3001
|
}), t({
|
|
3006
3002
|
rearrangeWidgets: () => {
|
|
3007
|
-
|
|
3003
|
+
p();
|
|
3008
3004
|
},
|
|
3009
3005
|
recalculateLayout: () => {
|
|
3010
3006
|
},
|
|
3011
|
-
saveLayout:
|
|
3012
|
-
useBuiltInPositions: () => (
|
|
3013
|
-
}), (
|
|
3007
|
+
saveLayout: E,
|
|
3008
|
+
useBuiltInPositions: () => (p(), !0)
|
|
3009
|
+
}), (D, b) => (m(), k(Vo, {
|
|
3014
3010
|
"no-padding": "",
|
|
3015
3011
|
class: "vc-gridstack-dashboard"
|
|
3016
3012
|
}, {
|
|
3017
3013
|
default: h(() => [
|
|
3018
|
-
|
|
3014
|
+
O("div", {
|
|
3019
3015
|
ref_key: "gridRef",
|
|
3020
3016
|
ref: o,
|
|
3021
3017
|
class: "grid-stack vc-gridstack-dashboard__grid",
|
|
3022
3018
|
role: "list",
|
|
3023
3019
|
"aria-label": e.ariaLabel
|
|
3024
3020
|
}, [
|
|
3025
|
-
(
|
|
3026
|
-
key:
|
|
3021
|
+
(m(!0), B(X, null, ne(i.value, ($, q) => (m(), B("div", {
|
|
3022
|
+
key: $.id,
|
|
3027
3023
|
class: "grid-stack-item",
|
|
3028
|
-
"gs-id":
|
|
3029
|
-
"gs-x":
|
|
3030
|
-
"gs-y":
|
|
3031
|
-
"gs-w":
|
|
3032
|
-
"gs-h":
|
|
3024
|
+
"gs-id": $.id,
|
|
3025
|
+
"gs-x": _($.id)?.x ?? $.position?.x ?? 0,
|
|
3026
|
+
"gs-y": _($.id)?.y ?? $.position?.y ?? 0,
|
|
3027
|
+
"gs-w": $.size.width,
|
|
3028
|
+
"gs-h": $.size.height,
|
|
3033
3029
|
"gs-min-w": 2,
|
|
3034
3030
|
"gs-min-h": 2,
|
|
3035
3031
|
role: "listitem",
|
|
3036
|
-
"aria-label": f(
|
|
3032
|
+
"aria-label": f($, q)
|
|
3037
3033
|
}, [
|
|
3038
|
-
|
|
3039
|
-
e.showDragHandles ? (
|
|
3040
|
-
|
|
3034
|
+
O("div", Nr, [
|
|
3035
|
+
e.showDragHandles ? (m(), B("div", Vr, [...b[0] || (b[0] = [
|
|
3036
|
+
O("svg", {
|
|
3041
3037
|
width: "16",
|
|
3042
3038
|
height: "16",
|
|
3043
3039
|
viewBox: "0 0 16 16",
|
|
3044
3040
|
fill: "currentColor"
|
|
3045
3041
|
}, [
|
|
3046
|
-
|
|
3042
|
+
O("circle", {
|
|
3047
3043
|
cx: "5",
|
|
3048
3044
|
cy: "3",
|
|
3049
3045
|
r: "1.5"
|
|
3050
3046
|
}),
|
|
3051
|
-
|
|
3047
|
+
O("circle", {
|
|
3052
3048
|
cx: "11",
|
|
3053
3049
|
cy: "3",
|
|
3054
3050
|
r: "1.5"
|
|
3055
3051
|
}),
|
|
3056
|
-
|
|
3052
|
+
O("circle", {
|
|
3057
3053
|
cx: "5",
|
|
3058
3054
|
cy: "8",
|
|
3059
3055
|
r: "1.5"
|
|
3060
3056
|
}),
|
|
3061
|
-
|
|
3057
|
+
O("circle", {
|
|
3062
3058
|
cx: "11",
|
|
3063
3059
|
cy: "8",
|
|
3064
3060
|
r: "1.5"
|
|
3065
3061
|
}),
|
|
3066
|
-
|
|
3062
|
+
O("circle", {
|
|
3067
3063
|
cx: "5",
|
|
3068
3064
|
cy: "13",
|
|
3069
3065
|
r: "1.5"
|
|
3070
3066
|
}),
|
|
3071
|
-
|
|
3067
|
+
O("circle", {
|
|
3072
3068
|
cx: "11",
|
|
3073
3069
|
cy: "13",
|
|
3074
3070
|
r: "1.5"
|
|
3075
3071
|
})
|
|
3076
3072
|
], -1)
|
|
3077
|
-
])])) :
|
|
3078
|
-
(
|
|
3073
|
+
])])) : U("", !0),
|
|
3074
|
+
(m(), k(Ln($.component), oe({ ref_for: !0 }, $.props || {}, { class: "vc-gridstack-dashboard__widget-content" }), null, 16))
|
|
3079
3075
|
])
|
|
3080
3076
|
], 8, Cr))), 128))
|
|
3081
3077
|
], 8, Dr),
|
|
3082
|
-
|
|
3078
|
+
O("div", kr, N(n.value), 1)
|
|
3083
3079
|
]),
|
|
3084
3080
|
_: 1
|
|
3085
3081
|
}));
|
|
3086
3082
|
}
|
|
3087
|
-
}), Sd = /* @__PURE__ */
|
|
3083
|
+
}), Sd = /* @__PURE__ */ K({
|
|
3088
3084
|
__name: "DraggableDashboard",
|
|
3089
3085
|
props: {
|
|
3090
3086
|
showDragHandles: { type: Boolean, default: !1 },
|
|
@@ -3092,7 +3088,7 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3092
3088
|
ariaLabel: { default: "Dashboard widgets. Drag widgets to rearrange." }
|
|
3093
3089
|
},
|
|
3094
3090
|
setup(e, { expose: t }) {
|
|
3095
|
-
const a =
|
|
3091
|
+
const a = H(null);
|
|
3096
3092
|
return t({
|
|
3097
3093
|
rearrangeWidgets: () => {
|
|
3098
3094
|
a.value?.rearrangeWidgets?.();
|
|
@@ -3104,7 +3100,7 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3104
3100
|
a.value?.saveLayout?.();
|
|
3105
3101
|
},
|
|
3106
3102
|
useBuiltInPositions: () => a.value?.useBuiltInPositions?.() ?? !1
|
|
3107
|
-
}), (s,
|
|
3103
|
+
}), (s, r) => (m(), k(Mr, {
|
|
3108
3104
|
ref_key: "dashboardRef",
|
|
3109
3105
|
ref: a,
|
|
3110
3106
|
"show-drag-handles": e.showDragHandles,
|
|
@@ -3124,7 +3120,7 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3124
3120
|
}, Wr = { class: "dashboard-widget-card__body" }, zr = {
|
|
3125
3121
|
key: 1,
|
|
3126
3122
|
class: "dashboard-widget-card__footer"
|
|
3127
|
-
}, Od = /* @__PURE__ */
|
|
3123
|
+
}, Od = /* @__PURE__ */ K({
|
|
3128
3124
|
__name: "dashboard-widget-card",
|
|
3129
3125
|
props: {
|
|
3130
3126
|
header: {},
|
|
@@ -3134,40 +3130,40 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3134
3130
|
setup(e) {
|
|
3135
3131
|
const t = e;
|
|
3136
3132
|
return (a, o) => {
|
|
3137
|
-
const n =
|
|
3138
|
-
return
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
e.icon ? (
|
|
3143
|
-
|
|
3133
|
+
const n = F("VcIcon"), d = Gt("loading");
|
|
3134
|
+
return m(), B("div", Br, [
|
|
3135
|
+
O("div", $r, [
|
|
3136
|
+
Z(a.$slots, "header", {}, () => [
|
|
3137
|
+
O("div", Fr, [
|
|
3138
|
+
e.icon ? (m(), B("div", xr, [
|
|
3139
|
+
A(n, {
|
|
3144
3140
|
class: "dashboard-widget-card__icon",
|
|
3145
3141
|
icon: e.icon,
|
|
3146
3142
|
size: "l"
|
|
3147
3143
|
}, null, 8, ["icon"])
|
|
3148
|
-
])) :
|
|
3149
|
-
|
|
3144
|
+
])) : U("", !0),
|
|
3145
|
+
O("div", Gr, N(t.header), 1)
|
|
3150
3146
|
])
|
|
3151
3147
|
]),
|
|
3152
|
-
a.$slots.actions ? (
|
|
3153
|
-
|
|
3154
|
-
])) :
|
|
3148
|
+
a.$slots.actions ? (m(), B("div", Hr, [
|
|
3149
|
+
Z(a.$slots, "actions")
|
|
3150
|
+
])) : U("", !0)
|
|
3155
3151
|
]),
|
|
3156
|
-
a.$slots.stats ? (
|
|
3157
|
-
|
|
3158
|
-
])) :
|
|
3159
|
-
Ht((
|
|
3160
|
-
|
|
3152
|
+
a.$slots.stats ? (m(), B("div", Ur, [
|
|
3153
|
+
Z(a.$slots, "stats")
|
|
3154
|
+
])) : U("", !0),
|
|
3155
|
+
Ht((m(), B("div", Wr, [
|
|
3156
|
+
Z(a.$slots, "content")
|
|
3161
3157
|
])), [
|
|
3162
|
-
[
|
|
3158
|
+
[d, e.loading]
|
|
3163
3159
|
]),
|
|
3164
|
-
a.$slots.footer ? (
|
|
3165
|
-
|
|
3166
|
-
])) :
|
|
3160
|
+
a.$slots.footer ? (m(), B("div", zr, [
|
|
3161
|
+
Z(a.$slots, "footer")
|
|
3162
|
+
])) : U("", !0)
|
|
3167
3163
|
]);
|
|
3168
3164
|
};
|
|
3169
3165
|
}
|
|
3170
|
-
}), Kr = { class: "dashboard-stat-item" }, qr = { class: "dashboard-stat-item__label" }, Id = /* @__PURE__ */
|
|
3166
|
+
}), Kr = { class: "dashboard-stat-item" }, qr = { class: "dashboard-stat-item__label" }, Id = /* @__PURE__ */ K({
|
|
3171
3167
|
__name: "dashboard-stat-item",
|
|
3172
3168
|
props: {
|
|
3173
3169
|
value: {},
|
|
@@ -3175,104 +3171,104 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3175
3171
|
variant: {}
|
|
3176
3172
|
},
|
|
3177
3173
|
setup(e) {
|
|
3178
|
-
return (t, a) => (
|
|
3179
|
-
|
|
3174
|
+
return (t, a) => (m(), B("div", Kr, [
|
|
3175
|
+
O("div", {
|
|
3180
3176
|
class: Ue(["dashboard-stat-item__value", e.variant ? `dashboard-stat-item__value--${e.variant}` : ""])
|
|
3181
|
-
},
|
|
3182
|
-
|
|
3177
|
+
}, N(e.value), 3),
|
|
3178
|
+
O("div", qr, N(e.label), 1)
|
|
3183
3179
|
]));
|
|
3184
3180
|
}
|
|
3185
|
-
}), Yr = { class: "tw-divide-y tw-divide-[var(--neutrals-200)]" }, yd = /* @__PURE__ */
|
|
3181
|
+
}), Yr = { class: "tw-divide-y tw-divide-[var(--neutrals-200)]" }, yd = /* @__PURE__ */ K({
|
|
3186
3182
|
__name: "dashboard-feed-list",
|
|
3187
3183
|
setup(e) {
|
|
3188
|
-
return (t, a) => (
|
|
3189
|
-
|
|
3184
|
+
return (t, a) => (m(), B("div", Yr, [
|
|
3185
|
+
Z(t.$slots, "default")
|
|
3190
3186
|
]));
|
|
3191
3187
|
}
|
|
3192
3188
|
}), jr = { class: "tw-flex tw-items-center tw-gap-2.5 tw-min-w-0" }, Zr = {
|
|
3193
3189
|
key: 0,
|
|
3194
3190
|
class: "tw-flex tw-items-center tw-gap-3 tw-flex-shrink-0 tw-ml-3"
|
|
3195
|
-
}, Rd = /* @__PURE__ */
|
|
3191
|
+
}, Rd = /* @__PURE__ */ K({
|
|
3196
3192
|
__name: "dashboard-feed-row",
|
|
3197
3193
|
emits: ["click"],
|
|
3198
3194
|
setup(e) {
|
|
3199
|
-
return (t, a) => (
|
|
3195
|
+
return (t, a) => (m(), B("div", {
|
|
3200
3196
|
class: "dashboard-feed-row",
|
|
3201
3197
|
onClick: a[0] || (a[0] = (o) => t.$emit("click"))
|
|
3202
3198
|
}, [
|
|
3203
|
-
|
|
3204
|
-
|
|
3199
|
+
O("div", jr, [
|
|
3200
|
+
Z(t.$slots, "default")
|
|
3205
3201
|
]),
|
|
3206
|
-
t.$slots.trailing ? (
|
|
3207
|
-
|
|
3208
|
-
])) :
|
|
3202
|
+
t.$slots.trailing ? (m(), B("div", Zr, [
|
|
3203
|
+
Z(t.$slots, "trailing")
|
|
3204
|
+
])) : U("", !0)
|
|
3209
3205
|
]));
|
|
3210
3206
|
}
|
|
3211
|
-
}), ct = /* @__PURE__ */
|
|
3207
|
+
}), ct = /* @__PURE__ */ K({
|
|
3212
3208
|
__name: "ChartContainer",
|
|
3213
3209
|
props: {
|
|
3214
3210
|
config: {}
|
|
3215
3211
|
},
|
|
3216
3212
|
setup(e) {
|
|
3217
|
-
const t = e, a =
|
|
3213
|
+
const t = e, a = H(), o = R(() => {
|
|
3218
3214
|
const n = {};
|
|
3219
|
-
return Object.keys(t.config).forEach((
|
|
3220
|
-
const
|
|
3221
|
-
|
|
3215
|
+
return Object.keys(t.config).forEach((i, s) => {
|
|
3216
|
+
const r = t.config[i];
|
|
3217
|
+
r.color && (n[`--vis-color${s}`] = r.color);
|
|
3222
3218
|
}), n;
|
|
3223
3219
|
});
|
|
3224
|
-
return (n,
|
|
3220
|
+
return (n, d) => (m(), B("div", {
|
|
3225
3221
|
ref_key: "containerRef",
|
|
3226
3222
|
ref: a,
|
|
3227
3223
|
class: "dashboard-chart-container",
|
|
3228
3224
|
style: nt(o.value)
|
|
3229
3225
|
}, [
|
|
3230
|
-
|
|
3226
|
+
Z(n.$slots, "default")
|
|
3231
3227
|
], 4));
|
|
3232
3228
|
}
|
|
3233
3229
|
}), Xr = { class: "dashboard-chart-tooltip" }, Jr = {
|
|
3234
3230
|
key: 0,
|
|
3235
3231
|
class: "dashboard-chart-tooltip__title"
|
|
3236
|
-
}, Qr = { class: "dashboard-chart-tooltip__items" }, el = { class: "dashboard-chart-tooltip__label" }, tl = { class: "dashboard-chart-tooltip__value" }, Pd = /* @__PURE__ */
|
|
3232
|
+
}, Qr = { class: "dashboard-chart-tooltip__items" }, el = { class: "dashboard-chart-tooltip__label" }, tl = { class: "dashboard-chart-tooltip__value" }, Pd = /* @__PURE__ */ K({
|
|
3237
3233
|
__name: "ChartTooltip",
|
|
3238
3234
|
props: {
|
|
3239
3235
|
title: {},
|
|
3240
3236
|
items: {}
|
|
3241
3237
|
},
|
|
3242
3238
|
setup(e) {
|
|
3243
|
-
return (t, a) => (
|
|
3244
|
-
e.title ? (
|
|
3245
|
-
|
|
3246
|
-
(
|
|
3239
|
+
return (t, a) => (m(), B("div", Xr, [
|
|
3240
|
+
e.title ? (m(), B("div", Jr, N(e.title), 1)) : U("", !0),
|
|
3241
|
+
O("div", Qr, [
|
|
3242
|
+
(m(!0), B(X, null, ne(e.items, (o, n) => (m(), B("div", {
|
|
3247
3243
|
key: n,
|
|
3248
3244
|
class: "dashboard-chart-tooltip__item"
|
|
3249
3245
|
}, [
|
|
3250
|
-
|
|
3246
|
+
O("span", {
|
|
3251
3247
|
class: "dashboard-chart-tooltip__indicator",
|
|
3252
3248
|
style: nt({ background: o.color })
|
|
3253
3249
|
}, null, 4),
|
|
3254
|
-
|
|
3255
|
-
|
|
3250
|
+
O("span", el, N(o.label), 1),
|
|
3251
|
+
O("span", tl, N(o.value), 1)
|
|
3256
3252
|
]))), 128))
|
|
3257
3253
|
])
|
|
3258
3254
|
]));
|
|
3259
3255
|
}
|
|
3260
|
-
}), al = { class: "dashboard-chart-legend" }, sl = { class: "dashboard-chart-legend__label" }, dt = /* @__PURE__ */
|
|
3256
|
+
}), al = { class: "dashboard-chart-legend" }, sl = { class: "dashboard-chart-legend__label" }, dt = /* @__PURE__ */ K({
|
|
3261
3257
|
__name: "ChartLegend",
|
|
3262
3258
|
props: {
|
|
3263
3259
|
config: {}
|
|
3264
3260
|
},
|
|
3265
3261
|
setup(e) {
|
|
3266
|
-
return (t, a) => (
|
|
3267
|
-
(
|
|
3262
|
+
return (t, a) => (m(), B("div", al, [
|
|
3263
|
+
(m(!0), B(X, null, ne(e.config, (o, n) => (m(), B("div", {
|
|
3268
3264
|
key: n,
|
|
3269
3265
|
class: "dashboard-chart-legend__item"
|
|
3270
3266
|
}, [
|
|
3271
|
-
|
|
3267
|
+
O("span", {
|
|
3272
3268
|
class: "dashboard-chart-legend__indicator",
|
|
3273
3269
|
style: nt({ background: o.color })
|
|
3274
3270
|
}, null, 4),
|
|
3275
|
-
|
|
3271
|
+
O("span", sl, N(o.label), 1)
|
|
3276
3272
|
]))), 128))
|
|
3277
3273
|
]));
|
|
3278
3274
|
}
|
|
@@ -3298,13 +3294,13 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3298
3294
|
return a;
|
|
3299
3295
|
}
|
|
3300
3296
|
}, va = (e, t, a, o) => {
|
|
3301
|
-
const n = Oe(a),
|
|
3302
|
-
if (n === void 0 &&
|
|
3297
|
+
const n = Oe(a), d = Oe(o);
|
|
3298
|
+
if (n === void 0 && d === void 0)
|
|
3303
3299
|
return e;
|
|
3304
|
-
const
|
|
3305
|
-
return e.filter((
|
|
3306
|
-
const
|
|
3307
|
-
return
|
|
3300
|
+
const i = n !== void 0 && d !== void 0 ? Math.min(n, d) : n, s = n !== void 0 && d !== void 0 ? Math.max(n, d) : d;
|
|
3301
|
+
return e.filter((r) => {
|
|
3302
|
+
const c = Oe(t(r));
|
|
3303
|
+
return c === void 0 ? !0 : !(i !== void 0 && c < i || s !== void 0 && c > s);
|
|
3308
3304
|
});
|
|
3309
3305
|
}, La = (e, t) => {
|
|
3310
3306
|
if (t) {
|
|
@@ -3324,7 +3320,7 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3324
3320
|
index: a,
|
|
3325
3321
|
fallbackLabel: o
|
|
3326
3322
|
}) => {
|
|
3327
|
-
const n = Object.keys(e),
|
|
3323
|
+
const n = Object.keys(e), d = t ? e[t] : void 0, i = typeof a == "number" && Number.isFinite(a) && n[a] ? e[n[a]] : void 0, s = d ?? i;
|
|
3328
3324
|
return {
|
|
3329
3325
|
label: s?.label ?? o ?? t ?? "Series",
|
|
3330
3326
|
color: s?.color ?? ol
|
|
@@ -3350,7 +3346,7 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3350
3346
|
<div class="dashboard-chart-tooltip__items">${o}</div>
|
|
3351
3347
|
</div>
|
|
3352
3348
|
`;
|
|
3353
|
-
}, Dd = /* @__PURE__ */
|
|
3349
|
+
}, Dd = /* @__PURE__ */ K({
|
|
3354
3350
|
__name: "DashboardLineChart",
|
|
3355
3351
|
props: {
|
|
3356
3352
|
data: {},
|
|
@@ -3371,74 +3367,74 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3371
3367
|
yTickFormat: { type: Function, default: void 0 }
|
|
3372
3368
|
},
|
|
3373
3369
|
setup(e) {
|
|
3374
|
-
const t = e, a = { top: 8, right: 8, bottom: 4, left: 4 }, o = (
|
|
3370
|
+
const t = e, a = { top: 8, right: 8, bottom: 4, left: 4 }, o = (c) => c[t.xKey], n = R(
|
|
3375
3371
|
() => va(
|
|
3376
3372
|
t.data,
|
|
3377
|
-
(
|
|
3373
|
+
(c) => c[t.xKey],
|
|
3378
3374
|
t.rangeStart,
|
|
3379
3375
|
t.rangeEnd
|
|
3380
3376
|
)
|
|
3381
|
-
),
|
|
3382
|
-
() => t.yKeys.map((
|
|
3383
|
-
),
|
|
3377
|
+
), d = R(
|
|
3378
|
+
() => t.yKeys.map((c) => (E) => E[c])
|
|
3379
|
+
), i = R(
|
|
3384
3380
|
() => t.yKeys.map(
|
|
3385
|
-
(
|
|
3381
|
+
(c, E) => he({
|
|
3386
3382
|
config: t.config,
|
|
3387
|
-
key: String(
|
|
3388
|
-
index:
|
|
3389
|
-
fallbackLabel: String(
|
|
3383
|
+
key: String(c),
|
|
3384
|
+
index: E,
|
|
3385
|
+
fallbackLabel: String(c)
|
|
3390
3386
|
}).color
|
|
3391
3387
|
)
|
|
3392
|
-
), s = (
|
|
3393
|
-
title: La(
|
|
3394
|
-
items: t.yKeys.map((
|
|
3395
|
-
const { label:
|
|
3388
|
+
), s = (c) => ft({
|
|
3389
|
+
title: La(c[t.xKey], t.xTickFormat),
|
|
3390
|
+
items: t.yKeys.map((E, p) => {
|
|
3391
|
+
const { label: _, color: f } = he({
|
|
3396
3392
|
config: t.config,
|
|
3397
|
-
key: String(
|
|
3398
|
-
index:
|
|
3399
|
-
fallbackLabel: String(
|
|
3393
|
+
key: String(E),
|
|
3394
|
+
index: p,
|
|
3395
|
+
fallbackLabel: String(E)
|
|
3400
3396
|
});
|
|
3401
3397
|
return {
|
|
3402
|
-
label:
|
|
3398
|
+
label: _,
|
|
3403
3399
|
color: f,
|
|
3404
|
-
value: ut(
|
|
3400
|
+
value: ut(c[E], t.yTickFormat)
|
|
3405
3401
|
};
|
|
3406
3402
|
})
|
|
3407
|
-
}),
|
|
3408
|
-
const f =
|
|
3403
|
+
}), r = (c, E, p, _) => {
|
|
3404
|
+
const f = c ?? (typeof _ == "number" ? p[_] : void 0);
|
|
3409
3405
|
if (f)
|
|
3410
3406
|
return s(f);
|
|
3411
3407
|
};
|
|
3412
|
-
return (
|
|
3408
|
+
return (c, E) => (m(), k(ct, { config: e.config }, {
|
|
3413
3409
|
default: h(() => [
|
|
3414
|
-
|
|
3410
|
+
A(l(Ut), {
|
|
3415
3411
|
data: n.value,
|
|
3416
3412
|
height: e.height,
|
|
3417
3413
|
margin: a
|
|
3418
3414
|
}, {
|
|
3419
3415
|
default: h(() => [
|
|
3420
|
-
e.showTooltip ? (
|
|
3416
|
+
e.showTooltip ? (m(), k(l(rt), {
|
|
3421
3417
|
key: 0,
|
|
3422
3418
|
"allow-hover": !0,
|
|
3423
3419
|
"class-name": "dashboard-chart-tooltip-host",
|
|
3424
3420
|
"vertical-shift": 8
|
|
3425
|
-
})) :
|
|
3426
|
-
e.showTooltip ? (
|
|
3421
|
+
})) : U("", !0),
|
|
3422
|
+
e.showTooltip ? (m(), k(l(Hn), {
|
|
3427
3423
|
key: 1,
|
|
3428
3424
|
x: o,
|
|
3429
|
-
y:
|
|
3430
|
-
color:
|
|
3431
|
-
template:
|
|
3432
|
-
}, null, 8, ["y", "color"])) :
|
|
3433
|
-
(
|
|
3434
|
-
key:
|
|
3425
|
+
y: d.value,
|
|
3426
|
+
color: i.value,
|
|
3427
|
+
template: r
|
|
3428
|
+
}, null, 8, ["y", "color"])) : U("", !0),
|
|
3429
|
+
(m(!0), B(X, null, ne(d.value, (p, _) => (m(), k(l(Un), {
|
|
3430
|
+
key: _,
|
|
3435
3431
|
x: o,
|
|
3436
|
-
y:
|
|
3437
|
-
color:
|
|
3432
|
+
y: p,
|
|
3433
|
+
color: i.value[_],
|
|
3438
3434
|
"curve-type": "monotoneX",
|
|
3439
3435
|
"line-width": 2
|
|
3440
3436
|
}, null, 8, ["y", "color"]))), 128)),
|
|
3441
|
-
e.showXAxis ? (
|
|
3437
|
+
e.showXAxis ? (m(), k(l(ye), {
|
|
3442
3438
|
key: 2,
|
|
3443
3439
|
type: "x",
|
|
3444
3440
|
"tick-line": !1,
|
|
@@ -3446,8 +3442,8 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3446
3442
|
"grid-line": !1,
|
|
3447
3443
|
"num-ticks": e.numXTicks,
|
|
3448
3444
|
"tick-format": e.xTickFormat
|
|
3449
|
-
}, null, 8, ["num-ticks", "tick-format"])) :
|
|
3450
|
-
e.showYAxis ? (
|
|
3445
|
+
}, null, 8, ["num-ticks", "tick-format"])) : U("", !0),
|
|
3446
|
+
e.showYAxis ? (m(), k(l(ye), {
|
|
3451
3447
|
key: 3,
|
|
3452
3448
|
type: "y",
|
|
3453
3449
|
"tick-line": !1,
|
|
@@ -3455,19 +3451,19 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3455
3451
|
"grid-line": e.showGrid,
|
|
3456
3452
|
"num-ticks": e.numYTicks,
|
|
3457
3453
|
"tick-format": e.yTickFormat
|
|
3458
|
-
}, null, 8, ["grid-line", "num-ticks", "tick-format"])) :
|
|
3454
|
+
}, null, 8, ["grid-line", "num-ticks", "tick-format"])) : U("", !0)
|
|
3459
3455
|
]),
|
|
3460
3456
|
_: 1
|
|
3461
3457
|
}, 8, ["data", "height"]),
|
|
3462
|
-
e.showLegend ? (
|
|
3458
|
+
e.showLegend ? (m(), k(dt, {
|
|
3463
3459
|
key: 0,
|
|
3464
3460
|
config: e.config
|
|
3465
|
-
}, null, 8, ["config"])) :
|
|
3461
|
+
}, null, 8, ["config"])) : U("", !0)
|
|
3466
3462
|
]),
|
|
3467
3463
|
_: 1
|
|
3468
3464
|
}, 8, ["config"]));
|
|
3469
3465
|
}
|
|
3470
|
-
}), Cd = /* @__PURE__ */
|
|
3466
|
+
}), Cd = /* @__PURE__ */ K({
|
|
3471
3467
|
__name: "DashboardBarChart",
|
|
3472
3468
|
props: {
|
|
3473
3469
|
data: {},
|
|
@@ -3488,72 +3484,72 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3488
3484
|
yTickFormat: { type: Function, default: void 0 }
|
|
3489
3485
|
},
|
|
3490
3486
|
setup(e) {
|
|
3491
|
-
const t = e, a = { top: 8, right: 8, bottom: 4, left: 4 }, o = (
|
|
3487
|
+
const t = e, a = { top: 8, right: 8, bottom: 4, left: 4 }, o = (r) => r[t.xKey], n = R(
|
|
3492
3488
|
() => va(
|
|
3493
3489
|
t.data,
|
|
3494
|
-
(
|
|
3490
|
+
(r) => r[t.xKey],
|
|
3495
3491
|
t.rangeStart,
|
|
3496
3492
|
t.rangeEnd
|
|
3497
3493
|
)
|
|
3498
|
-
),
|
|
3499
|
-
() => t.yKeys.map((
|
|
3500
|
-
),
|
|
3494
|
+
), d = R(
|
|
3495
|
+
() => t.yKeys.map((r) => (c) => c[r])
|
|
3496
|
+
), i = R(
|
|
3501
3497
|
() => t.yKeys.map(
|
|
3502
|
-
(
|
|
3498
|
+
(r, c) => he({
|
|
3503
3499
|
config: t.config,
|
|
3504
|
-
key: String(
|
|
3505
|
-
index:
|
|
3506
|
-
fallbackLabel: String(
|
|
3500
|
+
key: String(r),
|
|
3501
|
+
index: c,
|
|
3502
|
+
fallbackLabel: String(r)
|
|
3507
3503
|
}).color
|
|
3508
3504
|
)
|
|
3509
|
-
), s =
|
|
3510
|
-
[Wn.bar]: (
|
|
3511
|
-
if (!t.yKeys.length ||
|
|
3505
|
+
), s = R(() => ({
|
|
3506
|
+
[Wn.bar]: (r, c) => {
|
|
3507
|
+
if (!t.yKeys.length || c < 0)
|
|
3512
3508
|
return null;
|
|
3513
|
-
const
|
|
3514
|
-
if (!
|
|
3509
|
+
const E = c % t.yKeys.length, p = t.yKeys[E];
|
|
3510
|
+
if (!p)
|
|
3515
3511
|
return null;
|
|
3516
|
-
const { label:
|
|
3512
|
+
const { label: _, color: f } = he({
|
|
3517
3513
|
config: t.config,
|
|
3518
|
-
key: String(
|
|
3519
|
-
index:
|
|
3520
|
-
fallbackLabel: String(
|
|
3514
|
+
key: String(p),
|
|
3515
|
+
index: E,
|
|
3516
|
+
fallbackLabel: String(p)
|
|
3521
3517
|
});
|
|
3522
3518
|
return ft({
|
|
3523
|
-
title: La(
|
|
3519
|
+
title: La(r[t.xKey], t.xTickFormat),
|
|
3524
3520
|
items: [
|
|
3525
3521
|
{
|
|
3526
|
-
label:
|
|
3522
|
+
label: _,
|
|
3527
3523
|
color: f,
|
|
3528
|
-
value: ut(
|
|
3524
|
+
value: ut(r[p], t.yTickFormat)
|
|
3529
3525
|
}
|
|
3530
3526
|
]
|
|
3531
3527
|
});
|
|
3532
3528
|
}
|
|
3533
3529
|
}));
|
|
3534
|
-
return (
|
|
3530
|
+
return (r, c) => (m(), k(ct, { config: e.config }, {
|
|
3535
3531
|
default: h(() => [
|
|
3536
|
-
|
|
3532
|
+
A(l(Ut), {
|
|
3537
3533
|
data: n.value,
|
|
3538
3534
|
height: e.height,
|
|
3539
3535
|
margin: a
|
|
3540
3536
|
}, {
|
|
3541
3537
|
default: h(() => [
|
|
3542
|
-
e.showTooltip ? (
|
|
3538
|
+
e.showTooltip ? (m(), k(l(rt), {
|
|
3543
3539
|
key: 0,
|
|
3544
3540
|
"allow-hover": !0,
|
|
3545
3541
|
"class-name": "dashboard-chart-tooltip-host",
|
|
3546
3542
|
"vertical-shift": 8,
|
|
3547
3543
|
triggers: s.value
|
|
3548
|
-
}, null, 8, ["triggers"])) :
|
|
3549
|
-
|
|
3544
|
+
}, null, 8, ["triggers"])) : U("", !0),
|
|
3545
|
+
A(l(zn), {
|
|
3550
3546
|
x: o,
|
|
3551
|
-
y:
|
|
3552
|
-
color:
|
|
3547
|
+
y: d.value,
|
|
3548
|
+
color: i.value,
|
|
3553
3549
|
"rounded-corners": 4,
|
|
3554
3550
|
"bar-padding": 0.2
|
|
3555
3551
|
}, null, 8, ["y", "color"]),
|
|
3556
|
-
e.showXAxis ? (
|
|
3552
|
+
e.showXAxis ? (m(), k(l(ye), {
|
|
3557
3553
|
key: 1,
|
|
3558
3554
|
type: "x",
|
|
3559
3555
|
"tick-line": !1,
|
|
@@ -3561,8 +3557,8 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3561
3557
|
"grid-line": !1,
|
|
3562
3558
|
"num-ticks": e.numXTicks,
|
|
3563
3559
|
"tick-format": e.xTickFormat
|
|
3564
|
-
}, null, 8, ["num-ticks", "tick-format"])) :
|
|
3565
|
-
e.showYAxis ? (
|
|
3560
|
+
}, null, 8, ["num-ticks", "tick-format"])) : U("", !0),
|
|
3561
|
+
e.showYAxis ? (m(), k(l(ye), {
|
|
3566
3562
|
key: 2,
|
|
3567
3563
|
type: "y",
|
|
3568
3564
|
"tick-line": !1,
|
|
@@ -3570,19 +3566,19 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3570
3566
|
"grid-line": e.showGrid,
|
|
3571
3567
|
"num-ticks": e.numYTicks,
|
|
3572
3568
|
"tick-format": e.yTickFormat
|
|
3573
|
-
}, null, 8, ["grid-line", "num-ticks", "tick-format"])) :
|
|
3569
|
+
}, null, 8, ["grid-line", "num-ticks", "tick-format"])) : U("", !0)
|
|
3574
3570
|
]),
|
|
3575
3571
|
_: 1
|
|
3576
3572
|
}, 8, ["data", "height"]),
|
|
3577
|
-
e.showLegend ? (
|
|
3573
|
+
e.showLegend ? (m(), k(dt, {
|
|
3578
3574
|
key: 0,
|
|
3579
3575
|
config: e.config
|
|
3580
|
-
}, null, 8, ["config"])) :
|
|
3576
|
+
}, null, 8, ["config"])) : U("", !0)
|
|
3581
3577
|
]),
|
|
3582
3578
|
_: 1
|
|
3583
3579
|
}, 8, ["config"]));
|
|
3584
3580
|
}
|
|
3585
|
-
}), Nd = /* @__PURE__ */
|
|
3581
|
+
}), Nd = /* @__PURE__ */ K({
|
|
3586
3582
|
__name: "DashboardDonutChart",
|
|
3587
3583
|
props: {
|
|
3588
3584
|
data: {},
|
|
@@ -3599,27 +3595,27 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3599
3595
|
valueFormat: { type: Function, default: void 0 }
|
|
3600
3596
|
},
|
|
3601
3597
|
setup(e) {
|
|
3602
|
-
const t = e, a = (s) => s[t.valueKey], o =
|
|
3603
|
-
const
|
|
3604
|
-
if (typeof
|
|
3605
|
-
return
|
|
3606
|
-
const
|
|
3607
|
-
return
|
|
3608
|
-
},
|
|
3598
|
+
const t = e, a = (s) => s[t.valueKey], o = R(() => Object.keys(t.config)), n = (s, r) => t.colorKey && s[t.colorKey] ? s[t.colorKey] : o.value[r] ? t.config[o.value[r]].color : void 0, d = (s, r) => {
|
|
3599
|
+
const c = s.label;
|
|
3600
|
+
if (typeof c == "string" && c.trim())
|
|
3601
|
+
return c;
|
|
3602
|
+
const E = o.value[r];
|
|
3603
|
+
return E ? t.config[E]?.label ?? E : `Segment ${r + 1}`;
|
|
3604
|
+
}, i = R(() => ({
|
|
3609
3605
|
[Kn.segment]: (s) => {
|
|
3610
3606
|
if (!s?.data)
|
|
3611
3607
|
return;
|
|
3612
|
-
const
|
|
3608
|
+
const r = s.index ?? 0, c = d(s.data, r), E = o.value[r], { color: p } = he({
|
|
3613
3609
|
config: t.config,
|
|
3614
|
-
key:
|
|
3615
|
-
index:
|
|
3616
|
-
fallbackLabel:
|
|
3610
|
+
key: E,
|
|
3611
|
+
index: r,
|
|
3612
|
+
fallbackLabel: c
|
|
3617
3613
|
});
|
|
3618
3614
|
return ft({
|
|
3619
3615
|
items: [
|
|
3620
3616
|
{
|
|
3621
|
-
label:
|
|
3622
|
-
color: n(s.data,
|
|
3617
|
+
label: c,
|
|
3618
|
+
color: n(s.data, r) ?? p,
|
|
3623
3619
|
value: ut(
|
|
3624
3620
|
s.value ?? s.data[t.valueKey],
|
|
3625
3621
|
t.valueFormat
|
|
@@ -3629,14 +3625,14 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3629
3625
|
});
|
|
3630
3626
|
}
|
|
3631
3627
|
}));
|
|
3632
|
-
return (s,
|
|
3628
|
+
return (s, r) => (m(), k(ct, { config: e.config }, {
|
|
3633
3629
|
default: h(() => [
|
|
3634
|
-
|
|
3630
|
+
A(l(qn), {
|
|
3635
3631
|
data: e.data,
|
|
3636
3632
|
height: e.height
|
|
3637
3633
|
}, {
|
|
3638
3634
|
default: h(() => [
|
|
3639
|
-
|
|
3635
|
+
A(l(Yn), {
|
|
3640
3636
|
value: a,
|
|
3641
3637
|
color: n,
|
|
3642
3638
|
"arc-width": e.arcWidth,
|
|
@@ -3645,20 +3641,20 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3645
3641
|
"central-label": e.centralLabel,
|
|
3646
3642
|
"central-sub-label": e.centralSubLabel
|
|
3647
3643
|
}, null, 8, ["arc-width", "corner-radius", "central-label", "central-sub-label"]),
|
|
3648
|
-
e.showTooltip ? (
|
|
3644
|
+
e.showTooltip ? (m(), k(l(rt), {
|
|
3649
3645
|
key: 0,
|
|
3650
3646
|
"allow-hover": !0,
|
|
3651
3647
|
"class-name": "dashboard-chart-tooltip-host",
|
|
3652
3648
|
"vertical-shift": 8,
|
|
3653
|
-
triggers:
|
|
3654
|
-
}, null, 8, ["triggers"])) :
|
|
3649
|
+
triggers: i.value
|
|
3650
|
+
}, null, 8, ["triggers"])) : U("", !0)
|
|
3655
3651
|
]),
|
|
3656
3652
|
_: 1
|
|
3657
3653
|
}, 8, ["data", "height"]),
|
|
3658
|
-
e.showLegend ? (
|
|
3654
|
+
e.showLegend ? (m(), k(dt, {
|
|
3659
3655
|
key: 0,
|
|
3660
3656
|
config: e.config
|
|
3661
|
-
}, null, 8, ["config"])) :
|
|
3657
|
+
}, null, 8, ["config"])) : U("", !0)
|
|
3662
3658
|
]),
|
|
3663
3659
|
_: 1
|
|
3664
3660
|
}, 8, ["config"]));
|
|
@@ -3666,7 +3662,7 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3666
3662
|
}), il = { class: "vc-language-selector" }, rl = ["disabled", "aria-expanded"], ll = ["src", "alt"], cl = {
|
|
3667
3663
|
key: 1,
|
|
3668
3664
|
class: "vc-language-selector__item-icon-placeholder"
|
|
3669
|
-
}, dl = ["src", "alt"], ul = { class: "vc-language-selector__item-label" }, fl = { class: "tw-p-2 tw-text-sm tw-text-[color:var(--neutrals-400)]" }, Vd = /* @__PURE__ */
|
|
3665
|
+
}, dl = ["src", "alt"], ul = { class: "vc-language-selector__item-label" }, fl = { class: "tw-p-2 tw-text-sm tw-text-[color:var(--neutrals-400)]" }, Vd = /* @__PURE__ */ K({
|
|
3670
3666
|
__name: "multilanguage-selector",
|
|
3671
3667
|
props: {
|
|
3672
3668
|
options: {
|
|
@@ -3684,43 +3680,43 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3684
3680
|
},
|
|
3685
3681
|
emits: ["update:modelValue"],
|
|
3686
3682
|
setup(e, { emit: t }) {
|
|
3687
|
-
const a = e, o = t, { t: n } = ue({ useScope: "global" }),
|
|
3688
|
-
a.disabled || (
|
|
3689
|
-
},
|
|
3690
|
-
|
|
3683
|
+
const a = e, o = t, { t: n } = ue({ useScope: "global" }), d = H(!1), i = R(() => a.options.find((c) => c.value === a.modelValue)), s = () => {
|
|
3684
|
+
a.disabled || (d.value = !d.value);
|
|
3685
|
+
}, r = (c) => {
|
|
3686
|
+
d.value = !1, o("update:modelValue", c.value);
|
|
3691
3687
|
};
|
|
3692
|
-
return (
|
|
3693
|
-
|
|
3694
|
-
"model-value":
|
|
3688
|
+
return (c, E) => (m(), B("div", il, [
|
|
3689
|
+
A(l(at), {
|
|
3690
|
+
"model-value": d.value,
|
|
3695
3691
|
items: e.options,
|
|
3696
3692
|
floating: !0,
|
|
3697
3693
|
placement: "bottom-end",
|
|
3698
3694
|
offset: { mainAxis: 8, crossAxis: 0 },
|
|
3699
3695
|
"empty-text": l(n)("common.no_options", "No options"),
|
|
3700
|
-
"is-item-active": (
|
|
3696
|
+
"is-item-active": (p) => p.value === e.modelValue,
|
|
3701
3697
|
role: "listbox",
|
|
3702
3698
|
padded: !0,
|
|
3703
|
-
onItemClick:
|
|
3704
|
-
"onUpdate:modelValue":
|
|
3699
|
+
onItemClick: r,
|
|
3700
|
+
"onUpdate:modelValue": E[0] || (E[0] = (p) => d.value = p)
|
|
3705
3701
|
}, {
|
|
3706
3702
|
trigger: h(() => [
|
|
3707
|
-
|
|
3703
|
+
O("button", {
|
|
3708
3704
|
type: "button",
|
|
3709
3705
|
class: Ue(["vc-language-selector__trigger", {
|
|
3710
|
-
"vc-language-selector__trigger--active":
|
|
3706
|
+
"vc-language-selector__trigger--active": d.value,
|
|
3711
3707
|
"vc-language-selector__trigger--disabled": e.disabled
|
|
3712
3708
|
}]),
|
|
3713
3709
|
disabled: e.disabled,
|
|
3714
|
-
"aria-expanded":
|
|
3710
|
+
"aria-expanded": d.value,
|
|
3715
3711
|
"aria-haspopup": "listbox",
|
|
3716
3712
|
onClick: s
|
|
3717
3713
|
}, [
|
|
3718
|
-
|
|
3714
|
+
i.value?.flag ? (m(), B("img", {
|
|
3719
3715
|
key: 0,
|
|
3720
|
-
src:
|
|
3721
|
-
alt:
|
|
3716
|
+
src: i.value.flag,
|
|
3717
|
+
alt: i.value.label,
|
|
3722
3718
|
class: "vc-language-selector__flag"
|
|
3723
|
-
}, null, 8, ll)) : (
|
|
3719
|
+
}, null, 8, ll)) : (m(), k(l(Ge), {
|
|
3724
3720
|
key: 1,
|
|
3725
3721
|
icon: "lucide-globe",
|
|
3726
3722
|
size: "xs",
|
|
@@ -3728,29 +3724,29 @@ const Dr = ["aria-label"], Cr = ["gs-id", "gs-x", "gs-y", "gs-w", "gs-h", "aria-
|
|
|
3728
3724
|
}))
|
|
3729
3725
|
], 10, rl)
|
|
3730
3726
|
]),
|
|
3731
|
-
item: h(({ item:
|
|
3732
|
-
|
|
3727
|
+
item: h(({ item: p }) => [
|
|
3728
|
+
O("div", {
|
|
3733
3729
|
class: Ue(["vc-language-selector__item", {
|
|
3734
|
-
"vc-language-selector__item--active":
|
|
3730
|
+
"vc-language-selector__item--active": p.value === e.modelValue
|
|
3735
3731
|
}])
|
|
3736
3732
|
}, [
|
|
3737
|
-
|
|
3733
|
+
p.value === e.modelValue ? (m(), k(l(Ge), {
|
|
3738
3734
|
key: 0,
|
|
3739
3735
|
icon: "lucide-check",
|
|
3740
3736
|
size: "xs",
|
|
3741
3737
|
class: "vc-language-selector__item-icon"
|
|
3742
|
-
})) : (
|
|
3743
|
-
|
|
3738
|
+
})) : (m(), B("span", cl)),
|
|
3739
|
+
p.flag ? (m(), B("img", {
|
|
3744
3740
|
key: 2,
|
|
3745
|
-
src:
|
|
3746
|
-
alt:
|
|
3741
|
+
src: p.flag,
|
|
3742
|
+
alt: p.label,
|
|
3747
3743
|
class: "vc-language-selector__item-flag"
|
|
3748
|
-
}, null, 8, dl)) :
|
|
3749
|
-
|
|
3744
|
+
}, null, 8, dl)) : U("", !0),
|
|
3745
|
+
O("span", ul, N(p.label), 1)
|
|
3750
3746
|
], 2)
|
|
3751
3747
|
]),
|
|
3752
3748
|
empty: h(() => [
|
|
3753
|
-
|
|
3749
|
+
O("div", fl, N(l(n)("common.no_options", "No options")), 1)
|
|
3754
3750
|
]),
|
|
3755
3751
|
_: 1
|
|
3756
3752
|
}, 8, ["model-value", "items", "empty-text", "is-item-active"])
|
|
@@ -3762,10 +3758,10 @@ function ml(e, t) {
|
|
|
3762
3758
|
const a = Mo();
|
|
3763
3759
|
e.provide(Zo, a);
|
|
3764
3760
|
const { resolveCamelCaseLocale: o } = a;
|
|
3765
|
-
e.config.globalProperties.$mergeLocaleMessage = (n,
|
|
3766
|
-
re.global.mergeLocaleMessage(o(n),
|
|
3767
|
-
}, Object.entries(or).forEach(([n,
|
|
3768
|
-
re.global.mergeLocaleMessage(o(n),
|
|
3761
|
+
e.config.globalProperties.$mergeLocaleMessage = (n, d) => {
|
|
3762
|
+
re.global.mergeLocaleMessage(o(n), d);
|
|
3763
|
+
}, Object.entries(or).forEach(([n, d]) => {
|
|
3764
|
+
re.global.mergeLocaleMessage(o(n), d);
|
|
3769
3765
|
});
|
|
3770
3766
|
}
|
|
3771
3767
|
function gl(e) {
|
|
@@ -3825,10 +3821,10 @@ function Al(e, t) {
|
|
|
3825
3821
|
const o = e.runWithContext(() => Vn());
|
|
3826
3822
|
e.provide(mn, o), e.runWithContext(() => {
|
|
3827
3823
|
const { setupPageTracking: n } = gn();
|
|
3828
|
-
t.router.beforeEach((
|
|
3829
|
-
n.beforeEach({ name:
|
|
3830
|
-
}), t.router.afterEach((
|
|
3831
|
-
n.afterEach({ name:
|
|
3824
|
+
t.router.beforeEach((d) => {
|
|
3825
|
+
n.beforeEach({ name: d.name });
|
|
3826
|
+
}), t.router.afterEach((d) => {
|
|
3827
|
+
n.afterEach({ name: d.name, fullPath: d.fullPath });
|
|
3832
3828
|
});
|
|
3833
3829
|
});
|
|
3834
3830
|
}
|
|
@@ -3851,11 +3847,11 @@ function bl(e) {
|
|
|
3851
3847
|
if (a.meta.permissions) {
|
|
3852
3848
|
if (n(a.meta.permissions)) return !0;
|
|
3853
3849
|
{
|
|
3854
|
-
|
|
3850
|
+
J.error(re.global.t("PERMISSION_MESSAGES.ACCESS_RESTRICTED"), {
|
|
3855
3851
|
timeout: 3e3
|
|
3856
3852
|
});
|
|
3857
|
-
const
|
|
3858
|
-
return Object.keys(
|
|
3853
|
+
const d = t(a);
|
|
3854
|
+
return Object.keys(d)[0] ? `/${Object.values(d)[0]}` + o.path : o.path;
|
|
3859
3855
|
}
|
|
3860
3856
|
} else return !0;
|
|
3861
3857
|
});
|
|
@@ -4181,7 +4177,7 @@ export {
|
|
|
4181
4177
|
Zd as convertMomentFormat,
|
|
4182
4178
|
sg as createAiAgentToolbarButton,
|
|
4183
4179
|
nd as createAppModule,
|
|
4184
|
-
|
|
4180
|
+
ee as createLogger,
|
|
4185
4181
|
kd as default,
|
|
4186
4182
|
lt as defineAppModule,
|
|
4187
4183
|
ld as defineBladeContext,
|
|
@@ -4211,7 +4207,7 @@ export {
|
|
|
4211
4207
|
wd as mergeLayoutWithWidgets,
|
|
4212
4208
|
ug as mindimensions,
|
|
4213
4209
|
tu as normalizeHexColor,
|
|
4214
|
-
|
|
4210
|
+
J as notification,
|
|
4215
4211
|
we as parseError,
|
|
4216
4212
|
ui as permissions,
|
|
4217
4213
|
uo as provideAppBarState,
|