@aeria-ui/ui 0.0.213 → 0.0.215
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_-CJ9lVE3u.js → _id_-DPG7xMYl.js} +1 -1
- package/dist/{activation-DxWEthho.js → activation-CLXo0wHA.js} +1 -1
- package/dist/{index-hQYLCL2E.js → index-CusjJ6zi.js} +1 -1
- package/dist/{index-JzafBqX9.js → index-D4W14Sm7.js} +1094 -1093
- package/dist/index-JX6_Czwf.js +30 -0
- package/dist/{index-dzdAF-o1.js → index-RW5CFKuw.js} +1 -1
- package/dist/{redefine-password-C4Ndz2Dc.js → redefine-password-OWTBmv_n.js} +1 -1
- package/dist/{signin-DSxls7k8.js → signin-jTtR2rrj.js} +1 -1
- package/dist/{signup-W5flgrcB.js → signup-D6p-6GUk.js} +1 -1
- package/dist/ui.css +1 -1
- package/dist/ui.js +1 -1
- package/package.json +1 -1
- package/dist/index-BnYSIn52.js +0 -25
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { t as
|
|
1
|
+
import { defineComponent as z, ref as J, resolveDirective as N, createElementBlock as s, openBlock as n, normalizeClass as U, Fragment as G, renderList as E, withDirectives as W, createCommentVNode as h, createTextVNode as D, toDisplayString as g, unref as t, renderSlot as C, withModifiers as Ie, inject as ce, computed as Q, createElementVNode as O, mergeProps as M, createBlock as _, withCtx as v, resolveDynamicComponent as pe, useCssVars as Ne, normalizeProps as le, guardReactiveProps as be, Teleport as Fe, createVNode as x, onMounted as Ue, watch as ne, vModelDynamic as et, onBeforeMount as Xe, normalizeStyle as ve, provide as fe, createSlots as se, vModelCheckbox as tt, onUnmounted as nt, resolveComponent as at, Suspense as ot, useSlots as lt, h as it } from "vue";
|
|
2
|
+
import { t as q, useI18n as st } from "@aeria-ui/i18n";
|
|
3
3
|
import { INSTANCE_VARS_SYMBOL as rt, useScrollObserver as He, useBreakpoints as Se, useMask as ut, PAGINATION_PER_PAGE_DEFAULTS as ct, API_URL as Je, request as dt, useDebounce as Ze, convertToSearchQuery as mt, useParentCollectionStore as Ae, useCollectionStore as pt, useAction as ft, convertFromSearchQuery as vt, usePasswordPolicy as yt } from "@aeria-ui/core";
|
|
4
|
-
import { arraysIntersect as Ee, deepClone as
|
|
5
|
-
import { useStore as
|
|
6
|
-
import { useRouter as
|
|
4
|
+
import { arraysIntersect as Ee, deepClone as ge, getReferenceProperty as re, convertConditionToQuery as ht, freshItem as bt, isRequired as je, evaluateCondition as qe, deepMerge as Be } from "@aeriajs/common";
|
|
5
|
+
import { useStore as ae, getStoreId as we, useParentStore as xe, STORE_ID as Te, getGlobalStateManager as De } from "@aeria-ui/state-management";
|
|
6
|
+
import { useRouter as Ve } from "vue-router";
|
|
7
7
|
import { validate as _t } from "@aeriajs/validation";
|
|
8
8
|
import { getObjectKey as $t } from "@aeria-ui/utils";
|
|
9
9
|
const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "accordion__content"
|
|
12
|
-
}, Ct = /* @__PURE__ */
|
|
12
|
+
}, Ct = /* @__PURE__ */ z({
|
|
13
13
|
__name: "aeria-accordion",
|
|
14
14
|
props: {
|
|
15
15
|
enumerate: { type: Boolean },
|
|
@@ -17,41 +17,41 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
17
17
|
headers: {}
|
|
18
18
|
},
|
|
19
19
|
setup(e) {
|
|
20
|
-
const c =
|
|
20
|
+
const c = J(null), a = (o) => typeof o == "string" ? o : o.title;
|
|
21
21
|
return (o, l) => {
|
|
22
|
-
const u =
|
|
22
|
+
const u = N("clickable");
|
|
23
23
|
return n(), s("div", {
|
|
24
24
|
class: U({
|
|
25
25
|
accordion: !0,
|
|
26
26
|
"accordion--padded": !e.noPadding
|
|
27
27
|
})
|
|
28
28
|
}, [
|
|
29
|
-
(n(!0), s(
|
|
29
|
+
(n(!0), s(G, null, E(Object.keys(o.$slots).filter((r) => r !== "default"), (r, y) => (n(), s("div", {
|
|
30
30
|
key: r,
|
|
31
31
|
class: "accordion__slot"
|
|
32
32
|
}, [
|
|
33
|
-
|
|
33
|
+
W((n(), s("div", {
|
|
34
34
|
class: "accordion__header",
|
|
35
35
|
onClick: (d) => c.value === r ? c.value = null : c.value = r
|
|
36
36
|
}, [
|
|
37
|
-
e.enumerate ? (n(), s("span", kt,
|
|
38
|
-
D(" " +
|
|
37
|
+
e.enumerate ? (n(), s("span", kt, g(y + 1) + ". ", 1)) : h("", !0),
|
|
38
|
+
D(" " + g(e.headers[r] ? a(e.headers[r]) : t(q)(r)), 1)
|
|
39
39
|
], 8, gt)), [
|
|
40
40
|
[u]
|
|
41
41
|
]),
|
|
42
42
|
c.value === r ? (n(), s("div", Vt, [
|
|
43
43
|
C(o.$slots, r, {}, void 0, !0)
|
|
44
|
-
])) :
|
|
44
|
+
])) : h("", !0)
|
|
45
45
|
]))), 128))
|
|
46
46
|
], 2);
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), F = (e, c) => {
|
|
50
50
|
const a = e.__vccOpts || e;
|
|
51
51
|
for (const [o, l] of c)
|
|
52
52
|
a[o] = l;
|
|
53
53
|
return a;
|
|
54
|
-
}, sl = /* @__PURE__ */
|
|
54
|
+
}, sl = /* @__PURE__ */ F(Ct, [["__scopeId", "data-v-3ea933d4"]]), Ot = /* @__PURE__ */ z({
|
|
55
55
|
__name: "aeria-badge",
|
|
56
56
|
props: {
|
|
57
57
|
large: { type: Boolean },
|
|
@@ -68,7 +68,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
68
68
|
C(c.$slots, "default", {}, void 0, !0)
|
|
69
69
|
], 2));
|
|
70
70
|
}
|
|
71
|
-
}), he = /* @__PURE__ */
|
|
71
|
+
}), he = /* @__PURE__ */ F(Ot, [["__scopeId", "data-v-4cbce7ef"]]), At = /* @__PURE__ */ z({
|
|
72
72
|
__name: "aeria-bare-button",
|
|
73
73
|
props: {
|
|
74
74
|
dummy: { type: Boolean },
|
|
@@ -98,10 +98,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
98
98
|
C(u.$slots, "default", {}, void 0, !0)
|
|
99
99
|
], 2));
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
101
|
+
}), me = /* @__PURE__ */ F(At, [["__scopeId", "data-v-51833bfd"]]), It = ["href"], Bt = {
|
|
102
102
|
key: 0,
|
|
103
103
|
"data-component": "icon-label"
|
|
104
|
-
}, St = /* @__PURE__ */
|
|
104
|
+
}, St = /* @__PURE__ */ z({
|
|
105
105
|
__name: "aeria-icon",
|
|
106
106
|
props: {
|
|
107
107
|
icon: {},
|
|
@@ -112,7 +112,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
112
112
|
active: { type: Boolean }
|
|
113
113
|
},
|
|
114
114
|
setup(e) {
|
|
115
|
-
const c = e, a =
|
|
115
|
+
const c = e, a = ce(rt, {}), o = typeof c.reactive == "boolean" ? c.reactive : ce("iconReactive", !1), l = Q(() => c.icon?.includes(":") ? c.icon : `regular:${c.icon}`);
|
|
116
116
|
return (u, r) => (n(), s("a", {
|
|
117
117
|
class: U([
|
|
118
118
|
"icon",
|
|
@@ -127,7 +127,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
127
127
|
{ "icon__icon--right": e.iconRight }
|
|
128
128
|
])
|
|
129
129
|
}, [
|
|
130
|
-
(n(), s("svg",
|
|
130
|
+
(n(), s("svg", M({
|
|
131
131
|
width: "24",
|
|
132
132
|
height: "24",
|
|
133
133
|
viewBox: "0 0 256 256",
|
|
@@ -142,13 +142,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
142
142
|
], 2),
|
|
143
143
|
u.$slots.default ? (n(), s("div", Bt, [
|
|
144
144
|
C(u.$slots, "default", {}, void 0, !0)
|
|
145
|
-
])) :
|
|
145
|
+
])) : h("", !0)
|
|
146
146
|
], 2));
|
|
147
147
|
}
|
|
148
|
-
}), H = /* @__PURE__ */
|
|
148
|
+
}), H = /* @__PURE__ */ F(St, [["__scopeId", "data-v-9c904c76"]]), wt = {
|
|
149
149
|
key: 1,
|
|
150
150
|
class: "button__content"
|
|
151
|
-
}, Tt = /* @__PURE__ */
|
|
151
|
+
}, Tt = /* @__PURE__ */ z({
|
|
152
152
|
__name: "aeria-button",
|
|
153
153
|
props: {
|
|
154
154
|
size: {},
|
|
@@ -161,16 +161,16 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
161
161
|
loading: { type: Boolean }
|
|
162
162
|
},
|
|
163
163
|
setup(e) {
|
|
164
|
-
const c = e, a =
|
|
164
|
+
const c = e, a = ce("buttonVariant", c.variant) || "primary", o = (() => {
|
|
165
165
|
switch (!0) {
|
|
166
166
|
case c.small:
|
|
167
167
|
return "small";
|
|
168
168
|
case c.large:
|
|
169
169
|
return "large";
|
|
170
170
|
}
|
|
171
|
-
return
|
|
171
|
+
return ce("buttonSize", c.size) || "medium";
|
|
172
172
|
})();
|
|
173
|
-
return (l, u) => (n(),
|
|
173
|
+
return (l, u) => (n(), _(me, {
|
|
174
174
|
class: U([
|
|
175
175
|
"button",
|
|
176
176
|
`button--${t(a)}`,
|
|
@@ -180,13 +180,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
180
180
|
dummy: e.dummy,
|
|
181
181
|
disabled: e.disabled || e.loading
|
|
182
182
|
}, {
|
|
183
|
-
default:
|
|
184
|
-
e.icon ? (n(),
|
|
183
|
+
default: v(() => [
|
|
184
|
+
e.icon ? (n(), _(H, {
|
|
185
185
|
key: 0,
|
|
186
186
|
icon: e.icon,
|
|
187
187
|
class: "button__content"
|
|
188
188
|
}, {
|
|
189
|
-
default:
|
|
189
|
+
default: v(() => [
|
|
190
190
|
C(l.$slots, "default", {}, void 0, !0)
|
|
191
191
|
]),
|
|
192
192
|
_: 3
|
|
@@ -197,7 +197,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
197
197
|
_: 3
|
|
198
198
|
}, 8, ["class", "dummy", "disabled"]));
|
|
199
199
|
}
|
|
200
|
-
}),
|
|
200
|
+
}), ie = /* @__PURE__ */ F(Tt, [["__scopeId", "data-v-7b10f012"]]), jt = { class: "card__picture" }, Rt = { class: "card__footer" }, qt = { class: "card__footer-upper" }, Lt = { class: "card__actions" }, xt = { class: "card__badge" }, Mt = /* @__PURE__ */ z({
|
|
201
201
|
__name: "aeria-card",
|
|
202
202
|
props: {
|
|
203
203
|
inactive: { type: Boolean },
|
|
@@ -220,7 +220,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
220
220
|
C(c.$slots, "footer", {}, void 0, !0)
|
|
221
221
|
]),
|
|
222
222
|
O("div", Lt, [
|
|
223
|
-
c.$slots.actions ? C(c.$slots, "actions", { key: 0 }, void 0, !0) :
|
|
223
|
+
c.$slots.actions ? C(c.$slots, "actions", { key: 0 }, void 0, !0) : h("", !0)
|
|
224
224
|
])
|
|
225
225
|
]),
|
|
226
226
|
O("div", xt, [
|
|
@@ -229,13 +229,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
229
229
|
])
|
|
230
230
|
], 2));
|
|
231
231
|
}
|
|
232
|
-
}), zt = /* @__PURE__ */
|
|
232
|
+
}), zt = /* @__PURE__ */ F(Mt, [["__scopeId", "data-v-e7d2c665"]]), Et = { class: "panel__header-left" }, Ft = {
|
|
233
233
|
key: 1,
|
|
234
234
|
class: "panel__header-title"
|
|
235
235
|
}, Ut = {
|
|
236
236
|
key: 2,
|
|
237
237
|
style: { "margin-left": "auto" }
|
|
238
|
-
}, Ht = /* @__PURE__ */
|
|
238
|
+
}, Ht = /* @__PURE__ */ z({
|
|
239
239
|
__name: "aeria-panel",
|
|
240
240
|
props: {
|
|
241
241
|
closeHint: { type: Boolean, default: !1 },
|
|
@@ -258,23 +258,23 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
258
258
|
},
|
|
259
259
|
emits: ["update:modelValue", "update:collapsed", "update:closeHint", "overlayClick", "close"],
|
|
260
260
|
setup(e, { emit: c }) {
|
|
261
|
-
const a = e, o = c, l =
|
|
261
|
+
const a = e, o = c, l = J(a.collapsed), u = J(null), { reachedEnd: r } = He(u), y = () => {
|
|
262
262
|
o("update:modelValue", !1), o("close");
|
|
263
263
|
}, d = () => {
|
|
264
264
|
o("overlayClick");
|
|
265
265
|
}, m = (p) => {
|
|
266
266
|
o("update:collapsed", p), l.value = p;
|
|
267
267
|
};
|
|
268
|
-
return (p,
|
|
269
|
-
const
|
|
270
|
-
return e.modelValue ?
|
|
268
|
+
return (p, b) => {
|
|
269
|
+
const f = N("clickable"), i = N("loading"), k = N("overlay");
|
|
270
|
+
return e.modelValue ? W((n(), s("div", {
|
|
271
271
|
key: 0,
|
|
272
272
|
class: U([
|
|
273
273
|
"panel",
|
|
274
274
|
{ "panel--fixed": e.fixedRight }
|
|
275
275
|
])
|
|
276
276
|
}, [
|
|
277
|
-
(n(),
|
|
277
|
+
(n(), _(pe(
|
|
278
278
|
e.float || e.fixedRight ? "dialog" : "div"
|
|
279
279
|
), {
|
|
280
280
|
"data-component": "panel",
|
|
@@ -288,9 +288,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
288
288
|
{ "panel__content--transparent-mobile": e.transparentMobile },
|
|
289
289
|
{ "panel__content--outer-header": e.outerHeader }
|
|
290
290
|
]),
|
|
291
|
-
onClick:
|
|
291
|
+
onClick: b[2] || (b[2] = (B) => B.stopPropagation())
|
|
292
292
|
}, {
|
|
293
|
-
default:
|
|
293
|
+
default: v(() => [
|
|
294
294
|
p.$slots.header || e.title ? (n(), s("div", {
|
|
295
295
|
key: 0,
|
|
296
296
|
class: U([
|
|
@@ -300,35 +300,35 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
300
300
|
])
|
|
301
301
|
}, [
|
|
302
302
|
O("div", Et, [
|
|
303
|
-
p.$slots.header ? C(p.$slots, "header", { key: 0 }, void 0, !0) : e.title ? (n(), s("div", Ft,
|
|
303
|
+
p.$slots.header ? C(p.$slots, "header", { key: 0 }, void 0, !0) : e.title ? (n(), s("div", Ft, g(e.title), 1)) : h("", !0),
|
|
304
304
|
p.$slots.extra ? (n(), s("div", Ut, [
|
|
305
305
|
C(p.$slots, "extra", {}, void 0, !0)
|
|
306
|
-
])) :
|
|
306
|
+
])) : h("", !0)
|
|
307
307
|
]),
|
|
308
|
-
e.collapsible && l.value ?
|
|
308
|
+
e.collapsible && l.value ? W((n(), _(H, {
|
|
309
309
|
key: 0,
|
|
310
310
|
reactive: "",
|
|
311
311
|
icon: "plus",
|
|
312
|
-
onClick:
|
|
312
|
+
onClick: b[0] || (b[0] = (B) => m(!l.value))
|
|
313
313
|
}, null, 512)), [
|
|
314
|
-
[
|
|
315
|
-
]) : e.collapsible && !l.value ?
|
|
314
|
+
[f]
|
|
315
|
+
]) : e.collapsible && !l.value ? W((n(), _(H, {
|
|
316
316
|
key: 1,
|
|
317
317
|
reactive: "",
|
|
318
318
|
icon: "minus",
|
|
319
|
-
onClick:
|
|
319
|
+
onClick: b[1] || (b[1] = (B) => m(!l.value))
|
|
320
320
|
}, null, 512)), [
|
|
321
|
-
[
|
|
322
|
-
]) : e.closeHint ?
|
|
321
|
+
[f]
|
|
322
|
+
]) : e.closeHint ? W((n(), _(H, {
|
|
323
323
|
key: 2,
|
|
324
324
|
reactive: "",
|
|
325
325
|
icon: "x",
|
|
326
|
-
onClick:
|
|
326
|
+
onClick: y
|
|
327
327
|
}, null, 512)), [
|
|
328
|
-
[
|
|
329
|
-
]) :
|
|
330
|
-
], 2)) :
|
|
331
|
-
l.value ?
|
|
328
|
+
[f]
|
|
329
|
+
]) : h("", !0)
|
|
330
|
+
], 2)) : h("", !0),
|
|
331
|
+
l.value ? h("", !0) : W((n(), s("div", {
|
|
332
332
|
key: 1,
|
|
333
333
|
ref_key: "body",
|
|
334
334
|
ref: u,
|
|
@@ -340,7 +340,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
340
340
|
}, [
|
|
341
341
|
C(p.$slots, "default", {}, void 0, !0)
|
|
342
342
|
], 2)), [
|
|
343
|
-
[
|
|
343
|
+
[i, e.loading]
|
|
344
344
|
]),
|
|
345
345
|
p.$slots.footer ? (n(), s("div", {
|
|
346
346
|
key: 2,
|
|
@@ -351,24 +351,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
351
351
|
])
|
|
352
352
|
}, [
|
|
353
353
|
C(p.$slots, "footer", {}, void 0, !0)
|
|
354
|
-
], 2)) :
|
|
354
|
+
], 2)) : h("", !0)
|
|
355
355
|
]),
|
|
356
356
|
_: 3
|
|
357
357
|
}, 8, ["class"]))
|
|
358
358
|
], 2)), [
|
|
359
|
-
[
|
|
359
|
+
[k, {
|
|
360
360
|
condition: e.overlay || e.fixedRight || e.float,
|
|
361
361
|
invisible: e.invisibleOverlay,
|
|
362
362
|
click: d,
|
|
363
363
|
layer: e.overlayLayer || (e.float ? 60 : e.fixedRight ? 50 : 0)
|
|
364
364
|
}]
|
|
365
|
-
]) :
|
|
365
|
+
]) : h("", !0);
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
}),
|
|
368
|
+
}), Ce = /* @__PURE__ */ F(Ht, [["__scopeId", "data-v-8463f8df"]]), Dt = { class: "content__body" }, Qt = {
|
|
369
369
|
key: 0,
|
|
370
370
|
class: "content__section"
|
|
371
|
-
}, Gt = { class: "content__item" }, Wt = /* @__PURE__ */
|
|
371
|
+
}, Gt = { class: "content__item" }, Wt = /* @__PURE__ */ z({
|
|
372
372
|
__name: "aeria-context-menu",
|
|
373
373
|
props: {
|
|
374
374
|
actions: {},
|
|
@@ -378,22 +378,22 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
378
378
|
emits: ["actionClick"],
|
|
379
379
|
setup(e, { emit: c }) {
|
|
380
380
|
Ne((d) => ({
|
|
381
|
-
v4078ef85:
|
|
382
|
-
v4078ef86:
|
|
381
|
+
v4078ef85: y.value.x,
|
|
382
|
+
v4078ef86: y.value.y
|
|
383
383
|
}));
|
|
384
|
-
const a = c, o =
|
|
384
|
+
const a = c, o = J(null), l = J(!1), u = (d) => d?.filter((m) => {
|
|
385
385
|
if (m.roles) {
|
|
386
|
-
const p =
|
|
386
|
+
const p = ae("user");
|
|
387
387
|
return Ee(m.roles, p.currentUser.roles);
|
|
388
388
|
}
|
|
389
389
|
return !0;
|
|
390
390
|
}), r = (d, m) => {
|
|
391
|
-
const p = m &&
|
|
391
|
+
const p = m && ge(m);
|
|
392
392
|
d.click && d.click(p), a("actionClick", {
|
|
393
393
|
action: d,
|
|
394
394
|
subject: p
|
|
395
395
|
}), l.value = !1;
|
|
396
|
-
},
|
|
396
|
+
}, y = Q(() => {
|
|
397
397
|
if (!o.value)
|
|
398
398
|
return {
|
|
399
399
|
x: 0,
|
|
@@ -407,9 +407,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
407
407
|
};
|
|
408
408
|
});
|
|
409
409
|
return (d, m) => {
|
|
410
|
-
const p =
|
|
411
|
-
return n(), s(
|
|
412
|
-
Object.keys(d.$slots).some((
|
|
410
|
+
const p = N("overlay");
|
|
411
|
+
return n(), s(G, null, [
|
|
412
|
+
Object.keys(d.$slots).some((b) => b !== "default") || e.actions !== void 0 && e.actions.length > 0 ? (n(), s("div", {
|
|
413
413
|
key: 0,
|
|
414
414
|
ref_key: "contextmenu",
|
|
415
415
|
ref: o,
|
|
@@ -417,77 +417,77 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
417
417
|
}, [
|
|
418
418
|
O("a", {
|
|
419
419
|
class: "contextmenu__trigger",
|
|
420
|
-
onClick: m[0] || (m[0] = (
|
|
420
|
+
onClick: m[0] || (m[0] = (b) => l.value = !0)
|
|
421
421
|
}, [
|
|
422
|
-
C(d.$slots, "default",
|
|
422
|
+
C(d.$slots, "default", le(be({
|
|
423
423
|
visible: l.value
|
|
424
424
|
})), void 0, !0)
|
|
425
425
|
])
|
|
426
|
-
], 512)) :
|
|
427
|
-
l.value ? (n(),
|
|
426
|
+
], 512)) : h("", !0),
|
|
427
|
+
l.value ? (n(), _(Fe, {
|
|
428
428
|
key: 1,
|
|
429
429
|
to: "main"
|
|
430
430
|
}, [
|
|
431
|
-
|
|
431
|
+
W((n(), _(Ce, {
|
|
432
432
|
modelValue: l.value,
|
|
433
|
-
"onUpdate:modelValue": m[4] || (m[4] = (
|
|
433
|
+
"onUpdate:modelValue": m[4] || (m[4] = (b) => l.value = b),
|
|
434
434
|
fill: "",
|
|
435
435
|
bordered: "",
|
|
436
436
|
class: "content",
|
|
437
437
|
style: { "--panel-min-width": "0" }
|
|
438
438
|
}, {
|
|
439
|
-
default:
|
|
439
|
+
default: v(() => [
|
|
440
440
|
O("div", Dt, [
|
|
441
441
|
d.$slots.header ? (n(), s("div", Qt, [
|
|
442
442
|
C(d.$slots, "header", {}, void 0, !0)
|
|
443
|
-
])) :
|
|
444
|
-
Object.keys(d.$slots).filter((
|
|
443
|
+
])) : h("", !0),
|
|
444
|
+
Object.keys(d.$slots).filter((b) => !["default", "extra", "header"].includes(b)).length > 0 ? (n(), s("div", {
|
|
445
445
|
key: 1,
|
|
446
446
|
class: "content__section",
|
|
447
|
-
onClick: m[1] || (m[1] = (
|
|
447
|
+
onClick: m[1] || (m[1] = (b) => l.value = !1)
|
|
448
448
|
}, [
|
|
449
|
-
(n(!0), s(
|
|
450
|
-
key: `slot-${
|
|
449
|
+
(n(!0), s(G, null, E(Object.keys(d.$slots).filter((b) => !["default", "extra", "header"].includes(b)), (b, f) => (n(), _(me, {
|
|
450
|
+
key: `slot-${f}`,
|
|
451
451
|
class: "content__item content__item--reactive"
|
|
452
452
|
}, {
|
|
453
|
-
default:
|
|
454
|
-
C(d.$slots,
|
|
453
|
+
default: v(() => [
|
|
454
|
+
C(d.$slots, b, {}, void 0, !0)
|
|
455
455
|
]),
|
|
456
456
|
_: 2
|
|
457
457
|
}, 1024))), 128))
|
|
458
|
-
])) :
|
|
458
|
+
])) : h("", !0),
|
|
459
459
|
e.actions !== void 0 && e.actions.length > 0 ? (n(), s("div", {
|
|
460
460
|
key: 2,
|
|
461
461
|
class: "content__section",
|
|
462
|
-
onClick: m[2] || (m[2] = (
|
|
462
|
+
onClick: m[2] || (m[2] = (b) => l.value = !1)
|
|
463
463
|
}, [
|
|
464
|
-
(n(!0), s(
|
|
465
|
-
key: `action-${
|
|
464
|
+
(n(!0), s(G, null, E(u(e.actions), (b, f) => (n(), _(me, {
|
|
465
|
+
key: `action-${f}`,
|
|
466
466
|
class: "content__item content__item--reactive",
|
|
467
|
-
onClick: (
|
|
467
|
+
onClick: (i) => r(b, e.subject)
|
|
468
468
|
}, {
|
|
469
|
-
default:
|
|
470
|
-
|
|
471
|
-
icon:
|
|
469
|
+
default: v(() => [
|
|
470
|
+
x(H, {
|
|
471
|
+
icon: b.icon || "gear"
|
|
472
472
|
}, {
|
|
473
|
-
default:
|
|
474
|
-
D(
|
|
473
|
+
default: v(() => [
|
|
474
|
+
D(g(b.translate ? t(q)(b.label, { capitalize: !0 }) : b.label), 1)
|
|
475
475
|
]),
|
|
476
476
|
_: 2
|
|
477
477
|
}, 1032, ["icon"])
|
|
478
478
|
]),
|
|
479
479
|
_: 2
|
|
480
480
|
}, 1032, ["onClick"]))), 128))
|
|
481
|
-
])) :
|
|
481
|
+
])) : h("", !0),
|
|
482
482
|
d.$slots.extra ? (n(), s("div", {
|
|
483
483
|
key: 3,
|
|
484
484
|
class: "content__section",
|
|
485
|
-
onClick: m[3] || (m[3] = (
|
|
485
|
+
onClick: m[3] || (m[3] = (b) => l.value = !1)
|
|
486
486
|
}, [
|
|
487
487
|
O("div", Gt, [
|
|
488
|
-
d.$slots.extra ? C(d.$slots, "extra", { key: 0 }, void 0, !0) :
|
|
488
|
+
d.$slots.extra ? C(d.$slots, "extra", { key: 0 }, void 0, !0) : h("", !0)
|
|
489
489
|
])
|
|
490
|
-
])) :
|
|
490
|
+
])) : h("", !0)
|
|
491
491
|
])
|
|
492
492
|
]),
|
|
493
493
|
_: 3
|
|
@@ -504,17 +504,17 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
504
504
|
{ invisibleOnLarge: !0 }
|
|
505
505
|
]
|
|
506
506
|
])
|
|
507
|
-
])) :
|
|
507
|
+
])) : h("", !0)
|
|
508
508
|
], 64);
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
}),
|
|
511
|
+
}), ke = /* @__PURE__ */ F(Wt, [["__scopeId", "data-v-ee3ea72f"]]), Yt = { class: "info__content" }, Kt = /* @__PURE__ */ z({
|
|
512
512
|
__name: "aeria-info",
|
|
513
513
|
props: {
|
|
514
514
|
where: { default: "top" }
|
|
515
515
|
},
|
|
516
516
|
setup(e) {
|
|
517
|
-
const c = Se(), a =
|
|
517
|
+
const c = Se(), a = J(!1);
|
|
518
518
|
return (o, l) => t(c).md ? (n(), s("div", {
|
|
519
519
|
key: 0,
|
|
520
520
|
class: "info",
|
|
@@ -530,7 +530,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
530
530
|
O("div", Yt, [
|
|
531
531
|
C(o.$slots, "text", {}, void 0, !0)
|
|
532
532
|
])
|
|
533
|
-
], 2)) :
|
|
533
|
+
], 2)) : h("", !0),
|
|
534
534
|
O("div", {
|
|
535
535
|
onMouseover: l[0] || (l[0] = (u) => a.value = !0)
|
|
536
536
|
}, [
|
|
@@ -538,7 +538,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
538
538
|
], 32)
|
|
539
539
|
], 32)) : C(o.$slots, "default", { key: 1 }, void 0, !0);
|
|
540
540
|
}
|
|
541
|
-
}), Xt = /* @__PURE__ */
|
|
541
|
+
}), Xt = /* @__PURE__ */ F(Kt, [["__scopeId", "data-v-15a38847"]]), Jt = { class: "input" }, Zt = {
|
|
542
542
|
key: 0,
|
|
543
543
|
class: "input__label"
|
|
544
544
|
}, Pt = {
|
|
@@ -547,7 +547,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
547
547
|
}, Nt = ["placeholder", "readonly", "value"], en = ["value"], tn = {
|
|
548
548
|
key: 1,
|
|
549
549
|
class: "input__clipboard"
|
|
550
|
-
}, nn = /* @__PURE__ */
|
|
550
|
+
}, nn = /* @__PURE__ */ z({
|
|
551
551
|
__name: "aeria-input",
|
|
552
552
|
props: {
|
|
553
553
|
modelValue: {},
|
|
@@ -561,9 +561,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
561
561
|
},
|
|
562
562
|
emits: ["update:modelValue", "input", "change", "clipboardCopy"],
|
|
563
563
|
setup(e, { emit: c }) {
|
|
564
|
-
const a = e, o = c, l = a.property || {}, u = l.icon || "inputType" in l && l.inputType === "search", r =
|
|
565
|
-
await navigator.clipboard.writeText(
|
|
566
|
-
},
|
|
564
|
+
const a = e, o = c, l = a.property || {}, u = l.icon || "inputType" in l && l.inputType === "search", r = ce("searchOnly", !1), y = ce("innerInputLabel", !1), d = !r && (a.readOnly || l.readOnly), m = J(!1), p = async (j) => {
|
|
565
|
+
await navigator.clipboard.writeText(j), o("clipboardCopy", j), m.value = !0;
|
|
566
|
+
}, b = ce("inputVariant", a.variant) || "normal", f = Object.assign(Object.assign({}, a), {
|
|
567
567
|
name: a.propertyName,
|
|
568
568
|
readonly: d,
|
|
569
569
|
type: (() => {
|
|
@@ -584,160 +584,160 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
584
584
|
return "text";
|
|
585
585
|
}
|
|
586
586
|
})(),
|
|
587
|
-
placeholder:
|
|
587
|
+
placeholder: y ? l.description || a.propertyName : l.placeholder
|
|
588
588
|
});
|
|
589
|
-
"type" in l && ((l.type === "number" || l.type === "integer") && (l.minimum && (
|
|
590
|
-
a.modelValue !== null &&
|
|
589
|
+
"type" in l && ((l.type === "number" || l.type === "integer") && (l.minimum && (f.min = l.minimum), l.exclusiveMinimum && (f.min = l.exclusiveMinimum + 1), l.maximum && (f.max = l.maximum), l.exclusiveMaximum && (f.max = l.exclusiveMaximum - 1)), l.type === "string" && ((l.format === "date" || l.format === "date-time") && (f.type = !r && l.format === "date-time" ? "datetime-local" : "date"), f.minlength = l.minLength, f.maxlength = l.maxLength)), f.type === "text" && r && (f.type = "search"), Ue(() => {
|
|
590
|
+
a.modelValue !== null && Y(a.modelValue);
|
|
591
591
|
});
|
|
592
|
-
const
|
|
593
|
-
let
|
|
594
|
-
if (typeof
|
|
595
|
-
|
|
596
|
-
else if (
|
|
597
|
-
|
|
592
|
+
const i = (j) => {
|
|
593
|
+
let K;
|
|
594
|
+
if (typeof j == "string")
|
|
595
|
+
K = j;
|
|
596
|
+
else if (j instanceof Date)
|
|
597
|
+
K = j.toISOString();
|
|
598
598
|
else
|
|
599
599
|
return "";
|
|
600
|
-
switch (
|
|
600
|
+
switch (f.type) {
|
|
601
601
|
case "date":
|
|
602
|
-
return
|
|
602
|
+
return K.slice(0, 10);
|
|
603
603
|
case "datetime-local":
|
|
604
|
-
return
|
|
604
|
+
return K.slice(0, 19);
|
|
605
605
|
default:
|
|
606
606
|
throw new Error();
|
|
607
607
|
}
|
|
608
|
-
},
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
if (
|
|
612
|
-
return
|
|
608
|
+
}, k = J(""), B = a.property?.type === "string" && a.property.mask ? ut(a.property.mask) : null;
|
|
609
|
+
ne(() => a.modelValue, (j) => {
|
|
610
|
+
k.value = (() => {
|
|
611
|
+
if (B)
|
|
612
|
+
return j ? B.enmask(String(j), void 0, {
|
|
613
613
|
defaultValue: !0
|
|
614
614
|
}) : "";
|
|
615
|
-
switch (
|
|
615
|
+
switch (f.type) {
|
|
616
616
|
case "date":
|
|
617
617
|
case "datetime-local":
|
|
618
|
-
return
|
|
618
|
+
return i(j);
|
|
619
619
|
}
|
|
620
|
-
switch (
|
|
620
|
+
switch (j) {
|
|
621
621
|
case null:
|
|
622
622
|
case void 0:
|
|
623
623
|
return "";
|
|
624
624
|
default:
|
|
625
|
-
return
|
|
625
|
+
return j;
|
|
626
626
|
}
|
|
627
627
|
})();
|
|
628
628
|
}, {
|
|
629
629
|
immediate: !0
|
|
630
630
|
});
|
|
631
|
-
const
|
|
631
|
+
const $ = (j) => typeof k.value == "string" && a.property?.type === "string" && B !== null ? (k.value = B.enmask(k.value, void 0, {
|
|
632
632
|
defaultValue: !0
|
|
633
|
-
}), a.property.maskedValue === !0 ?
|
|
634
|
-
const
|
|
635
|
-
if (typeof
|
|
636
|
-
return
|
|
637
|
-
switch (
|
|
633
|
+
}), a.property.maskedValue === !0 ? k.value : B.unmask(k.value)) : j, Y = (j) => {
|
|
634
|
+
const K = (() => {
|
|
635
|
+
if (typeof j != "string")
|
|
636
|
+
return j;
|
|
637
|
+
switch (f.type) {
|
|
638
638
|
case "number":
|
|
639
639
|
case "integer":
|
|
640
|
-
return
|
|
640
|
+
return j === "" ? null : Number(j);
|
|
641
641
|
case "date":
|
|
642
642
|
case "date-time":
|
|
643
|
-
return
|
|
643
|
+
return j === "" ? null : typeof j == "string" ? new Date(j) : j;
|
|
644
644
|
default:
|
|
645
|
-
return
|
|
645
|
+
return $(j);
|
|
646
646
|
}
|
|
647
647
|
})();
|
|
648
|
-
o("input",
|
|
649
|
-
},
|
|
650
|
-
const
|
|
651
|
-
|
|
648
|
+
o("input", K), o("update:modelValue", K);
|
|
649
|
+
}, A = (j) => {
|
|
650
|
+
const K = j.target.value;
|
|
651
|
+
k.value = K, Y(K);
|
|
652
652
|
};
|
|
653
|
-
return (
|
|
654
|
-
const
|
|
653
|
+
return (j, K) => {
|
|
654
|
+
const ee = N("focus"), de = N("clickable");
|
|
655
655
|
return n(), s("label", Jt, [
|
|
656
|
-
t(
|
|
657
|
-
|
|
656
|
+
t(y) ? h("", !0) : (n(), s("div", Zt, [
|
|
657
|
+
j.$slots.default ? C(j.$slots, "default", { key: 0 }, void 0, !0) : C(j.$slots, "description", { key: 1 }, void 0, !0)
|
|
658
658
|
])),
|
|
659
|
-
|
|
660
|
-
C(
|
|
661
|
-
])) :
|
|
659
|
+
j.$slots.hint ? (n(), s("div", Pt, [
|
|
660
|
+
C(j.$slots, "hint", {}, void 0, !0)
|
|
661
|
+
])) : h("", !0),
|
|
662
662
|
"element" in t(l) && t(l).element === "textarea" ? (n(), s("div", {
|
|
663
663
|
key: 2,
|
|
664
664
|
class: U([
|
|
665
665
|
"input__container",
|
|
666
666
|
"input__container--textarea",
|
|
667
|
-
`input__container--${t(
|
|
667
|
+
`input__container--${t(b)}`
|
|
668
668
|
])
|
|
669
669
|
}, [
|
|
670
|
-
|
|
671
|
-
placeholder: t(
|
|
672
|
-
readonly: t(
|
|
670
|
+
W(O("textarea", {
|
|
671
|
+
placeholder: t(f).placeholder,
|
|
672
|
+
readonly: t(f).readonly,
|
|
673
673
|
value: e.modelValue,
|
|
674
674
|
class: U([
|
|
675
675
|
"input__textarea",
|
|
676
|
-
`input__input--${t(
|
|
676
|
+
`input__input--${t(b)}`
|
|
677
677
|
]),
|
|
678
|
-
onInput:
|
|
678
|
+
onInput: A
|
|
679
679
|
}, null, 42, Nt), [
|
|
680
|
-
[
|
|
680
|
+
[ee, t(l).focus]
|
|
681
681
|
])
|
|
682
682
|
], 2)) : (n(), s("div", {
|
|
683
683
|
key: 3,
|
|
684
684
|
class: U([
|
|
685
685
|
"input__container",
|
|
686
|
-
`input__container--${t(
|
|
686
|
+
`input__container--${t(b)}`
|
|
687
687
|
])
|
|
688
688
|
}, [
|
|
689
|
-
|
|
690
|
-
value:
|
|
689
|
+
W(O("input", M(t(f), {
|
|
690
|
+
value: k.value,
|
|
691
691
|
"data-component": "input",
|
|
692
692
|
class: [
|
|
693
693
|
"input__input",
|
|
694
|
-
`input__input--${t(
|
|
694
|
+
`input__input--${t(b)}`,
|
|
695
695
|
{ "input__input--icon": t(u) },
|
|
696
696
|
{ "input__input--readOnly": t(d) }
|
|
697
697
|
],
|
|
698
|
-
onInput:
|
|
699
|
-
onChange:
|
|
698
|
+
onInput: A,
|
|
699
|
+
onChange: K[0] || (K[0] = (ue) => o("change", ue))
|
|
700
700
|
}), null, 16, en), [
|
|
701
|
-
[
|
|
701
|
+
[ee, t(l).focus]
|
|
702
702
|
]),
|
|
703
|
-
t(u) ? (n(),
|
|
703
|
+
t(u) ? (n(), _(H, {
|
|
704
704
|
key: 0,
|
|
705
705
|
icon: t(l).icon || "magnifying-glass",
|
|
706
706
|
class: U([
|
|
707
707
|
"input__icon",
|
|
708
|
-
`input__icon--${t(
|
|
708
|
+
`input__icon--${t(b)}`
|
|
709
709
|
])
|
|
710
|
-
}, null, 8, ["icon", "class"])) :
|
|
710
|
+
}, null, 8, ["icon", "class"])) : h("", !0),
|
|
711
711
|
t(d) ? (n(), s("div", tn, [
|
|
712
|
-
|
|
713
|
-
text:
|
|
712
|
+
x(Xt, null, {
|
|
713
|
+
text: v(() => [...K[2] || (K[2] = [
|
|
714
714
|
D("Copiar", -1)
|
|
715
715
|
])]),
|
|
716
|
-
default:
|
|
717
|
-
m.value ? (n(),
|
|
716
|
+
default: v(() => [
|
|
717
|
+
m.value ? (n(), _(H, {
|
|
718
718
|
key: 0,
|
|
719
719
|
reactive: "",
|
|
720
720
|
icon: "check"
|
|
721
|
-
})) :
|
|
721
|
+
})) : W((n(), _(H, {
|
|
722
722
|
key: 1,
|
|
723
723
|
reactive: "",
|
|
724
724
|
icon: "clipboard",
|
|
725
|
-
onClick:
|
|
725
|
+
onClick: K[1] || (K[1] = Ie((ue) => p(String(e.modelValue || "")), ["prevent"]))
|
|
726
726
|
}, null, 512)), [
|
|
727
|
-
[
|
|
727
|
+
[de]
|
|
728
728
|
])
|
|
729
729
|
]),
|
|
730
730
|
_: 1
|
|
731
731
|
})
|
|
732
|
-
])) :
|
|
732
|
+
])) : h("", !0)
|
|
733
733
|
], 2))
|
|
734
734
|
]);
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
|
-
}), _e = /* @__PURE__ */
|
|
737
|
+
}), _e = /* @__PURE__ */ F(nn, [["__scopeId", "data-v-6e5fdbe7"]]), an = {
|
|
738
738
|
key: 1,
|
|
739
739
|
value: ""
|
|
740
|
-
}, on = ["value", "data-selected"], ln = /* @__PURE__ */
|
|
740
|
+
}, on = ["value", "data-selected"], ln = /* @__PURE__ */ z({
|
|
741
741
|
__name: "aeria-select",
|
|
742
742
|
props: {
|
|
743
743
|
modelValue: {},
|
|
@@ -753,26 +753,26 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
753
753
|
},
|
|
754
754
|
emits: ["update:modelValue", "change"],
|
|
755
755
|
setup(e, { emit: c }) {
|
|
756
|
-
const a = e, o = c, l =
|
|
756
|
+
const a = e, o = c, l = J(null), u = a.property, r = (p) => {
|
|
757
757
|
o("update:modelValue", p), o("change", p);
|
|
758
|
-
},
|
|
758
|
+
}, y = (p) => {
|
|
759
759
|
p === "" || p === null ? r(null) : a.booleanRef ? r(p === "true") : r(p);
|
|
760
|
-
}, d = (p) => Array.isArray(a.modelValue) ? a.modelValue.includes(p) : a.modelValue === p, m =
|
|
761
|
-
return
|
|
760
|
+
}, d = (p) => Array.isArray(a.modelValue) ? a.modelValue.includes(p) : a.modelValue === p, m = Q(() => a.multiple ? typeof a.multiple == "number" ? a.multiple : 5 : 1);
|
|
761
|
+
return ne(l, (p) => {
|
|
762
762
|
if (p && a.required && !a.modelValue) {
|
|
763
|
-
const
|
|
764
|
-
|
|
763
|
+
const b = p.querySelector("option")?.value;
|
|
764
|
+
b && o("update:modelValue", b);
|
|
765
765
|
}
|
|
766
|
-
}), a.multiple &&
|
|
766
|
+
}), a.multiple && ne(() => a.modelValue, (p) => {
|
|
767
767
|
if (!l.value)
|
|
768
768
|
return;
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
}), (p,
|
|
769
|
+
const b = l.value.querySelector('option[data-selected="true"]');
|
|
770
|
+
b && b.removeAttribute("data-selected"), l.value.querySelector(`option[value="${p}"]`)?.setAttribute("data-selected", "true");
|
|
771
|
+
}), (p, b) => e.readOnly ? (n(), _(_e, {
|
|
772
772
|
key: 1,
|
|
773
773
|
"read-only": "",
|
|
774
774
|
"model-value": e.modelValue
|
|
775
|
-
}, null, 8, ["model-value"])) : (n(), s("select",
|
|
775
|
+
}, null, 8, ["model-value"])) : (n(), s("select", M({ key: 0 }, {
|
|
776
776
|
size: m.value,
|
|
777
777
|
value: e.modelValue
|
|
778
778
|
}, {
|
|
@@ -783,25 +783,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
783
783
|
"select--multiple": !!m.value,
|
|
784
784
|
"select--outline": !e.noOutline
|
|
785
785
|
},
|
|
786
|
-
onChange:
|
|
786
|
+
onChange: b[0] || (b[0] = (f) => y(f.target.value))
|
|
787
787
|
}), [
|
|
788
|
-
t(u) && t(u).icon ? (n(),
|
|
788
|
+
t(u) && t(u).icon ? (n(), _(H, {
|
|
789
789
|
key: 0,
|
|
790
790
|
icon: t(u).icon
|
|
791
|
-
}, null, 8, ["icon"])) :
|
|
792
|
-
!a.multiple && !e.required ? (n(), s("option", an,
|
|
793
|
-
(n(!0), s(
|
|
794
|
-
key: String(
|
|
795
|
-
value:
|
|
796
|
-
"data-selected": d(
|
|
797
|
-
},
|
|
791
|
+
}, null, 8, ["icon"])) : h("", !0),
|
|
792
|
+
!a.multiple && !e.required ? (n(), s("option", an, g(t(q)("none")), 1)) : h("", !0),
|
|
793
|
+
(n(!0), s(G, null, E(t(u) && "enum" in t(u) ? t(u).enum : [], (f) => (n(), s("option", {
|
|
794
|
+
key: String(f),
|
|
795
|
+
value: f,
|
|
796
|
+
"data-selected": d(f)
|
|
797
|
+
}, g(t(u)?.translate && typeof f == "string" ? t(q)(f) : f), 9, on))), 128)),
|
|
798
798
|
C(p.$slots, "default", {}, void 0, !0)
|
|
799
799
|
], 16));
|
|
800
800
|
}
|
|
801
|
-
}), Qe = /* @__PURE__ */
|
|
801
|
+
}), Qe = /* @__PURE__ */ F(ln, [["__scopeId", "data-v-6294bdce"]]), sn = { class: "pagination" }, rn = { class: "pagination__arrows" }, un = ["value"], cn = {
|
|
802
802
|
key: 0,
|
|
803
803
|
class: "pagination__summary"
|
|
804
|
-
}, dn = /* @__PURE__ */
|
|
804
|
+
}, dn = /* @__PURE__ */ z({
|
|
805
805
|
__name: "aeria-pagination",
|
|
806
806
|
props: {
|
|
807
807
|
pagination: {},
|
|
@@ -809,18 +809,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
809
809
|
},
|
|
810
810
|
emits: ["paginate"],
|
|
811
811
|
setup(e, { emit: c }) {
|
|
812
|
-
const a = e, o = c, l =
|
|
812
|
+
const a = e, o = c, l = Q({
|
|
813
813
|
get: () => Math.floor(a.pagination.offset / a.pagination.limit),
|
|
814
814
|
set: (d) => {
|
|
815
815
|
a.pagination.offset = d * a.pagination.limit;
|
|
816
816
|
}
|
|
817
|
-
}), u =
|
|
817
|
+
}), u = Q({
|
|
818
818
|
get: () => a.pagination.limit,
|
|
819
819
|
set: (d) => {
|
|
820
820
|
a.pagination.limit = Number(d);
|
|
821
821
|
}
|
|
822
|
-
}), r =
|
|
823
|
-
return
|
|
822
|
+
}), r = J(l.value ? l.value + 1 : 1), y = Q(() => Math.ceil(a.pagination.recordsTotal / a.pagination.limit));
|
|
823
|
+
return ne([
|
|
824
824
|
l,
|
|
825
825
|
u
|
|
826
826
|
], ([d]) => {
|
|
@@ -830,43 +830,43 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
830
830
|
});
|
|
831
831
|
}), (d, m) => (n(), s("div", sn, [
|
|
832
832
|
O("div", rn, [
|
|
833
|
-
|
|
833
|
+
x(me, {
|
|
834
834
|
disabled: l.value === 0,
|
|
835
835
|
onClick: m[0] || (m[0] = (p) => l.value = 0)
|
|
836
836
|
}, {
|
|
837
|
-
default:
|
|
838
|
-
|
|
837
|
+
default: v(() => [
|
|
838
|
+
x(H, { icon: "caret-double-left" })
|
|
839
839
|
]),
|
|
840
840
|
_: 1
|
|
841
841
|
}, 8, ["disabled"]),
|
|
842
|
-
|
|
842
|
+
x(me, {
|
|
843
843
|
disabled: l.value === 0,
|
|
844
844
|
onClick: m[1] || (m[1] = (p) => l.value -= 1)
|
|
845
845
|
}, {
|
|
846
|
-
default:
|
|
847
|
-
|
|
846
|
+
default: v(() => [
|
|
847
|
+
x(H, { icon: "caret-left" })
|
|
848
848
|
]),
|
|
849
849
|
_: 1
|
|
850
850
|
}, 8, ["disabled"]),
|
|
851
|
-
|
|
852
|
-
disabled: l.value ===
|
|
851
|
+
x(me, {
|
|
852
|
+
disabled: l.value === y.value - 1,
|
|
853
853
|
onClick: m[2] || (m[2] = (p) => l.value += 1)
|
|
854
854
|
}, {
|
|
855
|
-
default:
|
|
856
|
-
|
|
855
|
+
default: v(() => [
|
|
856
|
+
x(H, { icon: "caret-right" })
|
|
857
857
|
]),
|
|
858
858
|
_: 1
|
|
859
859
|
}, 8, ["disabled"]),
|
|
860
|
-
|
|
861
|
-
disabled: l.value ===
|
|
862
|
-
onClick: m[3] || (m[3] = (p) => l.value =
|
|
860
|
+
x(me, {
|
|
861
|
+
disabled: l.value === y.value - 1,
|
|
862
|
+
onClick: m[3] || (m[3] = (p) => l.value = y.value - 1)
|
|
863
863
|
}, {
|
|
864
|
-
default:
|
|
865
|
-
|
|
864
|
+
default: v(() => [
|
|
865
|
+
x(H, { icon: "caret-double-right" })
|
|
866
866
|
]),
|
|
867
867
|
_: 1
|
|
868
868
|
}, 8, ["disabled"]),
|
|
869
|
-
|
|
869
|
+
x(Qe, {
|
|
870
870
|
modelValue: u.value,
|
|
871
871
|
"onUpdate:modelValue": m[4] || (m[4] = (p) => u.value = p),
|
|
872
872
|
property: {
|
|
@@ -875,18 +875,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
875
875
|
},
|
|
876
876
|
class: "pagination__control"
|
|
877
877
|
}, {
|
|
878
|
-
default:
|
|
879
|
-
(n(!0), s(
|
|
878
|
+
default: v(() => [
|
|
879
|
+
(n(!0), s(G, null, E(t(ct), (p) => (n(), s("option", {
|
|
880
880
|
key: `limit-${p}`,
|
|
881
881
|
value: p
|
|
882
|
-
},
|
|
882
|
+
}, g(p), 9, un))), 128))
|
|
883
883
|
]),
|
|
884
884
|
_: 1
|
|
885
885
|
}, 8, ["modelValue"])
|
|
886
886
|
]),
|
|
887
|
-
e.noSummary ?
|
|
888
|
-
D(
|
|
889
|
-
(n(),
|
|
887
|
+
e.noSummary ? h("", !0) : (n(), s("div", cn, [
|
|
888
|
+
D(g(t(q)("Page")) + " ", 1),
|
|
889
|
+
(n(), _(_e, {
|
|
890
890
|
key: l.value,
|
|
891
891
|
modelValue: r.value,
|
|
892
892
|
"onUpdate:modelValue": m[5] || (m[5] = (p) => r.value = p),
|
|
@@ -899,13 +899,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
899
899
|
l.value = r.value === 0 ? 0 : r.value - 1;
|
|
900
900
|
})
|
|
901
901
|
}, null, 8, ["modelValue"])),
|
|
902
|
-
O("span", null,
|
|
902
|
+
O("span", null, g(t(q)("of")) + " " + g(y.value), 1)
|
|
903
903
|
]))
|
|
904
904
|
]));
|
|
905
905
|
}
|
|
906
|
-
}), mn = /* @__PURE__ */
|
|
906
|
+
}), mn = /* @__PURE__ */ F(dn, [["__scopeId", "data-v-8cd299be"]]), pn = { class: "checkbox__text" }, fn = ["innerHTML"], vn = { class: "checkbox__hint" }, yn = ["innerHTML"], hn = {
|
|
907
907
|
inheritAttrs: !1
|
|
908
|
-
}, bn = /* @__PURE__ */
|
|
908
|
+
}, bn = /* @__PURE__ */ z({
|
|
909
909
|
...hn,
|
|
910
910
|
__name: "aeria-checkbox",
|
|
911
911
|
props: {
|
|
@@ -929,7 +929,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
929
929
|
return "checkbox";
|
|
930
930
|
}
|
|
931
931
|
return "radio";
|
|
932
|
-
})(), r = c,
|
|
932
|
+
})(), r = c, y = a.value || !1, d = Q({
|
|
933
933
|
get: () => {
|
|
934
934
|
if (o) {
|
|
935
935
|
if ("type" in o && o.type === "boolean")
|
|
@@ -947,11 +947,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
947
947
|
return;
|
|
948
948
|
}
|
|
949
949
|
if ("items" in o) {
|
|
950
|
-
if (a.modelValue?.includes(
|
|
951
|
-
r("update:modelValue", a.modelValue.filter((p) => p !==
|
|
950
|
+
if (a.modelValue?.includes(y)) {
|
|
951
|
+
r("update:modelValue", a.modelValue.filter((p) => p !== y));
|
|
952
952
|
return;
|
|
953
953
|
}
|
|
954
|
-
r("update:modelValue", [
|
|
954
|
+
r("update:modelValue", [y].concat(a.modelValue || []));
|
|
955
955
|
return;
|
|
956
956
|
}
|
|
957
957
|
}
|
|
@@ -961,16 +961,16 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
961
961
|
}), m = (p) => {
|
|
962
962
|
l && p.preventDefault();
|
|
963
963
|
};
|
|
964
|
-
return (p,
|
|
965
|
-
const
|
|
966
|
-
return
|
|
964
|
+
return (p, b) => {
|
|
965
|
+
const f = N("clickable");
|
|
966
|
+
return W((n(), s("label", {
|
|
967
967
|
class: U([
|
|
968
968
|
"checkbox",
|
|
969
969
|
{ "checkbox--readOnly": t(l) }
|
|
970
970
|
])
|
|
971
971
|
}, [
|
|
972
|
-
|
|
973
|
-
"onUpdate:modelValue":
|
|
972
|
+
W(O("input", M({
|
|
973
|
+
"onUpdate:modelValue": b[0] || (b[0] = (i) => d.value = i)
|
|
974
974
|
}, {
|
|
975
975
|
type: t(u),
|
|
976
976
|
readOnly: t(l),
|
|
@@ -983,26 +983,26 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
983
983
|
]),
|
|
984
984
|
O("div", pn, [
|
|
985
985
|
O("div", null, [
|
|
986
|
-
p.$slots.description ? C(p.$slots, "description", { key: 0 }, void 0, !0) : t(
|
|
986
|
+
p.$slots.description ? C(p.$slots, "description", { key: 0 }, void 0, !0) : t(y) ? (n(), s("div", {
|
|
987
987
|
key: 1,
|
|
988
|
-
innerHTML: t(o)?.translate && typeof t(
|
|
988
|
+
innerHTML: t(o)?.translate && typeof t(y) == "string" ? t(q)(t(y)) : t(y)
|
|
989
989
|
}, null, 8, fn)) : C(p.$slots, "default", { key: 2 }, void 0, !0)
|
|
990
990
|
]),
|
|
991
991
|
O("div", vn, [
|
|
992
992
|
p.$slots.hint ? C(p.$slots, "hint", { key: 0 }, void 0, !0) : t(o)?.hint ? (n(), s("div", {
|
|
993
993
|
key: 1,
|
|
994
994
|
innerHTML: t(o).hint
|
|
995
|
-
}, null, 8, yn)) :
|
|
995
|
+
}, null, 8, yn)) : h("", !0)
|
|
996
996
|
])
|
|
997
997
|
])
|
|
998
998
|
], 2)), [
|
|
999
|
-
[
|
|
999
|
+
[f]
|
|
1000
1000
|
]);
|
|
1001
1001
|
};
|
|
1002
1002
|
}
|
|
1003
|
-
}), _n = /* @__PURE__ */
|
|
1003
|
+
}), _n = /* @__PURE__ */ F(bn, [["__scopeId", "data-v-5ef340be"]]), $n = {
|
|
1004
1004
|
inheritAttrs: !1
|
|
1005
|
-
}, gn = /* @__PURE__ */
|
|
1005
|
+
}, gn = /* @__PURE__ */ z({
|
|
1006
1006
|
...$n,
|
|
1007
1007
|
__name: "aeria-options",
|
|
1008
1008
|
props: {
|
|
@@ -1017,26 +1017,26 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1017
1017
|
},
|
|
1018
1018
|
emits: ["update:modelValue"],
|
|
1019
1019
|
setup(e, { emit: c }) {
|
|
1020
|
-
const a = e, o = c, l = a.readOnly || a.property.readOnly, u = "items" in a.property ? a.property.items.enum : a.property.enum, r = (
|
|
1021
|
-
o("update:modelValue",
|
|
1020
|
+
const a = e, o = c, l = a.readOnly || a.property.readOnly, u = "items" in a.property ? a.property.items.enum : a.property.enum, r = (y) => {
|
|
1021
|
+
o("update:modelValue", y);
|
|
1022
1022
|
};
|
|
1023
1023
|
return Xe(() => {
|
|
1024
1024
|
a.modelValue || o(
|
|
1025
1025
|
"update:modelValue",
|
|
1026
1026
|
"items" in a.property ? [] : ""
|
|
1027
1027
|
);
|
|
1028
|
-
}), (
|
|
1028
|
+
}), (y, d) => (n(), s("div", {
|
|
1029
1029
|
class: "options",
|
|
1030
1030
|
style: ve({
|
|
1031
1031
|
"--columns": e.columns,
|
|
1032
1032
|
"grid-template-columns": "repeat(var(--columns), 1fr)"
|
|
1033
1033
|
})
|
|
1034
1034
|
}, [
|
|
1035
|
-
(n(!0), s(
|
|
1035
|
+
(n(!0), s(G, null, E(t(u), (m) => (n(), s("div", {
|
|
1036
1036
|
key: `option-${m}`,
|
|
1037
1037
|
class: "options__checkbox"
|
|
1038
1038
|
}, [
|
|
1039
|
-
|
|
1039
|
+
x(_n, M({ ref_for: !0 }, {
|
|
1040
1040
|
value: m,
|
|
1041
1041
|
readOnly: t(l),
|
|
1042
1042
|
property: e.property
|
|
@@ -1047,9 +1047,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1047
1047
|
]))), 128))
|
|
1048
1048
|
], 4));
|
|
1049
1049
|
}
|
|
1050
|
-
}), kn = /* @__PURE__ */
|
|
1050
|
+
}), kn = /* @__PURE__ */ F(gn, [["__scopeId", "data-v-b22b359b"]]), Vn = { class: "switch-wrapper" }, Cn = { key: 1 }, On = {
|
|
1051
1051
|
inheritAttrs: !1
|
|
1052
|
-
}, An = /* @__PURE__ */
|
|
1052
|
+
}, An = /* @__PURE__ */ z({
|
|
1053
1053
|
...On,
|
|
1054
1054
|
__name: "aeria-switch",
|
|
1055
1055
|
props: {
|
|
@@ -1066,10 +1066,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1066
1066
|
const a = e, o = c, l = a.property, u = a.readOnly || l?.readOnly, r = () => {
|
|
1067
1067
|
u || (o("change", !a.modelValue), o("update:modelValue", !a.modelValue));
|
|
1068
1068
|
};
|
|
1069
|
-
return (
|
|
1070
|
-
const m =
|
|
1069
|
+
return (y, d) => {
|
|
1070
|
+
const m = N("clickable");
|
|
1071
1071
|
return n(), s("div", Vn, [
|
|
1072
|
-
|
|
1072
|
+
W((n(), s("a", {
|
|
1073
1073
|
class: U([
|
|
1074
1074
|
"switch",
|
|
1075
1075
|
{ "switch--active": e.modelValue },
|
|
@@ -1089,14 +1089,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1089
1089
|
blocked: t(u)
|
|
1090
1090
|
}]
|
|
1091
1091
|
]),
|
|
1092
|
-
|
|
1092
|
+
y.$slots.default ? C(y.$slots, "default", { key: 0 }, void 0, !0) : (n(), s("div", Cn, g(t(l)?.description || e.propertyName), 1))
|
|
1093
1093
|
]);
|
|
1094
1094
|
};
|
|
1095
1095
|
}
|
|
1096
|
-
}), In = /* @__PURE__ */
|
|
1096
|
+
}), In = /* @__PURE__ */ F(An, [["__scopeId", "data-v-ae45597d"]]), Bn = { class: "picture" }, Sn = { style: { position: "fixed", top: "50%", left: "50%", transform: "translate(-50%, -50%)" } }, wn = ["src", "alt"], Tn = {
|
|
1097
1097
|
key: 0,
|
|
1098
1098
|
class: "picture__meta"
|
|
1099
|
-
}, jn = ["src"], Rn = { key: 5 }, qn = /* @__PURE__ */
|
|
1099
|
+
}, jn = ["src"], Rn = { key: 5 }, qn = /* @__PURE__ */ z({
|
|
1100
1100
|
__name: "aeria-picture",
|
|
1101
1101
|
props: {
|
|
1102
1102
|
url: {},
|
|
@@ -1111,15 +1111,15 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1111
1111
|
height: { default: "100%" }
|
|
1112
1112
|
},
|
|
1113
1113
|
setup(e) {
|
|
1114
|
-
const c = e, a =
|
|
1114
|
+
const c = e, a = Q(() => c.fileId ? `${Je}/file/${c.fileId}/picture` : c.url || c.modelValue), o = J(!1);
|
|
1115
1115
|
return (l, u) => {
|
|
1116
|
-
const r =
|
|
1116
|
+
const r = N("overlay");
|
|
1117
1117
|
return n(), s("figure", Bn, [
|
|
1118
|
-
a.value && o.value ? (n(),
|
|
1118
|
+
a.value && o.value ? (n(), _(Fe, {
|
|
1119
1119
|
key: 0,
|
|
1120
1120
|
to: "main"
|
|
1121
1121
|
}, [
|
|
1122
|
-
|
|
1122
|
+
W((n(), s("div", Sn, [
|
|
1123
1123
|
O("img", {
|
|
1124
1124
|
src: a.value,
|
|
1125
1125
|
alt: e.alt,
|
|
@@ -1127,9 +1127,9 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1127
1127
|
maxHeight: "60vh",
|
|
1128
1128
|
objectFit: "contain"
|
|
1129
1129
|
},
|
|
1130
|
-
onClick: u[0] || (u[0] = (
|
|
1130
|
+
onClick: u[0] || (u[0] = (y) => o.value = !0)
|
|
1131
1131
|
}, null, 8, wn),
|
|
1132
|
-
e.meta?.owner ? (n(), s("div", Tn,
|
|
1132
|
+
e.meta?.owner ? (n(), s("div", Tn, g(l.t("created_by")) + " " + g(e.meta.owner.name) + " em " + g(l.formatDateTime(e.meta.created_at, { hours: !0 })), 1)) : h("", !0)
|
|
1133
1133
|
])), [
|
|
1134
1134
|
[r, {
|
|
1135
1135
|
layer: 60,
|
|
@@ -1138,7 +1138,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
}]
|
|
1140
1140
|
])
|
|
1141
|
-
])) :
|
|
1141
|
+
])) : h("", !0),
|
|
1142
1142
|
a.value ? (n(), s("img", {
|
|
1143
1143
|
key: 1,
|
|
1144
1144
|
src: a.value,
|
|
@@ -1188,14 +1188,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1188
1188
|
])], 6)),
|
|
1189
1189
|
l.$slots.caption ? (n(), s("figcaption", Rn, [
|
|
1190
1190
|
C(l.$slots, "caption", {}, void 0, !0)
|
|
1191
|
-
])) :
|
|
1191
|
+
])) : h("", !0)
|
|
1192
1192
|
]);
|
|
1193
1193
|
};
|
|
1194
1194
|
}
|
|
1195
|
-
}), Le = /* @__PURE__ */
|
|
1195
|
+
}), Le = /* @__PURE__ */ F(qn, [["__scopeId", "data-v-6705b19f"]]), Ln = { class: "item" }, xn = { class: "item__presentation" }, Mn = {
|
|
1196
1196
|
key: 1,
|
|
1197
1197
|
class: "item__name"
|
|
1198
|
-
}, zn = { class: "item__size" }, En = /* @__PURE__ */
|
|
1198
|
+
}, zn = { class: "item__size" }, En = /* @__PURE__ */ z({
|
|
1199
1199
|
__name: "aeria-file-item",
|
|
1200
1200
|
props: {
|
|
1201
1201
|
modelValue: {}
|
|
@@ -1212,38 +1212,38 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1212
1212
|
][u]}`;
|
|
1213
1213
|
};
|
|
1214
1214
|
return (l, u) => (n(), s("div", Ln, [
|
|
1215
|
-
"_id" in t(a) && t(a).type.startsWith("image/") ? (n(),
|
|
1215
|
+
"_id" in t(a) && t(a).type.startsWith("image/") ? (n(), _(Le, {
|
|
1216
1216
|
key: 0,
|
|
1217
1217
|
bordered: "",
|
|
1218
1218
|
expandable: "",
|
|
1219
1219
|
alt: t(a).name,
|
|
1220
1220
|
url: t(a).link,
|
|
1221
1221
|
class: "item__picture"
|
|
1222
|
-
}, null, 8, ["alt", "url"])) :
|
|
1222
|
+
}, null, 8, ["alt", "url"])) : h("", !0),
|
|
1223
1223
|
O("div", xn, [
|
|
1224
|
-
"_id" in t(a) ? (n(),
|
|
1224
|
+
"_id" in t(a) ? (n(), _(H, {
|
|
1225
1225
|
key: 0,
|
|
1226
1226
|
icon: "arrow-square-out",
|
|
1227
1227
|
href: t(a).link,
|
|
1228
1228
|
target: "_blank",
|
|
1229
1229
|
class: "item__name item__name--link"
|
|
1230
1230
|
}, {
|
|
1231
|
-
default:
|
|
1232
|
-
D(
|
|
1231
|
+
default: v(() => [
|
|
1232
|
+
D(g(t(a).name), 1)
|
|
1233
1233
|
]),
|
|
1234
1234
|
_: 1
|
|
1235
|
-
}, 8, ["href"])) : (n(), s("div", Mn,
|
|
1236
|
-
O("div", zn,
|
|
1235
|
+
}, 8, ["href"])) : (n(), s("div", Mn, g(t(a).name), 1)),
|
|
1236
|
+
O("div", zn, g(o(t(a).size)), 1)
|
|
1237
1237
|
]),
|
|
1238
1238
|
O("div", null, [
|
|
1239
1239
|
C(l.$slots, "default", {}, void 0, !0)
|
|
1240
1240
|
])
|
|
1241
1241
|
]));
|
|
1242
1242
|
}
|
|
1243
|
-
}), Fn = /* @__PURE__ */
|
|
1243
|
+
}), Fn = /* @__PURE__ */ F(En, [["__scopeId", "data-v-85a82246"]]), Un = { class: "file" }, Hn = ["accept", "multiple"], Dn = {
|
|
1244
1244
|
key: 1,
|
|
1245
1245
|
class: "file__list"
|
|
1246
|
-
}, Qn = /* @__PURE__ */
|
|
1246
|
+
}, Qn = /* @__PURE__ */ z({
|
|
1247
1247
|
__name: "aeria-file",
|
|
1248
1248
|
props: {
|
|
1249
1249
|
modelValue: {},
|
|
@@ -1259,95 +1259,95 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1259
1259
|
},
|
|
1260
1260
|
emits: ["update:content", "change", "update:modelValue"],
|
|
1261
1261
|
setup(e, { emit: c }) {
|
|
1262
|
-
const a = e, o = a.property &&
|
|
1262
|
+
const a = e, o = a.property && re(a.property), l = c, r = we() ? xe() : null, y = a.multiple || a.property && "type" in a.property && a.property.type === "array", d = Q(() => {
|
|
1263
1263
|
if (a.modelValue)
|
|
1264
1264
|
return Array.isArray(a.modelValue) ? a.modelValue : [a.modelValue];
|
|
1265
|
-
}), m = (
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1268
|
-
}), p = async (
|
|
1269
|
-
const
|
|
1270
|
-
if (!
|
|
1265
|
+
}), m = (f) => new Promise((i) => {
|
|
1266
|
+
const k = new FileReader();
|
|
1267
|
+
k.onload = () => i(k.result), k.readAsArrayBuffer(f);
|
|
1268
|
+
}), p = async (f) => {
|
|
1269
|
+
const i = f.target.files;
|
|
1270
|
+
if (!i)
|
|
1271
1271
|
return;
|
|
1272
|
-
const
|
|
1273
|
-
for (const
|
|
1274
|
-
const
|
|
1272
|
+
const k = [];
|
|
1273
|
+
for (const B of i) {
|
|
1274
|
+
const $ = await m(B);
|
|
1275
1275
|
if (r) {
|
|
1276
|
-
const { data: { error:
|
|
1276
|
+
const { data: { error: Y, result: A } } = await dt(`${Je}/${r.$id}/upload?name=${B.name}`, $, {
|
|
1277
1277
|
params: {
|
|
1278
1278
|
method: "POST",
|
|
1279
1279
|
headers: {
|
|
1280
|
-
"content-type":
|
|
1280
|
+
"content-type": B.type || "application/octet-stream",
|
|
1281
1281
|
"x-stream-request": "1"
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
1284
|
});
|
|
1285
|
-
if (
|
|
1285
|
+
if (Y)
|
|
1286
1286
|
return;
|
|
1287
|
-
|
|
1288
|
-
tempId:
|
|
1289
|
-
file:
|
|
1287
|
+
k.unshift({
|
|
1288
|
+
tempId: A.tempId,
|
|
1289
|
+
file: B
|
|
1290
1290
|
});
|
|
1291
1291
|
} else
|
|
1292
|
-
|
|
1293
|
-
file:
|
|
1292
|
+
k.unshift({
|
|
1293
|
+
file: B
|
|
1294
1294
|
});
|
|
1295
1295
|
}
|
|
1296
|
-
|
|
1297
|
-
},
|
|
1296
|
+
y ? l("update:modelValue", Array.isArray(a.modelValue) ? k.concat(a.modelValue) : k) : l("update:modelValue", k[0]), l("update:content", k), l("change", k);
|
|
1297
|
+
}, b = async (f) => {
|
|
1298
1298
|
if (!a.modelValue)
|
|
1299
1299
|
throw new Error();
|
|
1300
|
-
const
|
|
1301
|
-
|
|
1300
|
+
const i = Array.isArray(a.modelValue) ? a.modelValue.filter((k, B) => B !== f) : [];
|
|
1301
|
+
y ? l("update:modelValue", i) : l("update:modelValue", null), l("update:content", i), l("change", i);
|
|
1302
1302
|
};
|
|
1303
|
-
return (
|
|
1304
|
-
const
|
|
1303
|
+
return (f, i) => {
|
|
1304
|
+
const k = N("clickable");
|
|
1305
1305
|
return n(), s("div", Un, [
|
|
1306
|
-
e.readOnly ?
|
|
1306
|
+
e.readOnly ? h("", !0) : (n(), s("input", {
|
|
1307
1307
|
key: 0,
|
|
1308
1308
|
ref: "file",
|
|
1309
1309
|
type: "file",
|
|
1310
1310
|
accept: t(o)?.accept?.join(","),
|
|
1311
|
-
multiple: t(
|
|
1311
|
+
multiple: t(y),
|
|
1312
1312
|
onChange: p
|
|
1313
1313
|
}, null, 40, Hn)),
|
|
1314
1314
|
d.value && d.value.length > 0 ? (n(), s("div", Dn, [
|
|
1315
|
-
(n(!0), s(
|
|
1316
|
-
key: "_id" in
|
|
1317
|
-
"model-value":
|
|
1315
|
+
(n(!0), s(G, null, E(d.value, (B, $) => (n(), _(Fn, {
|
|
1316
|
+
key: "_id" in B ? String(B._id) : B.file.name,
|
|
1317
|
+
"model-value": B
|
|
1318
1318
|
}, {
|
|
1319
|
-
default:
|
|
1320
|
-
e.readOnly ?
|
|
1319
|
+
default: v(() => [
|
|
1320
|
+
e.readOnly ? h("", !0) : W((n(), _(H, {
|
|
1321
1321
|
key: 0,
|
|
1322
1322
|
reactive: "",
|
|
1323
1323
|
icon: "trash",
|
|
1324
|
-
onClick: (
|
|
1324
|
+
onClick: (Y) => b($)
|
|
1325
1325
|
}, null, 8, ["onClick"])), [
|
|
1326
|
-
[
|
|
1326
|
+
[k]
|
|
1327
1327
|
])
|
|
1328
1328
|
]),
|
|
1329
1329
|
_: 2
|
|
1330
1330
|
}, 1032, ["model-value"]))), 128))
|
|
1331
|
-
])) :
|
|
1331
|
+
])) : h("", !0)
|
|
1332
1332
|
]);
|
|
1333
1333
|
};
|
|
1334
1334
|
}
|
|
1335
|
-
}), Gn = /* @__PURE__ */
|
|
1335
|
+
}), Gn = /* @__PURE__ */ F(Qn, [["__scopeId", "data-v-9950a715"]]), Wn = { class: "container" }, Yn = {
|
|
1336
1336
|
key: 1,
|
|
1337
1337
|
class: "container__footer"
|
|
1338
|
-
}, Kn = /* @__PURE__ */
|
|
1338
|
+
}, Kn = /* @__PURE__ */ z({
|
|
1339
1339
|
__name: "aeria-search-container",
|
|
1340
1340
|
props: {
|
|
1341
1341
|
observeScroll: { type: Boolean }
|
|
1342
1342
|
},
|
|
1343
1343
|
emits: ["endReached"],
|
|
1344
1344
|
setup(e, { emit: c }) {
|
|
1345
|
-
const a = e, o = c, l =
|
|
1345
|
+
const a = e, o = c, l = J(null), u = a.observeScroll ? He(l, {
|
|
1346
1346
|
antecipate: 100
|
|
1347
1347
|
}).reachedEnd : null;
|
|
1348
|
-
return u !== null &&
|
|
1348
|
+
return u !== null && ne(u, (r) => {
|
|
1349
1349
|
r && o("endReached", r);
|
|
1350
|
-
}), (r,
|
|
1350
|
+
}), (r, y) => (n(), s("div", Wn, [
|
|
1351
1351
|
r.$slots.default ? (n(), s("div", {
|
|
1352
1352
|
key: 0,
|
|
1353
1353
|
ref_key: "containerEl",
|
|
@@ -1355,13 +1355,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1355
1355
|
class: "container__content"
|
|
1356
1356
|
}, [
|
|
1357
1357
|
C(r.$slots, "default", {}, void 0, !0)
|
|
1358
|
-
], 512)) :
|
|
1358
|
+
], 512)) : h("", !0),
|
|
1359
1359
|
r.$slots.footer ? (n(), s("div", Yn, [
|
|
1360
1360
|
C(r.$slots, "footer", {}, void 0, !0)
|
|
1361
|
-
])) :
|
|
1361
|
+
])) : h("", !0)
|
|
1362
1362
|
]));
|
|
1363
1363
|
}
|
|
1364
|
-
}), Ge = /* @__PURE__ */
|
|
1364
|
+
}), Ge = /* @__PURE__ */ F(Kn, [["__scopeId", "data-v-c86e2d2a"]]), Xn = { class: "item__values" }, Jn = /* @__PURE__ */ z({
|
|
1365
1365
|
__name: "aeria-search-item",
|
|
1366
1366
|
props: {
|
|
1367
1367
|
item: {},
|
|
@@ -1372,21 +1372,21 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1372
1372
|
},
|
|
1373
1373
|
emits: ["update:modelValue", "change"],
|
|
1374
1374
|
setup(e, { emit: c }) {
|
|
1375
|
-
const a =
|
|
1375
|
+
const a = Ve(), o = e, l = c, u = o.property, r = re(u);
|
|
1376
1376
|
xe();
|
|
1377
|
-
const
|
|
1378
|
-
if (
|
|
1377
|
+
const y = Q(() => o.modelValue ? Array.isArray(o.modelValue) ? Array.isArray(o.modelValue) && Object.values(o.modelValue).some(({ _id: b }) => o.item._id === b) : o.modelValue._id === o.item._id : !1), d = () => {
|
|
1378
|
+
if (y.value)
|
|
1379
1379
|
return;
|
|
1380
|
-
const
|
|
1381
|
-
let
|
|
1382
|
-
"items" in u ? o.modelValue ?
|
|
1383
|
-
}, m = async (
|
|
1384
|
-
r.purge &&
|
|
1385
|
-
const
|
|
1386
|
-
const
|
|
1387
|
-
return
|
|
1380
|
+
const b = (i) => i.filter((k) => !!k._id);
|
|
1381
|
+
let f;
|
|
1382
|
+
"items" in u ? o.modelValue ? f = b(Array.isArray(o.modelValue) ? o.modelValue : [o.modelValue]) : f = [] : f = o.modelValue, Array.isArray(f) ? l("update:modelValue", f.concat([o.item])) : l("update:modelValue", o.item), l("change", o.item);
|
|
1383
|
+
}, m = async (b) => {
|
|
1384
|
+
r.purge && b?.purge;
|
|
1385
|
+
const f = () => {
|
|
1386
|
+
const i = Array.isArray(o.modelValue) ? Array.from(o.modelValue) : [], k = i.findIndex((B) => B._id === o.item._id);
|
|
1387
|
+
return i.splice(k, 1), i;
|
|
1388
1388
|
};
|
|
1389
|
-
l("update:modelValue", "items" in u ?
|
|
1389
|
+
l("update:modelValue", "items" in u ? f() : null);
|
|
1390
1390
|
}, p = () => {
|
|
1391
1391
|
if (o.readOnly) {
|
|
1392
1392
|
a.push({
|
|
@@ -1394,38 +1394,38 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1394
1394
|
});
|
|
1395
1395
|
return;
|
|
1396
1396
|
}
|
|
1397
|
-
return
|
|
1397
|
+
return y.value ? m() : d();
|
|
1398
1398
|
};
|
|
1399
|
-
return (
|
|
1400
|
-
const
|
|
1401
|
-
return
|
|
1399
|
+
return (b, f) => {
|
|
1400
|
+
const i = N("clickable");
|
|
1401
|
+
return W((n(), s("div", {
|
|
1402
1402
|
class: U({
|
|
1403
1403
|
item: !0,
|
|
1404
|
-
"item--selected":
|
|
1404
|
+
"item--selected": y.value
|
|
1405
1405
|
}),
|
|
1406
1406
|
onClick: p
|
|
1407
1407
|
}, [
|
|
1408
|
-
C(
|
|
1408
|
+
C(b.$slots, "default", {}, void 0, !0),
|
|
1409
1409
|
O("div", Xn, [
|
|
1410
|
-
(n(!0), s(
|
|
1411
|
-
key: `index-${e.item._id}-${
|
|
1410
|
+
(n(!0), s(G, null, E(e.indexes, (k, B) => (n(), s("div", {
|
|
1411
|
+
key: `index-${e.item._id}-${B}`,
|
|
1412
1412
|
class: "item__value"
|
|
1413
|
-
},
|
|
1413
|
+
}, g(e.item[k]), 1))), 128))
|
|
1414
1414
|
]),
|
|
1415
|
-
e.readOnly ? (n(),
|
|
1415
|
+
e.readOnly ? (n(), _(H, {
|
|
1416
1416
|
key: 0,
|
|
1417
1417
|
icon: "arrow-square-out",
|
|
1418
1418
|
style: { "--icon-color": "var(--theme-brand-color-contrast)" }
|
|
1419
|
-
})) :
|
|
1419
|
+
})) : h("", !0)
|
|
1420
1420
|
], 2)), [
|
|
1421
|
-
[
|
|
1421
|
+
[i]
|
|
1422
1422
|
]);
|
|
1423
1423
|
};
|
|
1424
1424
|
}
|
|
1425
|
-
}), ze = /* @__PURE__ */
|
|
1425
|
+
}), ze = /* @__PURE__ */ F(Jn, [["__scopeId", "data-v-63761718"]]), Zn = { class: "search__panel" }, Pn = { key: 1 }, Nn = { key: 0 }, ea = { key: 1 }, ta = { class: "search__summary" }, na = {
|
|
1426
1426
|
key: 1,
|
|
1427
1427
|
class: "search"
|
|
1428
|
-
}, aa = { key: 0 }, Re = 10, oa = /* @__PURE__ */
|
|
1428
|
+
}, aa = { key: 0 }, Re = 10, oa = /* @__PURE__ */ z({
|
|
1429
1429
|
__name: "aeria-search",
|
|
1430
1430
|
props: {
|
|
1431
1431
|
modelValue: {},
|
|
@@ -1440,170 +1440,170 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1440
1440
|
},
|
|
1441
1441
|
emits: ["update:modelValue", "change", "update:panel"],
|
|
1442
1442
|
setup(e, { emit: c }) {
|
|
1443
|
-
const a = e, o =
|
|
1444
|
-
fe(Te,
|
|
1445
|
-
const
|
|
1443
|
+
const a = e, o = ae("meta"), l = re(a.property), u = a.panel !== void 0 ? Q(() => a.panel) : J(!1), r = c, y = ae(re(a.property).$ref), d = we(), m = d ? xe() : null, p = l.indexes;
|
|
1444
|
+
fe(Te, re(a.property).$ref), fe("innerInputLabel", !0), fe("omitInputLabels", !0);
|
|
1445
|
+
const b = J(a.modelValue), f = J({
|
|
1446
1446
|
data: [],
|
|
1447
1447
|
pagination: {}
|
|
1448
|
-
}),
|
|
1449
|
-
const
|
|
1448
|
+
}), i = Q(() => f.value.data), k = Q(() => f.value.pagination), B = J(0), $ = J(!1), Y = J(""), A = () => {
|
|
1449
|
+
const P = {};
|
|
1450
1450
|
if (d) {
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1451
|
+
const S = t(d);
|
|
1452
|
+
P[S] = m;
|
|
1453
1453
|
}
|
|
1454
|
-
return l.constraints ? ht(l.constraints,
|
|
1455
|
-
},
|
|
1456
|
-
|
|
1457
|
-
},
|
|
1454
|
+
return l.constraints ? ht(l.constraints, P) : {};
|
|
1455
|
+
}, j = () => {
|
|
1456
|
+
i.value.length < k.value.recordsTotal && (B.value += 1, ee());
|
|
1457
|
+
}, K = async () => Y.value.length === 0 ? y.$actions.custom("getAll", {
|
|
1458
1458
|
limit: Re,
|
|
1459
|
-
offset:
|
|
1460
|
-
filters:
|
|
1461
|
-
}) :
|
|
1459
|
+
offset: B.value * Re,
|
|
1460
|
+
filters: A()
|
|
1461
|
+
}) : y.$actions.custom("getAll", {
|
|
1462
1462
|
limit: Re,
|
|
1463
|
-
offset:
|
|
1463
|
+
offset: B.value * Re,
|
|
1464
1464
|
filters: {
|
|
1465
1465
|
$text: {
|
|
1466
|
-
$search: `"${
|
|
1466
|
+
$search: `"${Y.value}"`,
|
|
1467
1467
|
$caseSensitive: !1
|
|
1468
1468
|
},
|
|
1469
|
-
...
|
|
1469
|
+
...A()
|
|
1470
1470
|
}
|
|
1471
|
-
}),
|
|
1472
|
-
if (
|
|
1471
|
+
}), ee = async () => {
|
|
1472
|
+
if (y.loading.getAll)
|
|
1473
1473
|
return;
|
|
1474
|
-
const { error:
|
|
1475
|
-
if (
|
|
1474
|
+
const { error: P, result: S } = await K();
|
|
1475
|
+
if (P) {
|
|
1476
1476
|
o.$actions.spawnToast({
|
|
1477
1477
|
text: "Request failed",
|
|
1478
1478
|
icon: "warning"
|
|
1479
1479
|
});
|
|
1480
1480
|
return;
|
|
1481
1481
|
}
|
|
1482
|
-
|
|
1483
|
-
}, [
|
|
1482
|
+
f.value.pagination = S.pagination, B.value === 0 && f.value.data.splice(0), f.value.data.push(...S.data);
|
|
1483
|
+
}, [de] = Ze({
|
|
1484
1484
|
delay: 800
|
|
1485
1485
|
})(() => {
|
|
1486
|
-
|
|
1487
|
-
}),
|
|
1488
|
-
|
|
1486
|
+
B.value = 0, ee(), $.value = !1;
|
|
1487
|
+
}), ue = () => {
|
|
1488
|
+
$.value = !0, de();
|
|
1489
1489
|
}, $e = () => {
|
|
1490
|
-
"effect" in u ? r("update:panel", !0) : u.value = !0,
|
|
1491
|
-
},
|
|
1492
|
-
|
|
1490
|
+
"effect" in u ? r("update:panel", !0) : u.value = !0, ee();
|
|
1491
|
+
}, T = () => {
|
|
1492
|
+
B.value = 0, f.value.data.splice(0), "effect" in u ? r("update:panel", !1) : u.value = !1;
|
|
1493
1493
|
};
|
|
1494
|
-
|
|
1495
|
-
|
|
1494
|
+
ne(() => Y.value.length, (P, S) => {
|
|
1495
|
+
P && !S && ee();
|
|
1496
1496
|
}), Ue(() => {
|
|
1497
|
-
a.selectOnly &&
|
|
1497
|
+
a.selectOnly && ee();
|
|
1498
1498
|
});
|
|
1499
|
-
const
|
|
1500
|
-
|
|
1501
|
-
},
|
|
1502
|
-
|
|
1499
|
+
const w = (P) => {
|
|
1500
|
+
b.value = P, a.selectOnly || r("update:modelValue", P);
|
|
1501
|
+
}, te = () => {
|
|
1502
|
+
T(), r("update:modelValue", b.value);
|
|
1503
1503
|
};
|
|
1504
|
-
return (
|
|
1505
|
-
const
|
|
1504
|
+
return (P, S) => {
|
|
1505
|
+
const V = N("clickable");
|
|
1506
1506
|
return n(), s("div", null, [
|
|
1507
|
-
t(u) ? (n(),
|
|
1507
|
+
t(u) ? (n(), _(Fe, {
|
|
1508
1508
|
key: 0,
|
|
1509
1509
|
to: "main"
|
|
1510
1510
|
}, [
|
|
1511
|
-
|
|
1511
|
+
x(Ce, {
|
|
1512
1512
|
float: "",
|
|
1513
1513
|
"close-hint": "",
|
|
1514
|
-
title: `${t(
|
|
1514
|
+
title: `${t(q)("action.select", { capitalize: !0 })} ${t(q)(e.propertyName)}`,
|
|
1515
1515
|
"overlay-layer": 65,
|
|
1516
1516
|
"model-value": t(u),
|
|
1517
1517
|
style: { "--panel-max-width": "36rem" },
|
|
1518
|
-
onClose:
|
|
1519
|
-
onOverlayClick:
|
|
1518
|
+
onClose: T,
|
|
1519
|
+
onOverlayClick: T
|
|
1520
1520
|
}, {
|
|
1521
|
-
footer:
|
|
1522
|
-
|
|
1521
|
+
footer: v(() => [
|
|
1522
|
+
x(ie, {
|
|
1523
1523
|
large: "",
|
|
1524
|
-
onClick:
|
|
1524
|
+
onClick: te
|
|
1525
1525
|
}, {
|
|
1526
|
-
default:
|
|
1527
|
-
D(
|
|
1526
|
+
default: v(() => [
|
|
1527
|
+
D(g(t(q)("action.save", { capitalize: !0 })), 1)
|
|
1528
1528
|
]),
|
|
1529
1529
|
_: 1
|
|
1530
1530
|
})
|
|
1531
1531
|
]),
|
|
1532
|
-
default:
|
|
1532
|
+
default: v(() => [
|
|
1533
1533
|
O("div", Zn, [
|
|
1534
|
-
|
|
1535
|
-
modelValue:
|
|
1536
|
-
"onUpdate:modelValue":
|
|
1534
|
+
x(_e, M({
|
|
1535
|
+
modelValue: Y.value,
|
|
1536
|
+
"onUpdate:modelValue": S[0] || (S[0] = (R) => Y.value = R)
|
|
1537
1537
|
}, {
|
|
1538
1538
|
property: {
|
|
1539
1539
|
type: "string",
|
|
1540
1540
|
placeholder: "Pesquise aqui",
|
|
1541
1541
|
inputType: "search"
|
|
1542
1542
|
}
|
|
1543
|
-
}, { onInput:
|
|
1544
|
-
|
|
1543
|
+
}, { onInput: ue }), null, 16, ["modelValue"]),
|
|
1544
|
+
i.value.length ? (n(), _(Ge, {
|
|
1545
1545
|
key: 0,
|
|
1546
1546
|
"observe-scroll": "",
|
|
1547
|
-
onEndReached:
|
|
1547
|
+
onEndReached: j
|
|
1548
1548
|
}, {
|
|
1549
|
-
default:
|
|
1550
|
-
(n(!0), s(
|
|
1551
|
-
item:
|
|
1549
|
+
default: v(() => [
|
|
1550
|
+
(n(!0), s(G, null, E(i.value, (R) => (n(), _(ze, M({ ref_for: !0 }, {
|
|
1551
|
+
item: R,
|
|
1552
1552
|
indexes: t(p),
|
|
1553
1553
|
property: e.property
|
|
1554
1554
|
}, {
|
|
1555
|
-
key: `matching-${
|
|
1556
|
-
modelValue:
|
|
1557
|
-
"onUpdate:modelValue":
|
|
1555
|
+
key: `matching-${R._id}`,
|
|
1556
|
+
modelValue: b.value,
|
|
1557
|
+
"onUpdate:modelValue": S[1] || (S[1] = (Z) => b.value = Z)
|
|
1558
1558
|
}), null, 16, ["modelValue"]))), 128))
|
|
1559
1559
|
]),
|
|
1560
1560
|
_: 1
|
|
1561
1561
|
})) : (n(), s("div", Pn, [
|
|
1562
|
-
|
|
1562
|
+
$.value ? (n(), s("div", Nn, g(t(q)("searching", { capitalize: !0 })) + "... ", 1)) : !t(y).loading.getAll && Object.values(Y.value).filter((R) => !!R).length > 0 && !("items" in e.property && e.modelValue?.length || !Array.isArray(e.modelValue) && e.modelValue?._id) ? (n(), s("div", ea, g(t(q)("no_results", { capitalize: !0 })), 1)) : h("", !0)
|
|
1563
1563
|
]))
|
|
1564
1564
|
]),
|
|
1565
|
-
O("div", ta,
|
|
1565
|
+
O("div", ta, g(t(q)("showing", { capitalize: !0 })) + " " + g(i.value.length) + " " + g(t(q)("of")) + " " + g(k.value.recordsTotal), 1)
|
|
1566
1566
|
]),
|
|
1567
1567
|
_: 1
|
|
1568
1568
|
}, 8, ["title", "model-value"])
|
|
1569
|
-
])) :
|
|
1570
|
-
e.selectOnly ?
|
|
1571
|
-
|
|
1572
|
-
default:
|
|
1569
|
+
])) : h("", !0),
|
|
1570
|
+
e.selectOnly ? h("", !0) : (n(), s("div", na, [
|
|
1571
|
+
x(Ge, null, se({
|
|
1572
|
+
default: v(() => [
|
|
1573
1573
|
"items" in e.property ? (n(), s("div", aa, [
|
|
1574
|
-
(n(!0), s(
|
|
1575
|
-
item:
|
|
1574
|
+
(n(!0), s(G, null, E(e.modelValue, (R) => (n(), _(ze, M({ ref_for: !0 }, {
|
|
1575
|
+
item: R,
|
|
1576
1576
|
indexes: t(p),
|
|
1577
1577
|
property: e.property,
|
|
1578
1578
|
readOnly: e.readOnly,
|
|
1579
1579
|
modelValue: e.modelValue
|
|
1580
1580
|
}, {
|
|
1581
|
-
key: `selected-${
|
|
1582
|
-
"onUpdate:modelValue":
|
|
1581
|
+
key: `selected-${R._id}`,
|
|
1582
|
+
"onUpdate:modelValue": w
|
|
1583
1583
|
}), null, 16))), 128))
|
|
1584
|
-
])) : e.modelValue?._id ? (n(),
|
|
1584
|
+
])) : e.modelValue?._id ? (n(), _(ze, M({ key: 1 }, {
|
|
1585
1585
|
item: e.modelValue,
|
|
1586
1586
|
indexes: t(p),
|
|
1587
1587
|
property: t(l),
|
|
1588
1588
|
readOnly: e.readOnly,
|
|
1589
1589
|
modelValue: e.modelValue
|
|
1590
|
-
}, { "onUpdate:modelValue":
|
|
1590
|
+
}, { "onUpdate:modelValue": w }), null, 16)) : h("", !0)
|
|
1591
1591
|
]),
|
|
1592
1592
|
_: 2
|
|
1593
1593
|
}, [
|
|
1594
1594
|
e.readOnly ? void 0 : {
|
|
1595
1595
|
name: "footer",
|
|
1596
|
-
fn:
|
|
1597
|
-
|
|
1596
|
+
fn: v(() => [
|
|
1597
|
+
W((n(), _(H, {
|
|
1598
1598
|
icon: "plus",
|
|
1599
1599
|
onClick: $e
|
|
1600
1600
|
}, {
|
|
1601
|
-
default:
|
|
1602
|
-
D(
|
|
1601
|
+
default: v(() => [
|
|
1602
|
+
D(g(t(q)("action.select", { capitalize: !0 })), 1)
|
|
1603
1603
|
]),
|
|
1604
1604
|
_: 1
|
|
1605
1605
|
})), [
|
|
1606
|
-
[
|
|
1606
|
+
[V]
|
|
1607
1607
|
])
|
|
1608
1608
|
]),
|
|
1609
1609
|
key: "0"
|
|
@@ -1613,7 +1613,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1613
1613
|
]);
|
|
1614
1614
|
};
|
|
1615
1615
|
}
|
|
1616
|
-
}), la = /* @__PURE__ */
|
|
1616
|
+
}), la = /* @__PURE__ */ F(oa, [["__scopeId", "data-v-7a35daa0"]]), We = (e, c) => {
|
|
1617
1617
|
const a = "items" in e ? e.items : e, o = {
|
|
1618
1618
|
options: kn,
|
|
1619
1619
|
select: Qe,
|
|
@@ -1635,7 +1635,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1635
1635
|
if (e.element === "select")
|
|
1636
1636
|
return "select";
|
|
1637
1637
|
}
|
|
1638
|
-
const u =
|
|
1638
|
+
const u = re(e);
|
|
1639
1639
|
return u ? u.inline ? "form" : u.$ref === "file" ? "file" : "search" : "items" in e && e.uniqueItems ? "options" : "enum" in a ? "select" : "input";
|
|
1640
1640
|
})();
|
|
1641
1641
|
return c[l] ? c[l] : o[l];
|
|
@@ -1643,7 +1643,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1643
1643
|
e ??= [];
|
|
1644
1644
|
const o = "items" in c ? c.items : c;
|
|
1645
1645
|
if ("$ref" in o) {
|
|
1646
|
-
const l =
|
|
1646
|
+
const l = ae(o.$ref, a), u = ge(l.$freshItem);
|
|
1647
1647
|
return e.push(u);
|
|
1648
1648
|
}
|
|
1649
1649
|
return "properties" in o ? e.push(bt(o)) : "type" in o && o.type === "boolean" ? e.push({}) : e.push(null);
|
|
@@ -1664,7 +1664,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1664
1664
|
}, $a = { key: 0 }, ga = { key: 1 }, ka = {
|
|
1665
1665
|
key: 2,
|
|
1666
1666
|
class: "form__footer"
|
|
1667
|
-
}, Va = /* @__PURE__ */
|
|
1667
|
+
}, Va = /* @__PURE__ */ z({
|
|
1668
1668
|
__name: "aeria-form",
|
|
1669
1669
|
props: {
|
|
1670
1670
|
modelValue: {},
|
|
@@ -1696,64 +1696,64 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1696
1696
|
Xe(() => {
|
|
1697
1697
|
o.modelValue || l("update:modelValue", o.property && "items" in o.property ? [] : {});
|
|
1698
1698
|
});
|
|
1699
|
-
const u = o.property &&
|
|
1700
|
-
let
|
|
1701
|
-
o.readOnly ?
|
|
1702
|
-
const d = r ?
|
|
1699
|
+
const u = o.property && re(o.property), r = u ? u.$ref : o.collection || we();
|
|
1700
|
+
let y;
|
|
1701
|
+
o.readOnly ? y = o.readOnly : o.property && typeof o.property.readOnly == "boolean" ? y = o.property.readOnly : y = !1;
|
|
1702
|
+
const d = r ? ae(t(r)) : null;
|
|
1703
1703
|
!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");
|
|
1704
|
-
const m =
|
|
1705
|
-
const
|
|
1706
|
-
if (!
|
|
1704
|
+
const m = J(!1), p = Q(() => {
|
|
1705
|
+
const V = !o.form && o.property ? "type" in o.property && o.property.type === "object" ? "properties" in o.property ? o.property.properties : void 0 : d?.properties : o.form;
|
|
1706
|
+
if (!V)
|
|
1707
1707
|
return;
|
|
1708
|
-
const
|
|
1709
|
-
if (o.includeId && (
|
|
1708
|
+
const R = {};
|
|
1709
|
+
if (o.includeId && (R._id = {
|
|
1710
1710
|
type: "string",
|
|
1711
1711
|
readOnly: !0
|
|
1712
1712
|
}), o.includeTimestamps) {
|
|
1713
|
-
const
|
|
1713
|
+
const Z = {
|
|
1714
1714
|
type: "string",
|
|
1715
1715
|
format: "date-time",
|
|
1716
1716
|
readOnly: !0,
|
|
1717
1717
|
isTimestamp: !0
|
|
1718
1718
|
};
|
|
1719
|
-
|
|
1719
|
+
V.created_at || (R.created_at = Z), V.created_at || (R.updated_at = Z);
|
|
1720
1720
|
}
|
|
1721
|
-
return Object.assign(
|
|
1722
|
-
}),
|
|
1723
|
-
const
|
|
1724
|
-
return o[
|
|
1725
|
-
},
|
|
1721
|
+
return Object.assign(R, V), R;
|
|
1722
|
+
}), b = Q(() => o.layout || d?.description.formLayout), f = (V) => {
|
|
1723
|
+
const R = ce(V, o[V]);
|
|
1724
|
+
return o[V] && fe(V, o[V]), R;
|
|
1725
|
+
}, i = Q(() => o.validationErrors !== null ? o.validationErrors : d?.validationErrors), k = f("formComponents") || {}, B = f("propertyComponents") || {}, $ = f("omitFormHeader"), Y = f("omitInputLabels"), A = f("innerInputLabel");
|
|
1726
1726
|
r && fe(Te, r), fe("searchOnly", o.searchOnly);
|
|
1727
|
-
const
|
|
1728
|
-
if (o.searchOnly || !r || o.includeId &&
|
|
1727
|
+
const j = (V, R) => {
|
|
1728
|
+
if (o.searchOnly || !r || o.includeId && V === "_id" || o.includeTimestamps && R.isTimestamp)
|
|
1729
1729
|
return !0;
|
|
1730
|
-
const
|
|
1731
|
-
return !
|
|
1732
|
-
},
|
|
1733
|
-
const
|
|
1734
|
-
if (!
|
|
1730
|
+
const Z = o.property && "properties" in o.property ? o.property.form : d?.description?.form;
|
|
1731
|
+
return !Z || Z.includes(V);
|
|
1732
|
+
}, ee = p.value ? Object.entries(p.value).filter(([V, R]) => j(V, R) && !R.noForm && (!R.readOnly || o.readOnly || o.includeReadOnly)) : null, de = Se(), ue = {}, $e = (V, R) => {
|
|
1733
|
+
const Z = [], oe = b.value?.fields?.[V];
|
|
1734
|
+
if (!R)
|
|
1735
1735
|
return;
|
|
1736
|
-
if (
|
|
1737
|
-
const
|
|
1736
|
+
if (oe?.if && !o.searchOnly) {
|
|
1737
|
+
const L = qe(
|
|
1738
1738
|
o.modelValue,
|
|
1739
|
-
|
|
1739
|
+
oe.if
|
|
1740
1740
|
);
|
|
1741
|
-
|
|
1741
|
+
L.satisfied || (ue[V] && (d ? o.modelValue[V] = typeof d.$freshItem[V] == "object" ? ge(d.$freshItem[V]) : d.$freshItem[V] : o.modelValue[V] = [
|
|
1742
1742
|
void 0,
|
|
1743
1743
|
null
|
|
1744
|
-
].includes(o.modelValue[
|
|
1744
|
+
].includes(o.modelValue[V]) ? null : o.modelValue[V].constructor()), Z.push("display: none")), ue[V] = L.satisfied;
|
|
1745
1745
|
}
|
|
1746
|
-
const
|
|
1747
|
-
return
|
|
1748
|
-
`--vertical-spacing: ${
|
|
1746
|
+
const I = de.value.md && oe?.span || 6;
|
|
1747
|
+
return Z.push(`--field-span: ${I}`, "grid-column: span var(--field-span) / span var(--field-span)"), oe && (oe.verticalSpacing && Z.push([
|
|
1748
|
+
`--vertical-spacing: ${oe.verticalSpacing}`,
|
|
1749
1749
|
"padding: var(--vertical-spacing) 0"
|
|
1750
|
-
]),
|
|
1750
|
+
]), oe.separator && Z.push([
|
|
1751
1751
|
"border-top: 1px solid var(--theme-border-color)",
|
|
1752
1752
|
"border-width: 1px 0 1px 0",
|
|
1753
1753
|
"padding: 1rem 0",
|
|
1754
1754
|
"margin: 1rem 0"
|
|
1755
|
-
])),
|
|
1756
|
-
},
|
|
1755
|
+
])), Z.join(";");
|
|
1756
|
+
}, T = (V) => V === null || V instanceof Object && !Object.keys(V).length, w = Q(() => {
|
|
1757
1757
|
if (typeof o.required < "u")
|
|
1758
1758
|
switch (o.required) {
|
|
1759
1759
|
case !0:
|
|
@@ -1764,263 +1764,264 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
1764
1764
|
return o.required;
|
|
1765
1765
|
}
|
|
1766
1766
|
return o.property && "required" in o.property ? o.property.required : o.collection ? d.description.required : void 0;
|
|
1767
|
-
}),
|
|
1768
|
-
let
|
|
1767
|
+
}), te = Q(() => {
|
|
1768
|
+
let V;
|
|
1769
1769
|
if (o.form)
|
|
1770
|
-
|
|
1770
|
+
V = o.form;
|
|
1771
1771
|
else if (o.property && "properties" in o.property)
|
|
1772
|
-
|
|
1772
|
+
V = o.property.properties;
|
|
1773
1773
|
else
|
|
1774
1774
|
return !0;
|
|
1775
|
-
const { error:
|
|
1775
|
+
const { error: R } = _t(o.modelValue, {
|
|
1776
1776
|
type: "object",
|
|
1777
|
-
required:
|
|
1778
|
-
properties:
|
|
1777
|
+
required: w.value,
|
|
1778
|
+
properties: V
|
|
1779
1779
|
}, {
|
|
1780
1780
|
coerce: !0,
|
|
1781
1781
|
tolerateExtraneous: !0
|
|
1782
1782
|
});
|
|
1783
|
-
return !
|
|
1784
|
-
}),
|
|
1785
|
-
if (!o.focus ||
|
|
1783
|
+
return !R;
|
|
1784
|
+
}), P = (V, R) => i.value?.[V] && (typeof i.value[V].index != "number" || i.value[V].index === R) ? i.value[V].errors : null, S = (V) => {
|
|
1785
|
+
if (!o.focus || y || V.readOnly)
|
|
1786
1786
|
return !1;
|
|
1787
1787
|
if (!o.parentPropertyName && !o.parentCollection && !m.value)
|
|
1788
1788
|
return m.value = !0, !0;
|
|
1789
1789
|
};
|
|
1790
|
-
return (
|
|
1791
|
-
const
|
|
1790
|
+
return (V, R) => {
|
|
1791
|
+
const Z = N("clickable"), oe = N("focus");
|
|
1792
1792
|
return n(), s("form", {
|
|
1793
1793
|
class: "form",
|
|
1794
|
-
style: ve(`row-gap: ${t(
|
|
1794
|
+
style: ve(`row-gap: ${t($) ? ".8rem" : "var(--form-internal-gap, 1.6rem);"};`)
|
|
1795
1795
|
}, [
|
|
1796
|
-
|
|
1797
|
-
C(
|
|
1798
|
-
])) :
|
|
1799
|
-
C(
|
|
1796
|
+
V.$slots.header && !t($) ? (n(), s("header", ra, [
|
|
1797
|
+
C(V.$slots, "header", {}, void 0, !0)
|
|
1798
|
+
])) : h("", !0),
|
|
1799
|
+
C(V.$slots, "default", {}, void 0, !0),
|
|
1800
1800
|
O("fieldset", ua, [
|
|
1801
|
-
(n(!0), s(
|
|
1802
|
-
key: `field-${
|
|
1803
|
-
style: ve($e(
|
|
1801
|
+
(n(!0), s(G, null, E(t(ee), ([I, L]) => (n(), s("div", {
|
|
1802
|
+
key: `field-${I}`,
|
|
1803
|
+
style: ve($e(I, L)),
|
|
1804
1804
|
class: U({
|
|
1805
1805
|
form__field: !0,
|
|
1806
|
-
"form__field--form": "properties" in
|
|
1806
|
+
"form__field--form": "properties" in L
|
|
1807
1807
|
})
|
|
1808
1808
|
}, [
|
|
1809
|
-
(!("type" in
|
|
1809
|
+
(!("type" in L) || L.type !== "boolean" || e.searchOnly) && !L.noLabel && !t(Y) && !t(A) ? (n(), s("label", ca, [
|
|
1810
1810
|
O("div", {
|
|
1811
1811
|
class: U({
|
|
1812
1812
|
"form__field-label": !0,
|
|
1813
|
-
"form__field-label--section": "items" in
|
|
1814
|
-
"form__field-required-hint": e.highlightRequired && !t(
|
|
1813
|
+
"form__field-label--section": "items" in L ? "properties" in L.items : "properties" in L,
|
|
1814
|
+
"form__field-required-hint": e.highlightRequired && !t(y) && !e.searchOnly && (!w.value || t(je)(I, w.value, e.modelValue))
|
|
1815
1815
|
})
|
|
1816
|
-
},
|
|
1817
|
-
|
|
1816
|
+
}, g(L.description || t(q)(I)), 3),
|
|
1817
|
+
L.hint ? (n(), s("div", {
|
|
1818
1818
|
key: 0,
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1819
|
+
class: "form__field-hint",
|
|
1820
|
+
innerHTML: L.hint
|
|
1821
|
+
}, null, 8, da)) : h("", !0)
|
|
1822
|
+
])) : h("", !0),
|
|
1823
|
+
V.$slots[`field-${I}`] ? C(V.$slots, `field-${I}`, M({
|
|
1823
1824
|
key: 1,
|
|
1824
1825
|
ref_for: !0
|
|
1825
1826
|
}, {
|
|
1826
|
-
readOnly: t(
|
|
1827
|
-
property:
|
|
1828
|
-
propertyName:
|
|
1827
|
+
readOnly: t(y),
|
|
1828
|
+
property: L,
|
|
1829
|
+
propertyName: I,
|
|
1829
1830
|
modelValue: e.modelValue
|
|
1830
|
-
}), void 0, !0) : e.layout?.fields?.[
|
|
1831
|
+
}), void 0, !0) : e.layout?.fields?.[I]?.component && t(B)[e.layout.fields[I].component.name] ? (n(), _(pe(t(B)[e.layout.fields[I].component.name]), M({
|
|
1831
1832
|
key: 2,
|
|
1832
|
-
modelValue: e.modelValue[
|
|
1833
|
-
"onUpdate:modelValue": (
|
|
1833
|
+
modelValue: e.modelValue[I],
|
|
1834
|
+
"onUpdate:modelValue": (X) => e.modelValue[I] = X
|
|
1834
1835
|
}, { ref_for: !0 }, {
|
|
1835
|
-
readOnly: t(
|
|
1836
|
-
property:
|
|
1837
|
-
propertyName:
|
|
1838
|
-
required: !e.searchOnly && (!
|
|
1839
|
-
...e.layout.fields[
|
|
1836
|
+
readOnly: t(y),
|
|
1837
|
+
property: L,
|
|
1838
|
+
propertyName: I,
|
|
1839
|
+
required: !e.searchOnly && (!w.value || t(je)(I, w.value, e.modelValue)),
|
|
1840
|
+
...e.layout.fields[I].component.props || {}
|
|
1840
1841
|
}, {
|
|
1841
|
-
onInput: (
|
|
1842
|
-
onChange:
|
|
1843
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in
|
|
1842
|
+
onInput: (X) => l("input", I),
|
|
1843
|
+
onChange: R[0] || (R[0] = (X) => l("change", X))
|
|
1844
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in L && ["date", "date-time"].includes(L.format) && e.searchOnly ? (n(), s("div", {
|
|
1844
1845
|
key: 3,
|
|
1845
1846
|
style: { display: "grid", "grid-template-columns": "repeat(2, 1fr)", "column-gap": "1rem" },
|
|
1846
|
-
onInput: (
|
|
1847
|
-
onChange:
|
|
1847
|
+
onInput: (X) => l("input", I),
|
|
1848
|
+
onChange: R[1] || (R[1] = (X) => l("change", X))
|
|
1848
1849
|
}, [
|
|
1849
|
-
|
|
1850
|
-
modelValue: e.modelValue[
|
|
1851
|
-
"onUpdate:modelValue": (
|
|
1850
|
+
x(_e, M({
|
|
1851
|
+
modelValue: e.modelValue[I].$gte,
|
|
1852
|
+
"onUpdate:modelValue": (X) => e.modelValue[I].$gte = X
|
|
1852
1853
|
}, { ref_for: !0 }, {
|
|
1853
|
-
property:
|
|
1854
|
-
propertyName:
|
|
1854
|
+
property: L,
|
|
1855
|
+
propertyName: I
|
|
1855
1856
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]),
|
|
1856
|
-
|
|
1857
|
-
modelValue: e.modelValue[
|
|
1858
|
-
"onUpdate:modelValue": (
|
|
1857
|
+
x(_e, M({
|
|
1858
|
+
modelValue: e.modelValue[I].$lte,
|
|
1859
|
+
"onUpdate:modelValue": (X) => e.modelValue[I].$lte = X
|
|
1859
1860
|
}, { ref_for: !0 }, {
|
|
1860
|
-
property:
|
|
1861
|
-
propertyName:
|
|
1861
|
+
property: L,
|
|
1862
|
+
propertyName: I
|
|
1862
1863
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
1863
|
-
], 40, ma)) : "type" in
|
|
1864
|
-
|
|
1865
|
-
property:
|
|
1866
|
-
propertyName:
|
|
1864
|
+
], 40, ma)) : "type" in L && L.type === "boolean" && e.searchOnly ? (n(), s("div", pa, [
|
|
1865
|
+
x(Qe, M({ ref_for: !0 }, {
|
|
1866
|
+
property: L,
|
|
1867
|
+
propertyName: I
|
|
1867
1868
|
}, {
|
|
1868
1869
|
"boolean-ref": "",
|
|
1869
|
-
"model-value": e.modelValue[
|
|
1870
|
-
onChange:
|
|
1871
|
-
"onUpdate:modelValue": (
|
|
1872
|
-
e.modelValue[
|
|
1870
|
+
"model-value": e.modelValue[I],
|
|
1871
|
+
onChange: R[2] || (R[2] = (X) => l("change", X)),
|
|
1872
|
+
"onUpdate:modelValue": (X) => {
|
|
1873
|
+
e.modelValue[I] = X;
|
|
1873
1874
|
}
|
|
1874
1875
|
}), {
|
|
1875
|
-
default:
|
|
1876
|
-
O("option", fa,
|
|
1877
|
-
O("option", va,
|
|
1876
|
+
default: v(() => [
|
|
1877
|
+
O("option", fa, g(t(q)("yes")), 1),
|
|
1878
|
+
O("option", va, g(t(q)("no")), 1)
|
|
1878
1879
|
]),
|
|
1879
1880
|
_: 1
|
|
1880
1881
|
}, 16, ["model-value", "onUpdate:modelValue"])
|
|
1881
|
-
])) : e.modelValue && "items" in
|
|
1882
|
-
t(
|
|
1883
|
-
|
|
1882
|
+
])) : e.modelValue && "items" in L && !L.uniqueItems && (!("$ref" in L.items) || L.items.inline) ? (n(), s("div", ya, [
|
|
1883
|
+
t(y) ? h("", !0) : (n(), s("div", ha, [
|
|
1884
|
+
x(ie, {
|
|
1884
1885
|
small: "",
|
|
1885
1886
|
variant: "alt",
|
|
1886
1887
|
icon: "plus",
|
|
1887
|
-
disabled: !("inline" in
|
|
1888
|
-
onClick: Ie((
|
|
1889
|
-
e.modelValue[
|
|
1888
|
+
disabled: !("inline" in L.items && L.items.inline) && (e.modelValue[I]?.length >= L.maxItems || T(e.modelValue[I]?.[e.modelValue[I]?.length - 1])),
|
|
1889
|
+
onClick: Ie((X) => {
|
|
1890
|
+
e.modelValue[I] || (e.modelValue[I] = []), t(ia)(e.modelValue[I], L, t(a));
|
|
1890
1891
|
}, ["prevent"])
|
|
1891
1892
|
}, {
|
|
1892
|
-
default:
|
|
1893
|
-
D(
|
|
1893
|
+
default: v(() => [
|
|
1894
|
+
D(g(t(q)("action.add", { capitalize: !0 })), 1)
|
|
1894
1895
|
]),
|
|
1895
1896
|
_: 1
|
|
1896
1897
|
}, 8, ["disabled", "onClick"])
|
|
1897
1898
|
])),
|
|
1898
|
-
e.modelValue[
|
|
1899
|
-
(n(!0), s(
|
|
1900
|
-
key: `rep-${
|
|
1899
|
+
e.modelValue[I]?.length > 0 ? (n(), s("div", ba, [
|
|
1900
|
+
(n(!0), s(G, null, E(e.modelValue[I], (X, ye) => (n(), s("div", {
|
|
1901
|
+
key: `rep-${I}-${t($t)(X, ye)}`,
|
|
1901
1902
|
class: "form__array-item"
|
|
1902
1903
|
}, [
|
|
1903
|
-
t(
|
|
1904
|
+
t(y) ? h("", !0) : W((n(), _(H, {
|
|
1904
1905
|
key: 0,
|
|
1905
1906
|
icon: "trash",
|
|
1906
1907
|
class: "form__array-remove",
|
|
1907
|
-
onClick: Ie((
|
|
1908
|
+
onClick: Ie((Oe) => t(sa)(e.modelValue[I], ye), ["prevent"])
|
|
1908
1909
|
}, {
|
|
1909
|
-
default:
|
|
1910
|
-
D(
|
|
1910
|
+
default: v(() => [
|
|
1911
|
+
D(g(t(q)("action.remove", { capitalize: !0 })), 1)
|
|
1911
1912
|
]),
|
|
1912
1913
|
_: 1
|
|
1913
1914
|
}, 8, ["onClick"])), [
|
|
1914
|
-
[
|
|
1915
|
+
[Z]
|
|
1915
1916
|
]),
|
|
1916
|
-
(n(),
|
|
1917
|
-
modelValue: e.modelValue[
|
|
1918
|
-
"onUpdate:modelValue": (
|
|
1917
|
+
(n(), _(pe(t(We)(L, t(k))), M({
|
|
1918
|
+
modelValue: e.modelValue[I][ye],
|
|
1919
|
+
"onUpdate:modelValue": (Oe) => e.modelValue[I][ye] = Oe
|
|
1919
1920
|
}, { ref_for: !0 }, {
|
|
1920
|
-
readOnly: t(
|
|
1921
|
-
property:
|
|
1922
|
-
propertyName:
|
|
1921
|
+
readOnly: t(y),
|
|
1922
|
+
property: L.items,
|
|
1923
|
+
propertyName: I,
|
|
1923
1924
|
parentCollection: t(r),
|
|
1924
1925
|
parentPropertyName: e.parentPropertyName,
|
|
1925
|
-
required: !e.searchOnly && (!
|
|
1926
|
-
validationErrors:
|
|
1927
|
-
...
|
|
1926
|
+
required: !e.searchOnly && (!w.value || t(je)(I, w.value, e.modelValue)),
|
|
1927
|
+
validationErrors: P(I, ye),
|
|
1928
|
+
...L.componentProps || {}
|
|
1928
1929
|
}, {
|
|
1929
|
-
onInput: (
|
|
1930
|
-
onChange:
|
|
1930
|
+
onInput: (Oe) => l("input", I),
|
|
1931
|
+
onChange: R[3] || (R[3] = (Oe) => l("change", Oe))
|
|
1931
1932
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"]))
|
|
1932
1933
|
]))), 128))
|
|
1933
|
-
])) :
|
|
1934
|
-
])) : e.modelValue ?
|
|
1934
|
+
])) : h("", !0)
|
|
1935
|
+
])) : e.modelValue ? W((n(), _(pe(t(We)(L, t(k))), M({
|
|
1935
1936
|
key: 6,
|
|
1936
|
-
modelValue: e.modelValue[
|
|
1937
|
-
"onUpdate:modelValue": (
|
|
1937
|
+
modelValue: e.modelValue[I],
|
|
1938
|
+
"onUpdate:modelValue": (X) => e.modelValue[I] = X
|
|
1938
1939
|
}, { ref_for: !0 }, {
|
|
1939
|
-
readOnly: t(
|
|
1940
|
-
property:
|
|
1941
|
-
propertyName:
|
|
1940
|
+
readOnly: t(y),
|
|
1941
|
+
property: L,
|
|
1942
|
+
propertyName: I,
|
|
1942
1943
|
parentPropertyName: e.parentPropertyName,
|
|
1943
1944
|
parentCollection: t(r),
|
|
1944
|
-
required: !e.searchOnly && (!
|
|
1945
|
-
...
|
|
1946
|
-
validationErrors:
|
|
1945
|
+
required: !e.searchOnly && (!w.value || t(je)(I, w.value, e.modelValue)),
|
|
1946
|
+
...L.componentProps || {},
|
|
1947
|
+
validationErrors: P(I)
|
|
1947
1948
|
}, {
|
|
1948
|
-
onInput: (
|
|
1949
|
-
onChange:
|
|
1950
|
-
onClipboardCopy:
|
|
1949
|
+
onInput: (X) => l("input", I),
|
|
1950
|
+
onChange: R[4] || (R[4] = (X) => l("change", X)),
|
|
1951
|
+
onClipboardCopy: R[5] || (R[5] = (X) => l("clipboardCopy", X))
|
|
1951
1952
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])), [
|
|
1952
|
-
[
|
|
1953
|
-
]) :
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
])) :
|
|
1953
|
+
[oe, S(L)]
|
|
1954
|
+
]) : h("", !0),
|
|
1955
|
+
i.value?.[I] ? (n(), s("div", _a, [
|
|
1956
|
+
i.value[I].type ? (n(), s("span", $a, g(t(q)(`validation_error.${i.value[I].type}`)), 1)) : h("", !0),
|
|
1957
|
+
i.value[I].detail ? (n(), s("span", ga, g(t(q)(i.value[I].detail)), 1)) : h("", !0)
|
|
1958
|
+
])) : h("", !0)
|
|
1958
1959
|
], 6))), 128))
|
|
1959
1960
|
]),
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
C(
|
|
1963
|
-
isInsertReady:
|
|
1961
|
+
V.$slots.after ? C(V.$slots, "after", { key: 1 }, void 0, !0) : h("", !0),
|
|
1962
|
+
V.$slots.footer ? (n(), s("div", ka, [
|
|
1963
|
+
C(V.$slots, "footer", le(be({
|
|
1964
|
+
isInsertReady: te.value
|
|
1964
1965
|
})), void 0, !0)
|
|
1965
|
-
])) :
|
|
1966
|
+
])) : h("", !0)
|
|
1966
1967
|
], 4);
|
|
1967
1968
|
};
|
|
1968
1969
|
}
|
|
1969
|
-
}), Me = /* @__PURE__ */
|
|
1970
|
+
}), Me = /* @__PURE__ */ F(Va, [["__scopeId", "data-v-38b0060e"]]), Ca = /* @__PURE__ */ z({
|
|
1970
1971
|
__name: "aeria-filter-panel",
|
|
1971
1972
|
emits: ["update:modelValue"],
|
|
1972
1973
|
setup(e, { emit: c }) {
|
|
1973
|
-
const a = c, o = xe(), l =
|
|
1974
|
+
const a = c, o = xe(), l = Ve(), u = t(ce(Te)), r = () => {
|
|
1974
1975
|
if (o.pagination.offset = 0, o.$actions.filter(), a("update:modelValue", !1), "query" in l.currentRoute && l.currentRoute.query && typeof l.currentRoute.query == "object") {
|
|
1975
1976
|
const m = l.currentRoute.query;
|
|
1976
1977
|
for (const p of Object.keys(m))
|
|
1977
1978
|
p.startsWith(`${u}.`) && delete m[p];
|
|
1978
1979
|
}
|
|
1979
|
-
const { query:
|
|
1980
|
+
const { query: y, ...d } = l.currentRoute.value;
|
|
1980
1981
|
l.push(Be(d, {
|
|
1981
1982
|
query: mt(o)
|
|
1982
1983
|
}));
|
|
1983
1984
|
};
|
|
1984
|
-
return (
|
|
1985
|
+
return (y, d) => (n(), _(Ce, {
|
|
1985
1986
|
"close-hint": "",
|
|
1986
1987
|
"fixed-right": "",
|
|
1987
|
-
title:
|
|
1988
|
+
title: y.t("filter_by", { capitalize: !0 }),
|
|
1988
1989
|
onClose: d[2] || (d[2] = (m) => a("update:modelValue", !1)),
|
|
1989
1990
|
onOverlayClick: d[3] || (d[3] = (m) => a("update:modelValue", !1))
|
|
1990
1991
|
}, {
|
|
1991
|
-
footer:
|
|
1992
|
-
t(o).filtersCount > 0 ? (n(),
|
|
1992
|
+
footer: v(() => [
|
|
1993
|
+
t(o).filtersCount > 0 ? (n(), _(ie, {
|
|
1993
1994
|
key: 0,
|
|
1994
1995
|
variant: "transparent",
|
|
1995
1996
|
onClick: d[1] || (d[1] = (m) => {
|
|
1996
1997
|
t(o).$actions.clearFilters(), r(), a("update:modelValue", !1);
|
|
1997
1998
|
})
|
|
1998
1999
|
}, {
|
|
1999
|
-
default:
|
|
2000
|
-
D(
|
|
2001
|
-
|
|
2002
|
-
default:
|
|
2003
|
-
D(
|
|
2000
|
+
default: v(() => [
|
|
2001
|
+
D(g(y.t("action.clear", { capitalize: !0 })) + " ", 1),
|
|
2002
|
+
x(he, null, {
|
|
2003
|
+
default: v(() => [
|
|
2004
|
+
D(g(t(o).filtersCount), 1)
|
|
2004
2005
|
]),
|
|
2005
2006
|
_: 1
|
|
2006
2007
|
})
|
|
2007
2008
|
]),
|
|
2008
2009
|
_: 1
|
|
2009
|
-
})) :
|
|
2010
|
-
|
|
2010
|
+
})) : h("", !0),
|
|
2011
|
+
x(ie, {
|
|
2011
2012
|
large: "",
|
|
2012
2013
|
icon: "funnel",
|
|
2013
2014
|
disabled: !t(o).hasActiveFilters,
|
|
2014
2015
|
onClick: r
|
|
2015
2016
|
}, {
|
|
2016
|
-
default:
|
|
2017
|
-
D(
|
|
2017
|
+
default: v(() => [
|
|
2018
|
+
D(g(y.t("action.filter", { capitalize: !0 })), 1)
|
|
2018
2019
|
]),
|
|
2019
2020
|
_: 1
|
|
2020
2021
|
}, 8, ["disabled"])
|
|
2021
2022
|
]),
|
|
2022
|
-
default:
|
|
2023
|
-
|
|
2023
|
+
default: v(() => [
|
|
2024
|
+
x(Me, M({
|
|
2024
2025
|
modelValue: t(o).filters,
|
|
2025
2026
|
"onUpdate:modelValue": d[0] || (d[0] = (m) => t(o).filters = m)
|
|
2026
2027
|
}, {
|
|
@@ -2036,7 +2037,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2036
2037
|
_: 1
|
|
2037
2038
|
}, 8, ["title"]));
|
|
2038
2039
|
}
|
|
2039
|
-
}), Oa = /* @__PURE__ */
|
|
2040
|
+
}), Oa = /* @__PURE__ */ z({
|
|
2040
2041
|
__name: "aeria-insert-panel",
|
|
2041
2042
|
props: {
|
|
2042
2043
|
individualActions: {},
|
|
@@ -2052,31 +2053,31 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2052
2053
|
},
|
|
2053
2054
|
emits: ["update:visible", "update:modelValue", "insert", "cancel"],
|
|
2054
2055
|
setup(e, { emit: c }) {
|
|
2055
|
-
const a = e, o = c, l =
|
|
2056
|
+
const a = e, o = c, l = ae("meta"), u = a.collection, r = ae(u);
|
|
2056
2057
|
Ue(() => {
|
|
2057
2058
|
a.modelValue && r.$actions.setItem(a.modelValue);
|
|
2058
2059
|
});
|
|
2059
|
-
const
|
|
2060
|
-
const { error:
|
|
2061
|
-
if (
|
|
2062
|
-
if ("code" in
|
|
2063
|
-
switch (
|
|
2060
|
+
const y = Q(() => a.form ? r.$actions.useProperties(a.form) : r.description.form ? r.$actions.useProperties(r.description.form) : r.properties), d = async () => {
|
|
2061
|
+
const { error: b, result: f } = await r.$actions.deepInsert();
|
|
2062
|
+
if (b) {
|
|
2063
|
+
if ("code" in b)
|
|
2064
|
+
switch (b.code) {
|
|
2064
2065
|
case "INVALID_PROPERTIES":
|
|
2065
2066
|
case "MISSING_PROPERTIES":
|
|
2066
2067
|
return;
|
|
2067
2068
|
default: {
|
|
2068
|
-
let
|
|
2069
|
+
let i = m("error", {
|
|
2069
2070
|
capitalize: !0
|
|
2070
2071
|
});
|
|
2071
|
-
|
|
2072
|
-
text:
|
|
2072
|
+
b.message && (i += `: ${m(b.message)}`), i += ` (${m(b.code)})`, l.$actions.spawnToast({
|
|
2073
|
+
text: i,
|
|
2073
2074
|
icon: "warning"
|
|
2074
2075
|
});
|
|
2075
2076
|
}
|
|
2076
2077
|
}
|
|
2077
2078
|
return;
|
|
2078
2079
|
}
|
|
2079
|
-
o("update:visible", !1), o("update:modelValue",
|
|
2080
|
+
o("update:visible", !1), o("update:modelValue", f), o("insert", f), r.$actions.clearItem();
|
|
2080
2081
|
}, { t: m } = st(), p = () => {
|
|
2081
2082
|
l.$actions.ask({
|
|
2082
2083
|
action: () => {
|
|
@@ -2085,92 +2086,92 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2085
2086
|
body: m("prompt.close_panel")
|
|
2086
2087
|
});
|
|
2087
2088
|
};
|
|
2088
|
-
return
|
|
2089
|
-
|
|
2090
|
-
}), (
|
|
2091
|
-
const
|
|
2092
|
-
return n(),
|
|
2089
|
+
return ne(() => r.item._id, (b) => {
|
|
2090
|
+
b === null && o("update:visible", !1);
|
|
2091
|
+
}), (b, f) => {
|
|
2092
|
+
const i = N("clickable");
|
|
2093
|
+
return n(), _(Ce, M({
|
|
2093
2094
|
modelValue: e.visible,
|
|
2094
2095
|
loading: t(r).loading.get,
|
|
2095
2096
|
float: e.float,
|
|
2096
2097
|
fixedRight: e.fixedRight
|
|
2097
|
-
}, { onOverlayClick: p }),
|
|
2098
|
-
extra:
|
|
2099
|
-
e.individualActions ? (n(),
|
|
2098
|
+
}, { onOverlayClick: p }), se({
|
|
2099
|
+
extra: v(() => [
|
|
2100
|
+
e.individualActions ? (n(), _(ke, M({ key: 0 }, {
|
|
2100
2101
|
subject: t(r).item,
|
|
2101
|
-
actions: e.individualActions.filter(({ action:
|
|
2102
|
+
actions: e.individualActions.filter(({ action: k }) => k !== "spawnEdit"),
|
|
2102
2103
|
overlayLayer: 60
|
|
2103
2104
|
}, {
|
|
2104
|
-
onActionClick:
|
|
2105
|
+
onActionClick: f[2] || (f[2] = (k) => o("update:visible", !1))
|
|
2105
2106
|
}), {
|
|
2106
|
-
default:
|
|
2107
|
-
visible:
|
|
2107
|
+
default: v(({
|
|
2108
|
+
visible: k
|
|
2108
2109
|
}) => [
|
|
2109
|
-
t(r).item._id ?
|
|
2110
|
+
t(r).item._id ? W((n(), _(H, {
|
|
2110
2111
|
key: 0,
|
|
2111
2112
|
reactive: "",
|
|
2112
|
-
active:
|
|
2113
|
+
active: k,
|
|
2113
2114
|
icon: "dots-three"
|
|
2114
2115
|
}, null, 8, ["active"])), [
|
|
2115
|
-
[
|
|
2116
|
-
]) :
|
|
2116
|
+
[i]
|
|
2117
|
+
]) : h("", !0)
|
|
2117
2118
|
]),
|
|
2118
2119
|
_: 1
|
|
2119
|
-
}, 16)) :
|
|
2120
|
+
}, 16)) : h("", !0)
|
|
2120
2121
|
]),
|
|
2121
|
-
default:
|
|
2122
|
-
|
|
2122
|
+
default: v(() => [
|
|
2123
|
+
x(Me, M({
|
|
2123
2124
|
modelValue: t(r).item,
|
|
2124
|
-
"onUpdate:modelValue":
|
|
2125
|
+
"onUpdate:modelValue": f[0] || (f[0] = (k) => t(r).item = k)
|
|
2125
2126
|
}, {
|
|
2126
2127
|
collection: t(u),
|
|
2127
2128
|
readOnly: e.readOnly,
|
|
2128
2129
|
includeId: e.includeId,
|
|
2129
2130
|
includeTimestamps: e.includeTimestamps,
|
|
2130
|
-
form:
|
|
2131
|
+
form: y.value,
|
|
2131
2132
|
layout: t(r).description.formLayout || {}
|
|
2132
2133
|
}, {
|
|
2133
2134
|
focus: "",
|
|
2134
|
-
onAdd:
|
|
2135
|
-
}),
|
|
2136
|
-
|
|
2137
|
-
name:
|
|
2138
|
-
fn:
|
|
2139
|
-
C(
|
|
2135
|
+
onAdd: f[1] || (f[1] = (k) => k.preventDefault())
|
|
2136
|
+
}), se({ _: 2 }, [
|
|
2137
|
+
E(Object.keys(b.$slots).filter((k) => k.startsWith("field-")), (k) => ({
|
|
2138
|
+
name: k,
|
|
2139
|
+
fn: v((B) => [
|
|
2140
|
+
C(b.$slots, k, le(be(B)))
|
|
2140
2141
|
])
|
|
2141
2142
|
}))
|
|
2142
2143
|
]), 1040, ["modelValue"])
|
|
2143
2144
|
]),
|
|
2144
2145
|
_: 2
|
|
2145
2146
|
}, [
|
|
2146
|
-
|
|
2147
|
+
b.$slots.header ? {
|
|
2147
2148
|
name: "header",
|
|
2148
|
-
fn:
|
|
2149
|
-
C(
|
|
2149
|
+
fn: v(() => [
|
|
2150
|
+
C(b.$slots, "header")
|
|
2150
2151
|
]),
|
|
2151
2152
|
key: "0"
|
|
2152
2153
|
} : void 0,
|
|
2153
2154
|
e.readOnly ? void 0 : {
|
|
2154
2155
|
name: "footer",
|
|
2155
|
-
fn:
|
|
2156
|
-
e.float || e.fixedRight ? (n(),
|
|
2156
|
+
fn: v(() => [
|
|
2157
|
+
e.float || e.fixedRight ? (n(), _(ie, {
|
|
2157
2158
|
key: 0,
|
|
2158
2159
|
variant: "transparent",
|
|
2159
2160
|
onClick: p
|
|
2160
2161
|
}, {
|
|
2161
|
-
default:
|
|
2162
|
-
D(
|
|
2162
|
+
default: v(() => [
|
|
2163
|
+
D(g(t(m)("action.cancel", { capitalize: !0 })), 1)
|
|
2163
2164
|
]),
|
|
2164
2165
|
_: 1
|
|
2165
|
-
})) :
|
|
2166
|
-
|
|
2166
|
+
})) : h("", !0),
|
|
2167
|
+
x(ie, {
|
|
2167
2168
|
large: "",
|
|
2168
2169
|
disabled: !t(r).isInsertReady || t(r).loading.get,
|
|
2169
2170
|
loading: t(r).loading.insert,
|
|
2170
2171
|
onClick: d
|
|
2171
2172
|
}, {
|
|
2172
|
-
default:
|
|
2173
|
-
D(
|
|
2173
|
+
default: v(() => [
|
|
2174
|
+
D(g(t(m)("action.insert", { capitalize: !0 })), 1)
|
|
2174
2175
|
]),
|
|
2175
2176
|
_: 1
|
|
2176
2177
|
}, 8, ["disabled", "loading"])
|
|
@@ -2191,8 +2192,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2191
2192
|
}, Aa = (e, c = {
|
|
2192
2193
|
persistInQuery: !0
|
|
2193
2194
|
}) => {
|
|
2194
|
-
const o =
|
|
2195
|
-
return
|
|
2195
|
+
const o = Ve().currentRoute;
|
|
2196
|
+
return ne(() => o.value.query.section, (l) => {
|
|
2196
2197
|
if (e) {
|
|
2197
2198
|
if (e.description.filtersPresets) {
|
|
2198
2199
|
const u = l || Object.keys(e.description.filtersPresets)[0];
|
|
@@ -2227,7 +2228,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2227
2228
|
}, Na = { class: "table__cell-actions" }, eo = {
|
|
2228
2229
|
key: 2,
|
|
2229
2230
|
class: "no-print table__mobile-actions"
|
|
2230
|
-
}, to = ["id"], no = { key: 1 }, ao = ["colspan"], oo = { class: "table__empty" }, lo = /* @__PURE__ */
|
|
2231
|
+
}, to = ["id"], no = { key: 1 }, ao = ["colspan"], oo = { class: "table__empty" }, lo = /* @__PURE__ */ z({
|
|
2231
2232
|
__name: "aeria-table",
|
|
2232
2233
|
props: {
|
|
2233
2234
|
columns: {},
|
|
@@ -2239,252 +2240,252 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2239
2240
|
},
|
|
2240
2241
|
emits: ["itemClick"],
|
|
2241
2242
|
setup(e, { emit: c }) {
|
|
2242
|
-
const a = e, o = c, l = Se(), u = a.collection || we(), r = u ?
|
|
2243
|
+
const a = e, o = c, l = Se(), u = a.collection || we(), r = u ? ae(typeof u == "string" ? u : u.value) : null, y = Q({
|
|
2243
2244
|
get: () => r?.selected,
|
|
2244
|
-
set: (
|
|
2245
|
-
}), d =
|
|
2246
|
-
const
|
|
2247
|
-
return !l.value.xl || !
|
|
2248
|
-
if (
|
|
2249
|
-
const
|
|
2250
|
-
if (!Ee(
|
|
2245
|
+
set: (i) => r?.$actions.selectManyItems(i, !0)
|
|
2246
|
+
}), d = Q(() => a.columns ? Object.keys(a.columns).length + Number(a.checkbox) : 0), m = (i, k) => i.button ? typeof i.button == "object" ? qe(k, i.button).satisfied : i.button : !1, p = (i) => {
|
|
2247
|
+
const k = a.layout?.actions;
|
|
2248
|
+
return !l.value.xl || !k || !a.actions ? [] : a.actions.filter((B) => {
|
|
2249
|
+
if (B.roles) {
|
|
2250
|
+
const Y = ae("user");
|
|
2251
|
+
if (!Ee(B.roles, Y.currentUser.roles))
|
|
2251
2252
|
return !1;
|
|
2252
2253
|
}
|
|
2253
|
-
const
|
|
2254
|
-
return
|
|
2254
|
+
const $ = k[B.action];
|
|
2255
|
+
return $ && m($, i);
|
|
2255
2256
|
});
|
|
2256
|
-
},
|
|
2257
|
+
}, b = (i) => {
|
|
2257
2258
|
if (!a.actions)
|
|
2258
2259
|
return [];
|
|
2259
|
-
const
|
|
2260
|
-
return !l.value.xl || !
|
|
2261
|
-
const
|
|
2262
|
-
if (
|
|
2263
|
-
const
|
|
2264
|
-
if (!Ee(
|
|
2260
|
+
const k = a.layout?.actions;
|
|
2261
|
+
return !l.value.xl || !k ? a.actions : a.actions.filter((B) => {
|
|
2262
|
+
const $ = k[B.action];
|
|
2263
|
+
if (B.roles) {
|
|
2264
|
+
const Y = ae("user");
|
|
2265
|
+
if (!Ee(B.roles, Y.currentUser.roles))
|
|
2265
2266
|
return !1;
|
|
2266
2267
|
}
|
|
2267
|
-
return
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
).satisfied : !m(
|
|
2268
|
+
return $ ? $.if ? qe(
|
|
2269
|
+
i,
|
|
2270
|
+
$.if
|
|
2271
|
+
).satisfied : !m($, i) : !0;
|
|
2271
2272
|
});
|
|
2272
|
-
},
|
|
2273
|
-
const
|
|
2274
|
-
return
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
).satisfied ||
|
|
2273
|
+
}, f = (i, k) => {
|
|
2274
|
+
const B = [], $ = a.layout?.actions?.[k.action];
|
|
2275
|
+
return $?.if && (qe(
|
|
2276
|
+
i,
|
|
2277
|
+
$.if
|
|
2278
|
+
).satisfied || B.push("display: none;")), B.join("");
|
|
2278
2279
|
};
|
|
2279
|
-
return (
|
|
2280
|
-
const
|
|
2281
|
-
return d.value > 0 ||
|
|
2282
|
-
|
|
2283
|
-
C(
|
|
2280
|
+
return (i, k) => {
|
|
2281
|
+
const B = N("clickable");
|
|
2282
|
+
return d.value > 0 || i.$slots.thead ? (n(), s("table", Ia, [
|
|
2283
|
+
i.$slots.thead ? (n(), s("thead", Ba, [
|
|
2284
|
+
C(i.$slots, "thead", {}, void 0, !0)
|
|
2284
2285
|
])) : (n(), s("thead", Sa, [
|
|
2285
2286
|
O("tr", null, [
|
|
2286
2287
|
e.checkbox && t(r) && t(l).md ? (n(), s("th", wa, [
|
|
2287
2288
|
O("input", {
|
|
2288
2289
|
type: "checkbox",
|
|
2289
2290
|
checked: t(r).selected.length > 0 && t(r).selected.length === t(r).itemsCount,
|
|
2290
|
-
onChange:
|
|
2291
|
+
onChange: k[0] || (k[0] = ($) => t(r).$actions.selectAllItems($.target.checked))
|
|
2291
2292
|
}, null, 40, Ta)
|
|
2292
|
-
])) :
|
|
2293
|
-
(n(!0), s(
|
|
2294
|
-
key: `header-${
|
|
2293
|
+
])) : h("", !0),
|
|
2294
|
+
(n(!0), s(G, null, E(Object.entries(e.columns), ([$, Y], A) => (n(), s("th", {
|
|
2295
|
+
key: `header-${A}`,
|
|
2295
2296
|
class: "table__header"
|
|
2296
|
-
},
|
|
2297
|
-
e.actions?.length ? (n(), s("th", ja)) :
|
|
2297
|
+
}, g(Y.description || t(q)($)), 1))), 128)),
|
|
2298
|
+
e.actions?.length ? (n(), s("th", ja)) : h("", !0)
|
|
2298
2299
|
])
|
|
2299
2300
|
])),
|
|
2300
|
-
|
|
2301
|
-
C(
|
|
2301
|
+
i.$slots.tbody ? (n(), s("tbody", Ra, [
|
|
2302
|
+
C(i.$slots, "tbody", {}, void 0, !0)
|
|
2302
2303
|
])) : (n(), s("tbody", qa, [
|
|
2303
|
-
(n(!0), s(
|
|
2304
|
-
key:
|
|
2305
|
-
onClick: (
|
|
2304
|
+
(n(!0), s(G, null, E(e.rows, ($, Y) => (n(), s("tr", {
|
|
2305
|
+
key: $._id,
|
|
2306
|
+
onClick: (A) => o("itemClick", $)
|
|
2306
2307
|
}, [
|
|
2307
2308
|
t(r) && e.checkbox && t(l).md ? (n(), s("td", xa, [
|
|
2308
|
-
|
|
2309
|
-
"onUpdate:modelValue":
|
|
2309
|
+
W(O("input", {
|
|
2310
|
+
"onUpdate:modelValue": k[1] || (k[1] = (A) => y.value = A),
|
|
2310
2311
|
type: "checkbox",
|
|
2311
|
-
value:
|
|
2312
|
+
value: $._id
|
|
2312
2313
|
}, null, 8, Ma), [
|
|
2313
|
-
[tt,
|
|
2314
|
+
[tt, y.value]
|
|
2314
2315
|
])
|
|
2315
|
-
])) :
|
|
2316
|
-
(n(!0), s(
|
|
2317
|
-
key: `column-${
|
|
2316
|
+
])) : h("", !0),
|
|
2317
|
+
(n(!0), s(G, null, E(Object.entries(e.columns), ([A, j], K) => (n(), s("td", {
|
|
2318
|
+
key: `column-${$._id}-${K}`
|
|
2318
2319
|
}, [
|
|
2319
|
-
O("div", za,
|
|
2320
|
-
`row-${
|
|
2321
|
-
C(
|
|
2320
|
+
O("div", za, g(j.description || t(q)(A)), 1),
|
|
2321
|
+
`row-${A}` in i.$slots ? (n(), s("div", Ea, [
|
|
2322
|
+
C(i.$slots, `row-${A}`, M({ ref_for: !0 }, {
|
|
2322
2323
|
store: t(r),
|
|
2323
|
-
column:
|
|
2324
|
-
property:
|
|
2325
|
-
row:
|
|
2326
|
-
rowIndex:
|
|
2324
|
+
column: A,
|
|
2325
|
+
property: j,
|
|
2326
|
+
row: $,
|
|
2327
|
+
rowIndex: Y
|
|
2327
2328
|
}), void 0, !0)
|
|
2328
2329
|
])) : (n(), s("div", Fa, [
|
|
2329
2330
|
O("div", Ua, [
|
|
2330
|
-
"type" in
|
|
2331
|
-
|
|
2331
|
+
"type" in j && j.type === "boolean" ? (n(), s("div", Ha, [
|
|
2332
|
+
$[A] ? (n(), _(H, {
|
|
2332
2333
|
key: 0,
|
|
2333
2334
|
icon: "check",
|
|
2334
2335
|
"icon-classes": "aeria-blueish"
|
|
2335
2336
|
}, {
|
|
2336
|
-
default:
|
|
2337
|
-
D(
|
|
2337
|
+
default: v(() => [
|
|
2338
|
+
D(g(t(q)("yes")), 1)
|
|
2338
2339
|
]),
|
|
2339
2340
|
_: 1
|
|
2340
|
-
})) : (n(),
|
|
2341
|
+
})) : (n(), _(H, {
|
|
2341
2342
|
key: 1,
|
|
2342
2343
|
icon: "x",
|
|
2343
2344
|
"icon-classes": "aeria-redish"
|
|
2344
2345
|
}, {
|
|
2345
|
-
default:
|
|
2346
|
-
D(
|
|
2346
|
+
default: v(() => [
|
|
2347
|
+
D(g(t(q)("no")), 1)
|
|
2347
2348
|
]),
|
|
2348
2349
|
_: 1
|
|
2349
2350
|
}))
|
|
2350
|
-
])) : t(
|
|
2351
|
-
|
|
2352
|
-
"items" in
|
|
2351
|
+
])) : t(re)(j)?.$ref === "file" ? (n(), s("div", Da, [
|
|
2352
|
+
$[A] ? (n(), s("div", Qa, [
|
|
2353
|
+
"items" in j && $[A][0] && /^image/.test($[A][0].type) ? (n(), _(Le, {
|
|
2353
2354
|
key: 0,
|
|
2354
|
-
modelValue:
|
|
2355
|
-
"onUpdate:modelValue": (
|
|
2355
|
+
modelValue: $[A][0].link,
|
|
2356
|
+
"onUpdate:modelValue": (ee) => $[A][0].link = ee,
|
|
2356
2357
|
expandable: "",
|
|
2357
|
-
meta:
|
|
2358
|
+
meta: $[A][0],
|
|
2358
2359
|
alt: "Row image",
|
|
2359
2360
|
class: "table__picture"
|
|
2360
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test(
|
|
2361
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test($[A].type) ? (n(), _(Le, {
|
|
2361
2362
|
key: 1,
|
|
2362
|
-
modelValue:
|
|
2363
|
-
"onUpdate:modelValue": (
|
|
2363
|
+
modelValue: $[A].link,
|
|
2364
|
+
"onUpdate:modelValue": (ee) => $[A].link = ee,
|
|
2364
2365
|
expandable: "",
|
|
2365
|
-
meta:
|
|
2366
|
+
meta: $[A],
|
|
2366
2367
|
alt: "Row image",
|
|
2367
2368
|
class: "table__picture"
|
|
2368
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) :
|
|
2369
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : $[A].link ? (n(), s("a", {
|
|
2369
2370
|
key: 2,
|
|
2370
|
-
href:
|
|
2371
|
+
href: $[A].link,
|
|
2371
2372
|
style: { "font-size": "10pt" }
|
|
2372
|
-
},
|
|
2373
|
+
}, g($[A].filename), 9, Ga)) : (n(), s("div", Wa, " - "))
|
|
2373
2374
|
])) : (n(), s("div", Ya, " - "))
|
|
2374
2375
|
])) : (n(), s("div", Ka, [
|
|
2375
|
-
t(r) ? (n(), s("span", Xa,
|
|
2376
|
-
value:
|
|
2377
|
-
key:
|
|
2378
|
-
property:
|
|
2379
|
-
})), 1)) : (n(), s("span", Ja,
|
|
2380
|
-
t(
|
|
2381
|
-
(n(!0), s(
|
|
2382
|
-
key: `subvalue-${
|
|
2376
|
+
t(r) ? (n(), s("span", Xa, g(t(r).$actions.formatValue({
|
|
2377
|
+
value: $[A],
|
|
2378
|
+
key: A,
|
|
2379
|
+
property: j
|
|
2380
|
+
})), 1)) : (n(), s("span", Ja, g(Array.isArray($[A]) ? $[A].filter((ee) => !!ee).join(", ") : [void 0, null].includes($[A]) ? "-" : $[A]), 1)),
|
|
2381
|
+
t(re)(j)?.indexes?.length > 1 ? (n(), s("div", Za, [
|
|
2382
|
+
(n(!0), s(G, null, E(t(re)(j).indexes.slice(1, 2), (ee, de) => (n(), s("div", {
|
|
2383
|
+
key: `subvalue-${de}`,
|
|
2383
2384
|
class: "table__cell-subvalue"
|
|
2384
|
-
},
|
|
2385
|
-
value:
|
|
2386
|
-
key:
|
|
2387
|
-
property:
|
|
2388
|
-
index:
|
|
2385
|
+
}, g(t(r).$actions.formatValue({
|
|
2386
|
+
value: $[A],
|
|
2387
|
+
key: A,
|
|
2388
|
+
property: j,
|
|
2389
|
+
index: ee
|
|
2389
2390
|
})), 1))), 128))
|
|
2390
|
-
])) :
|
|
2391
|
+
])) : h("", !0)
|
|
2391
2392
|
]))
|
|
2392
2393
|
])
|
|
2393
2394
|
]))
|
|
2394
2395
|
]))), 128)),
|
|
2395
2396
|
e.actions?.length && t(l).md ? (n(), s("td", Pa, [
|
|
2396
2397
|
O("div", Na, [
|
|
2397
|
-
(n(!0), s(
|
|
2398
|
-
key: `action-${
|
|
2398
|
+
(n(!0), s(G, null, E(p($), (A) => (n(), _(ie, {
|
|
2399
|
+
key: `action-${A.action}`,
|
|
2399
2400
|
small: "",
|
|
2400
2401
|
variant: "alt",
|
|
2401
|
-
icon:
|
|
2402
|
-
style: ve(
|
|
2403
|
-
onClick: (
|
|
2402
|
+
icon: A.icon,
|
|
2403
|
+
style: ve(f($, A)),
|
|
2404
|
+
onClick: (j) => A.click($)
|
|
2404
2405
|
}, {
|
|
2405
|
-
default:
|
|
2406
|
-
D(
|
|
2406
|
+
default: v(() => [
|
|
2407
|
+
D(g(t(q)(A.label)), 1)
|
|
2407
2408
|
]),
|
|
2408
2409
|
_: 2
|
|
2409
2410
|
}, 1032, ["icon", "style", "onClick"]))), 128)),
|
|
2410
|
-
|
|
2411
|
+
b($).length > 0 ? (n(), _(ke, M({
|
|
2411
2412
|
key: 0,
|
|
2412
2413
|
ref_for: !0
|
|
2413
2414
|
}, {
|
|
2414
|
-
subject:
|
|
2415
|
-
actions:
|
|
2415
|
+
subject: $,
|
|
2416
|
+
actions: b($)
|
|
2416
2417
|
}), {
|
|
2417
|
-
default:
|
|
2418
|
-
visible:
|
|
2418
|
+
default: v(({
|
|
2419
|
+
visible: A
|
|
2419
2420
|
}) => [
|
|
2420
|
-
|
|
2421
|
+
W(x(H, {
|
|
2421
2422
|
reactive: "",
|
|
2422
|
-
active:
|
|
2423
|
+
active: A,
|
|
2423
2424
|
icon: "dots-three"
|
|
2424
2425
|
}, null, 8, ["active"]), [
|
|
2425
|
-
[
|
|
2426
|
+
[B]
|
|
2426
2427
|
])
|
|
2427
2428
|
]),
|
|
2428
2429
|
_: 1
|
|
2429
|
-
}, 16)) :
|
|
2430
|
+
}, 16)) : h("", !0)
|
|
2430
2431
|
])
|
|
2431
2432
|
])) : e.actions?.length ? (n(), s("td", eo, [
|
|
2432
2433
|
O("div", {
|
|
2433
2434
|
class: "table__mobile-actions-grid",
|
|
2434
|
-
style: ve(`grid-template-columns: repeat(${p(
|
|
2435
|
+
style: ve(`grid-template-columns: repeat(${p($).length + (b($).length ? 1 : 0)}, 1fr);`)
|
|
2435
2436
|
}, [
|
|
2436
|
-
(n(!0), s(
|
|
2437
|
-
key: `action-${
|
|
2437
|
+
(n(!0), s(G, null, E(p($), (A) => (n(), _(me, {
|
|
2438
|
+
key: `action-${A.action}`,
|
|
2438
2439
|
class: "table__mobile-actions-button",
|
|
2439
|
-
onClick: (
|
|
2440
|
+
onClick: (j) => A.click($)
|
|
2440
2441
|
}, {
|
|
2441
|
-
default:
|
|
2442
|
-
|
|
2443
|
-
icon:
|
|
2442
|
+
default: v(() => [
|
|
2443
|
+
x(H, {
|
|
2444
|
+
icon: A.icon || "gear"
|
|
2444
2445
|
}, {
|
|
2445
|
-
default:
|
|
2446
|
-
D(
|
|
2446
|
+
default: v(() => [
|
|
2447
|
+
D(g(t(q)(A.label)), 1)
|
|
2447
2448
|
]),
|
|
2448
2449
|
_: 2
|
|
2449
2450
|
}, 1032, ["icon"])
|
|
2450
2451
|
]),
|
|
2451
2452
|
_: 2
|
|
2452
2453
|
}, 1032, ["onClick"]))), 128)),
|
|
2453
|
-
|
|
2454
|
+
b($).length > 0 ? (n(), _(ke, M({
|
|
2454
2455
|
key: 0,
|
|
2455
2456
|
ref_for: !0
|
|
2456
2457
|
}, {
|
|
2457
|
-
subject:
|
|
2458
|
-
actions:
|
|
2458
|
+
subject: $,
|
|
2459
|
+
actions: b($)
|
|
2459
2460
|
}), {
|
|
2460
|
-
default:
|
|
2461
|
-
|
|
2461
|
+
default: v(() => [
|
|
2462
|
+
x(H, {
|
|
2462
2463
|
icon: "dots-three",
|
|
2463
2464
|
class: "table__mobile-actions-button"
|
|
2464
2465
|
})
|
|
2465
2466
|
]),
|
|
2466
2467
|
_: 1
|
|
2467
|
-
}, 16)) :
|
|
2468
|
+
}, 16)) : h("", !0)
|
|
2468
2469
|
], 4),
|
|
2469
2470
|
O("div", {
|
|
2470
|
-
id: `dropdown-${
|
|
2471
|
+
id: `dropdown-${$._id}`
|
|
2471
2472
|
}, null, 8, to)
|
|
2472
|
-
])) :
|
|
2473
|
+
])) : h("", !0)
|
|
2473
2474
|
], 8, La))), 128))
|
|
2474
2475
|
])),
|
|
2475
2476
|
O("tfoot", null, [
|
|
2476
|
-
|
|
2477
|
+
i.$slots.tfoot ? C(i.$slots, "tfoot", { key: 0 }, void 0, !0) : e.columns && !e.rows?.length && !t(r)?.loading.getAll ? (n(), s("tr", no, [
|
|
2477
2478
|
O("td", {
|
|
2478
2479
|
colspan: d.value + 1
|
|
2479
2480
|
}, [
|
|
2480
|
-
O("div", oo,
|
|
2481
|
+
O("div", oo, g(t(q)("no_results", { capitalize: !0 })) + ". ", 1)
|
|
2481
2482
|
], 8, ao)
|
|
2482
|
-
])) :
|
|
2483
|
+
])) : h("", !0)
|
|
2483
2484
|
])
|
|
2484
|
-
])) :
|
|
2485
|
+
])) : h("", !0);
|
|
2485
2486
|
};
|
|
2486
2487
|
}
|
|
2487
|
-
}), io = /* @__PURE__ */
|
|
2488
|
+
}), io = /* @__PURE__ */ F(lo, [["__scopeId", "data-v-e01a149a"]]), so = /* @__PURE__ */ z({
|
|
2488
2489
|
__name: "aeria-tabular",
|
|
2489
2490
|
props: {
|
|
2490
2491
|
individualActions: {},
|
|
@@ -2492,7 +2493,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2492
2493
|
componentProps: {}
|
|
2493
2494
|
},
|
|
2494
2495
|
setup(e) {
|
|
2495
|
-
const c = e, a = Ae(), o = we(), l =
|
|
2496
|
+
const c = e, a = Ae(), o = we(), l = Q(() => {
|
|
2496
2497
|
const u = {
|
|
2497
2498
|
collection: o,
|
|
2498
2499
|
checkbox: a.hasSelectionActions,
|
|
@@ -2504,20 +2505,20 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2504
2505
|
return Object.assign(u, c.componentProps);
|
|
2505
2506
|
});
|
|
2506
2507
|
return (u, r) => (n(), s("div", null, [
|
|
2507
|
-
u.$slots.inner ? C(u.$slots, "inner", { key: 0 }) :
|
|
2508
|
-
t(a).properties ? (n(),
|
|
2508
|
+
u.$slots.inner ? C(u.$slots, "inner", { key: 0 }) : h("", !0),
|
|
2509
|
+
t(a).properties ? (n(), _(io, M({ key: 1 }, l.value, {
|
|
2509
2510
|
key: t(a).$id
|
|
2510
|
-
}),
|
|
2511
|
-
|
|
2512
|
-
name:
|
|
2513
|
-
fn:
|
|
2514
|
-
C(u.$slots,
|
|
2511
|
+
}), se({ _: 2 }, [
|
|
2512
|
+
E(Object.keys(u.$slots).filter((y) => !["inner"].includes(y)), (y) => ({
|
|
2513
|
+
name: y,
|
|
2514
|
+
fn: v((d) => [
|
|
2515
|
+
C(u.$slots, y, le(be(d)))
|
|
2515
2516
|
])
|
|
2516
2517
|
}))
|
|
2517
|
-
]), 1040)) :
|
|
2518
|
+
]), 1040)) : h("", !0)
|
|
2518
2519
|
]));
|
|
2519
2520
|
}
|
|
2520
|
-
}), ro = /* @__PURE__ */
|
|
2521
|
+
}), ro = /* @__PURE__ */ z({
|
|
2521
2522
|
__name: "aeria-grid",
|
|
2522
2523
|
props: {
|
|
2523
2524
|
list: { type: Boolean }
|
|
@@ -2532,13 +2533,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2532
2533
|
C(c.$slots, "default", {}, void 0, !0)
|
|
2533
2534
|
], 2));
|
|
2534
2535
|
}
|
|
2535
|
-
}), uo = /* @__PURE__ */
|
|
2536
|
+
}), uo = /* @__PURE__ */ F(ro, [["__scopeId", "data-v-4839c834"]]), co = { key: 0 }, mo = {
|
|
2536
2537
|
key: 1,
|
|
2537
2538
|
class: "card__information"
|
|
2538
2539
|
}, po = {
|
|
2539
2540
|
key: 2,
|
|
2540
2541
|
class: "card__information"
|
|
2541
|
-
}, fo = /* @__PURE__ */
|
|
2542
|
+
}, fo = /* @__PURE__ */ z({
|
|
2542
2543
|
__name: "aeria-grid",
|
|
2543
2544
|
props: {
|
|
2544
2545
|
individualActions: {},
|
|
@@ -2549,48 +2550,48 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2549
2550
|
setup(e) {
|
|
2550
2551
|
const a = e.layoutOptions, o = Ae(), l = (u) => Array.isArray(u) ? u[0] : u;
|
|
2551
2552
|
return (u, r) => {
|
|
2552
|
-
const
|
|
2553
|
-
return n(),
|
|
2553
|
+
const y = N("clickable");
|
|
2554
|
+
return n(), _(uo, {
|
|
2554
2555
|
list: e.componentName === "list"
|
|
2555
2556
|
}, {
|
|
2556
|
-
default:
|
|
2557
|
-
(n(!0), s(
|
|
2557
|
+
default: v(() => [
|
|
2558
|
+
(n(!0), s(G, null, E(t(o).items, (d) => (n(), _(zt, {
|
|
2558
2559
|
key: d._id,
|
|
2559
2560
|
inactive: !!(t(a).active && !d[t(a).active]),
|
|
2560
2561
|
horizontal: e.componentName === "list"
|
|
2561
|
-
},
|
|
2562
|
-
footer:
|
|
2563
|
-
t(a).title ? (n(), s("div", co,
|
|
2562
|
+
}, se({
|
|
2563
|
+
footer: v(() => [
|
|
2564
|
+
t(a).title ? (n(), s("div", co, g(d[t(a).title]), 1)) : h("", !0),
|
|
2564
2565
|
Array.isArray(t(a).information) ? (n(), s("div", mo, [
|
|
2565
|
-
(n(!0), s(
|
|
2566
|
+
(n(!0), s(G, null, E(t(a).information, (m) => (n(), s("div", {
|
|
2566
2567
|
key: `info-${m}`
|
|
2567
|
-
},
|
|
2568
|
-
])) : t(a).information ? (n(), s("div", po,
|
|
2568
|
+
}, g(d[m]), 1))), 128))
|
|
2569
|
+
])) : t(a).information ? (n(), s("div", po, g(d[t(a).information]), 1)) : h("", !0)
|
|
2569
2570
|
]),
|
|
2570
|
-
actions:
|
|
2571
|
-
e.individualActions?.length ? (n(),
|
|
2571
|
+
actions: v(() => [
|
|
2572
|
+
e.individualActions?.length ? (n(), _(ke, M({
|
|
2572
2573
|
key: 0,
|
|
2573
2574
|
ref_for: !0
|
|
2574
2575
|
}, {
|
|
2575
2576
|
subject: d,
|
|
2576
2577
|
actions: e.individualActions
|
|
2577
2578
|
}), {
|
|
2578
|
-
default:
|
|
2579
|
+
default: v(({
|
|
2579
2580
|
visible: m
|
|
2580
2581
|
}) => [
|
|
2581
|
-
|
|
2582
|
+
W(x(H, {
|
|
2582
2583
|
reactive: "",
|
|
2583
2584
|
active: m,
|
|
2584
2585
|
icon: "dots-three-vertical"
|
|
2585
2586
|
}, null, 8, ["active"]), [
|
|
2586
|
-
[
|
|
2587
|
+
[y]
|
|
2587
2588
|
])
|
|
2588
2589
|
]),
|
|
2589
2590
|
_: 1
|
|
2590
|
-
}, 16)) :
|
|
2591
|
+
}, 16)) : h("", !0)
|
|
2591
2592
|
]),
|
|
2592
|
-
default:
|
|
2593
|
-
|
|
2593
|
+
default: v(() => [
|
|
2594
|
+
x(Le, M({ expandable: "" }, { ref_for: !0 }, {
|
|
2594
2595
|
url: l(d[t(a).picture])?.link,
|
|
2595
2596
|
meta: l(d[t(a).picture]),
|
|
2596
2597
|
height: "16rem",
|
|
@@ -2601,13 +2602,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2601
2602
|
}, [
|
|
2602
2603
|
t(a).badge && Array.isArray(d[t(a).badge]) ? {
|
|
2603
2604
|
name: "badge",
|
|
2604
|
-
fn:
|
|
2605
|
-
(n(!0), s(
|
|
2605
|
+
fn: v(() => [
|
|
2606
|
+
(n(!0), s(G, null, E(d[t(a).badge], (m) => (n(), _(he, {
|
|
2606
2607
|
key: `${d._id}-${m}`,
|
|
2607
2608
|
large: ""
|
|
2608
2609
|
}, {
|
|
2609
|
-
default:
|
|
2610
|
-
D(
|
|
2610
|
+
default: v(() => [
|
|
2611
|
+
D(g(t(a).translateBadge ? t(q)(m) : m), 1)
|
|
2611
2612
|
]),
|
|
2612
2613
|
_: 2
|
|
2613
2614
|
}, 1024))), 128))
|
|
@@ -2615,10 +2616,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2615
2616
|
key: "0"
|
|
2616
2617
|
} : t(a).badge ? {
|
|
2617
2618
|
name: "badge",
|
|
2618
|
-
fn:
|
|
2619
|
-
|
|
2620
|
-
default:
|
|
2621
|
-
D(
|
|
2619
|
+
fn: v(() => [
|
|
2620
|
+
x(he, null, {
|
|
2621
|
+
default: v(() => [
|
|
2622
|
+
D(g(t(a).translateBadge && typeof d[t(a).badge] == "string" ? t(q)(d[t(a).badge]) : d[t(a).badge]), 1)
|
|
2622
2623
|
]),
|
|
2623
2624
|
_: 2
|
|
2624
2625
|
}, 1024)
|
|
@@ -2631,7 +2632,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2631
2632
|
}, 8, ["list"]);
|
|
2632
2633
|
};
|
|
2633
2634
|
}
|
|
2634
|
-
}), Ye = /* @__PURE__ */
|
|
2635
|
+
}), Ye = /* @__PURE__ */ F(fo, [["__scopeId", "data-v-ce6f7461"]]), vo = (e) => ({
|
|
2635
2636
|
tabular: so,
|
|
2636
2637
|
grid: Ye,
|
|
2637
2638
|
list: Ye
|
|
@@ -2644,7 +2645,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2644
2645
|
}, bo = { class: "crud__actions" }, _o = { class: "crud__context-badge" }, $o = { class: "crud__data" }, go = { key: 0 }, ko = {
|
|
2645
2646
|
key: 3,
|
|
2646
2647
|
class: "crud__pagination"
|
|
2647
|
-
}, Ke = 30, Vo = /* @__PURE__ */
|
|
2648
|
+
}, Ke = 30, Vo = /* @__PURE__ */ z({
|
|
2648
2649
|
__name: "aeria-crud",
|
|
2649
2650
|
props: {
|
|
2650
2651
|
collection: {},
|
|
@@ -2660,117 +2661,117 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2660
2661
|
},
|
|
2661
2662
|
emits: ["uiEvent"],
|
|
2662
2663
|
setup(e, { emit: c }) {
|
|
2663
|
-
const a =
|
|
2664
|
+
const a = J(!1), o = J(!1), l = J((...T) => null), u = J(), r = e, y = c, d = Ve(), m = Se(), { reachedEnd: p, detach: b } = He(null, {
|
|
2664
2665
|
antecipate: 600
|
|
2665
|
-
}),
|
|
2666
|
-
|
|
2667
|
-
|
|
2666
|
+
}), f = !m.value.md || r.scrollPagination;
|
|
2667
|
+
f && ne(p, (T) => {
|
|
2668
|
+
T && i.pagination.recordsTotal > i.items.length && $.value < Ke && ($.value += 1, A());
|
|
2668
2669
|
});
|
|
2669
2670
|
const i = pt(r.collection);
|
|
2670
2671
|
Aa(i, {
|
|
2671
2672
|
persistInQuery: !r.noQueryPersistence
|
|
2672
2673
|
});
|
|
2673
|
-
const
|
|
2674
|
-
l.value =
|
|
2675
|
-
const
|
|
2676
|
-
i.activeFilters = Object.assign({},
|
|
2677
|
-
const
|
|
2674
|
+
const k = De(), B = r.action ? t(r.action) : ft(i, d, k);
|
|
2675
|
+
l.value = B[0], u.value = B[1];
|
|
2676
|
+
const $ = J(0), Y = J(!1), A = async (T) => {
|
|
2677
|
+
i.activeFilters = Object.assign({}, T?.filters || i.$filters), Object.assign(i.activeFilters, i.filtersPreset);
|
|
2678
|
+
const w = {
|
|
2678
2679
|
filters: i.activeFilters,
|
|
2679
2680
|
limit: i.pagination.limit,
|
|
2680
2681
|
offset: i.pagination.offset,
|
|
2681
2682
|
project: i.preferredTableProperties.length > 0 ? i.preferredTableProperties : i.description.table || Object.keys(i.properties)
|
|
2682
2683
|
};
|
|
2683
|
-
|
|
2684
|
-
const { error:
|
|
2685
|
-
if (
|
|
2684
|
+
$.value > 0 && (w.limit = 15, w.offset = $.value * w.limit), i.description.tableMeta && (w.project = w.project.concat(i.description.tableMeta)), T && Object.assign(w, T), i.loading.getAll = !0;
|
|
2685
|
+
const { error: te, result: P } = await i.$actions.retrieveItems(w);
|
|
2686
|
+
if (te)
|
|
2686
2687
|
return;
|
|
2687
|
-
const { data:
|
|
2688
|
-
i.pagination.recordsCount =
|
|
2689
|
-
},
|
|
2688
|
+
const { data: S, pagination: V } = P;
|
|
2689
|
+
i.pagination.recordsCount = V.recordsCount, i.pagination.recordsTotal = V.recordsTotal, $.value === 0 && i.items.splice(0), i.items.push(...S), i.loading.getAll = !1, Y.value = !0;
|
|
2690
|
+
}, j = async (T) => {
|
|
2690
2691
|
d.push(Be(d.currentRoute.value, {
|
|
2691
2692
|
query: {
|
|
2692
|
-
offset:
|
|
2693
|
-
limit:
|
|
2693
|
+
offset: T.offset,
|
|
2694
|
+
limit: T.limit
|
|
2694
2695
|
}
|
|
2695
|
-
})), i.pagination.offset =
|
|
2696
|
-
},
|
|
2697
|
-
|
|
2696
|
+
})), i.pagination.offset = T.offset, i.pagination.limit = T.limit, A();
|
|
2697
|
+
}, K = ce("noResultsComponent", null);
|
|
2698
|
+
ne(() => [
|
|
2698
2699
|
d.currentRoute.value.path,
|
|
2699
2700
|
d.currentRoute.value.query.section
|
|
2700
|
-
], async (
|
|
2701
|
-
if (
|
|
2701
|
+
], async (T, w) => {
|
|
2702
|
+
if (w && w[0] === T[0] && w[1] === T[1])
|
|
2702
2703
|
return;
|
|
2703
|
-
const
|
|
2704
|
-
if (
|
|
2705
|
-
const P = vt(i,
|
|
2706
|
-
Object.keys(P).length > 0 && Object.assign(i.filters, P), await
|
|
2704
|
+
const te = d.currentRoute.value;
|
|
2705
|
+
if (!r.noFetch && (!te.query._popstate || i.itemsCount === 0)) {
|
|
2706
|
+
const P = vt(i, te.query);
|
|
2707
|
+
Object.keys(P).length > 0 && Object.assign(i.filters, P), await A();
|
|
2707
2708
|
}
|
|
2708
2709
|
}, {
|
|
2709
2710
|
immediate: !0,
|
|
2710
2711
|
flush: "post"
|
|
2711
2712
|
});
|
|
2712
|
-
const [
|
|
2713
|
+
const [ee] = Ze({
|
|
2713
2714
|
delay: 600
|
|
2714
|
-
})((
|
|
2715
|
+
})((T) => (d.push(Be(d.currentRoute.value, {
|
|
2715
2716
|
query: {
|
|
2716
|
-
search:
|
|
2717
|
+
search: T || void 0
|
|
2717
2718
|
}
|
|
2718
|
-
})),
|
|
2719
|
+
})), T ? (i.filters = Object.assign(ge(i.freshFilters), {
|
|
2719
2720
|
$text: {
|
|
2720
|
-
$search: `"${
|
|
2721
|
+
$search: `"${T}"`,
|
|
2721
2722
|
$caseSensitive: !1
|
|
2722
2723
|
}
|
|
2723
|
-
}),
|
|
2724
|
+
}), A({
|
|
2724
2725
|
offset: 0
|
|
2725
|
-
})) : (i.filters =
|
|
2726
|
-
|
|
2727
|
-
|
|
2726
|
+
})) : (i.filters = ge(i.freshFilters), $.value = 0, A())));
|
|
2727
|
+
ne(() => i.textQuery, (T) => {
|
|
2728
|
+
ee(T);
|
|
2728
2729
|
});
|
|
2729
|
-
const
|
|
2730
|
-
|
|
2730
|
+
const de = (T) => {
|
|
2731
|
+
T.currentLayout = T.currentLayout === "tabular" ? T.description.layout.name : "tabular";
|
|
2731
2732
|
};
|
|
2732
2733
|
nt(() => {
|
|
2733
|
-
i.$actions.clearFilters(), i.textQuery = "",
|
|
2734
|
-
}),
|
|
2735
|
-
const
|
|
2736
|
-
let
|
|
2737
|
-
if (
|
|
2738
|
-
if ((
|
|
2734
|
+
i.$actions.clearFilters(), i.textQuery = "", b();
|
|
2735
|
+
}), ne(() => u.value, async (T) => {
|
|
2736
|
+
const w = ge(T);
|
|
2737
|
+
let te;
|
|
2738
|
+
if (w)
|
|
2739
|
+
if ((w.name === "spawnEdit" || w.name === "duplicate") && (te = i.$actions.get({
|
|
2739
2740
|
filters: {
|
|
2740
|
-
_id:
|
|
2741
|
+
_id: w.params._id
|
|
2741
2742
|
}
|
|
2742
|
-
})),
|
|
2743
|
-
i.$actions.clearItem(),
|
|
2743
|
+
})), w.name === "spawnAdd")
|
|
2744
|
+
i.$actions.clearItem(), w.params?.item && (i.$actions.setItem(w.params.item), Object.keys(w.params.item).forEach((P) => {
|
|
2744
2745
|
delete i.referenceItem[P];
|
|
2745
2746
|
})), a.value = "add";
|
|
2746
|
-
else if (
|
|
2747
|
-
i.$actions.setItem(
|
|
2748
|
-
else if (
|
|
2749
|
-
await
|
|
2750
|
-
const P = Object.entries(i.item).reduce((
|
|
2751
|
-
if (!(
|
|
2747
|
+
else if (w.name === "spawnEdit")
|
|
2748
|
+
i.$actions.setItem(w.params), a.value = "edit";
|
|
2749
|
+
else if (w.name === "duplicate") {
|
|
2750
|
+
await te;
|
|
2751
|
+
const P = Object.entries(i.item).reduce((S, [V, R]) => {
|
|
2752
|
+
if (!(V in i.properties))
|
|
2752
2753
|
return {
|
|
2753
|
-
...
|
|
2754
|
-
[
|
|
2754
|
+
...S,
|
|
2755
|
+
[V]: R
|
|
2755
2756
|
};
|
|
2756
|
-
const
|
|
2757
|
-
if (
|
|
2758
|
-
return
|
|
2759
|
-
const
|
|
2760
|
-
const
|
|
2761
|
-
if (!
|
|
2762
|
-
return
|
|
2763
|
-
if (
|
|
2757
|
+
const Z = i.properties[V];
|
|
2758
|
+
if (Z.readOnly)
|
|
2759
|
+
return S;
|
|
2760
|
+
const oe = (I) => {
|
|
2761
|
+
const L = re(Z);
|
|
2762
|
+
if (!L)
|
|
2763
|
+
return I;
|
|
2764
|
+
if (L.$ref === "file")
|
|
2764
2765
|
return {};
|
|
2765
|
-
if (
|
|
2766
|
-
const { _id:
|
|
2766
|
+
if (L.inline && I) {
|
|
2767
|
+
const { _id: X, ...ye } = I;
|
|
2767
2768
|
return ye;
|
|
2768
2769
|
}
|
|
2769
|
-
return
|
|
2770
|
+
return I;
|
|
2770
2771
|
};
|
|
2771
|
-
return
|
|
2772
|
-
...
|
|
2773
|
-
[
|
|
2772
|
+
return R = Array.isArray(R) ? R.map(oe) : oe(R), {
|
|
2773
|
+
...S,
|
|
2774
|
+
[V]: R
|
|
2774
2775
|
};
|
|
2775
2776
|
}, {
|
|
2776
2777
|
_id: void 0
|
|
@@ -2779,65 +2780,65 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2779
2780
|
_id: void 0
|
|
2780
2781
|
}, a.value = "duplicate";
|
|
2781
2782
|
} else
|
|
2782
|
-
|
|
2783
|
+
y("uiEvent", w);
|
|
2783
2784
|
}, {
|
|
2784
2785
|
deep: !0
|
|
2785
|
-
}),
|
|
2786
|
-
|
|
2786
|
+
}), ne(() => a, ({ value: T }) => {
|
|
2787
|
+
T === !1 && i.$actions.clearItem();
|
|
2787
2788
|
});
|
|
2788
|
-
const
|
|
2789
|
+
const ue = Q(() => {
|
|
2789
2790
|
if (!r.noActions)
|
|
2790
|
-
return i.individualActions.map((
|
|
2791
|
-
click: l.value(
|
|
2792
|
-
...
|
|
2791
|
+
return i.individualActions.map((T) => ({
|
|
2792
|
+
click: l.value(T),
|
|
2793
|
+
...T
|
|
2793
2794
|
}));
|
|
2794
|
-
}),
|
|
2795
|
-
return fe(Te,
|
|
2796
|
-
const
|
|
2797
|
-
return n(), s(
|
|
2798
|
-
o.value ? (n(),
|
|
2795
|
+
}), $e = Q(() => i.actions.filter((T) => !T.button));
|
|
2796
|
+
return fe(Te, Q(() => r.collection)), (T, w) => {
|
|
2797
|
+
const te = N("clickable"), P = N("loading");
|
|
2798
|
+
return n(), s(G, null, [
|
|
2799
|
+
o.value ? (n(), _(Ca, {
|
|
2799
2800
|
key: t(i).$id,
|
|
2800
2801
|
modelValue: o.value,
|
|
2801
|
-
"onUpdate:modelValue":
|
|
2802
|
-
}, null, 8, ["modelValue"])) :
|
|
2803
|
-
a.value ? (n(),
|
|
2802
|
+
"onUpdate:modelValue": w[0] || (w[0] = (S) => o.value = S)
|
|
2803
|
+
}, null, 8, ["modelValue"])) : h("", !0),
|
|
2804
|
+
a.value ? (n(), _(Oa, M({
|
|
2804
2805
|
key: 1,
|
|
2805
2806
|
visible: a.value,
|
|
2806
|
-
"onUpdate:visible":
|
|
2807
|
+
"onUpdate:visible": w[1] || (w[1] = (S) => a.value = S),
|
|
2807
2808
|
"fixed-right": ""
|
|
2808
2809
|
}, {
|
|
2809
2810
|
collection: e.collection,
|
|
2810
|
-
individualActions:
|
|
2811
|
+
individualActions: ue.value
|
|
2811
2812
|
}, {
|
|
2812
|
-
onCancel:
|
|
2813
|
-
}),
|
|
2814
|
-
header:
|
|
2815
|
-
O("span", null,
|
|
2813
|
+
onCancel: w[2] || (w[2] = (S) => a.value = !1)
|
|
2814
|
+
}), se({
|
|
2815
|
+
header: v(() => [
|
|
2816
|
+
O("span", null, g((() => {
|
|
2816
2817
|
switch (a.value) {
|
|
2817
2818
|
case "add":
|
|
2818
|
-
return t(
|
|
2819
|
+
return t(q)("action.add", { capitalize: !0 });
|
|
2819
2820
|
case "duplicate":
|
|
2820
|
-
return t(
|
|
2821
|
+
return t(q)("action.duplicate", { capitalize: !0 });
|
|
2821
2822
|
default:
|
|
2822
|
-
return t(
|
|
2823
|
+
return t(q)("action.edit", { capitalize: !0 });
|
|
2823
2824
|
}
|
|
2824
2825
|
})()), 1),
|
|
2825
|
-
O("span", null, " " +
|
|
2826
|
+
O("span", null, " " + g(t(q)(e.collection)), 1)
|
|
2826
2827
|
]),
|
|
2827
2828
|
_: 2
|
|
2828
2829
|
}, [
|
|
2829
|
-
|
|
2830
|
-
name:
|
|
2831
|
-
fn:
|
|
2832
|
-
C(
|
|
2830
|
+
E(Object.keys(T.$slots).filter((S) => S.startsWith("field-")), (S) => ({
|
|
2831
|
+
name: S,
|
|
2832
|
+
fn: v((V) => [
|
|
2833
|
+
C(T.$slots, S, le(be(V)), void 0, !0)
|
|
2833
2834
|
])
|
|
2834
2835
|
}))
|
|
2835
|
-
]), 1040, ["visible"])) :
|
|
2836
|
-
!e.noActions && (t(i).description.search || Object.keys(t(i).description.filters || {}).length > 0 || t(i)?.actions.length > 0 ||
|
|
2836
|
+
]), 1040, ["visible"])) : h("", !0),
|
|
2837
|
+
!e.noActions && (t(i).description.search || Object.keys(t(i).description.filters || {}).length > 0 || t(i)?.actions.length > 0 || T.$slots.actions || !e.noLayoutToggle && t(i).description.layout && t(i).description.layout?.name !== "tabular") ? (n(), s("div", yo, [
|
|
2837
2838
|
t(i).description.search ? (n(), s("div", ho, [
|
|
2838
|
-
|
|
2839
|
+
x(_e, M({
|
|
2839
2840
|
modelValue: t(i).textQuery,
|
|
2840
|
-
"onUpdate:modelValue":
|
|
2841
|
+
"onUpdate:modelValue": w[3] || (w[3] = (S) => t(i).textQuery = S)
|
|
2841
2842
|
}, {
|
|
2842
2843
|
property: {
|
|
2843
2844
|
type: "string",
|
|
@@ -2845,21 +2846,21 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2845
2846
|
inputType: "search"
|
|
2846
2847
|
}
|
|
2847
2848
|
}), null, 16, ["modelValue"])
|
|
2848
|
-
])) :
|
|
2849
|
+
])) : h("", !0),
|
|
2849
2850
|
O("div", bo, [
|
|
2850
|
-
|
|
2851
|
-
default:
|
|
2852
|
-
|
|
2851
|
+
$e.value.length > 0 || !e.noLayoutToggle && t(i).description.layout && t(i).description.layout?.name !== "tabular" ? (n(), _(ke, { key: 0 }, se({
|
|
2852
|
+
default: v(() => [
|
|
2853
|
+
x(ie, {
|
|
2853
2854
|
variant: "alt",
|
|
2854
2855
|
icon: "sliders"
|
|
2855
2856
|
}, {
|
|
2856
|
-
default:
|
|
2857
|
-
t(i).filtersCount ? (n(),
|
|
2858
|
-
default:
|
|
2859
|
-
D(
|
|
2857
|
+
default: v(() => [
|
|
2858
|
+
t(i).filtersCount ? (n(), _(he, { key: 0 }, {
|
|
2859
|
+
default: v(() => [
|
|
2860
|
+
D(g(t(i).filtersCount), 1)
|
|
2860
2861
|
]),
|
|
2861
2862
|
_: 1
|
|
2862
|
-
})) :
|
|
2863
|
+
})) : h("", !0)
|
|
2863
2864
|
]),
|
|
2864
2865
|
_: 1
|
|
2865
2866
|
})
|
|
@@ -2868,190 +2869,190 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2868
2869
|
}, [
|
|
2869
2870
|
Object.keys(t(i).description.filters || {}).length > 0 ? {
|
|
2870
2871
|
name: "filter",
|
|
2871
|
-
fn:
|
|
2872
|
-
|
|
2872
|
+
fn: v(() => [
|
|
2873
|
+
W((n(), _(H, {
|
|
2873
2874
|
icon: "funnel",
|
|
2874
|
-
onClick:
|
|
2875
|
+
onClick: w[4] || (w[4] = (S) => o.value = !0)
|
|
2875
2876
|
}, {
|
|
2876
|
-
default:
|
|
2877
|
-
D(
|
|
2877
|
+
default: v(() => [
|
|
2878
|
+
D(g(t(q)("filters", { capitalize: !0 })), 1)
|
|
2878
2879
|
]),
|
|
2879
2880
|
_: 1
|
|
2880
2881
|
})), [
|
|
2881
|
-
[
|
|
2882
|
+
[te]
|
|
2882
2883
|
]),
|
|
2883
2884
|
O("div", _o, [
|
|
2884
|
-
t(i).filtersCount ? (n(),
|
|
2885
|
-
default:
|
|
2886
|
-
D(
|
|
2885
|
+
t(i).filtersCount ? (n(), _(he, { key: 0 }, {
|
|
2886
|
+
default: v(() => [
|
|
2887
|
+
D(g(t(i).filtersCount), 1)
|
|
2887
2888
|
]),
|
|
2888
2889
|
_: 1
|
|
2889
|
-
})) :
|
|
2890
|
+
})) : h("", !0)
|
|
2890
2891
|
])
|
|
2891
2892
|
]),
|
|
2892
2893
|
key: "0"
|
|
2893
2894
|
} : void 0,
|
|
2894
2895
|
!e.noLayoutToggle && t(i).description.layout && t(i).description.layout?.name !== "tabular" ? {
|
|
2895
2896
|
name: "layout-toggle",
|
|
2896
|
-
fn:
|
|
2897
|
-
|
|
2897
|
+
fn: v(() => [
|
|
2898
|
+
W((n(), _(H, {
|
|
2898
2899
|
icon: "table",
|
|
2899
|
-
onClick:
|
|
2900
|
+
onClick: w[5] || (w[5] = (S) => de(t(i)))
|
|
2900
2901
|
}, {
|
|
2901
|
-
default:
|
|
2902
|
-
D(
|
|
2902
|
+
default: v(() => [
|
|
2903
|
+
D(g(t(q)("change_layout", { capitalize: !0 })), 1)
|
|
2903
2904
|
]),
|
|
2904
2905
|
_: 1
|
|
2905
2906
|
})), [
|
|
2906
|
-
[
|
|
2907
|
+
[te]
|
|
2907
2908
|
])
|
|
2908
2909
|
]),
|
|
2909
2910
|
key: "1"
|
|
2910
2911
|
} : void 0,
|
|
2911
|
-
|
|
2912
|
-
name: `action-${
|
|
2913
|
-
fn:
|
|
2914
|
-
|
|
2912
|
+
E($e.value, (S, V) => ({
|
|
2913
|
+
name: `action-${V}`,
|
|
2914
|
+
fn: v(() => [
|
|
2915
|
+
S ? (n(), _(H, {
|
|
2915
2916
|
key: 0,
|
|
2916
|
-
icon:
|
|
2917
|
-
disabled: t(i).selected.length === 0 && "selection" in
|
|
2918
|
-
onClick: (
|
|
2917
|
+
icon: S.icon || "gear",
|
|
2918
|
+
disabled: t(i).selected.length === 0 && "selection" in S && S.selection,
|
|
2919
|
+
onClick: (R) => l.value(S)({ _id: t(i).selected.map((Z) => typeof Z == "string" || Z._id) })
|
|
2919
2920
|
}, {
|
|
2920
|
-
default:
|
|
2921
|
-
D(
|
|
2921
|
+
default: v(() => [
|
|
2922
|
+
D(g(t(q)(S.label, { capitalize: !0 })), 1)
|
|
2922
2923
|
]),
|
|
2923
2924
|
_: 2
|
|
2924
|
-
}, 1032, ["icon", "disabled", "onClick"])) :
|
|
2925
|
+
}, 1032, ["icon", "disabled", "onClick"])) : h("", !0)
|
|
2925
2926
|
])
|
|
2926
2927
|
}))
|
|
2927
|
-
]), 1024)) : Object.keys(t(i).description.filters || {}).length > 0 ? (n(),
|
|
2928
|
+
]), 1024)) : Object.keys(t(i).description.filters || {}).length > 0 ? (n(), _(ie, {
|
|
2928
2929
|
key: 1,
|
|
2929
2930
|
variant: "alt",
|
|
2930
2931
|
icon: "funnel",
|
|
2931
|
-
onClick:
|
|
2932
|
+
onClick: w[6] || (w[6] = (S) => o.value = !0)
|
|
2932
2933
|
}, {
|
|
2933
|
-
default:
|
|
2934
|
-
O("div", null,
|
|
2935
|
-
t(i).filtersCount ? (n(),
|
|
2936
|
-
default:
|
|
2937
|
-
D(
|
|
2934
|
+
default: v(() => [
|
|
2935
|
+
O("div", null, g(t(q)("Filters")), 1),
|
|
2936
|
+
t(i).filtersCount ? (n(), _(he, { key: 0 }, {
|
|
2937
|
+
default: v(() => [
|
|
2938
|
+
D(g(t(i).filtersCount), 1)
|
|
2938
2939
|
]),
|
|
2939
2940
|
_: 1
|
|
2940
|
-
})) :
|
|
2941
|
+
})) : h("", !0)
|
|
2941
2942
|
]),
|
|
2942
2943
|
_: 1
|
|
2943
|
-
})) :
|
|
2944
|
-
(n(!0), s(
|
|
2945
|
-
key: `action-${
|
|
2946
|
-
icon:
|
|
2947
|
-
disabled: t(i).selected.length === 0 && "selection" in
|
|
2948
|
-
onClick: (
|
|
2944
|
+
})) : h("", !0),
|
|
2945
|
+
(n(!0), s(G, null, E(t(i).actions.filter((S) => S.button), (S, V) => (n(), _(ie, {
|
|
2946
|
+
key: `action-${V}`,
|
|
2947
|
+
icon: S.icon,
|
|
2948
|
+
disabled: t(i).selected.length === 0 && "selection" in S && S.selection,
|
|
2949
|
+
onClick: (R) => l.value(S)({ _id: t(i).selected.map((Z) => typeof Z == "string" || Z._id) })
|
|
2949
2950
|
}, {
|
|
2950
|
-
default:
|
|
2951
|
-
D(
|
|
2951
|
+
default: v(() => [
|
|
2952
|
+
D(g(t(q)(S.label, { capitalize: !0 })), 1)
|
|
2952
2953
|
]),
|
|
2953
2954
|
_: 2
|
|
2954
2955
|
}, 1032, ["icon", "disabled", "onClick"]))), 128)),
|
|
2955
|
-
|
|
2956
|
+
T.$slots.actions ? C(T.$slots, "actions", { key: 2 }, void 0, !0) : h("", !0)
|
|
2956
2957
|
])
|
|
2957
|
-
])) :
|
|
2958
|
-
|
|
2959
|
-
t(i).itemsCount === 0 && !t(i).loading.getAll &&
|
|
2960
|
-
t(
|
|
2958
|
+
])) : h("", !0),
|
|
2959
|
+
W((n(), s("div", $o, [
|
|
2960
|
+
t(i).itemsCount === 0 && !t(i).loading.getAll && Y.value && (t(K) || T.$slots.empty) ? (n(), s("div", go, [
|
|
2961
|
+
t(K) ? (n(), _(pe(t(K)), le(M({ key: 0 }, {
|
|
2961
2962
|
collection: t(i).$id
|
|
2962
2963
|
})), {
|
|
2963
|
-
default:
|
|
2964
|
-
t(i).filtersCount === 0 && t(i).description.actions && "spawnAdd" in t(i).description.actions ? (n(),
|
|
2964
|
+
default: v(() => [
|
|
2965
|
+
t(i).filtersCount === 0 && t(i).description.actions && "spawnAdd" in t(i).description.actions ? (n(), _(ie, {
|
|
2965
2966
|
key: 0,
|
|
2966
2967
|
icon: "plus",
|
|
2967
|
-
onClick:
|
|
2968
|
+
onClick: w[7] || (w[7] = (S) => l.value({
|
|
2968
2969
|
action: "spawnAdd",
|
|
2969
2970
|
event: "spawnAdd"
|
|
2970
2971
|
})())
|
|
2971
2972
|
}, {
|
|
2972
|
-
default:
|
|
2973
|
-
D(
|
|
2973
|
+
default: v(() => [
|
|
2974
|
+
D(g(t(q)("add_first_item", { capitalize: !0 })), 1)
|
|
2974
2975
|
]),
|
|
2975
2976
|
_: 1
|
|
2976
|
-
})) :
|
|
2977
|
+
})) : h("", !0)
|
|
2977
2978
|
]),
|
|
2978
2979
|
_: 1
|
|
2979
|
-
}, 16)) : C(
|
|
2980
|
+
}, 16)) : C(T.$slots, "empty", le(M({ key: 1 }, {
|
|
2980
2981
|
collection: t(i).$id
|
|
2981
2982
|
})), void 0, !0)
|
|
2982
|
-
])) :
|
|
2983
|
+
])) : T.$slots.component ? C(T.$slots, "component", le(M({ key: 1 }, {
|
|
2983
2984
|
store: t(i)
|
|
2984
|
-
})), void 0, !0) : (n(),
|
|
2985
|
-
individualActions:
|
|
2985
|
+
})), void 0, !0) : (n(), _(pe(t(vo)(e.layout?.name || t(i).$currentLayout)), M({ key: 2 }, {
|
|
2986
|
+
individualActions: ue.value,
|
|
2986
2987
|
layoutOptions: e.layout?.options || t(i).layout.options,
|
|
2987
2988
|
componentProps: e.componentProps
|
|
2988
2989
|
}, {
|
|
2989
2990
|
"component-name": e.layout?.name || t(i).$currentLayout
|
|
2990
|
-
}),
|
|
2991
|
-
|
|
2992
|
-
name:
|
|
2993
|
-
fn:
|
|
2994
|
-
C(
|
|
2991
|
+
}), se({ _: 2 }, [
|
|
2992
|
+
E(Object.keys(T.$slots).filter((S) => S.startsWith("row-")), (S) => ({
|
|
2993
|
+
name: S,
|
|
2994
|
+
fn: v((V) => [
|
|
2995
|
+
C(T.$slots, S, le(be(V)), void 0, !0)
|
|
2995
2996
|
])
|
|
2996
2997
|
})),
|
|
2997
|
-
|
|
2998
|
+
T.$slots.tfoot ? {
|
|
2998
2999
|
name: "tfoot",
|
|
2999
|
-
fn:
|
|
3000
|
-
C(
|
|
3000
|
+
fn: v(() => [
|
|
3001
|
+
C(T.$slots, "tfoot", {}, void 0, !0)
|
|
3001
3002
|
]),
|
|
3002
3003
|
key: "0"
|
|
3003
3004
|
} : void 0
|
|
3004
3005
|
]), 1040, ["component-name"]))
|
|
3005
3006
|
])), [
|
|
3006
|
-
[P, (!t(
|
|
3007
|
+
[P, (!t(f) || $.value === Ke) && t(i).loading.getAll]
|
|
3007
3008
|
]),
|
|
3008
|
-
!t(
|
|
3009
|
-
|
|
3009
|
+
!t(f) && !e.noControls && !t(i).loading.getAll && t(i).itemsCount > 0 ? (n(), s("div", ko, [
|
|
3010
|
+
x(mn, {
|
|
3010
3011
|
pagination: t(i).pagination,
|
|
3011
|
-
onPaginate:
|
|
3012
|
+
onPaginate: j
|
|
3012
3013
|
}, null, 8, ["pagination"])
|
|
3013
|
-
])) :
|
|
3014
|
+
])) : h("", !0)
|
|
3014
3015
|
], 64);
|
|
3015
3016
|
};
|
|
3016
3017
|
}
|
|
3017
|
-
}), rl = /* @__PURE__ */
|
|
3018
|
+
}), rl = /* @__PURE__ */ F(Vo, [["__scopeId", "data-v-a7c27cdb"]]), Co = { class: "prompt" }, Oo = /* @__PURE__ */ z({
|
|
3018
3019
|
__name: "aeria-prompt",
|
|
3019
3020
|
props: {
|
|
3020
3021
|
title: {},
|
|
3021
3022
|
options: {}
|
|
3022
3023
|
},
|
|
3023
3024
|
setup(e) {
|
|
3024
|
-
const c =
|
|
3025
|
+
const c = ae("meta"), a = (o, l) => {
|
|
3025
3026
|
c.$actions.fulfillPrompt(o, l);
|
|
3026
3027
|
};
|
|
3027
|
-
return (o, l) => (n(),
|
|
3028
|
+
return (o, l) => (n(), _(Ce, {
|
|
3028
3029
|
float: "",
|
|
3029
3030
|
"fill-footer": "",
|
|
3030
3031
|
"close-hint": !1,
|
|
3031
3032
|
title: e.title,
|
|
3032
3033
|
style: { "--panel-min-width": "32rem" }
|
|
3033
3034
|
}, {
|
|
3034
|
-
footer:
|
|
3035
|
+
footer: v(() => [
|
|
3035
3036
|
O("div", {
|
|
3036
3037
|
class: "prompt__options",
|
|
3037
3038
|
style: ve(`grid-template-columns: repeat(${Object.keys(e.options).length}, 1fr)`)
|
|
3038
3039
|
}, [
|
|
3039
|
-
(n(!0), s(
|
|
3040
|
-
key: `option-${
|
|
3040
|
+
(n(!0), s(G, null, E(Object.entries(e.options), ([u, r], y) => (n(), _(me, {
|
|
3041
|
+
key: `option-${y}`,
|
|
3041
3042
|
class: U([
|
|
3042
3043
|
"prompt__option",
|
|
3043
3044
|
`prompt__option--${r.variant || "primary"}`
|
|
3044
3045
|
]),
|
|
3045
3046
|
onClick: (d) => r.click ? r.click(u, r) : a(u, r)
|
|
3046
3047
|
}, {
|
|
3047
|
-
default:
|
|
3048
|
-
D(
|
|
3048
|
+
default: v(() => [
|
|
3049
|
+
D(g(r.title), 1)
|
|
3049
3050
|
]),
|
|
3050
3051
|
_: 2
|
|
3051
3052
|
}, 1032, ["class", "onClick"]))), 128))
|
|
3052
3053
|
], 4)
|
|
3053
3054
|
]),
|
|
3054
|
-
default:
|
|
3055
|
+
default: v(() => [
|
|
3055
3056
|
O("div", Co, [
|
|
3056
3057
|
C(o.$slots, "default", {}, void 0, !0)
|
|
3057
3058
|
])
|
|
@@ -3059,7 +3060,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3059
3060
|
_: 3
|
|
3060
3061
|
}, 8, ["title"]));
|
|
3061
3062
|
}
|
|
3062
|
-
}), Ao = /* @__PURE__ */
|
|
3063
|
+
}), Ao = /* @__PURE__ */ F(Oo, [["__scopeId", "data-v-4cbfd28f"]]), Io = { class: "toast__content" }, Bo = { class: "toast__time" }, So = /* @__PURE__ */ z({
|
|
3063
3064
|
__name: "aeria-toast",
|
|
3064
3065
|
props: {
|
|
3065
3066
|
idx: {},
|
|
@@ -3068,10 +3069,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3068
3069
|
icon: {}
|
|
3069
3070
|
},
|
|
3070
3071
|
setup(e) {
|
|
3071
|
-
const c =
|
|
3072
|
+
const c = ae("meta");
|
|
3072
3073
|
return (a, o) => {
|
|
3073
|
-
const l =
|
|
3074
|
-
return
|
|
3074
|
+
const l = N("clickable");
|
|
3075
|
+
return W((n(), s("div", {
|
|
3075
3076
|
class: U({
|
|
3076
3077
|
toast: !0,
|
|
3077
3078
|
"toast--animate": t(c).toasts[0].itr === e.itr
|
|
@@ -3079,23 +3080,23 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3079
3080
|
onAnimationend: o[0] || (o[0] = (u) => t(c).$actions.popToast()),
|
|
3080
3081
|
onClick: o[1] || (o[1] = (u) => t(c).$actions.popToast(e.itr))
|
|
3081
3082
|
}, [
|
|
3082
|
-
|
|
3083
|
+
x(H, M(
|
|
3083
3084
|
e.icon ? { icon: e.icon } : { icon: "warning-circle" },
|
|
3084
3085
|
{ style: { "--icon-size": "4rem", "--icon-color": "var(--theme-brand-color-shade-3)" } }
|
|
3085
3086
|
), null, 16),
|
|
3086
3087
|
O("div", Io, [
|
|
3087
3088
|
C(a.$slots, "default", {}, void 0, !0),
|
|
3088
|
-
O("div", Bo,
|
|
3089
|
+
O("div", Bo, g(a.formatDateTime(e.date, { hoursOnly: !0 })), 1)
|
|
3089
3090
|
])
|
|
3090
3091
|
], 34)), [
|
|
3091
3092
|
[l]
|
|
3092
3093
|
]);
|
|
3093
3094
|
};
|
|
3094
3095
|
}
|
|
3095
|
-
}), wo = /* @__PURE__ */
|
|
3096
|
+
}), wo = /* @__PURE__ */ F(So, [["__scopeId", "data-v-606d47bf"]]), To = ["innerHTML"], jo = ["innerHTML"], Ro = { class: "main__toasts" }, qo = ["innerHTML"], Lo = /* @__PURE__ */ z({
|
|
3096
3097
|
__name: "aeria-main",
|
|
3097
3098
|
setup(e) {
|
|
3098
|
-
const c =
|
|
3099
|
+
const c = ae("meta"), a = Q(() => c.themeOverride || c.theme);
|
|
3099
3100
|
return (o, l) => {
|
|
3100
3101
|
const u = at("router-view");
|
|
3101
3102
|
return n(), s("main", {
|
|
@@ -3106,15 +3107,15 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3106
3107
|
{ dark: a.value === "dark" }
|
|
3107
3108
|
])
|
|
3108
3109
|
}, [
|
|
3109
|
-
(n(),
|
|
3110
|
-
default:
|
|
3111
|
-
o.$slots.default ? C(o.$slots, "default", { key: 0 }, void 0, !0) : (n(),
|
|
3112
|
-
default:
|
|
3113
|
-
(n(),
|
|
3114
|
-
|
|
3115
|
-
name:
|
|
3116
|
-
fn:
|
|
3117
|
-
C(o.$slots,
|
|
3110
|
+
(n(), _(ot, null, {
|
|
3111
|
+
default: v(() => [
|
|
3112
|
+
o.$slots.default ? C(o.$slots, "default", { key: 0 }, void 0, !0) : (n(), _(u, { key: 1 }, {
|
|
3113
|
+
default: v(({ Component: r }) => [
|
|
3114
|
+
(n(), _(pe(r), null, se({ _: 2 }, [
|
|
3115
|
+
E(Object.keys(o.$slots), (y) => ({
|
|
3116
|
+
name: y,
|
|
3117
|
+
fn: v(() => [
|
|
3118
|
+
C(o.$slots, y, {}, void 0, !0)
|
|
3118
3119
|
])
|
|
3119
3120
|
}))
|
|
3120
3121
|
]), 1024))
|
|
@@ -3124,7 +3125,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3124
3125
|
]),
|
|
3125
3126
|
_: 3
|
|
3126
3127
|
})),
|
|
3127
|
-
|
|
3128
|
+
x(Ce, M({
|
|
3128
3129
|
modelValue: t(c).modal.visible,
|
|
3129
3130
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => t(c).modal.visible = r),
|
|
3130
3131
|
float: "",
|
|
@@ -3133,31 +3134,31 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3133
3134
|
"overlay-layer": 70,
|
|
3134
3135
|
onOverlayClick: l[1] || (l[1] = (r) => t(c).modal.visible = !1)
|
|
3135
3136
|
}), {
|
|
3136
|
-
default:
|
|
3137
|
+
default: v(() => [
|
|
3137
3138
|
t(c).modal.body ? (n(), s("div", {
|
|
3138
3139
|
key: 0,
|
|
3139
3140
|
style: { "white-space": "pre-wrap" },
|
|
3140
3141
|
innerHTML: t(c).modal.body
|
|
3141
|
-
}, null, 8, To)) :
|
|
3142
|
-
t(c).modal.component ? (n(),
|
|
3142
|
+
}, null, 8, To)) : h("", !0),
|
|
3143
|
+
t(c).modal.component ? (n(), _(pe(t(c).modal.component), { key: 1 })) : h("", !0)
|
|
3143
3144
|
]),
|
|
3144
3145
|
_: 1
|
|
3145
3146
|
}, 16, ["modelValue"]),
|
|
3146
|
-
t(c).prompt.visible ? (n(),
|
|
3147
|
-
default:
|
|
3147
|
+
t(c).prompt.visible ? (n(), _(Ao, le(M({ key: 0 }, t(c).prompt)), {
|
|
3148
|
+
default: v(() => [
|
|
3148
3149
|
O("div", {
|
|
3149
3150
|
innerHTML: t(c).prompt.body
|
|
3150
3151
|
}, null, 8, jo)
|
|
3151
3152
|
]),
|
|
3152
3153
|
_: 1
|
|
3153
|
-
}, 16)) :
|
|
3154
|
+
}, 16)) : h("", !0),
|
|
3154
3155
|
O("div", Ro, [
|
|
3155
|
-
(n(!0), s(
|
|
3156
|
+
(n(!0), s(G, null, E(t(c).toasts, (r) => (n(), _(wo, M({ ref_for: !0 }, r, {
|
|
3156
3157
|
key: `toast-${r.itr}`
|
|
3157
3158
|
}), {
|
|
3158
|
-
default:
|
|
3159
|
+
default: v(() => [
|
|
3159
3160
|
O("div", {
|
|
3160
|
-
innerHTML: t(
|
|
3161
|
+
innerHTML: t(q)(r.text)
|
|
3161
3162
|
}, null, 8, qo)
|
|
3162
3163
|
]),
|
|
3163
3164
|
_: 2
|
|
@@ -3166,10 +3167,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3166
3167
|
], 2);
|
|
3167
3168
|
};
|
|
3168
3169
|
}
|
|
3169
|
-
}), ul = /* @__PURE__ */
|
|
3170
|
+
}), ul = /* @__PURE__ */ F(Lo, [["__scopeId", "data-v-19b147ab"]]), xo = {}, Mo = { class: "menu" };
|
|
3170
3171
|
function zo(e, c) {
|
|
3171
3172
|
return n(), s("menu", Mo, [
|
|
3172
|
-
(n(!0), s(
|
|
3173
|
+
(n(!0), s(G, null, E(Object.keys(e.$slots), (a) => (n(), s("div", {
|
|
3173
3174
|
key: a,
|
|
3174
3175
|
class: "menu__entry"
|
|
3175
3176
|
}, [
|
|
@@ -3177,7 +3178,7 @@ function zo(e, c) {
|
|
|
3177
3178
|
]))), 128))
|
|
3178
3179
|
]);
|
|
3179
3180
|
}
|
|
3180
|
-
const cl = /* @__PURE__ */
|
|
3181
|
+
const cl = /* @__PURE__ */ F(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb"]]), Eo = { class: "tabs" }, Fo = {
|
|
3181
3182
|
key: 0,
|
|
3182
3183
|
class: "tabs__horizontal"
|
|
3183
3184
|
}, Uo = {
|
|
@@ -3186,7 +3187,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3186
3187
|
}, Ho = ["onClick"], Do = {
|
|
3187
3188
|
key: 1,
|
|
3188
3189
|
class: "tabs__context-menu"
|
|
3189
|
-
}, Qo = ["onClick"], Go = /* @__PURE__ */
|
|
3190
|
+
}, Qo = ["onClick"], Go = /* @__PURE__ */ z({
|
|
3190
3191
|
__name: "aeria-tabs",
|
|
3191
3192
|
props: {
|
|
3192
3193
|
modelValue: {},
|
|
@@ -3196,7 +3197,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3196
3197
|
},
|
|
3197
3198
|
emits: ["update:modelValue", "change"],
|
|
3198
3199
|
setup(e, { emit: c }) {
|
|
3199
|
-
const a = e, o = c, l = lt(), u =
|
|
3200
|
+
const a = e, o = c, l = lt(), u = Ve(), r = Se(), y = Q(() => {
|
|
3200
3201
|
if (a.modelValue)
|
|
3201
3202
|
return a.modelValue;
|
|
3202
3203
|
if (a.query) {
|
|
@@ -3221,49 +3222,49 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3221
3222
|
})), o("change", m), o("update:modelValue", m);
|
|
3222
3223
|
};
|
|
3223
3224
|
return (m, p) => {
|
|
3224
|
-
const
|
|
3225
|
+
const b = N("clickable");
|
|
3225
3226
|
return n(), s("div", Eo, [
|
|
3226
3227
|
t(r).md && !e.dropdown ? (n(), s("div", Fo, [
|
|
3227
3228
|
m.$slots.default ? (n(), s("div", Uo, [
|
|
3228
3229
|
C(m.$slots, "default", {}, void 0, !0)
|
|
3229
|
-
])) :
|
|
3230
|
-
(n(!0), s(
|
|
3231
|
-
key:
|
|
3230
|
+
])) : h("", !0),
|
|
3231
|
+
(n(!0), s(G, null, E(Object.keys(m.$slots).filter((f) => f !== "default"), (f, i) => (n(), s("div", {
|
|
3232
|
+
key: f,
|
|
3232
3233
|
class: U({
|
|
3233
3234
|
tabs__tab: !0,
|
|
3234
|
-
"tabs__tab--current":
|
|
3235
|
+
"tabs__tab--current": f === y.value || !y.value && i === 0
|
|
3235
3236
|
}),
|
|
3236
|
-
onClick: (
|
|
3237
|
+
onClick: (k) => d(f)
|
|
3237
3238
|
}, [
|
|
3238
|
-
C(m.$slots,
|
|
3239
|
+
C(m.$slots, f, {}, void 0, !0)
|
|
3239
3240
|
], 10, Ho))), 128))
|
|
3240
3241
|
])) : (n(), s("div", Do, [
|
|
3241
|
-
|
|
3242
|
-
default:
|
|
3243
|
-
|
|
3242
|
+
x(ke, null, se({
|
|
3243
|
+
default: v(({ visible: f }) => [
|
|
3244
|
+
W((n(), _(H, {
|
|
3244
3245
|
"icon-right": "",
|
|
3245
|
-
active:
|
|
3246
|
+
active: f,
|
|
3246
3247
|
icon: "caret-down",
|
|
3247
3248
|
style: { "--icon-color": "var(--theme-brand-color-shade-1)" },
|
|
3248
3249
|
class: "tabs__context-menu-icon"
|
|
3249
3250
|
}, {
|
|
3250
|
-
default:
|
|
3251
|
-
C(m.$slots,
|
|
3251
|
+
default: v(() => [
|
|
3252
|
+
C(m.$slots, y.value, {}, void 0, !0)
|
|
3252
3253
|
]),
|
|
3253
3254
|
_: 3
|
|
3254
3255
|
}, 8, ["active"])), [
|
|
3255
|
-
[
|
|
3256
|
+
[b]
|
|
3256
3257
|
])
|
|
3257
3258
|
]),
|
|
3258
3259
|
_: 2
|
|
3259
3260
|
}, [
|
|
3260
|
-
|
|
3261
|
-
name:
|
|
3262
|
-
fn:
|
|
3261
|
+
E(Object.keys(m.$slots).filter((f) => f !== "default"), (f) => ({
|
|
3262
|
+
name: f,
|
|
3263
|
+
fn: v(() => [
|
|
3263
3264
|
O("div", {
|
|
3264
|
-
onClick: (
|
|
3265
|
+
onClick: (i) => d(f)
|
|
3265
3266
|
}, [
|
|
3266
|
-
C(m.$slots,
|
|
3267
|
+
C(m.$slots, f, {}, void 0, !0)
|
|
3267
3268
|
], 8, Qo)
|
|
3268
3269
|
])
|
|
3269
3270
|
}))
|
|
@@ -3272,68 +3273,68 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3272
3273
|
]);
|
|
3273
3274
|
};
|
|
3274
3275
|
}
|
|
3275
|
-
}), Wo = /* @__PURE__ */
|
|
3276
|
+
}), Wo = /* @__PURE__ */ F(Go, [["__scopeId", "data-v-35168958"]]), Yo = z({
|
|
3276
3277
|
props: {
|
|
3277
3278
|
initialValue: String,
|
|
3278
3279
|
promise: Promise
|
|
3279
3280
|
},
|
|
3280
3281
|
setup(e) {
|
|
3281
|
-
const c =
|
|
3282
|
+
const c = J(e.initialValue);
|
|
3282
3283
|
return e.promise instanceof Promise && e.promise.then((a) => {
|
|
3283
3284
|
c.value = a;
|
|
3284
3285
|
}), () => it("div", String(c.value));
|
|
3285
3286
|
}
|
|
3286
|
-
}), Ko = ["onClick"], Xo = { key: 1 }, Jo = /* @__PURE__ */
|
|
3287
|
+
}), Ko = ["onClick"], Xo = { key: 1 }, Jo = /* @__PURE__ */ z({
|
|
3287
3288
|
__name: "aeria-crud-topbar",
|
|
3288
3289
|
props: {
|
|
3289
3290
|
collection: {}
|
|
3290
3291
|
},
|
|
3291
3292
|
setup(e) {
|
|
3292
|
-
const c = e, o =
|
|
3293
|
-
const { error: m, result: p } = await d.$functions[
|
|
3294
|
-
filters:
|
|
3293
|
+
const c = e, o = Ve().currentRoute, l = De(), u = Q(() => c.collection ? Ae(c.collection, l) : typeof o.value.meta.collection == "string" ? Ae(o.value.meta.collection, l) : typeof o.value.params.collection == "string" ? Ae(o.value.params.collection, l) : null), r = async (y, d) => {
|
|
3294
|
+
const { error: m, result: p } = await d.$functions[y.badgeFunction]({
|
|
3295
|
+
filters: y.filters
|
|
3295
3296
|
});
|
|
3296
3297
|
return m ? 0 : p;
|
|
3297
3298
|
};
|
|
3298
|
-
return (
|
|
3299
|
+
return (y, d) => u.value && u.value.description.filtersPresets ? (n(), _(Wo, {
|
|
3299
3300
|
key: 0,
|
|
3300
3301
|
dropdown: "",
|
|
3301
3302
|
query: "section"
|
|
3302
|
-
},
|
|
3303
|
-
|
|
3303
|
+
}, se({ _: 2 }, [
|
|
3304
|
+
E(Object.entries(u.value.description.filtersPresets), ([m, p]) => ({
|
|
3304
3305
|
name: m,
|
|
3305
|
-
fn:
|
|
3306
|
+
fn: v(() => [
|
|
3306
3307
|
O("div", {
|
|
3307
3308
|
class: "topbar__preset",
|
|
3308
|
-
onClick: (
|
|
3309
|
+
onClick: (b) => t(Pe)(p, u.value)
|
|
3309
3310
|
}, [
|
|
3310
|
-
p.icon ? (n(),
|
|
3311
|
+
p.icon ? (n(), _(H, {
|
|
3311
3312
|
key: 0,
|
|
3312
3313
|
icon: p.icon
|
|
3313
3314
|
}, {
|
|
3314
|
-
default:
|
|
3315
|
-
D(
|
|
3315
|
+
default: v(() => [
|
|
3316
|
+
D(g(p.label || t(q)(m, { plural: !0 })), 1)
|
|
3316
3317
|
]),
|
|
3317
3318
|
_: 2
|
|
3318
|
-
}, 1032, ["icon"])) : (n(), s("div", Xo,
|
|
3319
|
-
p.badgeFunction ? (n(),
|
|
3320
|
-
default:
|
|
3321
|
-
|
|
3319
|
+
}, 1032, ["icon"])) : (n(), s("div", Xo, g(p.label || t(q)(m, { plural: !0 })), 1)),
|
|
3320
|
+
p.badgeFunction ? (n(), _(he, { key: 2 }, {
|
|
3321
|
+
default: v(() => [
|
|
3322
|
+
x(t(Yo), {
|
|
3322
3323
|
"initial-value": "0",
|
|
3323
3324
|
promise: r(p, u.value)
|
|
3324
3325
|
}, null, 8, ["promise"])
|
|
3325
3326
|
]),
|
|
3326
3327
|
_: 2
|
|
3327
|
-
}, 1024)) :
|
|
3328
|
+
}, 1024)) : h("", !0)
|
|
3328
3329
|
], 8, Ko)
|
|
3329
3330
|
])
|
|
3330
3331
|
}))
|
|
3331
|
-
]), 1024)) :
|
|
3332
|
+
]), 1024)) : h("", !0);
|
|
3332
3333
|
}
|
|
3333
|
-
}), Zo = /* @__PURE__ */
|
|
3334
|
+
}), Zo = /* @__PURE__ */ F(Jo, [["__scopeId", "data-v-f0a45677"]]), Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3334
3335
|
__proto__: null,
|
|
3335
3336
|
default: Zo
|
|
3336
|
-
}, Symbol.toStringTag, { value: "Module" })), dl = /* @__PURE__ */
|
|
3337
|
+
}, Symbol.toStringTag, { value: "Module" })), dl = /* @__PURE__ */ z({
|
|
3337
3338
|
__name: "aeria-password-form",
|
|
3338
3339
|
props: {
|
|
3339
3340
|
modelValue: {}
|
|
@@ -3342,11 +3343,11 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3342
3343
|
setup(e) {
|
|
3343
3344
|
const c = e;
|
|
3344
3345
|
fe(Te, null);
|
|
3345
|
-
const a = yt(), o =
|
|
3346
|
+
const a = yt(), o = Q(() => a(
|
|
3346
3347
|
c.modelValue.password,
|
|
3347
3348
|
c.modelValue.confirmation
|
|
3348
3349
|
));
|
|
3349
|
-
return (l, u) => (n(),
|
|
3350
|
+
return (l, u) => (n(), _(Me, {
|
|
3350
3351
|
form: {
|
|
3351
3352
|
password: {
|
|
3352
3353
|
type: "string",
|
|
@@ -3362,9 +3363,9 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3362
3363
|
"model-value": e.modelValue,
|
|
3363
3364
|
"onUpdate:modelValue": u[0] || (u[0] = (r) => l.$emit("update:modelValue", r))
|
|
3364
3365
|
}, {
|
|
3365
|
-
after:
|
|
3366
|
-
O("div", null,
|
|
3367
|
-
C(l.$slots, "default",
|
|
3366
|
+
after: v(() => [
|
|
3367
|
+
O("div", null, g(o.value || "Senhas conferem"), 1),
|
|
3368
|
+
C(l.$slots, "default", le(be({ passwordError: o.value })))
|
|
3368
3369
|
]),
|
|
3369
3370
|
_: 3
|
|
3370
3371
|
}, 8, ["model-value"]));
|
|
@@ -3387,7 +3388,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3387
3388
|
{
|
|
3388
3389
|
path: "signin",
|
|
3389
3390
|
name: "/user/signin",
|
|
3390
|
-
component: () => import("./signin-
|
|
3391
|
+
component: () => import("./signin-jTtR2rrj.js"),
|
|
3391
3392
|
meta: {
|
|
3392
3393
|
title: "Sign in"
|
|
3393
3394
|
}
|
|
@@ -3395,7 +3396,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3395
3396
|
{
|
|
3396
3397
|
path: "signup",
|
|
3397
3398
|
name: "/user/signup",
|
|
3398
|
-
component: () => import("./signup-
|
|
3399
|
+
component: () => import("./signup-D6p-6GUk.js"),
|
|
3399
3400
|
meta: {
|
|
3400
3401
|
title: "Sign up"
|
|
3401
3402
|
}
|
|
@@ -3403,7 +3404,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3403
3404
|
{
|
|
3404
3405
|
path: "redefine-password",
|
|
3405
3406
|
name: "/user/redefine-password",
|
|
3406
|
-
component: () => import("./redefine-password-
|
|
3407
|
+
component: () => import("./redefine-password-OWTBmv_n.js"),
|
|
3407
3408
|
meta: {
|
|
3408
3409
|
title: "Redefine password"
|
|
3409
3410
|
}
|
|
@@ -3411,7 +3412,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3411
3412
|
{
|
|
3412
3413
|
path: "activation",
|
|
3413
3414
|
name: "/user/activation",
|
|
3414
|
-
component: () => import("./activation-
|
|
3415
|
+
component: () => import("./activation-CLXo0wHA.js"),
|
|
3415
3416
|
meta: {
|
|
3416
3417
|
title: "Activate user"
|
|
3417
3418
|
}
|
|
@@ -3433,7 +3434,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3433
3434
|
name: "/dashboard/:collection",
|
|
3434
3435
|
props: !0,
|
|
3435
3436
|
components: {
|
|
3436
|
-
default: () => import("./index-
|
|
3437
|
+
default: () => import("./index-JX6_Czwf.js"),
|
|
3437
3438
|
topbar: () => Promise.resolve().then(() => Po)
|
|
3438
3439
|
},
|
|
3439
3440
|
meta: {
|
|
@@ -3447,7 +3448,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3447
3448
|
name: "/dashboard/:collection/:id",
|
|
3448
3449
|
props: !0,
|
|
3449
3450
|
components: {
|
|
3450
|
-
default: () => import("./_id_-
|
|
3451
|
+
default: () => import("./_id_-DPG7xMYl.js")
|
|
3451
3452
|
},
|
|
3452
3453
|
meta: {
|
|
3453
3454
|
title: ({ collectionName: a, t: o }) => o(a, {
|
|
@@ -3467,7 +3468,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3467
3468
|
children: [
|
|
3468
3469
|
{
|
|
3469
3470
|
path: "profile",
|
|
3470
|
-
component: () => import("./index-
|
|
3471
|
+
component: () => import("./index-RW5CFKuw.js"),
|
|
3471
3472
|
meta: {
|
|
3472
3473
|
title: "User profile",
|
|
3473
3474
|
icon: "user-square"
|
|
@@ -3476,7 +3477,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3476
3477
|
{
|
|
3477
3478
|
path: "changepass",
|
|
3478
3479
|
name: "/dashboard/user/changepass",
|
|
3479
|
-
component: () => import("./index-
|
|
3480
|
+
component: () => import("./index-CusjJ6zi.js"),
|
|
3480
3481
|
meta: {
|
|
3481
3482
|
title: "Change password",
|
|
3482
3483
|
icon: "lock"
|
|
@@ -3495,8 +3496,8 @@ export {
|
|
|
3495
3496
|
Zo as F,
|
|
3496
3497
|
ml as G,
|
|
3497
3498
|
pl as H,
|
|
3498
|
-
|
|
3499
|
-
|
|
3499
|
+
F as _,
|
|
3500
|
+
ie as a,
|
|
3500
3501
|
H as b,
|
|
3501
3502
|
dl as c,
|
|
3502
3503
|
_n as d,
|
|
@@ -3504,12 +3505,12 @@ export {
|
|
|
3504
3505
|
Oa as f,
|
|
3505
3506
|
Le as g,
|
|
3506
3507
|
cl as h,
|
|
3507
|
-
|
|
3508
|
+
Ce as i,
|
|
3508
3509
|
sl as j,
|
|
3509
3510
|
he as k,
|
|
3510
|
-
|
|
3511
|
+
me as l,
|
|
3511
3512
|
zt as m,
|
|
3512
|
-
|
|
3513
|
+
ke as n,
|
|
3513
3514
|
uo as o,
|
|
3514
3515
|
Ca as p,
|
|
3515
3516
|
Xt as q,
|