@aeria-ui/ui 0.0.189 → 0.0.191
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_-B2FesoLC.js → _id_-DVHwHOM4.js} +1 -1
- package/dist/{activation-BIQiJfJ_.js → activation-BLK5vWLb.js} +40 -37
- package/dist/components/form/aeria-form/aeria-form.vue.d.ts +4 -17
- package/dist/{index-DUgKo7Pc.js → index-BONQgktz.js} +1 -1
- package/dist/{index-bCup_QL9.js → index-BRw_qkT2.js} +1 -1
- package/dist/{index-CupcG__W.js → index-Bo3rVDNK.js} +570 -573
- package/dist/{index-Dd3GI3x2.js → index-CHb6ftk7.js} +1 -1
- package/dist/less/theme.less +1 -1
- package/dist/redefine-password-B6iR8Daw.js +135 -0
- package/dist/{signin-BIXY4QsX.js → signin-qyQWe20l.js} +1 -1
- package/dist/{signup-DfG4X951.js → signup-BV8XNoCW.js} +29 -29
- package/dist/ui.css +1 -1
- package/dist/ui.js +1 -1
- package/package.json +2 -2
- package/dist/redefine-password-B7AtXFmJ.js +0 -135
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as F, ref as Z, resolveDirective as ee, createElementBlock as s, openBlock as t, normalizeClass as G, Fragment as X, renderList as E, withDirectives as J, createCommentVNode as h, createTextVNode as Q, toDisplayString as C, unref as e, renderSlot as O, withModifiers as Ie, inject as re, computed as Y, createElementVNode as A, mergeProps as z, createBlock as g, withCtx as _, resolveDynamicComponent as me, useCssVars as xe, normalizeProps as ae, guardReactiveProps as he, Teleport as Ue, createVNode as M, onMounted as He, watch as
|
|
1
|
+
import { defineComponent as F, ref as Z, resolveDirective as ee, createElementBlock as s, openBlock as t, normalizeClass as G, Fragment as X, renderList as E, withDirectives as J, createCommentVNode as h, createTextVNode as Q, toDisplayString as C, unref as e, renderSlot as O, withModifiers as Ie, inject as re, computed as Y, createElementVNode as A, mergeProps as z, createBlock as g, withCtx as _, resolveDynamicComponent as me, useCssVars as xe, normalizeProps as ae, guardReactiveProps as he, Teleport as Ue, createVNode as M, onMounted as He, watch as oe, vModelDynamic as et, onBeforeMount as Je, normalizeStyle as ve, provide as fe, createSlots as se, vModelCheckbox as tt, onUnmounted as nt, resolveComponent as ot, Suspense as at, useSlots as lt, h as st } from "vue";
|
|
2
2
|
import { t as R, useI18n as it } from "@aeria-ui/i18n";
|
|
3
3
|
import { INSTANCE_VARS_SYMBOL as rt, useScrollObserver as De, useBreakpoints as Se, useMask as ut, PAGINATION_PER_PAGE_DEFAULTS as dt, API_URL as Ze, request as ct, useDebounce as Pe, convertToSearchQuery as pt, useParentCollectionStore as Ae, useCollectionStore as mt, useAction as ft, convertFromSearchQuery as vt, usePasswordPolicy as yt } from "@aeria-ui/core";
|
|
4
4
|
import { arraysIntersect as Ee, deepClone as ke, getReferenceProperty as ie, convertConditionToQuery as _t, freshItem as ht, isRequired as je, evaluateCondition as qe, deepMerge as Be } from "@aeriajs/common";
|
|
5
|
-
import { useStore as
|
|
5
|
+
import { useStore as ne, getStoreId as we, useParentStore as Me, STORE_ID as Te, getGlobalStateManager as Qe } from "@aeria-ui/state-management";
|
|
6
6
|
import { useRouter as Ce } from "vue-router";
|
|
7
7
|
import { isDocumentComplete as bt, getObjectKey as $t } from "@aeria-ui/utils";
|
|
8
8
|
const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
@@ -16,16 +16,16 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
16
16
|
headers: {}
|
|
17
17
|
},
|
|
18
18
|
setup(m) {
|
|
19
|
-
const i = Z(null),
|
|
20
|
-
return (
|
|
19
|
+
const i = Z(null), n = (o) => typeof o == "string" ? o : o.title;
|
|
20
|
+
return (o, a) => {
|
|
21
21
|
const d = ee("clickable");
|
|
22
22
|
return t(), s("div", {
|
|
23
23
|
class: G({
|
|
24
24
|
accordion: !0,
|
|
25
|
-
"accordion--padded": !
|
|
25
|
+
"accordion--padded": !o.noPadding
|
|
26
26
|
})
|
|
27
27
|
}, [
|
|
28
|
-
(t(!0), s(X, null, E(Object.keys(
|
|
28
|
+
(t(!0), s(X, null, E(Object.keys(o.$slots).filter((r) => r !== "default"), (r, f) => (t(), s("div", {
|
|
29
29
|
key: r,
|
|
30
30
|
class: "accordion__slot"
|
|
31
31
|
}, [
|
|
@@ -33,23 +33,23 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
33
33
|
class: "accordion__header",
|
|
34
34
|
onClick: (p) => i.value === r ? i.value = null : i.value = r
|
|
35
35
|
}, [
|
|
36
|
-
|
|
37
|
-
Q(" " + C(
|
|
36
|
+
o.enumerate ? (t(), s("span", kt, C(f + 1) + ". ", 1)) : h("", !0),
|
|
37
|
+
Q(" " + C(o.headers[r] ? n(o.headers[r]) : e(R)(r)), 1)
|
|
38
38
|
], 8, gt)), [
|
|
39
39
|
[d]
|
|
40
40
|
]),
|
|
41
41
|
i.value === r ? (t(), s("div", Vt, [
|
|
42
|
-
O(
|
|
42
|
+
O(o.$slots, r, {}, void 0, !0)
|
|
43
43
|
])) : h("", !0)
|
|
44
44
|
]))), 128))
|
|
45
45
|
], 2);
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
}), U = (m, i) => {
|
|
49
|
-
const
|
|
50
|
-
for (const [
|
|
51
|
-
o
|
|
52
|
-
return
|
|
49
|
+
const n = m.__vccOpts || m;
|
|
50
|
+
for (const [o, a] of i)
|
|
51
|
+
n[o] = a;
|
|
52
|
+
return n;
|
|
53
53
|
}, il = /* @__PURE__ */ U(Ct, [["__scopeId", "data-v-3ea933d4"]]), Ot = /* @__PURE__ */ F({
|
|
54
54
|
__name: "aeria-badge",
|
|
55
55
|
props: {
|
|
@@ -57,7 +57,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
57
57
|
alt: { type: Boolean }
|
|
58
58
|
},
|
|
59
59
|
setup(m) {
|
|
60
|
-
return (i,
|
|
60
|
+
return (i, n) => (t(), s("div", {
|
|
61
61
|
class: G([
|
|
62
62
|
"badge",
|
|
63
63
|
{ "badge--large": i.large },
|
|
@@ -74,8 +74,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
74
74
|
},
|
|
75
75
|
emits: ["click"],
|
|
76
76
|
setup(m, { emit: i }) {
|
|
77
|
-
const
|
|
78
|
-
|
|
77
|
+
const n = m, o = i, a = (d) => {
|
|
78
|
+
n.disabled || o("click", d);
|
|
79
79
|
};
|
|
80
80
|
return (d, r) => (t(), s("button", {
|
|
81
81
|
class: G([
|
|
@@ -101,11 +101,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
101
101
|
active: { type: Boolean }
|
|
102
102
|
},
|
|
103
103
|
setup(m) {
|
|
104
|
-
const i = m,
|
|
104
|
+
const i = m, n = re(rt, {}), o = typeof i.reactive == "boolean" ? i.reactive : re("iconReactive", !1), a = Y(() => i.icon?.includes(":") ? i.icon : `regular:${i.icon}`);
|
|
105
105
|
return (d, r) => (t(), s("a", {
|
|
106
106
|
class: G([
|
|
107
107
|
"icon",
|
|
108
|
-
{ "icon--reactive": e(
|
|
108
|
+
{ "icon--reactive": e(o) },
|
|
109
109
|
{ "icon--active": d.active },
|
|
110
110
|
d.$slots.default ? "icon--centered" : "icon--standalone"
|
|
111
111
|
])
|
|
@@ -125,7 +125,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
125
125
|
...d.fill ? { fill: d.fill } : {}
|
|
126
126
|
}), [
|
|
127
127
|
A("use", {
|
|
128
|
-
href: `${e(
|
|
128
|
+
href: `${e(n).base || "/"}assets/icons.svg#${a.value}`
|
|
129
129
|
}, null, 8, It)
|
|
130
130
|
], 16))
|
|
131
131
|
], 2),
|
|
@@ -149,7 +149,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
149
149
|
loading: { type: Boolean }
|
|
150
150
|
},
|
|
151
151
|
setup(m) {
|
|
152
|
-
const i = m,
|
|
152
|
+
const i = m, n = re("buttonVariant", i.variant) || "primary", o = (() => {
|
|
153
153
|
switch (!0) {
|
|
154
154
|
case i.small:
|
|
155
155
|
return "small";
|
|
@@ -161,8 +161,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
161
161
|
return (a, d) => (t(), g(ce, {
|
|
162
162
|
class: G([
|
|
163
163
|
"button",
|
|
164
|
-
`button--${e(o)}`,
|
|
165
164
|
`button--${e(n)}`,
|
|
165
|
+
`button--${e(o)}`,
|
|
166
166
|
{ "button--loading": a.loading }
|
|
167
167
|
]),
|
|
168
168
|
disabled: a.disabled || a.loading
|
|
@@ -192,7 +192,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
192
192
|
horizontal: { type: Boolean }
|
|
193
193
|
},
|
|
194
194
|
setup(m) {
|
|
195
|
-
return (i,
|
|
195
|
+
return (i, n) => (t(), s("div", {
|
|
196
196
|
class: G([
|
|
197
197
|
"card",
|
|
198
198
|
{ "card--inactive": i.inactive },
|
|
@@ -246,12 +246,12 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
246
246
|
},
|
|
247
247
|
emits: ["update:modelValue", "update:collapsed", "update:closeHint", "overlayClick", "close"],
|
|
248
248
|
setup(m, { emit: i }) {
|
|
249
|
-
const
|
|
250
|
-
|
|
249
|
+
const n = m, o = i, a = Z(n.collapsed), d = Z(null), { reachedEnd: r } = De(d), f = () => {
|
|
250
|
+
o("update:modelValue", !1), o("close");
|
|
251
251
|
}, p = () => {
|
|
252
|
-
|
|
252
|
+
o("overlayClick");
|
|
253
253
|
}, y = (u) => {
|
|
254
|
-
|
|
254
|
+
o("update:collapsed", u), a.value = u;
|
|
255
255
|
};
|
|
256
256
|
return (u, v) => {
|
|
257
257
|
const $ = ee("clickable"), b = ee("loading"), l = ee("overlay");
|
|
@@ -369,25 +369,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
369
369
|
"4078ef85": f.value.x,
|
|
370
370
|
"4078ef86": f.value.y
|
|
371
371
|
}));
|
|
372
|
-
const
|
|
372
|
+
const n = i, o = Z(null), a = Z(!1), d = (p) => p?.filter((y) => {
|
|
373
373
|
if (y.roles) {
|
|
374
|
-
const u =
|
|
374
|
+
const u = ne("user");
|
|
375
375
|
return Ee(y.roles, u.currentUser.roles);
|
|
376
376
|
}
|
|
377
377
|
return !0;
|
|
378
378
|
}), r = (p, y) => {
|
|
379
379
|
const u = y && ke(y);
|
|
380
|
-
p.click && p.click(u),
|
|
380
|
+
p.click && p.click(u), n("actionClick", {
|
|
381
381
|
action: p,
|
|
382
382
|
subject: u
|
|
383
383
|
}), a.value = !1;
|
|
384
384
|
}, f = Y(() => {
|
|
385
|
-
if (!
|
|
385
|
+
if (!o.value)
|
|
386
386
|
return {
|
|
387
387
|
x: 0,
|
|
388
388
|
y: 0
|
|
389
389
|
};
|
|
390
|
-
const p =
|
|
390
|
+
const p = o.value.getBoundingClientRect().top, y = o.value.getBoundingClientRect().left, u = o.value.offsetHeight;
|
|
391
391
|
return {
|
|
392
392
|
_: a.value,
|
|
393
393
|
x: Math.floor(y) + "px",
|
|
@@ -400,7 +400,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
400
400
|
Object.keys(p.$slots).some((v) => v !== "default") || p.actions !== void 0 && p.actions.length > 0 ? (t(), s("div", {
|
|
401
401
|
key: 0,
|
|
402
402
|
ref_key: "contextmenu",
|
|
403
|
-
ref:
|
|
403
|
+
ref: o,
|
|
404
404
|
class: "contextmenu"
|
|
405
405
|
}, [
|
|
406
406
|
A("a", {
|
|
@@ -502,29 +502,29 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
502
502
|
where: { default: "top" }
|
|
503
503
|
},
|
|
504
504
|
setup(m) {
|
|
505
|
-
const i = Se(),
|
|
506
|
-
return (
|
|
505
|
+
const i = Se(), n = Z(!1);
|
|
506
|
+
return (o, a) => e(i).md ? (t(), s("div", {
|
|
507
507
|
key: 0,
|
|
508
508
|
class: "info",
|
|
509
|
-
onMouseleave: a[1] || (a[1] = (d) =>
|
|
509
|
+
onMouseleave: a[1] || (a[1] = (d) => n.value = !1)
|
|
510
510
|
}, [
|
|
511
|
-
|
|
511
|
+
n.value ? (t(), s("div", {
|
|
512
512
|
key: 0,
|
|
513
513
|
class: G([
|
|
514
514
|
"info__bubble",
|
|
515
|
-
`info__bubble--${
|
|
515
|
+
`info__bubble--${o.where}`
|
|
516
516
|
])
|
|
517
517
|
}, [
|
|
518
518
|
A("div", Xt, [
|
|
519
|
-
O(
|
|
519
|
+
O(o.$slots, "text", {}, void 0, !0)
|
|
520
520
|
])
|
|
521
521
|
], 2)) : h("", !0),
|
|
522
522
|
A("div", {
|
|
523
|
-
onMouseover: a[0] || (a[0] = (d) =>
|
|
523
|
+
onMouseover: a[0] || (a[0] = (d) => n.value = !0)
|
|
524
524
|
}, [
|
|
525
|
-
O(
|
|
525
|
+
O(o.$slots, "default", {}, void 0, !0)
|
|
526
526
|
], 32)
|
|
527
|
-
], 32)) : O(
|
|
527
|
+
], 32)) : O(o.$slots, "default", { key: 1 }, void 0, !0);
|
|
528
528
|
}
|
|
529
529
|
}), Zt = /* @__PURE__ */ U(Jt, [["__scopeId", "data-v-15a38847"]]), Pt = { class: "input" }, Nt = {
|
|
530
530
|
key: 0,
|
|
@@ -532,10 +532,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
532
532
|
}, xt = {
|
|
533
533
|
key: 1,
|
|
534
534
|
class: "input__hint"
|
|
535
|
-
},
|
|
535
|
+
}, en = ["placeholder", "readonly", "value"], tn = ["value"], nn = {
|
|
536
536
|
key: 1,
|
|
537
537
|
class: "input__clipboard"
|
|
538
|
-
},
|
|
538
|
+
}, on = /* @__PURE__ */ F({
|
|
539
539
|
__name: "aeria-input",
|
|
540
540
|
props: {
|
|
541
541
|
modelValue: {},
|
|
@@ -549,10 +549,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
549
549
|
},
|
|
550
550
|
emits: ["update:modelValue", "input", "change", "clipboardCopy"],
|
|
551
551
|
setup(m, { emit: i }) {
|
|
552
|
-
const
|
|
553
|
-
await navigator.clipboard.writeText(
|
|
554
|
-
}, v = re("inputVariant",
|
|
555
|
-
name:
|
|
552
|
+
const n = m, o = i, a = n.property || {}, d = a.icon || "inputType" in a && a.inputType === "search", r = re("searchOnly", !1), f = re("innerInputLabel", !1), p = !r && (n.readOnly || a.readOnly), y = Z(!1), u = async (B) => {
|
|
553
|
+
await navigator.clipboard.writeText(B), o("clipboardCopy", B), y.value = !0;
|
|
554
|
+
}, v = re("inputVariant", n.variant) || "normal", $ = Object.assign(Object.assign({}, n), {
|
|
555
|
+
name: n.propertyName,
|
|
556
556
|
readonly: p,
|
|
557
557
|
type: (() => {
|
|
558
558
|
if ("type" in a)
|
|
@@ -563,7 +563,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
563
563
|
}
|
|
564
564
|
if (a.inputType)
|
|
565
565
|
return a.inputType;
|
|
566
|
-
switch (typeof
|
|
566
|
+
switch (typeof n.modelValue) {
|
|
567
567
|
case "string":
|
|
568
568
|
return "text";
|
|
569
569
|
case "number":
|
|
@@ -572,17 +572,17 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
572
572
|
return "text";
|
|
573
573
|
}
|
|
574
574
|
})(),
|
|
575
|
-
placeholder: f ? a.description ||
|
|
575
|
+
placeholder: f ? a.description || n.propertyName : a.placeholder
|
|
576
576
|
});
|
|
577
577
|
"type" in a && ((a.type === "number" || a.type === "integer") && (a.minimum && ($.min = a.minimum), a.exclusiveMinimum && ($.min = a.exclusiveMinimum + 1), a.maximum && ($.max = a.maximum), a.exclusiveMaximum && ($.max = a.exclusiveMaximum - 1)), a.type === "string" && ((a.format === "date" || a.format === "date-time") && ($.type = !r && a.format === "date-time" ? "datetime-local" : "date"), $.minlength = a.minLength, $.maxlength = a.maxLength)), $.type === "text" && r && ($.type = "search"), He(() => {
|
|
578
|
-
|
|
578
|
+
n.modelValue !== null && H(n.modelValue);
|
|
579
579
|
});
|
|
580
|
-
const b = (
|
|
580
|
+
const b = (B) => {
|
|
581
581
|
let P;
|
|
582
|
-
if (typeof
|
|
583
|
-
P =
|
|
584
|
-
else if (
|
|
585
|
-
P =
|
|
582
|
+
if (typeof B == "string")
|
|
583
|
+
P = B;
|
|
584
|
+
else if (B instanceof Date)
|
|
585
|
+
P = B.toISOString();
|
|
586
586
|
else
|
|
587
587
|
return "";
|
|
588
588
|
switch ($.type) {
|
|
@@ -593,59 +593,59 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
593
593
|
default:
|
|
594
594
|
throw new Error();
|
|
595
595
|
}
|
|
596
|
-
}, l = Z(""), T =
|
|
597
|
-
|
|
596
|
+
}, l = Z(""), T = n.property?.type === "string" && n.property.mask ? ut(n.property.mask) : null;
|
|
597
|
+
oe(() => n.modelValue, (B) => {
|
|
598
598
|
l.value = (() => {
|
|
599
599
|
if (T)
|
|
600
|
-
return
|
|
600
|
+
return B ? T.enmask(String(B), void 0, {
|
|
601
601
|
defaultValue: !0
|
|
602
602
|
}) : "";
|
|
603
603
|
switch ($.type) {
|
|
604
604
|
case "date":
|
|
605
605
|
case "datetime-local":
|
|
606
|
-
return b(
|
|
606
|
+
return b(B);
|
|
607
607
|
}
|
|
608
|
-
switch (
|
|
608
|
+
switch (B) {
|
|
609
609
|
case null:
|
|
610
610
|
case void 0:
|
|
611
611
|
return "";
|
|
612
612
|
default:
|
|
613
|
-
return
|
|
613
|
+
return B;
|
|
614
614
|
}
|
|
615
615
|
})();
|
|
616
616
|
}, {
|
|
617
617
|
immediate: !0
|
|
618
618
|
});
|
|
619
|
-
const V = (
|
|
619
|
+
const V = (B) => typeof l.value == "string" && n.property?.type === "string" && T !== null ? (l.value = T.enmask(l.value, void 0, {
|
|
620
620
|
defaultValue: !0
|
|
621
|
-
}),
|
|
621
|
+
}), n.property.maskedValue === !0 ? l.value : T.unmask(l.value)) : B, H = (B) => {
|
|
622
622
|
const P = (() => {
|
|
623
|
-
if (typeof
|
|
624
|
-
return
|
|
623
|
+
if (typeof B != "string")
|
|
624
|
+
return B;
|
|
625
625
|
switch ($.type) {
|
|
626
626
|
case "number":
|
|
627
627
|
case "integer":
|
|
628
|
-
return
|
|
628
|
+
return B === "" ? null : Number(B);
|
|
629
629
|
case "date":
|
|
630
630
|
case "date-time":
|
|
631
|
-
return
|
|
631
|
+
return B === "" ? null : typeof B == "string" ? new Date(B) : B;
|
|
632
632
|
default:
|
|
633
|
-
return V(
|
|
633
|
+
return V(B);
|
|
634
634
|
}
|
|
635
635
|
})();
|
|
636
|
-
|
|
637
|
-
},
|
|
638
|
-
const P =
|
|
636
|
+
o("input", P), o("update:modelValue", P);
|
|
637
|
+
}, I = (B) => {
|
|
638
|
+
const P = B.target.value;
|
|
639
639
|
l.value = P, H(P);
|
|
640
640
|
};
|
|
641
|
-
return (
|
|
641
|
+
return (B, P) => {
|
|
642
642
|
const x = ee("focus"), ue = ee("clickable");
|
|
643
643
|
return t(), s("label", Pt, [
|
|
644
644
|
e(f) ? h("", !0) : (t(), s("div", Nt, [
|
|
645
|
-
|
|
645
|
+
B.$slots.default ? O(B.$slots, "default", { key: 0 }, void 0, !0) : O(B.$slots, "description", { key: 1 }, void 0, !0)
|
|
646
646
|
])),
|
|
647
|
-
|
|
648
|
-
O(
|
|
647
|
+
B.$slots.hint ? (t(), s("div", xt, [
|
|
648
|
+
O(B.$slots, "hint", {}, void 0, !0)
|
|
649
649
|
])) : h("", !0),
|
|
650
650
|
"element" in e(a) && e(a).element === "textarea" ? (t(), s("div", {
|
|
651
651
|
key: 2,
|
|
@@ -658,13 +658,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
658
658
|
J(A("textarea", {
|
|
659
659
|
placeholder: e($).placeholder,
|
|
660
660
|
readonly: e($).readonly,
|
|
661
|
-
value:
|
|
661
|
+
value: B.modelValue,
|
|
662
662
|
class: G([
|
|
663
663
|
"input__textarea",
|
|
664
664
|
`input__input--${e(v)}`
|
|
665
665
|
]),
|
|
666
|
-
onInput:
|
|
667
|
-
}, null, 42,
|
|
666
|
+
onInput: I
|
|
667
|
+
}, null, 42, en), [
|
|
668
668
|
[x, e(a).focus]
|
|
669
669
|
])
|
|
670
670
|
], 2)) : (t(), s("div", {
|
|
@@ -683,9 +683,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
683
683
|
{ "input__input--icon": e(d) },
|
|
684
684
|
{ "input__input--readOnly": e(p) }
|
|
685
685
|
],
|
|
686
|
-
onInput:
|
|
687
|
-
onChange: P[0] || (P[0] = (de) =>
|
|
688
|
-
}), null, 16,
|
|
686
|
+
onInput: I,
|
|
687
|
+
onChange: P[0] || (P[0] = (de) => o("change", de))
|
|
688
|
+
}), null, 16, tn), [
|
|
689
689
|
[x, e(a).focus]
|
|
690
690
|
]),
|
|
691
691
|
e(d) ? (t(), g(D, {
|
|
@@ -696,11 +696,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
696
696
|
`input__icon--${e(v)}`
|
|
697
697
|
])
|
|
698
698
|
}, null, 8, ["icon", "class"])) : h("", !0),
|
|
699
|
-
e(p) ? (t(), s("div",
|
|
699
|
+
e(p) ? (t(), s("div", nn, [
|
|
700
700
|
M(Zt, null, {
|
|
701
|
-
text: _(() => P[2] || (P[2] = [
|
|
701
|
+
text: _(() => [...P[2] || (P[2] = [
|
|
702
702
|
Q("Copiar", -1)
|
|
703
|
-
])),
|
|
703
|
+
])]),
|
|
704
704
|
default: _(() => [
|
|
705
705
|
y.value ? (t(), g(D, {
|
|
706
706
|
key: 0,
|
|
@@ -710,7 +710,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
710
710
|
key: 1,
|
|
711
711
|
reactive: "",
|
|
712
712
|
icon: "clipboard",
|
|
713
|
-
onClick: P[1] || (P[1] = Ie((de) => u(String(
|
|
713
|
+
onClick: P[1] || (P[1] = Ie((de) => u(String(B.modelValue || "")), ["prevent"]))
|
|
714
714
|
}, null, 512)), [
|
|
715
715
|
[ue]
|
|
716
716
|
])
|
|
@@ -722,10 +722,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
722
722
|
]);
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
}), be = /* @__PURE__ */ U(
|
|
725
|
+
}), be = /* @__PURE__ */ U(on, [["__scopeId", "data-v-6e5fdbe7"]]), an = {
|
|
726
726
|
key: 1,
|
|
727
727
|
value: ""
|
|
728
|
-
},
|
|
728
|
+
}, ln = ["value", "data-selected"], sn = /* @__PURE__ */ F({
|
|
729
729
|
__name: "aeria-select",
|
|
730
730
|
props: {
|
|
731
731
|
modelValue: {},
|
|
@@ -741,17 +741,17 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
741
741
|
},
|
|
742
742
|
emits: ["update:modelValue", "change"],
|
|
743
743
|
setup(m, { emit: i }) {
|
|
744
|
-
const
|
|
745
|
-
|
|
744
|
+
const n = m, o = i, a = Z(null), d = n.property, r = (u) => {
|
|
745
|
+
o("update:modelValue", u), o("change", u);
|
|
746
746
|
}, f = (u) => {
|
|
747
|
-
u === "" || u === null ? r(null) :
|
|
748
|
-
}, p = (u) => Array.isArray(
|
|
749
|
-
return
|
|
750
|
-
if (u &&
|
|
747
|
+
u === "" || u === null ? r(null) : n.booleanRef ? r(u === "true") : r(u);
|
|
748
|
+
}, p = (u) => Array.isArray(n.modelValue) ? n.modelValue.includes(u) : n.modelValue === u, y = Y(() => n.multiple ? typeof n.multiple == "number" ? n.multiple : 5 : 1);
|
|
749
|
+
return oe(a, (u) => {
|
|
750
|
+
if (u && n.required && !n.modelValue) {
|
|
751
751
|
const v = u.querySelector("option")?.value;
|
|
752
|
-
v &&
|
|
752
|
+
v && o("update:modelValue", v);
|
|
753
753
|
}
|
|
754
|
-
}),
|
|
754
|
+
}), n.multiple && oe(() => n.modelValue, (u) => {
|
|
755
755
|
if (!a.value)
|
|
756
756
|
return;
|
|
757
757
|
const v = a.value.querySelector('option[data-selected="true"]');
|
|
@@ -777,19 +777,19 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
777
777
|
key: 0,
|
|
778
778
|
icon: e(d).icon
|
|
779
779
|
}, null, 8, ["icon"])) : h("", !0),
|
|
780
|
-
!
|
|
780
|
+
!n.multiple && !u.required ? (t(), s("option", an, C(e(R)("none")), 1)) : h("", !0),
|
|
781
781
|
(t(!0), s(X, null, E(e(d) && "enum" in e(d) ? e(d).enum : [], ($) => (t(), s("option", {
|
|
782
782
|
key: String($),
|
|
783
783
|
value: $,
|
|
784
784
|
"data-selected": p($)
|
|
785
|
-
}, C(e(d)?.translate ? e(R)($) : $), 9,
|
|
785
|
+
}, C(e(d)?.translate ? e(R)($) : $), 9, ln))), 128)),
|
|
786
786
|
O(u.$slots, "default", {}, void 0, !0)
|
|
787
787
|
], 16));
|
|
788
788
|
}
|
|
789
|
-
}), Ge = /* @__PURE__ */ U(
|
|
789
|
+
}), Ge = /* @__PURE__ */ U(sn, [["__scopeId", "data-v-0c1bbf94"]]), rn = { class: "pagination" }, un = { class: "pagination__arrows" }, dn = ["value"], cn = {
|
|
790
790
|
key: 0,
|
|
791
791
|
class: "pagination__summary"
|
|
792
|
-
},
|
|
792
|
+
}, pn = /* @__PURE__ */ F({
|
|
793
793
|
__name: "aeria-pagination",
|
|
794
794
|
props: {
|
|
795
795
|
pagination: {},
|
|
@@ -797,27 +797,27 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
797
797
|
},
|
|
798
798
|
emits: ["paginate"],
|
|
799
799
|
setup(m, { emit: i }) {
|
|
800
|
-
const
|
|
801
|
-
get: () => Math.floor(
|
|
800
|
+
const n = m, o = i, a = Y({
|
|
801
|
+
get: () => Math.floor(n.pagination.offset / n.pagination.limit),
|
|
802
802
|
set: (p) => {
|
|
803
|
-
|
|
803
|
+
n.pagination.offset = p * n.pagination.limit;
|
|
804
804
|
}
|
|
805
805
|
}), d = Y({
|
|
806
|
-
get: () =>
|
|
806
|
+
get: () => n.pagination.limit,
|
|
807
807
|
set: (p) => {
|
|
808
|
-
|
|
808
|
+
n.pagination.limit = Number(p);
|
|
809
809
|
}
|
|
810
|
-
}), r = Z(a.value ? a.value + 1 : 1), f = Y(() => Math.ceil(
|
|
811
|
-
return
|
|
810
|
+
}), r = Z(a.value ? a.value + 1 : 1), f = Y(() => Math.ceil(n.pagination.recordsTotal / n.pagination.limit));
|
|
811
|
+
return oe([
|
|
812
812
|
a,
|
|
813
813
|
d
|
|
814
814
|
], ([p]) => {
|
|
815
|
-
r.value = p + 1,
|
|
815
|
+
r.value = p + 1, o("paginate", {
|
|
816
816
|
offset: a.value * d.value,
|
|
817
817
|
limit: d.value
|
|
818
818
|
});
|
|
819
|
-
}), (p, y) => (t(), s("div",
|
|
820
|
-
A("div",
|
|
819
|
+
}), (p, y) => (t(), s("div", rn, [
|
|
820
|
+
A("div", un, [
|
|
821
821
|
M(ce, {
|
|
822
822
|
disabled: a.value === 0,
|
|
823
823
|
onClick: y[0] || (y[0] = (u) => a.value = 0)
|
|
@@ -867,12 +867,12 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
867
867
|
(t(!0), s(X, null, E(e(dt), (u) => (t(), s("option", {
|
|
868
868
|
key: `limit-${u}`,
|
|
869
869
|
value: u
|
|
870
|
-
}, C(u), 9,
|
|
870
|
+
}, C(u), 9, dn))), 128))
|
|
871
871
|
]),
|
|
872
872
|
_: 1
|
|
873
873
|
}, 8, ["modelValue"])
|
|
874
874
|
]),
|
|
875
|
-
p.noSummary ? h("", !0) : (t(), s("div",
|
|
875
|
+
p.noSummary ? h("", !0) : (t(), s("div", cn, [
|
|
876
876
|
Q(C(e(R)("Page")) + " ", 1),
|
|
877
877
|
(t(), g(be, {
|
|
878
878
|
key: a.value,
|
|
@@ -891,10 +891,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
891
891
|
]))
|
|
892
892
|
]));
|
|
893
893
|
}
|
|
894
|
-
}),
|
|
894
|
+
}), mn = /* @__PURE__ */ U(pn, [["__scopeId", "data-v-8cd299be"]]), fn = { class: "checkbox__text" }, vn = ["innerHTML"], yn = { class: "checkbox__hint" }, _n = ["innerHTML"], hn = {
|
|
895
895
|
inheritAttrs: !1
|
|
896
|
-
},
|
|
897
|
-
...
|
|
896
|
+
}, bn = /* @__PURE__ */ F({
|
|
897
|
+
...hn,
|
|
898
898
|
__name: "aeria-checkbox",
|
|
899
899
|
props: {
|
|
900
900
|
modelValue: {},
|
|
@@ -909,41 +909,41 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
909
909
|
},
|
|
910
910
|
emits: ["update:modelValue", "change"],
|
|
911
911
|
setup(m, { emit: i }) {
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
914
|
-
switch (
|
|
912
|
+
const n = m, o = n.property, a = n.readOnly || o?.readOnly, d = (() => {
|
|
913
|
+
if (o && "type" in o)
|
|
914
|
+
switch (o.type) {
|
|
915
915
|
case "array":
|
|
916
916
|
case "boolean":
|
|
917
917
|
return "checkbox";
|
|
918
918
|
}
|
|
919
919
|
return "radio";
|
|
920
|
-
})(), r = i, f =
|
|
920
|
+
})(), r = i, f = n.value || !1, p = Y({
|
|
921
921
|
get: () => {
|
|
922
|
-
if (
|
|
923
|
-
if ("type" in
|
|
924
|
-
return !!
|
|
925
|
-
if ("items" in
|
|
926
|
-
return
|
|
922
|
+
if (o) {
|
|
923
|
+
if ("type" in o && o.type === "boolean")
|
|
924
|
+
return !!n.value;
|
|
925
|
+
if ("items" in o)
|
|
926
|
+
return n.modelValue?.includes(n.value);
|
|
927
927
|
}
|
|
928
|
-
return
|
|
928
|
+
return n.modelValue === n.value;
|
|
929
929
|
},
|
|
930
930
|
set: () => {
|
|
931
931
|
if (!a) {
|
|
932
|
-
if (
|
|
933
|
-
if ("type" in
|
|
934
|
-
r("update:modelValue", !
|
|
932
|
+
if (o) {
|
|
933
|
+
if ("type" in o && o.type === "boolean") {
|
|
934
|
+
r("update:modelValue", !n.modelValue);
|
|
935
935
|
return;
|
|
936
936
|
}
|
|
937
|
-
if ("items" in
|
|
938
|
-
if (
|
|
939
|
-
r("update:modelValue",
|
|
937
|
+
if ("items" in o) {
|
|
938
|
+
if (n.modelValue?.includes(f)) {
|
|
939
|
+
r("update:modelValue", n.modelValue.filter((u) => u !== f));
|
|
940
940
|
return;
|
|
941
941
|
}
|
|
942
|
-
r("update:modelValue", [f].concat(
|
|
942
|
+
r("update:modelValue", [f].concat(n.modelValue || []));
|
|
943
943
|
return;
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
r("update:modelValue",
|
|
946
|
+
r("update:modelValue", n.value);
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
}), y = (u) => {
|
|
@@ -969,18 +969,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
969
969
|
}), null, 16), [
|
|
970
970
|
[et, p.value]
|
|
971
971
|
]),
|
|
972
|
-
A("div",
|
|
972
|
+
A("div", fn, [
|
|
973
973
|
A("div", null, [
|
|
974
974
|
u.$slots.description ? O(u.$slots, "description", { key: 0 }, void 0, !0) : e(f) ? (t(), s("div", {
|
|
975
975
|
key: 1,
|
|
976
|
-
innerHTML: e(
|
|
977
|
-
}, null, 8,
|
|
976
|
+
innerHTML: e(o)?.translate ? e(R)(e(f)) : e(f)
|
|
977
|
+
}, null, 8, vn)) : O(u.$slots, "default", { key: 2 }, void 0, !0)
|
|
978
978
|
]),
|
|
979
|
-
A("div",
|
|
980
|
-
u.$slots.hint ? O(u.$slots, "hint", { key: 0 }, void 0, !0) : e(
|
|
979
|
+
A("div", yn, [
|
|
980
|
+
u.$slots.hint ? O(u.$slots, "hint", { key: 0 }, void 0, !0) : e(o)?.hint ? (t(), s("div", {
|
|
981
981
|
key: 1,
|
|
982
|
-
innerHTML: e(
|
|
983
|
-
}, null, 8,
|
|
982
|
+
innerHTML: e(o).hint
|
|
983
|
+
}, null, 8, _n)) : h("", !0)
|
|
984
984
|
])
|
|
985
985
|
])
|
|
986
986
|
], 2)), [
|
|
@@ -988,10 +988,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
988
988
|
]);
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
|
-
}), $
|
|
991
|
+
}), $n = /* @__PURE__ */ U(bn, [["__scopeId", "data-v-7e6efc77"]]), gn = {
|
|
992
992
|
inheritAttrs: !1
|
|
993
|
-
},
|
|
994
|
-
...
|
|
993
|
+
}, kn = /* @__PURE__ */ F({
|
|
994
|
+
...gn,
|
|
995
995
|
__name: "aeria-options",
|
|
996
996
|
props: {
|
|
997
997
|
modelValue: {},
|
|
@@ -1005,13 +1005,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1005
1005
|
},
|
|
1006
1006
|
emits: ["update:modelValue"],
|
|
1007
1007
|
setup(m, { emit: i }) {
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1008
|
+
const n = m, o = i, a = n.readOnly || n.property.readOnly, d = "items" in n.property ? n.property.items.enum : n.property.enum, r = (f) => {
|
|
1009
|
+
o("update:modelValue", f);
|
|
1010
1010
|
};
|
|
1011
1011
|
return Je(() => {
|
|
1012
|
-
|
|
1012
|
+
n.modelValue || o(
|
|
1013
1013
|
"update:modelValue",
|
|
1014
|
-
"items" in
|
|
1014
|
+
"items" in n.property ? [] : ""
|
|
1015
1015
|
);
|
|
1016
1016
|
}), (f, p) => (t(), s("div", {
|
|
1017
1017
|
class: "options",
|
|
@@ -1024,7 +1024,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1024
1024
|
key: `option-${y}`,
|
|
1025
1025
|
class: "options__checkbox"
|
|
1026
1026
|
}, [
|
|
1027
|
-
M($
|
|
1027
|
+
M($n, z({ ref_for: !0 }, {
|
|
1028
1028
|
value: y,
|
|
1029
1029
|
readOnly: e(a),
|
|
1030
1030
|
property: f.property
|
|
@@ -1035,10 +1035,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1035
1035
|
]))), 128))
|
|
1036
1036
|
], 4));
|
|
1037
1037
|
}
|
|
1038
|
-
}),
|
|
1038
|
+
}), Vn = /* @__PURE__ */ U(kn, [["__scopeId", "data-v-b22b359b"]]), Cn = { class: "switch-wrapper" }, On = { key: 1 }, An = {
|
|
1039
1039
|
inheritAttrs: !1
|
|
1040
|
-
},
|
|
1041
|
-
...
|
|
1040
|
+
}, In = /* @__PURE__ */ F({
|
|
1041
|
+
...An,
|
|
1042
1042
|
__name: "aeria-switch",
|
|
1043
1043
|
props: {
|
|
1044
1044
|
modelValue: {},
|
|
@@ -1051,12 +1051,12 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1051
1051
|
},
|
|
1052
1052
|
emits: ["update:modelValue", "change"],
|
|
1053
1053
|
setup(m, { emit: i }) {
|
|
1054
|
-
const
|
|
1055
|
-
d || (
|
|
1054
|
+
const n = m, o = i, a = n.property, d = n.readOnly || a?.readOnly, r = () => {
|
|
1055
|
+
d || (o("change", !n.modelValue), o("update:modelValue", !n.modelValue));
|
|
1056
1056
|
};
|
|
1057
1057
|
return (f, p) => {
|
|
1058
1058
|
const y = ee("clickable");
|
|
1059
|
-
return t(), s("div",
|
|
1059
|
+
return t(), s("div", Cn, [
|
|
1060
1060
|
J((t(), s("a", {
|
|
1061
1061
|
class: G([
|
|
1062
1062
|
"switch",
|
|
@@ -1077,14 +1077,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1077
1077
|
blocked: e(d)
|
|
1078
1078
|
}]
|
|
1079
1079
|
]),
|
|
1080
|
-
f.$slots.default ? O(f.$slots, "default", { key: 0 }, void 0, !0) : (t(), s("div",
|
|
1080
|
+
f.$slots.default ? O(f.$slots, "default", { key: 0 }, void 0, !0) : (t(), s("div", On, C(e(a)?.description || f.propertyName), 1))
|
|
1081
1081
|
]);
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
|
-
}),
|
|
1084
|
+
}), Bn = /* @__PURE__ */ U(In, [["__scopeId", "data-v-ae45597d"]]), Sn = { class: "picture" }, wn = { style: { position: "fixed", top: "50%", left: "50%", transform: "translate(-50%, -50%)" } }, Tn = ["src", "alt"], jn = {
|
|
1085
1085
|
key: 0,
|
|
1086
1086
|
class: "picture__meta"
|
|
1087
|
-
},
|
|
1087
|
+
}, Rn = ["src"], qn = { key: 5 }, Ln = /* @__PURE__ */ F({
|
|
1088
1088
|
__name: "aeria-picture",
|
|
1089
1089
|
props: {
|
|
1090
1090
|
url: {},
|
|
@@ -1099,37 +1099,37 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1099
1099
|
height: { default: "100%" }
|
|
1100
1100
|
},
|
|
1101
1101
|
setup(m) {
|
|
1102
|
-
const i = m,
|
|
1102
|
+
const i = m, n = Y(() => i.fileId ? `${Ze}/file/${i.fileId}/picture` : i.url || i.modelValue), o = Z(!1);
|
|
1103
1103
|
return (a, d) => {
|
|
1104
1104
|
const r = ee("overlay");
|
|
1105
|
-
return t(), s("figure",
|
|
1106
|
-
|
|
1105
|
+
return t(), s("figure", Sn, [
|
|
1106
|
+
n.value && o.value ? (t(), g(Ue, {
|
|
1107
1107
|
key: 0,
|
|
1108
1108
|
to: "main"
|
|
1109
1109
|
}, [
|
|
1110
|
-
J((t(), s("div",
|
|
1110
|
+
J((t(), s("div", wn, [
|
|
1111
1111
|
A("img", {
|
|
1112
|
-
src:
|
|
1112
|
+
src: n.value,
|
|
1113
1113
|
alt: a.alt,
|
|
1114
1114
|
style: {
|
|
1115
1115
|
maxHeight: "60vh",
|
|
1116
1116
|
objectFit: "contain"
|
|
1117
1117
|
},
|
|
1118
|
-
onClick: d[0] || (d[0] = (f) =>
|
|
1119
|
-
}, null, 8,
|
|
1120
|
-
a.meta?.owner ? (t(), s("div",
|
|
1118
|
+
onClick: d[0] || (d[0] = (f) => o.value = !0)
|
|
1119
|
+
}, null, 8, Tn),
|
|
1120
|
+
a.meta?.owner ? (t(), s("div", jn, C(a.t("created_by")) + " " + C(a.meta.owner.name) + " em " + C(a.formatDateTime(a.meta.created_at, { hours: !0 })), 1)) : h("", !0)
|
|
1121
1121
|
])), [
|
|
1122
1122
|
[r, {
|
|
1123
1123
|
layer: 60,
|
|
1124
1124
|
click: () => {
|
|
1125
|
-
|
|
1125
|
+
o.value = !1;
|
|
1126
1126
|
}
|
|
1127
1127
|
}]
|
|
1128
1128
|
])
|
|
1129
1129
|
])) : h("", !0),
|
|
1130
|
-
|
|
1130
|
+
n.value ? (t(), s("img", {
|
|
1131
1131
|
key: 1,
|
|
1132
|
-
src:
|
|
1132
|
+
src: n.value,
|
|
1133
1133
|
class: G([
|
|
1134
1134
|
"picture__image",
|
|
1135
1135
|
{ "picture__image--bordered": a.bordered },
|
|
@@ -1141,9 +1141,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1141
1141
|
height: a.height
|
|
1142
1142
|
}),
|
|
1143
1143
|
onClick: d[1] || (d[1] = () => {
|
|
1144
|
-
a.expandable && (
|
|
1144
|
+
a.expandable && (o.value = !0);
|
|
1145
1145
|
})
|
|
1146
|
-
}, null, 14,
|
|
1146
|
+
}, null, 14, Rn)) : a.$slots.fallback ? O(a.$slots, "fallback", { key: 2 }, void 0, !0) : a.$slots.default ? O(a.$slots, "default", { key: 3 }, void 0, !0) : (t(), s("svg", {
|
|
1147
1147
|
key: 4,
|
|
1148
1148
|
class: G(["picture__background", [
|
|
1149
1149
|
{ "picture__image--bordered": a.bordered }
|
|
@@ -1156,7 +1156,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1156
1156
|
width: a.width,
|
|
1157
1157
|
height: a.height
|
|
1158
1158
|
})
|
|
1159
|
-
}, d[2] || (d[2] = [
|
|
1159
|
+
}, [...d[2] || (d[2] = [
|
|
1160
1160
|
A("line", {
|
|
1161
1161
|
x1: "0",
|
|
1162
1162
|
y1: "0",
|
|
@@ -1173,23 +1173,23 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1173
1173
|
stroke: "#000",
|
|
1174
1174
|
"vector-effect": "non-scaling-stroke"
|
|
1175
1175
|
}, null, -1)
|
|
1176
|
-
]), 6)),
|
|
1177
|
-
a.$slots.caption ? (t(), s("figcaption",
|
|
1176
|
+
])], 6)),
|
|
1177
|
+
a.$slots.caption ? (t(), s("figcaption", qn, [
|
|
1178
1178
|
O(a.$slots, "caption", {}, void 0, !0)
|
|
1179
1179
|
])) : h("", !0)
|
|
1180
1180
|
]);
|
|
1181
1181
|
};
|
|
1182
1182
|
}
|
|
1183
|
-
}), Le = /* @__PURE__ */ U(
|
|
1183
|
+
}), Le = /* @__PURE__ */ U(Ln, [["__scopeId", "data-v-6705b19f"]]), Mn = { class: "item" }, zn = { class: "item__presentation" }, Fn = {
|
|
1184
1184
|
key: 1,
|
|
1185
1185
|
class: "item__name"
|
|
1186
|
-
},
|
|
1186
|
+
}, En = { class: "item__size" }, Un = /* @__PURE__ */ F({
|
|
1187
1187
|
__name: "aeria-file-item",
|
|
1188
1188
|
props: {
|
|
1189
1189
|
modelValue: {}
|
|
1190
1190
|
},
|
|
1191
1191
|
setup(m) {
|
|
1192
|
-
const i = m,
|
|
1192
|
+
const i = m, n = "_id" in i.modelValue ? i.modelValue : i.modelValue.file, o = (a) => {
|
|
1193
1193
|
const d = a === 0 ? 0 : Math.floor(Math.log(a) / Math.log(1024));
|
|
1194
1194
|
return `${(a / Math.pow(1024, d)).toFixed(2)} ${[
|
|
1195
1195
|
"B",
|
|
@@ -1199,39 +1199,39 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1199
1199
|
"TB"
|
|
1200
1200
|
][d]}`;
|
|
1201
1201
|
};
|
|
1202
|
-
return (a, d) => (t(), s("div",
|
|
1203
|
-
"_id" in e(
|
|
1202
|
+
return (a, d) => (t(), s("div", Mn, [
|
|
1203
|
+
"_id" in e(n) && e(n).type.startsWith("image/") ? (t(), g(Le, {
|
|
1204
1204
|
key: 0,
|
|
1205
1205
|
bordered: "",
|
|
1206
1206
|
expandable: "",
|
|
1207
|
-
alt: e(
|
|
1208
|
-
url: e(
|
|
1207
|
+
alt: e(n).name,
|
|
1208
|
+
url: e(n).link,
|
|
1209
1209
|
class: "item__picture"
|
|
1210
1210
|
}, null, 8, ["alt", "url"])) : h("", !0),
|
|
1211
|
-
A("div",
|
|
1212
|
-
"_id" in e(
|
|
1211
|
+
A("div", zn, [
|
|
1212
|
+
"_id" in e(n) ? (t(), g(D, {
|
|
1213
1213
|
key: 0,
|
|
1214
1214
|
icon: "arrow-square-out",
|
|
1215
|
-
href: e(
|
|
1215
|
+
href: e(n).link,
|
|
1216
1216
|
target: "_blank",
|
|
1217
1217
|
class: "item__name item__name--link"
|
|
1218
1218
|
}, {
|
|
1219
1219
|
default: _(() => [
|
|
1220
|
-
Q(C(e(
|
|
1220
|
+
Q(C(e(n).name), 1)
|
|
1221
1221
|
]),
|
|
1222
1222
|
_: 1
|
|
1223
|
-
}, 8, ["href"])) : (t(), s("div",
|
|
1224
|
-
A("div",
|
|
1223
|
+
}, 8, ["href"])) : (t(), s("div", Fn, C(e(n).name), 1)),
|
|
1224
|
+
A("div", En, C(o(e(n).size)), 1)
|
|
1225
1225
|
]),
|
|
1226
1226
|
A("div", null, [
|
|
1227
1227
|
O(a.$slots, "default", {}, void 0, !0)
|
|
1228
1228
|
])
|
|
1229
1229
|
]));
|
|
1230
1230
|
}
|
|
1231
|
-
}),
|
|
1231
|
+
}), Hn = /* @__PURE__ */ U(Un, [["__scopeId", "data-v-85a82246"]]), Dn = { class: "file" }, Qn = ["accept", "multiple"], Gn = {
|
|
1232
1232
|
key: 1,
|
|
1233
1233
|
class: "file__list"
|
|
1234
|
-
},
|
|
1234
|
+
}, Wn = /* @__PURE__ */ F({
|
|
1235
1235
|
__name: "aeria-file",
|
|
1236
1236
|
props: {
|
|
1237
1237
|
modelValue: {},
|
|
@@ -1247,9 +1247,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1247
1247
|
},
|
|
1248
1248
|
emits: ["update:content", "change", "update:modelValue"],
|
|
1249
1249
|
setup(m, { emit: i }) {
|
|
1250
|
-
const
|
|
1251
|
-
if (
|
|
1252
|
-
return Array.isArray(
|
|
1250
|
+
const n = m, o = n.property && ie(n.property), a = i, r = we() ? Me() : null, f = n.multiple || n.property && "type" in n.property && n.property.type === "array", p = Y(() => {
|
|
1251
|
+
if (n.modelValue)
|
|
1252
|
+
return Array.isArray(n.modelValue) ? n.modelValue : [n.modelValue];
|
|
1253
1253
|
}), y = ($) => new Promise((b) => {
|
|
1254
1254
|
const l = new FileReader();
|
|
1255
1255
|
l.onload = () => b(l.result), l.readAsArrayBuffer($);
|
|
@@ -1261,7 +1261,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1261
1261
|
for (const T of b) {
|
|
1262
1262
|
const V = await y(T);
|
|
1263
1263
|
if (r) {
|
|
1264
|
-
const { data: { error: H, result:
|
|
1264
|
+
const { data: { error: H, result: I } } = await ct(`${Ze}/${r.$id}/upload?name=${T.name}`, V, {
|
|
1265
1265
|
params: {
|
|
1266
1266
|
method: "POST",
|
|
1267
1267
|
headers: {
|
|
@@ -1273,7 +1273,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1273
1273
|
if (H)
|
|
1274
1274
|
return;
|
|
1275
1275
|
l.unshift({
|
|
1276
|
-
tempId:
|
|
1276
|
+
tempId: I.tempId,
|
|
1277
1277
|
file: T
|
|
1278
1278
|
});
|
|
1279
1279
|
} else
|
|
@@ -1281,26 +1281,26 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1281
1281
|
file: T
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
1284
|
-
f ? a("update:modelValue", Array.isArray(
|
|
1284
|
+
f ? a("update:modelValue", Array.isArray(n.modelValue) ? l.concat(n.modelValue) : l) : a("update:modelValue", l[0]), a("update:content", l), a("change", l);
|
|
1285
1285
|
}, v = async ($) => {
|
|
1286
|
-
if (!
|
|
1286
|
+
if (!n.modelValue)
|
|
1287
1287
|
throw new Error();
|
|
1288
|
-
const b = Array.isArray(
|
|
1288
|
+
const b = Array.isArray(n.modelValue) ? n.modelValue.filter((l, T) => T !== $) : [];
|
|
1289
1289
|
f ? a("update:modelValue", b) : a("update:modelValue", null), a("update:content", b), a("change", b);
|
|
1290
1290
|
};
|
|
1291
1291
|
return ($, b) => {
|
|
1292
1292
|
const l = ee("clickable");
|
|
1293
|
-
return t(), s("div",
|
|
1293
|
+
return t(), s("div", Dn, [
|
|
1294
1294
|
$.readOnly ? h("", !0) : (t(), s("input", {
|
|
1295
1295
|
key: 0,
|
|
1296
1296
|
ref: "file",
|
|
1297
1297
|
type: "file",
|
|
1298
|
-
accept: e(
|
|
1298
|
+
accept: e(o)?.accept?.join(","),
|
|
1299
1299
|
multiple: e(f),
|
|
1300
1300
|
onChange: u
|
|
1301
|
-
}, null, 40,
|
|
1302
|
-
p.value && p.value.length > 0 ? (t(), s("div",
|
|
1303
|
-
(t(!0), s(X, null, E(p.value, (T, V) => (t(), g(
|
|
1301
|
+
}, null, 40, Qn)),
|
|
1302
|
+
p.value && p.value.length > 0 ? (t(), s("div", Gn, [
|
|
1303
|
+
(t(!0), s(X, null, E(p.value, (T, V) => (t(), g(Hn, {
|
|
1304
1304
|
key: "_id" in T ? String(T._id) : T.file.name,
|
|
1305
1305
|
"model-value": T
|
|
1306
1306
|
}, {
|
|
@@ -1320,22 +1320,22 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1320
1320
|
]);
|
|
1321
1321
|
};
|
|
1322
1322
|
}
|
|
1323
|
-
}),
|
|
1323
|
+
}), Yn = /* @__PURE__ */ U(Wn, [["__scopeId", "data-v-9950a715"]]), Kn = { class: "container" }, Xn = {
|
|
1324
1324
|
key: 1,
|
|
1325
1325
|
class: "container__footer"
|
|
1326
|
-
},
|
|
1326
|
+
}, Jn = /* @__PURE__ */ F({
|
|
1327
1327
|
__name: "aeria-search-container",
|
|
1328
1328
|
props: {
|
|
1329
1329
|
observeScroll: { type: Boolean }
|
|
1330
1330
|
},
|
|
1331
1331
|
emits: ["endReached"],
|
|
1332
1332
|
setup(m, { emit: i }) {
|
|
1333
|
-
const
|
|
1333
|
+
const n = m, o = i, a = Z(null), d = n.observeScroll ? De(a, {
|
|
1334
1334
|
antecipate: 100
|
|
1335
1335
|
}).reachedEnd : null;
|
|
1336
|
-
return d !== null &&
|
|
1337
|
-
r &&
|
|
1338
|
-
}), (r, f) => (t(), s("div",
|
|
1336
|
+
return d !== null && oe(d, (r) => {
|
|
1337
|
+
r && o("endReached", r);
|
|
1338
|
+
}), (r, f) => (t(), s("div", Kn, [
|
|
1339
1339
|
r.$slots.default ? (t(), s("div", {
|
|
1340
1340
|
key: 0,
|
|
1341
1341
|
ref_key: "containerEl",
|
|
@@ -1344,12 +1344,12 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1344
1344
|
}, [
|
|
1345
1345
|
O(r.$slots, "default", {}, void 0, !0)
|
|
1346
1346
|
], 512)) : h("", !0),
|
|
1347
|
-
r.$slots.footer ? (t(), s("div",
|
|
1347
|
+
r.$slots.footer ? (t(), s("div", Xn, [
|
|
1348
1348
|
O(r.$slots, "footer", {}, void 0, !0)
|
|
1349
1349
|
])) : h("", !0)
|
|
1350
1350
|
]));
|
|
1351
1351
|
}
|
|
1352
|
-
}), We = /* @__PURE__ */ U(
|
|
1352
|
+
}), We = /* @__PURE__ */ U(Jn, [["__scopeId", "data-v-c86e2d2a"]]), Zn = { class: "item__values" }, Pn = /* @__PURE__ */ F({
|
|
1353
1353
|
__name: "aeria-search-item",
|
|
1354
1354
|
props: {
|
|
1355
1355
|
item: {},
|
|
@@ -1360,25 +1360,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1360
1360
|
},
|
|
1361
1361
|
emits: ["update:modelValue", "change"],
|
|
1362
1362
|
setup(m, { emit: i }) {
|
|
1363
|
-
const
|
|
1363
|
+
const n = Ce(), o = m, a = i, d = o.property, r = ie(d);
|
|
1364
1364
|
Me();
|
|
1365
|
-
const f = Y(() =>
|
|
1365
|
+
const f = Y(() => o.modelValue ? Array.isArray(o.modelValue) ? Array.isArray(o.modelValue) && Object.values(o.modelValue).some(({ _id: v }) => o.item._id === v) : o.modelValue._id === o.item._id : !1), p = () => {
|
|
1366
1366
|
if (f.value)
|
|
1367
1367
|
return;
|
|
1368
1368
|
const v = (b) => b.filter((l) => !!l._id);
|
|
1369
1369
|
let $;
|
|
1370
|
-
"items" in d ?
|
|
1370
|
+
"items" in d ? o.modelValue ? $ = v(Array.isArray(o.modelValue) ? o.modelValue : [o.modelValue]) : $ = [] : $ = o.modelValue, Array.isArray($) ? a("update:modelValue", $.concat([o.item])) : a("update:modelValue", o.item), a("change", o.item);
|
|
1371
1371
|
}, y = async (v) => {
|
|
1372
1372
|
r.purge && v?.purge;
|
|
1373
1373
|
const $ = () => {
|
|
1374
|
-
const b = Array.isArray(
|
|
1374
|
+
const b = Array.isArray(o.modelValue) ? Array.from(o.modelValue) : [], l = b.findIndex((T) => T._id === o.item._id);
|
|
1375
1375
|
return b.splice(l, 1), b;
|
|
1376
1376
|
};
|
|
1377
1377
|
a("update:modelValue", "items" in d ? $() : null);
|
|
1378
1378
|
}, u = () => {
|
|
1379
|
-
if (
|
|
1380
|
-
|
|
1381
|
-
path: `/dashboard/c/${r.$ref}/${
|
|
1379
|
+
if (o.readOnly) {
|
|
1380
|
+
n.push({
|
|
1381
|
+
path: `/dashboard/c/${r.$ref}/${o.item._id}`
|
|
1382
1382
|
});
|
|
1383
1383
|
return;
|
|
1384
1384
|
}
|
|
@@ -1394,7 +1394,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1394
1394
|
onClick: u
|
|
1395
1395
|
}, [
|
|
1396
1396
|
O(v.$slots, "default", {}, void 0, !0),
|
|
1397
|
-
A("div",
|
|
1397
|
+
A("div", Zn, [
|
|
1398
1398
|
(t(!0), s(X, null, E(v.indexes, (l, T) => (t(), s("div", {
|
|
1399
1399
|
key: `index-${v.item._id}-${T}`,
|
|
1400
1400
|
class: "item__value"
|
|
@@ -1410,10 +1410,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1410
1410
|
]);
|
|
1411
1411
|
};
|
|
1412
1412
|
}
|
|
1413
|
-
}), Fe = /* @__PURE__ */ U(
|
|
1413
|
+
}), Fe = /* @__PURE__ */ U(Pn, [["__scopeId", "data-v-63761718"]]), Nn = { class: "search__panel" }, xn = { key: 1 }, eo = { key: 0 }, to = { key: 1 }, no = { class: "search__summary" }, oo = {
|
|
1414
1414
|
key: 1,
|
|
1415
1415
|
class: "search"
|
|
1416
|
-
},
|
|
1416
|
+
}, ao = { key: 0 }, Re = 10, lo = /* @__PURE__ */ F({
|
|
1417
1417
|
__name: "aeria-search",
|
|
1418
1418
|
props: {
|
|
1419
1419
|
modelValue: {},
|
|
@@ -1428,24 +1428,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1428
1428
|
},
|
|
1429
1429
|
emits: ["update:modelValue", "change", "update:panel"],
|
|
1430
1430
|
setup(m, { emit: i }) {
|
|
1431
|
-
const
|
|
1432
|
-
fe(Te, ie(
|
|
1433
|
-
const v = Z(
|
|
1431
|
+
const n = m, o = ne("meta"), a = ie(n.property), d = n.panel !== void 0 ? Y(() => n.panel) : Z(!1), r = i, f = ne(ie(n.property).$ref), p = we(), y = p ? Me() : null, u = a.indexes;
|
|
1432
|
+
fe(Te, ie(n.property).$ref), fe("innerInputLabel", !0), fe("omitInputLabels", !0);
|
|
1433
|
+
const v = Z(n.modelValue), $ = Z({
|
|
1434
1434
|
data: [],
|
|
1435
1435
|
pagination: {}
|
|
1436
|
-
}), b = Y(() => $.value.data), l = Y(() => $.value.pagination), T = Z(0), V = Z(!1), H = Z(""),
|
|
1436
|
+
}), b = Y(() => $.value.data), l = Y(() => $.value.pagination), T = Z(0), V = Z(!1), H = Z(""), I = () => {
|
|
1437
1437
|
const L = {};
|
|
1438
1438
|
if (p) {
|
|
1439
1439
|
const N = e(p);
|
|
1440
1440
|
L[N] = y;
|
|
1441
1441
|
}
|
|
1442
1442
|
return a.constraints ? _t(a.constraints, L) : {};
|
|
1443
|
-
},
|
|
1443
|
+
}, B = () => {
|
|
1444
1444
|
b.value.length < l.value.recordsTotal && (T.value += 1, x());
|
|
1445
1445
|
}, P = async () => H.value.length === 0 ? f.$actions.custom("getAll", {
|
|
1446
1446
|
limit: Re,
|
|
1447
1447
|
offset: T.value * Re,
|
|
1448
|
-
filters:
|
|
1448
|
+
filters: I()
|
|
1449
1449
|
}) : f.$actions.custom("getAll", {
|
|
1450
1450
|
limit: Re,
|
|
1451
1451
|
offset: T.value * Re,
|
|
@@ -1454,14 +1454,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1454
1454
|
$search: `"${H.value}"`,
|
|
1455
1455
|
$caseSensitive: !1
|
|
1456
1456
|
},
|
|
1457
|
-
...
|
|
1457
|
+
...I()
|
|
1458
1458
|
}
|
|
1459
1459
|
}), x = async () => {
|
|
1460
1460
|
if (f.loading.getAll)
|
|
1461
1461
|
return;
|
|
1462
1462
|
const { error: L, result: N } = await P();
|
|
1463
1463
|
if (L) {
|
|
1464
|
-
|
|
1464
|
+
o.$actions.spawnToast({
|
|
1465
1465
|
text: "Request failed",
|
|
1466
1466
|
icon: "warning"
|
|
1467
1467
|
});
|
|
@@ -1479,13 +1479,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1479
1479
|
}, pe = () => {
|
|
1480
1480
|
T.value = 0, $.value.data.splice(0), "effect" in d ? r("update:panel", !1) : d.value = !1;
|
|
1481
1481
|
};
|
|
1482
|
-
|
|
1482
|
+
oe(() => H.value.length, (L, N) => {
|
|
1483
1483
|
L && !N && x();
|
|
1484
1484
|
}), He(() => {
|
|
1485
|
-
|
|
1485
|
+
n.selectOnly && x();
|
|
1486
1486
|
});
|
|
1487
1487
|
const k = (L) => {
|
|
1488
|
-
v.value = L,
|
|
1488
|
+
v.value = L, n.selectOnly || r("update:modelValue", L);
|
|
1489
1489
|
}, j = () => {
|
|
1490
1490
|
pe(), r("update:modelValue", v.value);
|
|
1491
1491
|
};
|
|
@@ -1518,7 +1518,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1518
1518
|
})
|
|
1519
1519
|
]),
|
|
1520
1520
|
default: _(() => [
|
|
1521
|
-
A("div",
|
|
1521
|
+
A("div", Nn, [
|
|
1522
1522
|
M(be, z({
|
|
1523
1523
|
modelValue: H.value,
|
|
1524
1524
|
"onUpdate:modelValue": N[0] || (N[0] = (w) => H.value = w)
|
|
@@ -1532,7 +1532,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1532
1532
|
b.value.length ? (t(), g(We, {
|
|
1533
1533
|
key: 0,
|
|
1534
1534
|
"observe-scroll": "",
|
|
1535
|
-
onEndReached:
|
|
1535
|
+
onEndReached: B
|
|
1536
1536
|
}, {
|
|
1537
1537
|
default: _(() => [
|
|
1538
1538
|
(t(!0), s(X, null, E(b.value, (w) => (t(), g(Fe, z({ ref_for: !0 }, {
|
|
@@ -1546,19 +1546,19 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1546
1546
|
}), null, 16, ["modelValue"]))), 128))
|
|
1547
1547
|
]),
|
|
1548
1548
|
_: 1
|
|
1549
|
-
})) : (t(), s("div",
|
|
1550
|
-
V.value ? (t(), s("div",
|
|
1549
|
+
})) : (t(), s("div", xn, [
|
|
1550
|
+
V.value ? (t(), s("div", eo, C(e(R)("searching", { capitalize: !0 })) + "... ", 1)) : !e(f).loading.getAll && Object.values(H.value).filter((w) => !!w).length > 0 && !("items" in L.property && L.modelValue?.length || !Array.isArray(L.modelValue) && L.modelValue?._id) ? (t(), s("div", to, C(e(R)("no_results", { capitalize: !0 })), 1)) : h("", !0)
|
|
1551
1551
|
]))
|
|
1552
1552
|
]),
|
|
1553
|
-
A("div",
|
|
1553
|
+
A("div", no, C(e(R)("showing", { capitalize: !0 })) + " " + C(b.value.length) + " " + C(e(R)("of")) + " " + C(l.value.recordsTotal), 1)
|
|
1554
1554
|
]),
|
|
1555
1555
|
_: 1
|
|
1556
1556
|
}, 8, ["title", "model-value"])
|
|
1557
1557
|
])) : h("", !0),
|
|
1558
|
-
L.selectOnly ? h("", !0) : (t(), s("div",
|
|
1558
|
+
L.selectOnly ? h("", !0) : (t(), s("div", oo, [
|
|
1559
1559
|
M(We, null, se({
|
|
1560
1560
|
default: _(() => [
|
|
1561
|
-
"items" in L.property ? (t(), s("div",
|
|
1561
|
+
"items" in L.property ? (t(), s("div", ao, [
|
|
1562
1562
|
(t(!0), s(X, null, E(L.modelValue, (w) => (t(), g(Fe, z({ ref_for: !0 }, {
|
|
1563
1563
|
item: w,
|
|
1564
1564
|
indexes: e(u),
|
|
@@ -1601,20 +1601,20 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1601
1601
|
]);
|
|
1602
1602
|
};
|
|
1603
1603
|
}
|
|
1604
|
-
}),
|
|
1605
|
-
const
|
|
1606
|
-
options:
|
|
1604
|
+
}), so = /* @__PURE__ */ U(lo, [["__scopeId", "data-v-7a35daa0"]]), Ye = (m, i) => {
|
|
1605
|
+
const n = "items" in m ? m.items : m, o = {
|
|
1606
|
+
options: Vn,
|
|
1607
1607
|
select: Ge,
|
|
1608
|
-
switch:
|
|
1609
|
-
file:
|
|
1610
|
-
search:
|
|
1608
|
+
switch: Bn,
|
|
1609
|
+
file: Yn,
|
|
1610
|
+
search: so,
|
|
1611
1611
|
input: be,
|
|
1612
1612
|
form: ze
|
|
1613
1613
|
}, a = (() => {
|
|
1614
|
-
if ("type" in
|
|
1615
|
-
if (
|
|
1614
|
+
if ("type" in n) {
|
|
1615
|
+
if (n.type === "object")
|
|
1616
1616
|
return "form";
|
|
1617
|
-
if (
|
|
1617
|
+
if (n.type === "boolean")
|
|
1618
1618
|
return "switch";
|
|
1619
1619
|
}
|
|
1620
1620
|
if ("element" in m) {
|
|
@@ -1624,35 +1624,35 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1624
1624
|
return "select";
|
|
1625
1625
|
}
|
|
1626
1626
|
const d = ie(m);
|
|
1627
|
-
return d ? d.inline ? "form" : d.$ref === "file" ? "file" : "search" : "items" in m && m.uniqueItems ? "options" : "enum" in
|
|
1627
|
+
return d ? d.inline ? "form" : d.$ref === "file" ? "file" : "search" : "items" in m && m.uniqueItems ? "options" : "enum" in n ? "select" : "input";
|
|
1628
1628
|
})();
|
|
1629
|
-
return i[a] ? i[a] :
|
|
1630
|
-
},
|
|
1629
|
+
return i[a] ? i[a] : o[a];
|
|
1630
|
+
}, io = (m, i, n) => {
|
|
1631
1631
|
m ??= [];
|
|
1632
|
-
const
|
|
1633
|
-
if ("$ref" in
|
|
1634
|
-
const a =
|
|
1632
|
+
const o = "items" in i ? i.items : i;
|
|
1633
|
+
if ("$ref" in o) {
|
|
1634
|
+
const a = ne(o.$ref, n), d = ke(a.$freshItem);
|
|
1635
1635
|
return m.push(d);
|
|
1636
1636
|
}
|
|
1637
|
-
return "properties" in
|
|
1638
|
-
},
|
|
1637
|
+
return "properties" in o ? m.push(ht(o)) : "type" in o && o.type === "boolean" ? m.push({}) : m.push(null);
|
|
1638
|
+
}, ro = (m, i) => {
|
|
1639
1639
|
m.splice(i, 1);
|
|
1640
|
-
},
|
|
1640
|
+
}, uo = {
|
|
1641
1641
|
key: 0,
|
|
1642
1642
|
class: "form__header"
|
|
1643
|
-
},
|
|
1643
|
+
}, co = { class: "form__fieldset" }, po = { key: 0 }, mo = ["innerHTML"], fo = ["onInput"], vo = { key: 4 }, yo = { value: "true" }, _o = { value: "false" }, ho = {
|
|
1644
1644
|
key: 5,
|
|
1645
1645
|
style: { display: "grid", "row-gap": ".4rem" }
|
|
1646
|
-
},
|
|
1646
|
+
}, bo = { key: 0 }, $o = {
|
|
1647
1647
|
key: 1,
|
|
1648
1648
|
class: "form__array"
|
|
1649
|
-
},
|
|
1649
|
+
}, go = {
|
|
1650
1650
|
key: 7,
|
|
1651
1651
|
class: "form__validation-error"
|
|
1652
|
-
},
|
|
1652
|
+
}, ko = { key: 0 }, Vo = { key: 1 }, Co = {
|
|
1653
1653
|
key: 2,
|
|
1654
1654
|
class: "form__footer"
|
|
1655
|
-
},
|
|
1655
|
+
}, Oo = /* @__PURE__ */ F({
|
|
1656
1656
|
__name: "aeria-form",
|
|
1657
1657
|
props: {
|
|
1658
1658
|
modelValue: {},
|
|
@@ -1661,12 +1661,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1661
1661
|
parentPropertyName: {},
|
|
1662
1662
|
parentCollection: {},
|
|
1663
1663
|
readOnly: { type: Boolean },
|
|
1664
|
-
required: { type:
|
|
1664
|
+
required: { type: Boolean, default: void 0 },
|
|
1665
1665
|
form: {},
|
|
1666
1666
|
collection: {},
|
|
1667
1667
|
searchOnly: { type: Boolean, default: !1 },
|
|
1668
1668
|
layout: {},
|
|
1669
|
-
formLayout: {},
|
|
1670
1669
|
formComponents: {},
|
|
1671
1670
|
propertyComponents: {},
|
|
1672
1671
|
omitFormHeader: { type: Boolean },
|
|
@@ -1680,21 +1679,21 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1680
1679
|
},
|
|
1681
1680
|
emits: ["update:modelValue", "input", "change", "clipboardCopy"],
|
|
1682
1681
|
setup(m, { emit: i }) {
|
|
1683
|
-
const
|
|
1682
|
+
const n = Qe(), o = m, a = i;
|
|
1684
1683
|
Je(() => {
|
|
1685
|
-
|
|
1684
|
+
o.modelValue || a("update:modelValue", o.property && "items" in o.property ? [] : {});
|
|
1686
1685
|
});
|
|
1687
|
-
const d =
|
|
1686
|
+
const d = o.property && ie(o.property), r = d ? d.$ref : o.collection || we(), f = o.readOnly || o.property?.readOnly, p = r ? ne(e(r)) : null;
|
|
1688
1687
|
!r && process.env.NODE_ENV !== "production" && console.warn("aeria-form was used without providing storeId or specifying collection prop, some features may not work as intended");
|
|
1689
1688
|
const y = Z(!1), u = Y(() => {
|
|
1690
|
-
const c = !
|
|
1689
|
+
const c = !o.form && o.property ? "type" in o.property && o.property.type === "object" ? "properties" in o.property ? o.property.properties : void 0 : p?.properties : o.form;
|
|
1691
1690
|
if (!c)
|
|
1692
1691
|
return;
|
|
1693
1692
|
const w = {};
|
|
1694
|
-
if (
|
|
1693
|
+
if (o.includeId && (w._id = {
|
|
1695
1694
|
type: "string",
|
|
1696
1695
|
readOnly: !0
|
|
1697
|
-
}),
|
|
1696
|
+
}), o.includeTimestamps) {
|
|
1698
1697
|
const K = {
|
|
1699
1698
|
type: "string",
|
|
1700
1699
|
format: "date-time",
|
|
@@ -1704,35 +1703,35 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1704
1703
|
c.created_at || (w.created_at = K), c.created_at || (w.updated_at = K);
|
|
1705
1704
|
}
|
|
1706
1705
|
return Object.assign(w, c), w;
|
|
1707
|
-
}), v = Y(() =>
|
|
1708
|
-
const w = re(c,
|
|
1709
|
-
return
|
|
1710
|
-
}, b = Y(() =>
|
|
1711
|
-
r && fe(Te, r), fe("searchOnly",
|
|
1712
|
-
const
|
|
1706
|
+
}), v = Y(() => o.layout || p?.description.formLayout), $ = (c) => {
|
|
1707
|
+
const w = re(c, o[c]);
|
|
1708
|
+
return o[c] && fe(c, o[c]), w;
|
|
1709
|
+
}, b = Y(() => o.validationErrors !== null ? o.validationErrors : p?.validationErrors), l = $("formComponents") || {}, T = $("propertyComponents") || {}, V = $("omitFormHeader"), H = $("omitInputLabels"), I = $("innerInputLabel");
|
|
1710
|
+
r && fe(Te, r), fe("searchOnly", o.searchOnly);
|
|
1711
|
+
const B = (c) => u.value ? Object.entries(u.value).filter(([w, K]) => !K.noForm && c([
|
|
1713
1712
|
w,
|
|
1714
1713
|
K
|
|
1715
1714
|
])) : null, P = (c, w) => {
|
|
1716
|
-
if (
|
|
1715
|
+
if (o.searchOnly || !r || o.includeId && c === "_id" || o.includeTimestamps && w.isTimestamp)
|
|
1717
1716
|
return !0;
|
|
1718
|
-
const K =
|
|
1717
|
+
const K = o.property && "properties" in o.property ? o.property.form : p?.description?.form;
|
|
1719
1718
|
return !K || K.includes(c);
|
|
1720
|
-
}, x =
|
|
1721
|
-
const K = [], te = v.value?.fields?.[c]
|
|
1719
|
+
}, x = B(([c, w]) => P(c, w) && (!w.readOnly || o.readOnly)), ue = Se(), de = {}, $e = (c, w) => {
|
|
1720
|
+
const K = [], te = v.value?.fields?.[c];
|
|
1722
1721
|
if (!w)
|
|
1723
1722
|
return;
|
|
1724
|
-
if (te?.if && !
|
|
1723
|
+
if (te?.if && !o.searchOnly) {
|
|
1725
1724
|
const q = qe(
|
|
1726
|
-
|
|
1725
|
+
o.modelValue,
|
|
1727
1726
|
te.if
|
|
1728
1727
|
);
|
|
1729
|
-
q.satisfied || (de[c] && (p ?
|
|
1728
|
+
q.satisfied || (de[c] && (p ? o.modelValue[c] = typeof p.$freshItem[c] == "object" ? ke(p.$freshItem[c]) : p.$freshItem[c] : o.modelValue[c] = [
|
|
1730
1729
|
void 0,
|
|
1731
1730
|
null
|
|
1732
|
-
].includes(
|
|
1731
|
+
].includes(o.modelValue[c]) ? null : o.modelValue[c].constructor()), K.push("display: none")), de[c] = q.satisfied;
|
|
1733
1732
|
}
|
|
1734
|
-
const
|
|
1735
|
-
return K.push(`--field-span: ${
|
|
1733
|
+
const S = ue.value.md && te?.span || 6;
|
|
1734
|
+
return K.push(`--field-span: ${S}`, "grid-column: span var(--field-span) / span var(--field-span)"), te && (te.verticalSpacing && K.push([
|
|
1736
1735
|
`--vertical-spacing: ${te.verticalSpacing}`,
|
|
1737
1736
|
"padding: var(--vertical-spacing) 0"
|
|
1738
1737
|
]), te.separator && K.push([
|
|
@@ -1742,25 +1741,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1742
1741
|
"margin: 1rem 0"
|
|
1743
1742
|
])), K.join(";");
|
|
1744
1743
|
}, pe = (c) => c === null || c instanceof Object && !Object.keys(c).length, k = Y(() => {
|
|
1745
|
-
if (typeof
|
|
1746
|
-
switch (
|
|
1744
|
+
if (typeof o.required < "u")
|
|
1745
|
+
switch (o.required) {
|
|
1747
1746
|
case !0:
|
|
1748
1747
|
return;
|
|
1749
1748
|
case !1:
|
|
1750
1749
|
return [];
|
|
1751
1750
|
default:
|
|
1752
|
-
return
|
|
1751
|
+
return o.required;
|
|
1753
1752
|
}
|
|
1754
|
-
return
|
|
1755
|
-
}), j = Y(() =>
|
|
1756
|
-
|
|
1757
|
-
|
|
1753
|
+
return o.property && "required" in o.property ? o.property.required : o.collection ? p.description.required : void 0;
|
|
1754
|
+
}), j = Y(() => o.form ? bt(
|
|
1755
|
+
o.modelValue,
|
|
1756
|
+
o.form,
|
|
1758
1757
|
k.value,
|
|
1759
1758
|
p?.description
|
|
1760
1759
|
) : !0), L = (c, w) => b.value?.[c] && (typeof b.value[c].index != "number" || b.value[c].index === w) ? b.value[c].errors : null, N = (c) => {
|
|
1761
|
-
if (!
|
|
1760
|
+
if (!o.focus || f || c.readOnly)
|
|
1762
1761
|
return !1;
|
|
1763
|
-
if (!
|
|
1762
|
+
if (!o.parentPropertyName && !o.parentCollection && !y.value)
|
|
1764
1763
|
return y.value = !0, !0;
|
|
1765
1764
|
};
|
|
1766
1765
|
return (c, w) => {
|
|
@@ -1769,100 +1768,100 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1769
1768
|
class: "form",
|
|
1770
1769
|
style: ve(`row-gap: ${e(V) ? ".8rem" : "var(--form-internal-gap, 1.6rem);"};`)
|
|
1771
1770
|
}, [
|
|
1772
|
-
c.$slots.header && !e(V) ? (t(), s("header",
|
|
1771
|
+
c.$slots.header && !e(V) ? (t(), s("header", uo, [
|
|
1773
1772
|
O(c.$slots, "header", {}, void 0, !0)
|
|
1774
1773
|
])) : h("", !0),
|
|
1775
1774
|
O(c.$slots, "default", {}, void 0, !0),
|
|
1776
|
-
A("fieldset",
|
|
1777
|
-
(t(!0), s(X, null, E(e(x), ([
|
|
1778
|
-
key: `field-${
|
|
1779
|
-
style: ve($e(
|
|
1775
|
+
A("fieldset", co, [
|
|
1776
|
+
(t(!0), s(X, null, E(e(x), ([S, q]) => (t(), s("div", {
|
|
1777
|
+
key: `field-${S}`,
|
|
1778
|
+
style: ve($e(S, q)),
|
|
1780
1779
|
class: G({
|
|
1781
1780
|
form__field: !0,
|
|
1782
1781
|
"form__field--form": "properties" in q
|
|
1783
1782
|
})
|
|
1784
1783
|
}, [
|
|
1785
|
-
(!("type" in q) || q.type !== "boolean" || c.searchOnly) && !q.noLabel && !e(H) && !e(
|
|
1784
|
+
(!("type" in q) || q.type !== "boolean" || c.searchOnly) && !q.noLabel && !e(H) && !e(I) ? (t(), s("label", po, [
|
|
1786
1785
|
A("div", {
|
|
1787
1786
|
class: G({
|
|
1788
1787
|
"form__field-label": !0,
|
|
1789
1788
|
"form__field-label--section": "items" in q ? "properties" in q.items : "properties" in q,
|
|
1790
|
-
"form__field-required-hint": c.highlightRequired && !e(f) && !c.searchOnly && (!k.value || e(je)(
|
|
1789
|
+
"form__field-required-hint": c.highlightRequired && !e(f) && !c.searchOnly && (!k.value || e(je)(S, k.value, c.modelValue))
|
|
1791
1790
|
})
|
|
1792
|
-
}, C(q.description || e(R)(
|
|
1791
|
+
}, C(q.description || e(R)(S)), 3),
|
|
1793
1792
|
q.hint ? (t(), s("div", {
|
|
1794
1793
|
key: 0,
|
|
1795
1794
|
innerHTML: q.hint
|
|
1796
|
-
}, null, 8,
|
|
1795
|
+
}, null, 8, mo)) : h("", !0)
|
|
1797
1796
|
])) : h("", !0),
|
|
1798
|
-
c.$slots[`field-${
|
|
1797
|
+
c.$slots[`field-${S}`] ? O(c.$slots, `field-${S}`, z({
|
|
1799
1798
|
key: 1,
|
|
1800
1799
|
ref_for: !0
|
|
1801
1800
|
}, {
|
|
1802
1801
|
readOnly: e(f),
|
|
1803
1802
|
property: q,
|
|
1804
|
-
propertyName:
|
|
1803
|
+
propertyName: S,
|
|
1805
1804
|
modelValue: c.modelValue
|
|
1806
|
-
}), void 0, !0) : c.layout?.fields?.[
|
|
1805
|
+
}), void 0, !0) : c.layout?.fields?.[S]?.component && e(T)[c.layout.fields[S].component.name] ? (t(), g(me(e(T)[c.layout.fields[S].component.name]), z({
|
|
1807
1806
|
key: 2,
|
|
1808
|
-
modelValue: c.modelValue[
|
|
1809
|
-
"onUpdate:modelValue": (W) => c.modelValue[
|
|
1807
|
+
modelValue: c.modelValue[S],
|
|
1808
|
+
"onUpdate:modelValue": (W) => c.modelValue[S] = W
|
|
1810
1809
|
}, { ref_for: !0 }, {
|
|
1811
1810
|
readOnly: e(f),
|
|
1812
1811
|
property: q,
|
|
1813
|
-
propertyName:
|
|
1814
|
-
required: !c.searchOnly && (!k.value || e(je)(
|
|
1815
|
-
...c.layout.fields[
|
|
1812
|
+
propertyName: S,
|
|
1813
|
+
required: !c.searchOnly && (!k.value || e(je)(S, k.value, c.modelValue)),
|
|
1814
|
+
...c.layout.fields[S].component.props || {}
|
|
1816
1815
|
}, {
|
|
1817
|
-
onInput: (W) => a("input",
|
|
1816
|
+
onInput: (W) => a("input", S),
|
|
1818
1817
|
onChange: w[0] || (w[0] = (W) => a("change", W))
|
|
1819
1818
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in q && ["date", "date-time"].includes(q.format) && c.searchOnly ? (t(), s("div", {
|
|
1820
1819
|
key: 3,
|
|
1821
1820
|
style: { display: "grid", "grid-template-columns": "repeat(2, 1fr)", "column-gap": "1rem" },
|
|
1822
|
-
onInput: (W) => a("input",
|
|
1821
|
+
onInput: (W) => a("input", S),
|
|
1823
1822
|
onChange: w[1] || (w[1] = (W) => a("change", W))
|
|
1824
1823
|
}, [
|
|
1825
1824
|
M(be, z({
|
|
1826
|
-
modelValue: c.modelValue[
|
|
1827
|
-
"onUpdate:modelValue": (W) => c.modelValue[
|
|
1825
|
+
modelValue: c.modelValue[S].$gte,
|
|
1826
|
+
"onUpdate:modelValue": (W) => c.modelValue[S].$gte = W
|
|
1828
1827
|
}, { ref_for: !0 }, {
|
|
1829
1828
|
property: q,
|
|
1830
|
-
propertyName:
|
|
1829
|
+
propertyName: S
|
|
1831
1830
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]),
|
|
1832
1831
|
M(be, z({
|
|
1833
|
-
modelValue: c.modelValue[
|
|
1834
|
-
"onUpdate:modelValue": (W) => c.modelValue[
|
|
1832
|
+
modelValue: c.modelValue[S].$lte,
|
|
1833
|
+
"onUpdate:modelValue": (W) => c.modelValue[S].$lte = W
|
|
1835
1834
|
}, { ref_for: !0 }, {
|
|
1836
1835
|
property: q,
|
|
1837
|
-
propertyName:
|
|
1836
|
+
propertyName: S
|
|
1838
1837
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
1839
|
-
], 40,
|
|
1838
|
+
], 40, fo)) : "type" in q && q.type === "boolean" && c.searchOnly ? (t(), s("div", vo, [
|
|
1840
1839
|
M(Ge, z({ ref_for: !0 }, {
|
|
1841
1840
|
property: q,
|
|
1842
|
-
propertyName:
|
|
1841
|
+
propertyName: S
|
|
1843
1842
|
}, {
|
|
1844
1843
|
"boolean-ref": "",
|
|
1845
|
-
"model-value": c.modelValue[
|
|
1844
|
+
"model-value": c.modelValue[S],
|
|
1846
1845
|
onChange: w[2] || (w[2] = (W) => a("change", W)),
|
|
1847
1846
|
"onUpdate:modelValue": (W) => {
|
|
1848
|
-
c.modelValue[
|
|
1847
|
+
c.modelValue[S] = W;
|
|
1849
1848
|
}
|
|
1850
1849
|
}), {
|
|
1851
1850
|
default: _(() => [
|
|
1852
|
-
A("option",
|
|
1853
|
-
A("option",
|
|
1851
|
+
A("option", yo, C(e(R)("yes")), 1),
|
|
1852
|
+
A("option", _o, C(e(R)("no")), 1)
|
|
1854
1853
|
]),
|
|
1855
1854
|
_: 2
|
|
1856
1855
|
}, 1040, ["model-value", "onUpdate:modelValue"])
|
|
1857
|
-
])) : c.modelValue && "items" in q && !q.uniqueItems && (!("$ref" in q.items) || q.items.inline) ? (t(), s("div",
|
|
1858
|
-
e(f) ? h("", !0) : (t(), s("div",
|
|
1856
|
+
])) : c.modelValue && "items" in q && !q.uniqueItems && (!("$ref" in q.items) || q.items.inline) ? (t(), s("div", ho, [
|
|
1857
|
+
e(f) ? h("", !0) : (t(), s("div", bo, [
|
|
1859
1858
|
M(le, {
|
|
1860
1859
|
small: "",
|
|
1861
1860
|
variant: "alt",
|
|
1862
1861
|
icon: "plus",
|
|
1863
|
-
disabled: !("inline" in q.items && q.items.inline) && (c.modelValue[
|
|
1862
|
+
disabled: !("inline" in q.items && q.items.inline) && (c.modelValue[S]?.length >= q.maxItems || pe(c.modelValue[S]?.[c.modelValue[S]?.length - 1])),
|
|
1864
1863
|
onClick: Ie((W) => {
|
|
1865
|
-
c.modelValue[
|
|
1864
|
+
c.modelValue[S] || (c.modelValue[S] = []), e(io)(c.modelValue[S], q, e(n));
|
|
1866
1865
|
}, ["prevent"])
|
|
1867
1866
|
}, {
|
|
1868
1867
|
default: _(() => [
|
|
@@ -1871,16 +1870,16 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1871
1870
|
_: 2
|
|
1872
1871
|
}, 1032, ["disabled", "onClick"])
|
|
1873
1872
|
])),
|
|
1874
|
-
c.modelValue[
|
|
1875
|
-
(t(!0), s(X, null, E(c.modelValue[
|
|
1876
|
-
key: `rep-${
|
|
1873
|
+
c.modelValue[S]?.length > 0 ? (t(), s("div", $o, [
|
|
1874
|
+
(t(!0), s(X, null, E(c.modelValue[S], (W, ge) => (t(), s("div", {
|
|
1875
|
+
key: `rep-${S}-${e($t)(W, ge)}`,
|
|
1877
1876
|
class: "form__array-item"
|
|
1878
1877
|
}, [
|
|
1879
1878
|
e(f) ? h("", !0) : J((t(), g(D, {
|
|
1880
1879
|
key: 0,
|
|
1881
1880
|
icon: "trash",
|
|
1882
1881
|
class: "form__array-remove",
|
|
1883
|
-
onClick: Ie((ye) => e(
|
|
1882
|
+
onClick: Ie((ye) => e(ro)(c.modelValue[S], ge), ["prevent"])
|
|
1884
1883
|
}, {
|
|
1885
1884
|
default: _(() => [
|
|
1886
1885
|
Q(C(e(R)("action.remove", { capitalize: !0 })), 1)
|
|
@@ -1890,53 +1889,51 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1890
1889
|
[K]
|
|
1891
1890
|
]),
|
|
1892
1891
|
(t(), g(me(e(Ye)(q, e(l))), z({
|
|
1893
|
-
modelValue: c.modelValue[
|
|
1894
|
-
"onUpdate:modelValue": (ye) => c.modelValue[
|
|
1892
|
+
modelValue: c.modelValue[S][ge],
|
|
1893
|
+
"onUpdate:modelValue": (ye) => c.modelValue[S][ge] = ye
|
|
1895
1894
|
}, { ref_for: !0 }, {
|
|
1896
1895
|
readOnly: e(f),
|
|
1897
1896
|
property: q.items,
|
|
1898
|
-
propertyName:
|
|
1897
|
+
propertyName: S,
|
|
1899
1898
|
parentCollection: e(r),
|
|
1900
1899
|
parentPropertyName: c.parentPropertyName,
|
|
1901
|
-
required: !c.searchOnly && (!k.value || e(je)(
|
|
1902
|
-
|
|
1903
|
-
validationErrors: L(I, ge),
|
|
1900
|
+
required: !c.searchOnly && (!k.value || e(je)(S, k.value, c.modelValue)),
|
|
1901
|
+
validationErrors: L(S, ge),
|
|
1904
1902
|
...q.componentProps || {}
|
|
1905
1903
|
}, {
|
|
1906
|
-
onInput: (ye) => a("input",
|
|
1904
|
+
onInput: (ye) => a("input", S),
|
|
1907
1905
|
onChange: w[3] || (w[3] = (ye) => a("change", ye))
|
|
1908
1906
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"]))
|
|
1909
1907
|
]))), 128))
|
|
1910
1908
|
])) : h("", !0)
|
|
1911
1909
|
])) : c.modelValue ? J((t(), g(me(e(Ye)(q, e(l))), z({
|
|
1912
1910
|
key: 6,
|
|
1913
|
-
modelValue: c.modelValue[
|
|
1914
|
-
"onUpdate:modelValue": (W) => c.modelValue[
|
|
1911
|
+
modelValue: c.modelValue[S],
|
|
1912
|
+
"onUpdate:modelValue": (W) => c.modelValue[S] = W
|
|
1915
1913
|
}, { ref_for: !0 }, {
|
|
1916
1914
|
readOnly: e(f),
|
|
1917
1915
|
property: q,
|
|
1918
|
-
propertyName:
|
|
1916
|
+
propertyName: S,
|
|
1919
1917
|
parentPropertyName: c.parentPropertyName,
|
|
1920
1918
|
parentCollection: e(r),
|
|
1921
|
-
required: !c.searchOnly && (!k.value || e(je)(
|
|
1922
|
-
columns: c.layout?.fields?.[I]?.optionsColumns || c.layout?.fields?.$default?.optionsColumns,
|
|
1919
|
+
required: !c.searchOnly && (!k.value || e(je)(S, k.value, c.modelValue)),
|
|
1923
1920
|
...q.componentProps || {},
|
|
1924
|
-
validationErrors: L(
|
|
1921
|
+
validationErrors: L(S)
|
|
1925
1922
|
}, {
|
|
1926
|
-
onInput: (W) => a("input",
|
|
1923
|
+
onInput: (W) => a("input", S),
|
|
1927
1924
|
onChange: w[4] || (w[4] = (W) => a("change", W)),
|
|
1928
1925
|
onClipboardCopy: w[5] || (w[5] = (W) => a("clipboardCopy", W))
|
|
1929
1926
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])), [
|
|
1930
1927
|
[te, N(q)]
|
|
1931
1928
|
]) : h("", !0),
|
|
1932
|
-
b.value?.[
|
|
1933
|
-
b.value[
|
|
1934
|
-
b.value[
|
|
1929
|
+
b.value?.[S] ? (t(), s("div", go, [
|
|
1930
|
+
b.value[S].type ? (t(), s("span", ko, C(e(R)(`validation_error.${b.value[S].type}`)), 1)) : h("", !0),
|
|
1931
|
+
b.value[S].detail ? (t(), s("span", Vo, C(e(R)(b.value[S].detail)), 1)) : h("", !0)
|
|
1935
1932
|
])) : h("", !0)
|
|
1936
1933
|
], 6))), 128))
|
|
1937
1934
|
]),
|
|
1938
1935
|
c.$slots.after ? O(c.$slots, "after", { key: 1 }, void 0, !0) : h("", !0),
|
|
1939
|
-
c.$slots.footer ? (t(), s("div",
|
|
1936
|
+
c.$slots.footer ? (t(), s("div", Co, [
|
|
1940
1937
|
O(c.$slots, "footer", ae(he({
|
|
1941
1938
|
isInsertReady: j.value
|
|
1942
1939
|
})), void 0, !0)
|
|
@@ -1944,41 +1941,41 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1944
1941
|
], 4);
|
|
1945
1942
|
};
|
|
1946
1943
|
}
|
|
1947
|
-
}), ze = /* @__PURE__ */ U(
|
|
1944
|
+
}), ze = /* @__PURE__ */ U(Oo, [["__scopeId", "data-v-d9b9a9a6"]]), Ao = /* @__PURE__ */ F({
|
|
1948
1945
|
__name: "aeria-filter-panel",
|
|
1949
1946
|
emits: ["update:modelValue"],
|
|
1950
1947
|
setup(m, { emit: i }) {
|
|
1951
|
-
const
|
|
1952
|
-
if (
|
|
1948
|
+
const n = i, o = Me(), a = Ce(), d = e(re(Te)), r = () => {
|
|
1949
|
+
if (o.pagination.offset = 0, o.$actions.filter(), n("update:modelValue", !1), "query" in a.currentRoute && a.currentRoute.query && typeof a.currentRoute.query == "object") {
|
|
1953
1950
|
const y = a.currentRoute.query;
|
|
1954
1951
|
for (const u of Object.keys(y))
|
|
1955
1952
|
u.startsWith(`${d}.`) && delete y[u];
|
|
1956
1953
|
}
|
|
1957
1954
|
const { query: f, ...p } = a.currentRoute.value;
|
|
1958
1955
|
a.push(Be(p, {
|
|
1959
|
-
query: pt(
|
|
1956
|
+
query: pt(o)
|
|
1960
1957
|
}));
|
|
1961
1958
|
};
|
|
1962
1959
|
return (f, p) => (t(), g(Oe, {
|
|
1963
1960
|
"close-hint": "",
|
|
1964
1961
|
"fixed-right": "",
|
|
1965
1962
|
title: f.t("filter_by", { capitalize: !0 }),
|
|
1966
|
-
onClose: p[2] || (p[2] = (y) =>
|
|
1967
|
-
onOverlayClick: p[3] || (p[3] = (y) =>
|
|
1963
|
+
onClose: p[2] || (p[2] = (y) => n("update:modelValue", !1)),
|
|
1964
|
+
onOverlayClick: p[3] || (p[3] = (y) => n("update:modelValue", !1))
|
|
1968
1965
|
}, {
|
|
1969
1966
|
footer: _(() => [
|
|
1970
|
-
e(
|
|
1967
|
+
e(o).filtersCount > 0 ? (t(), g(le, {
|
|
1971
1968
|
key: 0,
|
|
1972
1969
|
variant: "transparent",
|
|
1973
1970
|
onClick: p[1] || (p[1] = (y) => {
|
|
1974
|
-
e(
|
|
1971
|
+
e(o).$actions.clearFilters(), r(), n("update:modelValue", !1);
|
|
1975
1972
|
})
|
|
1976
1973
|
}, {
|
|
1977
1974
|
default: _(() => [
|
|
1978
1975
|
Q(C(f.t("action.clear", { capitalize: !0 })) + " ", 1),
|
|
1979
1976
|
M(_e, null, {
|
|
1980
1977
|
default: _(() => [
|
|
1981
|
-
Q(C(e(
|
|
1978
|
+
Q(C(e(o).filtersCount), 1)
|
|
1982
1979
|
]),
|
|
1983
1980
|
_: 1
|
|
1984
1981
|
})
|
|
@@ -1988,7 +1985,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1988
1985
|
M(le, {
|
|
1989
1986
|
large: "",
|
|
1990
1987
|
icon: "funnel",
|
|
1991
|
-
disabled: !e(
|
|
1988
|
+
disabled: !e(o).hasActiveFilters,
|
|
1992
1989
|
onClick: r
|
|
1993
1990
|
}, {
|
|
1994
1991
|
default: _(() => [
|
|
@@ -1999,18 +1996,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1999
1996
|
]),
|
|
2000
1997
|
default: _(() => [
|
|
2001
1998
|
M(ze, z({
|
|
2002
|
-
modelValue: e(
|
|
2003
|
-
"onUpdate:modelValue": p[0] || (p[0] = (y) => e(
|
|
1999
|
+
modelValue: e(o).filters,
|
|
2000
|
+
"onUpdate:modelValue": p[0] || (p[0] = (y) => e(o).filters = y)
|
|
2004
2001
|
}, {
|
|
2005
2002
|
searchOnly: !0,
|
|
2006
|
-
form: e(
|
|
2007
|
-
layout: e(
|
|
2003
|
+
form: e(o).availableFilters,
|
|
2004
|
+
layout: e(o).description.formLayout
|
|
2008
2005
|
}, { focus: "" }), null, 16, ["modelValue"])
|
|
2009
2006
|
]),
|
|
2010
2007
|
_: 1
|
|
2011
2008
|
}, 8, ["title"]));
|
|
2012
2009
|
}
|
|
2013
|
-
}),
|
|
2010
|
+
}), Io = /* @__PURE__ */ F({
|
|
2014
2011
|
__name: "aeria-insert-panel",
|
|
2015
2012
|
props: {
|
|
2016
2013
|
individualActions: {},
|
|
@@ -2026,11 +2023,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2026
2023
|
},
|
|
2027
2024
|
emits: ["update:visible", "update:modelValue", "insert", "cancel"],
|
|
2028
2025
|
setup(m, { emit: i }) {
|
|
2029
|
-
const
|
|
2026
|
+
const n = m, o = i, a = ne("meta"), d = n.collection, r = ne(d);
|
|
2030
2027
|
He(() => {
|
|
2031
|
-
|
|
2028
|
+
n.modelValue && r.$actions.setItem(n.modelValue);
|
|
2032
2029
|
});
|
|
2033
|
-
const f = Y(() =>
|
|
2030
|
+
const f = Y(() => n.form ? r.$actions.useProperties(n.form) : r.description.form ? r.$actions.useProperties(r.description.form) : r.properties), p = async () => {
|
|
2034
2031
|
const { error: v, result: $ } = await r.$actions.deepInsert();
|
|
2035
2032
|
if (v) {
|
|
2036
2033
|
if ("code" in v)
|
|
@@ -2050,17 +2047,17 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2050
2047
|
}
|
|
2051
2048
|
return;
|
|
2052
2049
|
}
|
|
2053
|
-
|
|
2050
|
+
o("update:visible", !1), o("update:modelValue", $), o("insert", $), r.$actions.clearItem();
|
|
2054
2051
|
}, { t: y } = it(), u = () => {
|
|
2055
2052
|
a.$actions.ask({
|
|
2056
2053
|
action: () => {
|
|
2057
|
-
r.$actions.clearItem(), r.validationErrors = {},
|
|
2054
|
+
r.$actions.clearItem(), r.validationErrors = {}, o("cancel");
|
|
2058
2055
|
},
|
|
2059
2056
|
body: y("prompt.close_panel")
|
|
2060
2057
|
});
|
|
2061
2058
|
};
|
|
2062
|
-
return
|
|
2063
|
-
v === null &&
|
|
2059
|
+
return oe(() => r.item._id, (v) => {
|
|
2060
|
+
v === null && o("update:visible", !1);
|
|
2064
2061
|
}), (v, $) => {
|
|
2065
2062
|
const b = ee("clickable");
|
|
2066
2063
|
return t(), g(Oe, z({
|
|
@@ -2075,7 +2072,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2075
2072
|
actions: v.individualActions.filter(({ action: l }) => l !== "spawnEdit"),
|
|
2076
2073
|
overlayLayer: 60
|
|
2077
2074
|
}, {
|
|
2078
|
-
onActionClick: $[2] || ($[2] = (l) =>
|
|
2075
|
+
onActionClick: $[2] || ($[2] = (l) => o("update:visible", !1))
|
|
2079
2076
|
}), {
|
|
2080
2077
|
default: _(({
|
|
2081
2078
|
visible: l
|
|
@@ -2162,18 +2159,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2162
2159
|
}
|
|
2163
2160
|
i.filtersPreset = m.filters || {}, i.preferredTableProperties = m.table ? Array.from(m.table) : [], i.pagination.offset = 0;
|
|
2164
2161
|
}
|
|
2165
|
-
},
|
|
2162
|
+
}, Bo = (m, i = {
|
|
2166
2163
|
persistInQuery: !0
|
|
2167
2164
|
}) => {
|
|
2168
|
-
const
|
|
2169
|
-
return
|
|
2165
|
+
const o = Ce().currentRoute;
|
|
2166
|
+
return oe(() => o.value.query.section, (a) => {
|
|
2170
2167
|
if (m) {
|
|
2171
2168
|
if (m.description.filtersPresets) {
|
|
2172
2169
|
const d = a || Object.keys(m.description.filtersPresets)[0];
|
|
2173
2170
|
Ne(m.description.filtersPresets[d], m);
|
|
2174
2171
|
}
|
|
2175
2172
|
if (i.persistInQuery) {
|
|
2176
|
-
const d =
|
|
2173
|
+
const d = o.value.query;
|
|
2177
2174
|
d.offset && (m.pagination.offset = +d.offset), d.limit && (m.pagination.limit = +d.limit), d.search && (m.textQuery = d.search, m.filters.$text = {
|
|
2178
2175
|
$search: `"${d.search}"`,
|
|
2179
2176
|
$caseSensitive: !1
|
|
@@ -2183,25 +2180,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2183
2180
|
}, {
|
|
2184
2181
|
immediate: !0
|
|
2185
2182
|
});
|
|
2186
|
-
},
|
|
2183
|
+
}, So = {
|
|
2187
2184
|
key: 0,
|
|
2188
2185
|
class: "table aeria-surface"
|
|
2189
|
-
},
|
|
2186
|
+
}, wo = { key: 0 }, To = { key: 1 }, jo = { key: 0 }, Ro = ["checked"], qo = {
|
|
2190
2187
|
key: 1,
|
|
2191
2188
|
style: { "text-align": "right" }
|
|
2192
|
-
},
|
|
2189
|
+
}, Lo = { key: 2 }, Mo = { key: 3 }, zo = ["onClick"], Fo = { key: 0 }, Eo = ["value"], Uo = { class: "table__cell-mobile-label" }, Ho = {
|
|
2193
2190
|
key: 0,
|
|
2194
2191
|
class: "table__cell-container"
|
|
2195
|
-
},
|
|
2192
|
+
}, Do = {
|
|
2196
2193
|
key: 1,
|
|
2197
2194
|
class: "table__cell-container"
|
|
2198
|
-
},
|
|
2195
|
+
}, Qo = { class: "table__cell-grid" }, Go = { key: 0 }, Wo = { key: 1 }, Yo = { key: 0 }, Ko = ["href"], Xo = { key: 3 }, Jo = { key: 1 }, Zo = { key: 2 }, Po = { key: 0 }, No = { key: 1 }, xo = { key: 2 }, ea = {
|
|
2199
2196
|
key: 1,
|
|
2200
2197
|
class: "no-print"
|
|
2201
|
-
}, ta = { class: "table__cell-actions" },
|
|
2198
|
+
}, ta = { class: "table__cell-actions" }, na = {
|
|
2202
2199
|
key: 2,
|
|
2203
2200
|
class: "no-print table__mobile-actions"
|
|
2204
|
-
},
|
|
2201
|
+
}, oa = ["id"], aa = { key: 1 }, la = ["colspan"], sa = { class: "table__empty" }, ia = /* @__PURE__ */ F({
|
|
2205
2202
|
__name: "aeria-table",
|
|
2206
2203
|
props: {
|
|
2207
2204
|
columns: {},
|
|
@@ -2213,14 +2210,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2213
2210
|
},
|
|
2214
2211
|
emits: ["itemClick"],
|
|
2215
2212
|
setup(m, { emit: i }) {
|
|
2216
|
-
const
|
|
2213
|
+
const n = m, o = i, a = Se(), d = n.collection || we(), r = d ? ne(typeof d == "string" ? d : d.value) : null, f = Y({
|
|
2217
2214
|
get: () => r?.selected,
|
|
2218
2215
|
set: (b) => r?.$actions.selectManyItems(b, !0)
|
|
2219
|
-
}), p = Y(() =>
|
|
2220
|
-
const l =
|
|
2221
|
-
return !a.value.xl || !l || !
|
|
2216
|
+
}), p = Y(() => n.columns ? Object.keys(n.columns).length + Number(n.checkbox) : 0), y = (b, l) => b.button ? typeof b.button == "object" ? qe(l, b.button).satisfied : b.button : !1, u = (b) => {
|
|
2217
|
+
const l = n.layout?.actions;
|
|
2218
|
+
return !a.value.xl || !l || !n.actions ? [] : n.actions.filter((T) => {
|
|
2222
2219
|
if (T.roles) {
|
|
2223
|
-
const H =
|
|
2220
|
+
const H = ne("user");
|
|
2224
2221
|
if (!Ee(T.roles, H.currentUser.roles))
|
|
2225
2222
|
return !1;
|
|
2226
2223
|
}
|
|
@@ -2228,13 +2225,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2228
2225
|
return V && y(V, b);
|
|
2229
2226
|
});
|
|
2230
2227
|
}, v = (b) => {
|
|
2231
|
-
if (!
|
|
2228
|
+
if (!n.actions)
|
|
2232
2229
|
return [];
|
|
2233
|
-
const l =
|
|
2234
|
-
return !a.value.xl || !l ?
|
|
2230
|
+
const l = n.layout?.actions;
|
|
2231
|
+
return !a.value.xl || !l ? n.actions : n.actions.filter((T) => {
|
|
2235
2232
|
const V = l[T.action];
|
|
2236
2233
|
if (T.roles) {
|
|
2237
|
-
const H =
|
|
2234
|
+
const H = ne("user");
|
|
2238
2235
|
if (!Ee(T.roles, H.currentUser.roles))
|
|
2239
2236
|
return !1;
|
|
2240
2237
|
}
|
|
@@ -2244,7 +2241,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2244
2241
|
).satisfied : !y(V, b) : !0;
|
|
2245
2242
|
});
|
|
2246
2243
|
}, $ = (b, l) => {
|
|
2247
|
-
const T = [], V =
|
|
2244
|
+
const T = [], V = n.layout?.actions?.[l.action];
|
|
2248
2245
|
return V?.if && (qe(
|
|
2249
2246
|
b,
|
|
2250
2247
|
V.if
|
|
@@ -2252,57 +2249,57 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2252
2249
|
};
|
|
2253
2250
|
return (b, l) => {
|
|
2254
2251
|
const T = ee("clickable");
|
|
2255
|
-
return p.value > 0 || b.$slots.thead ? (t(), s("table",
|
|
2256
|
-
b.$slots.thead ? (t(), s("thead",
|
|
2252
|
+
return p.value > 0 || b.$slots.thead ? (t(), s("table", So, [
|
|
2253
|
+
b.$slots.thead ? (t(), s("thead", wo, [
|
|
2257
2254
|
O(b.$slots, "thead", {}, void 0, !0)
|
|
2258
|
-
])) : (t(), s("thead",
|
|
2255
|
+
])) : (t(), s("thead", To, [
|
|
2259
2256
|
A("tr", null, [
|
|
2260
|
-
b.checkbox && e(r) && e(a).md ? (t(), s("th",
|
|
2257
|
+
b.checkbox && e(r) && e(a).md ? (t(), s("th", jo, [
|
|
2261
2258
|
A("input", {
|
|
2262
2259
|
type: "checkbox",
|
|
2263
2260
|
checked: e(r).selected.length > 0 && e(r).selected.length === e(r).itemsCount,
|
|
2264
2261
|
onChange: l[0] || (l[0] = (V) => e(r).$actions.selectAllItems(V.target.checked))
|
|
2265
|
-
}, null, 40,
|
|
2262
|
+
}, null, 40, Ro)
|
|
2266
2263
|
])) : h("", !0),
|
|
2267
|
-
(t(!0), s(X, null, E(Object.entries(b.columns), ([V, H],
|
|
2268
|
-
key: `header-${
|
|
2264
|
+
(t(!0), s(X, null, E(Object.entries(b.columns), ([V, H], I) => (t(), s("th", {
|
|
2265
|
+
key: `header-${I}`,
|
|
2269
2266
|
class: "table__header"
|
|
2270
2267
|
}, C(H.description || e(R)(V)), 1))), 128)),
|
|
2271
|
-
b.actions?.length ? (t(), s("th",
|
|
2268
|
+
b.actions?.length ? (t(), s("th", qo)) : h("", !0)
|
|
2272
2269
|
])
|
|
2273
2270
|
])),
|
|
2274
|
-
b.$slots.tbody ? (t(), s("tbody",
|
|
2271
|
+
b.$slots.tbody ? (t(), s("tbody", Lo, [
|
|
2275
2272
|
O(b.$slots, "tbody", {}, void 0, !0)
|
|
2276
|
-
])) : (t(), s("tbody",
|
|
2273
|
+
])) : (t(), s("tbody", Mo, [
|
|
2277
2274
|
(t(!0), s(X, null, E(b.rows, (V, H) => (t(), s("tr", {
|
|
2278
2275
|
key: V._id,
|
|
2279
|
-
onClick: (
|
|
2276
|
+
onClick: (I) => o("itemClick", V)
|
|
2280
2277
|
}, [
|
|
2281
|
-
e(r) && b.checkbox && e(a).md ? (t(), s("td",
|
|
2278
|
+
e(r) && b.checkbox && e(a).md ? (t(), s("td", Fo, [
|
|
2282
2279
|
J(A("input", {
|
|
2283
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
2280
|
+
"onUpdate:modelValue": l[1] || (l[1] = (I) => f.value = I),
|
|
2284
2281
|
type: "checkbox",
|
|
2285
2282
|
value: V._id
|
|
2286
|
-
}, null, 8,
|
|
2283
|
+
}, null, 8, Eo), [
|
|
2287
2284
|
[tt, f.value]
|
|
2288
2285
|
])
|
|
2289
2286
|
])) : h("", !0),
|
|
2290
|
-
(t(!0), s(X, null, E(Object.entries(b.columns), ([
|
|
2287
|
+
(t(!0), s(X, null, E(Object.entries(b.columns), ([I, B], P) => (t(), s("td", {
|
|
2291
2288
|
key: `column-${V._id}-${P}`
|
|
2292
2289
|
}, [
|
|
2293
|
-
A("div",
|
|
2294
|
-
`row-${
|
|
2295
|
-
O(b.$slots, `row-${
|
|
2290
|
+
A("div", Uo, C(B.description || e(R)(I)), 1),
|
|
2291
|
+
`row-${I}` in b.$slots ? (t(), s("div", Ho, [
|
|
2292
|
+
O(b.$slots, `row-${I}`, z({ ref_for: !0 }, {
|
|
2296
2293
|
store: e(r),
|
|
2297
|
-
column:
|
|
2298
|
-
property:
|
|
2294
|
+
column: I,
|
|
2295
|
+
property: B,
|
|
2299
2296
|
row: V,
|
|
2300
2297
|
rowIndex: H
|
|
2301
2298
|
}), void 0, !0)
|
|
2302
|
-
])) : (t(), s("div",
|
|
2303
|
-
A("div",
|
|
2304
|
-
"type" in
|
|
2305
|
-
V[
|
|
2299
|
+
])) : (t(), s("div", Do, [
|
|
2300
|
+
A("div", Qo, [
|
|
2301
|
+
"type" in B && B.type === "boolean" ? (t(), s("div", Go, [
|
|
2302
|
+
V[I] ? (t(), g(D, {
|
|
2306
2303
|
key: 0,
|
|
2307
2304
|
icon: "check",
|
|
2308
2305
|
"icon-classes": "aeria-blueish"
|
|
@@ -2321,44 +2318,44 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2321
2318
|
]),
|
|
2322
2319
|
_: 1
|
|
2323
2320
|
}))
|
|
2324
|
-
])) : e(ie)(
|
|
2325
|
-
V[
|
|
2326
|
-
"items" in
|
|
2321
|
+
])) : e(ie)(B)?.$ref === "file" ? (t(), s("div", Wo, [
|
|
2322
|
+
V[I] ? (t(), s("div", Yo, [
|
|
2323
|
+
"items" in B && V[I][0] && /^image/.test(V[I][0].type) ? (t(), g(Le, {
|
|
2327
2324
|
key: 0,
|
|
2328
|
-
modelValue: V[
|
|
2329
|
-
"onUpdate:modelValue": (x) => V[
|
|
2325
|
+
modelValue: V[I][0].link,
|
|
2326
|
+
"onUpdate:modelValue": (x) => V[I][0].link = x,
|
|
2330
2327
|
expandable: "",
|
|
2331
|
-
meta: V[
|
|
2328
|
+
meta: V[I][0],
|
|
2332
2329
|
alt: "Row image",
|
|
2333
2330
|
class: "table__picture"
|
|
2334
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test(V[
|
|
2331
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test(V[I].type) ? (t(), g(Le, {
|
|
2335
2332
|
key: 1,
|
|
2336
|
-
modelValue: V[
|
|
2337
|
-
"onUpdate:modelValue": (x) => V[
|
|
2333
|
+
modelValue: V[I].link,
|
|
2334
|
+
"onUpdate:modelValue": (x) => V[I].link = x,
|
|
2338
2335
|
expandable: "",
|
|
2339
|
-
meta: V[
|
|
2336
|
+
meta: V[I],
|
|
2340
2337
|
alt: "Row image",
|
|
2341
2338
|
class: "table__picture"
|
|
2342
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : V[
|
|
2339
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : V[I].link ? (t(), s("a", {
|
|
2343
2340
|
key: 2,
|
|
2344
|
-
href: V[
|
|
2341
|
+
href: V[I].link,
|
|
2345
2342
|
style: { "font-size": "10pt" }
|
|
2346
|
-
}, C(V[
|
|
2347
|
-
])) : (t(), s("div",
|
|
2348
|
-
])) : (t(), s("div",
|
|
2349
|
-
e(r) ? (t(), s("span",
|
|
2350
|
-
value: V[
|
|
2351
|
-
key:
|
|
2352
|
-
property:
|
|
2353
|
-
})), 1)) : (t(), s("span",
|
|
2354
|
-
e(ie)(
|
|
2355
|
-
(t(!0), s(X, null, E(e(ie)(
|
|
2343
|
+
}, C(V[I].filename), 9, Ko)) : (t(), s("div", Xo, " - "))
|
|
2344
|
+
])) : (t(), s("div", Jo, " - "))
|
|
2345
|
+
])) : (t(), s("div", Zo, [
|
|
2346
|
+
e(r) ? (t(), s("span", Po, C(e(r).$actions.formatValue({
|
|
2347
|
+
value: V[I],
|
|
2348
|
+
key: I,
|
|
2349
|
+
property: B
|
|
2350
|
+
})), 1)) : (t(), s("span", No, C(Array.isArray(V[I]) ? V[I].filter((x) => !!x).join(", ") : [void 0, null].includes(V[I]) ? "-" : V[I]), 1)),
|
|
2351
|
+
e(ie)(B)?.indexes?.length > 1 ? (t(), s("div", xo, [
|
|
2352
|
+
(t(!0), s(X, null, E(e(ie)(B).indexes.slice(1, 2), (x, ue) => (t(), s("div", {
|
|
2356
2353
|
key: `subvalue-${ue}`,
|
|
2357
2354
|
class: "table__cell-subvalue"
|
|
2358
2355
|
}, C(e(r).$actions.formatValue({
|
|
2359
|
-
value: V[
|
|
2360
|
-
key:
|
|
2361
|
-
property:
|
|
2356
|
+
value: V[I],
|
|
2357
|
+
key: I,
|
|
2358
|
+
property: B,
|
|
2362
2359
|
index: x
|
|
2363
2360
|
})), 1))), 128))
|
|
2364
2361
|
])) : h("", !0)
|
|
@@ -2368,16 +2365,16 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2368
2365
|
]))), 128)),
|
|
2369
2366
|
b.actions?.length && e(a).md ? (t(), s("td", ea, [
|
|
2370
2367
|
A("div", ta, [
|
|
2371
|
-
(t(!0), s(X, null, E(u(V), (
|
|
2372
|
-
key: `action-${
|
|
2368
|
+
(t(!0), s(X, null, E(u(V), (I) => (t(), g(le, {
|
|
2369
|
+
key: `action-${I.action}`,
|
|
2373
2370
|
small: "",
|
|
2374
2371
|
variant: "alt",
|
|
2375
|
-
icon:
|
|
2376
|
-
style: ve($(V,
|
|
2377
|
-
onClick: (
|
|
2372
|
+
icon: I.icon,
|
|
2373
|
+
style: ve($(V, I)),
|
|
2374
|
+
onClick: (B) => I.click(V)
|
|
2378
2375
|
}, {
|
|
2379
2376
|
default: _(() => [
|
|
2380
|
-
Q(C(e(R)(
|
|
2377
|
+
Q(C(e(R)(I.label)), 1)
|
|
2381
2378
|
]),
|
|
2382
2379
|
_: 2
|
|
2383
2380
|
}, 1032, ["icon", "style", "onClick"]))), 128)),
|
|
@@ -2389,11 +2386,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2389
2386
|
actions: v(V)
|
|
2390
2387
|
}), {
|
|
2391
2388
|
default: _(({
|
|
2392
|
-
visible:
|
|
2389
|
+
visible: I
|
|
2393
2390
|
}) => [
|
|
2394
2391
|
J(M(D, {
|
|
2395
2392
|
reactive: "",
|
|
2396
|
-
active:
|
|
2393
|
+
active: I,
|
|
2397
2394
|
icon: "dots-three"
|
|
2398
2395
|
}, null, 8, ["active"]), [
|
|
2399
2396
|
[T]
|
|
@@ -2402,22 +2399,22 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2402
2399
|
_: 2
|
|
2403
2400
|
}, 1040)) : h("", !0)
|
|
2404
2401
|
])
|
|
2405
|
-
])) : b.actions?.length ? (t(), s("td",
|
|
2402
|
+
])) : b.actions?.length ? (t(), s("td", na, [
|
|
2406
2403
|
A("div", {
|
|
2407
2404
|
class: "table__mobile-actions-grid",
|
|
2408
2405
|
style: ve(`grid-template-columns: repeat(${u(V).length + (v(V).length ? 1 : 0)}, 1fr);`)
|
|
2409
2406
|
}, [
|
|
2410
|
-
(t(!0), s(X, null, E(u(V), (
|
|
2411
|
-
key: `action-${
|
|
2407
|
+
(t(!0), s(X, null, E(u(V), (I) => (t(), g(ce, {
|
|
2408
|
+
key: `action-${I.action}`,
|
|
2412
2409
|
class: "table__mobile-actions-button",
|
|
2413
|
-
onClick: (
|
|
2410
|
+
onClick: (B) => I.click(V)
|
|
2414
2411
|
}, {
|
|
2415
2412
|
default: _(() => [
|
|
2416
2413
|
M(D, {
|
|
2417
|
-
icon:
|
|
2414
|
+
icon: I.icon || "gear"
|
|
2418
2415
|
}, {
|
|
2419
2416
|
default: _(() => [
|
|
2420
|
-
Q(C(e(R)(
|
|
2417
|
+
Q(C(e(R)(I.label)), 1)
|
|
2421
2418
|
]),
|
|
2422
2419
|
_: 2
|
|
2423
2420
|
}, 1032, ["icon"])
|
|
@@ -2442,9 +2439,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2442
2439
|
], 4),
|
|
2443
2440
|
A("div", {
|
|
2444
2441
|
id: `dropdown-${V._id}`
|
|
2445
|
-
}, null, 8,
|
|
2442
|
+
}, null, 8, oa)
|
|
2446
2443
|
])) : h("", !0)
|
|
2447
|
-
], 8,
|
|
2444
|
+
], 8, zo))), 128))
|
|
2448
2445
|
])),
|
|
2449
2446
|
A("tfoot", null, [
|
|
2450
2447
|
b.$slots.tfoot ? O(b.$slots, "tfoot", { key: 0 }, void 0, !0) : b.columns && !b.rows?.length && !e(r)?.loading.getAll ? (t(), s("tr", aa, [
|
|
@@ -2466,21 +2463,21 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2466
2463
|
componentProps: {}
|
|
2467
2464
|
},
|
|
2468
2465
|
setup(m) {
|
|
2469
|
-
const i = m,
|
|
2466
|
+
const i = m, n = Ae(), o = we(), a = Y(() => {
|
|
2470
2467
|
const d = {
|
|
2471
|
-
collection:
|
|
2472
|
-
checkbox:
|
|
2473
|
-
columns:
|
|
2474
|
-
rows:
|
|
2468
|
+
collection: o,
|
|
2469
|
+
checkbox: n.hasSelectionActions,
|
|
2470
|
+
columns: n.tableProperties,
|
|
2471
|
+
rows: n.items,
|
|
2475
2472
|
actions: i.individualActions,
|
|
2476
|
-
layout:
|
|
2473
|
+
layout: n.tableLayout
|
|
2477
2474
|
};
|
|
2478
2475
|
return Object.assign(d, i.componentProps);
|
|
2479
2476
|
});
|
|
2480
2477
|
return (d, r) => (t(), s("div", null, [
|
|
2481
2478
|
d.$slots.inner ? O(d.$slots, "inner", { key: 0 }) : h("", !0),
|
|
2482
|
-
e(
|
|
2483
|
-
key: e(
|
|
2479
|
+
e(n).properties ? (t(), g(ra, z({ key: 1 }, a.value, {
|
|
2480
|
+
key: e(n).$id
|
|
2484
2481
|
}), se({ _: 2 }, [
|
|
2485
2482
|
E(Object.keys(d.$slots).filter((f) => !["inner"].includes(f)), (f) => ({
|
|
2486
2483
|
name: f,
|
|
@@ -2497,7 +2494,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2497
2494
|
list: { type: Boolean }
|
|
2498
2495
|
},
|
|
2499
2496
|
setup(m) {
|
|
2500
|
-
return (i,
|
|
2497
|
+
return (i, n) => (t(), s("div", {
|
|
2501
2498
|
class: G([
|
|
2502
2499
|
"grid",
|
|
2503
2500
|
{ "grid--list": i.list }
|
|
@@ -2521,25 +2518,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2521
2518
|
componentName: {}
|
|
2522
2519
|
},
|
|
2523
2520
|
setup(m) {
|
|
2524
|
-
const
|
|
2521
|
+
const n = m.layoutOptions, o = Ae(), a = (d) => Array.isArray(d) ? d[0] : d;
|
|
2525
2522
|
return (d, r) => {
|
|
2526
2523
|
const f = ee("clickable");
|
|
2527
2524
|
return t(), g(ca, {
|
|
2528
2525
|
list: d.componentName === "list"
|
|
2529
2526
|
}, {
|
|
2530
2527
|
default: _(() => [
|
|
2531
|
-
(t(!0), s(X, null, E(e(
|
|
2528
|
+
(t(!0), s(X, null, E(e(o).items, (p) => (t(), g(Et, {
|
|
2532
2529
|
key: p._id,
|
|
2533
|
-
inactive: !!(e(
|
|
2530
|
+
inactive: !!(e(n).active && !p[e(n).active]),
|
|
2534
2531
|
horizontal: d.componentName === "list"
|
|
2535
2532
|
}, se({
|
|
2536
2533
|
footer: _(() => [
|
|
2537
|
-
e(
|
|
2538
|
-
Array.isArray(e(
|
|
2539
|
-
(t(!0), s(X, null, E(e(
|
|
2534
|
+
e(n).title ? (t(), s("div", pa, C(p[e(n).title]), 1)) : h("", !0),
|
|
2535
|
+
Array.isArray(e(n).information) ? (t(), s("div", ma, [
|
|
2536
|
+
(t(!0), s(X, null, E(e(n).information, (y) => (t(), s("div", {
|
|
2540
2537
|
key: `info-${y}`
|
|
2541
2538
|
}, C(p[y]), 1))), 128))
|
|
2542
|
-
])) : e(
|
|
2539
|
+
])) : e(n).information ? (t(), s("div", fa, C(p[e(n).information]), 1)) : h("", !0)
|
|
2543
2540
|
]),
|
|
2544
2541
|
actions: _(() => [
|
|
2545
2542
|
d.individualActions?.length ? (t(), g(Ve, z({
|
|
@@ -2565,34 +2562,34 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2565
2562
|
]),
|
|
2566
2563
|
default: _(() => [
|
|
2567
2564
|
M(Le, z({ expandable: "" }, { ref_for: !0 }, {
|
|
2568
|
-
url: a(p[e(
|
|
2569
|
-
meta: a(p[e(
|
|
2565
|
+
url: a(p[e(n).picture])?.link,
|
|
2566
|
+
meta: a(p[e(n).picture]),
|
|
2570
2567
|
height: "16rem",
|
|
2571
|
-
alt: e(
|
|
2568
|
+
alt: e(n).title ? a(p[e(n).title])?.link : "Item picture"
|
|
2572
2569
|
}), null, 16)
|
|
2573
2570
|
]),
|
|
2574
2571
|
_: 2
|
|
2575
2572
|
}, [
|
|
2576
|
-
e(
|
|
2573
|
+
e(n).badge && Array.isArray(p[e(n).badge]) ? {
|
|
2577
2574
|
name: "badge",
|
|
2578
2575
|
fn: _(() => [
|
|
2579
|
-
(t(!0), s(X, null, E(p[e(
|
|
2576
|
+
(t(!0), s(X, null, E(p[e(n).badge], (y) => (t(), g(_e, {
|
|
2580
2577
|
key: `${p._id}-${y}`,
|
|
2581
2578
|
large: ""
|
|
2582
2579
|
}, {
|
|
2583
2580
|
default: _(() => [
|
|
2584
|
-
Q(C(e(
|
|
2581
|
+
Q(C(e(n).translateBadge ? e(R)(y) : y), 1)
|
|
2585
2582
|
]),
|
|
2586
2583
|
_: 2
|
|
2587
2584
|
}, 1024))), 128))
|
|
2588
2585
|
]),
|
|
2589
2586
|
key: "0"
|
|
2590
|
-
} : e(
|
|
2587
|
+
} : e(n).badge ? {
|
|
2591
2588
|
name: "badge",
|
|
2592
2589
|
fn: _(() => [
|
|
2593
2590
|
M(_e, null, {
|
|
2594
2591
|
default: _(() => [
|
|
2595
|
-
Q(C(e(
|
|
2592
|
+
Q(C(e(n).translateBadge ? e(R)(p[e(n).badge]) : p[e(n).badge]), 1)
|
|
2596
2593
|
]),
|
|
2597
2594
|
_: 2
|
|
2598
2595
|
}, 1024)
|
|
@@ -2634,19 +2631,19 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2634
2631
|
},
|
|
2635
2632
|
emits: ["uiEvent"],
|
|
2636
2633
|
setup(m, { emit: i }) {
|
|
2637
|
-
const
|
|
2634
|
+
const n = Z(!1), o = Z(!1), a = Z((...k) => null), d = Z(), r = m, f = i, p = Ce(), y = ne("meta"), u = Se(), { reachedEnd: v, detach: $ } = De(null, {
|
|
2638
2635
|
antecipate: 600
|
|
2639
2636
|
}), b = !u.value.md || r.scrollPagination;
|
|
2640
|
-
b &&
|
|
2641
|
-
k && l.pagination.recordsTotal > l.items.length && H.value < Xe && (H.value += 1,
|
|
2637
|
+
b && oe(v, (k) => {
|
|
2638
|
+
k && l.pagination.recordsTotal > l.items.length && H.value < Xe && (H.value += 1, B());
|
|
2642
2639
|
});
|
|
2643
2640
|
const l = mt(r.collection);
|
|
2644
|
-
|
|
2641
|
+
Bo(l, {
|
|
2645
2642
|
persistInQuery: !r.noQueryPersistence
|
|
2646
2643
|
});
|
|
2647
2644
|
const T = Qe(), V = r.action ? e(r.action) : ft(l, p, T);
|
|
2648
2645
|
a.value = V[0], d.value = V[1];
|
|
2649
|
-
const H = Z(0),
|
|
2646
|
+
const H = Z(0), I = Z(!1), B = async (k) => {
|
|
2650
2647
|
l.activeFilters = Object.assign({}, k?.filters || l.$filters), Object.assign(l.activeFilters, l.filtersPreset);
|
|
2651
2648
|
const j = {
|
|
2652
2649
|
filters: l.activeFilters,
|
|
@@ -2659,16 +2656,16 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2659
2656
|
if (L)
|
|
2660
2657
|
return;
|
|
2661
2658
|
const { data: c, pagination: w } = N;
|
|
2662
|
-
l.pagination.recordsCount = w.recordsCount, l.pagination.recordsTotal = w.recordsTotal, H.value === 0 && l.items.splice(0), l.items.push(...c), l.loading.getAll = !1,
|
|
2659
|
+
l.pagination.recordsCount = w.recordsCount, l.pagination.recordsTotal = w.recordsTotal, H.value === 0 && l.items.splice(0), l.items.push(...c), l.loading.getAll = !1, I.value = !0;
|
|
2663
2660
|
}, P = async (k) => {
|
|
2664
2661
|
p.push(Be(p.currentRoute.value, {
|
|
2665
2662
|
query: {
|
|
2666
2663
|
offset: k.offset,
|
|
2667
2664
|
limit: k.limit
|
|
2668
2665
|
}
|
|
2669
|
-
})), l.pagination.offset = k.offset, l.pagination.limit = k.limit,
|
|
2666
|
+
})), l.pagination.offset = k.offset, l.pagination.limit = k.limit, B();
|
|
2670
2667
|
}, x = re("noResultsComponent", null);
|
|
2671
|
-
|
|
2668
|
+
oe(() => [
|
|
2672
2669
|
p.currentRoute.value.path,
|
|
2673
2670
|
p.currentRoute.value.query.section
|
|
2674
2671
|
], async (k, j) => {
|
|
@@ -2677,7 +2674,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2677
2674
|
const L = p.currentRoute.value;
|
|
2678
2675
|
if (y.view.title = r.collection, !r.noFetch && (!L.query._popstate || l.itemsCount === 0)) {
|
|
2679
2676
|
const N = vt(l, L.query);
|
|
2680
|
-
Object.keys(N).length > 0 && Object.assign(l.filters, N), await
|
|
2677
|
+
Object.keys(N).length > 0 && Object.assign(l.filters, N), await B();
|
|
2681
2678
|
}
|
|
2682
2679
|
}, {
|
|
2683
2680
|
immediate: !0,
|
|
@@ -2694,18 +2691,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2694
2691
|
$search: `"${k}"`,
|
|
2695
2692
|
$caseSensitive: !1
|
|
2696
2693
|
}
|
|
2697
|
-
}),
|
|
2694
|
+
}), B({
|
|
2698
2695
|
offset: 0
|
|
2699
|
-
})) : (l.filters = ke(l.freshFilters), H.value = 0,
|
|
2700
|
-
|
|
2696
|
+
})) : (l.filters = ke(l.freshFilters), H.value = 0, B())));
|
|
2697
|
+
oe(() => l.textQuery, (k) => {
|
|
2701
2698
|
ue(k);
|
|
2702
2699
|
});
|
|
2703
2700
|
const de = (k) => {
|
|
2704
2701
|
k.currentLayout = k.currentLayout === "tabular" ? k.description.layout.name : "tabular";
|
|
2705
2702
|
};
|
|
2706
|
-
|
|
2703
|
+
nt(() => {
|
|
2707
2704
|
l.$actions.clearFilters(), l.textQuery = "", $();
|
|
2708
|
-
}),
|
|
2705
|
+
}), oe(() => d.value, async (k) => {
|
|
2709
2706
|
const j = ke(k);
|
|
2710
2707
|
let L;
|
|
2711
2708
|
if (j)
|
|
@@ -2716,9 +2713,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2716
2713
|
})), j.name === "spawnAdd")
|
|
2717
2714
|
l.$actions.clearItem(), j.params?.item && (l.$actions.setItem(j.params.item), Object.keys(j.params.item).forEach((N) => {
|
|
2718
2715
|
delete l.referenceItem[N];
|
|
2719
|
-
})),
|
|
2716
|
+
})), n.value = "add";
|
|
2720
2717
|
else if (j.name === "spawnEdit")
|
|
2721
|
-
l.$actions.setItem(j.params),
|
|
2718
|
+
l.$actions.setItem(j.params), n.value = "edit";
|
|
2722
2719
|
else if (j.name === "duplicate") {
|
|
2723
2720
|
await L;
|
|
2724
2721
|
const N = Object.entries(l.item).reduce((c, [w, K]) => {
|
|
@@ -2730,7 +2727,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2730
2727
|
const te = l.properties[w];
|
|
2731
2728
|
if (te.readOnly)
|
|
2732
2729
|
return c;
|
|
2733
|
-
const
|
|
2730
|
+
const S = (q) => {
|
|
2734
2731
|
const W = ie(te);
|
|
2735
2732
|
if (!W)
|
|
2736
2733
|
return q;
|
|
@@ -2742,7 +2739,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2742
2739
|
}
|
|
2743
2740
|
return q;
|
|
2744
2741
|
};
|
|
2745
|
-
return K = Array.isArray(K) ? K.map(
|
|
2742
|
+
return K = Array.isArray(K) ? K.map(S) : S(K), {
|
|
2746
2743
|
...c,
|
|
2747
2744
|
[w]: K
|
|
2748
2745
|
};
|
|
@@ -2751,12 +2748,12 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2751
2748
|
});
|
|
2752
2749
|
l.$actions.setItem(N), delete l.item._id, l.referenceItem = {
|
|
2753
2750
|
_id: void 0
|
|
2754
|
-
},
|
|
2751
|
+
}, n.value = "duplicate";
|
|
2755
2752
|
} else
|
|
2756
2753
|
f("uiEvent", j);
|
|
2757
2754
|
}, {
|
|
2758
2755
|
deep: !0
|
|
2759
|
-
}),
|
|
2756
|
+
}), oe(() => n, ({ value: k }) => {
|
|
2760
2757
|
k === !1 && l.$actions.clearItem();
|
|
2761
2758
|
});
|
|
2762
2759
|
const $e = Y(() => {
|
|
@@ -2769,25 +2766,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2769
2766
|
return fe(Te, Y(() => r.collection)), (k, j) => {
|
|
2770
2767
|
const L = ee("clickable"), N = ee("loading");
|
|
2771
2768
|
return t(), s(X, null, [
|
|
2772
|
-
|
|
2769
|
+
o.value ? (t(), g(Ao, {
|
|
2773
2770
|
key: e(l).$id,
|
|
2774
|
-
modelValue:
|
|
2775
|
-
"onUpdate:modelValue": j[0] || (j[0] = (c) =>
|
|
2771
|
+
modelValue: o.value,
|
|
2772
|
+
"onUpdate:modelValue": j[0] || (j[0] = (c) => o.value = c)
|
|
2776
2773
|
}, null, 8, ["modelValue"])) : h("", !0),
|
|
2777
|
-
|
|
2774
|
+
n.value ? (t(), g(Io, z({
|
|
2778
2775
|
key: 1,
|
|
2779
|
-
visible:
|
|
2780
|
-
"onUpdate:visible": j[1] || (j[1] = (c) =>
|
|
2776
|
+
visible: n.value,
|
|
2777
|
+
"onUpdate:visible": j[1] || (j[1] = (c) => n.value = c),
|
|
2781
2778
|
"fixed-right": ""
|
|
2782
2779
|
}, {
|
|
2783
2780
|
collection: k.collection,
|
|
2784
2781
|
individualActions: $e.value
|
|
2785
2782
|
}, {
|
|
2786
|
-
onCancel: j[2] || (j[2] = (c) =>
|
|
2783
|
+
onCancel: j[2] || (j[2] = (c) => n.value = !1)
|
|
2787
2784
|
}), se({
|
|
2788
2785
|
header: _(() => [
|
|
2789
2786
|
A("span", null, C((() => {
|
|
2790
|
-
switch (
|
|
2787
|
+
switch (n.value) {
|
|
2791
2788
|
case "add":
|
|
2792
2789
|
return e(R)("action.add", { capitalize: !0 });
|
|
2793
2790
|
case "duplicate":
|
|
@@ -2846,7 +2843,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2846
2843
|
fn: _(() => [
|
|
2847
2844
|
J((t(), g(D, {
|
|
2848
2845
|
icon: "funnel",
|
|
2849
|
-
onClick: j[4] || (j[4] = (c) =>
|
|
2846
|
+
onClick: j[4] || (j[4] = (c) => o.value = !0)
|
|
2850
2847
|
}, {
|
|
2851
2848
|
default: _(() => [
|
|
2852
2849
|
Q(C(e(R)("filters", { capitalize: !0 })), 1)
|
|
@@ -2903,7 +2900,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2903
2900
|
key: 1,
|
|
2904
2901
|
variant: "alt",
|
|
2905
2902
|
icon: "funnel",
|
|
2906
|
-
onClick: j[6] || (j[6] = (c) =>
|
|
2903
|
+
onClick: j[6] || (j[6] = (c) => o.value = !0)
|
|
2907
2904
|
}, {
|
|
2908
2905
|
default: _(() => [
|
|
2909
2906
|
A("div", null, C(e(R)("Filters")), 1),
|
|
@@ -2931,7 +2928,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2931
2928
|
])
|
|
2932
2929
|
])) : h("", !0),
|
|
2933
2930
|
J((t(), s("div", ga, [
|
|
2934
|
-
e(l).itemsCount === 0 && !e(l).loading.getAll &&
|
|
2931
|
+
e(l).itemsCount === 0 && !e(l).loading.getAll && I.value && (e(x) || k.$slots.empty) ? (t(), s("div", ka, [
|
|
2935
2932
|
e(x) ? (t(), g(me(e(x)), ae(z({ key: 0 }, {
|
|
2936
2933
|
collection: e(l).$id
|
|
2937
2934
|
})), {
|
|
@@ -2981,7 +2978,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2981
2978
|
[N, (!e(b) || H.value === Xe) && e(l).loading.getAll]
|
|
2982
2979
|
]),
|
|
2983
2980
|
!e(b) && !k.noControls && !e(l).loading.getAll && e(l).itemsCount > 0 ? (t(), s("div", Va, [
|
|
2984
|
-
M(
|
|
2981
|
+
M(mn, {
|
|
2985
2982
|
pagination: e(l).pagination,
|
|
2986
2983
|
onPaginate: P
|
|
2987
2984
|
}, null, 8, ["pagination"])
|
|
@@ -2996,28 +2993,28 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2996
2993
|
options: {}
|
|
2997
2994
|
},
|
|
2998
2995
|
setup(m) {
|
|
2999
|
-
const i =
|
|
3000
|
-
i.$actions.fulfillPrompt(
|
|
2996
|
+
const i = ne("meta"), n = (o, a) => {
|
|
2997
|
+
i.$actions.fulfillPrompt(o, a);
|
|
3001
2998
|
};
|
|
3002
|
-
return (
|
|
2999
|
+
return (o, a) => (t(), g(Oe, {
|
|
3003
3000
|
float: "",
|
|
3004
3001
|
"fill-footer": "",
|
|
3005
3002
|
"close-hint": !1,
|
|
3006
|
-
title:
|
|
3003
|
+
title: o.title,
|
|
3007
3004
|
style: { "--panel-min-width": "32rem" }
|
|
3008
3005
|
}, {
|
|
3009
3006
|
footer: _(() => [
|
|
3010
3007
|
A("div", {
|
|
3011
3008
|
class: "prompt__options",
|
|
3012
|
-
style: ve(`grid-template-columns: repeat(${Object.keys(
|
|
3009
|
+
style: ve(`grid-template-columns: repeat(${Object.keys(o.options).length}, 1fr)`)
|
|
3013
3010
|
}, [
|
|
3014
|
-
(t(!0), s(X, null, E(Object.entries(
|
|
3011
|
+
(t(!0), s(X, null, E(Object.entries(o.options), ([d, r], f) => (t(), g(ce, {
|
|
3015
3012
|
key: `option-${f}`,
|
|
3016
3013
|
class: G([
|
|
3017
3014
|
"prompt__option",
|
|
3018
3015
|
`prompt__option--${r.variant || "primary"}`
|
|
3019
3016
|
]),
|
|
3020
|
-
onClick: (p) => r.click ? r.click(d, r) :
|
|
3017
|
+
onClick: (p) => r.click ? r.click(d, r) : n(d, r)
|
|
3021
3018
|
}, {
|
|
3022
3019
|
default: _(() => [
|
|
3023
3020
|
Q(C(r.title), 1)
|
|
@@ -3028,7 +3025,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3028
3025
|
]),
|
|
3029
3026
|
default: _(() => [
|
|
3030
3027
|
A("div", Oa, [
|
|
3031
|
-
O(
|
|
3028
|
+
O(o.$slots, "default", {}, void 0, !0)
|
|
3032
3029
|
])
|
|
3033
3030
|
]),
|
|
3034
3031
|
_: 3
|
|
@@ -3043,24 +3040,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3043
3040
|
icon: {}
|
|
3044
3041
|
},
|
|
3045
3042
|
setup(m) {
|
|
3046
|
-
const i =
|
|
3047
|
-
return (
|
|
3043
|
+
const i = ne("meta");
|
|
3044
|
+
return (n, o) => {
|
|
3048
3045
|
const a = ee("clickable");
|
|
3049
3046
|
return J((t(), s("div", {
|
|
3050
3047
|
class: G({
|
|
3051
3048
|
toast: !0,
|
|
3052
|
-
"toast--animate": e(i).toasts[0].itr ===
|
|
3049
|
+
"toast--animate": e(i).toasts[0].itr === n.itr
|
|
3053
3050
|
}),
|
|
3054
|
-
onAnimationend:
|
|
3055
|
-
onClick:
|
|
3051
|
+
onAnimationend: o[0] || (o[0] = (d) => e(i).$actions.popToast()),
|
|
3052
|
+
onClick: o[1] || (o[1] = (d) => e(i).$actions.popToast(n.itr))
|
|
3056
3053
|
}, [
|
|
3057
3054
|
M(D, z(
|
|
3058
|
-
|
|
3055
|
+
n.icon ? { icon: n.icon } : { icon: "warning-circle" },
|
|
3059
3056
|
{ style: { "--icon-size": "4rem", "--icon-color": "var(--theme-brand-color-shade-3)" } }
|
|
3060
3057
|
), null, 16),
|
|
3061
3058
|
A("div", Ba, [
|
|
3062
|
-
O(
|
|
3063
|
-
A("div", Sa, C(
|
|
3059
|
+
O(n.$slots, "default", {}, void 0, !0),
|
|
3060
|
+
A("div", Sa, C(n.formatDateTime(n.date, { hoursOnly: !0 })), 1)
|
|
3064
3061
|
])
|
|
3065
3062
|
], 34)), [
|
|
3066
3063
|
[a]
|
|
@@ -3070,15 +3067,15 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3070
3067
|
}), Ta = /* @__PURE__ */ U(wa, [["__scopeId", "data-v-606d47bf"]]), ja = ["innerHTML"], Ra = ["innerHTML"], qa = { class: "main__toasts" }, La = ["innerHTML"], Ma = /* @__PURE__ */ F({
|
|
3071
3068
|
__name: "aeria-main",
|
|
3072
3069
|
setup(m) {
|
|
3073
|
-
const i =
|
|
3074
|
-
return (
|
|
3075
|
-
const d =
|
|
3070
|
+
const i = ne("meta"), n = Y(() => i.themeOverride || i.theme);
|
|
3071
|
+
return (o, a) => {
|
|
3072
|
+
const d = ot("router-view");
|
|
3076
3073
|
return t(), s("main", {
|
|
3077
3074
|
id: "main",
|
|
3078
3075
|
class: G([
|
|
3079
3076
|
"main",
|
|
3080
|
-
`main--${
|
|
3081
|
-
{ dark:
|
|
3077
|
+
`main--${n.value}`,
|
|
3078
|
+
{ dark: n.value === "dark" }
|
|
3082
3079
|
])
|
|
3083
3080
|
}, [
|
|
3084
3081
|
(t(), g(at, null, {
|
|
@@ -3086,10 +3083,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3086
3083
|
M(d, null, {
|
|
3087
3084
|
default: _(({ Component: r }) => [
|
|
3088
3085
|
(t(), g(me(r), null, se({ _: 2 }, [
|
|
3089
|
-
E(Object.keys(
|
|
3086
|
+
E(Object.keys(o.$slots), (f) => ({
|
|
3090
3087
|
name: f,
|
|
3091
3088
|
fn: _(() => [
|
|
3092
|
-
O(
|
|
3089
|
+
O(o.$slots, f, {}, void 0, !0)
|
|
3093
3090
|
])
|
|
3094
3091
|
}))
|
|
3095
3092
|
]), 1024))
|
|
@@ -3099,7 +3096,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3099
3096
|
]),
|
|
3100
3097
|
_: 3
|
|
3101
3098
|
})),
|
|
3102
|
-
O(
|
|
3099
|
+
O(o.$slots, "default", {}, void 0, !0),
|
|
3103
3100
|
M(Oe, z({
|
|
3104
3101
|
modelValue: e(i).modal.visible,
|
|
3105
3102
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => e(i).modal.visible = r),
|
|
@@ -3145,11 +3142,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3145
3142
|
}), ul = /* @__PURE__ */ U(Ma, [["__scopeId", "data-v-8de8a4eb"]]), za = {}, Fa = { class: "menu" };
|
|
3146
3143
|
function Ea(m, i) {
|
|
3147
3144
|
return t(), s("menu", Fa, [
|
|
3148
|
-
(t(!0), s(X, null, E(Object.keys(m.$slots), (
|
|
3149
|
-
key:
|
|
3145
|
+
(t(!0), s(X, null, E(Object.keys(m.$slots), (n) => (t(), s("div", {
|
|
3146
|
+
key: n,
|
|
3150
3147
|
class: "menu__entry"
|
|
3151
3148
|
}, [
|
|
3152
|
-
O(m.$slots,
|
|
3149
|
+
O(m.$slots, n, {}, void 0, !0)
|
|
3153
3150
|
]))), 128))
|
|
3154
3151
|
]);
|
|
3155
3152
|
}
|
|
@@ -3170,23 +3167,23 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3170
3167
|
dropdown: { type: Boolean }
|
|
3171
3168
|
},
|
|
3172
3169
|
setup(m) {
|
|
3173
|
-
const i = m,
|
|
3170
|
+
const i = m, n = lt(), o = Ce(), a = Se(), d = Y(() => {
|
|
3174
3171
|
if (i.query) {
|
|
3175
|
-
const f =
|
|
3172
|
+
const f = o.currentRoute.value.query[i.query];
|
|
3176
3173
|
if (f)
|
|
3177
3174
|
return f;
|
|
3178
3175
|
} else if (i.param) {
|
|
3179
|
-
const f =
|
|
3176
|
+
const f = o.currentRoute.value.params[i.param];
|
|
3180
3177
|
if (f)
|
|
3181
3178
|
return f;
|
|
3182
3179
|
}
|
|
3183
|
-
return Object.keys(
|
|
3180
|
+
return Object.keys(n)[0];
|
|
3184
3181
|
}), r = (f) => {
|
|
3185
|
-
i.query &&
|
|
3182
|
+
i.query && o.push(Be(o.currentRoute.value, {
|
|
3186
3183
|
query: {
|
|
3187
3184
|
[i.query]: f
|
|
3188
3185
|
}
|
|
3189
|
-
})), i.param &&
|
|
3186
|
+
})), i.param && o.push(Be(o.currentRoute.value, {
|
|
3190
3187
|
params: {
|
|
3191
3188
|
[i.param]: f
|
|
3192
3189
|
}
|
|
@@ -3251,8 +3248,8 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3251
3248
|
},
|
|
3252
3249
|
setup(m) {
|
|
3253
3250
|
const i = Z(m.initialValue);
|
|
3254
|
-
return m.promise instanceof Promise && m.promise.then((
|
|
3255
|
-
i.value =
|
|
3251
|
+
return m.promise instanceof Promise && m.promise.then((n) => {
|
|
3252
|
+
i.value = n;
|
|
3256
3253
|
}), () => st("div", String(i.value));
|
|
3257
3254
|
}
|
|
3258
3255
|
}), Ja = ["onClick"], Za = { key: 1 }, Pa = /* @__PURE__ */ F({
|
|
@@ -3261,7 +3258,7 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3261
3258
|
collection: {}
|
|
3262
3259
|
},
|
|
3263
3260
|
setup(m) {
|
|
3264
|
-
const i = m,
|
|
3261
|
+
const i = m, o = Ce().currentRoute, a = Qe(), d = Y(() => i.collection ? Ae(i.collection, a) : typeof o.value.meta.collection == "string" ? Ae(o.value.meta.collection, a) : typeof o.value.params.collection == "string" ? Ae(o.value.params.collection, a) : null), r = async (f, p) => {
|
|
3265
3262
|
const { error: y, result: u } = await p.$functions[f.badgeFunction]({
|
|
3266
3263
|
filters: f.filters
|
|
3267
3264
|
});
|
|
@@ -3314,7 +3311,7 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3314
3311
|
setup(m) {
|
|
3315
3312
|
const i = m;
|
|
3316
3313
|
fe(Te, null);
|
|
3317
|
-
const
|
|
3314
|
+
const n = yt(), o = Y(() => n(
|
|
3318
3315
|
i.modelValue.password,
|
|
3319
3316
|
i.modelValue.confirmation
|
|
3320
3317
|
));
|
|
@@ -3335,8 +3332,8 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3335
3332
|
"onUpdate:modelValue": d[0] || (d[0] = (r) => a.$emit("update:modelValue", r))
|
|
3336
3333
|
}, {
|
|
3337
3334
|
after: _(() => [
|
|
3338
|
-
A("div", null, C(
|
|
3339
|
-
O(a.$slots, "default", ae(he({ passwordError:
|
|
3335
|
+
A("div", null, C(o.value || "Senhas conferem"), 1),
|
|
3336
|
+
O(a.$slots, "default", ae(he({ passwordError: o.value })))
|
|
3340
3337
|
]),
|
|
3341
3338
|
_: 3
|
|
3342
3339
|
}, 8, ["model-value"]));
|
|
@@ -3349,17 +3346,17 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3349
3346
|
{
|
|
3350
3347
|
path: "invite/:id",
|
|
3351
3348
|
name: "/user/invite/:id",
|
|
3352
|
-
redirect: (
|
|
3349
|
+
redirect: (n) => ({
|
|
3353
3350
|
path: "/user/signup",
|
|
3354
3351
|
params: {
|
|
3355
|
-
inviteId:
|
|
3352
|
+
inviteId: n.params.id
|
|
3356
3353
|
}
|
|
3357
3354
|
})
|
|
3358
3355
|
},
|
|
3359
3356
|
{
|
|
3360
3357
|
path: "signin",
|
|
3361
3358
|
name: "/user/signin",
|
|
3362
|
-
component: () => import("./signin-
|
|
3359
|
+
component: () => import("./signin-qyQWe20l.js"),
|
|
3363
3360
|
meta: {
|
|
3364
3361
|
title: "Sign in"
|
|
3365
3362
|
}
|
|
@@ -3367,7 +3364,7 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3367
3364
|
{
|
|
3368
3365
|
path: "signup",
|
|
3369
3366
|
name: "/user/signup",
|
|
3370
|
-
component: () => import("./signup-
|
|
3367
|
+
component: () => import("./signup-BV8XNoCW.js"),
|
|
3371
3368
|
meta: {
|
|
3372
3369
|
title: "Sign up"
|
|
3373
3370
|
}
|
|
@@ -3375,7 +3372,7 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3375
3372
|
{
|
|
3376
3373
|
path: "redefine-password",
|
|
3377
3374
|
name: "/user/redefine-password",
|
|
3378
|
-
component: () => import("./redefine-password-
|
|
3375
|
+
component: () => import("./redefine-password-B6iR8Daw.js"),
|
|
3379
3376
|
meta: {
|
|
3380
3377
|
title: "Redefine password"
|
|
3381
3378
|
}
|
|
@@ -3383,7 +3380,7 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3383
3380
|
{
|
|
3384
3381
|
path: "activation",
|
|
3385
3382
|
name: "/user/activation",
|
|
3386
|
-
component: () => import("./activation-
|
|
3383
|
+
component: () => import("./activation-BLK5vWLb.js"),
|
|
3387
3384
|
meta: {
|
|
3388
3385
|
title: "Activate user"
|
|
3389
3386
|
}
|
|
@@ -3405,11 +3402,11 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3405
3402
|
name: "/dashboard/:collection",
|
|
3406
3403
|
props: !0,
|
|
3407
3404
|
components: {
|
|
3408
|
-
default: () => import("./index-
|
|
3405
|
+
default: () => import("./index-BONQgktz.js"),
|
|
3409
3406
|
topbar: () => Promise.resolve().then(() => xa)
|
|
3410
3407
|
},
|
|
3411
3408
|
meta: {
|
|
3412
|
-
title: ({ collectionName:
|
|
3409
|
+
title: ({ collectionName: n, t: o }) => o(n, {
|
|
3413
3410
|
plural: !0
|
|
3414
3411
|
})
|
|
3415
3412
|
}
|
|
@@ -3419,10 +3416,10 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3419
3416
|
name: "/dashboard/:collection/:id",
|
|
3420
3417
|
props: !0,
|
|
3421
3418
|
components: {
|
|
3422
|
-
default: () => import("./_id_-
|
|
3419
|
+
default: () => import("./_id_-DVHwHOM4.js")
|
|
3423
3420
|
},
|
|
3424
3421
|
meta: {
|
|
3425
|
-
title: ({ collectionName:
|
|
3422
|
+
title: ({ collectionName: n, t: o }) => o(n, {
|
|
3426
3423
|
plural: !0
|
|
3427
3424
|
})
|
|
3428
3425
|
}
|
|
@@ -3439,7 +3436,7 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3439
3436
|
children: [
|
|
3440
3437
|
{
|
|
3441
3438
|
path: "profile",
|
|
3442
|
-
component: () => import("./index-
|
|
3439
|
+
component: () => import("./index-BRw_qkT2.js"),
|
|
3443
3440
|
meta: {
|
|
3444
3441
|
title: "User profile",
|
|
3445
3442
|
icon: "user-square"
|
|
@@ -3448,7 +3445,7 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3448
3445
|
{
|
|
3449
3446
|
path: "changepass",
|
|
3450
3447
|
name: "/dashboard/user/changepass",
|
|
3451
|
-
component: () => import("./index-
|
|
3448
|
+
component: () => import("./index-CHb6ftk7.js"),
|
|
3452
3449
|
meta: {
|
|
3453
3450
|
title: "Change password",
|
|
3454
3451
|
icon: "lock"
|
|
@@ -3460,7 +3457,7 @@ const dl = /* @__PURE__ */ U(za, [["render", Ea], ["__scopeId", "data-v-3cfef7fb
|
|
|
3460
3457
|
});
|
|
3461
3458
|
export {
|
|
3462
3459
|
ze as A,
|
|
3463
|
-
|
|
3460
|
+
Bn as B,
|
|
3464
3461
|
Xa as C,
|
|
3465
3462
|
Ia as D,
|
|
3466
3463
|
Ta as E,
|
|
@@ -3471,9 +3468,9 @@ export {
|
|
|
3471
3468
|
le as a,
|
|
3472
3469
|
D as b,
|
|
3473
3470
|
cl as c,
|
|
3474
|
-
$
|
|
3471
|
+
$n as d,
|
|
3475
3472
|
rl as e,
|
|
3476
|
-
|
|
3473
|
+
Io as f,
|
|
3477
3474
|
Le as g,
|
|
3478
3475
|
dl as h,
|
|
3479
3476
|
Oe as i,
|
|
@@ -3483,15 +3480,15 @@ export {
|
|
|
3483
3480
|
Et as m,
|
|
3484
3481
|
Ve as n,
|
|
3485
3482
|
ca as o,
|
|
3486
|
-
|
|
3483
|
+
Ao as p,
|
|
3487
3484
|
Zt as q,
|
|
3488
3485
|
ul as r,
|
|
3489
|
-
|
|
3486
|
+
mn as s,
|
|
3490
3487
|
ra as t,
|
|
3491
3488
|
Ka as u,
|
|
3492
|
-
|
|
3489
|
+
Yn as v,
|
|
3493
3490
|
be as w,
|
|
3494
|
-
|
|
3495
|
-
|
|
3491
|
+
Vn as x,
|
|
3492
|
+
so as y,
|
|
3496
3493
|
Ge as z
|
|
3497
3494
|
};
|