@aeria-ui/ui 0.0.73 → 0.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_id_-c8166d7d.js → _id_-189c8d20.js} +1 -1
- package/dist/{activation-ebdf89dd.js → activation-32dfffac.js} +1 -1
- package/dist/{index-35149d38.js → index-2cb63da6.js} +1 -1
- package/dist/{index-00e60813.js → index-87ba2fac.js} +437 -432
- package/dist/{index-6ad9c33d.js → index-a48f4039.js} +1 -1
- package/dist/{index-af6c665b.js → index-e3749b5b.js} +1 -1
- package/dist/{signin-677ea9d4.js → signin-57158b4e.js} +1 -1
- package/dist/{signup-8c53d226.js → signup-e28a57c5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/ui.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as U, ref as J, resolveDirective as oe, openBlock as n, createElementBlock as i, normalizeClass as K, Fragment as N, renderList as D, withDirectives as x, toDisplayString as k, createCommentVNode as y, createTextVNode as W, unref as e, renderSlot as I, inject as
|
|
2
|
-
import { t as
|
|
3
|
-
import { useScrollObserver as
|
|
4
|
-
import { arraysIntersect as Vt, deepClone as ke, getReferenceProperty as
|
|
5
|
-
import { useStore as ie, getStoreId as
|
|
1
|
+
import { defineComponent as U, ref as J, resolveDirective as oe, openBlock as n, createElementBlock as i, normalizeClass as K, Fragment as N, renderList as D, withDirectives as x, toDisplayString as k, createCommentVNode as y, createTextVNode as W, unref as e, renderSlot as I, inject as _e, computed as Q, createElementVNode as V, mergeProps as H, createBlock as g, resolveDynamicComponent as he, withCtx as f, useCssVars as It, Teleport as Je, onMounted as $t, watch as ue, createVNode as R, vModelDynamic as At, onBeforeMount as bt, normalizeStyle as $e, withModifiers as Ee, pushScopeId as He, popScopeId as Qe, provide as ye, createSlots as ce, normalizeProps as pe, guardReactiveProps as Ve, vModelCheckbox as Bt, onUnmounted as wt, isRef as _t, resolveComponent as St, Suspense as jt, useSlots as Tt, h as Rt } from "vue";
|
|
2
|
+
import { t as L, useI18n as Lt } from "@aeria-ui/i18n";
|
|
3
|
+
import { useScrollObserver as Ze, useBreakpoints as Me, useMask as zt, PAGINATION_PER_PAGE_DEFAULTS as Mt, API_URL as gt, request as qt, useDebounce as kt, isDocumentComplete as Ft, getObjectKey as Ut, convertToSearchQuery as Et, useAction as Dt, convertFromSearchQuery as Ht, useParentCollectionStore as Ke, usePasswordPolicy as Qt } from "@aeria-ui/core";
|
|
4
|
+
import { arraysIntersect as Vt, deepClone as ke, getReferenceProperty as me, convertConditionToQuery as Gt, freshItem as Wt, isRequired as Kt, evaluateCondition as Ye, deepMerge as ze } from "@aeriajs/common";
|
|
5
|
+
import { useStore as ie, getStoreId as qe, useParentStore as Ie, STORE_ID as Fe, getGlobalStateManager as Pe } from "@aeria-ui/state-management";
|
|
6
6
|
import { useRouter as Ae } from "vue-router";
|
|
7
7
|
const Xt = ["onClick"], Yt = { key: 0 }, Jt = {
|
|
8
8
|
key: 0,
|
|
@@ -14,7 +14,7 @@ const Xt = ["onClick"], Yt = { key: 0 }, Jt = {
|
|
|
14
14
|
noPadding: { type: Boolean },
|
|
15
15
|
headers: {}
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
17
|
+
setup(d) {
|
|
18
18
|
const r = J(null), a = (t) => typeof t == "string" ? t : t.title;
|
|
19
19
|
return (t, l) => {
|
|
20
20
|
const s = oe("clickable");
|
|
@@ -30,10 +30,10 @@ const Xt = ["onClick"], Yt = { key: 0 }, Jt = {
|
|
|
30
30
|
}, [
|
|
31
31
|
x((n(), i("div", {
|
|
32
32
|
class: "accordion__header",
|
|
33
|
-
onClick: (
|
|
33
|
+
onClick: (c) => r.value === u ? r.value = null : r.value = u
|
|
34
34
|
}, [
|
|
35
35
|
t.enumerate ? (n(), i("span", Yt, k(v + 1) + ". ", 1)) : y("", !0),
|
|
36
|
-
W(" " + k(t.headers[u] ? a(t.headers[u]) : e(
|
|
36
|
+
W(" " + k(t.headers[u] ? a(t.headers[u]) : e(L)(u)), 1)
|
|
37
37
|
], 8, Xt)), [
|
|
38
38
|
[s]
|
|
39
39
|
]),
|
|
@@ -45,18 +45,18 @@ const Xt = ["onClick"], Yt = { key: 0 }, Jt = {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
const X = (
|
|
49
|
-
const a =
|
|
48
|
+
const X = (d, r) => {
|
|
49
|
+
const a = d.__vccOpts || d;
|
|
50
50
|
for (const [t, l] of r)
|
|
51
51
|
a[t] = l;
|
|
52
52
|
return a;
|
|
53
|
-
},
|
|
53
|
+
}, Fl = /* @__PURE__ */ X(Zt, [["__scopeId", "data-v-3ea933d4"]]), Pt = /* @__PURE__ */ U({
|
|
54
54
|
__name: "aeria-badge",
|
|
55
55
|
props: {
|
|
56
56
|
large: { type: Boolean },
|
|
57
57
|
alt: { type: Boolean }
|
|
58
58
|
},
|
|
59
|
-
setup(
|
|
59
|
+
setup(d) {
|
|
60
60
|
return (r, a) => (n(), i("div", {
|
|
61
61
|
class: K(`
|
|
62
62
|
badge
|
|
@@ -74,8 +74,8 @@ const be = /* @__PURE__ */ X(Pt, [["__scopeId", "data-v-47f92648"]]), Nt = /* @_
|
|
|
74
74
|
disabled: { type: Boolean }
|
|
75
75
|
},
|
|
76
76
|
emits: ["click"],
|
|
77
|
-
setup(
|
|
78
|
-
const a =
|
|
77
|
+
setup(d, { emit: r }) {
|
|
78
|
+
const a = d, t = r, l = (s) => {
|
|
79
79
|
a.disabled || t("click", s);
|
|
80
80
|
};
|
|
81
81
|
return (s, u) => (n(), i("button", {
|
|
@@ -89,7 +89,7 @@ const be = /* @__PURE__ */ X(Pt, [["__scopeId", "data-v-47f92648"]]), Nt = /* @_
|
|
|
89
89
|
], 2));
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
const
|
|
92
|
+
const ve = /* @__PURE__ */ X(Nt, [["__scopeId", "data-v-35bc81ae"]]), xt = ["href"], en = {
|
|
93
93
|
key: 0,
|
|
94
94
|
"data-component": "icon-label"
|
|
95
95
|
}, tn = /* @__PURE__ */ U({
|
|
@@ -102,8 +102,8 @@ const fe = /* @__PURE__ */ X(Nt, [["__scopeId", "data-v-35bc81ae"]]), xt = ["hre
|
|
|
102
102
|
iconRight: { type: Boolean },
|
|
103
103
|
fill: {}
|
|
104
104
|
},
|
|
105
|
-
setup(
|
|
106
|
-
const r =
|
|
105
|
+
setup(d) {
|
|
106
|
+
const r = d, a = typeof r.reactive == "boolean" ? r.reactive : _e("iconReactive", !1), t = Q(() => {
|
|
107
107
|
var l;
|
|
108
108
|
return (l = r.icon) != null && l.includes(":") ? r.icon : `regular:${r.icon}`;
|
|
109
109
|
});
|
|
@@ -166,8 +166,8 @@ const Z = /* @__PURE__ */ X(tn, [["__scopeId", "data-v-4b763bd3"]]), nn = { clas
|
|
|
166
166
|
overlayLayer: {}
|
|
167
167
|
},
|
|
168
168
|
emits: ["update:modelValue", "update:collapsed", "update:closeHint", "overlayClick", "close"],
|
|
169
|
-
setup(
|
|
170
|
-
const a =
|
|
169
|
+
setup(d, { emit: r }) {
|
|
170
|
+
const a = d, t = r, l = Q(() => a.floating || a.float), s = J(a.collapsed), u = J(null), { reachedEnd: v } = Ze(u), c = () => {
|
|
171
171
|
t("update:modelValue", !1), t("close");
|
|
172
172
|
}, h = () => {
|
|
173
173
|
t("overlayClick");
|
|
@@ -232,7 +232,7 @@ const Z = /* @__PURE__ */ X(tn, [["__scopeId", "data-v-4b763bd3"]]), nn = { clas
|
|
|
232
232
|
key: 2,
|
|
233
233
|
reactive: "",
|
|
234
234
|
icon: "x",
|
|
235
|
-
onClick:
|
|
235
|
+
onClick: c
|
|
236
236
|
}, null, 512)), [
|
|
237
237
|
[$]
|
|
238
238
|
]) : y("", !0)
|
|
@@ -288,17 +288,17 @@ const Be = /* @__PURE__ */ X(ln, [["__scopeId", "data-v-73b47cf0"]]), sn = { cla
|
|
|
288
288
|
disabled: { type: Boolean },
|
|
289
289
|
loading: { type: Boolean }
|
|
290
290
|
},
|
|
291
|
-
setup(
|
|
292
|
-
const r =
|
|
291
|
+
setup(d) {
|
|
292
|
+
const r = d, a = _e("buttonVariant", r.variant) || "primary", t = (() => {
|
|
293
293
|
switch (!0) {
|
|
294
294
|
case r.small:
|
|
295
295
|
return "small";
|
|
296
296
|
case r.large:
|
|
297
297
|
return "large";
|
|
298
298
|
}
|
|
299
|
-
return
|
|
299
|
+
return _e("buttonSize", r.size) || "medium";
|
|
300
300
|
})();
|
|
301
|
-
return (l, s) => (n(), g(
|
|
301
|
+
return (l, s) => (n(), g(ve, {
|
|
302
302
|
class: K(`
|
|
303
303
|
button
|
|
304
304
|
button--${e(a)}
|
|
@@ -332,7 +332,7 @@ const re = /* @__PURE__ */ X(un, [["__scopeId", "data-v-c328251b"]]), cn = { cla
|
|
|
332
332
|
inactive: { type: Boolean },
|
|
333
333
|
horizontal: { type: Boolean }
|
|
334
334
|
},
|
|
335
|
-
setup(
|
|
335
|
+
setup(d) {
|
|
336
336
|
return (r, a) => (n(), i("div", {
|
|
337
337
|
class: K(`
|
|
338
338
|
card
|
|
@@ -368,21 +368,21 @@ const fn = /* @__PURE__ */ X(mn, [["__scopeId", "data-v-c1a322df"]]), vn = { cla
|
|
|
368
368
|
overlayLayer: {}
|
|
369
369
|
},
|
|
370
370
|
emits: ["actionClick"],
|
|
371
|
-
setup(
|
|
372
|
-
It((
|
|
371
|
+
setup(d, { emit: r }) {
|
|
372
|
+
It((c) => ({
|
|
373
373
|
"0cfe51de": v.value.x,
|
|
374
374
|
"0cfe51df": v.value.y
|
|
375
375
|
}));
|
|
376
|
-
const a = r, t = J(null), l = J(!1), s = (
|
|
376
|
+
const a = r, t = J(null), l = J(!1), s = (c) => c == null ? void 0 : c.filter((h) => {
|
|
377
377
|
if (h.roles) {
|
|
378
378
|
const p = ie("user");
|
|
379
379
|
return Vt(h.roles, p.currentUser.roles);
|
|
380
380
|
}
|
|
381
381
|
return !0;
|
|
382
|
-
}), u = (
|
|
382
|
+
}), u = (c, h) => {
|
|
383
383
|
const p = ke(h);
|
|
384
|
-
|
|
385
|
-
action:
|
|
384
|
+
c.click(p), a("actionClick", {
|
|
385
|
+
action: c,
|
|
386
386
|
subject: p
|
|
387
387
|
}), l.value = !1;
|
|
388
388
|
}, v = Q(() => {
|
|
@@ -391,17 +391,17 @@ const fn = /* @__PURE__ */ X(mn, [["__scopeId", "data-v-c1a322df"]]), vn = { cla
|
|
|
391
391
|
x: 0,
|
|
392
392
|
y: 0
|
|
393
393
|
};
|
|
394
|
-
const
|
|
394
|
+
const c = t.value.getBoundingClientRect().top, h = t.value.getBoundingClientRect().left, p = t.value.offsetHeight;
|
|
395
395
|
return {
|
|
396
396
|
_: l.value,
|
|
397
397
|
x: Math.floor(h) + "px",
|
|
398
|
-
y: Math.floor(
|
|
398
|
+
y: Math.floor(c + p) + "px"
|
|
399
399
|
};
|
|
400
400
|
});
|
|
401
|
-
return (
|
|
401
|
+
return (c, h) => {
|
|
402
402
|
const p = oe("overlay");
|
|
403
403
|
return n(), i(N, null, [
|
|
404
|
-
Object.keys(
|
|
404
|
+
Object.keys(c.$slots).some((o) => o !== "default") || c.actions !== void 0 && c.actions.length > 0 ? (n(), i("div", {
|
|
405
405
|
key: 0,
|
|
406
406
|
ref_key: "contextmenu",
|
|
407
407
|
ref: t,
|
|
@@ -411,10 +411,10 @@ const fn = /* @__PURE__ */ X(mn, [["__scopeId", "data-v-c1a322df"]]), vn = { cla
|
|
|
411
411
|
class: "contextmenu__trigger",
|
|
412
412
|
onClick: h[0] || (h[0] = (o) => l.value = !0)
|
|
413
413
|
}, [
|
|
414
|
-
I(
|
|
414
|
+
I(c.$slots, "default", {}, void 0, !0)
|
|
415
415
|
])
|
|
416
416
|
], 512)) : y("", !0),
|
|
417
|
-
l.value ? (n(), g(
|
|
417
|
+
l.value ? (n(), g(Je, {
|
|
418
418
|
key: 1,
|
|
419
419
|
to: "main"
|
|
420
420
|
}, [
|
|
@@ -428,33 +428,33 @@ const fn = /* @__PURE__ */ X(mn, [["__scopeId", "data-v-c1a322df"]]), vn = { cla
|
|
|
428
428
|
}, {
|
|
429
429
|
default: f(() => [
|
|
430
430
|
V("div", vn, [
|
|
431
|
-
|
|
432
|
-
I(
|
|
431
|
+
c.$slots.header ? (n(), i("div", yn, [
|
|
432
|
+
I(c.$slots, "header", {}, void 0, !0)
|
|
433
433
|
])) : y("", !0),
|
|
434
|
-
Object.keys(
|
|
434
|
+
Object.keys(c.$slots).filter((o) => !["default", "extra", "header"].includes(o)).length > 0 ? (n(), i("div", {
|
|
435
435
|
key: 1,
|
|
436
436
|
class: "content__section",
|
|
437
437
|
onClick: h[1] || (h[1] = (o) => l.value = !1)
|
|
438
438
|
}, [
|
|
439
|
-
(n(!0), i(N, null, D(Object.keys(
|
|
439
|
+
(n(!0), i(N, null, D(Object.keys(c.$slots).filter((o) => !["default", "extra", "header"].includes(o)), (o, _) => (n(), g(ve, {
|
|
440
440
|
key: `slot-${_}`,
|
|
441
441
|
class: "content__item content__item--reactive"
|
|
442
442
|
}, {
|
|
443
443
|
default: f(() => [
|
|
444
|
-
I(
|
|
444
|
+
I(c.$slots, o, {}, void 0, !0)
|
|
445
445
|
]),
|
|
446
446
|
_: 2
|
|
447
447
|
}, 1024))), 128))
|
|
448
448
|
])) : y("", !0),
|
|
449
|
-
|
|
449
|
+
c.actions !== void 0 && c.actions.length > 0 ? (n(), i("div", {
|
|
450
450
|
key: 2,
|
|
451
451
|
class: "content__section",
|
|
452
452
|
onClick: h[2] || (h[2] = (o) => l.value = !1)
|
|
453
453
|
}, [
|
|
454
|
-
(n(!0), i(N, null, D(s(
|
|
454
|
+
(n(!0), i(N, null, D(s(c.actions), (o, _) => (n(), g(ve, {
|
|
455
455
|
key: `action-${_}`,
|
|
456
456
|
class: "content__item content__item--reactive",
|
|
457
|
-
onClick: ($) => u(o,
|
|
457
|
+
onClick: ($) => u(o, c.subject)
|
|
458
458
|
}, {
|
|
459
459
|
default: f(() => [
|
|
460
460
|
o.icon ? (n(), g(Z, {
|
|
@@ -462,7 +462,7 @@ const fn = /* @__PURE__ */ X(mn, [["__scopeId", "data-v-c1a322df"]]), vn = { cla
|
|
|
462
462
|
icon: o.icon
|
|
463
463
|
}, {
|
|
464
464
|
default: f(() => [
|
|
465
|
-
W(k(o.translate ? e(
|
|
465
|
+
W(k(o.translate ? e(L)(o.label, { capitalize: !0 }) : o.label), 1)
|
|
466
466
|
]),
|
|
467
467
|
_: 2
|
|
468
468
|
}, 1032, ["icon"])) : y("", !0)
|
|
@@ -470,13 +470,13 @@ const fn = /* @__PURE__ */ X(mn, [["__scopeId", "data-v-c1a322df"]]), vn = { cla
|
|
|
470
470
|
_: 2
|
|
471
471
|
}, 1032, ["onClick"]))), 128))
|
|
472
472
|
])) : y("", !0),
|
|
473
|
-
|
|
473
|
+
c.$slots.extra ? (n(), i("div", {
|
|
474
474
|
key: 3,
|
|
475
475
|
class: "content__section",
|
|
476
476
|
onClick: h[3] || (h[3] = (o) => l.value = !1)
|
|
477
477
|
}, [
|
|
478
478
|
V("div", hn, [
|
|
479
|
-
|
|
479
|
+
c.$slots.extra ? I(c.$slots, "extra", { key: 0 }, void 0, !0) : y("", !0)
|
|
480
480
|
])
|
|
481
481
|
])) : y("", !0)
|
|
482
482
|
])
|
|
@@ -486,7 +486,7 @@ const fn = /* @__PURE__ */ X(mn, [["__scopeId", "data-v-c1a322df"]]), vn = { cla
|
|
|
486
486
|
[
|
|
487
487
|
p,
|
|
488
488
|
{
|
|
489
|
-
layer:
|
|
489
|
+
layer: c.overlayLayer,
|
|
490
490
|
click: () => {
|
|
491
491
|
l.value = !1;
|
|
492
492
|
}
|
|
@@ -505,8 +505,8 @@ const Ce = /* @__PURE__ */ X($n, [["__scopeId", "data-v-66a4ee79"]]), bn = { cla
|
|
|
505
505
|
props: {
|
|
506
506
|
where: {}
|
|
507
507
|
},
|
|
508
|
-
setup(
|
|
509
|
-
const r =
|
|
508
|
+
setup(d) {
|
|
509
|
+
const r = d, a = Me(), t = J(!1), l = r.where || "top";
|
|
510
510
|
return (s, u) => e(a).md ? (n(), i("div", {
|
|
511
511
|
key: 0,
|
|
512
512
|
class: "info",
|
|
@@ -552,9 +552,9 @@ const kn = /* @__PURE__ */ X(gn, [["__scopeId", "data-v-76defa0b"]]), Vn = { cla
|
|
|
552
552
|
variant: {}
|
|
553
553
|
},
|
|
554
554
|
emits: ["update:modelValue", "input", "change"],
|
|
555
|
-
setup(
|
|
555
|
+
setup(d, { emit: r }) {
|
|
556
556
|
var B;
|
|
557
|
-
const a =
|
|
557
|
+
const a = d, t = a.property || {}, l = "icon" in t || "inputType" in t && t.inputType === "search", s = _e("searchOnly", !1), u = _e("innerInputLabel", !1), v = !s && (a.readOnly || t.readOnly), c = (z) => navigator.clipboard.writeText(z), h = r, p = _e("inputVariant", a.variant) || "normal", o = {
|
|
558
558
|
name: a.propertyName,
|
|
559
559
|
readonly: v,
|
|
560
560
|
type: (() => {
|
|
@@ -677,14 +677,14 @@ const kn = /* @__PURE__ */ X(gn, [["__scopeId", "data-v-76defa0b"]]), Vn = { cla
|
|
|
677
677
|
`)
|
|
678
678
|
}, null, 8, ["icon", "class"])) : y("", !0),
|
|
679
679
|
e(v) ? (n(), i("div", Bn, [
|
|
680
|
-
|
|
680
|
+
R(kn, null, {
|
|
681
681
|
text: f(() => [
|
|
682
682
|
W("Copiar")
|
|
683
683
|
]),
|
|
684
684
|
default: f(() => [
|
|
685
|
-
x(
|
|
685
|
+
x(R(Z, {
|
|
686
686
|
icon: "clipboard",
|
|
687
|
-
onClick: Y[1] || (Y[1] = (C) =>
|
|
687
|
+
onClick: Y[1] || (Y[1] = (C) => c(String(z.modelValue || "")))
|
|
688
688
|
}, null, 512), [
|
|
689
689
|
[te]
|
|
690
690
|
])
|
|
@@ -700,7 +700,7 @@ const kn = /* @__PURE__ */ X(gn, [["__scopeId", "data-v-76defa0b"]]), Vn = { cla
|
|
|
700
700
|
const Oe = /* @__PURE__ */ X(wn, [["__scopeId", "data-v-fa830575"]]), Sn = ["value"], jn = {
|
|
701
701
|
key: 1,
|
|
702
702
|
value: ""
|
|
703
|
-
}, Tn = ["value", "data-selected"],
|
|
703
|
+
}, Tn = ["value", "data-selected"], Rn = /* @__PURE__ */ U({
|
|
704
704
|
__name: "aeria-select",
|
|
705
705
|
props: {
|
|
706
706
|
modelValue: {},
|
|
@@ -714,8 +714,8 @@ const Oe = /* @__PURE__ */ X(wn, [["__scopeId", "data-v-fa830575"]]), Sn = ["val
|
|
|
714
714
|
noOutline: { type: Boolean }
|
|
715
715
|
},
|
|
716
716
|
emits: ["update:modelValue", "change"],
|
|
717
|
-
setup(
|
|
718
|
-
const a =
|
|
717
|
+
setup(d, { emit: r }) {
|
|
718
|
+
const a = d, t = r, l = J(null), s = a.property, u = (p) => {
|
|
719
719
|
a.booleanRef && (v.value = p), t("update:modelValue", (p == null ? void 0 : p._id) || p), t("change", (p == null ? void 0 : p._id) || p);
|
|
720
720
|
}, v = a.booleanRef ? (() => {
|
|
721
721
|
const p = J(a.modelValue);
|
|
@@ -737,7 +737,7 @@ const Oe = /* @__PURE__ */ X(wn, [["__scopeId", "data-v-fa830575"]]), Sn = ["val
|
|
|
737
737
|
})() : Q({
|
|
738
738
|
get: () => a.modelValue,
|
|
739
739
|
set: u
|
|
740
|
-
}),
|
|
740
|
+
}), c = (p) => Array.isArray(a.modelValue) ? a.modelValue.includes(p) : a.modelValue === p, h = Q(() => a.multiple ? typeof a.multiple == "number" ? a.multiple : 5 : 1);
|
|
741
741
|
return a.multiple && ue(() => a.modelValue, (p) => {
|
|
742
742
|
var _;
|
|
743
743
|
if (!l.value)
|
|
@@ -767,28 +767,28 @@ const Oe = /* @__PURE__ */ X(wn, [["__scopeId", "data-v-fa830575"]]), Sn = ["val
|
|
|
767
767
|
key: 0,
|
|
768
768
|
icon: e(s).icon
|
|
769
769
|
}, null, 8, ["icon"])) : y("", !0),
|
|
770
|
-
a.multiple ? y("", !0) : (n(), i("option", jn, k(e(
|
|
770
|
+
a.multiple ? y("", !0) : (n(), i("option", jn, k(e(L)("none")), 1)),
|
|
771
771
|
(n(!0), i(N, null, D(e(s) && "enum" in e(s) ? e(s).enum : [], (_) => {
|
|
772
772
|
var $;
|
|
773
773
|
return n(), i("option", {
|
|
774
774
|
key: _,
|
|
775
775
|
value: _,
|
|
776
|
-
"data-selected":
|
|
777
|
-
}, k(($ = e(s)) != null && $.translate ? e(
|
|
776
|
+
"data-selected": c(_)
|
|
777
|
+
}, k(($ = e(s)) != null && $.translate ? e(L)(_) : _), 9, Tn);
|
|
778
778
|
}), 128)),
|
|
779
779
|
I(p.$slots, "default", {}, void 0, !0)
|
|
780
780
|
], 16, Sn)
|
|
781
781
|
], 2));
|
|
782
782
|
}
|
|
783
783
|
});
|
|
784
|
-
const
|
|
784
|
+
const Ge = /* @__PURE__ */ X(Rn, [["__scopeId", "data-v-1f76ec88"]]), Ln = { class: "pagination" }, zn = ["value"], Mn = { class: "pagination__control" }, qn = { class: "pagination__page-input" }, Fn = /* @__PURE__ */ U({
|
|
785
785
|
__name: "aeria-pagination",
|
|
786
786
|
props: {
|
|
787
787
|
pagination: {}
|
|
788
788
|
},
|
|
789
789
|
emits: ["paginate"],
|
|
790
|
-
setup(
|
|
791
|
-
const a =
|
|
790
|
+
setup(d, { emit: r }) {
|
|
791
|
+
const a = d, t = r, l = Q({
|
|
792
792
|
get: () => Math.floor(a.pagination.offset / a.pagination.limit),
|
|
793
793
|
set: (h) => {
|
|
794
794
|
a.pagination.offset = h * a.pagination.limit;
|
|
@@ -798,7 +798,7 @@ const Qe = /* @__PURE__ */ X(Ln, [["__scopeId", "data-v-1f76ec88"]]), Rn = { cla
|
|
|
798
798
|
set: (h) => {
|
|
799
799
|
a.pagination.limit = Number(h);
|
|
800
800
|
}
|
|
801
|
-
}), u = J(l.value ? l.value + 1 : 1), v = Q(() => Math.ceil(a.pagination.recordsTotal / a.pagination.limit)),
|
|
801
|
+
}), u = J(l.value ? l.value + 1 : 1), v = Q(() => Math.ceil(a.pagination.recordsTotal / a.pagination.limit)), c = (h) => {
|
|
802
802
|
l.value = h === "previous" ? l.value - 1 : l.value + 1;
|
|
803
803
|
};
|
|
804
804
|
return ue([
|
|
@@ -809,8 +809,8 @@ const Qe = /* @__PURE__ */ X(Ln, [["__scopeId", "data-v-1f76ec88"]]), Rn = { cla
|
|
|
809
809
|
offset: l.value * s.value,
|
|
810
810
|
limit: s.value
|
|
811
811
|
});
|
|
812
|
-
}), (h, p) => (n(), i("div",
|
|
813
|
-
|
|
812
|
+
}), (h, p) => (n(), i("div", Ln, [
|
|
813
|
+
R(Ge, {
|
|
814
814
|
modelValue: s.value,
|
|
815
815
|
"onUpdate:modelValue": p[0] || (p[0] = (o) => s.value = o),
|
|
816
816
|
property: {
|
|
@@ -828,30 +828,30 @@ const Qe = /* @__PURE__ */ X(Ln, [["__scopeId", "data-v-1f76ec88"]]), Rn = { cla
|
|
|
828
828
|
_: 1
|
|
829
829
|
}, 8, ["modelValue"]),
|
|
830
830
|
V("div", Mn, [
|
|
831
|
-
|
|
831
|
+
R(ve, {
|
|
832
832
|
onClick: p[1] || (p[1] = (o) => l.value = 0)
|
|
833
833
|
}, {
|
|
834
834
|
default: f(() => [
|
|
835
|
-
|
|
835
|
+
R(Z, {
|
|
836
836
|
reactive: "",
|
|
837
837
|
icon: "caret-double-left"
|
|
838
838
|
})
|
|
839
839
|
]),
|
|
840
840
|
_: 1
|
|
841
841
|
}),
|
|
842
|
-
|
|
842
|
+
R(ve, {
|
|
843
843
|
disabled: l.value === 0,
|
|
844
|
-
onClick: p[2] || (p[2] = (o) =>
|
|
844
|
+
onClick: p[2] || (p[2] = (o) => c("previous"))
|
|
845
845
|
}, {
|
|
846
846
|
default: f(() => [
|
|
847
|
-
|
|
847
|
+
R(Z, {
|
|
848
848
|
reactive: "",
|
|
849
849
|
icon: "caret-left"
|
|
850
850
|
})
|
|
851
851
|
]),
|
|
852
852
|
_: 1
|
|
853
853
|
}, 8, ["disabled"]),
|
|
854
|
-
V("div",
|
|
854
|
+
V("div", qn, [
|
|
855
855
|
(n(), g(Oe, {
|
|
856
856
|
key: l.value,
|
|
857
857
|
modelValue: u.value,
|
|
@@ -864,25 +864,25 @@ const Qe = /* @__PURE__ */ X(Ln, [["__scopeId", "data-v-1f76ec88"]]), Rn = { cla
|
|
|
864
864
|
l.value = u.value === 0 ? 0 : u.value - 1;
|
|
865
865
|
})
|
|
866
866
|
}, null, 8, ["modelValue"])),
|
|
867
|
-
V("span", null, k(e(
|
|
867
|
+
V("span", null, k(e(L)("of")) + " " + k(v.value), 1)
|
|
868
868
|
]),
|
|
869
|
-
|
|
869
|
+
R(ve, {
|
|
870
870
|
disabled: l.value === v.value - 1,
|
|
871
|
-
onClick: p[5] || (p[5] = (o) =>
|
|
871
|
+
onClick: p[5] || (p[5] = (o) => c("next"))
|
|
872
872
|
}, {
|
|
873
873
|
default: f(() => [
|
|
874
|
-
|
|
874
|
+
R(Z, {
|
|
875
875
|
reactive: "",
|
|
876
876
|
icon: "caret-right"
|
|
877
877
|
})
|
|
878
878
|
]),
|
|
879
879
|
_: 1
|
|
880
880
|
}, 8, ["disabled"]),
|
|
881
|
-
|
|
881
|
+
R(ve, {
|
|
882
882
|
onClick: p[6] || (p[6] = (o) => l.value = v.value - 1)
|
|
883
883
|
}, {
|
|
884
884
|
default: f(() => [
|
|
885
|
-
|
|
885
|
+
R(Z, {
|
|
886
886
|
reactive: "",
|
|
887
887
|
icon: "caret-double-right"
|
|
888
888
|
})
|
|
@@ -893,7 +893,7 @@ const Qe = /* @__PURE__ */ X(Ln, [["__scopeId", "data-v-1f76ec88"]]), Rn = { cla
|
|
|
893
893
|
]));
|
|
894
894
|
}
|
|
895
895
|
});
|
|
896
|
-
const Un = /* @__PURE__ */ X(
|
|
896
|
+
const Un = /* @__PURE__ */ X(Fn, [["__scopeId", "data-v-41aa1ffc"]]), En = { class: "checkbox__text" }, Dn = ["innerHTML"], Hn = { class: "checkbox__hint" }, Qn = ["innerHTML"], Gn = {
|
|
897
897
|
inheritAttrs: !1
|
|
898
898
|
}, Wn = /* @__PURE__ */ U({
|
|
899
899
|
...Gn,
|
|
@@ -909,8 +909,8 @@ const Un = /* @__PURE__ */ X(qn, [["__scopeId", "data-v-41aa1ffc"]]), En = { cla
|
|
|
909
909
|
variant: {}
|
|
910
910
|
},
|
|
911
911
|
emits: ["update:modelValue", "change"],
|
|
912
|
-
setup(
|
|
913
|
-
const a =
|
|
912
|
+
setup(d, { emit: r }) {
|
|
913
|
+
const a = d, t = a.property, l = a.readOnly || (t == null ? void 0 : t.readOnly), s = (() => {
|
|
914
914
|
if (t && "type" in t)
|
|
915
915
|
switch (t.type) {
|
|
916
916
|
case "array":
|
|
@@ -918,7 +918,7 @@ const Un = /* @__PURE__ */ X(qn, [["__scopeId", "data-v-41aa1ffc"]]), En = { cla
|
|
|
918
918
|
return "checkbox";
|
|
919
919
|
}
|
|
920
920
|
return "radio";
|
|
921
|
-
})(), u = r, v = a.value || !1,
|
|
921
|
+
})(), u = r, v = a.value || !1, c = Q({
|
|
922
922
|
get: () => {
|
|
923
923
|
var p;
|
|
924
924
|
if (t) {
|
|
@@ -962,22 +962,22 @@ const Un = /* @__PURE__ */ X(qn, [["__scopeId", "data-v-41aa1ffc"]]), En = { cla
|
|
|
962
962
|
`)
|
|
963
963
|
}, [
|
|
964
964
|
x(V("input", H({
|
|
965
|
-
"onUpdate:modelValue": o[0] || (o[0] = (S) =>
|
|
965
|
+
"onUpdate:modelValue": o[0] || (o[0] = (S) => c.value = S)
|
|
966
966
|
}, {
|
|
967
967
|
type: e(s),
|
|
968
968
|
readOnly: e(l),
|
|
969
|
-
checked:
|
|
969
|
+
checked: c.value
|
|
970
970
|
}, {
|
|
971
971
|
class: "checkbox__input",
|
|
972
972
|
onClick: h
|
|
973
973
|
}), null, 16), [
|
|
974
|
-
[At,
|
|
974
|
+
[At, c.value]
|
|
975
975
|
]),
|
|
976
976
|
V("div", En, [
|
|
977
977
|
V("div", null, [
|
|
978
978
|
p.$slots.description ? I(p.$slots, "description", { key: 0 }, void 0, !0) : e(v) ? (n(), i("div", {
|
|
979
979
|
key: 1,
|
|
980
|
-
innerHTML: ($ = e(t)) != null && $.translate ? e(
|
|
980
|
+
innerHTML: ($ = e(t)) != null && $.translate ? e(L)(e(v)) : e(v)
|
|
981
981
|
}, null, 8, Dn)) : I(p.$slots, "default", { key: 2 }, void 0, !0)
|
|
982
982
|
]),
|
|
983
983
|
V("div", Hn, [
|
|
@@ -1008,8 +1008,8 @@ const Kn = /* @__PURE__ */ X(Wn, [["__scopeId", "data-v-db5fafae"]]), Xn = {
|
|
|
1008
1008
|
columns: { default: 1 }
|
|
1009
1009
|
},
|
|
1010
1010
|
emits: ["update:modelValue"],
|
|
1011
|
-
setup(
|
|
1012
|
-
const a =
|
|
1011
|
+
setup(d, { emit: r }) {
|
|
1012
|
+
const a = d, t = r, l = a.readOnly || a.property.readOnly, s = "items" in a.property ? a.property.items.enum : a.property.enum, u = (v) => {
|
|
1013
1013
|
t("update:modelValue", v);
|
|
1014
1014
|
};
|
|
1015
1015
|
return bt(() => {
|
|
@@ -1017,7 +1017,7 @@ const Kn = /* @__PURE__ */ X(Wn, [["__scopeId", "data-v-db5fafae"]]), Xn = {
|
|
|
1017
1017
|
"update:modelValue",
|
|
1018
1018
|
"items" in a.property ? [] : ""
|
|
1019
1019
|
);
|
|
1020
|
-
}), (v,
|
|
1020
|
+
}), (v, c) => (n(), i("div", {
|
|
1021
1021
|
class: "options",
|
|
1022
1022
|
style: $e(`
|
|
1023
1023
|
--columns: ${v.columns};
|
|
@@ -1028,7 +1028,7 @@ const Kn = /* @__PURE__ */ X(Wn, [["__scopeId", "data-v-db5fafae"]]), Xn = {
|
|
|
1028
1028
|
key: `option-${h}`,
|
|
1029
1029
|
class: "options__checkbox"
|
|
1030
1030
|
}, [
|
|
1031
|
-
|
|
1031
|
+
R(Kn, H({ ref_for: !0 }, {
|
|
1032
1032
|
value: h,
|
|
1033
1033
|
readOnly: e(l),
|
|
1034
1034
|
property: v.property
|
|
@@ -1040,7 +1040,7 @@ const Kn = /* @__PURE__ */ X(Wn, [["__scopeId", "data-v-db5fafae"]]), Xn = {
|
|
|
1040
1040
|
], 4));
|
|
1041
1041
|
}
|
|
1042
1042
|
});
|
|
1043
|
-
const Jn = /* @__PURE__ */ X(Yn, [["__scopeId", "data-v-39b61318"]]), Zn = (
|
|
1043
|
+
const Jn = /* @__PURE__ */ X(Yn, [["__scopeId", "data-v-39b61318"]]), Zn = (d) => (He("data-v-220b2101"), d = d(), Qe(), d), Pn = { class: "switch-wrapper" }, Nn = /* @__PURE__ */ Zn(() => /* @__PURE__ */ V("div", { class: "switch__slider" }, null, -1)), xn = { key: 1 }, eo = {
|
|
1044
1044
|
inheritAttrs: !1
|
|
1045
1045
|
}, to = /* @__PURE__ */ U({
|
|
1046
1046
|
...eo,
|
|
@@ -1054,11 +1054,11 @@ const Jn = /* @__PURE__ */ X(Yn, [["__scopeId", "data-v-39b61318"]]), Zn = (c) =
|
|
|
1054
1054
|
readOnly: { type: Boolean }
|
|
1055
1055
|
},
|
|
1056
1056
|
emits: ["update:modelValue", "change"],
|
|
1057
|
-
setup(
|
|
1058
|
-
const a =
|
|
1057
|
+
setup(d, { emit: r }) {
|
|
1058
|
+
const a = d, t = r, l = a.property, s = a.readOnly || (l == null ? void 0 : l.readOnly), u = () => {
|
|
1059
1059
|
s || (t("change", !a.modelValue), t("update:modelValue", !a.modelValue));
|
|
1060
1060
|
};
|
|
1061
|
-
return (v,
|
|
1061
|
+
return (v, c) => {
|
|
1062
1062
|
var p;
|
|
1063
1063
|
const h = oe("clickable");
|
|
1064
1064
|
return n(), i("div", Pn, [
|
|
@@ -1068,7 +1068,7 @@ const Jn = /* @__PURE__ */ X(Yn, [["__scopeId", "data-v-39b61318"]]), Zn = (c) =
|
|
|
1068
1068
|
${v.modelValue && "switch--active"}
|
|
1069
1069
|
${e(s) && "switch--readOnly"}
|
|
1070
1070
|
`),
|
|
1071
|
-
onClick:
|
|
1071
|
+
onClick: Ee(u, ["stop"])
|
|
1072
1072
|
}, [
|
|
1073
1073
|
Nn,
|
|
1074
1074
|
V("div", {
|
|
@@ -1087,7 +1087,7 @@ const Jn = /* @__PURE__ */ X(Yn, [["__scopeId", "data-v-39b61318"]]), Zn = (c) =
|
|
|
1087
1087
|
};
|
|
1088
1088
|
}
|
|
1089
1089
|
});
|
|
1090
|
-
const no = /* @__PURE__ */ X(to, [["__scopeId", "data-v-220b2101"]]), Ct = (
|
|
1090
|
+
const no = /* @__PURE__ */ X(to, [["__scopeId", "data-v-220b2101"]]), Ct = (d) => (He("data-v-153a2e0f"), d = d(), Qe(), d), oo = { class: "picture" }, ao = {
|
|
1091
1091
|
key: 0,
|
|
1092
1092
|
style: { position: "fixed", top: "50%", left: "50%", transform: "translate(-50%, -50%)" }
|
|
1093
1093
|
}, lo = ["src", "alt"], so = {
|
|
@@ -1124,13 +1124,13 @@ const no = /* @__PURE__ */ X(to, [["__scopeId", "data-v-220b2101"]]), Ct = (c) =
|
|
|
1124
1124
|
expandable: { type: Boolean },
|
|
1125
1125
|
meta: {}
|
|
1126
1126
|
},
|
|
1127
|
-
setup(
|
|
1128
|
-
const r =
|
|
1127
|
+
setup(d) {
|
|
1128
|
+
const r = d, a = Q(() => r.fileId ? `${gt}/file/${r.fileId}/picture` : r.url || r.modelValue), t = J(!1);
|
|
1129
1129
|
return (l, s) => {
|
|
1130
1130
|
var v;
|
|
1131
1131
|
const u = oe("overlay");
|
|
1132
1132
|
return n(), i("figure", oo, [
|
|
1133
|
-
a.value ? (n(), g(
|
|
1133
|
+
a.value ? (n(), g(Je, {
|
|
1134
1134
|
key: 0,
|
|
1135
1135
|
to: "main"
|
|
1136
1136
|
}, [
|
|
@@ -1142,7 +1142,7 @@ const no = /* @__PURE__ */ X(to, [["__scopeId", "data-v-220b2101"]]), Ct = (c) =
|
|
|
1142
1142
|
max-height: 60vh;
|
|
1143
1143
|
object-fit: contain;
|
|
1144
1144
|
`,
|
|
1145
|
-
onClick: s[0] || (s[0] = (
|
|
1145
|
+
onClick: s[0] || (s[0] = (c) => t.value = !0)
|
|
1146
1146
|
}, null, 8, lo),
|
|
1147
1147
|
(v = l.meta) != null && v.owner ? (n(), i("div", so, " Criado por " + k(l.meta.owner.name) + " em " + k(l.formatDateTime(l.meta.created_at, { hours: !0 })), 1)) : y("", !0)
|
|
1148
1148
|
])), [
|
|
@@ -1190,7 +1190,7 @@ const no = /* @__PURE__ */ X(to, [["__scopeId", "data-v-220b2101"]]), Ct = (c) =
|
|
|
1190
1190
|
};
|
|
1191
1191
|
}
|
|
1192
1192
|
});
|
|
1193
|
-
const
|
|
1193
|
+
const De = /* @__PURE__ */ X(_o, [["__scopeId", "data-v-153a2e0f"]]), mo = { class: "file" }, fo = { key: 0 }, vo = ["href"], yo = {
|
|
1194
1194
|
key: 1,
|
|
1195
1195
|
class: "file__actions"
|
|
1196
1196
|
}, ho = ["accept"], $o = {
|
|
@@ -1212,12 +1212,12 @@ const Ue = /* @__PURE__ */ X(_o, [["__scopeId", "data-v-153a2e0f"]]), mo = { cla
|
|
|
1212
1212
|
content: {}
|
|
1213
1213
|
},
|
|
1214
1214
|
emits: ["update:content", "change", "update:modelValue"],
|
|
1215
|
-
setup(
|
|
1215
|
+
setup(d, { emit: r }) {
|
|
1216
1216
|
var $;
|
|
1217
|
-
const a =
|
|
1217
|
+
const a = d, t = r, s = qe() ? Ie() : null, u = J((($ = a.modelValue) == null ? void 0 : $.file) || null), v = Q(() => {
|
|
1218
1218
|
var b;
|
|
1219
1219
|
return u.value ? URL.createObjectURL(u.value) : (b = a.modelValue) == null ? void 0 : b.link;
|
|
1220
|
-
}),
|
|
1220
|
+
}), c = Q(() => {
|
|
1221
1221
|
var b, S, T;
|
|
1222
1222
|
return /^image\//.test((b = a.modelValue) == null ? void 0 : b.type) && !((S = u.value) != null && S.type) || /^image\//.test((T = u.value) == null ? void 0 : T.type);
|
|
1223
1223
|
}), h = (b) => new Promise((S) => {
|
|
@@ -1229,7 +1229,7 @@ const Ue = /* @__PURE__ */ X(_o, [["__scopeId", "data-v-153a2e0f"]]), mo = { cla
|
|
|
1229
1229
|
u.value = b.target.files[0];
|
|
1230
1230
|
const S = u.value, T = await h(S);
|
|
1231
1231
|
if (s) {
|
|
1232
|
-
const { data: { error: P, result: B } } = await
|
|
1232
|
+
const { data: { error: P, result: B } } = await qt(`${gt}/${s.$id}/upload?name=${S.name}`, T, {
|
|
1233
1233
|
params: {
|
|
1234
1234
|
method: "POST",
|
|
1235
1235
|
headers: {
|
|
@@ -1254,7 +1254,7 @@ const Ue = /* @__PURE__ */ X(_o, [["__scopeId", "data-v-153a2e0f"]]), mo = { cla
|
|
|
1254
1254
|
var T, P, B, z, Y, w;
|
|
1255
1255
|
return n(), i("div", mo, [
|
|
1256
1256
|
u.value || (T = b.modelValue) != null && T._id ? (n(), i("div", fo, [
|
|
1257
|
-
|
|
1257
|
+
c.value ? (n(), g(De, {
|
|
1258
1258
|
key: 0,
|
|
1259
1259
|
modelValue: v.value,
|
|
1260
1260
|
"onUpdate:modelValue": S[0] || (S[0] = (te) => v.value = te),
|
|
@@ -1278,22 +1278,22 @@ const Ue = /* @__PURE__ */ X(_o, [["__scopeId", "data-v-153a2e0f"]]), mo = { cla
|
|
|
1278
1278
|
onChange: o
|
|
1279
1279
|
}, null, 40, ho),
|
|
1280
1280
|
u.value ? (n(), i("div", $o, [
|
|
1281
|
-
|
|
1281
|
+
R(re, {
|
|
1282
1282
|
small: "",
|
|
1283
|
-
onClick:
|
|
1283
|
+
onClick: Ee(p, ["prevent"])
|
|
1284
1284
|
}, {
|
|
1285
1285
|
default: f(() => [
|
|
1286
|
-
W(k(e(
|
|
1286
|
+
W(k(e(L)("action.clear", { capitalize: !0 })), 1)
|
|
1287
1287
|
]),
|
|
1288
1288
|
_: 1
|
|
1289
1289
|
})
|
|
1290
1290
|
])) : (w = b.modelValue) != null && w._id ? (n(), i("div", bo, [
|
|
1291
|
-
|
|
1291
|
+
R(re, {
|
|
1292
1292
|
small: "",
|
|
1293
|
-
onClick:
|
|
1293
|
+
onClick: Ee(_, ["prevent"])
|
|
1294
1294
|
}, {
|
|
1295
1295
|
default: f(() => [
|
|
1296
|
-
W(k(e(
|
|
1296
|
+
W(k(e(L)("action.remove", { capitalize: !0 })), 1)
|
|
1297
1297
|
]),
|
|
1298
1298
|
_: 1
|
|
1299
1299
|
})
|
|
@@ -1312,8 +1312,8 @@ const ko = /* @__PURE__ */ X(go, [["__scopeId", "data-v-aeeec9a8"]]), Vo = { cla
|
|
|
1312
1312
|
observeScroll: { type: Boolean }
|
|
1313
1313
|
},
|
|
1314
1314
|
emits: ["endReached"],
|
|
1315
|
-
setup(
|
|
1316
|
-
const a =
|
|
1315
|
+
setup(d, { emit: r }) {
|
|
1316
|
+
const a = d, t = r, l = J(null), s = a.observeScroll ? Ze(l, {
|
|
1317
1317
|
antecipate: 100
|
|
1318
1318
|
}).reachedEnd : null;
|
|
1319
1319
|
return s !== null && ue(s, (u) => {
|
|
@@ -1343,9 +1343,9 @@ const mt = /* @__PURE__ */ X(Oo, [["__scopeId", "data-v-c86e2d2a"]]), Io = { cla
|
|
|
1343
1343
|
readOnly: { type: Boolean }
|
|
1344
1344
|
},
|
|
1345
1345
|
emits: ["update:modelValue", "change"],
|
|
1346
|
-
setup(
|
|
1347
|
-
const a = Ae(), t =
|
|
1348
|
-
if (
|
|
1346
|
+
setup(d, { emit: r }) {
|
|
1347
|
+
const a = Ae(), t = d, l = r, s = t.property, u = me(s), v = Ie(), c = Q(() => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && Object.values(t.modelValue).some(({ _id: _ }) => t.item._id === _) : t.modelValue && t.modelValue._id === t.item._id), h = () => {
|
|
1348
|
+
if (c.value)
|
|
1349
1349
|
return;
|
|
1350
1350
|
const _ = (b) => b.filter((S) => !!(S != null && S._id)), $ = "items" in s ? _(Array.isArray(t.modelValue) ? t.modelValue : [t.modelValue]) : t.modelValue;
|
|
1351
1351
|
Array.isArray($) ? l("update:modelValue", $.concat([t.item])) : l("update:modelValue", t.item), l("change", t.item);
|
|
@@ -1374,14 +1374,14 @@ const mt = /* @__PURE__ */ X(Oo, [["__scopeId", "data-v-c86e2d2a"]]), Io = { cla
|
|
|
1374
1374
|
});
|
|
1375
1375
|
return;
|
|
1376
1376
|
}
|
|
1377
|
-
return
|
|
1377
|
+
return c.value ? p() : h();
|
|
1378
1378
|
};
|
|
1379
1379
|
return (_, $) => {
|
|
1380
1380
|
const b = oe("clickable");
|
|
1381
1381
|
return x((n(), i("div", {
|
|
1382
1382
|
class: K({
|
|
1383
1383
|
item: !0,
|
|
1384
|
-
"item--selected":
|
|
1384
|
+
"item--selected": c.value
|
|
1385
1385
|
}),
|
|
1386
1386
|
onClick: o
|
|
1387
1387
|
}, [
|
|
@@ -1403,10 +1403,10 @@ const mt = /* @__PURE__ */ X(Oo, [["__scopeId", "data-v-c86e2d2a"]]), Io = { cla
|
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
1405
|
});
|
|
1406
|
-
const
|
|
1406
|
+
const Xe = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { class: "search__panel" }, wo = { class: "search__input" }, So = ["value"], jo = { style: { flex: "1" } }, To = { key: 1 }, Ro = { key: 0 }, Lo = { key: 1 }, zo = { class: "search__summary" }, Mo = {
|
|
1407
1407
|
key: 1,
|
|
1408
1408
|
class: "search"
|
|
1409
|
-
},
|
|
1409
|
+
}, qo = { key: 0 }, Ue = 10, Fo = /* @__PURE__ */ U({
|
|
1410
1410
|
__name: "aeria-search",
|
|
1411
1411
|
props: {
|
|
1412
1412
|
modelValue: {},
|
|
@@ -1419,40 +1419,40 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1419
1419
|
panel: { default: void 0 }
|
|
1420
1420
|
},
|
|
1421
1421
|
emits: ["update:modelValue", "change", "update:panel"],
|
|
1422
|
-
setup(
|
|
1423
|
-
const a =
|
|
1424
|
-
ye(
|
|
1422
|
+
setup(d, { emit: r }) {
|
|
1423
|
+
const a = d, t = me(a.property), l = a.panel !== void 0 ? Q(() => a.panel) : J(!1), s = r, u = ie(me(a.property).$ref), v = qe(), c = v ? Ie() : null, h = t.indexes;
|
|
1424
|
+
ye(Fe, me(a.property).$ref), ye("innerInputLabel", !0), ye("omitInputLabels", !0);
|
|
1425
1425
|
const p = J(a.modelValue), o = J({
|
|
1426
1426
|
data: [],
|
|
1427
1427
|
pagination: {}
|
|
1428
1428
|
}), _ = Q(() => o.value.data), $ = Q(() => o.value.pagination), b = J(0), S = J(h[0]), T = J(!1), P = J({}), B = () => {
|
|
1429
1429
|
const M = {};
|
|
1430
1430
|
if (v) {
|
|
1431
|
-
const
|
|
1432
|
-
M[
|
|
1431
|
+
const F = e(v);
|
|
1432
|
+
M[F] = c;
|
|
1433
1433
|
}
|
|
1434
1434
|
return t.constraints ? Gt(t.constraints, M) : {};
|
|
1435
1435
|
}, z = () => {
|
|
1436
1436
|
_.value.length < $.value.recordsTotal && (b.value += 1, w());
|
|
1437
1437
|
}, Y = async () => {
|
|
1438
|
-
if (Object.values(P.value).every((
|
|
1438
|
+
if (Object.values(P.value).every((F) => !(String(F).length > 0)))
|
|
1439
1439
|
return u.$actions.custom("getAll", {
|
|
1440
|
-
limit:
|
|
1441
|
-
offset: b.value *
|
|
1440
|
+
limit: Ue,
|
|
1441
|
+
offset: b.value * Ue,
|
|
1442
1442
|
filters: B()
|
|
1443
1443
|
});
|
|
1444
|
-
const M = h.filter((
|
|
1444
|
+
const M = h.filter((F) => {
|
|
1445
1445
|
var m;
|
|
1446
|
-
return ((m = P.value[
|
|
1447
|
-
}).map((
|
|
1448
|
-
[
|
|
1449
|
-
$regex: P.value[
|
|
1446
|
+
return ((m = P.value[F]) == null ? void 0 : m.length) > 0;
|
|
1447
|
+
}).map((F) => ({
|
|
1448
|
+
[F]: {
|
|
1449
|
+
$regex: P.value[F].trim().replace("(", "\\(").replace(")", "\\)"),
|
|
1450
1450
|
$options: "i"
|
|
1451
1451
|
}
|
|
1452
1452
|
}));
|
|
1453
1453
|
return u.$actions.custom("getAll", {
|
|
1454
|
-
limit:
|
|
1455
|
-
offset: b.value *
|
|
1454
|
+
limit: Ue,
|
|
1455
|
+
offset: b.value * Ue,
|
|
1456
1456
|
filters: {
|
|
1457
1457
|
...B(),
|
|
1458
1458
|
...M.length > 0 && {
|
|
@@ -1463,7 +1463,7 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1463
1463
|
}, w = async () => {
|
|
1464
1464
|
if (u.loading.getAll)
|
|
1465
1465
|
return;
|
|
1466
|
-
const { error: M, result:
|
|
1466
|
+
const { error: M, result: F } = await Y();
|
|
1467
1467
|
if (M) {
|
|
1468
1468
|
ie("meta").$actions.spawnToast({
|
|
1469
1469
|
text: "Request failed",
|
|
@@ -1471,7 +1471,7 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1471
1471
|
});
|
|
1472
1472
|
return;
|
|
1473
1473
|
}
|
|
1474
|
-
o.value.pagination =
|
|
1474
|
+
o.value.pagination = F.pagination, b.value === 0 && o.value.data.splice(0), o.value.data.push(...F.data);
|
|
1475
1475
|
}, [te] = kt({
|
|
1476
1476
|
delay: 800
|
|
1477
1477
|
})(() => {
|
|
@@ -1483,8 +1483,8 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1483
1483
|
}, ae = () => {
|
|
1484
1484
|
b.value = 0, o.value.data.splice(0), "effect" in l ? s("update:panel", !1) : l.value = !1;
|
|
1485
1485
|
}, le = Q(() => !Object.values(P.value).some((M) => !!M));
|
|
1486
|
-
ue(le, (M,
|
|
1487
|
-
M && !
|
|
1486
|
+
ue(le, (M, F) => {
|
|
1487
|
+
M && !F && w();
|
|
1488
1488
|
}), $t(() => {
|
|
1489
1489
|
a.selectOnly && w();
|
|
1490
1490
|
});
|
|
@@ -1493,17 +1493,17 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1493
1493
|
}, se = () => {
|
|
1494
1494
|
ae(), s("update:modelValue", p.value);
|
|
1495
1495
|
};
|
|
1496
|
-
return (M,
|
|
1496
|
+
return (M, F) => {
|
|
1497
1497
|
const m = oe("clickable");
|
|
1498
1498
|
return n(), i("div", null, [
|
|
1499
|
-
e(l) ? (n(), g(
|
|
1499
|
+
e(l) ? (n(), g(Je, {
|
|
1500
1500
|
key: 0,
|
|
1501
1501
|
to: "main"
|
|
1502
1502
|
}, [
|
|
1503
|
-
|
|
1503
|
+
R(Be, {
|
|
1504
1504
|
float: "",
|
|
1505
1505
|
"close-hint": "",
|
|
1506
|
-
title: `${e(
|
|
1506
|
+
title: `${e(L)("action.select", { capitalize: !0 })} ${e(L)(M.propertyName)}`,
|
|
1507
1507
|
"overlay-layer": 65,
|
|
1508
1508
|
"model-value": e(l),
|
|
1509
1509
|
style: { "--panel-max-width": "36rem" },
|
|
@@ -1511,12 +1511,12 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1511
1511
|
onOverlayClick: ae
|
|
1512
1512
|
}, {
|
|
1513
1513
|
footer: f(() => [
|
|
1514
|
-
|
|
1514
|
+
R(re, {
|
|
1515
1515
|
large: "",
|
|
1516
1516
|
onClick: se
|
|
1517
1517
|
}, {
|
|
1518
1518
|
default: f(() => [
|
|
1519
|
-
W(k(e(
|
|
1519
|
+
W(k(e(L)("action.save", { capitalize: !0 })), 1)
|
|
1520
1520
|
]),
|
|
1521
1521
|
_: 1
|
|
1522
1522
|
})
|
|
@@ -1526,17 +1526,17 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1526
1526
|
return [
|
|
1527
1527
|
V("div", Bo, [
|
|
1528
1528
|
V("div", wo, [
|
|
1529
|
-
e(h).length > 1 ? (n(), g(
|
|
1529
|
+
e(h).length > 1 ? (n(), g(Ge, {
|
|
1530
1530
|
key: 0,
|
|
1531
1531
|
modelValue: S.value,
|
|
1532
|
-
"onUpdate:modelValue":
|
|
1533
|
-
onChange:
|
|
1532
|
+
"onUpdate:modelValue": F[0] || (F[0] = (O) => S.value = O),
|
|
1533
|
+
onChange: F[1] || (F[1] = (O) => P.value = {})
|
|
1534
1534
|
}, {
|
|
1535
1535
|
default: f(() => [
|
|
1536
1536
|
(n(!0), i(N, null, D(e(h), (O) => (n(), i("option", {
|
|
1537
1537
|
key: `searchfield-${O}`,
|
|
1538
1538
|
value: O
|
|
1539
|
-
}, k(e(
|
|
1539
|
+
}, k(e(L)(O)), 9, So))), 128))
|
|
1540
1540
|
]),
|
|
1541
1541
|
_: 1
|
|
1542
1542
|
}, 8, ["modelValue"])) : y("", !0),
|
|
@@ -1544,7 +1544,7 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1544
1544
|
(n(), g(Oe, {
|
|
1545
1545
|
key: `field-${S.value}`,
|
|
1546
1546
|
modelValue: P.value[S.value],
|
|
1547
|
-
"onUpdate:modelValue":
|
|
1547
|
+
"onUpdate:modelValue": F[2] || (F[2] = (O) => P.value[S.value] = O),
|
|
1548
1548
|
property: {
|
|
1549
1549
|
...e(u).properties[S.value],
|
|
1550
1550
|
inputType: "search"
|
|
@@ -1559,34 +1559,34 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1559
1559
|
onEndReached: z
|
|
1560
1560
|
}, {
|
|
1561
1561
|
default: f(() => [
|
|
1562
|
-
(n(!0), i(N, null, D(_.value, (O) => (n(), g(
|
|
1562
|
+
(n(!0), i(N, null, D(_.value, (O) => (n(), g(Xe, H({ ref_for: !0 }, {
|
|
1563
1563
|
item: O,
|
|
1564
1564
|
indexes: e(h),
|
|
1565
1565
|
property: M.property
|
|
1566
1566
|
}, {
|
|
1567
1567
|
key: `matching-${O._id}`,
|
|
1568
1568
|
modelValue: p.value,
|
|
1569
|
-
"onUpdate:modelValue":
|
|
1569
|
+
"onUpdate:modelValue": F[3] || (F[3] = (A) => p.value = A)
|
|
1570
1570
|
}), null, 16, ["modelValue"]))), 128))
|
|
1571
1571
|
]),
|
|
1572
1572
|
_: 1
|
|
1573
1573
|
})) : (n(), i("div", To, [
|
|
1574
|
-
T.value ? (n(), i("div",
|
|
1574
|
+
T.value ? (n(), i("div", Ro, k(e(L)("searching", { capitalize: !0 })) + "... ", 1)) : !e(u).loading.getAll && Object.values(P.value).filter((O) => !!O).length > 0 && !("items" in M.property && ((E = M.modelValue) != null && E.length) || !Array.isArray(M.modelValue) && ((G = M.modelValue) != null && G._id)) ? (n(), i("div", Lo, k(e(L)("no_results", { capitalize: !0 })), 1)) : y("", !0)
|
|
1575
1575
|
]))
|
|
1576
1576
|
]),
|
|
1577
|
-
V("div", zo, k(e(
|
|
1577
|
+
V("div", zo, k(e(L)("showing", { capitalize: !0 })) + " " + k(_.value.length) + " " + k(e(L)("of")) + " " + k($.value.recordsTotal), 1)
|
|
1578
1578
|
];
|
|
1579
1579
|
}),
|
|
1580
1580
|
_: 1
|
|
1581
1581
|
}, 8, ["title", "model-value"])
|
|
1582
1582
|
])) : y("", !0),
|
|
1583
1583
|
M.selectOnly ? y("", !0) : (n(), i("div", Mo, [
|
|
1584
|
-
|
|
1584
|
+
R(mt, null, ce({
|
|
1585
1585
|
default: f(() => {
|
|
1586
1586
|
var E;
|
|
1587
1587
|
return [
|
|
1588
|
-
"items" in M.property ? (n(), i("div",
|
|
1589
|
-
(n(!0), i(N, null, D(M.modelValue, (G) => (n(), g(
|
|
1588
|
+
"items" in M.property ? (n(), i("div", qo, [
|
|
1589
|
+
(n(!0), i(N, null, D(M.modelValue, (G) => (n(), g(Xe, H({ ref_for: !0 }, {
|
|
1590
1590
|
item: G,
|
|
1591
1591
|
indexes: e(h),
|
|
1592
1592
|
property: M.property,
|
|
@@ -1596,7 +1596,7 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1596
1596
|
key: `selected-${G._id}`,
|
|
1597
1597
|
"onUpdate:modelValue": ne
|
|
1598
1598
|
}), null, 16))), 128))
|
|
1599
|
-
])) : (E = M.modelValue) != null && E._id ? (n(), g(
|
|
1599
|
+
])) : (E = M.modelValue) != null && E._id ? (n(), g(Xe, H({ key: 1 }, {
|
|
1600
1600
|
item: M.modelValue,
|
|
1601
1601
|
indexes: e(h),
|
|
1602
1602
|
property: e(t),
|
|
@@ -1615,7 +1615,7 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1615
1615
|
onClick: j
|
|
1616
1616
|
}, {
|
|
1617
1617
|
default: f(() => [
|
|
1618
|
-
W(k(e(
|
|
1618
|
+
W(k(e(L)("action.select", { capitalize: !0 })), 1)
|
|
1619
1619
|
]),
|
|
1620
1620
|
_: 1
|
|
1621
1621
|
})), [
|
|
@@ -1630,15 +1630,15 @@ const Ke = /* @__PURE__ */ X(Ao, [["__scopeId", "data-v-5e6ec702"]]), Bo = { cla
|
|
|
1630
1630
|
};
|
|
1631
1631
|
}
|
|
1632
1632
|
});
|
|
1633
|
-
const Uo = /* @__PURE__ */ X(
|
|
1634
|
-
const a = "items" in
|
|
1633
|
+
const Uo = /* @__PURE__ */ X(Fo, [["__scopeId", "data-v-49af6338"]]), ft = (d, r) => {
|
|
1634
|
+
const a = "items" in d ? d.items : d, t = {
|
|
1635
1635
|
options: Jn,
|
|
1636
|
-
select:
|
|
1636
|
+
select: Ge,
|
|
1637
1637
|
switch: no,
|
|
1638
1638
|
file: ko,
|
|
1639
1639
|
search: Uo,
|
|
1640
1640
|
input: Oe,
|
|
1641
|
-
form:
|
|
1641
|
+
form: We
|
|
1642
1642
|
}, l = (() => {
|
|
1643
1643
|
if ("type" in a) {
|
|
1644
1644
|
if (a.type === "object")
|
|
@@ -1646,26 +1646,26 @@ const Uo = /* @__PURE__ */ X(qo, [["__scopeId", "data-v-49af6338"]]), ft = (c, r
|
|
|
1646
1646
|
if (a.type === "boolean")
|
|
1647
1647
|
return "switch";
|
|
1648
1648
|
}
|
|
1649
|
-
if ("element" in
|
|
1650
|
-
if (
|
|
1649
|
+
if ("element" in d) {
|
|
1650
|
+
if (d.element === "checkbox" || d.element === "radio")
|
|
1651
1651
|
return "options";
|
|
1652
|
-
if (
|
|
1652
|
+
if (d.element === "select")
|
|
1653
1653
|
return "select";
|
|
1654
1654
|
}
|
|
1655
|
-
const s =
|
|
1656
|
-
return s ? s.inline ? "form" : s.$ref === "file" ? "file" : "search" : "items" in
|
|
1655
|
+
const s = me(d);
|
|
1656
|
+
return s ? s.inline ? "form" : s.$ref === "file" ? "file" : "search" : "items" in d && d.uniqueItems ? "options" : "enum" in a ? "select" : "input";
|
|
1657
1657
|
})();
|
|
1658
1658
|
return r[l] ? r[l] : t[l];
|
|
1659
|
-
}, Eo = (
|
|
1660
|
-
|
|
1659
|
+
}, Eo = (d, r, a) => {
|
|
1660
|
+
d ?? (d = []);
|
|
1661
1661
|
const t = "items" in r ? r.items : r;
|
|
1662
1662
|
if ("$ref" in t) {
|
|
1663
1663
|
const l = ie(t.$ref, a), s = ke(l.$freshItem);
|
|
1664
|
-
return
|
|
1664
|
+
return d.push(s);
|
|
1665
1665
|
}
|
|
1666
|
-
return "properties" in t ?
|
|
1667
|
-
}, Do = (
|
|
1668
|
-
|
|
1666
|
+
return "properties" in t ? d.push(Wt(t)) : "type" in t && t.type === "boolean" ? d.push({}) : d.push(null);
|
|
1667
|
+
}, Do = (d, r) => {
|
|
1668
|
+
d.splice(r, 1);
|
|
1669
1669
|
}, Ho = {
|
|
1670
1670
|
key: 0,
|
|
1671
1671
|
class: "form__header"
|
|
@@ -1703,20 +1703,20 @@ const Uo = /* @__PURE__ */ X(qo, [["__scopeId", "data-v-49af6338"]]), ft = (c, r
|
|
|
1703
1703
|
focus: { type: Boolean }
|
|
1704
1704
|
},
|
|
1705
1705
|
emits: ["update:modelValue", "input", "change"],
|
|
1706
|
-
setup(
|
|
1707
|
-
var
|
|
1708
|
-
const a =
|
|
1706
|
+
setup(d, { emit: r }) {
|
|
1707
|
+
var F;
|
|
1708
|
+
const a = Pe(), t = d, l = r;
|
|
1709
1709
|
bt(() => {
|
|
1710
1710
|
t.modelValue || l("update:modelValue", t.property && "items" in t.property ? [] : {});
|
|
1711
1711
|
});
|
|
1712
|
-
const s = t.property &&
|
|
1712
|
+
const s = t.property && me(t.property), u = s ? s.$ref : t.collection || qe(), v = t.readOnly || ((F = t.property) == null ? void 0 : F.readOnly), c = u ? ie(e(u)) : null;
|
|
1713
1713
|
!u && process.env.NODE_ENV !== "production" && console.warn(`aeria-form was used without providing storeId or specifying
|
|
1714
1714
|
collection prop, some features may not work as intended`);
|
|
1715
|
-
const h = J(!1), p = Q(() => !t.form && t.property ? "properties" in t.property ? t.property.properties :
|
|
1716
|
-
const E =
|
|
1715
|
+
const h = J(!1), p = Q(() => !t.form && t.property ? "properties" in t.property ? t.property.properties : c == null ? void 0 : c.properties : t.form), o = Q(() => t.layout || (c == null ? void 0 : c.description.formLayout)), _ = (m) => {
|
|
1716
|
+
const E = _e(m, t[m]);
|
|
1717
1717
|
return t[m] && ye(m, t[m]), E;
|
|
1718
|
-
}, $ = Q(() => t.validationErrors !== null ? t.validationErrors :
|
|
1719
|
-
u && ye(
|
|
1718
|
+
}, $ = Q(() => t.validationErrors !== null ? t.validationErrors : c == null ? void 0 : c.validationErrors), b = _("formComponents") || {}, S = _("propertyComponents") || {}, T = _("omitFormHeader"), P = _("omitInputLabels"), B = _("innerInputLabel");
|
|
1719
|
+
u && ye(Fe, u), ye("searchOnly", t.searchOnly);
|
|
1720
1720
|
const z = (m) => p.value ? Object.entries(p.value).filter(([E, G]) => !G.noForm && m([
|
|
1721
1721
|
E,
|
|
1722
1722
|
G
|
|
@@ -1724,19 +1724,19 @@ const Uo = /* @__PURE__ */ X(qo, [["__scopeId", "data-v-49af6338"]]), ft = (c, r
|
|
|
1724
1724
|
var G;
|
|
1725
1725
|
if (t.searchOnly || !u)
|
|
1726
1726
|
return !0;
|
|
1727
|
-
const E = t.property && "properties" in t.property ? t.property.form : (G =
|
|
1727
|
+
const E = t.property && "properties" in t.property ? t.property.form : (G = c == null ? void 0 : c.description) == null ? void 0 : G.form;
|
|
1728
1728
|
return !E || E.includes(m);
|
|
1729
|
-
}, w = z(([m]) => Y(m)), te =
|
|
1730
|
-
var
|
|
1731
|
-
const G = [], O = ((
|
|
1729
|
+
}, w = z(([m]) => Y(m)), te = Me(), C = {}, j = (m, E) => {
|
|
1730
|
+
var q, fe, we, Se;
|
|
1731
|
+
const G = [], O = ((fe = (q = o.value) == null ? void 0 : q.fields) == null ? void 0 : fe[m]) || ((Se = (we = o.value) == null ? void 0 : we.fields) == null ? void 0 : Se.$default);
|
|
1732
1732
|
if (!E)
|
|
1733
1733
|
return;
|
|
1734
1734
|
if (O != null && O.if && !t.searchOnly) {
|
|
1735
|
-
const je =
|
|
1735
|
+
const je = Ye(
|
|
1736
1736
|
t.modelValue,
|
|
1737
1737
|
O.if
|
|
1738
1738
|
);
|
|
1739
|
-
je.satisfied || (C[m] && (
|
|
1739
|
+
je.satisfied || (C[m] && (c ? t.modelValue[m] = typeof c.$freshItem[m] == "object" ? ke(c.$freshItem[m]) : c.$freshItem[m] : t.modelValue[m] = [
|
|
1740
1740
|
void 0,
|
|
1741
1741
|
null
|
|
1742
1742
|
].includes(t.modelValue[m]) ? null : t.modelValue[m].constructor()), G.push("display: none;")), C[m] = je.satisfied;
|
|
@@ -1754,11 +1754,11 @@ const Uo = /* @__PURE__ */ X(qo, [["__scopeId", "data-v-49af6338"]]), ft = (c, r
|
|
|
1754
1754
|
padding: 1rem 0;
|
|
1755
1755
|
margin: 1rem 0;
|
|
1756
1756
|
`)), G.join("");
|
|
1757
|
-
}, ae = (m) => m === null || m instanceof Object && !Object.keys(m).length, le = Q(() => t.required ? t.required : t.property && "required" in t.property ? t.property.required :
|
|
1757
|
+
}, ae = (m) => m === null || m instanceof Object && !Object.keys(m).length, le = Q(() => t.required ? t.required : t.property && "required" in t.property ? t.property.required : c == null ? void 0 : c.description.required), ne = Q(() => t.form ? Ft(
|
|
1758
1758
|
t.modelValue,
|
|
1759
1759
|
t.form,
|
|
1760
1760
|
le.value,
|
|
1761
|
-
|
|
1761
|
+
c == null ? void 0 : c.description
|
|
1762
1762
|
) : !0), se = (m, E) => {
|
|
1763
1763
|
var G;
|
|
1764
1764
|
return (G = $.value) != null && G[m] && (typeof $.value[m].index != "number" || $.value[m].index === E) ? $.value[m].errors : null;
|
|
@@ -1777,71 +1777,71 @@ const Uo = /* @__PURE__ */ X(qo, [["__scopeId", "data-v-49af6338"]]), ft = (c, r
|
|
|
1777
1777
|
])) : y("", !0),
|
|
1778
1778
|
I(m.$slots, "default", {}, void 0, !0),
|
|
1779
1779
|
V("fieldset", Qo, [
|
|
1780
|
-
(n(!0), i(N, null, D(e(w), ([A,
|
|
1781
|
-
var
|
|
1780
|
+
(n(!0), i(N, null, D(e(w), ([A, q]) => {
|
|
1781
|
+
var fe, we, Se, je, Ne, xe, et, tt, nt, ot, at, lt, st;
|
|
1782
1782
|
return n(), i("div", {
|
|
1783
1783
|
key: `field-${A}`,
|
|
1784
|
-
style: $e(j(A,
|
|
1784
|
+
style: $e(j(A, q)),
|
|
1785
1785
|
class: "form__field"
|
|
1786
1786
|
}, [
|
|
1787
|
-
(!("type" in
|
|
1787
|
+
(!("type" in q) || q.type !== "boolean" || m.searchOnly) && !q.noLabel && !e(P) && !e(B) ? (n(), i("label", Go, [
|
|
1788
1788
|
V("div", {
|
|
1789
1789
|
class: K({
|
|
1790
1790
|
"form__field-label": !0,
|
|
1791
|
-
"form__field-label--section": "items" in
|
|
1791
|
+
"form__field-label--section": "items" in q ? "properties" in q.items : "properties" in q,
|
|
1792
1792
|
"form__field-required-hint": m.highlightRequired && !e(v) && !m.searchOnly && (!le.value || e(Kt)(A, le.value, m.modelValue))
|
|
1793
1793
|
})
|
|
1794
|
-
}, k(
|
|
1795
|
-
|
|
1794
|
+
}, k(q.description || e(L)(A)), 3),
|
|
1795
|
+
q.hint ? (n(), i("div", {
|
|
1796
1796
|
key: 0,
|
|
1797
|
-
innerHTML:
|
|
1797
|
+
innerHTML: q.hint
|
|
1798
1798
|
}, null, 8, Wo)) : y("", !0)
|
|
1799
1799
|
])) : y("", !0),
|
|
1800
1800
|
m.$slots[`field-${A}`] ? I(m.$slots, `field-${A}`, H({
|
|
1801
1801
|
key: 1,
|
|
1802
1802
|
ref_for: !0
|
|
1803
1803
|
}, {
|
|
1804
|
-
propery:
|
|
1804
|
+
propery: q,
|
|
1805
1805
|
properyName: A,
|
|
1806
1806
|
modelValue: m.modelValue
|
|
1807
|
-
}), void 0, !0) : (Se = (we = (
|
|
1807
|
+
}), void 0, !0) : (Se = (we = (fe = m.layout) == null ? void 0 : fe.fields) == null ? void 0 : we[A]) != null && Se.component && e(S)[m.layout.fields[A].component.name] ? (n(), g(he(e(S)[m.layout.fields[A].component.name]), H({
|
|
1808
1808
|
key: 2,
|
|
1809
1809
|
modelValue: m.modelValue[A],
|
|
1810
1810
|
"onUpdate:modelValue": (ee) => m.modelValue[A] = ee,
|
|
1811
1811
|
ref_for: !0
|
|
1812
1812
|
}, {
|
|
1813
1813
|
readOnly: e(v),
|
|
1814
|
-
property:
|
|
1814
|
+
property: q,
|
|
1815
1815
|
propertyName: A,
|
|
1816
1816
|
...m.layout.fields[A].component.props || {}
|
|
1817
1817
|
}, {
|
|
1818
1818
|
onInput: (ee) => l("input", A),
|
|
1819
1819
|
onChange: E[0] || (E[0] = (ee) => l("change", ee))
|
|
1820
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in
|
|
1820
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in q && ["date", "date-time"].includes(q.format) && m.searchOnly ? (n(), i("div", {
|
|
1821
1821
|
key: 3,
|
|
1822
1822
|
style: { display: "grid", "grid-template-columns": "repeat(2, 1fr)", "column-gap": "1rem" },
|
|
1823
1823
|
onInput: (ee) => l("input", A),
|
|
1824
1824
|
onChange: E[1] || (E[1] = (ee) => l("change", ee))
|
|
1825
1825
|
}, [
|
|
1826
|
-
|
|
1826
|
+
R(Oe, H({
|
|
1827
1827
|
modelValue: m.modelValue[A].$gte,
|
|
1828
1828
|
"onUpdate:modelValue": (ee) => m.modelValue[A].$gte = ee,
|
|
1829
1829
|
ref_for: !0
|
|
1830
1830
|
}, {
|
|
1831
|
-
property:
|
|
1831
|
+
property: q,
|
|
1832
1832
|
propertyName: A
|
|
1833
1833
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]),
|
|
1834
|
-
|
|
1834
|
+
R(Oe, H({
|
|
1835
1835
|
modelValue: m.modelValue[A].$lte,
|
|
1836
1836
|
"onUpdate:modelValue": (ee) => m.modelValue[A].$lte = ee,
|
|
1837
1837
|
ref_for: !0
|
|
1838
1838
|
}, {
|
|
1839
|
-
property:
|
|
1839
|
+
property: q,
|
|
1840
1840
|
propertyName: A
|
|
1841
1841
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
1842
|
-
], 40, Ko)) : "type" in
|
|
1843
|
-
|
|
1844
|
-
property:
|
|
1842
|
+
], 40, Ko)) : "type" in q && q.type === "boolean" && m.searchOnly ? (n(), i("div", Xo, [
|
|
1843
|
+
R(Ge, H({ ref_for: !0 }, {
|
|
1844
|
+
property: q,
|
|
1845
1845
|
propertyName: A
|
|
1846
1846
|
}, {
|
|
1847
1847
|
"boolean-ref": "",
|
|
@@ -1852,77 +1852,77 @@ const Uo = /* @__PURE__ */ X(qo, [["__scopeId", "data-v-49af6338"]]), ft = (c, r
|
|
|
1852
1852
|
}
|
|
1853
1853
|
}), {
|
|
1854
1854
|
default: f(() => [
|
|
1855
|
-
V("option", Yo, k(e(
|
|
1856
|
-
V("option", Jo, k(e(
|
|
1855
|
+
V("option", Yo, k(e(L)("yes")), 1),
|
|
1856
|
+
V("option", Jo, k(e(L)("no")), 1)
|
|
1857
1857
|
]),
|
|
1858
1858
|
_: 2
|
|
1859
1859
|
}, 1040, ["model-value", "onUpdate:modelValue"])
|
|
1860
|
-
])) : m.modelValue && "items" in
|
|
1860
|
+
])) : m.modelValue && "items" in q && !q.uniqueItems && (!("$ref" in q.items) || q.items.inline || q.items.$ref === "file") ? (n(), i("div", Zo, [
|
|
1861
1861
|
V("div", null, [
|
|
1862
|
-
|
|
1862
|
+
R(re, {
|
|
1863
1863
|
small: "",
|
|
1864
1864
|
variant: "alt",
|
|
1865
1865
|
icon: "plus",
|
|
1866
|
-
disabled: !("inline" in
|
|
1867
|
-
onClick:
|
|
1868
|
-
m.modelValue[A] || (m.modelValue[A] = []), e(Eo)(m.modelValue[A],
|
|
1866
|
+
disabled: !("inline" in q.items && q.items.inline) && (((je = m.modelValue[A]) == null ? void 0 : je.length) >= q.maxItems || ae((xe = m.modelValue[A]) == null ? void 0 : xe[((Ne = m.modelValue[A]) == null ? void 0 : Ne.length) - 1])),
|
|
1867
|
+
onClick: Ee((ee) => {
|
|
1868
|
+
m.modelValue[A] || (m.modelValue[A] = []), e(Eo)(m.modelValue[A], q, e(a));
|
|
1869
1869
|
}, ["prevent"])
|
|
1870
1870
|
}, {
|
|
1871
1871
|
default: f(() => [
|
|
1872
|
-
W(k(e(
|
|
1872
|
+
W(k(e(L)("action.add", { capitalize: !0 })), 1)
|
|
1873
1873
|
]),
|
|
1874
1874
|
_: 2
|
|
1875
1875
|
}, 1032, ["disabled", "onClick"])
|
|
1876
1876
|
]),
|
|
1877
1877
|
V("div", Po, [
|
|
1878
1878
|
(n(!0), i(N, null, D(m.modelValue[A], (ee, Te) => {
|
|
1879
|
-
var
|
|
1879
|
+
var it, rt, ut, ct, dt, pt;
|
|
1880
1880
|
return n(), i("div", {
|
|
1881
1881
|
key: `rep-${A}-${e(Ut)(ee, Te)}`,
|
|
1882
1882
|
class: "form__array-item"
|
|
1883
1883
|
}, [
|
|
1884
1884
|
V("div", No, [
|
|
1885
|
-
(n(), g(he(e(ft)(
|
|
1885
|
+
(n(), g(he(e(ft)(q, e(b))), H({
|
|
1886
1886
|
modelValue: m.modelValue[A][Te],
|
|
1887
|
-
"onUpdate:modelValue": (
|
|
1887
|
+
"onUpdate:modelValue": (Re) => m.modelValue[A][Te] = Re,
|
|
1888
1888
|
ref_for: !0
|
|
1889
1889
|
}, {
|
|
1890
1890
|
readOnly: e(v),
|
|
1891
|
-
property:
|
|
1891
|
+
property: q.items,
|
|
1892
1892
|
propertyName: A,
|
|
1893
1893
|
parentCollection: e(u),
|
|
1894
1894
|
parentPropertyName: m.parentPropertyName,
|
|
1895
|
-
columns: ((
|
|
1895
|
+
columns: ((ut = (rt = (it = m.layout) == null ? void 0 : it.fields) == null ? void 0 : rt[A]) == null ? void 0 : ut.optionsColumns) || ((pt = (dt = (ct = m.layout) == null ? void 0 : ct.fields) == null ? void 0 : dt.$default) == null ? void 0 : pt.optionsColumns),
|
|
1896
1896
|
validationErrors: se(A, Te),
|
|
1897
|
-
...
|
|
1897
|
+
...q.componentProps || {}
|
|
1898
1898
|
}, {
|
|
1899
|
-
onInput: (
|
|
1900
|
-
onChange: E[3] || (E[3] = (
|
|
1899
|
+
onInput: (Re) => l("input", A),
|
|
1900
|
+
onChange: E[3] || (E[3] = (Re) => l("change", Re))
|
|
1901
1901
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"]))
|
|
1902
1902
|
]),
|
|
1903
|
-
x(
|
|
1903
|
+
x(R(Z, {
|
|
1904
1904
|
reactive: "",
|
|
1905
1905
|
icon: "trash",
|
|
1906
|
-
onClick: (
|
|
1906
|
+
onClick: (Re) => e(Do)(m.modelValue[A], Te)
|
|
1907
1907
|
}, null, 8, ["onClick"]), [
|
|
1908
1908
|
[G]
|
|
1909
1909
|
])
|
|
1910
1910
|
]);
|
|
1911
1911
|
}), 128))
|
|
1912
1912
|
])
|
|
1913
|
-
])) : m.modelValue ? x((n(), g(he(e(ft)(
|
|
1913
|
+
])) : m.modelValue ? x((n(), g(he(e(ft)(q, e(b))), H({
|
|
1914
1914
|
key: 6,
|
|
1915
1915
|
modelValue: m.modelValue[A],
|
|
1916
1916
|
"onUpdate:modelValue": (ee) => m.modelValue[A] = ee,
|
|
1917
1917
|
ref_for: !0
|
|
1918
1918
|
}, {
|
|
1919
1919
|
readOnly: e(v),
|
|
1920
|
-
property:
|
|
1920
|
+
property: q,
|
|
1921
1921
|
propertyName: A,
|
|
1922
1922
|
parentPropertyName: m.parentPropertyName,
|
|
1923
1923
|
parentCollection: e(u),
|
|
1924
|
-
columns: ((
|
|
1925
|
-
...
|
|
1924
|
+
columns: ((nt = (tt = (et = m.layout) == null ? void 0 : et.fields) == null ? void 0 : tt[A]) == null ? void 0 : nt.optionsColumns) || ((lt = (at = (ot = m.layout) == null ? void 0 : ot.fields) == null ? void 0 : at.$default) == null ? void 0 : lt.optionsColumns),
|
|
1925
|
+
...q.componentProps || {},
|
|
1926
1926
|
validationErrors: se(A)
|
|
1927
1927
|
}, {
|
|
1928
1928
|
onInput: (ee) => l("input", A),
|
|
@@ -1930,9 +1930,9 @@ const Uo = /* @__PURE__ */ X(qo, [["__scopeId", "data-v-49af6338"]]), ft = (c, r
|
|
|
1930
1930
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])), [
|
|
1931
1931
|
[O, M()]
|
|
1932
1932
|
]) : y("", !0),
|
|
1933
|
-
(
|
|
1934
|
-
$.value[A].type ? (n(), i("span", ea, k(e(
|
|
1935
|
-
$.value[A].detail ? (n(), i("span", ta, k(e(
|
|
1933
|
+
(st = $.value) != null && st[A] ? (n(), i("div", xo, [
|
|
1934
|
+
$.value[A].type ? (n(), i("span", ea, k(e(L)(`validation_error.${$.value[A].type}`)), 1)) : y("", !0),
|
|
1935
|
+
$.value[A].detail ? (n(), i("span", ta, k(e(L)($.value[A].detail)), 1)) : y("", !0)
|
|
1936
1936
|
])) : y("", !0)
|
|
1937
1937
|
], 4);
|
|
1938
1938
|
}), 128))
|
|
@@ -1947,33 +1947,39 @@ const Uo = /* @__PURE__ */ X(qo, [["__scopeId", "data-v-49af6338"]]), ft = (c, r
|
|
|
1947
1947
|
};
|
|
1948
1948
|
}
|
|
1949
1949
|
});
|
|
1950
|
-
const
|
|
1950
|
+
const We = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @__PURE__ */ U({
|
|
1951
1951
|
__name: "aeria-filter-panel",
|
|
1952
1952
|
emits: ["update:modelValue"],
|
|
1953
|
-
setup(
|
|
1954
|
-
const a = r, t = Ie(), l = Ae(), s = () => {
|
|
1955
|
-
t.pagination.offset = 0, t.$actions.filter(), a("update:modelValue", !1)
|
|
1953
|
+
setup(d, { emit: r }) {
|
|
1954
|
+
const a = r, t = Ie(), l = Ae(), s = e(_e(Fe)), u = () => {
|
|
1955
|
+
t.pagination.offset = 0, t.$actions.filter(), a("update:modelValue", !1);
|
|
1956
|
+
const v = Object.assign({
|
|
1957
|
+
query: {}
|
|
1958
|
+
}, l.currentRoute.value);
|
|
1959
|
+
for (const c of Object.keys(v.query))
|
|
1960
|
+
c.startsWith(`${s}.`) && delete v.query[c];
|
|
1961
|
+
l.currentRoute.value.query = {}, l.push(ze(v, {
|
|
1956
1962
|
query: Et(t)
|
|
1957
|
-
});
|
|
1963
|
+
}));
|
|
1958
1964
|
};
|
|
1959
|
-
return (
|
|
1965
|
+
return (v, c) => (n(), g(Be, {
|
|
1960
1966
|
"close-hint": "",
|
|
1961
1967
|
"fixed-right": "",
|
|
1962
|
-
title:
|
|
1963
|
-
onClose:
|
|
1964
|
-
onOverlayClick:
|
|
1968
|
+
title: v.t("filter_by", { capitalize: !0 }),
|
|
1969
|
+
onClose: c[2] || (c[2] = (h) => a("update:modelValue", !1)),
|
|
1970
|
+
onOverlayClick: c[3] || (c[3] = (h) => a("update:modelValue", !1))
|
|
1965
1971
|
}, {
|
|
1966
1972
|
footer: f(() => [
|
|
1967
1973
|
e(t).filtersCount > 0 ? (n(), g(re, {
|
|
1968
1974
|
key: 0,
|
|
1969
1975
|
variant: "transparent",
|
|
1970
|
-
onClick:
|
|
1971
|
-
e(t).$actions.clearFilters(),
|
|
1976
|
+
onClick: c[1] || (c[1] = (h) => {
|
|
1977
|
+
e(t).$actions.clearFilters(), u(), a("update:modelValue", !1);
|
|
1972
1978
|
})
|
|
1973
1979
|
}, {
|
|
1974
1980
|
default: f(() => [
|
|
1975
|
-
W(k(
|
|
1976
|
-
|
|
1981
|
+
W(k(v.t("action.clear", { capitalize: !0 })) + " ", 1),
|
|
1982
|
+
R(be, null, {
|
|
1977
1983
|
default: f(() => [
|
|
1978
1984
|
W(k(e(t).filtersCount), 1)
|
|
1979
1985
|
]),
|
|
@@ -1982,22 +1988,22 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
1982
1988
|
]),
|
|
1983
1989
|
_: 1
|
|
1984
1990
|
})) : y("", !0),
|
|
1985
|
-
|
|
1991
|
+
R(re, {
|
|
1986
1992
|
large: "",
|
|
1987
1993
|
icon: "funnel",
|
|
1988
1994
|
disabled: !e(t).hasActiveFilters,
|
|
1989
|
-
onClick:
|
|
1995
|
+
onClick: u
|
|
1990
1996
|
}, {
|
|
1991
1997
|
default: f(() => [
|
|
1992
|
-
W(k(
|
|
1998
|
+
W(k(v.t("action.filter", { capitalize: !0 })), 1)
|
|
1993
1999
|
]),
|
|
1994
2000
|
_: 1
|
|
1995
2001
|
}, 8, ["disabled"])
|
|
1996
2002
|
]),
|
|
1997
2003
|
default: f(() => [
|
|
1998
|
-
|
|
2004
|
+
R(We, H({
|
|
1999
2005
|
modelValue: e(t).filters,
|
|
2000
|
-
"onUpdate:modelValue":
|
|
2006
|
+
"onUpdate:modelValue": c[0] || (c[0] = (h) => e(t).filters = h)
|
|
2001
2007
|
}, {
|
|
2002
2008
|
searchOnly: !0,
|
|
2003
2009
|
form: e(t).availableFilters,
|
|
@@ -2015,16 +2021,16 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2015
2021
|
readOnly: { type: Boolean }
|
|
2016
2022
|
},
|
|
2017
2023
|
emits: ["update:modelValue", "cancel"],
|
|
2018
|
-
setup(
|
|
2019
|
-
const a =
|
|
2024
|
+
setup(d, { emit: r }) {
|
|
2025
|
+
const a = d, t = r, l = ie("meta"), s = ie(a.collection || l.view.collection), u = _e("individualActions", []), v = async () => {
|
|
2020
2026
|
const { error: p } = await s.$actions.deepInsert();
|
|
2021
2027
|
p || t("update:modelValue", !1);
|
|
2022
|
-
}, { t:
|
|
2028
|
+
}, { t: c } = Lt(), h = () => {
|
|
2023
2029
|
l.$actions.ask({
|
|
2024
2030
|
action: () => {
|
|
2025
2031
|
s.$actions.clearItem(), s.validationErrors = {}, t("cancel");
|
|
2026
2032
|
},
|
|
2027
|
-
body:
|
|
2033
|
+
body: c("prompt.close_panel")
|
|
2028
2034
|
});
|
|
2029
2035
|
};
|
|
2030
2036
|
return ue(() => s.item._id, (p) => {
|
|
@@ -2036,7 +2042,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2036
2042
|
onOverlayClick: h
|
|
2037
2043
|
}, ce({
|
|
2038
2044
|
extra: f(() => [
|
|
2039
|
-
|
|
2045
|
+
R(Ce, H({
|
|
2040
2046
|
subject: e(s).item,
|
|
2041
2047
|
actions: e(u).filter(({ action: $ }) => $ !== "ui:spawnEdit")
|
|
2042
2048
|
}, {
|
|
@@ -2055,7 +2061,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2055
2061
|
}, 16)
|
|
2056
2062
|
]),
|
|
2057
2063
|
default: f(() => [
|
|
2058
|
-
|
|
2064
|
+
R(We, H({
|
|
2059
2065
|
modelValue: e(s).item,
|
|
2060
2066
|
"onUpdate:modelValue": o[0] || (o[0] = ($) => e(s).item = $)
|
|
2061
2067
|
}, {
|
|
@@ -2087,23 +2093,23 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2087
2093
|
p.readOnly ? void 0 : {
|
|
2088
2094
|
name: "footer",
|
|
2089
2095
|
fn: f(() => [
|
|
2090
|
-
|
|
2096
|
+
R(re, {
|
|
2091
2097
|
variant: "transparent",
|
|
2092
2098
|
onClick: h
|
|
2093
2099
|
}, {
|
|
2094
2100
|
default: f(() => [
|
|
2095
|
-
W(k(e(
|
|
2101
|
+
W(k(e(c)("action.cancel", { capitalize: !0 })), 1)
|
|
2096
2102
|
]),
|
|
2097
2103
|
_: 1
|
|
2098
2104
|
}),
|
|
2099
|
-
|
|
2105
|
+
R(re, {
|
|
2100
2106
|
large: "",
|
|
2101
2107
|
disabled: !e(s).isInsertReady || e(s).loading.get,
|
|
2102
2108
|
loading: e(s).loading.insert,
|
|
2103
2109
|
onClick: v
|
|
2104
2110
|
}, {
|
|
2105
2111
|
default: f(() => [
|
|
2106
|
-
W(k(e(
|
|
2112
|
+
W(k(e(c)("action.insert", { capitalize: !0 })), 1)
|
|
2107
2113
|
]),
|
|
2108
2114
|
_: 1
|
|
2109
2115
|
}, 8, ["disabled", "loading"])
|
|
@@ -2113,27 +2119,27 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2113
2119
|
]), 1032, ["loading"]);
|
|
2114
2120
|
};
|
|
2115
2121
|
}
|
|
2116
|
-
}), Ot = (
|
|
2122
|
+
}), Ot = (d, r) => {
|
|
2117
2123
|
if (r) {
|
|
2118
|
-
if (!
|
|
2124
|
+
if (!d) {
|
|
2119
2125
|
r.filtersPreset = {}, r.preferredTableProperties = [], r.pagination.offset = 0;
|
|
2120
2126
|
return;
|
|
2121
2127
|
}
|
|
2122
|
-
r.filtersPreset =
|
|
2128
|
+
r.filtersPreset = d.filters || {}, r.preferredTableProperties = d.table ? Array.from(d.table) : [], r.pagination.offset = 0;
|
|
2123
2129
|
}
|
|
2124
|
-
}, sa = (
|
|
2130
|
+
}, sa = (d, r = {
|
|
2125
2131
|
persistInQuery: !0
|
|
2126
2132
|
}) => {
|
|
2127
2133
|
const t = Ae().currentRoute;
|
|
2128
2134
|
return ue(() => t.value.query.section, (l) => {
|
|
2129
|
-
if (
|
|
2130
|
-
if (
|
|
2131
|
-
const s = l || Object.keys(
|
|
2132
|
-
Ot(
|
|
2135
|
+
if (d) {
|
|
2136
|
+
if (d.description.filtersPresets) {
|
|
2137
|
+
const s = l || Object.keys(d.description.filtersPresets)[0];
|
|
2138
|
+
Ot(d.description.filtersPresets[s], d);
|
|
2133
2139
|
}
|
|
2134
2140
|
if (r.persistInQuery) {
|
|
2135
2141
|
const s = t.value.query;
|
|
2136
|
-
s.offset && (
|
|
2142
|
+
s.offset && (d.pagination.offset = +s.offset), s.limit && (d.pagination.limit = +s.limit), s.search && (d.textQuery = s.search, d.filters.$text = {
|
|
2137
2143
|
$search: `"${s.search}"`,
|
|
2138
2144
|
$caseSensitive: !1
|
|
2139
2145
|
});
|
|
@@ -2142,7 +2148,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2142
2148
|
}, {
|
|
2143
2149
|
immediate: !0
|
|
2144
2150
|
});
|
|
2145
|
-
}, ia = (
|
|
2151
|
+
}, ia = (d) => (He("data-v-2a6c7067"), d = d(), Qe(), d), ra = {
|
|
2146
2152
|
key: 0,
|
|
2147
2153
|
class: "table aeria-surface"
|
|
2148
2154
|
}, ua = { key: 0 }, ca = { key: 1 }, da = { key: 0 }, pa = ["checked"], _a = {
|
|
@@ -2154,16 +2160,16 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2154
2160
|
}, ga = {
|
|
2155
2161
|
key: 1,
|
|
2156
2162
|
class: "table__cell-container"
|
|
2157
|
-
}, ka = { class: "table__cell-grid" }, Va = { key: 0 }, Ca = { key: 1 }, Oa = { key: 0 }, Ia = ["href"], Aa = { key: 3 }, Ba = { key: 1 }, wa = { key: 2 }, Sa = { key: 0 }, ja = { key: 1 }, Ta = { key: 2 },
|
|
2163
|
+
}, ka = { class: "table__cell-grid" }, Va = { key: 0 }, Ca = { key: 1 }, Oa = { key: 0 }, Ia = ["href"], Aa = { key: 3 }, Ba = { key: 1 }, wa = { key: 2 }, Sa = { key: 0 }, ja = { key: 1 }, Ta = { key: 2 }, Ra = {
|
|
2158
2164
|
key: 1,
|
|
2159
2165
|
class: "no-print"
|
|
2160
|
-
},
|
|
2166
|
+
}, La = { class: "table__cell-actions" }, za = {
|
|
2161
2167
|
key: 2,
|
|
2162
2168
|
class: "no-print table__mobile-actions"
|
|
2163
|
-
}, Ma = ["id"],
|
|
2169
|
+
}, Ma = ["id"], qa = { key: 1 }, Fa = /* @__PURE__ */ ia(() => /* @__PURE__ */ V("td", { colspan: 10 }, [
|
|
2164
2170
|
/* @__PURE__ */ V("div", { class: "table__empty" }, " Não foram encontrados resultados. ")
|
|
2165
2171
|
], -1)), Ua = [
|
|
2166
|
-
|
|
2172
|
+
Fa
|
|
2167
2173
|
], Ea = /* @__PURE__ */ U({
|
|
2168
2174
|
__name: "aeria-table",
|
|
2169
2175
|
props: {
|
|
@@ -2175,15 +2181,15 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2175
2181
|
layout: {}
|
|
2176
2182
|
},
|
|
2177
2183
|
emits: ["itemClick"],
|
|
2178
|
-
setup(
|
|
2179
|
-
const a =
|
|
2184
|
+
setup(d, { emit: r }) {
|
|
2185
|
+
const a = d, t = r, l = Me(), s = a.collection || qe(), u = s ? ie(typeof s == "string" ? s : s.value) : null, v = Q({
|
|
2180
2186
|
get: () => u == null ? void 0 : u.selected,
|
|
2181
2187
|
set: (_) => u == null ? void 0 : u.$actions.selectManyItems(_, !0)
|
|
2182
|
-
}),
|
|
2188
|
+
}), c = (_, $) => _ != null && _.button ? typeof _.button == "object" ? Ye($, _.button).satisfied : _.button : !1, h = (_) => {
|
|
2183
2189
|
var $;
|
|
2184
2190
|
return !l.value.xl || !(($ = a.layout) != null && $.actions) || !a.actions ? [] : a.actions.filter((b) => {
|
|
2185
2191
|
const S = a.layout.actions[b.action];
|
|
2186
|
-
return
|
|
2192
|
+
return c(S, _);
|
|
2187
2193
|
});
|
|
2188
2194
|
}, p = (_) => {
|
|
2189
2195
|
var $;
|
|
@@ -2194,12 +2200,12 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2194
2200
|
if (!Vt(b.roles, T.currentUser.roles))
|
|
2195
2201
|
return !1;
|
|
2196
2202
|
}
|
|
2197
|
-
return !
|
|
2203
|
+
return !c(S, _);
|
|
2198
2204
|
}) : [];
|
|
2199
2205
|
}, o = (_, $) => {
|
|
2200
2206
|
var T, P;
|
|
2201
2207
|
const b = [], S = (P = (T = a.layout) == null ? void 0 : T.actions) == null ? void 0 : P[$.action];
|
|
2202
|
-
return S != null && S.if && (
|
|
2208
|
+
return S != null && S.if && (Ye(
|
|
2203
2209
|
_,
|
|
2204
2210
|
S.if
|
|
2205
2211
|
).satisfied || b.push("display: none;")), b.join("");
|
|
@@ -2222,7 +2228,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2222
2228
|
(n(!0), i(N, null, D(Object.entries(_.columns), ([B, z], Y) => (n(), i("th", {
|
|
2223
2229
|
key: `header-${Y}`,
|
|
2224
2230
|
class: "table__header"
|
|
2225
|
-
}, k(z.description || e(
|
|
2231
|
+
}, k(z.description || e(L)(B)), 1))), 128)),
|
|
2226
2232
|
(S = _.actions) != null && S.length ? (n(), i("th", _a)) : y("", !0)
|
|
2227
2233
|
])
|
|
2228
2234
|
])),
|
|
@@ -2249,7 +2255,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2249
2255
|
return n(), i("td", {
|
|
2250
2256
|
key: `column-${B._id}-${C}`
|
|
2251
2257
|
}, [
|
|
2252
|
-
V("div", $a, k(te.description || e(
|
|
2258
|
+
V("div", $a, k(te.description || e(L)(w)), 1),
|
|
2253
2259
|
`row-${w}` in _.$slots ? (n(), i("div", ba, [
|
|
2254
2260
|
I(_.$slots, `row-${w}`, H({ ref_for: !0 }, {
|
|
2255
2261
|
store: e(u),
|
|
@@ -2266,7 +2272,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2266
2272
|
"icon-classes": "aeria-blueish"
|
|
2267
2273
|
}, {
|
|
2268
2274
|
default: f(() => [
|
|
2269
|
-
W(k(e(
|
|
2275
|
+
W(k(e(L)("yes")), 1)
|
|
2270
2276
|
]),
|
|
2271
2277
|
_: 1
|
|
2272
2278
|
})) : (n(), g(Z, {
|
|
@@ -2275,13 +2281,13 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2275
2281
|
"icon-classes": "aeria-redish"
|
|
2276
2282
|
}, {
|
|
2277
2283
|
default: f(() => [
|
|
2278
|
-
W(k(e(
|
|
2284
|
+
W(k(e(L)("no")), 1)
|
|
2279
2285
|
]),
|
|
2280
2286
|
_: 1
|
|
2281
2287
|
}))
|
|
2282
|
-
])) : ((j = e(
|
|
2288
|
+
])) : ((j = e(me)(te)) == null ? void 0 : j.$ref) === "file" ? (n(), i("div", Ca, [
|
|
2283
2289
|
B[w] ? (n(), i("div", Oa, [
|
|
2284
|
-
"items" in te && B[w][0] && /^image/.test(B[w][0].type) ? (n(), g(
|
|
2290
|
+
"items" in te && B[w][0] && /^image/.test(B[w][0].type) ? (n(), g(De, {
|
|
2285
2291
|
key: 0,
|
|
2286
2292
|
modelValue: B[w][0].link,
|
|
2287
2293
|
"onUpdate:modelValue": (ne) => B[w][0].link = ne,
|
|
@@ -2289,7 +2295,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2289
2295
|
meta: B[w][0],
|
|
2290
2296
|
alt: "Row image",
|
|
2291
2297
|
class: "table__picture"
|
|
2292
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test(B[w].type) ? (n(), g(
|
|
2298
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test(B[w].type) ? (n(), g(De, {
|
|
2293
2299
|
key: 1,
|
|
2294
2300
|
modelValue: B[w].link,
|
|
2295
2301
|
"onUpdate:modelValue": (ne) => B[w].link = ne,
|
|
@@ -2309,8 +2315,8 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2309
2315
|
key: w,
|
|
2310
2316
|
property: te
|
|
2311
2317
|
})), 1)) : (n(), i("span", ja, k(Array.isArray(B[w]) ? B[w].filter((ne) => !!ne).join(", ") : [void 0, null].includes(B[w]) ? "-" : B[w]), 1)),
|
|
2312
|
-
((le = (ae = e(
|
|
2313
|
-
(n(!0), i(N, null, D(e(
|
|
2318
|
+
((le = (ae = e(me)(te)) == null ? void 0 : ae.indexes) == null ? void 0 : le.length) > 1 ? (n(), i("div", Ta, [
|
|
2319
|
+
(n(!0), i(N, null, D(e(me)(te).indexes.slice(1, 2), (ne, se) => (n(), i("div", {
|
|
2314
2320
|
key: `subvalue-${se}`,
|
|
2315
2321
|
class: "table__cell-subvalue"
|
|
2316
2322
|
}, k(e(u).$actions.formatValue({
|
|
@@ -2325,8 +2331,8 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2325
2331
|
]))
|
|
2326
2332
|
]);
|
|
2327
2333
|
}), 128)),
|
|
2328
|
-
(z = _.actions) != null && z.length && e(l).md ? (n(), i("td",
|
|
2329
|
-
V("div",
|
|
2334
|
+
(z = _.actions) != null && z.length && e(l).md ? (n(), i("td", Ra, [
|
|
2335
|
+
V("div", La, [
|
|
2330
2336
|
(n(!0), i(N, null, D(h(B), (w) => (n(), g(re, {
|
|
2331
2337
|
key: `action-${w.action}`,
|
|
2332
2338
|
small: "",
|
|
@@ -2336,7 +2342,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2336
2342
|
onClick: (te) => w.click(B)
|
|
2337
2343
|
}, {
|
|
2338
2344
|
default: f(() => [
|
|
2339
|
-
W(k(e(
|
|
2345
|
+
W(k(e(L)(w.label)), 1)
|
|
2340
2346
|
]),
|
|
2341
2347
|
_: 2
|
|
2342
2348
|
}, 1032, ["icon", "style", "onClick"]))), 128)),
|
|
@@ -2348,7 +2354,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2348
2354
|
actions: p(B)
|
|
2349
2355
|
}), {
|
|
2350
2356
|
default: f(() => [
|
|
2351
|
-
x(
|
|
2357
|
+
x(R(Z, {
|
|
2352
2358
|
reactive: "",
|
|
2353
2359
|
icon: "dots-three"
|
|
2354
2360
|
}, null, 512), [
|
|
@@ -2363,17 +2369,17 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2363
2369
|
class: "table__mobile-actions-grid",
|
|
2364
2370
|
style: $e(`grid-template-columns: repeat(${h(B).length + (p(B).length ? 1 : 0)}, 1fr);`)
|
|
2365
2371
|
}, [
|
|
2366
|
-
(n(!0), i(N, null, D(h(B), (w) => (n(), g(
|
|
2372
|
+
(n(!0), i(N, null, D(h(B), (w) => (n(), g(ve, {
|
|
2367
2373
|
key: `action-${w.action}`,
|
|
2368
2374
|
class: "table__mobile-actions-button",
|
|
2369
2375
|
onClick: (te) => w.click(B)
|
|
2370
2376
|
}, {
|
|
2371
2377
|
default: f(() => [
|
|
2372
|
-
|
|
2378
|
+
R(Z, {
|
|
2373
2379
|
icon: w.icon || "gear"
|
|
2374
2380
|
}, {
|
|
2375
2381
|
default: f(() => [
|
|
2376
|
-
W(k(e(
|
|
2382
|
+
W(k(e(L)(w.label)), 1)
|
|
2377
2383
|
]),
|
|
2378
2384
|
_: 2
|
|
2379
2385
|
}, 1032, ["icon"])
|
|
@@ -2388,7 +2394,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2388
2394
|
actions: p(B)
|
|
2389
2395
|
}), {
|
|
2390
2396
|
default: f(() => [
|
|
2391
|
-
|
|
2397
|
+
R(Z, {
|
|
2392
2398
|
icon: "dots-three",
|
|
2393
2399
|
class: "table__mobile-actions-button"
|
|
2394
2400
|
})
|
|
@@ -2404,7 +2410,7 @@ const Ge = /* @__PURE__ */ X(oa, [["__scopeId", "data-v-fb16d65c"]]), aa = /* @_
|
|
|
2404
2410
|
}), 128))
|
|
2405
2411
|
])),
|
|
2406
2412
|
V("tfoot", null, [
|
|
2407
|
-
_.$slots.tfoot ? I(_.$slots, "tfoot", { key: 0 }, void 0, !0) : _.columns && !((T = _.rows) != null && T.length) && !((P = e(u)) != null && P.loading.getAll) ? (n(), i("tr",
|
|
2413
|
+
_.$slots.tfoot ? I(_.$slots, "tfoot", { key: 0 }, void 0, !0) : _.columns && !((T = _.rows) != null && T.length) && !((P = e(u)) != null && P.loading.getAll) ? (n(), i("tr", qa, Ua)) : y("", !0)
|
|
2408
2414
|
])
|
|
2409
2415
|
])) : y("", !0);
|
|
2410
2416
|
};
|
|
@@ -2417,8 +2423,8 @@ const Da = /* @__PURE__ */ X(Ea, [["__scopeId", "data-v-2a6c7067"]]), Ha = /* @_
|
|
|
2417
2423
|
layoutOptions: {},
|
|
2418
2424
|
componentProps: {}
|
|
2419
2425
|
},
|
|
2420
|
-
setup(
|
|
2421
|
-
const r =
|
|
2426
|
+
setup(d) {
|
|
2427
|
+
const r = d, a = Ie(), t = qe(), l = Q(() => {
|
|
2422
2428
|
const s = {
|
|
2423
2429
|
collection: t,
|
|
2424
2430
|
checkbox: a.hasSelectionActions,
|
|
@@ -2436,8 +2442,8 @@ const Da = /* @__PURE__ */ X(Ea, [["__scopeId", "data-v-2a6c7067"]]), Ha = /* @_
|
|
|
2436
2442
|
}), ce({ _: 2 }, [
|
|
2437
2443
|
D(Object.keys(s.$slots).filter((v) => !["inner"].includes(v)), (v) => ({
|
|
2438
2444
|
name: v,
|
|
2439
|
-
fn: f((
|
|
2440
|
-
I(s.$slots, v, pe(Ve(
|
|
2445
|
+
fn: f((c) => [
|
|
2446
|
+
I(s.$slots, v, pe(Ve(c)))
|
|
2441
2447
|
])
|
|
2442
2448
|
}))
|
|
2443
2449
|
]), 1040)) : y("", !0)
|
|
@@ -2448,7 +2454,7 @@ const Da = /* @__PURE__ */ X(Ea, [["__scopeId", "data-v-2a6c7067"]]), Ha = /* @_
|
|
|
2448
2454
|
props: {
|
|
2449
2455
|
list: { type: Boolean }
|
|
2450
2456
|
},
|
|
2451
|
-
setup(
|
|
2457
|
+
setup(d) {
|
|
2452
2458
|
return (r, a) => (n(), i("div", {
|
|
2453
2459
|
class: K(`
|
|
2454
2460
|
grid
|
|
@@ -2470,33 +2476,33 @@ const Ga = /* @__PURE__ */ X(Qa, [["__scopeId", "data-v-438c4aed"]]), Wa = { key
|
|
|
2470
2476
|
layoutOptions: {},
|
|
2471
2477
|
componentName: {}
|
|
2472
2478
|
},
|
|
2473
|
-
setup(
|
|
2474
|
-
const a =
|
|
2479
|
+
setup(d) {
|
|
2480
|
+
const a = d.layoutOptions, t = Ie(), l = (s) => Array.isArray(s) ? s[0] : s;
|
|
2475
2481
|
return (s, u) => {
|
|
2476
2482
|
const v = oe("clickable");
|
|
2477
2483
|
return n(), g(Ga, {
|
|
2478
2484
|
list: s.componentName === "list"
|
|
2479
2485
|
}, {
|
|
2480
2486
|
default: f(() => [
|
|
2481
|
-
(n(!0), i(N, null, D(e(t).items, (
|
|
2482
|
-
key:
|
|
2483
|
-
inactive: !!(e(a).active && !
|
|
2487
|
+
(n(!0), i(N, null, D(e(t).items, (c) => (n(), g(fn, {
|
|
2488
|
+
key: c,
|
|
2489
|
+
inactive: !!(e(a).active && !c[e(a).active]),
|
|
2484
2490
|
horizontal: s.componentName === "list"
|
|
2485
2491
|
}, ce({
|
|
2486
2492
|
footer: f(() => [
|
|
2487
|
-
e(a).title ? (n(), i("div", Wa, k(
|
|
2488
|
-
e(a).information ? (n(), i("div", Ka, k(
|
|
2493
|
+
e(a).title ? (n(), i("div", Wa, k(c[e(a).title]), 1)) : y("", !0),
|
|
2494
|
+
e(a).information ? (n(), i("div", Ka, k(c[e(a).information]), 1)) : y("", !0)
|
|
2489
2495
|
]),
|
|
2490
2496
|
actions: f(() => [
|
|
2491
2497
|
s.individualActions.length > 0 ? (n(), g(Ce, H({
|
|
2492
2498
|
key: 0,
|
|
2493
2499
|
ref_for: !0
|
|
2494
2500
|
}, {
|
|
2495
|
-
subject:
|
|
2501
|
+
subject: c,
|
|
2496
2502
|
actions: s.individualActions
|
|
2497
2503
|
}), {
|
|
2498
2504
|
default: f(() => [
|
|
2499
|
-
x(
|
|
2505
|
+
x(R(Z, {
|
|
2500
2506
|
reactive: "",
|
|
2501
2507
|
icon: "dots-three-vertical"
|
|
2502
2508
|
}, null, 512), [
|
|
@@ -2509,25 +2515,25 @@ const Ga = /* @__PURE__ */ X(Qa, [["__scopeId", "data-v-438c4aed"]]), Wa = { key
|
|
|
2509
2515
|
default: f(() => {
|
|
2510
2516
|
var h;
|
|
2511
2517
|
return [
|
|
2512
|
-
|
|
2518
|
+
R(De, {
|
|
2513
2519
|
alt: "Item picture",
|
|
2514
2520
|
expandable: "",
|
|
2515
|
-
url: (h = l(
|
|
2516
|
-
meta: l(
|
|
2521
|
+
url: (h = l(c[e(a).picture])) == null ? void 0 : h.link,
|
|
2522
|
+
meta: l(c[e(a).picture])
|
|
2517
2523
|
}, null, 8, ["url", "meta"])
|
|
2518
2524
|
];
|
|
2519
2525
|
}),
|
|
2520
2526
|
_: 2
|
|
2521
2527
|
}, [
|
|
2522
|
-
e(a).badge && Array.isArray(
|
|
2528
|
+
e(a).badge && Array.isArray(c[e(a).badge]) ? {
|
|
2523
2529
|
name: "badge",
|
|
2524
2530
|
fn: f(() => [
|
|
2525
|
-
(n(!0), i(N, null, D(
|
|
2526
|
-
key: `${
|
|
2531
|
+
(n(!0), i(N, null, D(c[e(a).badge], (h) => (n(), g(be, {
|
|
2532
|
+
key: `${c._id}-${h}`,
|
|
2527
2533
|
large: ""
|
|
2528
2534
|
}, {
|
|
2529
2535
|
default: f(() => [
|
|
2530
|
-
W(k(e(a).translateBadge ? e(
|
|
2536
|
+
W(k(e(a).translateBadge ? e(L)(h) : h), 1)
|
|
2531
2537
|
]),
|
|
2532
2538
|
_: 2
|
|
2533
2539
|
}, 1024))), 128))
|
|
@@ -2536,9 +2542,9 @@ const Ga = /* @__PURE__ */ X(Qa, [["__scopeId", "data-v-438c4aed"]]), Wa = { key
|
|
|
2536
2542
|
} : e(a).badge ? {
|
|
2537
2543
|
name: "badge",
|
|
2538
2544
|
fn: f(() => [
|
|
2539
|
-
|
|
2545
|
+
R(be, null, {
|
|
2540
2546
|
default: f(() => [
|
|
2541
|
-
W(k(e(a).translateBadge ? e(
|
|
2547
|
+
W(k(e(a).translateBadge ? e(L)(c[e(a).badge]) : c[e(a).badge]), 1)
|
|
2542
2548
|
]),
|
|
2543
2549
|
_: 2
|
|
2544
2550
|
}, 1024)
|
|
@@ -2552,13 +2558,13 @@ const Ga = /* @__PURE__ */ X(Qa, [["__scopeId", "data-v-438c4aed"]]), Wa = { key
|
|
|
2552
2558
|
};
|
|
2553
2559
|
}
|
|
2554
2560
|
});
|
|
2555
|
-
const vt = /* @__PURE__ */ X(Xa, [["__scopeId", "data-v-113dd7db"]]), Ya = (
|
|
2561
|
+
const vt = /* @__PURE__ */ X(Xa, [["__scopeId", "data-v-113dd7db"]]), Ya = (d) => ({
|
|
2556
2562
|
tabular: Ha,
|
|
2557
2563
|
grid: vt,
|
|
2558
2564
|
list: vt
|
|
2559
|
-
})[
|
|
2565
|
+
})[d], de = J(!1);
|
|
2560
2566
|
J(!1);
|
|
2561
|
-
const ge = J(!1),
|
|
2567
|
+
const ge = J(!1), Le = J((...d) => null), yt = J(), Ja = (d) => (He("data-v-21eeb8fd"), d = d(), Qe(), d), Za = {
|
|
2562
2568
|
key: 2,
|
|
2563
2569
|
class: "crud__controls"
|
|
2564
2570
|
}, Pa = {
|
|
@@ -2582,21 +2588,21 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2582
2588
|
noQueryPersistence: { type: Boolean }
|
|
2583
2589
|
},
|
|
2584
2590
|
emits: ["uiEvent"],
|
|
2585
|
-
setup(
|
|
2586
|
-
const a =
|
|
2591
|
+
setup(d, { emit: r }) {
|
|
2592
|
+
const a = d, t = r, l = Ae(), s = kt({
|
|
2587
2593
|
delay: 600
|
|
2588
|
-
}), u = ie("meta"), v =
|
|
2594
|
+
}), u = ie("meta"), v = Me(), { reachedEnd: c, detach: h } = Ze(null, {
|
|
2589
2595
|
antecipate: 600
|
|
2590
2596
|
}), p = !v.value.md || a.scrollPagination;
|
|
2591
|
-
p && ue(
|
|
2597
|
+
p && ue(c, (C) => {
|
|
2592
2598
|
C && o.pagination.recordsTotal > o.items.length && b.value < ht && (b.value += 1, T());
|
|
2593
2599
|
});
|
|
2594
2600
|
const o = ie(a.collection);
|
|
2595
2601
|
sa(o, {
|
|
2596
2602
|
persistInQuery: !a.noQueryPersistence
|
|
2597
2603
|
});
|
|
2598
|
-
const _ =
|
|
2599
|
-
|
|
2604
|
+
const _ = Pe(), $ = a.action ? e(a.action) : Dt(o, l, _);
|
|
2605
|
+
Le.value = $[0], yt.value = $[1];
|
|
2600
2606
|
const b = J(0), S = J(!1), T = async (C) => {
|
|
2601
2607
|
o.activeFilters = Object.assign({}, (C == null ? void 0 : C.filters) || o.$filters), Object.assign(o.activeFilters, o.filtersPreset);
|
|
2602
2608
|
const j = {
|
|
@@ -2612,14 +2618,13 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2612
2618
|
const { data: ne, pagination: se } = le;
|
|
2613
2619
|
o.pagination.recordsCount = se.recordsCount, o.pagination.recordsTotal = se.recordsTotal, b.value === 0 && o.items.splice(0), o.items.push(...ne), o.loading.getAll = !1, S.value = !0;
|
|
2614
2620
|
}, P = async (C) => {
|
|
2615
|
-
l.push({
|
|
2621
|
+
l.push(ze(l.currentRoute.value, {
|
|
2616
2622
|
query: {
|
|
2617
|
-
...l.currentRoute.value.query,
|
|
2618
2623
|
offset: C.offset,
|
|
2619
2624
|
limit: C.limit
|
|
2620
2625
|
}
|
|
2621
|
-
}), o.pagination.offset = C.offset, o.pagination.limit = C.limit, T();
|
|
2622
|
-
}, B =
|
|
2626
|
+
})), o.pagination.offset = C.offset, o.pagination.limit = C.limit, T();
|
|
2627
|
+
}, B = _e("noResultsComponent", null);
|
|
2623
2628
|
ue(() => [
|
|
2624
2629
|
l.currentRoute.value.path,
|
|
2625
2630
|
l.currentRoute.value.query.section
|
|
@@ -2635,11 +2640,11 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2635
2640
|
immediate: !0,
|
|
2636
2641
|
flush: "post"
|
|
2637
2642
|
});
|
|
2638
|
-
const [z] = s((C) => (l.push({
|
|
2643
|
+
const [z] = s((C) => (l.push(ze(l.currentRoute.value, {
|
|
2639
2644
|
query: {
|
|
2640
2645
|
search: C || void 0
|
|
2641
2646
|
}
|
|
2642
|
-
}), C ? (o.filters = Object.assign(ke(o.freshFilters), {
|
|
2647
|
+
})), C ? (o.filters = Object.assign(ke(o.freshFilters), {
|
|
2643
2648
|
$text: {
|
|
2644
2649
|
$search: `"${C}"`,
|
|
2645
2650
|
$caseSensitive: !1
|
|
@@ -2672,30 +2677,30 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2672
2677
|
o.$actions.setItem(j.params), de.value = "edit";
|
|
2673
2678
|
else if (j.name === "duplicate") {
|
|
2674
2679
|
await ae;
|
|
2675
|
-
const ne = Object.entries(o.item).reduce((se, [M,
|
|
2680
|
+
const ne = Object.entries(o.item).reduce((se, [M, F]) => {
|
|
2676
2681
|
if (!(M in o.properties))
|
|
2677
2682
|
return {
|
|
2678
2683
|
...se,
|
|
2679
|
-
[M]:
|
|
2684
|
+
[M]: F
|
|
2680
2685
|
};
|
|
2681
2686
|
const m = o.properties[M];
|
|
2682
2687
|
if (m.readOnly)
|
|
2683
2688
|
return se;
|
|
2684
2689
|
const E = (G) => {
|
|
2685
|
-
const O =
|
|
2690
|
+
const O = me(m);
|
|
2686
2691
|
if (!O)
|
|
2687
2692
|
return G;
|
|
2688
2693
|
if (O.$ref === "file")
|
|
2689
2694
|
return {};
|
|
2690
2695
|
if (O.inline && G) {
|
|
2691
|
-
const { _id: A, ...
|
|
2692
|
-
return
|
|
2696
|
+
const { _id: A, ...q } = G;
|
|
2697
|
+
return q;
|
|
2693
2698
|
}
|
|
2694
2699
|
return G;
|
|
2695
2700
|
};
|
|
2696
|
-
return
|
|
2701
|
+
return F = Array.isArray(F) ? F.map(E) : E(F), {
|
|
2697
2702
|
...se,
|
|
2698
|
-
[M]:
|
|
2703
|
+
[M]: F
|
|
2699
2704
|
};
|
|
2700
2705
|
}, {});
|
|
2701
2706
|
o.$actions.setItem(ne), delete o.item._id, o.referenceItem = {}, de.value = "duplicate";
|
|
@@ -2707,22 +2712,22 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2707
2712
|
C === !1 && (u.view.collection = a.collection, o.$actions.clearItem());
|
|
2708
2713
|
});
|
|
2709
2714
|
const w = Q(() => o.individualActions.map((C) => ({
|
|
2710
|
-
click:
|
|
2715
|
+
click: Le.value(C),
|
|
2711
2716
|
...C
|
|
2712
2717
|
}))), te = Q(() => o.actions.filter((C) => !C.button));
|
|
2713
|
-
return ye(
|
|
2714
|
-
var ne, se, M,
|
|
2718
|
+
return ye(Fe, Q(() => a.collection)), ye("individualActions", w), (C, j) => {
|
|
2719
|
+
var ne, se, M, F, m, E, G;
|
|
2715
2720
|
const ae = oe("clickable"), le = oe("loading");
|
|
2716
2721
|
return n(), i(N, null, [
|
|
2717
2722
|
e(ge) ? (n(), g(aa, {
|
|
2718
2723
|
key: e(o).$id,
|
|
2719
2724
|
modelValue: e(ge),
|
|
2720
|
-
"onUpdate:modelValue": j[0] || (j[0] = (O) =>
|
|
2725
|
+
"onUpdate:modelValue": j[0] || (j[0] = (O) => _t(ge) ? ge.value = O : null)
|
|
2721
2726
|
}, null, 8, ["modelValue"])) : y("", !0),
|
|
2722
2727
|
e(de) ? (n(), g(la, {
|
|
2723
2728
|
key: 1,
|
|
2724
2729
|
modelValue: e(de),
|
|
2725
|
-
"onUpdate:modelValue": j[1] || (j[1] = (O) =>
|
|
2730
|
+
"onUpdate:modelValue": j[1] || (j[1] = (O) => _t(de) ? de.value = O : null),
|
|
2726
2731
|
"fixed-right": "",
|
|
2727
2732
|
onCancel: j[2] || (j[2] = (O) => de.value = !1)
|
|
2728
2733
|
}, ce({
|
|
@@ -2730,15 +2735,15 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2730
2735
|
V("span", null, k((() => {
|
|
2731
2736
|
switch (e(de)) {
|
|
2732
2737
|
case "add":
|
|
2733
|
-
return e(
|
|
2738
|
+
return e(L)("action.add", { capitalize: !0 });
|
|
2734
2739
|
case "duplicate":
|
|
2735
|
-
return e(
|
|
2740
|
+
return e(L)("action.duplicate", { capitalize: !0 });
|
|
2736
2741
|
case "edit":
|
|
2737
2742
|
default:
|
|
2738
|
-
return e(
|
|
2743
|
+
return e(L)("action.edit", { capitalize: !0 });
|
|
2739
2744
|
}
|
|
2740
2745
|
})()), 1),
|
|
2741
|
-
V("span", null, " " + k(e(
|
|
2746
|
+
V("span", null, " " + k(e(L)(e(u).view.collection)), 1)
|
|
2742
2747
|
]),
|
|
2743
2748
|
_: 2
|
|
2744
2749
|
}, [
|
|
@@ -2751,7 +2756,7 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2751
2756
|
]), 1032, ["modelValue"])) : y("", !0),
|
|
2752
2757
|
!C.noActions && (e(o).description.search || Object.keys(e(o).availableFilters).length > 0 || ((ne = e(o)) == null ? void 0 : ne.actions.length) > 0 || C.$slots.actions || !C.noLayoutToggle && e(o).description.layout && ((se = e(o).description.layout) == null ? void 0 : se.name) !== "tabular") ? (n(), i("div", Za, [
|
|
2753
2758
|
e(o).description.search ? (n(), i("div", Pa, [
|
|
2754
|
-
|
|
2759
|
+
R(Oe, H({
|
|
2755
2760
|
modelValue: e(o).textQuery,
|
|
2756
2761
|
"onUpdate:modelValue": j[3] || (j[3] = (O) => e(o).textQuery = O)
|
|
2757
2762
|
}, {
|
|
@@ -2765,7 +2770,7 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2765
2770
|
V("div", Na, [
|
|
2766
2771
|
te.value.length > 0 || !C.noLayoutToggle && e(o).description.layout && ((M = e(o).description.layout) == null ? void 0 : M.name) !== "tabular" ? (n(), g(Ce, { key: 0 }, ce({
|
|
2767
2772
|
default: f(() => [
|
|
2768
|
-
|
|
2773
|
+
R(re, {
|
|
2769
2774
|
variant: "alt",
|
|
2770
2775
|
icon: "sliders"
|
|
2771
2776
|
}, {
|
|
@@ -2790,7 +2795,7 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2790
2795
|
onClick: j[4] || (j[4] = (O) => ge.value = !0)
|
|
2791
2796
|
}, {
|
|
2792
2797
|
default: f(() => [
|
|
2793
|
-
W(k(e(
|
|
2798
|
+
W(k(e(L)("filters", { capitalize: !0 })), 1)
|
|
2794
2799
|
]),
|
|
2795
2800
|
_: 1
|
|
2796
2801
|
})), [
|
|
@@ -2807,7 +2812,7 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2807
2812
|
]),
|
|
2808
2813
|
key: "0"
|
|
2809
2814
|
} : void 0,
|
|
2810
|
-
!C.noLayoutToggle && e(o).description.layout && ((
|
|
2815
|
+
!C.noLayoutToggle && e(o).description.layout && ((F = e(o).description.layout) == null ? void 0 : F.name) !== "tabular" ? {
|
|
2811
2816
|
name: "layout-toggle",
|
|
2812
2817
|
fn: f(() => [
|
|
2813
2818
|
x((n(), g(Z, {
|
|
@@ -2815,7 +2820,7 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2815
2820
|
onClick: j[5] || (j[5] = (O) => Y(e(o)))
|
|
2816
2821
|
}, {
|
|
2817
2822
|
default: f(() => [
|
|
2818
|
-
W(k(e(
|
|
2823
|
+
W(k(e(L)("change_layout", { capitalize: !0 })), 1)
|
|
2819
2824
|
]),
|
|
2820
2825
|
_: 1
|
|
2821
2826
|
})), [
|
|
@@ -2831,10 +2836,10 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2831
2836
|
key: 0,
|
|
2832
2837
|
icon: O.icon || "gear",
|
|
2833
2838
|
disabled: e(o).selected.length === 0 && O.selection,
|
|
2834
|
-
onClick: (
|
|
2839
|
+
onClick: (q) => e(Le)(O)({ _id: e(o).selected.map((fe) => fe._id) })
|
|
2835
2840
|
}, {
|
|
2836
2841
|
default: f(() => [
|
|
2837
|
-
W(k(e(
|
|
2842
|
+
W(k(e(L)(O.label, { capitalize: !0 })), 1)
|
|
2838
2843
|
]),
|
|
2839
2844
|
_: 2
|
|
2840
2845
|
}, 1032, ["icon", "disabled", "onClick"])) : y("", !0)
|
|
@@ -2861,10 +2866,10 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2861
2866
|
key: `action-${A}`,
|
|
2862
2867
|
icon: O.icon,
|
|
2863
2868
|
disabled: e(o).selected.length === 0 && O.selection,
|
|
2864
|
-
onClick: (
|
|
2869
|
+
onClick: (q) => e(Le)(O)({ _id: e(o).selected.map((fe) => fe._id) })
|
|
2865
2870
|
}, {
|
|
2866
2871
|
default: f(() => [
|
|
2867
|
-
W(k(e(
|
|
2872
|
+
W(k(e(L)(O.label, { capitalize: !0 })), 1)
|
|
2868
2873
|
]),
|
|
2869
2874
|
_: 2
|
|
2870
2875
|
}, 1032, ["icon", "disabled", "onClick"]))), 128)),
|
|
@@ -2880,12 +2885,12 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2880
2885
|
e(o).filtersCount === 0 && e(o).description.actions && "ui:spawnAdd" in e(o).description.actions ? (n(), g(re, {
|
|
2881
2886
|
key: 0,
|
|
2882
2887
|
icon: "plus",
|
|
2883
|
-
onClick: j[7] || (j[7] = (O) => e(
|
|
2888
|
+
onClick: j[7] || (j[7] = (O) => e(Le)({
|
|
2884
2889
|
action: "ui:spawnAdd"
|
|
2885
2890
|
})())
|
|
2886
2891
|
}, {
|
|
2887
2892
|
default: f(() => [
|
|
2888
|
-
W(k(e(
|
|
2893
|
+
W(k(e(L)("add_first_item", { capitalize: !0 })), 1)
|
|
2889
2894
|
]),
|
|
2890
2895
|
_: 1
|
|
2891
2896
|
})) : y("", !0)
|
|
@@ -2921,7 +2926,7 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2921
2926
|
[le, (!e(p) || b.value === ht) && e(o).loading.getAll]
|
|
2922
2927
|
]),
|
|
2923
2928
|
!e(o).loading.getAll && e(o).itemsCount > 0 ? (n(), i("div", nl, [
|
|
2924
|
-
|
|
2929
|
+
R(Un, {
|
|
2925
2930
|
pagination: e(o).pagination,
|
|
2926
2931
|
onPaginate: P
|
|
2927
2932
|
}, null, 8, ["pagination"])
|
|
@@ -2930,13 +2935,13 @@ const ge = J(!1), Re = J((...c) => null), yt = J(), Ja = (c) => (Ee("data-v-2642
|
|
|
2930
2935
|
};
|
|
2931
2936
|
}
|
|
2932
2937
|
});
|
|
2933
|
-
const Ul = /* @__PURE__ */ X(ol, [["__scopeId", "data-v-
|
|
2938
|
+
const Ul = /* @__PURE__ */ X(ol, [["__scopeId", "data-v-21eeb8fd"]]), al = { class: "prompt" }, ll = /* @__PURE__ */ U({
|
|
2934
2939
|
__name: "aeria-prompt",
|
|
2935
2940
|
props: {
|
|
2936
2941
|
title: {},
|
|
2937
2942
|
actions: {}
|
|
2938
2943
|
},
|
|
2939
|
-
setup(
|
|
2944
|
+
setup(d) {
|
|
2940
2945
|
const r = ie("meta"), a = (t) => {
|
|
2941
2946
|
r.$actions.fulfillPrompt(t);
|
|
2942
2947
|
};
|
|
@@ -2951,7 +2956,7 @@ const Ul = /* @__PURE__ */ X(ol, [["__scopeId", "data-v-2642eb69"]]), al = { cla
|
|
|
2951
2956
|
class: "prompt__actions",
|
|
2952
2957
|
style: $e(`grid-template-columns: repeat(${t.actions.length}, 1fr)`)
|
|
2953
2958
|
}, [
|
|
2954
|
-
(n(!0), i(N, null, D(t.actions, (s, u) => (n(), g(
|
|
2959
|
+
(n(!0), i(N, null, D(t.actions, (s, u) => (n(), g(ve, {
|
|
2955
2960
|
key: `action-${u}`,
|
|
2956
2961
|
class: K(`
|
|
2957
2962
|
prompt__action
|
|
@@ -2991,7 +2996,7 @@ const sl = /* @__PURE__ */ X(ll, [["__scopeId", "data-v-5443f297"]]), il = { cla
|
|
|
2991
2996
|
date: {},
|
|
2992
2997
|
icon: {}
|
|
2993
2998
|
},
|
|
2994
|
-
setup(
|
|
2999
|
+
setup(d) {
|
|
2995
3000
|
const r = ie("meta");
|
|
2996
3001
|
return (a, t) => {
|
|
2997
3002
|
const l = oe("clickable");
|
|
@@ -3003,7 +3008,7 @@ const sl = /* @__PURE__ */ X(ll, [["__scopeId", "data-v-5443f297"]]), il = { cla
|
|
|
3003
3008
|
onAnimationend: t[0] || (t[0] = (s) => e(r).$actions.popToast()),
|
|
3004
3009
|
onClick: t[1] || (t[1] = (s) => e(r).$actions.popToast(a.itr))
|
|
3005
3010
|
}, [
|
|
3006
|
-
|
|
3011
|
+
R(Z, H(
|
|
3007
3012
|
a.icon ? { icon: a.icon } : { icon: "warning-circle" },
|
|
3008
3013
|
{ style: { "--icon-size": "4rem", "--icon-color": "var(--theme-brand-color-shade-3)" } }
|
|
3009
3014
|
), null, 16),
|
|
@@ -3019,7 +3024,7 @@ const sl = /* @__PURE__ */ X(ll, [["__scopeId", "data-v-5443f297"]]), il = { cla
|
|
|
3019
3024
|
});
|
|
3020
3025
|
const cl = /* @__PURE__ */ X(ul, [["__scopeId", "data-v-21bbe178"]]), dl = ["innerHTML"], pl = { class: "main__toasts" }, _l = ["innerHTML"], ml = /* @__PURE__ */ U({
|
|
3021
3026
|
__name: "aeria-main",
|
|
3022
|
-
setup(
|
|
3027
|
+
setup(d) {
|
|
3023
3028
|
const r = ie("meta"), a = Q(() => r.themeOverride || r.theme);
|
|
3024
3029
|
return (t, l) => {
|
|
3025
3030
|
const s = St("router-view");
|
|
@@ -3033,7 +3038,7 @@ const cl = /* @__PURE__ */ X(ul, [["__scopeId", "data-v-21bbe178"]]), dl = ["inn
|
|
|
3033
3038
|
}, [
|
|
3034
3039
|
(n(), g(jt, null, {
|
|
3035
3040
|
default: f(() => [
|
|
3036
|
-
|
|
3041
|
+
R(s, null, {
|
|
3037
3042
|
default: f(({ Component: u }) => [
|
|
3038
3043
|
(n(), g(he(u), null, ce({ _: 2 }, [
|
|
3039
3044
|
D(Object.keys(t.$slots), (v) => ({
|
|
@@ -3050,7 +3055,7 @@ const cl = /* @__PURE__ */ X(ul, [["__scopeId", "data-v-21bbe178"]]), dl = ["inn
|
|
|
3050
3055
|
_: 3
|
|
3051
3056
|
})),
|
|
3052
3057
|
I(t.$slots, "default", {}, void 0, !0),
|
|
3053
|
-
|
|
3058
|
+
R(Be, H({
|
|
3054
3059
|
modelValue: e(r).modal.visible,
|
|
3055
3060
|
"onUpdate:modelValue": l[0] || (l[0] = (u) => e(r).modal.visible = u),
|
|
3056
3061
|
float: "",
|
|
@@ -3081,7 +3086,7 @@ const cl = /* @__PURE__ */ X(ul, [["__scopeId", "data-v-21bbe178"]]), dl = ["inn
|
|
|
3081
3086
|
}), {
|
|
3082
3087
|
default: f(() => [
|
|
3083
3088
|
V("div", {
|
|
3084
|
-
innerHTML: e(
|
|
3089
|
+
innerHTML: e(L)(u.text)
|
|
3085
3090
|
}, null, 8, _l)
|
|
3086
3091
|
]),
|
|
3087
3092
|
_: 2
|
|
@@ -3093,13 +3098,13 @@ const cl = /* @__PURE__ */ X(ul, [["__scopeId", "data-v-21bbe178"]]), dl = ["inn
|
|
|
3093
3098
|
});
|
|
3094
3099
|
const El = /* @__PURE__ */ X(ml, [["__scopeId", "data-v-1166be3d"]]);
|
|
3095
3100
|
const fl = {}, vl = { class: "menu" };
|
|
3096
|
-
function yl(
|
|
3101
|
+
function yl(d, r) {
|
|
3097
3102
|
return n(), i("menu", vl, [
|
|
3098
|
-
(n(!0), i(N, null, D(Object.keys(
|
|
3103
|
+
(n(!0), i(N, null, D(Object.keys(d.$slots), (a) => (n(), i("div", {
|
|
3099
3104
|
key: a,
|
|
3100
3105
|
class: "menu__entry"
|
|
3101
3106
|
}, [
|
|
3102
|
-
I(
|
|
3107
|
+
I(d.$slots, a, {}, void 0, !0)
|
|
3103
3108
|
]))), 128))
|
|
3104
3109
|
]);
|
|
3105
3110
|
}
|
|
@@ -3119,33 +3124,33 @@ const Dl = /* @__PURE__ */ X(fl, [["render", yl], ["__scopeId", "data-v-3cfef7fb
|
|
|
3119
3124
|
param: {},
|
|
3120
3125
|
dropdown: { type: Boolean }
|
|
3121
3126
|
},
|
|
3122
|
-
setup(
|
|
3123
|
-
const r =
|
|
3124
|
-
const
|
|
3125
|
-
return
|
|
3126
|
-
}), v = (
|
|
3127
|
+
setup(d) {
|
|
3128
|
+
const r = d, a = Tt(), t = Ae(), l = Me(), s = "query" in r && r.query ? "query" : "params", u = Q(() => {
|
|
3129
|
+
const c = t.currentRoute.value[s][r.query || r.param];
|
|
3130
|
+
return c || Object.keys(a)[0];
|
|
3131
|
+
}), v = (c) => {
|
|
3127
3132
|
if (s === "query") {
|
|
3128
|
-
t.push(
|
|
3133
|
+
t.push(ze(t.currentRoute.value, {
|
|
3129
3134
|
query: {
|
|
3130
|
-
[r.query]:
|
|
3135
|
+
[r.query]: c
|
|
3131
3136
|
}
|
|
3132
3137
|
}));
|
|
3133
3138
|
return;
|
|
3134
3139
|
}
|
|
3135
|
-
t.push(
|
|
3140
|
+
t.push(ze(t.currentRoute.value, {
|
|
3136
3141
|
params: {
|
|
3137
|
-
[r.param]:
|
|
3142
|
+
[r.param]: c
|
|
3138
3143
|
}
|
|
3139
3144
|
}));
|
|
3140
3145
|
};
|
|
3141
|
-
return (
|
|
3146
|
+
return (c, h) => {
|
|
3142
3147
|
const p = oe("clickable");
|
|
3143
3148
|
return n(), i("div", hl, [
|
|
3144
|
-
e(l).md && !
|
|
3145
|
-
|
|
3146
|
-
I(
|
|
3149
|
+
e(l).md && !c.dropdown ? (n(), i("div", $l, [
|
|
3150
|
+
c.$slots.default ? (n(), i("div", bl, [
|
|
3151
|
+
I(c.$slots, "default", {}, void 0, !0)
|
|
3147
3152
|
])) : y("", !0),
|
|
3148
|
-
(n(!0), i(N, null, D(Object.keys(
|
|
3153
|
+
(n(!0), i(N, null, D(Object.keys(c.$slots).filter((o) => o !== "default"), (o, _) => (n(), i("div", {
|
|
3149
3154
|
key: o,
|
|
3150
3155
|
class: K({
|
|
3151
3156
|
tabs__tab: !0,
|
|
@@ -3153,10 +3158,10 @@ const Dl = /* @__PURE__ */ X(fl, [["render", yl], ["__scopeId", "data-v-3cfef7fb
|
|
|
3153
3158
|
}),
|
|
3154
3159
|
onClick: ($) => v(o)
|
|
3155
3160
|
}, [
|
|
3156
|
-
I(
|
|
3161
|
+
I(c.$slots, o, {}, void 0, !0)
|
|
3157
3162
|
], 10, gl))), 128))
|
|
3158
3163
|
])) : (n(), i("div", kl, [
|
|
3159
|
-
|
|
3164
|
+
R(Ce, null, ce({
|
|
3160
3165
|
default: f(() => [
|
|
3161
3166
|
x((n(), g(Z, {
|
|
3162
3167
|
"icon-right": "",
|
|
@@ -3165,7 +3170,7 @@ const Dl = /* @__PURE__ */ X(fl, [["render", yl], ["__scopeId", "data-v-3cfef7fb
|
|
|
3165
3170
|
class: "tabs__context-menu-icon"
|
|
3166
3171
|
}, {
|
|
3167
3172
|
default: f(() => [
|
|
3168
|
-
I(
|
|
3173
|
+
I(c.$slots, u.value, {}, void 0, !0)
|
|
3169
3174
|
]),
|
|
3170
3175
|
_: 3
|
|
3171
3176
|
})), [
|
|
@@ -3174,13 +3179,13 @@ const Dl = /* @__PURE__ */ X(fl, [["render", yl], ["__scopeId", "data-v-3cfef7fb
|
|
|
3174
3179
|
]),
|
|
3175
3180
|
_: 2
|
|
3176
3181
|
}, [
|
|
3177
|
-
D(Object.keys(
|
|
3182
|
+
D(Object.keys(c.$slots).filter((o) => o !== "default"), (o) => ({
|
|
3178
3183
|
name: o,
|
|
3179
3184
|
fn: f(() => [
|
|
3180
3185
|
V("div", {
|
|
3181
3186
|
onClick: (_) => v(o)
|
|
3182
3187
|
}, [
|
|
3183
|
-
I(
|
|
3188
|
+
I(c.$slots, o, {}, void 0, !0)
|
|
3184
3189
|
], 8, Vl)
|
|
3185
3190
|
])
|
|
3186
3191
|
}))
|
|
@@ -3195,25 +3200,25 @@ const Ol = /* @__PURE__ */ X(Cl, [["__scopeId", "data-v-fb669290"]]), Il = U({
|
|
|
3195
3200
|
initialValue: String,
|
|
3196
3201
|
promise: Promise
|
|
3197
3202
|
},
|
|
3198
|
-
setup(
|
|
3199
|
-
const r = J(
|
|
3200
|
-
return
|
|
3203
|
+
setup(d) {
|
|
3204
|
+
const r = J(d.initialValue);
|
|
3205
|
+
return d.promise instanceof Promise && d.promise.then((a) => {
|
|
3201
3206
|
r.value = a;
|
|
3202
|
-
}), () =>
|
|
3207
|
+
}), () => Rt("div", r.value);
|
|
3203
3208
|
}
|
|
3204
3209
|
}), Al = ["onClick"], Bl = { key: 1 }, wl = /* @__PURE__ */ U({
|
|
3205
3210
|
__name: "aeria-crud-topbar",
|
|
3206
3211
|
props: {
|
|
3207
3212
|
collection: {}
|
|
3208
3213
|
},
|
|
3209
|
-
setup(
|
|
3210
|
-
const r =
|
|
3211
|
-
const { error: h, result: p } = await
|
|
3214
|
+
setup(d) {
|
|
3215
|
+
const r = d, t = Ae().currentRoute, l = Pe(), s = Q(() => r.collection ? Ke(r.collection, l) : typeof t.value.meta.collection == "string" ? Ke(t.value.meta.collection, l) : typeof t.value.params.collection == "string" ? Ke(t.value.params.collection, l) : null), u = async (v, c) => {
|
|
3216
|
+
const { error: h, result: p } = await c.$functions[v.badgeFunction]({
|
|
3212
3217
|
filters: v.filters
|
|
3213
3218
|
});
|
|
3214
3219
|
return h ? 0 : p;
|
|
3215
3220
|
};
|
|
3216
|
-
return (v,
|
|
3221
|
+
return (v, c) => s.value && s.value.description.filtersPresets ? (n(), g(Ol, {
|
|
3217
3222
|
key: 0,
|
|
3218
3223
|
dropdown: "",
|
|
3219
3224
|
query: "section"
|
|
@@ -3230,13 +3235,13 @@ const Ol = /* @__PURE__ */ X(Cl, [["__scopeId", "data-v-fb669290"]]), Il = U({
|
|
|
3230
3235
|
icon: p.icon
|
|
3231
3236
|
}, {
|
|
3232
3237
|
default: f(() => [
|
|
3233
|
-
W(k(p.label || e(
|
|
3238
|
+
W(k(p.label || e(L)(h, { plural: !0 })), 1)
|
|
3234
3239
|
]),
|
|
3235
3240
|
_: 2
|
|
3236
|
-
}, 1032, ["icon"])) : (n(), i("div", Bl, k(p.label || e(
|
|
3241
|
+
}, 1032, ["icon"])) : (n(), i("div", Bl, k(p.label || e(L)(h, { plural: !0 })), 1)),
|
|
3237
3242
|
p.badgeFunction ? (n(), g(be, { key: 2 }, {
|
|
3238
3243
|
default: f(() => [
|
|
3239
|
-
|
|
3244
|
+
R(e(Il), {
|
|
3240
3245
|
"initial-value": "0",
|
|
3241
3246
|
promise: u(p, s.value)
|
|
3242
3247
|
}, null, 8, ["promise"])
|
|
@@ -3258,14 +3263,14 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3258
3263
|
modelValue: {}
|
|
3259
3264
|
},
|
|
3260
3265
|
emits: ["update:modelValue"],
|
|
3261
|
-
setup(
|
|
3262
|
-
const r =
|
|
3263
|
-
ye(
|
|
3266
|
+
setup(d) {
|
|
3267
|
+
const r = d;
|
|
3268
|
+
ye(Fe, null);
|
|
3264
3269
|
const a = Qt(), t = Q(() => a(
|
|
3265
3270
|
r.modelValue.password,
|
|
3266
3271
|
r.modelValue.confirmation
|
|
3267
3272
|
));
|
|
3268
|
-
return (l, s) => (n(), g(
|
|
3273
|
+
return (l, s) => (n(), g(We, {
|
|
3269
3274
|
form: {
|
|
3270
3275
|
password: {
|
|
3271
3276
|
type: "string",
|
|
@@ -3288,10 +3293,10 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3288
3293
|
_: 3
|
|
3289
3294
|
}, 8, ["model-value"]));
|
|
3290
3295
|
}
|
|
3291
|
-
}), Ql = (
|
|
3296
|
+
}), Ql = (d, r = []) => ({
|
|
3292
3297
|
path: "/user",
|
|
3293
3298
|
name: "/builtin:user",
|
|
3294
|
-
component:
|
|
3299
|
+
component: d,
|
|
3295
3300
|
children: r.concat([
|
|
3296
3301
|
{
|
|
3297
3302
|
path: "invite/:id",
|
|
@@ -3306,7 +3311,7 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3306
3311
|
{
|
|
3307
3312
|
path: "signin",
|
|
3308
3313
|
name: "/user/signin",
|
|
3309
|
-
component: () => import("./signin-
|
|
3314
|
+
component: () => import("./signin-57158b4e.js"),
|
|
3310
3315
|
meta: {
|
|
3311
3316
|
title: "Autenticação"
|
|
3312
3317
|
}
|
|
@@ -3314,7 +3319,7 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3314
3319
|
{
|
|
3315
3320
|
path: "signup",
|
|
3316
3321
|
name: "/user/signup",
|
|
3317
|
-
component: () => import("./signup-
|
|
3322
|
+
component: () => import("./signup-e28a57c5.js"),
|
|
3318
3323
|
meta: {
|
|
3319
3324
|
title: "Registro"
|
|
3320
3325
|
}
|
|
@@ -3322,16 +3327,16 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3322
3327
|
{
|
|
3323
3328
|
path: "activation",
|
|
3324
3329
|
name: "/user/activation",
|
|
3325
|
-
component: () => import("./activation-
|
|
3330
|
+
component: () => import("./activation-32dfffac.js"),
|
|
3326
3331
|
meta: {
|
|
3327
3332
|
title: "Ativação"
|
|
3328
3333
|
}
|
|
3329
3334
|
}
|
|
3330
3335
|
])
|
|
3331
|
-
}), Gl = (
|
|
3336
|
+
}), Gl = (d, r = []) => ({
|
|
3332
3337
|
path: "/dashboard",
|
|
3333
3338
|
name: "/builtin:dashboard",
|
|
3334
|
-
component:
|
|
3339
|
+
component: d,
|
|
3335
3340
|
redirect: {
|
|
3336
3341
|
name: "/dashboard/"
|
|
3337
3342
|
},
|
|
@@ -3344,7 +3349,7 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3344
3349
|
name: "/dashboard/crud",
|
|
3345
3350
|
props: !0,
|
|
3346
3351
|
components: {
|
|
3347
|
-
default: () => import("./index-
|
|
3352
|
+
default: () => import("./index-2cb63da6.js"),
|
|
3348
3353
|
topbar: () => Promise.resolve().then(() => jl)
|
|
3349
3354
|
},
|
|
3350
3355
|
meta: {
|
|
@@ -3356,7 +3361,7 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3356
3361
|
name: "/dashboard/crud/:id",
|
|
3357
3362
|
props: !0,
|
|
3358
3363
|
components: {
|
|
3359
|
-
default: () => import("./_id_-
|
|
3364
|
+
default: () => import("./_id_-189c8d20.js")
|
|
3360
3365
|
},
|
|
3361
3366
|
meta: {
|
|
3362
3367
|
title: "%viewTitle%"
|
|
@@ -3374,7 +3379,7 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3374
3379
|
children: [
|
|
3375
3380
|
{
|
|
3376
3381
|
path: "profile",
|
|
3377
|
-
component: () => import("./index-
|
|
3382
|
+
component: () => import("./index-a48f4039.js"),
|
|
3378
3383
|
meta: {
|
|
3379
3384
|
title: "Meu perfil",
|
|
3380
3385
|
icon: "user-square"
|
|
@@ -3383,7 +3388,7 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3383
3388
|
{
|
|
3384
3389
|
path: "changepass",
|
|
3385
3390
|
name: "/dashboard/user/changepass",
|
|
3386
|
-
component: () => import("./index-
|
|
3391
|
+
component: () => import("./index-e3749b5b.js"),
|
|
3387
3392
|
meta: {
|
|
3388
3393
|
title: "Mudar senha",
|
|
3389
3394
|
icon: "lock"
|
|
@@ -3394,7 +3399,7 @@ const Sl = /* @__PURE__ */ X(wl, [["__scopeId", "data-v-85c3b087"]]), jl = /* @_
|
|
|
3394
3399
|
])
|
|
3395
3400
|
});
|
|
3396
3401
|
export {
|
|
3397
|
-
|
|
3402
|
+
We as A,
|
|
3398
3403
|
Il as B,
|
|
3399
3404
|
sl as C,
|
|
3400
3405
|
cl as D,
|
|
@@ -3407,13 +3412,13 @@ export {
|
|
|
3407
3412
|
Kn as c,
|
|
3408
3413
|
Ul as d,
|
|
3409
3414
|
la as e,
|
|
3410
|
-
|
|
3415
|
+
De as f,
|
|
3411
3416
|
Dl as g,
|
|
3412
3417
|
Be as h,
|
|
3413
3418
|
X as i,
|
|
3414
|
-
|
|
3419
|
+
Fl as j,
|
|
3415
3420
|
be as k,
|
|
3416
|
-
|
|
3421
|
+
ve as l,
|
|
3417
3422
|
fn as m,
|
|
3418
3423
|
Ce as n,
|
|
3419
3424
|
Ga as o,
|
|
@@ -3426,6 +3431,6 @@ export {
|
|
|
3426
3431
|
Oe as v,
|
|
3427
3432
|
Jn as w,
|
|
3428
3433
|
Uo as x,
|
|
3429
|
-
|
|
3434
|
+
Ge as y,
|
|
3430
3435
|
no as z
|
|
3431
3436
|
};
|