@aeria-ui/ui 0.0.212 → 0.0.214
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_-CbIlBY7C.js → _id_-ZT5eej1c.js} +1 -1
- package/dist/{activation-BUcgx1NN.js → activation-D1ht_hKa.js} +1 -1
- package/dist/{index-B3QY_pg3.js → index-CLSjtiAu.js} +1 -1
- package/dist/{index-74Th-7AC.js → index-CUdhhNK5.js} +1 -1
- package/dist/{index-B12lIUzf.js → index-CV767I62.js} +1093 -1093
- package/dist/index-NtfHe2xW.js +30 -0
- package/dist/{redefine-password-CtYxz6zi.js → redefine-password-208LbEV-.js} +1 -1
- package/dist/{signin-CtlSKUPp.js → signin-D4zaaucx.js} +1 -1
- package/dist/{signup-BRS21QG1.js → signup-Cckhu8jM.js} +1 -1
- package/dist/ui.css +1 -1
- package/dist/ui.js +1 -1
- package/package.json +5 -5
- package/dist/index-DzC5Stu6.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,263 @@ 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
|
-
innerHTML:
|
|
1820
|
-
}, null, 8, da)) :
|
|
1821
|
-
])) :
|
|
1822
|
-
|
|
1819
|
+
innerHTML: L.hint
|
|
1820
|
+
}, null, 8, da)) : h("", !0)
|
|
1821
|
+
])) : h("", !0),
|
|
1822
|
+
V.$slots[`field-${I}`] ? C(V.$slots, `field-${I}`, M({
|
|
1823
1823
|
key: 1,
|
|
1824
1824
|
ref_for: !0
|
|
1825
1825
|
}, {
|
|
1826
|
-
readOnly: t(
|
|
1827
|
-
property:
|
|
1828
|
-
propertyName:
|
|
1826
|
+
readOnly: t(y),
|
|
1827
|
+
property: L,
|
|
1828
|
+
propertyName: I,
|
|
1829
1829
|
modelValue: e.modelValue
|
|
1830
|
-
}), void 0, !0) : e.layout?.fields?.[
|
|
1830
|
+
}), 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
1831
|
key: 2,
|
|
1832
|
-
modelValue: e.modelValue[
|
|
1833
|
-
"onUpdate:modelValue": (
|
|
1832
|
+
modelValue: e.modelValue[I],
|
|
1833
|
+
"onUpdate:modelValue": (X) => e.modelValue[I] = X
|
|
1834
1834
|
}, { ref_for: !0 }, {
|
|
1835
|
-
readOnly: t(
|
|
1836
|
-
property:
|
|
1837
|
-
propertyName:
|
|
1838
|
-
required: !e.searchOnly && (!
|
|
1839
|
-
...e.layout.fields[
|
|
1835
|
+
readOnly: t(y),
|
|
1836
|
+
property: L,
|
|
1837
|
+
propertyName: I,
|
|
1838
|
+
required: !e.searchOnly && (!w.value || t(je)(I, w.value, e.modelValue)),
|
|
1839
|
+
...e.layout.fields[I].component.props || {}
|
|
1840
1840
|
}, {
|
|
1841
|
-
onInput: (
|
|
1842
|
-
onChange:
|
|
1843
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in
|
|
1841
|
+
onInput: (X) => l("input", I),
|
|
1842
|
+
onChange: R[0] || (R[0] = (X) => l("change", X))
|
|
1843
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in L && ["date", "date-time"].includes(L.format) && e.searchOnly ? (n(), s("div", {
|
|
1844
1844
|
key: 3,
|
|
1845
1845
|
style: { display: "grid", "grid-template-columns": "repeat(2, 1fr)", "column-gap": "1rem" },
|
|
1846
|
-
onInput: (
|
|
1847
|
-
onChange:
|
|
1846
|
+
onInput: (X) => l("input", I),
|
|
1847
|
+
onChange: R[1] || (R[1] = (X) => l("change", X))
|
|
1848
1848
|
}, [
|
|
1849
|
-
|
|
1850
|
-
modelValue: e.modelValue[
|
|
1851
|
-
"onUpdate:modelValue": (
|
|
1849
|
+
x(_e, M({
|
|
1850
|
+
modelValue: e.modelValue[I].$gte,
|
|
1851
|
+
"onUpdate:modelValue": (X) => e.modelValue[I].$gte = X
|
|
1852
1852
|
}, { ref_for: !0 }, {
|
|
1853
|
-
property:
|
|
1854
|
-
propertyName:
|
|
1853
|
+
property: L,
|
|
1854
|
+
propertyName: I
|
|
1855
1855
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]),
|
|
1856
|
-
|
|
1857
|
-
modelValue: e.modelValue[
|
|
1858
|
-
"onUpdate:modelValue": (
|
|
1856
|
+
x(_e, M({
|
|
1857
|
+
modelValue: e.modelValue[I].$lte,
|
|
1858
|
+
"onUpdate:modelValue": (X) => e.modelValue[I].$lte = X
|
|
1859
1859
|
}, { ref_for: !0 }, {
|
|
1860
|
-
property:
|
|
1861
|
-
propertyName:
|
|
1860
|
+
property: L,
|
|
1861
|
+
propertyName: I
|
|
1862
1862
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
1863
|
-
], 40, ma)) : "type" in
|
|
1864
|
-
|
|
1865
|
-
property:
|
|
1866
|
-
propertyName:
|
|
1863
|
+
], 40, ma)) : "type" in L && L.type === "boolean" && e.searchOnly ? (n(), s("div", pa, [
|
|
1864
|
+
x(Qe, M({ ref_for: !0 }, {
|
|
1865
|
+
property: L,
|
|
1866
|
+
propertyName: I
|
|
1867
1867
|
}, {
|
|
1868
1868
|
"boolean-ref": "",
|
|
1869
|
-
"model-value": e.modelValue[
|
|
1870
|
-
onChange:
|
|
1871
|
-
"onUpdate:modelValue": (
|
|
1872
|
-
e.modelValue[
|
|
1869
|
+
"model-value": e.modelValue[I],
|
|
1870
|
+
onChange: R[2] || (R[2] = (X) => l("change", X)),
|
|
1871
|
+
"onUpdate:modelValue": (X) => {
|
|
1872
|
+
e.modelValue[I] = X;
|
|
1873
1873
|
}
|
|
1874
1874
|
}), {
|
|
1875
|
-
default:
|
|
1876
|
-
O("option", fa,
|
|
1877
|
-
O("option", va,
|
|
1875
|
+
default: v(() => [
|
|
1876
|
+
O("option", fa, g(t(q)("yes")), 1),
|
|
1877
|
+
O("option", va, g(t(q)("no")), 1)
|
|
1878
1878
|
]),
|
|
1879
1879
|
_: 1
|
|
1880
1880
|
}, 16, ["model-value", "onUpdate:modelValue"])
|
|
1881
|
-
])) : e.modelValue && "items" in
|
|
1882
|
-
t(
|
|
1883
|
-
|
|
1881
|
+
])) : e.modelValue && "items" in L && !L.uniqueItems && (!("$ref" in L.items) || L.items.inline) ? (n(), s("div", ya, [
|
|
1882
|
+
t(y) ? h("", !0) : (n(), s("div", ha, [
|
|
1883
|
+
x(ie, {
|
|
1884
1884
|
small: "",
|
|
1885
1885
|
variant: "alt",
|
|
1886
1886
|
icon: "plus",
|
|
1887
|
-
disabled: !("inline" in
|
|
1888
|
-
onClick: Ie((
|
|
1889
|
-
e.modelValue[
|
|
1887
|
+
disabled: !("inline" in L.items && L.items.inline) && (e.modelValue[I]?.length >= L.maxItems || T(e.modelValue[I]?.[e.modelValue[I]?.length - 1])),
|
|
1888
|
+
onClick: Ie((X) => {
|
|
1889
|
+
e.modelValue[I] || (e.modelValue[I] = []), t(ia)(e.modelValue[I], L, t(a));
|
|
1890
1890
|
}, ["prevent"])
|
|
1891
1891
|
}, {
|
|
1892
|
-
default:
|
|
1893
|
-
D(
|
|
1892
|
+
default: v(() => [
|
|
1893
|
+
D(g(t(q)("action.add", { capitalize: !0 })), 1)
|
|
1894
1894
|
]),
|
|
1895
1895
|
_: 1
|
|
1896
1896
|
}, 8, ["disabled", "onClick"])
|
|
1897
1897
|
])),
|
|
1898
|
-
e.modelValue[
|
|
1899
|
-
(n(!0), s(
|
|
1900
|
-
key: `rep-${
|
|
1898
|
+
e.modelValue[I]?.length > 0 ? (n(), s("div", ba, [
|
|
1899
|
+
(n(!0), s(G, null, E(e.modelValue[I], (X, ye) => (n(), s("div", {
|
|
1900
|
+
key: `rep-${I}-${t($t)(X, ye)}`,
|
|
1901
1901
|
class: "form__array-item"
|
|
1902
1902
|
}, [
|
|
1903
|
-
t(
|
|
1903
|
+
t(y) ? h("", !0) : W((n(), _(H, {
|
|
1904
1904
|
key: 0,
|
|
1905
1905
|
icon: "trash",
|
|
1906
1906
|
class: "form__array-remove",
|
|
1907
|
-
onClick: Ie((
|
|
1907
|
+
onClick: Ie((Oe) => t(sa)(e.modelValue[I], ye), ["prevent"])
|
|
1908
1908
|
}, {
|
|
1909
|
-
default:
|
|
1910
|
-
D(
|
|
1909
|
+
default: v(() => [
|
|
1910
|
+
D(g(t(q)("action.remove", { capitalize: !0 })), 1)
|
|
1911
1911
|
]),
|
|
1912
1912
|
_: 1
|
|
1913
1913
|
}, 8, ["onClick"])), [
|
|
1914
|
-
[
|
|
1914
|
+
[Z]
|
|
1915
1915
|
]),
|
|
1916
|
-
(n(),
|
|
1917
|
-
modelValue: e.modelValue[
|
|
1918
|
-
"onUpdate:modelValue": (
|
|
1916
|
+
(n(), _(pe(t(We)(L, t(k))), M({
|
|
1917
|
+
modelValue: e.modelValue[I][ye],
|
|
1918
|
+
"onUpdate:modelValue": (Oe) => e.modelValue[I][ye] = Oe
|
|
1919
1919
|
}, { ref_for: !0 }, {
|
|
1920
|
-
readOnly: t(
|
|
1921
|
-
property:
|
|
1922
|
-
propertyName:
|
|
1920
|
+
readOnly: t(y),
|
|
1921
|
+
property: L.items,
|
|
1922
|
+
propertyName: I,
|
|
1923
1923
|
parentCollection: t(r),
|
|
1924
1924
|
parentPropertyName: e.parentPropertyName,
|
|
1925
|
-
required: !e.searchOnly && (!
|
|
1926
|
-
validationErrors:
|
|
1927
|
-
...
|
|
1925
|
+
required: !e.searchOnly && (!w.value || t(je)(I, w.value, e.modelValue)),
|
|
1926
|
+
validationErrors: P(I, ye),
|
|
1927
|
+
...L.componentProps || {}
|
|
1928
1928
|
}, {
|
|
1929
|
-
onInput: (
|
|
1930
|
-
onChange:
|
|
1929
|
+
onInput: (Oe) => l("input", I),
|
|
1930
|
+
onChange: R[3] || (R[3] = (Oe) => l("change", Oe))
|
|
1931
1931
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"]))
|
|
1932
1932
|
]))), 128))
|
|
1933
|
-
])) :
|
|
1934
|
-
])) : e.modelValue ?
|
|
1933
|
+
])) : h("", !0)
|
|
1934
|
+
])) : e.modelValue ? W((n(), _(pe(t(We)(L, t(k))), M({
|
|
1935
1935
|
key: 6,
|
|
1936
|
-
modelValue: e.modelValue[
|
|
1937
|
-
"onUpdate:modelValue": (
|
|
1936
|
+
modelValue: e.modelValue[I],
|
|
1937
|
+
"onUpdate:modelValue": (X) => e.modelValue[I] = X
|
|
1938
1938
|
}, { ref_for: !0 }, {
|
|
1939
|
-
readOnly: t(
|
|
1940
|
-
property:
|
|
1941
|
-
propertyName:
|
|
1939
|
+
readOnly: t(y),
|
|
1940
|
+
property: L,
|
|
1941
|
+
propertyName: I,
|
|
1942
1942
|
parentPropertyName: e.parentPropertyName,
|
|
1943
1943
|
parentCollection: t(r),
|
|
1944
|
-
required: !e.searchOnly && (!
|
|
1945
|
-
...
|
|
1946
|
-
validationErrors:
|
|
1944
|
+
required: !e.searchOnly && (!w.value || t(je)(I, w.value, e.modelValue)),
|
|
1945
|
+
...L.componentProps || {},
|
|
1946
|
+
validationErrors: P(I)
|
|
1947
1947
|
}, {
|
|
1948
|
-
onInput: (
|
|
1949
|
-
onChange:
|
|
1950
|
-
onClipboardCopy:
|
|
1948
|
+
onInput: (X) => l("input", I),
|
|
1949
|
+
onChange: R[4] || (R[4] = (X) => l("change", X)),
|
|
1950
|
+
onClipboardCopy: R[5] || (R[5] = (X) => l("clipboardCopy", X))
|
|
1951
1951
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])), [
|
|
1952
|
-
[
|
|
1953
|
-
]) :
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
])) :
|
|
1952
|
+
[oe, S(L)]
|
|
1953
|
+
]) : h("", !0),
|
|
1954
|
+
i.value?.[I] ? (n(), s("div", _a, [
|
|
1955
|
+
i.value[I].type ? (n(), s("span", $a, g(t(q)(`validation_error.${i.value[I].type}`)), 1)) : h("", !0),
|
|
1956
|
+
i.value[I].detail ? (n(), s("span", ga, g(t(q)(i.value[I].detail)), 1)) : h("", !0)
|
|
1957
|
+
])) : h("", !0)
|
|
1958
1958
|
], 6))), 128))
|
|
1959
1959
|
]),
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
C(
|
|
1963
|
-
isInsertReady:
|
|
1960
|
+
V.$slots.after ? C(V.$slots, "after", { key: 1 }, void 0, !0) : h("", !0),
|
|
1961
|
+
V.$slots.footer ? (n(), s("div", ka, [
|
|
1962
|
+
C(V.$slots, "footer", le(be({
|
|
1963
|
+
isInsertReady: te.value
|
|
1964
1964
|
})), void 0, !0)
|
|
1965
|
-
])) :
|
|
1965
|
+
])) : h("", !0)
|
|
1966
1966
|
], 4);
|
|
1967
1967
|
};
|
|
1968
1968
|
}
|
|
1969
|
-
}), Me = /* @__PURE__ */
|
|
1969
|
+
}), Me = /* @__PURE__ */ F(Va, [["__scopeId", "data-v-017664ad"]]), Ca = /* @__PURE__ */ z({
|
|
1970
1970
|
__name: "aeria-filter-panel",
|
|
1971
1971
|
emits: ["update:modelValue"],
|
|
1972
1972
|
setup(e, { emit: c }) {
|
|
1973
|
-
const a = c, o = xe(), l =
|
|
1973
|
+
const a = c, o = xe(), l = Ve(), u = t(ce(Te)), r = () => {
|
|
1974
1974
|
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
1975
|
const m = l.currentRoute.query;
|
|
1976
1976
|
for (const p of Object.keys(m))
|
|
1977
1977
|
p.startsWith(`${u}.`) && delete m[p];
|
|
1978
1978
|
}
|
|
1979
|
-
const { query:
|
|
1979
|
+
const { query: y, ...d } = l.currentRoute.value;
|
|
1980
1980
|
l.push(Be(d, {
|
|
1981
1981
|
query: mt(o)
|
|
1982
1982
|
}));
|
|
1983
1983
|
};
|
|
1984
|
-
return (
|
|
1984
|
+
return (y, d) => (n(), _(Ce, {
|
|
1985
1985
|
"close-hint": "",
|
|
1986
1986
|
"fixed-right": "",
|
|
1987
|
-
title:
|
|
1987
|
+
title: y.t("filter_by", { capitalize: !0 }),
|
|
1988
1988
|
onClose: d[2] || (d[2] = (m) => a("update:modelValue", !1)),
|
|
1989
1989
|
onOverlayClick: d[3] || (d[3] = (m) => a("update:modelValue", !1))
|
|
1990
1990
|
}, {
|
|
1991
|
-
footer:
|
|
1992
|
-
t(o).filtersCount > 0 ? (n(),
|
|
1991
|
+
footer: v(() => [
|
|
1992
|
+
t(o).filtersCount > 0 ? (n(), _(ie, {
|
|
1993
1993
|
key: 0,
|
|
1994
1994
|
variant: "transparent",
|
|
1995
1995
|
onClick: d[1] || (d[1] = (m) => {
|
|
1996
1996
|
t(o).$actions.clearFilters(), r(), a("update:modelValue", !1);
|
|
1997
1997
|
})
|
|
1998
1998
|
}, {
|
|
1999
|
-
default:
|
|
2000
|
-
D(
|
|
2001
|
-
|
|
2002
|
-
default:
|
|
2003
|
-
D(
|
|
1999
|
+
default: v(() => [
|
|
2000
|
+
D(g(y.t("action.clear", { capitalize: !0 })) + " ", 1),
|
|
2001
|
+
x(he, null, {
|
|
2002
|
+
default: v(() => [
|
|
2003
|
+
D(g(t(o).filtersCount), 1)
|
|
2004
2004
|
]),
|
|
2005
2005
|
_: 1
|
|
2006
2006
|
})
|
|
2007
2007
|
]),
|
|
2008
2008
|
_: 1
|
|
2009
|
-
})) :
|
|
2010
|
-
|
|
2009
|
+
})) : h("", !0),
|
|
2010
|
+
x(ie, {
|
|
2011
2011
|
large: "",
|
|
2012
2012
|
icon: "funnel",
|
|
2013
2013
|
disabled: !t(o).hasActiveFilters,
|
|
2014
2014
|
onClick: r
|
|
2015
2015
|
}, {
|
|
2016
|
-
default:
|
|
2017
|
-
D(
|
|
2016
|
+
default: v(() => [
|
|
2017
|
+
D(g(y.t("action.filter", { capitalize: !0 })), 1)
|
|
2018
2018
|
]),
|
|
2019
2019
|
_: 1
|
|
2020
2020
|
}, 8, ["disabled"])
|
|
2021
2021
|
]),
|
|
2022
|
-
default:
|
|
2023
|
-
|
|
2022
|
+
default: v(() => [
|
|
2023
|
+
x(Me, M({
|
|
2024
2024
|
modelValue: t(o).filters,
|
|
2025
2025
|
"onUpdate:modelValue": d[0] || (d[0] = (m) => t(o).filters = m)
|
|
2026
2026
|
}, {
|
|
@@ -2036,7 +2036,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2036
2036
|
_: 1
|
|
2037
2037
|
}, 8, ["title"]));
|
|
2038
2038
|
}
|
|
2039
|
-
}), Oa = /* @__PURE__ */
|
|
2039
|
+
}), Oa = /* @__PURE__ */ z({
|
|
2040
2040
|
__name: "aeria-insert-panel",
|
|
2041
2041
|
props: {
|
|
2042
2042
|
individualActions: {},
|
|
@@ -2052,31 +2052,31 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2052
2052
|
},
|
|
2053
2053
|
emits: ["update:visible", "update:modelValue", "insert", "cancel"],
|
|
2054
2054
|
setup(e, { emit: c }) {
|
|
2055
|
-
const a = e, o = c, l =
|
|
2055
|
+
const a = e, o = c, l = ae("meta"), u = a.collection, r = ae(u);
|
|
2056
2056
|
Ue(() => {
|
|
2057
2057
|
a.modelValue && r.$actions.setItem(a.modelValue);
|
|
2058
2058
|
});
|
|
2059
|
-
const
|
|
2060
|
-
const { error:
|
|
2061
|
-
if (
|
|
2062
|
-
if ("code" in
|
|
2063
|
-
switch (
|
|
2059
|
+
const y = Q(() => a.form ? r.$actions.useProperties(a.form) : r.description.form ? r.$actions.useProperties(r.description.form) : r.properties), d = async () => {
|
|
2060
|
+
const { error: b, result: f } = await r.$actions.deepInsert();
|
|
2061
|
+
if (b) {
|
|
2062
|
+
if ("code" in b)
|
|
2063
|
+
switch (b.code) {
|
|
2064
2064
|
case "INVALID_PROPERTIES":
|
|
2065
2065
|
case "MISSING_PROPERTIES":
|
|
2066
2066
|
return;
|
|
2067
2067
|
default: {
|
|
2068
|
-
let
|
|
2068
|
+
let i = m("error", {
|
|
2069
2069
|
capitalize: !0
|
|
2070
2070
|
});
|
|
2071
|
-
|
|
2072
|
-
text:
|
|
2071
|
+
b.message && (i += `: ${m(b.message)}`), i += ` (${m(b.code)})`, l.$actions.spawnToast({
|
|
2072
|
+
text: i,
|
|
2073
2073
|
icon: "warning"
|
|
2074
2074
|
});
|
|
2075
2075
|
}
|
|
2076
2076
|
}
|
|
2077
2077
|
return;
|
|
2078
2078
|
}
|
|
2079
|
-
o("update:visible", !1), o("update:modelValue",
|
|
2079
|
+
o("update:visible", !1), o("update:modelValue", f), o("insert", f), r.$actions.clearItem();
|
|
2080
2080
|
}, { t: m } = st(), p = () => {
|
|
2081
2081
|
l.$actions.ask({
|
|
2082
2082
|
action: () => {
|
|
@@ -2085,92 +2085,92 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2085
2085
|
body: m("prompt.close_panel")
|
|
2086
2086
|
});
|
|
2087
2087
|
};
|
|
2088
|
-
return
|
|
2089
|
-
|
|
2090
|
-
}), (
|
|
2091
|
-
const
|
|
2092
|
-
return n(),
|
|
2088
|
+
return ne(() => r.item._id, (b) => {
|
|
2089
|
+
b === null && o("update:visible", !1);
|
|
2090
|
+
}), (b, f) => {
|
|
2091
|
+
const i = N("clickable");
|
|
2092
|
+
return n(), _(Ce, M({
|
|
2093
2093
|
modelValue: e.visible,
|
|
2094
2094
|
loading: t(r).loading.get,
|
|
2095
2095
|
float: e.float,
|
|
2096
2096
|
fixedRight: e.fixedRight
|
|
2097
|
-
}, { onOverlayClick: p }),
|
|
2098
|
-
extra:
|
|
2099
|
-
e.individualActions ? (n(),
|
|
2097
|
+
}, { onOverlayClick: p }), se({
|
|
2098
|
+
extra: v(() => [
|
|
2099
|
+
e.individualActions ? (n(), _(ke, M({ key: 0 }, {
|
|
2100
2100
|
subject: t(r).item,
|
|
2101
|
-
actions: e.individualActions.filter(({ action:
|
|
2101
|
+
actions: e.individualActions.filter(({ action: k }) => k !== "spawnEdit"),
|
|
2102
2102
|
overlayLayer: 60
|
|
2103
2103
|
}, {
|
|
2104
|
-
onActionClick:
|
|
2104
|
+
onActionClick: f[2] || (f[2] = (k) => o("update:visible", !1))
|
|
2105
2105
|
}), {
|
|
2106
|
-
default:
|
|
2107
|
-
visible:
|
|
2106
|
+
default: v(({
|
|
2107
|
+
visible: k
|
|
2108
2108
|
}) => [
|
|
2109
|
-
t(r).item._id ?
|
|
2109
|
+
t(r).item._id ? W((n(), _(H, {
|
|
2110
2110
|
key: 0,
|
|
2111
2111
|
reactive: "",
|
|
2112
|
-
active:
|
|
2112
|
+
active: k,
|
|
2113
2113
|
icon: "dots-three"
|
|
2114
2114
|
}, null, 8, ["active"])), [
|
|
2115
|
-
[
|
|
2116
|
-
]) :
|
|
2115
|
+
[i]
|
|
2116
|
+
]) : h("", !0)
|
|
2117
2117
|
]),
|
|
2118
2118
|
_: 1
|
|
2119
|
-
}, 16)) :
|
|
2119
|
+
}, 16)) : h("", !0)
|
|
2120
2120
|
]),
|
|
2121
|
-
default:
|
|
2122
|
-
|
|
2121
|
+
default: v(() => [
|
|
2122
|
+
x(Me, M({
|
|
2123
2123
|
modelValue: t(r).item,
|
|
2124
|
-
"onUpdate:modelValue":
|
|
2124
|
+
"onUpdate:modelValue": f[0] || (f[0] = (k) => t(r).item = k)
|
|
2125
2125
|
}, {
|
|
2126
2126
|
collection: t(u),
|
|
2127
2127
|
readOnly: e.readOnly,
|
|
2128
2128
|
includeId: e.includeId,
|
|
2129
2129
|
includeTimestamps: e.includeTimestamps,
|
|
2130
|
-
form:
|
|
2130
|
+
form: y.value,
|
|
2131
2131
|
layout: t(r).description.formLayout || {}
|
|
2132
2132
|
}, {
|
|
2133
2133
|
focus: "",
|
|
2134
|
-
onAdd:
|
|
2135
|
-
}),
|
|
2136
|
-
|
|
2137
|
-
name:
|
|
2138
|
-
fn:
|
|
2139
|
-
C(
|
|
2134
|
+
onAdd: f[1] || (f[1] = (k) => k.preventDefault())
|
|
2135
|
+
}), se({ _: 2 }, [
|
|
2136
|
+
E(Object.keys(b.$slots).filter((k) => k.startsWith("field-")), (k) => ({
|
|
2137
|
+
name: k,
|
|
2138
|
+
fn: v((B) => [
|
|
2139
|
+
C(b.$slots, k, le(be(B)))
|
|
2140
2140
|
])
|
|
2141
2141
|
}))
|
|
2142
2142
|
]), 1040, ["modelValue"])
|
|
2143
2143
|
]),
|
|
2144
2144
|
_: 2
|
|
2145
2145
|
}, [
|
|
2146
|
-
|
|
2146
|
+
b.$slots.header ? {
|
|
2147
2147
|
name: "header",
|
|
2148
|
-
fn:
|
|
2149
|
-
C(
|
|
2148
|
+
fn: v(() => [
|
|
2149
|
+
C(b.$slots, "header")
|
|
2150
2150
|
]),
|
|
2151
2151
|
key: "0"
|
|
2152
2152
|
} : void 0,
|
|
2153
2153
|
e.readOnly ? void 0 : {
|
|
2154
2154
|
name: "footer",
|
|
2155
|
-
fn:
|
|
2156
|
-
e.float || e.fixedRight ? (n(),
|
|
2155
|
+
fn: v(() => [
|
|
2156
|
+
e.float || e.fixedRight ? (n(), _(ie, {
|
|
2157
2157
|
key: 0,
|
|
2158
2158
|
variant: "transparent",
|
|
2159
2159
|
onClick: p
|
|
2160
2160
|
}, {
|
|
2161
|
-
default:
|
|
2162
|
-
D(
|
|
2161
|
+
default: v(() => [
|
|
2162
|
+
D(g(t(m)("action.cancel", { capitalize: !0 })), 1)
|
|
2163
2163
|
]),
|
|
2164
2164
|
_: 1
|
|
2165
|
-
})) :
|
|
2166
|
-
|
|
2165
|
+
})) : h("", !0),
|
|
2166
|
+
x(ie, {
|
|
2167
2167
|
large: "",
|
|
2168
2168
|
disabled: !t(r).isInsertReady || t(r).loading.get,
|
|
2169
2169
|
loading: t(r).loading.insert,
|
|
2170
2170
|
onClick: d
|
|
2171
2171
|
}, {
|
|
2172
|
-
default:
|
|
2173
|
-
D(
|
|
2172
|
+
default: v(() => [
|
|
2173
|
+
D(g(t(m)("action.insert", { capitalize: !0 })), 1)
|
|
2174
2174
|
]),
|
|
2175
2175
|
_: 1
|
|
2176
2176
|
}, 8, ["disabled", "loading"])
|
|
@@ -2191,8 +2191,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2191
2191
|
}, Aa = (e, c = {
|
|
2192
2192
|
persistInQuery: !0
|
|
2193
2193
|
}) => {
|
|
2194
|
-
const o =
|
|
2195
|
-
return
|
|
2194
|
+
const o = Ve().currentRoute;
|
|
2195
|
+
return ne(() => o.value.query.section, (l) => {
|
|
2196
2196
|
if (e) {
|
|
2197
2197
|
if (e.description.filtersPresets) {
|
|
2198
2198
|
const u = l || Object.keys(e.description.filtersPresets)[0];
|
|
@@ -2227,7 +2227,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2227
2227
|
}, Na = { class: "table__cell-actions" }, eo = {
|
|
2228
2228
|
key: 2,
|
|
2229
2229
|
class: "no-print table__mobile-actions"
|
|
2230
|
-
}, to = ["id"], no = { key: 1 }, ao = ["colspan"], oo = { class: "table__empty" }, lo = /* @__PURE__ */
|
|
2230
|
+
}, to = ["id"], no = { key: 1 }, ao = ["colspan"], oo = { class: "table__empty" }, lo = /* @__PURE__ */ z({
|
|
2231
2231
|
__name: "aeria-table",
|
|
2232
2232
|
props: {
|
|
2233
2233
|
columns: {},
|
|
@@ -2239,252 +2239,252 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2239
2239
|
},
|
|
2240
2240
|
emits: ["itemClick"],
|
|
2241
2241
|
setup(e, { emit: c }) {
|
|
2242
|
-
const a = e, o = c, l = Se(), u = a.collection || we(), r = u ?
|
|
2242
|
+
const a = e, o = c, l = Se(), u = a.collection || we(), r = u ? ae(typeof u == "string" ? u : u.value) : null, y = Q({
|
|
2243
2243
|
get: () => r?.selected,
|
|
2244
|
-
set: (
|
|
2245
|
-
}), d =
|
|
2246
|
-
const
|
|
2247
|
-
return !l.value.xl || !
|
|
2248
|
-
if (
|
|
2249
|
-
const
|
|
2250
|
-
if (!Ee(
|
|
2244
|
+
set: (i) => r?.$actions.selectManyItems(i, !0)
|
|
2245
|
+
}), 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) => {
|
|
2246
|
+
const k = a.layout?.actions;
|
|
2247
|
+
return !l.value.xl || !k || !a.actions ? [] : a.actions.filter((B) => {
|
|
2248
|
+
if (B.roles) {
|
|
2249
|
+
const Y = ae("user");
|
|
2250
|
+
if (!Ee(B.roles, Y.currentUser.roles))
|
|
2251
2251
|
return !1;
|
|
2252
2252
|
}
|
|
2253
|
-
const
|
|
2254
|
-
return
|
|
2253
|
+
const $ = k[B.action];
|
|
2254
|
+
return $ && m($, i);
|
|
2255
2255
|
});
|
|
2256
|
-
},
|
|
2256
|
+
}, b = (i) => {
|
|
2257
2257
|
if (!a.actions)
|
|
2258
2258
|
return [];
|
|
2259
|
-
const
|
|
2260
|
-
return !l.value.xl || !
|
|
2261
|
-
const
|
|
2262
|
-
if (
|
|
2263
|
-
const
|
|
2264
|
-
if (!Ee(
|
|
2259
|
+
const k = a.layout?.actions;
|
|
2260
|
+
return !l.value.xl || !k ? a.actions : a.actions.filter((B) => {
|
|
2261
|
+
const $ = k[B.action];
|
|
2262
|
+
if (B.roles) {
|
|
2263
|
+
const Y = ae("user");
|
|
2264
|
+
if (!Ee(B.roles, Y.currentUser.roles))
|
|
2265
2265
|
return !1;
|
|
2266
2266
|
}
|
|
2267
|
-
return
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
).satisfied : !m(
|
|
2267
|
+
return $ ? $.if ? qe(
|
|
2268
|
+
i,
|
|
2269
|
+
$.if
|
|
2270
|
+
).satisfied : !m($, i) : !0;
|
|
2271
2271
|
});
|
|
2272
|
-
},
|
|
2273
|
-
const
|
|
2274
|
-
return
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
).satisfied ||
|
|
2272
|
+
}, f = (i, k) => {
|
|
2273
|
+
const B = [], $ = a.layout?.actions?.[k.action];
|
|
2274
|
+
return $?.if && (qe(
|
|
2275
|
+
i,
|
|
2276
|
+
$.if
|
|
2277
|
+
).satisfied || B.push("display: none;")), B.join("");
|
|
2278
2278
|
};
|
|
2279
|
-
return (
|
|
2280
|
-
const
|
|
2281
|
-
return d.value > 0 ||
|
|
2282
|
-
|
|
2283
|
-
C(
|
|
2279
|
+
return (i, k) => {
|
|
2280
|
+
const B = N("clickable");
|
|
2281
|
+
return d.value > 0 || i.$slots.thead ? (n(), s("table", Ia, [
|
|
2282
|
+
i.$slots.thead ? (n(), s("thead", Ba, [
|
|
2283
|
+
C(i.$slots, "thead", {}, void 0, !0)
|
|
2284
2284
|
])) : (n(), s("thead", Sa, [
|
|
2285
2285
|
O("tr", null, [
|
|
2286
2286
|
e.checkbox && t(r) && t(l).md ? (n(), s("th", wa, [
|
|
2287
2287
|
O("input", {
|
|
2288
2288
|
type: "checkbox",
|
|
2289
2289
|
checked: t(r).selected.length > 0 && t(r).selected.length === t(r).itemsCount,
|
|
2290
|
-
onChange:
|
|
2290
|
+
onChange: k[0] || (k[0] = ($) => t(r).$actions.selectAllItems($.target.checked))
|
|
2291
2291
|
}, null, 40, Ta)
|
|
2292
|
-
])) :
|
|
2293
|
-
(n(!0), s(
|
|
2294
|
-
key: `header-${
|
|
2292
|
+
])) : h("", !0),
|
|
2293
|
+
(n(!0), s(G, null, E(Object.entries(e.columns), ([$, Y], A) => (n(), s("th", {
|
|
2294
|
+
key: `header-${A}`,
|
|
2295
2295
|
class: "table__header"
|
|
2296
|
-
},
|
|
2297
|
-
e.actions?.length ? (n(), s("th", ja)) :
|
|
2296
|
+
}, g(Y.description || t(q)($)), 1))), 128)),
|
|
2297
|
+
e.actions?.length ? (n(), s("th", ja)) : h("", !0)
|
|
2298
2298
|
])
|
|
2299
2299
|
])),
|
|
2300
|
-
|
|
2301
|
-
C(
|
|
2300
|
+
i.$slots.tbody ? (n(), s("tbody", Ra, [
|
|
2301
|
+
C(i.$slots, "tbody", {}, void 0, !0)
|
|
2302
2302
|
])) : (n(), s("tbody", qa, [
|
|
2303
|
-
(n(!0), s(
|
|
2304
|
-
key:
|
|
2305
|
-
onClick: (
|
|
2303
|
+
(n(!0), s(G, null, E(e.rows, ($, Y) => (n(), s("tr", {
|
|
2304
|
+
key: $._id,
|
|
2305
|
+
onClick: (A) => o("itemClick", $)
|
|
2306
2306
|
}, [
|
|
2307
2307
|
t(r) && e.checkbox && t(l).md ? (n(), s("td", xa, [
|
|
2308
|
-
|
|
2309
|
-
"onUpdate:modelValue":
|
|
2308
|
+
W(O("input", {
|
|
2309
|
+
"onUpdate:modelValue": k[1] || (k[1] = (A) => y.value = A),
|
|
2310
2310
|
type: "checkbox",
|
|
2311
|
-
value:
|
|
2311
|
+
value: $._id
|
|
2312
2312
|
}, null, 8, Ma), [
|
|
2313
|
-
[tt,
|
|
2313
|
+
[tt, y.value]
|
|
2314
2314
|
])
|
|
2315
|
-
])) :
|
|
2316
|
-
(n(!0), s(
|
|
2317
|
-
key: `column-${
|
|
2315
|
+
])) : h("", !0),
|
|
2316
|
+
(n(!0), s(G, null, E(Object.entries(e.columns), ([A, j], K) => (n(), s("td", {
|
|
2317
|
+
key: `column-${$._id}-${K}`
|
|
2318
2318
|
}, [
|
|
2319
|
-
O("div", za,
|
|
2320
|
-
`row-${
|
|
2321
|
-
C(
|
|
2319
|
+
O("div", za, g(j.description || t(q)(A)), 1),
|
|
2320
|
+
`row-${A}` in i.$slots ? (n(), s("div", Ea, [
|
|
2321
|
+
C(i.$slots, `row-${A}`, M({ ref_for: !0 }, {
|
|
2322
2322
|
store: t(r),
|
|
2323
|
-
column:
|
|
2324
|
-
property:
|
|
2325
|
-
row:
|
|
2326
|
-
rowIndex:
|
|
2323
|
+
column: A,
|
|
2324
|
+
property: j,
|
|
2325
|
+
row: $,
|
|
2326
|
+
rowIndex: Y
|
|
2327
2327
|
}), void 0, !0)
|
|
2328
2328
|
])) : (n(), s("div", Fa, [
|
|
2329
2329
|
O("div", Ua, [
|
|
2330
|
-
"type" in
|
|
2331
|
-
|
|
2330
|
+
"type" in j && j.type === "boolean" ? (n(), s("div", Ha, [
|
|
2331
|
+
$[A] ? (n(), _(H, {
|
|
2332
2332
|
key: 0,
|
|
2333
2333
|
icon: "check",
|
|
2334
2334
|
"icon-classes": "aeria-blueish"
|
|
2335
2335
|
}, {
|
|
2336
|
-
default:
|
|
2337
|
-
D(
|
|
2336
|
+
default: v(() => [
|
|
2337
|
+
D(g(t(q)("yes")), 1)
|
|
2338
2338
|
]),
|
|
2339
2339
|
_: 1
|
|
2340
|
-
})) : (n(),
|
|
2340
|
+
})) : (n(), _(H, {
|
|
2341
2341
|
key: 1,
|
|
2342
2342
|
icon: "x",
|
|
2343
2343
|
"icon-classes": "aeria-redish"
|
|
2344
2344
|
}, {
|
|
2345
|
-
default:
|
|
2346
|
-
D(
|
|
2345
|
+
default: v(() => [
|
|
2346
|
+
D(g(t(q)("no")), 1)
|
|
2347
2347
|
]),
|
|
2348
2348
|
_: 1
|
|
2349
2349
|
}))
|
|
2350
|
-
])) : t(
|
|
2351
|
-
|
|
2352
|
-
"items" in
|
|
2350
|
+
])) : t(re)(j)?.$ref === "file" ? (n(), s("div", Da, [
|
|
2351
|
+
$[A] ? (n(), s("div", Qa, [
|
|
2352
|
+
"items" in j && $[A][0] && /^image/.test($[A][0].type) ? (n(), _(Le, {
|
|
2353
2353
|
key: 0,
|
|
2354
|
-
modelValue:
|
|
2355
|
-
"onUpdate:modelValue": (
|
|
2354
|
+
modelValue: $[A][0].link,
|
|
2355
|
+
"onUpdate:modelValue": (ee) => $[A][0].link = ee,
|
|
2356
2356
|
expandable: "",
|
|
2357
|
-
meta:
|
|
2357
|
+
meta: $[A][0],
|
|
2358
2358
|
alt: "Row image",
|
|
2359
2359
|
class: "table__picture"
|
|
2360
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test(
|
|
2360
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test($[A].type) ? (n(), _(Le, {
|
|
2361
2361
|
key: 1,
|
|
2362
|
-
modelValue:
|
|
2363
|
-
"onUpdate:modelValue": (
|
|
2362
|
+
modelValue: $[A].link,
|
|
2363
|
+
"onUpdate:modelValue": (ee) => $[A].link = ee,
|
|
2364
2364
|
expandable: "",
|
|
2365
|
-
meta:
|
|
2365
|
+
meta: $[A],
|
|
2366
2366
|
alt: "Row image",
|
|
2367
2367
|
class: "table__picture"
|
|
2368
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) :
|
|
2368
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : $[A].link ? (n(), s("a", {
|
|
2369
2369
|
key: 2,
|
|
2370
|
-
href:
|
|
2370
|
+
href: $[A].link,
|
|
2371
2371
|
style: { "font-size": "10pt" }
|
|
2372
|
-
},
|
|
2372
|
+
}, g($[A].filename), 9, Ga)) : (n(), s("div", Wa, " - "))
|
|
2373
2373
|
])) : (n(), s("div", Ya, " - "))
|
|
2374
2374
|
])) : (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-${
|
|
2375
|
+
t(r) ? (n(), s("span", Xa, g(t(r).$actions.formatValue({
|
|
2376
|
+
value: $[A],
|
|
2377
|
+
key: A,
|
|
2378
|
+
property: j
|
|
2379
|
+
})), 1)) : (n(), s("span", Ja, g(Array.isArray($[A]) ? $[A].filter((ee) => !!ee).join(", ") : [void 0, null].includes($[A]) ? "-" : $[A]), 1)),
|
|
2380
|
+
t(re)(j)?.indexes?.length > 1 ? (n(), s("div", Za, [
|
|
2381
|
+
(n(!0), s(G, null, E(t(re)(j).indexes.slice(1, 2), (ee, de) => (n(), s("div", {
|
|
2382
|
+
key: `subvalue-${de}`,
|
|
2383
2383
|
class: "table__cell-subvalue"
|
|
2384
|
-
},
|
|
2385
|
-
value:
|
|
2386
|
-
key:
|
|
2387
|
-
property:
|
|
2388
|
-
index:
|
|
2384
|
+
}, g(t(r).$actions.formatValue({
|
|
2385
|
+
value: $[A],
|
|
2386
|
+
key: A,
|
|
2387
|
+
property: j,
|
|
2388
|
+
index: ee
|
|
2389
2389
|
})), 1))), 128))
|
|
2390
|
-
])) :
|
|
2390
|
+
])) : h("", !0)
|
|
2391
2391
|
]))
|
|
2392
2392
|
])
|
|
2393
2393
|
]))
|
|
2394
2394
|
]))), 128)),
|
|
2395
2395
|
e.actions?.length && t(l).md ? (n(), s("td", Pa, [
|
|
2396
2396
|
O("div", Na, [
|
|
2397
|
-
(n(!0), s(
|
|
2398
|
-
key: `action-${
|
|
2397
|
+
(n(!0), s(G, null, E(p($), (A) => (n(), _(ie, {
|
|
2398
|
+
key: `action-${A.action}`,
|
|
2399
2399
|
small: "",
|
|
2400
2400
|
variant: "alt",
|
|
2401
|
-
icon:
|
|
2402
|
-
style: ve(
|
|
2403
|
-
onClick: (
|
|
2401
|
+
icon: A.icon,
|
|
2402
|
+
style: ve(f($, A)),
|
|
2403
|
+
onClick: (j) => A.click($)
|
|
2404
2404
|
}, {
|
|
2405
|
-
default:
|
|
2406
|
-
D(
|
|
2405
|
+
default: v(() => [
|
|
2406
|
+
D(g(t(q)(A.label)), 1)
|
|
2407
2407
|
]),
|
|
2408
2408
|
_: 2
|
|
2409
2409
|
}, 1032, ["icon", "style", "onClick"]))), 128)),
|
|
2410
|
-
|
|
2410
|
+
b($).length > 0 ? (n(), _(ke, M({
|
|
2411
2411
|
key: 0,
|
|
2412
2412
|
ref_for: !0
|
|
2413
2413
|
}, {
|
|
2414
|
-
subject:
|
|
2415
|
-
actions:
|
|
2414
|
+
subject: $,
|
|
2415
|
+
actions: b($)
|
|
2416
2416
|
}), {
|
|
2417
|
-
default:
|
|
2418
|
-
visible:
|
|
2417
|
+
default: v(({
|
|
2418
|
+
visible: A
|
|
2419
2419
|
}) => [
|
|
2420
|
-
|
|
2420
|
+
W(x(H, {
|
|
2421
2421
|
reactive: "",
|
|
2422
|
-
active:
|
|
2422
|
+
active: A,
|
|
2423
2423
|
icon: "dots-three"
|
|
2424
2424
|
}, null, 8, ["active"]), [
|
|
2425
|
-
[
|
|
2425
|
+
[B]
|
|
2426
2426
|
])
|
|
2427
2427
|
]),
|
|
2428
2428
|
_: 1
|
|
2429
|
-
}, 16)) :
|
|
2429
|
+
}, 16)) : h("", !0)
|
|
2430
2430
|
])
|
|
2431
2431
|
])) : e.actions?.length ? (n(), s("td", eo, [
|
|
2432
2432
|
O("div", {
|
|
2433
2433
|
class: "table__mobile-actions-grid",
|
|
2434
|
-
style: ve(`grid-template-columns: repeat(${p(
|
|
2434
|
+
style: ve(`grid-template-columns: repeat(${p($).length + (b($).length ? 1 : 0)}, 1fr);`)
|
|
2435
2435
|
}, [
|
|
2436
|
-
(n(!0), s(
|
|
2437
|
-
key: `action-${
|
|
2436
|
+
(n(!0), s(G, null, E(p($), (A) => (n(), _(me, {
|
|
2437
|
+
key: `action-${A.action}`,
|
|
2438
2438
|
class: "table__mobile-actions-button",
|
|
2439
|
-
onClick: (
|
|
2439
|
+
onClick: (j) => A.click($)
|
|
2440
2440
|
}, {
|
|
2441
|
-
default:
|
|
2442
|
-
|
|
2443
|
-
icon:
|
|
2441
|
+
default: v(() => [
|
|
2442
|
+
x(H, {
|
|
2443
|
+
icon: A.icon || "gear"
|
|
2444
2444
|
}, {
|
|
2445
|
-
default:
|
|
2446
|
-
D(
|
|
2445
|
+
default: v(() => [
|
|
2446
|
+
D(g(t(q)(A.label)), 1)
|
|
2447
2447
|
]),
|
|
2448
2448
|
_: 2
|
|
2449
2449
|
}, 1032, ["icon"])
|
|
2450
2450
|
]),
|
|
2451
2451
|
_: 2
|
|
2452
2452
|
}, 1032, ["onClick"]))), 128)),
|
|
2453
|
-
|
|
2453
|
+
b($).length > 0 ? (n(), _(ke, M({
|
|
2454
2454
|
key: 0,
|
|
2455
2455
|
ref_for: !0
|
|
2456
2456
|
}, {
|
|
2457
|
-
subject:
|
|
2458
|
-
actions:
|
|
2457
|
+
subject: $,
|
|
2458
|
+
actions: b($)
|
|
2459
2459
|
}), {
|
|
2460
|
-
default:
|
|
2461
|
-
|
|
2460
|
+
default: v(() => [
|
|
2461
|
+
x(H, {
|
|
2462
2462
|
icon: "dots-three",
|
|
2463
2463
|
class: "table__mobile-actions-button"
|
|
2464
2464
|
})
|
|
2465
2465
|
]),
|
|
2466
2466
|
_: 1
|
|
2467
|
-
}, 16)) :
|
|
2467
|
+
}, 16)) : h("", !0)
|
|
2468
2468
|
], 4),
|
|
2469
2469
|
O("div", {
|
|
2470
|
-
id: `dropdown-${
|
|
2470
|
+
id: `dropdown-${$._id}`
|
|
2471
2471
|
}, null, 8, to)
|
|
2472
|
-
])) :
|
|
2472
|
+
])) : h("", !0)
|
|
2473
2473
|
], 8, La))), 128))
|
|
2474
2474
|
])),
|
|
2475
2475
|
O("tfoot", null, [
|
|
2476
|
-
|
|
2476
|
+
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
2477
|
O("td", {
|
|
2478
2478
|
colspan: d.value + 1
|
|
2479
2479
|
}, [
|
|
2480
|
-
O("div", oo,
|
|
2480
|
+
O("div", oo, g(t(q)("no_results", { capitalize: !0 })) + ". ", 1)
|
|
2481
2481
|
], 8, ao)
|
|
2482
|
-
])) :
|
|
2482
|
+
])) : h("", !0)
|
|
2483
2483
|
])
|
|
2484
|
-
])) :
|
|
2484
|
+
])) : h("", !0);
|
|
2485
2485
|
};
|
|
2486
2486
|
}
|
|
2487
|
-
}), io = /* @__PURE__ */
|
|
2487
|
+
}), io = /* @__PURE__ */ F(lo, [["__scopeId", "data-v-e01a149a"]]), so = /* @__PURE__ */ z({
|
|
2488
2488
|
__name: "aeria-tabular",
|
|
2489
2489
|
props: {
|
|
2490
2490
|
individualActions: {},
|
|
@@ -2492,7 +2492,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2492
2492
|
componentProps: {}
|
|
2493
2493
|
},
|
|
2494
2494
|
setup(e) {
|
|
2495
|
-
const c = e, a = Ae(), o = we(), l =
|
|
2495
|
+
const c = e, a = Ae(), o = we(), l = Q(() => {
|
|
2496
2496
|
const u = {
|
|
2497
2497
|
collection: o,
|
|
2498
2498
|
checkbox: a.hasSelectionActions,
|
|
@@ -2504,20 +2504,20 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2504
2504
|
return Object.assign(u, c.componentProps);
|
|
2505
2505
|
});
|
|
2506
2506
|
return (u, r) => (n(), s("div", null, [
|
|
2507
|
-
u.$slots.inner ? C(u.$slots, "inner", { key: 0 }) :
|
|
2508
|
-
t(a).properties ? (n(),
|
|
2507
|
+
u.$slots.inner ? C(u.$slots, "inner", { key: 0 }) : h("", !0),
|
|
2508
|
+
t(a).properties ? (n(), _(io, M({ key: 1 }, l.value, {
|
|
2509
2509
|
key: t(a).$id
|
|
2510
|
-
}),
|
|
2511
|
-
|
|
2512
|
-
name:
|
|
2513
|
-
fn:
|
|
2514
|
-
C(u.$slots,
|
|
2510
|
+
}), se({ _: 2 }, [
|
|
2511
|
+
E(Object.keys(u.$slots).filter((y) => !["inner"].includes(y)), (y) => ({
|
|
2512
|
+
name: y,
|
|
2513
|
+
fn: v((d) => [
|
|
2514
|
+
C(u.$slots, y, le(be(d)))
|
|
2515
2515
|
])
|
|
2516
2516
|
}))
|
|
2517
|
-
]), 1040)) :
|
|
2517
|
+
]), 1040)) : h("", !0)
|
|
2518
2518
|
]));
|
|
2519
2519
|
}
|
|
2520
|
-
}), ro = /* @__PURE__ */
|
|
2520
|
+
}), ro = /* @__PURE__ */ z({
|
|
2521
2521
|
__name: "aeria-grid",
|
|
2522
2522
|
props: {
|
|
2523
2523
|
list: { type: Boolean }
|
|
@@ -2532,13 +2532,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2532
2532
|
C(c.$slots, "default", {}, void 0, !0)
|
|
2533
2533
|
], 2));
|
|
2534
2534
|
}
|
|
2535
|
-
}), uo = /* @__PURE__ */
|
|
2535
|
+
}), uo = /* @__PURE__ */ F(ro, [["__scopeId", "data-v-4839c834"]]), co = { key: 0 }, mo = {
|
|
2536
2536
|
key: 1,
|
|
2537
2537
|
class: "card__information"
|
|
2538
2538
|
}, po = {
|
|
2539
2539
|
key: 2,
|
|
2540
2540
|
class: "card__information"
|
|
2541
|
-
}, fo = /* @__PURE__ */
|
|
2541
|
+
}, fo = /* @__PURE__ */ z({
|
|
2542
2542
|
__name: "aeria-grid",
|
|
2543
2543
|
props: {
|
|
2544
2544
|
individualActions: {},
|
|
@@ -2549,48 +2549,48 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2549
2549
|
setup(e) {
|
|
2550
2550
|
const a = e.layoutOptions, o = Ae(), l = (u) => Array.isArray(u) ? u[0] : u;
|
|
2551
2551
|
return (u, r) => {
|
|
2552
|
-
const
|
|
2553
|
-
return n(),
|
|
2552
|
+
const y = N("clickable");
|
|
2553
|
+
return n(), _(uo, {
|
|
2554
2554
|
list: e.componentName === "list"
|
|
2555
2555
|
}, {
|
|
2556
|
-
default:
|
|
2557
|
-
(n(!0), s(
|
|
2556
|
+
default: v(() => [
|
|
2557
|
+
(n(!0), s(G, null, E(t(o).items, (d) => (n(), _(zt, {
|
|
2558
2558
|
key: d._id,
|
|
2559
2559
|
inactive: !!(t(a).active && !d[t(a).active]),
|
|
2560
2560
|
horizontal: e.componentName === "list"
|
|
2561
|
-
},
|
|
2562
|
-
footer:
|
|
2563
|
-
t(a).title ? (n(), s("div", co,
|
|
2561
|
+
}, se({
|
|
2562
|
+
footer: v(() => [
|
|
2563
|
+
t(a).title ? (n(), s("div", co, g(d[t(a).title]), 1)) : h("", !0),
|
|
2564
2564
|
Array.isArray(t(a).information) ? (n(), s("div", mo, [
|
|
2565
|
-
(n(!0), s(
|
|
2565
|
+
(n(!0), s(G, null, E(t(a).information, (m) => (n(), s("div", {
|
|
2566
2566
|
key: `info-${m}`
|
|
2567
|
-
},
|
|
2568
|
-
])) : t(a).information ? (n(), s("div", po,
|
|
2567
|
+
}, g(d[m]), 1))), 128))
|
|
2568
|
+
])) : t(a).information ? (n(), s("div", po, g(d[t(a).information]), 1)) : h("", !0)
|
|
2569
2569
|
]),
|
|
2570
|
-
actions:
|
|
2571
|
-
e.individualActions?.length ? (n(),
|
|
2570
|
+
actions: v(() => [
|
|
2571
|
+
e.individualActions?.length ? (n(), _(ke, M({
|
|
2572
2572
|
key: 0,
|
|
2573
2573
|
ref_for: !0
|
|
2574
2574
|
}, {
|
|
2575
2575
|
subject: d,
|
|
2576
2576
|
actions: e.individualActions
|
|
2577
2577
|
}), {
|
|
2578
|
-
default:
|
|
2578
|
+
default: v(({
|
|
2579
2579
|
visible: m
|
|
2580
2580
|
}) => [
|
|
2581
|
-
|
|
2581
|
+
W(x(H, {
|
|
2582
2582
|
reactive: "",
|
|
2583
2583
|
active: m,
|
|
2584
2584
|
icon: "dots-three-vertical"
|
|
2585
2585
|
}, null, 8, ["active"]), [
|
|
2586
|
-
[
|
|
2586
|
+
[y]
|
|
2587
2587
|
])
|
|
2588
2588
|
]),
|
|
2589
2589
|
_: 1
|
|
2590
|
-
}, 16)) :
|
|
2590
|
+
}, 16)) : h("", !0)
|
|
2591
2591
|
]),
|
|
2592
|
-
default:
|
|
2593
|
-
|
|
2592
|
+
default: v(() => [
|
|
2593
|
+
x(Le, M({ expandable: "" }, { ref_for: !0 }, {
|
|
2594
2594
|
url: l(d[t(a).picture])?.link,
|
|
2595
2595
|
meta: l(d[t(a).picture]),
|
|
2596
2596
|
height: "16rem",
|
|
@@ -2601,13 +2601,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2601
2601
|
}, [
|
|
2602
2602
|
t(a).badge && Array.isArray(d[t(a).badge]) ? {
|
|
2603
2603
|
name: "badge",
|
|
2604
|
-
fn:
|
|
2605
|
-
(n(!0), s(
|
|
2604
|
+
fn: v(() => [
|
|
2605
|
+
(n(!0), s(G, null, E(d[t(a).badge], (m) => (n(), _(he, {
|
|
2606
2606
|
key: `${d._id}-${m}`,
|
|
2607
2607
|
large: ""
|
|
2608
2608
|
}, {
|
|
2609
|
-
default:
|
|
2610
|
-
D(
|
|
2609
|
+
default: v(() => [
|
|
2610
|
+
D(g(t(a).translateBadge ? t(q)(m) : m), 1)
|
|
2611
2611
|
]),
|
|
2612
2612
|
_: 2
|
|
2613
2613
|
}, 1024))), 128))
|
|
@@ -2615,10 +2615,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2615
2615
|
key: "0"
|
|
2616
2616
|
} : t(a).badge ? {
|
|
2617
2617
|
name: "badge",
|
|
2618
|
-
fn:
|
|
2619
|
-
|
|
2620
|
-
default:
|
|
2621
|
-
D(
|
|
2618
|
+
fn: v(() => [
|
|
2619
|
+
x(he, null, {
|
|
2620
|
+
default: v(() => [
|
|
2621
|
+
D(g(t(a).translateBadge && typeof d[t(a).badge] == "string" ? t(q)(d[t(a).badge]) : d[t(a).badge]), 1)
|
|
2622
2622
|
]),
|
|
2623
2623
|
_: 2
|
|
2624
2624
|
}, 1024)
|
|
@@ -2631,7 +2631,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2631
2631
|
}, 8, ["list"]);
|
|
2632
2632
|
};
|
|
2633
2633
|
}
|
|
2634
|
-
}), Ye = /* @__PURE__ */
|
|
2634
|
+
}), Ye = /* @__PURE__ */ F(fo, [["__scopeId", "data-v-ce6f7461"]]), vo = (e) => ({
|
|
2635
2635
|
tabular: so,
|
|
2636
2636
|
grid: Ye,
|
|
2637
2637
|
list: Ye
|
|
@@ -2644,7 +2644,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2644
2644
|
}, bo = { class: "crud__actions" }, _o = { class: "crud__context-badge" }, $o = { class: "crud__data" }, go = { key: 0 }, ko = {
|
|
2645
2645
|
key: 3,
|
|
2646
2646
|
class: "crud__pagination"
|
|
2647
|
-
}, Ke = 30, Vo = /* @__PURE__ */
|
|
2647
|
+
}, Ke = 30, Vo = /* @__PURE__ */ z({
|
|
2648
2648
|
__name: "aeria-crud",
|
|
2649
2649
|
props: {
|
|
2650
2650
|
collection: {},
|
|
@@ -2660,117 +2660,117 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2660
2660
|
},
|
|
2661
2661
|
emits: ["uiEvent"],
|
|
2662
2662
|
setup(e, { emit: c }) {
|
|
2663
|
-
const a =
|
|
2663
|
+
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
2664
|
antecipate: 600
|
|
2665
|
-
}),
|
|
2666
|
-
|
|
2667
|
-
|
|
2665
|
+
}), f = !m.value.md || r.scrollPagination;
|
|
2666
|
+
f && ne(p, (T) => {
|
|
2667
|
+
T && i.pagination.recordsTotal > i.items.length && $.value < Ke && ($.value += 1, A());
|
|
2668
2668
|
});
|
|
2669
2669
|
const i = pt(r.collection);
|
|
2670
2670
|
Aa(i, {
|
|
2671
2671
|
persistInQuery: !r.noQueryPersistence
|
|
2672
2672
|
});
|
|
2673
|
-
const
|
|
2674
|
-
l.value =
|
|
2675
|
-
const
|
|
2676
|
-
i.activeFilters = Object.assign({},
|
|
2677
|
-
const
|
|
2673
|
+
const k = De(), B = r.action ? t(r.action) : ft(i, d, k);
|
|
2674
|
+
l.value = B[0], u.value = B[1];
|
|
2675
|
+
const $ = J(0), Y = J(!1), A = async (T) => {
|
|
2676
|
+
i.activeFilters = Object.assign({}, T?.filters || i.$filters), Object.assign(i.activeFilters, i.filtersPreset);
|
|
2677
|
+
const w = {
|
|
2678
2678
|
filters: i.activeFilters,
|
|
2679
2679
|
limit: i.pagination.limit,
|
|
2680
2680
|
offset: i.pagination.offset,
|
|
2681
2681
|
project: i.preferredTableProperties.length > 0 ? i.preferredTableProperties : i.description.table || Object.keys(i.properties)
|
|
2682
2682
|
};
|
|
2683
|
-
|
|
2684
|
-
const { error:
|
|
2685
|
-
if (
|
|
2683
|
+
$.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;
|
|
2684
|
+
const { error: te, result: P } = await i.$actions.retrieveItems(w);
|
|
2685
|
+
if (te)
|
|
2686
2686
|
return;
|
|
2687
|
-
const { data:
|
|
2688
|
-
i.pagination.recordsCount =
|
|
2689
|
-
},
|
|
2687
|
+
const { data: S, pagination: V } = P;
|
|
2688
|
+
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;
|
|
2689
|
+
}, j = async (T) => {
|
|
2690
2690
|
d.push(Be(d.currentRoute.value, {
|
|
2691
2691
|
query: {
|
|
2692
|
-
offset:
|
|
2693
|
-
limit:
|
|
2692
|
+
offset: T.offset,
|
|
2693
|
+
limit: T.limit
|
|
2694
2694
|
}
|
|
2695
|
-
})), i.pagination.offset =
|
|
2696
|
-
},
|
|
2697
|
-
|
|
2695
|
+
})), i.pagination.offset = T.offset, i.pagination.limit = T.limit, A();
|
|
2696
|
+
}, K = ce("noResultsComponent", null);
|
|
2697
|
+
ne(() => [
|
|
2698
2698
|
d.currentRoute.value.path,
|
|
2699
2699
|
d.currentRoute.value.query.section
|
|
2700
|
-
], async (
|
|
2701
|
-
if (
|
|
2700
|
+
], async (T, w) => {
|
|
2701
|
+
if (w && w[0] === T[0] && w[1] === T[1])
|
|
2702
2702
|
return;
|
|
2703
|
-
const
|
|
2704
|
-
if (
|
|
2705
|
-
const P = vt(i,
|
|
2706
|
-
Object.keys(P).length > 0 && Object.assign(i.filters, P), await
|
|
2703
|
+
const te = d.currentRoute.value;
|
|
2704
|
+
if (!r.noFetch && (!te.query._popstate || i.itemsCount === 0)) {
|
|
2705
|
+
const P = vt(i, te.query);
|
|
2706
|
+
Object.keys(P).length > 0 && Object.assign(i.filters, P), await A();
|
|
2707
2707
|
}
|
|
2708
2708
|
}, {
|
|
2709
2709
|
immediate: !0,
|
|
2710
2710
|
flush: "post"
|
|
2711
2711
|
});
|
|
2712
|
-
const [
|
|
2712
|
+
const [ee] = Ze({
|
|
2713
2713
|
delay: 600
|
|
2714
|
-
})((
|
|
2714
|
+
})((T) => (d.push(Be(d.currentRoute.value, {
|
|
2715
2715
|
query: {
|
|
2716
|
-
search:
|
|
2716
|
+
search: T || void 0
|
|
2717
2717
|
}
|
|
2718
|
-
})),
|
|
2718
|
+
})), T ? (i.filters = Object.assign(ge(i.freshFilters), {
|
|
2719
2719
|
$text: {
|
|
2720
|
-
$search: `"${
|
|
2720
|
+
$search: `"${T}"`,
|
|
2721
2721
|
$caseSensitive: !1
|
|
2722
2722
|
}
|
|
2723
|
-
}),
|
|
2723
|
+
}), A({
|
|
2724
2724
|
offset: 0
|
|
2725
|
-
})) : (i.filters =
|
|
2726
|
-
|
|
2727
|
-
|
|
2725
|
+
})) : (i.filters = ge(i.freshFilters), $.value = 0, A())));
|
|
2726
|
+
ne(() => i.textQuery, (T) => {
|
|
2727
|
+
ee(T);
|
|
2728
2728
|
});
|
|
2729
|
-
const
|
|
2730
|
-
|
|
2729
|
+
const de = (T) => {
|
|
2730
|
+
T.currentLayout = T.currentLayout === "tabular" ? T.description.layout.name : "tabular";
|
|
2731
2731
|
};
|
|
2732
2732
|
nt(() => {
|
|
2733
|
-
i.$actions.clearFilters(), i.textQuery = "",
|
|
2734
|
-
}),
|
|
2735
|
-
const
|
|
2736
|
-
let
|
|
2737
|
-
if (
|
|
2738
|
-
if ((
|
|
2733
|
+
i.$actions.clearFilters(), i.textQuery = "", b();
|
|
2734
|
+
}), ne(() => u.value, async (T) => {
|
|
2735
|
+
const w = ge(T);
|
|
2736
|
+
let te;
|
|
2737
|
+
if (w)
|
|
2738
|
+
if ((w.name === "spawnEdit" || w.name === "duplicate") && (te = i.$actions.get({
|
|
2739
2739
|
filters: {
|
|
2740
|
-
_id:
|
|
2740
|
+
_id: w.params._id
|
|
2741
2741
|
}
|
|
2742
|
-
})),
|
|
2743
|
-
i.$actions.clearItem(),
|
|
2742
|
+
})), w.name === "spawnAdd")
|
|
2743
|
+
i.$actions.clearItem(), w.params?.item && (i.$actions.setItem(w.params.item), Object.keys(w.params.item).forEach((P) => {
|
|
2744
2744
|
delete i.referenceItem[P];
|
|
2745
2745
|
})), 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 (!(
|
|
2746
|
+
else if (w.name === "spawnEdit")
|
|
2747
|
+
i.$actions.setItem(w.params), a.value = "edit";
|
|
2748
|
+
else if (w.name === "duplicate") {
|
|
2749
|
+
await te;
|
|
2750
|
+
const P = Object.entries(i.item).reduce((S, [V, R]) => {
|
|
2751
|
+
if (!(V in i.properties))
|
|
2752
2752
|
return {
|
|
2753
|
-
...
|
|
2754
|
-
[
|
|
2753
|
+
...S,
|
|
2754
|
+
[V]: R
|
|
2755
2755
|
};
|
|
2756
|
-
const
|
|
2757
|
-
if (
|
|
2758
|
-
return
|
|
2759
|
-
const
|
|
2760
|
-
const
|
|
2761
|
-
if (!
|
|
2762
|
-
return
|
|
2763
|
-
if (
|
|
2756
|
+
const Z = i.properties[V];
|
|
2757
|
+
if (Z.readOnly)
|
|
2758
|
+
return S;
|
|
2759
|
+
const oe = (I) => {
|
|
2760
|
+
const L = re(Z);
|
|
2761
|
+
if (!L)
|
|
2762
|
+
return I;
|
|
2763
|
+
if (L.$ref === "file")
|
|
2764
2764
|
return {};
|
|
2765
|
-
if (
|
|
2766
|
-
const { _id:
|
|
2765
|
+
if (L.inline && I) {
|
|
2766
|
+
const { _id: X, ...ye } = I;
|
|
2767
2767
|
return ye;
|
|
2768
2768
|
}
|
|
2769
|
-
return
|
|
2769
|
+
return I;
|
|
2770
2770
|
};
|
|
2771
|
-
return
|
|
2772
|
-
...
|
|
2773
|
-
[
|
|
2771
|
+
return R = Array.isArray(R) ? R.map(oe) : oe(R), {
|
|
2772
|
+
...S,
|
|
2773
|
+
[V]: R
|
|
2774
2774
|
};
|
|
2775
2775
|
}, {
|
|
2776
2776
|
_id: void 0
|
|
@@ -2779,65 +2779,65 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2779
2779
|
_id: void 0
|
|
2780
2780
|
}, a.value = "duplicate";
|
|
2781
2781
|
} else
|
|
2782
|
-
|
|
2782
|
+
y("uiEvent", w);
|
|
2783
2783
|
}, {
|
|
2784
2784
|
deep: !0
|
|
2785
|
-
}),
|
|
2786
|
-
|
|
2785
|
+
}), ne(() => a, ({ value: T }) => {
|
|
2786
|
+
T === !1 && i.$actions.clearItem();
|
|
2787
2787
|
});
|
|
2788
|
-
const
|
|
2788
|
+
const ue = Q(() => {
|
|
2789
2789
|
if (!r.noActions)
|
|
2790
|
-
return i.individualActions.map((
|
|
2791
|
-
click: l.value(
|
|
2792
|
-
...
|
|
2790
|
+
return i.individualActions.map((T) => ({
|
|
2791
|
+
click: l.value(T),
|
|
2792
|
+
...T
|
|
2793
2793
|
}));
|
|
2794
|
-
}),
|
|
2795
|
-
return fe(Te,
|
|
2796
|
-
const
|
|
2797
|
-
return n(), s(
|
|
2798
|
-
o.value ? (n(),
|
|
2794
|
+
}), $e = Q(() => i.actions.filter((T) => !T.button));
|
|
2795
|
+
return fe(Te, Q(() => r.collection)), (T, w) => {
|
|
2796
|
+
const te = N("clickable"), P = N("loading");
|
|
2797
|
+
return n(), s(G, null, [
|
|
2798
|
+
o.value ? (n(), _(Ca, {
|
|
2799
2799
|
key: t(i).$id,
|
|
2800
2800
|
modelValue: o.value,
|
|
2801
|
-
"onUpdate:modelValue":
|
|
2802
|
-
}, null, 8, ["modelValue"])) :
|
|
2803
|
-
a.value ? (n(),
|
|
2801
|
+
"onUpdate:modelValue": w[0] || (w[0] = (S) => o.value = S)
|
|
2802
|
+
}, null, 8, ["modelValue"])) : h("", !0),
|
|
2803
|
+
a.value ? (n(), _(Oa, M({
|
|
2804
2804
|
key: 1,
|
|
2805
2805
|
visible: a.value,
|
|
2806
|
-
"onUpdate:visible":
|
|
2806
|
+
"onUpdate:visible": w[1] || (w[1] = (S) => a.value = S),
|
|
2807
2807
|
"fixed-right": ""
|
|
2808
2808
|
}, {
|
|
2809
2809
|
collection: e.collection,
|
|
2810
|
-
individualActions:
|
|
2810
|
+
individualActions: ue.value
|
|
2811
2811
|
}, {
|
|
2812
|
-
onCancel:
|
|
2813
|
-
}),
|
|
2814
|
-
header:
|
|
2815
|
-
O("span", null,
|
|
2812
|
+
onCancel: w[2] || (w[2] = (S) => a.value = !1)
|
|
2813
|
+
}), se({
|
|
2814
|
+
header: v(() => [
|
|
2815
|
+
O("span", null, g((() => {
|
|
2816
2816
|
switch (a.value) {
|
|
2817
2817
|
case "add":
|
|
2818
|
-
return t(
|
|
2818
|
+
return t(q)("action.add", { capitalize: !0 });
|
|
2819
2819
|
case "duplicate":
|
|
2820
|
-
return t(
|
|
2820
|
+
return t(q)("action.duplicate", { capitalize: !0 });
|
|
2821
2821
|
default:
|
|
2822
|
-
return t(
|
|
2822
|
+
return t(q)("action.edit", { capitalize: !0 });
|
|
2823
2823
|
}
|
|
2824
2824
|
})()), 1),
|
|
2825
|
-
O("span", null, " " +
|
|
2825
|
+
O("span", null, " " + g(t(q)(e.collection)), 1)
|
|
2826
2826
|
]),
|
|
2827
2827
|
_: 2
|
|
2828
2828
|
}, [
|
|
2829
|
-
|
|
2830
|
-
name:
|
|
2831
|
-
fn:
|
|
2832
|
-
C(
|
|
2829
|
+
E(Object.keys(T.$slots).filter((S) => S.startsWith("field-")), (S) => ({
|
|
2830
|
+
name: S,
|
|
2831
|
+
fn: v((V) => [
|
|
2832
|
+
C(T.$slots, S, le(be(V)), void 0, !0)
|
|
2833
2833
|
])
|
|
2834
2834
|
}))
|
|
2835
|
-
]), 1040, ["visible"])) :
|
|
2836
|
-
!e.noActions && (t(i).description.search || Object.keys(t(i).description.filters || {}).length > 0 || t(i)?.actions.length > 0 ||
|
|
2835
|
+
]), 1040, ["visible"])) : h("", !0),
|
|
2836
|
+
!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
2837
|
t(i).description.search ? (n(), s("div", ho, [
|
|
2838
|
-
|
|
2838
|
+
x(_e, M({
|
|
2839
2839
|
modelValue: t(i).textQuery,
|
|
2840
|
-
"onUpdate:modelValue":
|
|
2840
|
+
"onUpdate:modelValue": w[3] || (w[3] = (S) => t(i).textQuery = S)
|
|
2841
2841
|
}, {
|
|
2842
2842
|
property: {
|
|
2843
2843
|
type: "string",
|
|
@@ -2845,21 +2845,21 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2845
2845
|
inputType: "search"
|
|
2846
2846
|
}
|
|
2847
2847
|
}), null, 16, ["modelValue"])
|
|
2848
|
-
])) :
|
|
2848
|
+
])) : h("", !0),
|
|
2849
2849
|
O("div", bo, [
|
|
2850
|
-
|
|
2851
|
-
default:
|
|
2852
|
-
|
|
2850
|
+
$e.value.length > 0 || !e.noLayoutToggle && t(i).description.layout && t(i).description.layout?.name !== "tabular" ? (n(), _(ke, { key: 0 }, se({
|
|
2851
|
+
default: v(() => [
|
|
2852
|
+
x(ie, {
|
|
2853
2853
|
variant: "alt",
|
|
2854
2854
|
icon: "sliders"
|
|
2855
2855
|
}, {
|
|
2856
|
-
default:
|
|
2857
|
-
t(i).filtersCount ? (n(),
|
|
2858
|
-
default:
|
|
2859
|
-
D(
|
|
2856
|
+
default: v(() => [
|
|
2857
|
+
t(i).filtersCount ? (n(), _(he, { key: 0 }, {
|
|
2858
|
+
default: v(() => [
|
|
2859
|
+
D(g(t(i).filtersCount), 1)
|
|
2860
2860
|
]),
|
|
2861
2861
|
_: 1
|
|
2862
|
-
})) :
|
|
2862
|
+
})) : h("", !0)
|
|
2863
2863
|
]),
|
|
2864
2864
|
_: 1
|
|
2865
2865
|
})
|
|
@@ -2868,190 +2868,190 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
2868
2868
|
}, [
|
|
2869
2869
|
Object.keys(t(i).description.filters || {}).length > 0 ? {
|
|
2870
2870
|
name: "filter",
|
|
2871
|
-
fn:
|
|
2872
|
-
|
|
2871
|
+
fn: v(() => [
|
|
2872
|
+
W((n(), _(H, {
|
|
2873
2873
|
icon: "funnel",
|
|
2874
|
-
onClick:
|
|
2874
|
+
onClick: w[4] || (w[4] = (S) => o.value = !0)
|
|
2875
2875
|
}, {
|
|
2876
|
-
default:
|
|
2877
|
-
D(
|
|
2876
|
+
default: v(() => [
|
|
2877
|
+
D(g(t(q)("filters", { capitalize: !0 })), 1)
|
|
2878
2878
|
]),
|
|
2879
2879
|
_: 1
|
|
2880
2880
|
})), [
|
|
2881
|
-
[
|
|
2881
|
+
[te]
|
|
2882
2882
|
]),
|
|
2883
2883
|
O("div", _o, [
|
|
2884
|
-
t(i).filtersCount ? (n(),
|
|
2885
|
-
default:
|
|
2886
|
-
D(
|
|
2884
|
+
t(i).filtersCount ? (n(), _(he, { key: 0 }, {
|
|
2885
|
+
default: v(() => [
|
|
2886
|
+
D(g(t(i).filtersCount), 1)
|
|
2887
2887
|
]),
|
|
2888
2888
|
_: 1
|
|
2889
|
-
})) :
|
|
2889
|
+
})) : h("", !0)
|
|
2890
2890
|
])
|
|
2891
2891
|
]),
|
|
2892
2892
|
key: "0"
|
|
2893
2893
|
} : void 0,
|
|
2894
2894
|
!e.noLayoutToggle && t(i).description.layout && t(i).description.layout?.name !== "tabular" ? {
|
|
2895
2895
|
name: "layout-toggle",
|
|
2896
|
-
fn:
|
|
2897
|
-
|
|
2896
|
+
fn: v(() => [
|
|
2897
|
+
W((n(), _(H, {
|
|
2898
2898
|
icon: "table",
|
|
2899
|
-
onClick:
|
|
2899
|
+
onClick: w[5] || (w[5] = (S) => de(t(i)))
|
|
2900
2900
|
}, {
|
|
2901
|
-
default:
|
|
2902
|
-
D(
|
|
2901
|
+
default: v(() => [
|
|
2902
|
+
D(g(t(q)("change_layout", { capitalize: !0 })), 1)
|
|
2903
2903
|
]),
|
|
2904
2904
|
_: 1
|
|
2905
2905
|
})), [
|
|
2906
|
-
[
|
|
2906
|
+
[te]
|
|
2907
2907
|
])
|
|
2908
2908
|
]),
|
|
2909
2909
|
key: "1"
|
|
2910
2910
|
} : void 0,
|
|
2911
|
-
|
|
2912
|
-
name: `action-${
|
|
2913
|
-
fn:
|
|
2914
|
-
|
|
2911
|
+
E($e.value, (S, V) => ({
|
|
2912
|
+
name: `action-${V}`,
|
|
2913
|
+
fn: v(() => [
|
|
2914
|
+
S ? (n(), _(H, {
|
|
2915
2915
|
key: 0,
|
|
2916
|
-
icon:
|
|
2917
|
-
disabled: t(i).selected.length === 0 && "selection" in
|
|
2918
|
-
onClick: (
|
|
2916
|
+
icon: S.icon || "gear",
|
|
2917
|
+
disabled: t(i).selected.length === 0 && "selection" in S && S.selection,
|
|
2918
|
+
onClick: (R) => l.value(S)({ _id: t(i).selected.map((Z) => typeof Z == "string" || Z._id) })
|
|
2919
2919
|
}, {
|
|
2920
|
-
default:
|
|
2921
|
-
D(
|
|
2920
|
+
default: v(() => [
|
|
2921
|
+
D(g(t(q)(S.label, { capitalize: !0 })), 1)
|
|
2922
2922
|
]),
|
|
2923
2923
|
_: 2
|
|
2924
|
-
}, 1032, ["icon", "disabled", "onClick"])) :
|
|
2924
|
+
}, 1032, ["icon", "disabled", "onClick"])) : h("", !0)
|
|
2925
2925
|
])
|
|
2926
2926
|
}))
|
|
2927
|
-
]), 1024)) : Object.keys(t(i).description.filters || {}).length > 0 ? (n(),
|
|
2927
|
+
]), 1024)) : Object.keys(t(i).description.filters || {}).length > 0 ? (n(), _(ie, {
|
|
2928
2928
|
key: 1,
|
|
2929
2929
|
variant: "alt",
|
|
2930
2930
|
icon: "funnel",
|
|
2931
|
-
onClick:
|
|
2931
|
+
onClick: w[6] || (w[6] = (S) => o.value = !0)
|
|
2932
2932
|
}, {
|
|
2933
|
-
default:
|
|
2934
|
-
O("div", null,
|
|
2935
|
-
t(i).filtersCount ? (n(),
|
|
2936
|
-
default:
|
|
2937
|
-
D(
|
|
2933
|
+
default: v(() => [
|
|
2934
|
+
O("div", null, g(t(q)("Filters")), 1),
|
|
2935
|
+
t(i).filtersCount ? (n(), _(he, { key: 0 }, {
|
|
2936
|
+
default: v(() => [
|
|
2937
|
+
D(g(t(i).filtersCount), 1)
|
|
2938
2938
|
]),
|
|
2939
2939
|
_: 1
|
|
2940
|
-
})) :
|
|
2940
|
+
})) : h("", !0)
|
|
2941
2941
|
]),
|
|
2942
2942
|
_: 1
|
|
2943
|
-
})) :
|
|
2944
|
-
(n(!0), s(
|
|
2945
|
-
key: `action-${
|
|
2946
|
-
icon:
|
|
2947
|
-
disabled: t(i).selected.length === 0 && "selection" in
|
|
2948
|
-
onClick: (
|
|
2943
|
+
})) : h("", !0),
|
|
2944
|
+
(n(!0), s(G, null, E(t(i).actions.filter((S) => S.button), (S, V) => (n(), _(ie, {
|
|
2945
|
+
key: `action-${V}`,
|
|
2946
|
+
icon: S.icon,
|
|
2947
|
+
disabled: t(i).selected.length === 0 && "selection" in S && S.selection,
|
|
2948
|
+
onClick: (R) => l.value(S)({ _id: t(i).selected.map((Z) => typeof Z == "string" || Z._id) })
|
|
2949
2949
|
}, {
|
|
2950
|
-
default:
|
|
2951
|
-
D(
|
|
2950
|
+
default: v(() => [
|
|
2951
|
+
D(g(t(q)(S.label, { capitalize: !0 })), 1)
|
|
2952
2952
|
]),
|
|
2953
2953
|
_: 2
|
|
2954
2954
|
}, 1032, ["icon", "disabled", "onClick"]))), 128)),
|
|
2955
|
-
|
|
2955
|
+
T.$slots.actions ? C(T.$slots, "actions", { key: 2 }, void 0, !0) : h("", !0)
|
|
2956
2956
|
])
|
|
2957
|
-
])) :
|
|
2958
|
-
|
|
2959
|
-
t(i).itemsCount === 0 && !t(i).loading.getAll &&
|
|
2960
|
-
t(
|
|
2957
|
+
])) : h("", !0),
|
|
2958
|
+
W((n(), s("div", $o, [
|
|
2959
|
+
t(i).itemsCount === 0 && !t(i).loading.getAll && Y.value && (t(K) || T.$slots.empty) ? (n(), s("div", go, [
|
|
2960
|
+
t(K) ? (n(), _(pe(t(K)), le(M({ key: 0 }, {
|
|
2961
2961
|
collection: t(i).$id
|
|
2962
2962
|
})), {
|
|
2963
|
-
default:
|
|
2964
|
-
t(i).filtersCount === 0 && t(i).description.actions && "spawnAdd" in t(i).description.actions ? (n(),
|
|
2963
|
+
default: v(() => [
|
|
2964
|
+
t(i).filtersCount === 0 && t(i).description.actions && "spawnAdd" in t(i).description.actions ? (n(), _(ie, {
|
|
2965
2965
|
key: 0,
|
|
2966
2966
|
icon: "plus",
|
|
2967
|
-
onClick:
|
|
2967
|
+
onClick: w[7] || (w[7] = (S) => l.value({
|
|
2968
2968
|
action: "spawnAdd",
|
|
2969
2969
|
event: "spawnAdd"
|
|
2970
2970
|
})())
|
|
2971
2971
|
}, {
|
|
2972
|
-
default:
|
|
2973
|
-
D(
|
|
2972
|
+
default: v(() => [
|
|
2973
|
+
D(g(t(q)("add_first_item", { capitalize: !0 })), 1)
|
|
2974
2974
|
]),
|
|
2975
2975
|
_: 1
|
|
2976
|
-
})) :
|
|
2976
|
+
})) : h("", !0)
|
|
2977
2977
|
]),
|
|
2978
2978
|
_: 1
|
|
2979
|
-
}, 16)) : C(
|
|
2979
|
+
}, 16)) : C(T.$slots, "empty", le(M({ key: 1 }, {
|
|
2980
2980
|
collection: t(i).$id
|
|
2981
2981
|
})), void 0, !0)
|
|
2982
|
-
])) :
|
|
2982
|
+
])) : T.$slots.component ? C(T.$slots, "component", le(M({ key: 1 }, {
|
|
2983
2983
|
store: t(i)
|
|
2984
|
-
})), void 0, !0) : (n(),
|
|
2985
|
-
individualActions:
|
|
2984
|
+
})), void 0, !0) : (n(), _(pe(t(vo)(e.layout?.name || t(i).$currentLayout)), M({ key: 2 }, {
|
|
2985
|
+
individualActions: ue.value,
|
|
2986
2986
|
layoutOptions: e.layout?.options || t(i).layout.options,
|
|
2987
2987
|
componentProps: e.componentProps
|
|
2988
2988
|
}, {
|
|
2989
2989
|
"component-name": e.layout?.name || t(i).$currentLayout
|
|
2990
|
-
}),
|
|
2991
|
-
|
|
2992
|
-
name:
|
|
2993
|
-
fn:
|
|
2994
|
-
C(
|
|
2990
|
+
}), se({ _: 2 }, [
|
|
2991
|
+
E(Object.keys(T.$slots).filter((S) => S.startsWith("row-")), (S) => ({
|
|
2992
|
+
name: S,
|
|
2993
|
+
fn: v((V) => [
|
|
2994
|
+
C(T.$slots, S, le(be(V)), void 0, !0)
|
|
2995
2995
|
])
|
|
2996
2996
|
})),
|
|
2997
|
-
|
|
2997
|
+
T.$slots.tfoot ? {
|
|
2998
2998
|
name: "tfoot",
|
|
2999
|
-
fn:
|
|
3000
|
-
C(
|
|
2999
|
+
fn: v(() => [
|
|
3000
|
+
C(T.$slots, "tfoot", {}, void 0, !0)
|
|
3001
3001
|
]),
|
|
3002
3002
|
key: "0"
|
|
3003
3003
|
} : void 0
|
|
3004
3004
|
]), 1040, ["component-name"]))
|
|
3005
3005
|
])), [
|
|
3006
|
-
[P, (!t(
|
|
3006
|
+
[P, (!t(f) || $.value === Ke) && t(i).loading.getAll]
|
|
3007
3007
|
]),
|
|
3008
|
-
!t(
|
|
3009
|
-
|
|
3008
|
+
!t(f) && !e.noControls && !t(i).loading.getAll && t(i).itemsCount > 0 ? (n(), s("div", ko, [
|
|
3009
|
+
x(mn, {
|
|
3010
3010
|
pagination: t(i).pagination,
|
|
3011
|
-
onPaginate:
|
|
3011
|
+
onPaginate: j
|
|
3012
3012
|
}, null, 8, ["pagination"])
|
|
3013
|
-
])) :
|
|
3013
|
+
])) : h("", !0)
|
|
3014
3014
|
], 64);
|
|
3015
3015
|
};
|
|
3016
3016
|
}
|
|
3017
|
-
}), rl = /* @__PURE__ */
|
|
3017
|
+
}), rl = /* @__PURE__ */ F(Vo, [["__scopeId", "data-v-a7c27cdb"]]), Co = { class: "prompt" }, Oo = /* @__PURE__ */ z({
|
|
3018
3018
|
__name: "aeria-prompt",
|
|
3019
3019
|
props: {
|
|
3020
3020
|
title: {},
|
|
3021
3021
|
options: {}
|
|
3022
3022
|
},
|
|
3023
3023
|
setup(e) {
|
|
3024
|
-
const c =
|
|
3024
|
+
const c = ae("meta"), a = (o, l) => {
|
|
3025
3025
|
c.$actions.fulfillPrompt(o, l);
|
|
3026
3026
|
};
|
|
3027
|
-
return (o, l) => (n(),
|
|
3027
|
+
return (o, l) => (n(), _(Ce, {
|
|
3028
3028
|
float: "",
|
|
3029
3029
|
"fill-footer": "",
|
|
3030
3030
|
"close-hint": !1,
|
|
3031
3031
|
title: e.title,
|
|
3032
3032
|
style: { "--panel-min-width": "32rem" }
|
|
3033
3033
|
}, {
|
|
3034
|
-
footer:
|
|
3034
|
+
footer: v(() => [
|
|
3035
3035
|
O("div", {
|
|
3036
3036
|
class: "prompt__options",
|
|
3037
3037
|
style: ve(`grid-template-columns: repeat(${Object.keys(e.options).length}, 1fr)`)
|
|
3038
3038
|
}, [
|
|
3039
|
-
(n(!0), s(
|
|
3040
|
-
key: `option-${
|
|
3039
|
+
(n(!0), s(G, null, E(Object.entries(e.options), ([u, r], y) => (n(), _(me, {
|
|
3040
|
+
key: `option-${y}`,
|
|
3041
3041
|
class: U([
|
|
3042
3042
|
"prompt__option",
|
|
3043
3043
|
`prompt__option--${r.variant || "primary"}`
|
|
3044
3044
|
]),
|
|
3045
3045
|
onClick: (d) => r.click ? r.click(u, r) : a(u, r)
|
|
3046
3046
|
}, {
|
|
3047
|
-
default:
|
|
3048
|
-
D(
|
|
3047
|
+
default: v(() => [
|
|
3048
|
+
D(g(r.title), 1)
|
|
3049
3049
|
]),
|
|
3050
3050
|
_: 2
|
|
3051
3051
|
}, 1032, ["class", "onClick"]))), 128))
|
|
3052
3052
|
], 4)
|
|
3053
3053
|
]),
|
|
3054
|
-
default:
|
|
3054
|
+
default: v(() => [
|
|
3055
3055
|
O("div", Co, [
|
|
3056
3056
|
C(o.$slots, "default", {}, void 0, !0)
|
|
3057
3057
|
])
|
|
@@ -3059,7 +3059,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3059
3059
|
_: 3
|
|
3060
3060
|
}, 8, ["title"]));
|
|
3061
3061
|
}
|
|
3062
|
-
}), Ao = /* @__PURE__ */
|
|
3062
|
+
}), Ao = /* @__PURE__ */ F(Oo, [["__scopeId", "data-v-4cbfd28f"]]), Io = { class: "toast__content" }, Bo = { class: "toast__time" }, So = /* @__PURE__ */ z({
|
|
3063
3063
|
__name: "aeria-toast",
|
|
3064
3064
|
props: {
|
|
3065
3065
|
idx: {},
|
|
@@ -3068,10 +3068,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3068
3068
|
icon: {}
|
|
3069
3069
|
},
|
|
3070
3070
|
setup(e) {
|
|
3071
|
-
const c =
|
|
3071
|
+
const c = ae("meta");
|
|
3072
3072
|
return (a, o) => {
|
|
3073
|
-
const l =
|
|
3074
|
-
return
|
|
3073
|
+
const l = N("clickable");
|
|
3074
|
+
return W((n(), s("div", {
|
|
3075
3075
|
class: U({
|
|
3076
3076
|
toast: !0,
|
|
3077
3077
|
"toast--animate": t(c).toasts[0].itr === e.itr
|
|
@@ -3079,23 +3079,23 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3079
3079
|
onAnimationend: o[0] || (o[0] = (u) => t(c).$actions.popToast()),
|
|
3080
3080
|
onClick: o[1] || (o[1] = (u) => t(c).$actions.popToast(e.itr))
|
|
3081
3081
|
}, [
|
|
3082
|
-
|
|
3082
|
+
x(H, M(
|
|
3083
3083
|
e.icon ? { icon: e.icon } : { icon: "warning-circle" },
|
|
3084
3084
|
{ style: { "--icon-size": "4rem", "--icon-color": "var(--theme-brand-color-shade-3)" } }
|
|
3085
3085
|
), null, 16),
|
|
3086
3086
|
O("div", Io, [
|
|
3087
3087
|
C(a.$slots, "default", {}, void 0, !0),
|
|
3088
|
-
O("div", Bo,
|
|
3088
|
+
O("div", Bo, g(a.formatDateTime(e.date, { hoursOnly: !0 })), 1)
|
|
3089
3089
|
])
|
|
3090
3090
|
], 34)), [
|
|
3091
3091
|
[l]
|
|
3092
3092
|
]);
|
|
3093
3093
|
};
|
|
3094
3094
|
}
|
|
3095
|
-
}), wo = /* @__PURE__ */
|
|
3095
|
+
}), wo = /* @__PURE__ */ F(So, [["__scopeId", "data-v-606d47bf"]]), To = ["innerHTML"], jo = ["innerHTML"], Ro = { class: "main__toasts" }, qo = ["innerHTML"], Lo = /* @__PURE__ */ z({
|
|
3096
3096
|
__name: "aeria-main",
|
|
3097
3097
|
setup(e) {
|
|
3098
|
-
const c =
|
|
3098
|
+
const c = ae("meta"), a = Q(() => c.themeOverride || c.theme);
|
|
3099
3099
|
return (o, l) => {
|
|
3100
3100
|
const u = at("router-view");
|
|
3101
3101
|
return n(), s("main", {
|
|
@@ -3106,15 +3106,15 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3106
3106
|
{ dark: a.value === "dark" }
|
|
3107
3107
|
])
|
|
3108
3108
|
}, [
|
|
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,
|
|
3109
|
+
(n(), _(ot, null, {
|
|
3110
|
+
default: v(() => [
|
|
3111
|
+
o.$slots.default ? C(o.$slots, "default", { key: 0 }, void 0, !0) : (n(), _(u, { key: 1 }, {
|
|
3112
|
+
default: v(({ Component: r }) => [
|
|
3113
|
+
(n(), _(pe(r), null, se({ _: 2 }, [
|
|
3114
|
+
E(Object.keys(o.$slots), (y) => ({
|
|
3115
|
+
name: y,
|
|
3116
|
+
fn: v(() => [
|
|
3117
|
+
C(o.$slots, y, {}, void 0, !0)
|
|
3118
3118
|
])
|
|
3119
3119
|
}))
|
|
3120
3120
|
]), 1024))
|
|
@@ -3124,7 +3124,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3124
3124
|
]),
|
|
3125
3125
|
_: 3
|
|
3126
3126
|
})),
|
|
3127
|
-
|
|
3127
|
+
x(Ce, M({
|
|
3128
3128
|
modelValue: t(c).modal.visible,
|
|
3129
3129
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => t(c).modal.visible = r),
|
|
3130
3130
|
float: "",
|
|
@@ -3133,31 +3133,31 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3133
3133
|
"overlay-layer": 70,
|
|
3134
3134
|
onOverlayClick: l[1] || (l[1] = (r) => t(c).modal.visible = !1)
|
|
3135
3135
|
}), {
|
|
3136
|
-
default:
|
|
3136
|
+
default: v(() => [
|
|
3137
3137
|
t(c).modal.body ? (n(), s("div", {
|
|
3138
3138
|
key: 0,
|
|
3139
3139
|
style: { "white-space": "pre-wrap" },
|
|
3140
3140
|
innerHTML: t(c).modal.body
|
|
3141
|
-
}, null, 8, To)) :
|
|
3142
|
-
t(c).modal.component ? (n(),
|
|
3141
|
+
}, null, 8, To)) : h("", !0),
|
|
3142
|
+
t(c).modal.component ? (n(), _(pe(t(c).modal.component), { key: 1 })) : h("", !0)
|
|
3143
3143
|
]),
|
|
3144
3144
|
_: 1
|
|
3145
3145
|
}, 16, ["modelValue"]),
|
|
3146
|
-
t(c).prompt.visible ? (n(),
|
|
3147
|
-
default:
|
|
3146
|
+
t(c).prompt.visible ? (n(), _(Ao, le(M({ key: 0 }, t(c).prompt)), {
|
|
3147
|
+
default: v(() => [
|
|
3148
3148
|
O("div", {
|
|
3149
3149
|
innerHTML: t(c).prompt.body
|
|
3150
3150
|
}, null, 8, jo)
|
|
3151
3151
|
]),
|
|
3152
3152
|
_: 1
|
|
3153
|
-
}, 16)) :
|
|
3153
|
+
}, 16)) : h("", !0),
|
|
3154
3154
|
O("div", Ro, [
|
|
3155
|
-
(n(!0), s(
|
|
3155
|
+
(n(!0), s(G, null, E(t(c).toasts, (r) => (n(), _(wo, M({ ref_for: !0 }, r, {
|
|
3156
3156
|
key: `toast-${r.itr}`
|
|
3157
3157
|
}), {
|
|
3158
|
-
default:
|
|
3158
|
+
default: v(() => [
|
|
3159
3159
|
O("div", {
|
|
3160
|
-
innerHTML: t(
|
|
3160
|
+
innerHTML: t(q)(r.text)
|
|
3161
3161
|
}, null, 8, qo)
|
|
3162
3162
|
]),
|
|
3163
3163
|
_: 2
|
|
@@ -3166,10 +3166,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
|
|
|
3166
3166
|
], 2);
|
|
3167
3167
|
};
|
|
3168
3168
|
}
|
|
3169
|
-
}), ul = /* @__PURE__ */
|
|
3169
|
+
}), ul = /* @__PURE__ */ F(Lo, [["__scopeId", "data-v-19b147ab"]]), xo = {}, Mo = { class: "menu" };
|
|
3170
3170
|
function zo(e, c) {
|
|
3171
3171
|
return n(), s("menu", Mo, [
|
|
3172
|
-
(n(!0), s(
|
|
3172
|
+
(n(!0), s(G, null, E(Object.keys(e.$slots), (a) => (n(), s("div", {
|
|
3173
3173
|
key: a,
|
|
3174
3174
|
class: "menu__entry"
|
|
3175
3175
|
}, [
|
|
@@ -3177,7 +3177,7 @@ function zo(e, c) {
|
|
|
3177
3177
|
]))), 128))
|
|
3178
3178
|
]);
|
|
3179
3179
|
}
|
|
3180
|
-
const cl = /* @__PURE__ */
|
|
3180
|
+
const cl = /* @__PURE__ */ F(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb"]]), Eo = { class: "tabs" }, Fo = {
|
|
3181
3181
|
key: 0,
|
|
3182
3182
|
class: "tabs__horizontal"
|
|
3183
3183
|
}, Uo = {
|
|
@@ -3186,7 +3186,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3186
3186
|
}, Ho = ["onClick"], Do = {
|
|
3187
3187
|
key: 1,
|
|
3188
3188
|
class: "tabs__context-menu"
|
|
3189
|
-
}, Qo = ["onClick"], Go = /* @__PURE__ */
|
|
3189
|
+
}, Qo = ["onClick"], Go = /* @__PURE__ */ z({
|
|
3190
3190
|
__name: "aeria-tabs",
|
|
3191
3191
|
props: {
|
|
3192
3192
|
modelValue: {},
|
|
@@ -3196,7 +3196,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3196
3196
|
},
|
|
3197
3197
|
emits: ["update:modelValue", "change"],
|
|
3198
3198
|
setup(e, { emit: c }) {
|
|
3199
|
-
const a = e, o = c, l = lt(), u =
|
|
3199
|
+
const a = e, o = c, l = lt(), u = Ve(), r = Se(), y = Q(() => {
|
|
3200
3200
|
if (a.modelValue)
|
|
3201
3201
|
return a.modelValue;
|
|
3202
3202
|
if (a.query) {
|
|
@@ -3221,49 +3221,49 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3221
3221
|
})), o("change", m), o("update:modelValue", m);
|
|
3222
3222
|
};
|
|
3223
3223
|
return (m, p) => {
|
|
3224
|
-
const
|
|
3224
|
+
const b = N("clickable");
|
|
3225
3225
|
return n(), s("div", Eo, [
|
|
3226
3226
|
t(r).md && !e.dropdown ? (n(), s("div", Fo, [
|
|
3227
3227
|
m.$slots.default ? (n(), s("div", Uo, [
|
|
3228
3228
|
C(m.$slots, "default", {}, void 0, !0)
|
|
3229
|
-
])) :
|
|
3230
|
-
(n(!0), s(
|
|
3231
|
-
key:
|
|
3229
|
+
])) : h("", !0),
|
|
3230
|
+
(n(!0), s(G, null, E(Object.keys(m.$slots).filter((f) => f !== "default"), (f, i) => (n(), s("div", {
|
|
3231
|
+
key: f,
|
|
3232
3232
|
class: U({
|
|
3233
3233
|
tabs__tab: !0,
|
|
3234
|
-
"tabs__tab--current":
|
|
3234
|
+
"tabs__tab--current": f === y.value || !y.value && i === 0
|
|
3235
3235
|
}),
|
|
3236
|
-
onClick: (
|
|
3236
|
+
onClick: (k) => d(f)
|
|
3237
3237
|
}, [
|
|
3238
|
-
C(m.$slots,
|
|
3238
|
+
C(m.$slots, f, {}, void 0, !0)
|
|
3239
3239
|
], 10, Ho))), 128))
|
|
3240
3240
|
])) : (n(), s("div", Do, [
|
|
3241
|
-
|
|
3242
|
-
default:
|
|
3243
|
-
|
|
3241
|
+
x(ke, null, se({
|
|
3242
|
+
default: v(({ visible: f }) => [
|
|
3243
|
+
W((n(), _(H, {
|
|
3244
3244
|
"icon-right": "",
|
|
3245
|
-
active:
|
|
3245
|
+
active: f,
|
|
3246
3246
|
icon: "caret-down",
|
|
3247
3247
|
style: { "--icon-color": "var(--theme-brand-color-shade-1)" },
|
|
3248
3248
|
class: "tabs__context-menu-icon"
|
|
3249
3249
|
}, {
|
|
3250
|
-
default:
|
|
3251
|
-
C(m.$slots,
|
|
3250
|
+
default: v(() => [
|
|
3251
|
+
C(m.$slots, y.value, {}, void 0, !0)
|
|
3252
3252
|
]),
|
|
3253
3253
|
_: 3
|
|
3254
3254
|
}, 8, ["active"])), [
|
|
3255
|
-
[
|
|
3255
|
+
[b]
|
|
3256
3256
|
])
|
|
3257
3257
|
]),
|
|
3258
3258
|
_: 2
|
|
3259
3259
|
}, [
|
|
3260
|
-
|
|
3261
|
-
name:
|
|
3262
|
-
fn:
|
|
3260
|
+
E(Object.keys(m.$slots).filter((f) => f !== "default"), (f) => ({
|
|
3261
|
+
name: f,
|
|
3262
|
+
fn: v(() => [
|
|
3263
3263
|
O("div", {
|
|
3264
|
-
onClick: (
|
|
3264
|
+
onClick: (i) => d(f)
|
|
3265
3265
|
}, [
|
|
3266
|
-
C(m.$slots,
|
|
3266
|
+
C(m.$slots, f, {}, void 0, !0)
|
|
3267
3267
|
], 8, Qo)
|
|
3268
3268
|
])
|
|
3269
3269
|
}))
|
|
@@ -3272,68 +3272,68 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3272
3272
|
]);
|
|
3273
3273
|
};
|
|
3274
3274
|
}
|
|
3275
|
-
}), Wo = /* @__PURE__ */
|
|
3275
|
+
}), Wo = /* @__PURE__ */ F(Go, [["__scopeId", "data-v-35168958"]]), Yo = z({
|
|
3276
3276
|
props: {
|
|
3277
3277
|
initialValue: String,
|
|
3278
3278
|
promise: Promise
|
|
3279
3279
|
},
|
|
3280
3280
|
setup(e) {
|
|
3281
|
-
const c =
|
|
3281
|
+
const c = J(e.initialValue);
|
|
3282
3282
|
return e.promise instanceof Promise && e.promise.then((a) => {
|
|
3283
3283
|
c.value = a;
|
|
3284
3284
|
}), () => it("div", String(c.value));
|
|
3285
3285
|
}
|
|
3286
|
-
}), Ko = ["onClick"], Xo = { key: 1 }, Jo = /* @__PURE__ */
|
|
3286
|
+
}), Ko = ["onClick"], Xo = { key: 1 }, Jo = /* @__PURE__ */ z({
|
|
3287
3287
|
__name: "aeria-crud-topbar",
|
|
3288
3288
|
props: {
|
|
3289
3289
|
collection: {}
|
|
3290
3290
|
},
|
|
3291
3291
|
setup(e) {
|
|
3292
|
-
const c = e, o =
|
|
3293
|
-
const { error: m, result: p } = await d.$functions[
|
|
3294
|
-
filters:
|
|
3292
|
+
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) => {
|
|
3293
|
+
const { error: m, result: p } = await d.$functions[y.badgeFunction]({
|
|
3294
|
+
filters: y.filters
|
|
3295
3295
|
});
|
|
3296
3296
|
return m ? 0 : p;
|
|
3297
3297
|
};
|
|
3298
|
-
return (
|
|
3298
|
+
return (y, d) => u.value && u.value.description.filtersPresets ? (n(), _(Wo, {
|
|
3299
3299
|
key: 0,
|
|
3300
3300
|
dropdown: "",
|
|
3301
3301
|
query: "section"
|
|
3302
|
-
},
|
|
3303
|
-
|
|
3302
|
+
}, se({ _: 2 }, [
|
|
3303
|
+
E(Object.entries(u.value.description.filtersPresets), ([m, p]) => ({
|
|
3304
3304
|
name: m,
|
|
3305
|
-
fn:
|
|
3305
|
+
fn: v(() => [
|
|
3306
3306
|
O("div", {
|
|
3307
3307
|
class: "topbar__preset",
|
|
3308
|
-
onClick: (
|
|
3308
|
+
onClick: (b) => t(Pe)(p, u.value)
|
|
3309
3309
|
}, [
|
|
3310
|
-
p.icon ? (n(),
|
|
3310
|
+
p.icon ? (n(), _(H, {
|
|
3311
3311
|
key: 0,
|
|
3312
3312
|
icon: p.icon
|
|
3313
3313
|
}, {
|
|
3314
|
-
default:
|
|
3315
|
-
D(
|
|
3314
|
+
default: v(() => [
|
|
3315
|
+
D(g(p.label || t(q)(m, { plural: !0 })), 1)
|
|
3316
3316
|
]),
|
|
3317
3317
|
_: 2
|
|
3318
|
-
}, 1032, ["icon"])) : (n(), s("div", Xo,
|
|
3319
|
-
p.badgeFunction ? (n(),
|
|
3320
|
-
default:
|
|
3321
|
-
|
|
3318
|
+
}, 1032, ["icon"])) : (n(), s("div", Xo, g(p.label || t(q)(m, { plural: !0 })), 1)),
|
|
3319
|
+
p.badgeFunction ? (n(), _(he, { key: 2 }, {
|
|
3320
|
+
default: v(() => [
|
|
3321
|
+
x(t(Yo), {
|
|
3322
3322
|
"initial-value": "0",
|
|
3323
3323
|
promise: r(p, u.value)
|
|
3324
3324
|
}, null, 8, ["promise"])
|
|
3325
3325
|
]),
|
|
3326
3326
|
_: 2
|
|
3327
|
-
}, 1024)) :
|
|
3327
|
+
}, 1024)) : h("", !0)
|
|
3328
3328
|
], 8, Ko)
|
|
3329
3329
|
])
|
|
3330
3330
|
}))
|
|
3331
|
-
]), 1024)) :
|
|
3331
|
+
]), 1024)) : h("", !0);
|
|
3332
3332
|
}
|
|
3333
|
-
}), Zo = /* @__PURE__ */
|
|
3333
|
+
}), Zo = /* @__PURE__ */ F(Jo, [["__scopeId", "data-v-f0a45677"]]), Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3334
3334
|
__proto__: null,
|
|
3335
3335
|
default: Zo
|
|
3336
|
-
}, Symbol.toStringTag, { value: "Module" })), dl = /* @__PURE__ */
|
|
3336
|
+
}, Symbol.toStringTag, { value: "Module" })), dl = /* @__PURE__ */ z({
|
|
3337
3337
|
__name: "aeria-password-form",
|
|
3338
3338
|
props: {
|
|
3339
3339
|
modelValue: {}
|
|
@@ -3342,11 +3342,11 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3342
3342
|
setup(e) {
|
|
3343
3343
|
const c = e;
|
|
3344
3344
|
fe(Te, null);
|
|
3345
|
-
const a = yt(), o =
|
|
3345
|
+
const a = yt(), o = Q(() => a(
|
|
3346
3346
|
c.modelValue.password,
|
|
3347
3347
|
c.modelValue.confirmation
|
|
3348
3348
|
));
|
|
3349
|
-
return (l, u) => (n(),
|
|
3349
|
+
return (l, u) => (n(), _(Me, {
|
|
3350
3350
|
form: {
|
|
3351
3351
|
password: {
|
|
3352
3352
|
type: "string",
|
|
@@ -3362,9 +3362,9 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3362
3362
|
"model-value": e.modelValue,
|
|
3363
3363
|
"onUpdate:modelValue": u[0] || (u[0] = (r) => l.$emit("update:modelValue", r))
|
|
3364
3364
|
}, {
|
|
3365
|
-
after:
|
|
3366
|
-
O("div", null,
|
|
3367
|
-
C(l.$slots, "default",
|
|
3365
|
+
after: v(() => [
|
|
3366
|
+
O("div", null, g(o.value || "Senhas conferem"), 1),
|
|
3367
|
+
C(l.$slots, "default", le(be({ passwordError: o.value })))
|
|
3368
3368
|
]),
|
|
3369
3369
|
_: 3
|
|
3370
3370
|
}, 8, ["model-value"]));
|
|
@@ -3387,7 +3387,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3387
3387
|
{
|
|
3388
3388
|
path: "signin",
|
|
3389
3389
|
name: "/user/signin",
|
|
3390
|
-
component: () => import("./signin-
|
|
3390
|
+
component: () => import("./signin-D4zaaucx.js"),
|
|
3391
3391
|
meta: {
|
|
3392
3392
|
title: "Sign in"
|
|
3393
3393
|
}
|
|
@@ -3395,7 +3395,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3395
3395
|
{
|
|
3396
3396
|
path: "signup",
|
|
3397
3397
|
name: "/user/signup",
|
|
3398
|
-
component: () => import("./signup-
|
|
3398
|
+
component: () => import("./signup-Cckhu8jM.js"),
|
|
3399
3399
|
meta: {
|
|
3400
3400
|
title: "Sign up"
|
|
3401
3401
|
}
|
|
@@ -3403,7 +3403,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3403
3403
|
{
|
|
3404
3404
|
path: "redefine-password",
|
|
3405
3405
|
name: "/user/redefine-password",
|
|
3406
|
-
component: () => import("./redefine-password-
|
|
3406
|
+
component: () => import("./redefine-password-208LbEV-.js"),
|
|
3407
3407
|
meta: {
|
|
3408
3408
|
title: "Redefine password"
|
|
3409
3409
|
}
|
|
@@ -3411,7 +3411,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3411
3411
|
{
|
|
3412
3412
|
path: "activation",
|
|
3413
3413
|
name: "/user/activation",
|
|
3414
|
-
component: () => import("./activation-
|
|
3414
|
+
component: () => import("./activation-D1ht_hKa.js"),
|
|
3415
3415
|
meta: {
|
|
3416
3416
|
title: "Activate user"
|
|
3417
3417
|
}
|
|
@@ -3433,7 +3433,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3433
3433
|
name: "/dashboard/:collection",
|
|
3434
3434
|
props: !0,
|
|
3435
3435
|
components: {
|
|
3436
|
-
default: () => import("./index-
|
|
3436
|
+
default: () => import("./index-NtfHe2xW.js"),
|
|
3437
3437
|
topbar: () => Promise.resolve().then(() => Po)
|
|
3438
3438
|
},
|
|
3439
3439
|
meta: {
|
|
@@ -3447,7 +3447,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3447
3447
|
name: "/dashboard/:collection/:id",
|
|
3448
3448
|
props: !0,
|
|
3449
3449
|
components: {
|
|
3450
|
-
default: () => import("./_id_-
|
|
3450
|
+
default: () => import("./_id_-ZT5eej1c.js")
|
|
3451
3451
|
},
|
|
3452
3452
|
meta: {
|
|
3453
3453
|
title: ({ collectionName: a, t: o }) => o(a, {
|
|
@@ -3467,7 +3467,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3467
3467
|
children: [
|
|
3468
3468
|
{
|
|
3469
3469
|
path: "profile",
|
|
3470
|
-
component: () => import("./index-
|
|
3470
|
+
component: () => import("./index-CUdhhNK5.js"),
|
|
3471
3471
|
meta: {
|
|
3472
3472
|
title: "User profile",
|
|
3473
3473
|
icon: "user-square"
|
|
@@ -3476,7 +3476,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
|
|
|
3476
3476
|
{
|
|
3477
3477
|
path: "changepass",
|
|
3478
3478
|
name: "/dashboard/user/changepass",
|
|
3479
|
-
component: () => import("./index-
|
|
3479
|
+
component: () => import("./index-CLSjtiAu.js"),
|
|
3480
3480
|
meta: {
|
|
3481
3481
|
title: "Change password",
|
|
3482
3482
|
icon: "lock"
|
|
@@ -3495,8 +3495,8 @@ export {
|
|
|
3495
3495
|
Zo as F,
|
|
3496
3496
|
ml as G,
|
|
3497
3497
|
pl as H,
|
|
3498
|
-
|
|
3499
|
-
|
|
3498
|
+
F as _,
|
|
3499
|
+
ie as a,
|
|
3500
3500
|
H as b,
|
|
3501
3501
|
dl as c,
|
|
3502
3502
|
_n as d,
|
|
@@ -3504,12 +3504,12 @@ export {
|
|
|
3504
3504
|
Oa as f,
|
|
3505
3505
|
Le as g,
|
|
3506
3506
|
cl as h,
|
|
3507
|
-
|
|
3507
|
+
Ce as i,
|
|
3508
3508
|
sl as j,
|
|
3509
3509
|
he as k,
|
|
3510
|
-
|
|
3510
|
+
me as l,
|
|
3511
3511
|
zt as m,
|
|
3512
|
-
|
|
3512
|
+
ke as n,
|
|
3513
3513
|
uo as o,
|
|
3514
3514
|
Ca as p,
|
|
3515
3515
|
Xt as q,
|