@aeria-ui/ui 0.0.44 → 0.0.46
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/{activation-adac6722.js → activation-48da470d.js} +1 -1
- package/dist/{crud-view-b854fb49.js → crud-view-63769c42.js} +1 -1
- package/dist/{index-03c606a5.js → index-b1a603e9.js} +941 -935
- package/dist/{password-change-aa004ecb.js → password-change-ab424d59.js} +1 -1
- package/dist/{profile-4233fd1d.js → profile-090ce0f0.js} +1 -1
- package/dist/{signin-6d124882.js → signin-98b7bf3a.js} +1 -1
- package/dist/{signup-5fc5d662.js → signup-a12b576e.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/ui.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as q, ref as Y, resolveDirective as ne, openBlock as
|
|
1
|
+
import { defineComponent as q, ref as Y, resolveDirective as ne, openBlock as o, createElementBlock as s, normalizeClass as Q, Fragment as J, renderList as U, withDirectives as Z, toDisplayString as g, createCommentVNode as y, createTextVNode as D, unref as e, renderSlot as A, inject as ve, computed as H, createElementVNode as k, mergeProps as E, createBlock as $, resolveDynamicComponent as he, withCtx as v, useCssVars as Vt, Teleport as Ge, onMounted as mt, watch as re, createVNode as z, vModelDynamic as Ct, onBeforeMount as ft, normalizeStyle as $e, withModifiers as ze, pushScopeId as Fe, popScopeId as qe, provide as ye, normalizeProps as ce, guardReactiveProps as Ve, isRef as vt, createSlots as de, vModelCheckbox as It, onUnmounted as At, resolveComponent as Ot, Suspense as wt, useSlots as Bt, h as St } from "vue";
|
|
2
2
|
import { t as F, useI18n as jt } from "@aeria-ui/i18n";
|
|
3
3
|
import { useScrollObserver as We, useBreakpoints as je, useClipboard as Tt, useMask as Rt, PAGINATION_PER_PAGE_DEFAULTS as Lt, API_URL as yt, request as zt, useDebounce as ht, isDocumentComplete as Mt, convertToSearchQuery as Ft, useAction as qt, convertFromSearchQuery as Ut, usePasswordPolicy as Et } from "@aeria-ui/core";
|
|
4
4
|
import { useStore as ue, getStoreId as Te, useParentStore as ge, STORE_ID as Ue, getGlobalStateManager as $t } from "@aeria-ui/state-management";
|
|
@@ -15,40 +15,40 @@ const Gt = ["onClick"], Wt = { key: 0 }, Xt = {
|
|
|
15
15
|
headers: {}
|
|
16
16
|
},
|
|
17
17
|
setup(c) {
|
|
18
|
-
const
|
|
19
|
-
return (
|
|
20
|
-
const
|
|
21
|
-
return
|
|
18
|
+
const i = Y(null), t = (a) => typeof a == "string" ? a : a.title;
|
|
19
|
+
return (a, l) => {
|
|
20
|
+
const r = ne("clickable");
|
|
21
|
+
return o(), s("div", {
|
|
22
22
|
class: Q({
|
|
23
23
|
accordion: !0,
|
|
24
|
-
"accordion--padded": !
|
|
24
|
+
"accordion--padded": !a.noPadding
|
|
25
25
|
})
|
|
26
26
|
}, [
|
|
27
|
-
(
|
|
27
|
+
(o(!0), s(J, null, U(Object.keys(a.$slots).filter((u) => u !== "default"), (u, p) => (o(), s("div", {
|
|
28
28
|
key: u,
|
|
29
29
|
class: "accordion__slot"
|
|
30
30
|
}, [
|
|
31
|
-
Z((
|
|
31
|
+
Z((o(), s("div", {
|
|
32
32
|
class: "accordion__header",
|
|
33
|
-
onClick: (
|
|
33
|
+
onClick: (d) => i.value === u ? i.value = null : i.value = u
|
|
34
34
|
}, [
|
|
35
|
-
|
|
36
|
-
D(" " +
|
|
35
|
+
a.enumerate ? (o(), s("span", Wt, g(p + 1) + ". ", 1)) : y("", !0),
|
|
36
|
+
D(" " + g(a.headers[u] ? t(a.headers[u]) : e(F)(u)), 1)
|
|
37
37
|
], 8, Gt)), [
|
|
38
|
-
[
|
|
38
|
+
[r]
|
|
39
39
|
]),
|
|
40
|
-
|
|
41
|
-
A(
|
|
40
|
+
i.value === u ? (o(), s("div", Xt, [
|
|
41
|
+
A(a.$slots, u, {}, void 0, !0)
|
|
42
42
|
])) : y("", !0)
|
|
43
43
|
]))), 128))
|
|
44
44
|
], 2);
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
const G = (c,
|
|
48
|
+
const G = (c, i) => {
|
|
49
49
|
const t = c.__vccOpts || c;
|
|
50
|
-
for (const [
|
|
51
|
-
t[
|
|
50
|
+
for (const [a, l] of i)
|
|
51
|
+
t[a] = l;
|
|
52
52
|
return t;
|
|
53
53
|
}, Tl = /* @__PURE__ */ G(Yt, [["__scopeId", "data-v-3ea933d4"]]), Jt = /* @__PURE__ */ q({
|
|
54
54
|
__name: "aeria-badge",
|
|
@@ -57,14 +57,14 @@ const G = (c, r) => {
|
|
|
57
57
|
alt: { type: Boolean }
|
|
58
58
|
},
|
|
59
59
|
setup(c) {
|
|
60
|
-
return (
|
|
60
|
+
return (i, t) => (o(), s("div", {
|
|
61
61
|
class: Q(`
|
|
62
62
|
badge
|
|
63
|
-
${
|
|
64
|
-
${
|
|
63
|
+
${i.large && "badge--large"}
|
|
64
|
+
${i.alt && "badge--alt"}
|
|
65
65
|
`)
|
|
66
66
|
}, [
|
|
67
|
-
A(
|
|
67
|
+
A(i.$slots, "default", {}, void 0, !0)
|
|
68
68
|
], 2));
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -74,18 +74,18 @@ const be = /* @__PURE__ */ G(Jt, [["__scopeId", "data-v-47f92648"]]), Kt = /* @_
|
|
|
74
74
|
disabled: { type: Boolean }
|
|
75
75
|
},
|
|
76
76
|
emits: ["click"],
|
|
77
|
-
setup(c, { emit:
|
|
78
|
-
const t = c,
|
|
79
|
-
t.disabled ||
|
|
77
|
+
setup(c, { emit: i }) {
|
|
78
|
+
const t = c, a = i, l = (r) => {
|
|
79
|
+
t.disabled || a("click", r);
|
|
80
80
|
};
|
|
81
|
-
return (
|
|
81
|
+
return (r, u) => (o(), s("button", {
|
|
82
82
|
class: Q(`
|
|
83
83
|
barebutton
|
|
84
|
-
barebutton--${
|
|
84
|
+
barebutton--${r.disabled ? "disabled" : "enabled"}
|
|
85
85
|
`),
|
|
86
86
|
onClick: l
|
|
87
87
|
}, [
|
|
88
|
-
A(
|
|
88
|
+
A(r.$slots, "default", {}, void 0, !0)
|
|
89
89
|
], 2));
|
|
90
90
|
}
|
|
91
91
|
});
|
|
@@ -103,25 +103,25 @@ const fe = /* @__PURE__ */ G(Kt, [["__scopeId", "data-v-35bc81ae"]]), Zt = ["hre
|
|
|
103
103
|
fill: {}
|
|
104
104
|
},
|
|
105
105
|
setup(c) {
|
|
106
|
-
const
|
|
106
|
+
const i = c, t = typeof i.reactive == "boolean" ? i.reactive : ve("iconReactive", !1), a = H(() => {
|
|
107
107
|
var l;
|
|
108
|
-
return (l =
|
|
108
|
+
return (l = i.icon) != null && l.includes(":") ? i.icon : `regular:${i.icon}`;
|
|
109
109
|
});
|
|
110
|
-
return (l,
|
|
110
|
+
return (l, r) => (o(), s("a", {
|
|
111
111
|
class: Q(`
|
|
112
112
|
icon
|
|
113
113
|
${e(t) && "icon--reactive"}
|
|
114
114
|
${l.$slots.default ? "icon--centered" : "icon--standalone"}
|
|
115
115
|
`)
|
|
116
116
|
}, [
|
|
117
|
-
|
|
117
|
+
k("div", {
|
|
118
118
|
class: Q(`
|
|
119
119
|
icon__icon
|
|
120
120
|
${l.size && `icon__icon--${l.size}`}
|
|
121
121
|
${l.iconRight && "icon__icon--right"}
|
|
122
122
|
`)
|
|
123
123
|
}, [
|
|
124
|
-
(
|
|
124
|
+
(o(), s("svg", E({
|
|
125
125
|
width: "24",
|
|
126
126
|
height: "24",
|
|
127
127
|
viewBox: "0 0 256 256",
|
|
@@ -129,12 +129,12 @@ const fe = /* @__PURE__ */ G(Kt, [["__scopeId", "data-v-35bc81ae"]]), Zt = ["hre
|
|
|
129
129
|
}, {
|
|
130
130
|
...l.fill ? { fill: l.fill } : {}
|
|
131
131
|
}), [
|
|
132
|
-
|
|
133
|
-
href: `/assets/icons.svg#${
|
|
132
|
+
k("use", {
|
|
133
|
+
href: `/assets/icons.svg#${a.value}`
|
|
134
134
|
}, null, 8, Zt)
|
|
135
135
|
], 16))
|
|
136
136
|
], 2),
|
|
137
|
-
l.$slots.default ? (
|
|
137
|
+
l.$slots.default ? (o(), s("div", Pt, [
|
|
138
138
|
A(l.$slots, "default", {}, void 0, !0)
|
|
139
139
|
])) : y("", !0)
|
|
140
140
|
], 2));
|
|
@@ -166,103 +166,103 @@ const K = /* @__PURE__ */ G(Nt, [["__scopeId", "data-v-4b763bd3"]]), xt = { clas
|
|
|
166
166
|
overlayLayer: {}
|
|
167
167
|
},
|
|
168
168
|
emits: ["update:modelValue", "update:collapsed", "update:closeHint", "overlayClick", "close"],
|
|
169
|
-
setup(c, { emit:
|
|
170
|
-
const t = c,
|
|
171
|
-
|
|
169
|
+
setup(c, { emit: i }) {
|
|
170
|
+
const t = c, a = i, l = H(() => t.floating || t.float), r = Y(t.collapsed), u = Y(null), { reachedEnd: p } = We(u), d = () => {
|
|
171
|
+
a("update:modelValue", !1), a("close");
|
|
172
172
|
}, h = () => {
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
|
|
173
|
+
a("overlayClick");
|
|
174
|
+
}, _ = (n) => {
|
|
175
|
+
a("update:collapsed", n), r.value = n;
|
|
176
176
|
};
|
|
177
|
-
return (
|
|
178
|
-
const
|
|
179
|
-
return
|
|
177
|
+
return (n, f) => {
|
|
178
|
+
const V = ne("clickable"), S = ne("loading"), L = ne("overlay");
|
|
179
|
+
return n.modelValue ? Z((o(), s("div", {
|
|
180
180
|
key: 0,
|
|
181
181
|
class: Q(`
|
|
182
182
|
panel
|
|
183
|
-
${
|
|
183
|
+
${n.fixedRight && "panel--fixed"}
|
|
184
184
|
`)
|
|
185
185
|
}, [
|
|
186
|
-
(
|
|
186
|
+
(o(), $(he(
|
|
187
187
|
l.value ? "dialog" : "div"
|
|
188
188
|
), {
|
|
189
189
|
"data-component": "panel",
|
|
190
190
|
class: Q(`
|
|
191
191
|
aeria-surface
|
|
192
192
|
panel__content
|
|
193
|
-
${!(l.value ||
|
|
193
|
+
${!(l.value || n.fixedRight) && "panel__content--rounded"}
|
|
194
194
|
${l.value && "panel__content--floating"}
|
|
195
|
-
${
|
|
196
|
-
${
|
|
197
|
-
${
|
|
198
|
-
${
|
|
199
|
-
${
|
|
195
|
+
${n.bordered && "panel__content--bordered-body"}
|
|
196
|
+
${n.fixedRight && "panel__content--fixed-right"}
|
|
197
|
+
${n.transparent && "panel__content--transparent"}
|
|
198
|
+
${n.transparentMobile && "panel__content--transparent-mobile"}
|
|
199
|
+
${n.outerHeader && "panel__content--outer-header"}
|
|
200
200
|
`),
|
|
201
|
-
onClick:
|
|
201
|
+
onClick: f[1] || (f[1] = (W) => W.stopPropagation())
|
|
202
202
|
}, {
|
|
203
203
|
default: v(() => [
|
|
204
|
-
|
|
204
|
+
n.$slots.header || n.title ? (o(), s("div", {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: Q(`
|
|
207
207
|
panel__header
|
|
208
|
-
${
|
|
209
|
-
${
|
|
208
|
+
${r.value && "panel__header--collapsed"}
|
|
209
|
+
${n.outerHeader && "panel__header--outer"}
|
|
210
210
|
`)
|
|
211
211
|
}, [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
A(
|
|
212
|
+
k("div", xt, [
|
|
213
|
+
n.$slots.header ? A(n.$slots, "header", { key: 0 }, void 0, !0) : n.title ? (o(), s("div", en, g(n.title), 1)) : y("", !0),
|
|
214
|
+
n.$slots.extra ? (o(), s("div", tn, [
|
|
215
|
+
A(n.$slots, "extra", {}, void 0, !0)
|
|
216
216
|
])) : y("", !0)
|
|
217
217
|
]),
|
|
218
|
-
|
|
218
|
+
n.collapsible ? Z((o(), $(K, {
|
|
219
219
|
key: 0,
|
|
220
220
|
reactive: "",
|
|
221
|
-
icon:
|
|
222
|
-
onClick:
|
|
221
|
+
icon: r.value ? "plus" : "minus",
|
|
222
|
+
onClick: f[0] || (f[0] = (W) => _(!r.value))
|
|
223
223
|
}, null, 8, ["icon"])), [
|
|
224
|
-
[
|
|
225
|
-
]) :
|
|
224
|
+
[V]
|
|
225
|
+
]) : n.closeHint ? Z((o(), $(K, {
|
|
226
226
|
key: 1,
|
|
227
227
|
reactive: "",
|
|
228
228
|
icon: "x",
|
|
229
|
-
onClick:
|
|
229
|
+
onClick: d
|
|
230
230
|
}, null, 512)), [
|
|
231
|
-
[
|
|
231
|
+
[V]
|
|
232
232
|
]) : y("", !0)
|
|
233
233
|
], 2)) : y("", !0),
|
|
234
|
-
|
|
234
|
+
r.value ? y("", !0) : Z((o(), s("div", {
|
|
235
235
|
key: 1,
|
|
236
236
|
ref_key: "body",
|
|
237
237
|
ref: u,
|
|
238
238
|
class: Q(`
|
|
239
239
|
panel__body
|
|
240
|
-
${
|
|
240
|
+
${n.fill || "panel__body--padded"}
|
|
241
241
|
`)
|
|
242
242
|
}, [
|
|
243
|
-
A(
|
|
243
|
+
A(n.$slots, "default", {}, void 0, !0)
|
|
244
244
|
], 2)), [
|
|
245
|
-
[S,
|
|
245
|
+
[S, n.loading]
|
|
246
246
|
]),
|
|
247
|
-
|
|
247
|
+
n.$slots.footer ? (o(), s("div", {
|
|
248
248
|
key: 2,
|
|
249
249
|
class: Q(`
|
|
250
250
|
panel__footer
|
|
251
|
-
${
|
|
252
|
-
${e(
|
|
251
|
+
${n.fillFooter || "panel__footer--padded"}
|
|
252
|
+
${e(p) || "panel__footer--shadowed"}
|
|
253
253
|
`)
|
|
254
254
|
}, [
|
|
255
|
-
A(
|
|
255
|
+
A(n.$slots, "footer", {}, void 0, !0)
|
|
256
256
|
], 2)) : y("", !0)
|
|
257
257
|
]),
|
|
258
258
|
_: 3
|
|
259
259
|
}, 8, ["class"]))
|
|
260
260
|
], 2)), [
|
|
261
261
|
[L, {
|
|
262
|
-
condition:
|
|
263
|
-
invisible:
|
|
262
|
+
condition: n.overlay || n.fixedRight || l.value,
|
|
263
|
+
invisible: n.invisibleOverlay,
|
|
264
264
|
click: h,
|
|
265
|
-
layer:
|
|
265
|
+
layer: n.overlayLayer || (l.value ? 60 : n.fixedRight ? 50 : 0)
|
|
266
266
|
}]
|
|
267
267
|
]) : y("", !0);
|
|
268
268
|
};
|
|
@@ -283,36 +283,36 @@ const Ae = /* @__PURE__ */ G(nn, [["__scopeId", "data-v-6fdc75a0"]]), on = { cla
|
|
|
283
283
|
loading: { type: Boolean }
|
|
284
284
|
},
|
|
285
285
|
setup(c) {
|
|
286
|
-
const
|
|
286
|
+
const i = c, t = ve("buttonVariant", i.variant) || "primary", a = (() => {
|
|
287
287
|
switch (!0) {
|
|
288
|
-
case
|
|
288
|
+
case i.small:
|
|
289
289
|
return "small";
|
|
290
|
-
case
|
|
290
|
+
case i.large:
|
|
291
291
|
return "large";
|
|
292
292
|
}
|
|
293
|
-
return ve("buttonSize",
|
|
293
|
+
return ve("buttonSize", i.size) || "medium";
|
|
294
294
|
})();
|
|
295
|
-
return (l,
|
|
295
|
+
return (l, r) => (o(), $(fe, {
|
|
296
296
|
class: Q(`
|
|
297
297
|
button
|
|
298
298
|
button--${e(t)}
|
|
299
|
-
button--${e(
|
|
299
|
+
button--${e(a)}
|
|
300
300
|
${l.loading && "button--loading"}
|
|
301
301
|
`),
|
|
302
302
|
disabled: l.disabled
|
|
303
303
|
}, {
|
|
304
304
|
default: v(() => [
|
|
305
|
-
l.icon ? (
|
|
305
|
+
l.icon ? (o(), $(K, {
|
|
306
306
|
key: 0,
|
|
307
307
|
icon: l.icon
|
|
308
308
|
}, {
|
|
309
309
|
default: v(() => [
|
|
310
|
-
|
|
310
|
+
k("div", on, [
|
|
311
311
|
A(l.$slots, "default", {}, void 0, !0)
|
|
312
312
|
])
|
|
313
313
|
]),
|
|
314
314
|
_: 3
|
|
315
|
-
}, 8, ["icon"])) : (
|
|
315
|
+
}, 8, ["icon"])) : (o(), s("div", an, [
|
|
316
316
|
A(l.$slots, "default", {}, void 0, !0)
|
|
317
317
|
]))
|
|
318
318
|
]),
|
|
@@ -327,25 +327,25 @@ const ie = /* @__PURE__ */ G(ln, [["__scopeId", "data-v-c328251b"]]), sn = { cla
|
|
|
327
327
|
horizontal: { type: Boolean }
|
|
328
328
|
},
|
|
329
329
|
setup(c) {
|
|
330
|
-
return (
|
|
330
|
+
return (i, t) => (o(), s("div", {
|
|
331
331
|
class: Q(`
|
|
332
332
|
card
|
|
333
|
-
${
|
|
334
|
-
${
|
|
333
|
+
${i.inactive && "card--inactive"}
|
|
334
|
+
${i.horizontal && "card--horizontal"}
|
|
335
335
|
`)
|
|
336
336
|
}, [
|
|
337
|
-
|
|
338
|
-
A(
|
|
337
|
+
k("div", sn, [
|
|
338
|
+
A(i.$slots, "default", {}, void 0, !0)
|
|
339
339
|
]),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
A(
|
|
340
|
+
k("div", rn, [
|
|
341
|
+
k("div", un, [
|
|
342
|
+
k("div", null, [
|
|
343
|
+
A(i.$slots, "footer", {}, void 0, !0)
|
|
344
344
|
]),
|
|
345
|
-
|
|
345
|
+
i.$slots.actions ? A(i.$slots, "actions", { key: 0 }, void 0, !0) : y("", !0)
|
|
346
346
|
]),
|
|
347
|
-
|
|
348
|
-
A(
|
|
347
|
+
k("div", cn, [
|
|
348
|
+
A(i.$slots, "badge", {}, void 0, !0)
|
|
349
349
|
])
|
|
350
350
|
])
|
|
351
351
|
], 2));
|
|
@@ -362,92 +362,98 @@ const pn = /* @__PURE__ */ G(dn, [["__scopeId", "data-v-c1a322df"]]), _n = { cla
|
|
|
362
362
|
overlayLayer: {}
|
|
363
363
|
},
|
|
364
364
|
emits: ["actionClick"],
|
|
365
|
-
setup(c, { emit:
|
|
366
|
-
Vt((
|
|
367
|
-
"
|
|
368
|
-
"
|
|
365
|
+
setup(c, { emit: i }) {
|
|
366
|
+
Vt((d) => ({
|
|
367
|
+
"5bf89080": p.value.x,
|
|
368
|
+
"5bf8907e": p.value.y
|
|
369
369
|
}));
|
|
370
|
-
const t =
|
|
371
|
-
h.
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
|
|
370
|
+
const t = i, a = Y(null), l = Y(!1), r = (d) => d == null ? void 0 : d.filter((h) => {
|
|
371
|
+
if (h.roles) {
|
|
372
|
+
const _ = ue("user");
|
|
373
|
+
return h.roles.include(_.currentUser.role);
|
|
374
|
+
}
|
|
375
|
+
return !!h.click;
|
|
376
|
+
}), u = (d, h) => {
|
|
377
|
+
d.click(h), t("actionClick", {
|
|
378
|
+
action: d,
|
|
379
|
+
subject: h
|
|
380
|
+
}), l.value = !1;
|
|
381
|
+
}, p = H(() => {
|
|
382
|
+
if (!a.value)
|
|
377
383
|
return {
|
|
378
384
|
x: 0,
|
|
379
385
|
y: 0
|
|
380
386
|
};
|
|
381
|
-
const
|
|
387
|
+
const d = a.value.getBoundingClientRect().top, h = a.value.getBoundingClientRect().left, _ = a.value.offsetHeight;
|
|
382
388
|
return {
|
|
383
|
-
_:
|
|
384
|
-
x: Math.floor(
|
|
385
|
-
y: Math.floor(
|
|
389
|
+
_: l.value,
|
|
390
|
+
x: Math.floor(h) + "px",
|
|
391
|
+
y: Math.floor(d + _) + "px"
|
|
386
392
|
};
|
|
387
393
|
});
|
|
388
|
-
return (
|
|
389
|
-
const
|
|
390
|
-
return
|
|
391
|
-
Object.keys(
|
|
394
|
+
return (d, h) => {
|
|
395
|
+
const _ = ne("overlay");
|
|
396
|
+
return o(), s(J, null, [
|
|
397
|
+
Object.keys(d.$slots).some((n) => n !== "default") || d.actions !== void 0 && d.actions.length > 0 ? (o(), s("div", {
|
|
392
398
|
key: 0,
|
|
393
399
|
ref_key: "contextmenu",
|
|
394
|
-
ref:
|
|
400
|
+
ref: a,
|
|
395
401
|
class: "contextmenu"
|
|
396
402
|
}, [
|
|
397
|
-
|
|
403
|
+
k("a", {
|
|
398
404
|
class: "contextmenu__trigger",
|
|
399
|
-
onClick:
|
|
405
|
+
onClick: h[0] || (h[0] = (n) => l.value = !0)
|
|
400
406
|
}, [
|
|
401
|
-
A(
|
|
407
|
+
A(d.$slots, "default", {}, void 0, !0)
|
|
402
408
|
])
|
|
403
409
|
], 512)) : y("", !0),
|
|
404
|
-
|
|
410
|
+
l.value ? (o(), $(Ge, {
|
|
405
411
|
key: 1,
|
|
406
412
|
to: "main"
|
|
407
413
|
}, [
|
|
408
|
-
Z((
|
|
409
|
-
modelValue:
|
|
410
|
-
"onUpdate:modelValue":
|
|
414
|
+
Z((o(), $(Ae, {
|
|
415
|
+
modelValue: l.value,
|
|
416
|
+
"onUpdate:modelValue": h[4] || (h[4] = (n) => l.value = n),
|
|
411
417
|
fill: "",
|
|
412
418
|
class: "content"
|
|
413
419
|
}, {
|
|
414
420
|
default: v(() => [
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
A(
|
|
421
|
+
k("div", _n, [
|
|
422
|
+
d.$slots.header ? (o(), s("div", mn, [
|
|
423
|
+
A(d.$slots, "header", {}, void 0, !0)
|
|
418
424
|
])) : y("", !0),
|
|
419
|
-
Object.keys(
|
|
425
|
+
Object.keys(d.$slots).filter((n) => !["default", "extra", "header"].includes(n)).length > 0 ? (o(), s("div", {
|
|
420
426
|
key: 1,
|
|
421
427
|
class: "content__section",
|
|
422
|
-
onClick:
|
|
428
|
+
onClick: h[1] || (h[1] = (n) => l.value = !1)
|
|
423
429
|
}, [
|
|
424
|
-
(
|
|
425
|
-
key: `slot-${
|
|
430
|
+
(o(!0), s(J, null, U(Object.keys(d.$slots).filter((n) => !["default", "extra", "header"].includes(n)), (n, f) => (o(), $(fe, {
|
|
431
|
+
key: `slot-${f}`,
|
|
426
432
|
class: "content__item content__item--reactive"
|
|
427
433
|
}, {
|
|
428
434
|
default: v(() => [
|
|
429
|
-
A(
|
|
435
|
+
A(d.$slots, n, {}, void 0, !0)
|
|
430
436
|
]),
|
|
431
437
|
_: 2
|
|
432
438
|
}, 1024))), 128))
|
|
433
439
|
])) : y("", !0),
|
|
434
|
-
|
|
440
|
+
d.actions !== void 0 && d.actions.length > 0 ? (o(), s("div", {
|
|
435
441
|
key: 2,
|
|
436
442
|
class: "content__section",
|
|
437
|
-
onClick:
|
|
443
|
+
onClick: h[2] || (h[2] = (n) => l.value = !1)
|
|
438
444
|
}, [
|
|
439
|
-
(
|
|
440
|
-
key: `action-${
|
|
445
|
+
(o(!0), s(J, null, U(r(d.actions), (n, f) => (o(), $(fe, {
|
|
446
|
+
key: `action-${f}`,
|
|
441
447
|
class: "content__item content__item--reactive",
|
|
442
|
-
onClick: (
|
|
448
|
+
onClick: (V) => u(n, d.subject)
|
|
443
449
|
}, {
|
|
444
450
|
default: v(() => [
|
|
445
|
-
|
|
451
|
+
n.icon ? (o(), $(K, {
|
|
446
452
|
key: 0,
|
|
447
|
-
icon:
|
|
453
|
+
icon: n.icon
|
|
448
454
|
}, {
|
|
449
455
|
default: v(() => [
|
|
450
|
-
D(
|
|
456
|
+
D(g(n.translate ? e(F)(n.label, { capitalize: !0 }) : n.label), 1)
|
|
451
457
|
]),
|
|
452
458
|
_: 2
|
|
453
459
|
}, 1032, ["icon"])) : y("", !0)
|
|
@@ -455,13 +461,13 @@ const pn = /* @__PURE__ */ G(dn, [["__scopeId", "data-v-c1a322df"]]), _n = { cla
|
|
|
455
461
|
_: 2
|
|
456
462
|
}, 1032, ["onClick"]))), 128))
|
|
457
463
|
])) : y("", !0),
|
|
458
|
-
|
|
464
|
+
d.$slots.extra ? (o(), s("div", {
|
|
459
465
|
key: 3,
|
|
460
466
|
class: "content__section",
|
|
461
|
-
onClick:
|
|
467
|
+
onClick: h[3] || (h[3] = (n) => l.value = !1)
|
|
462
468
|
}, [
|
|
463
|
-
|
|
464
|
-
|
|
469
|
+
k("div", fn, [
|
|
470
|
+
d.$slots.extra ? A(d.$slots, "extra", { key: 0 }, void 0, !0) : y("", !0)
|
|
465
471
|
])
|
|
466
472
|
])) : y("", !0)
|
|
467
473
|
])
|
|
@@ -469,11 +475,11 @@ const pn = /* @__PURE__ */ G(dn, [["__scopeId", "data-v-c1a322df"]]), _n = { cla
|
|
|
469
475
|
_: 3
|
|
470
476
|
}, 8, ["modelValue"])), [
|
|
471
477
|
[
|
|
472
|
-
|
|
478
|
+
_,
|
|
473
479
|
{
|
|
474
|
-
layer:
|
|
480
|
+
layer: d.overlayLayer,
|
|
475
481
|
click: () => {
|
|
476
|
-
|
|
482
|
+
l.value = !1;
|
|
477
483
|
}
|
|
478
484
|
},
|
|
479
485
|
void 0,
|
|
@@ -485,35 +491,35 @@ const pn = /* @__PURE__ */ G(dn, [["__scopeId", "data-v-c1a322df"]]), _n = { cla
|
|
|
485
491
|
};
|
|
486
492
|
}
|
|
487
493
|
});
|
|
488
|
-
const Ce = /* @__PURE__ */ G(vn, [["__scopeId", "data-v-
|
|
494
|
+
const Ce = /* @__PURE__ */ G(vn, [["__scopeId", "data-v-a2accb16"]]), yn = { class: "info__content" }, hn = /* @__PURE__ */ q({
|
|
489
495
|
__name: "aeria-info",
|
|
490
496
|
props: {
|
|
491
497
|
where: {}
|
|
492
498
|
},
|
|
493
499
|
setup(c) {
|
|
494
|
-
const
|
|
495
|
-
return (
|
|
500
|
+
const i = c, t = je(), a = Y(!1), l = i.where || "top";
|
|
501
|
+
return (r, u) => e(t).md ? (o(), s("div", {
|
|
496
502
|
key: 0,
|
|
497
503
|
class: "info",
|
|
498
|
-
onMouseleave: u[1] || (u[1] = (
|
|
504
|
+
onMouseleave: u[1] || (u[1] = (p) => a.value = !1)
|
|
499
505
|
}, [
|
|
500
|
-
|
|
506
|
+
a.value ? (o(), s("div", {
|
|
501
507
|
key: 0,
|
|
502
508
|
class: Q(`
|
|
503
509
|
info__bubble
|
|
504
510
|
info__bubble--${e(l)}
|
|
505
511
|
`)
|
|
506
512
|
}, [
|
|
507
|
-
|
|
508
|
-
A(
|
|
513
|
+
k("div", yn, [
|
|
514
|
+
A(r.$slots, "text", {}, void 0, !0)
|
|
509
515
|
])
|
|
510
516
|
], 2)) : y("", !0),
|
|
511
|
-
|
|
512
|
-
onMouseover: u[0] || (u[0] = (
|
|
517
|
+
k("div", {
|
|
518
|
+
onMouseover: u[0] || (u[0] = (p) => a.value = !0)
|
|
513
519
|
}, [
|
|
514
|
-
A(
|
|
520
|
+
A(r.$slots, "default", {}, void 0, !0)
|
|
515
521
|
], 32)
|
|
516
|
-
], 32)) : A(
|
|
522
|
+
], 32)) : A(r.$slots, "default", { key: 1 }, void 0, !0);
|
|
517
523
|
}
|
|
518
524
|
});
|
|
519
525
|
const $n = /* @__PURE__ */ G(hn, [["__scopeId", "data-v-76defa0b"]]), bn = { class: "input" }, gn = {
|
|
@@ -536,20 +542,20 @@ const $n = /* @__PURE__ */ G(hn, [["__scopeId", "data-v-76defa0b"]]), bn = { cla
|
|
|
536
542
|
variant: {}
|
|
537
543
|
},
|
|
538
544
|
emits: ["update:modelValue", "input", "change"],
|
|
539
|
-
setup(c, { emit:
|
|
545
|
+
setup(c, { emit: i }) {
|
|
540
546
|
var O;
|
|
541
|
-
const t = c,
|
|
547
|
+
const t = c, a = t.property || {}, l = "icon" in a || "inputType" in a && a.inputType === "search", r = ve("searchOnly", !1), u = ve("innerInputLabel", !1), p = !r && a.readOnly, d = Tt(), h = i, _ = ve("inputVariant", t.variant) || "normal", n = {
|
|
542
548
|
name: t.propertyName,
|
|
543
|
-
readonly:
|
|
549
|
+
readonly: p,
|
|
544
550
|
type: (() => {
|
|
545
|
-
if ("type" in
|
|
546
|
-
switch (
|
|
551
|
+
if ("type" in a)
|
|
552
|
+
switch (a.type) {
|
|
547
553
|
case "number":
|
|
548
554
|
case "integer":
|
|
549
555
|
return "number";
|
|
550
556
|
}
|
|
551
|
-
if (
|
|
552
|
-
return
|
|
557
|
+
if (a.inputType)
|
|
558
|
+
return a.inputType;
|
|
553
559
|
switch (typeof t.modelValue) {
|
|
554
560
|
case "string":
|
|
555
561
|
return "text";
|
|
@@ -559,34 +565,34 @@ const $n = /* @__PURE__ */ G(hn, [["__scopeId", "data-v-76defa0b"]]), bn = { cla
|
|
|
559
565
|
return "text";
|
|
560
566
|
}
|
|
561
567
|
})(),
|
|
562
|
-
placeholder: u ?
|
|
568
|
+
placeholder: u ? a.description || t.propertyName : a.placeholder
|
|
563
569
|
};
|
|
564
|
-
"type" in
|
|
570
|
+
"type" in a && ((a.type === "number" || a.type === "integer") && (a.minimum && (n.min = a.minimum), a.exclusiveMinimum && (n.min = a.exclusiveMinimum + 1), a.maximum && (n.max = a.maximum), a.exclusiveMaximum && (n.max = a.exclusiveMaximum - 1)), a.type === "string" && ((a.format === "date" || a.format === "date-time") && (n.type = !r && a.format === "date-time" ? "datetime-local" : "date"), n.minlength = a.minLength, n.maxlength = a.maxLength)), n.type === "text" && r && (n.type = "search"), mt(() => {
|
|
565
571
|
t.modelValue !== null && W(t.modelValue);
|
|
566
572
|
});
|
|
567
|
-
const
|
|
573
|
+
const f = () => {
|
|
568
574
|
try {
|
|
569
575
|
return t.modelValue ? new Date(t.modelValue).toISOString().split("T").shift() : "";
|
|
570
576
|
} catch {
|
|
571
577
|
return "";
|
|
572
578
|
}
|
|
573
|
-
},
|
|
579
|
+
}, V = Y([
|
|
574
580
|
"date",
|
|
575
581
|
"date-time"
|
|
576
|
-
].includes(
|
|
582
|
+
].includes(n.type) ? f() : t.modelValue === null || t.modelValue === void 0 ? "" : t.modelValue), S = ((O = t.property) == null ? void 0 : O.type) === "string" && t.property.mask ? Rt(t.property.mask) : null, L = (M) => {
|
|
577
583
|
var X;
|
|
578
|
-
return typeof
|
|
584
|
+
return typeof V.value == "string" && ((X = t.property) == null ? void 0 : X.type) === "string" && S !== null ? (V.value = S.enmask(V.value, void 0, {
|
|
579
585
|
defaultValue: !0
|
|
580
|
-
}), t.property.maskedValue === !0 ?
|
|
586
|
+
}), t.property.maskedValue === !0 ? V.value : S.unmask(V.value)) : M;
|
|
581
587
|
}, W = (M) => {
|
|
582
588
|
const X = (() => {
|
|
583
589
|
if (!M || typeof M != "string")
|
|
584
590
|
return M;
|
|
585
|
-
if (
|
|
591
|
+
if (n.type === "number" || n.type === "integer")
|
|
586
592
|
return Number(M);
|
|
587
|
-
if (!("type" in
|
|
593
|
+
if (!("type" in a && a.type === "string"))
|
|
588
594
|
return L(M);
|
|
589
|
-
switch (
|
|
595
|
+
switch (a.format) {
|
|
590
596
|
case "date":
|
|
591
597
|
case "date-time":
|
|
592
598
|
return new Date(M);
|
|
@@ -597,70 +603,70 @@ const $n = /* @__PURE__ */ G(hn, [["__scopeId", "data-v-76defa0b"]]), bn = { cla
|
|
|
597
603
|
h("input", X), h("update:modelValue", X);
|
|
598
604
|
}, P = (M) => {
|
|
599
605
|
const X = M.target.value;
|
|
600
|
-
|
|
606
|
+
V.value = X, W(X);
|
|
601
607
|
};
|
|
602
608
|
return re(() => t.modelValue, (M, X) => {
|
|
603
|
-
M instanceof Date || (X && !M ?
|
|
609
|
+
M instanceof Date || (X && !M ? V.value = void 0 : V.value = S ? S.enmask(String(M), void 0, {
|
|
604
610
|
defaultValue: !0
|
|
605
611
|
}) : String(M));
|
|
606
612
|
}), (M, X) => {
|
|
607
613
|
const w = ne("focus"), ee = ne("clickable");
|
|
608
|
-
return
|
|
609
|
-
e(u) ? y("", !0) : (
|
|
614
|
+
return o(), s("label", bn, [
|
|
615
|
+
e(u) ? y("", !0) : (o(), s("div", gn, [
|
|
610
616
|
M.$slots.default ? A(M.$slots, "default", { key: 0 }, void 0, !0) : A(M.$slots, "description", { key: 1 }, void 0, !0)
|
|
611
617
|
])),
|
|
612
|
-
M.$slots.hint ? (
|
|
618
|
+
M.$slots.hint ? (o(), s("div", kn, [
|
|
613
619
|
A(M.$slots, "hint", {}, void 0, !0)
|
|
614
620
|
])) : y("", !0),
|
|
615
|
-
"element" in e(
|
|
621
|
+
"element" in e(a) && e(a).element === "textarea" ? (o(), s("div", {
|
|
616
622
|
key: 2,
|
|
617
623
|
class: Q(`
|
|
618
624
|
input__container
|
|
619
|
-
input__container--${e(
|
|
625
|
+
input__container--${e(_)}
|
|
620
626
|
`)
|
|
621
627
|
}, [
|
|
622
|
-
Z(
|
|
623
|
-
placeholder:
|
|
624
|
-
readonly:
|
|
628
|
+
Z(k("textarea", {
|
|
629
|
+
placeholder: n.placeholder,
|
|
630
|
+
readonly: n.readonly,
|
|
625
631
|
value: M.modelValue,
|
|
626
632
|
class: Q(`
|
|
627
633
|
input__textarea
|
|
628
|
-
input__input--${e(
|
|
634
|
+
input__input--${e(_)}
|
|
629
635
|
`),
|
|
630
636
|
onInput: P
|
|
631
637
|
}, null, 42, Vn), [
|
|
632
|
-
[w, e(
|
|
638
|
+
[w, e(a).focus]
|
|
633
639
|
])
|
|
634
|
-
], 2)) : (
|
|
640
|
+
], 2)) : (o(), s("div", {
|
|
635
641
|
key: 3,
|
|
636
642
|
class: Q(`
|
|
637
643
|
input__container
|
|
638
|
-
input__container--${e(
|
|
644
|
+
input__container--${e(_)}
|
|
639
645
|
`)
|
|
640
646
|
}, [
|
|
641
|
-
Z(
|
|
642
|
-
value:
|
|
647
|
+
Z(k("input", E(n, {
|
|
648
|
+
value: V.value,
|
|
643
649
|
"data-component": "input",
|
|
644
650
|
class: `
|
|
645
651
|
input__input
|
|
646
|
-
input__input--${e(
|
|
652
|
+
input__input--${e(_)}
|
|
647
653
|
${e(l) && "input__input--icon"}
|
|
648
|
-
${e(
|
|
654
|
+
${e(p) && "input__input--readOnly"}
|
|
649
655
|
`,
|
|
650
656
|
onInput: P,
|
|
651
657
|
onChange: X[0] || (X[0] = (C) => h("change", C))
|
|
652
658
|
}), null, 16, Cn), [
|
|
653
|
-
[w, e(
|
|
659
|
+
[w, e(a).focus]
|
|
654
660
|
]),
|
|
655
|
-
e(l) ? (
|
|
661
|
+
e(l) ? (o(), $(K, {
|
|
656
662
|
key: 0,
|
|
657
|
-
icon: e(
|
|
663
|
+
icon: e(a).icon || "magnifying-glass",
|
|
658
664
|
class: Q(`
|
|
659
665
|
input__icon
|
|
660
|
-
input__icon--${e(
|
|
666
|
+
input__icon--${e(_)}
|
|
661
667
|
`)
|
|
662
668
|
}, null, 8, ["icon", "class"])) : y("", !0),
|
|
663
|
-
e(
|
|
669
|
+
e(p) ? (o(), s("div", In, [
|
|
664
670
|
z($n, null, {
|
|
665
671
|
text: v(() => [
|
|
666
672
|
D("Copiar")
|
|
@@ -668,7 +674,7 @@ const $n = /* @__PURE__ */ G(hn, [["__scopeId", "data-v-76defa0b"]]), bn = { cla
|
|
|
668
674
|
default: v(() => [
|
|
669
675
|
Z(z(K, {
|
|
670
676
|
icon: "clipboard",
|
|
671
|
-
onClick: X[1] || (X[1] = (C) => e(
|
|
677
|
+
onClick: X[1] || (X[1] = (C) => e(d)(String(M.modelValue || "")))
|
|
672
678
|
}, null, 512), [
|
|
673
679
|
[ee]
|
|
674
680
|
])
|
|
@@ -697,37 +703,37 @@ const Ie = /* @__PURE__ */ G(An, [["__scopeId", "data-v-4bdda204"]]), On = ["val
|
|
|
697
703
|
noOutline: { type: Boolean }
|
|
698
704
|
},
|
|
699
705
|
emits: ["update:modelValue", "change"],
|
|
700
|
-
setup(c, { emit:
|
|
701
|
-
const t = c,
|
|
702
|
-
t.booleanRef && (
|
|
703
|
-
},
|
|
704
|
-
const
|
|
706
|
+
setup(c, { emit: i }) {
|
|
707
|
+
const t = c, a = i, l = Y(null), r = t.property || {}, u = (_) => {
|
|
708
|
+
t.booleanRef && (p.value = _), a("update:modelValue", (_ == null ? void 0 : _._id) || _), a("change", (_ == null ? void 0 : _._id) || _);
|
|
709
|
+
}, p = t.booleanRef ? (() => {
|
|
710
|
+
const _ = Y(t.modelValue);
|
|
705
711
|
return H({
|
|
706
|
-
get: () =>
|
|
707
|
-
set: (
|
|
708
|
-
|
|
712
|
+
get: () => _.value === "true" ? !0 : _.value === "false" ? !1 : null,
|
|
713
|
+
set: (f) => {
|
|
714
|
+
_.value = f;
|
|
709
715
|
}
|
|
710
716
|
});
|
|
711
717
|
})() : H({
|
|
712
718
|
get: () => t.modelValue,
|
|
713
719
|
set: u
|
|
714
|
-
}),
|
|
715
|
-
return t.multiple && re(() => t.modelValue, (
|
|
716
|
-
var
|
|
720
|
+
}), d = (_) => Array.isArray(t.modelValue) ? t.modelValue.includes(_) : t.modelValue === _, h = H(() => t.multiple ? typeof t.multiple == "number" ? t.multiple : 5 : 1);
|
|
721
|
+
return t.multiple && re(() => t.modelValue, (_) => {
|
|
722
|
+
var f;
|
|
717
723
|
if (!l.value)
|
|
718
724
|
return;
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
}), (
|
|
725
|
+
const n = l.value.querySelector('option[data-selected="true"]');
|
|
726
|
+
n && n.removeAttribute("data-selected"), (f = l.value.querySelector(`option[value="${_}"]`)) == null || f.setAttribute("data-selected", "true");
|
|
727
|
+
}), (_, n) => (o(), s("div", {
|
|
722
728
|
class: Q({
|
|
723
729
|
select: !0,
|
|
724
|
-
"select--outline": !
|
|
730
|
+
"select--outline": !_.noOutline
|
|
725
731
|
})
|
|
726
732
|
}, [
|
|
727
|
-
|
|
733
|
+
k("select", E({
|
|
728
734
|
ref_key: "select",
|
|
729
735
|
ref: l,
|
|
730
|
-
value: e(
|
|
736
|
+
value: e(p)
|
|
731
737
|
}, {
|
|
732
738
|
size: h.value
|
|
733
739
|
}, {
|
|
@@ -735,19 +741,19 @@ const Ie = /* @__PURE__ */ G(An, [["__scopeId", "data-v-4bdda204"]]), On = ["val
|
|
|
735
741
|
select__select: !0,
|
|
736
742
|
"select__select--multiple": !!t.multiple
|
|
737
743
|
},
|
|
738
|
-
onChange:
|
|
744
|
+
onChange: n[0] || (n[0] = (f) => u(f.target.value))
|
|
739
745
|
}), [
|
|
740
|
-
e(
|
|
746
|
+
e(r).icon ? (o(), $(K, {
|
|
741
747
|
key: 0,
|
|
742
|
-
icon: e(
|
|
748
|
+
icon: e(r).icon
|
|
743
749
|
}, null, 8, ["icon"])) : y("", !0),
|
|
744
|
-
t.multiple ? y("", !0) : (
|
|
745
|
-
(
|
|
746
|
-
key:
|
|
747
|
-
value:
|
|
748
|
-
"data-selected":
|
|
749
|
-
},
|
|
750
|
-
A(
|
|
750
|
+
t.multiple ? y("", !0) : (o(), s("option", wn, g(e(F)("none")), 1)),
|
|
751
|
+
(o(!0), s(J, null, U("enum" in e(r) ? e(r).enum : [], (f) => (o(), s("option", {
|
|
752
|
+
key: f,
|
|
753
|
+
value: f,
|
|
754
|
+
"data-selected": d(f)
|
|
755
|
+
}, g(e(r).translate ? e(F)(f) : f), 9, Bn))), 128)),
|
|
756
|
+
A(_.$slots, "default", {}, void 0, !0)
|
|
751
757
|
], 16, On)
|
|
752
758
|
], 2));
|
|
753
759
|
}
|
|
@@ -758,32 +764,32 @@ const Ee = /* @__PURE__ */ G(Sn, [["__scopeId", "data-v-7a33443b"]]), jn = { cla
|
|
|
758
764
|
pagination: {}
|
|
759
765
|
},
|
|
760
766
|
emits: ["paginate"],
|
|
761
|
-
setup(c, { emit:
|
|
762
|
-
const t = c,
|
|
767
|
+
setup(c, { emit: i }) {
|
|
768
|
+
const t = c, a = i, l = H({
|
|
763
769
|
get: () => Math.floor(t.pagination.offset / t.pagination.limit),
|
|
764
770
|
set: (h) => {
|
|
765
771
|
t.pagination.offset = h * t.pagination.limit;
|
|
766
772
|
}
|
|
767
|
-
}),
|
|
773
|
+
}), r = H({
|
|
768
774
|
get: () => t.pagination.limit,
|
|
769
775
|
set: (h) => {
|
|
770
776
|
t.pagination.limit = Number(h);
|
|
771
777
|
}
|
|
772
|
-
}), u = Y(l.value ? l.value + 1 : 1),
|
|
778
|
+
}), u = Y(l.value ? l.value + 1 : 1), p = H(() => Math.ceil(t.pagination.recordsTotal / t.pagination.limit)), d = (h) => {
|
|
773
779
|
l.value = h === "previous" ? l.value - 1 : l.value + 1;
|
|
774
780
|
};
|
|
775
781
|
return re([
|
|
776
782
|
l,
|
|
777
|
-
|
|
783
|
+
r
|
|
778
784
|
], ([h]) => {
|
|
779
|
-
u.value = h + 1,
|
|
780
|
-
offset: l.value *
|
|
781
|
-
limit:
|
|
785
|
+
u.value = h + 1, a("paginate", {
|
|
786
|
+
offset: l.value * r.value,
|
|
787
|
+
limit: r.value
|
|
782
788
|
});
|
|
783
|
-
}), (h,
|
|
789
|
+
}), (h, _) => (o(), s("div", jn, [
|
|
784
790
|
z(Ee, {
|
|
785
|
-
modelValue:
|
|
786
|
-
"onUpdate:modelValue":
|
|
791
|
+
modelValue: r.value,
|
|
792
|
+
"onUpdate:modelValue": _[0] || (_[0] = (n) => r.value = n),
|
|
787
793
|
property: {
|
|
788
794
|
enum: [],
|
|
789
795
|
icon: "list"
|
|
@@ -791,16 +797,16 @@ const Ee = /* @__PURE__ */ G(Sn, [["__scopeId", "data-v-7a33443b"]]), jn = { cla
|
|
|
791
797
|
class: "pagination__control"
|
|
792
798
|
}, {
|
|
793
799
|
default: v(() => [
|
|
794
|
-
(
|
|
795
|
-
key: `limit-${
|
|
796
|
-
value:
|
|
797
|
-
},
|
|
800
|
+
(o(!0), s(J, null, U(e(Lt), (n) => (o(), s("option", {
|
|
801
|
+
key: `limit-${n}`,
|
|
802
|
+
value: n
|
|
803
|
+
}, g(n), 9, Tn))), 128))
|
|
798
804
|
]),
|
|
799
805
|
_: 1
|
|
800
806
|
}, 8, ["modelValue"]),
|
|
801
|
-
|
|
807
|
+
k("div", Rn, [
|
|
802
808
|
z(fe, {
|
|
803
|
-
onClick:
|
|
809
|
+
onClick: _[1] || (_[1] = (n) => l.value = 0)
|
|
804
810
|
}, {
|
|
805
811
|
default: v(() => [
|
|
806
812
|
z(K, {
|
|
@@ -812,7 +818,7 @@ const Ee = /* @__PURE__ */ G(Sn, [["__scopeId", "data-v-7a33443b"]]), jn = { cla
|
|
|
812
818
|
}),
|
|
813
819
|
z(fe, {
|
|
814
820
|
disabled: l.value === 0,
|
|
815
|
-
onClick:
|
|
821
|
+
onClick: _[2] || (_[2] = (n) => d("previous"))
|
|
816
822
|
}, {
|
|
817
823
|
default: v(() => [
|
|
818
824
|
z(K, {
|
|
@@ -822,24 +828,24 @@ const Ee = /* @__PURE__ */ G(Sn, [["__scopeId", "data-v-7a33443b"]]), jn = { cla
|
|
|
822
828
|
]),
|
|
823
829
|
_: 1
|
|
824
830
|
}, 8, ["disabled"]),
|
|
825
|
-
|
|
826
|
-
(
|
|
831
|
+
k("div", Ln, [
|
|
832
|
+
(o(), $(Ie, {
|
|
827
833
|
key: l.value,
|
|
828
834
|
modelValue: u.value,
|
|
829
|
-
"onUpdate:modelValue":
|
|
835
|
+
"onUpdate:modelValue": _[3] || (_[3] = (n) => u.value = n),
|
|
830
836
|
property: {
|
|
831
837
|
type: "number",
|
|
832
838
|
minimum: 1
|
|
833
839
|
},
|
|
834
|
-
onChange:
|
|
840
|
+
onChange: _[4] || (_[4] = (n) => {
|
|
835
841
|
l.value = u.value === 0 ? 0 : u.value - 1;
|
|
836
842
|
})
|
|
837
843
|
}, null, 8, ["modelValue"])),
|
|
838
|
-
|
|
844
|
+
k("span", null, g(e(F)("of")) + " " + g(p.value), 1)
|
|
839
845
|
]),
|
|
840
846
|
z(fe, {
|
|
841
|
-
disabled: l.value ===
|
|
842
|
-
onClick:
|
|
847
|
+
disabled: l.value === p.value - 1,
|
|
848
|
+
onClick: _[5] || (_[5] = (n) => d("next"))
|
|
843
849
|
}, {
|
|
844
850
|
default: v(() => [
|
|
845
851
|
z(K, {
|
|
@@ -850,7 +856,7 @@ const Ee = /* @__PURE__ */ G(Sn, [["__scopeId", "data-v-7a33443b"]]), jn = { cla
|
|
|
850
856
|
_: 1
|
|
851
857
|
}, 8, ["disabled"]),
|
|
852
858
|
z(fe, {
|
|
853
|
-
onClick:
|
|
859
|
+
onClick: _[6] || (_[6] = (n) => l.value = p.value - 1)
|
|
854
860
|
}, {
|
|
855
861
|
default: v(() => [
|
|
856
862
|
z(K, {
|
|
@@ -879,66 +885,66 @@ const Mn = /* @__PURE__ */ G(zn, [["__scopeId", "data-v-41aa1ffc"]]), Fn = { cla
|
|
|
879
885
|
variant: {}
|
|
880
886
|
},
|
|
881
887
|
emits: ["update:modelValue", "change"],
|
|
882
|
-
setup(c, { emit:
|
|
883
|
-
const t = c,
|
|
888
|
+
setup(c, { emit: i }) {
|
|
889
|
+
const t = c, a = t.property || {}, l = !("enum" in a) && [
|
|
884
890
|
"array",
|
|
885
891
|
"boolean"
|
|
886
|
-
].includes(
|
|
892
|
+
].includes(a.type) ? "checkbox" : "radio", r = i, u = t.value || !1, p = H({
|
|
887
893
|
get: () => {
|
|
888
|
-
var
|
|
889
|
-
return "type" in
|
|
894
|
+
var d;
|
|
895
|
+
return "type" in a && a.type === "boolean" ? !!t.value : "items" in a ? (d = t.modelValue) == null ? void 0 : d.includes(t.value) : t.modelValue === t.value;
|
|
890
896
|
},
|
|
891
897
|
set: () => {
|
|
892
|
-
var
|
|
893
|
-
if (!
|
|
894
|
-
if ("type" in
|
|
895
|
-
|
|
898
|
+
var d;
|
|
899
|
+
if (!a.readOnly) {
|
|
900
|
+
if ("type" in a && a.type === "boolean") {
|
|
901
|
+
r("update:modelValue", !t.modelValue);
|
|
896
902
|
return;
|
|
897
903
|
}
|
|
898
|
-
if ("items" in
|
|
899
|
-
|
|
904
|
+
if ("items" in a) {
|
|
905
|
+
r("update:modelValue", (d = t.modelValue) != null && d.includes(u) ? t.modelValue.filter((h) => h !== u) : [
|
|
900
906
|
...t.modelValue || [],
|
|
901
907
|
u
|
|
902
908
|
]);
|
|
903
909
|
return;
|
|
904
910
|
}
|
|
905
|
-
|
|
911
|
+
r("update:modelValue", t.value);
|
|
906
912
|
}
|
|
907
913
|
}
|
|
908
914
|
});
|
|
909
|
-
return (
|
|
910
|
-
const
|
|
911
|
-
return Z((
|
|
915
|
+
return (d, h) => {
|
|
916
|
+
const _ = ne("clickable");
|
|
917
|
+
return Z((o(), s("label", {
|
|
912
918
|
class: Q(`
|
|
913
919
|
checkbox
|
|
914
|
-
${e(
|
|
920
|
+
${e(a).readOnly && "checkbox--readOnly"}
|
|
915
921
|
`)
|
|
916
922
|
}, [
|
|
917
|
-
Z(
|
|
918
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
923
|
+
Z(k("input", E({
|
|
924
|
+
"onUpdate:modelValue": h[0] || (h[0] = (n) => p.value = n)
|
|
919
925
|
}, {
|
|
920
926
|
type: e(l),
|
|
921
|
-
readOnly: e(
|
|
922
|
-
checked:
|
|
927
|
+
readOnly: e(a).readOnly,
|
|
928
|
+
checked: p.value
|
|
923
929
|
}, { class: "checkbox__input" }), null, 16), [
|
|
924
|
-
[Ct,
|
|
930
|
+
[Ct, p.value]
|
|
925
931
|
]),
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
932
|
+
k("div", Fn, [
|
|
933
|
+
k("div", null, [
|
|
934
|
+
d.$slots.description ? A(d.$slots, "description", { key: 0 }, void 0, !0) : e(u) ? (o(), s("div", {
|
|
929
935
|
key: 1,
|
|
930
|
-
innerHTML: e(
|
|
931
|
-
}, null, 8, qn)) : A(
|
|
936
|
+
innerHTML: e(a).translate ? e(F)(e(u)) : e(u)
|
|
937
|
+
}, null, 8, qn)) : A(d.$slots, "default", { key: 2 }, void 0, !0)
|
|
932
938
|
]),
|
|
933
|
-
|
|
934
|
-
|
|
939
|
+
k("div", Un, [
|
|
940
|
+
d.$slots.hint ? A(d.$slots, "hint", { key: 0 }, void 0, !0) : e(a).hint ? (o(), s("div", {
|
|
935
941
|
key: 1,
|
|
936
|
-
innerHTML: e(
|
|
942
|
+
innerHTML: e(a).hint
|
|
937
943
|
}, null, 8, En)) : y("", !0)
|
|
938
944
|
])
|
|
939
945
|
])
|
|
940
946
|
], 2)), [
|
|
941
|
-
[
|
|
947
|
+
[_]
|
|
942
948
|
]);
|
|
943
949
|
};
|
|
944
950
|
}
|
|
@@ -957,38 +963,38 @@ const Qn = /* @__PURE__ */ G(Dn, [["__scopeId", "data-v-256eb557"]]), Gn = {
|
|
|
957
963
|
columns: { default: 1 }
|
|
958
964
|
},
|
|
959
965
|
emits: ["update:modelValue"],
|
|
960
|
-
setup(c, { emit:
|
|
961
|
-
const t = c,
|
|
962
|
-
|
|
966
|
+
setup(c, { emit: i }) {
|
|
967
|
+
const t = c, a = i, l = "items" in t.property ? t.property.items.enum : t.property.enum, r = (u) => {
|
|
968
|
+
a("update:modelValue", u);
|
|
963
969
|
};
|
|
964
970
|
return ft(() => {
|
|
965
|
-
t.modelValue ||
|
|
971
|
+
t.modelValue || a(
|
|
966
972
|
"update:modelValue",
|
|
967
973
|
"items" in t.property ? [] : ""
|
|
968
974
|
);
|
|
969
|
-
}), (u,
|
|
975
|
+
}), (u, p) => (o(), s("div", {
|
|
970
976
|
class: "options",
|
|
971
977
|
style: $e(`
|
|
972
978
|
--columns: ${u.columns};
|
|
973
979
|
grid-template-columns: repeat(var(--columns), 1fr);
|
|
974
980
|
`)
|
|
975
981
|
}, [
|
|
976
|
-
(
|
|
977
|
-
key: `option-${
|
|
982
|
+
(o(!0), s(J, null, U(e(l), (d) => (o(), s("div", {
|
|
983
|
+
key: `option-${d}`,
|
|
978
984
|
class: "options__checkbox"
|
|
979
985
|
}, [
|
|
980
986
|
z(Qn, E({ ref_for: !0 }, {
|
|
981
|
-
value:
|
|
987
|
+
value: d,
|
|
982
988
|
property: u.property
|
|
983
989
|
}, {
|
|
984
990
|
"model-value": u.modelValue,
|
|
985
|
-
"onUpdate:modelValue":
|
|
991
|
+
"onUpdate:modelValue": r
|
|
986
992
|
}), null, 16, ["model-value"])
|
|
987
993
|
]))), 128))
|
|
988
994
|
], 4));
|
|
989
995
|
}
|
|
990
996
|
});
|
|
991
|
-
const Xn = /* @__PURE__ */ G(Wn, [["__scopeId", "data-v-43cda372"]]), Yn = (c) => (Fe("data-v-30f5a5ca"), c = c(), qe(), c), Jn = { class: "switch-wrapper" }, Kn = /* @__PURE__ */ Yn(() => /* @__PURE__ */
|
|
997
|
+
const Xn = /* @__PURE__ */ G(Wn, [["__scopeId", "data-v-43cda372"]]), Yn = (c) => (Fe("data-v-30f5a5ca"), c = c(), qe(), c), Jn = { class: "switch-wrapper" }, Kn = /* @__PURE__ */ Yn(() => /* @__PURE__ */ k("div", { class: "switch__slider" }, null, -1)), Zn = { key: 1 }, Pn = {
|
|
992
998
|
inheritAttrs: !1
|
|
993
999
|
}, Nn = /* @__PURE__ */ q({
|
|
994
1000
|
...Pn,
|
|
@@ -1001,34 +1007,34 @@ const Xn = /* @__PURE__ */ G(Wn, [["__scopeId", "data-v-43cda372"]]), Yn = (c) =
|
|
|
1001
1007
|
parentCollection: {}
|
|
1002
1008
|
},
|
|
1003
1009
|
emits: ["update:modelValue", "change"],
|
|
1004
|
-
setup(c, { emit:
|
|
1005
|
-
const t = c,
|
|
1006
|
-
l.readOnly || (
|
|
1010
|
+
setup(c, { emit: i }) {
|
|
1011
|
+
const t = c, a = i, l = t.property || {}, r = () => {
|
|
1012
|
+
l.readOnly || (a("change", !t.modelValue), a("update:modelValue", !t.modelValue));
|
|
1007
1013
|
};
|
|
1008
|
-
return (u,
|
|
1009
|
-
const
|
|
1010
|
-
return
|
|
1011
|
-
Z((
|
|
1014
|
+
return (u, p) => {
|
|
1015
|
+
const d = ne("clickable");
|
|
1016
|
+
return o(), s("div", Jn, [
|
|
1017
|
+
Z((o(), s("a", {
|
|
1012
1018
|
class: Q(`
|
|
1013
1019
|
switch
|
|
1014
1020
|
${u.modelValue && "switch--active"}
|
|
1015
1021
|
${e(l).readOnly && "switch--readOnly"}
|
|
1016
1022
|
`),
|
|
1017
|
-
onClick: ze(
|
|
1023
|
+
onClick: ze(r, ["stop"])
|
|
1018
1024
|
}, [
|
|
1019
1025
|
Kn,
|
|
1020
|
-
|
|
1026
|
+
k("div", {
|
|
1021
1027
|
class: Q(`
|
|
1022
1028
|
switch__dummy
|
|
1023
1029
|
${!u.modelValue && "switch__dummy--flex"}
|
|
1024
1030
|
`)
|
|
1025
1031
|
}, null, 2)
|
|
1026
1032
|
], 2)), [
|
|
1027
|
-
[
|
|
1033
|
+
[d, {
|
|
1028
1034
|
blocked: e(l).readOnly
|
|
1029
1035
|
}]
|
|
1030
1036
|
]),
|
|
1031
|
-
u.$slots.default ? A(u.$slots, "default", { key: 0 }, void 0, !0) : (
|
|
1037
|
+
u.$slots.default ? A(u.$slots, "default", { key: 0 }, void 0, !0) : (o(), s("div", Zn, g(e(l).description || u.propertyName), 1))
|
|
1032
1038
|
]);
|
|
1033
1039
|
};
|
|
1034
1040
|
}
|
|
@@ -1039,14 +1045,14 @@ const xn = /* @__PURE__ */ G(Nn, [["__scopeId", "data-v-30f5a5ca"]]), gt = (c) =
|
|
|
1039
1045
|
}, no = ["src", "alt"], oo = {
|
|
1040
1046
|
key: 0,
|
|
1041
1047
|
class: "picture__meta"
|
|
1042
|
-
}, ao = ["src"], lo = /* @__PURE__ */ gt(() => /* @__PURE__ */
|
|
1048
|
+
}, ao = ["src"], lo = /* @__PURE__ */ gt(() => /* @__PURE__ */ k("line", {
|
|
1043
1049
|
x1: "0",
|
|
1044
1050
|
y1: "0",
|
|
1045
1051
|
x2: "200",
|
|
1046
1052
|
y2: "200",
|
|
1047
1053
|
stroke: "#000",
|
|
1048
1054
|
"vector-effect": "non-scaling-stroke"
|
|
1049
|
-
}, null, -1)), so = /* @__PURE__ */ gt(() => /* @__PURE__ */
|
|
1055
|
+
}, null, -1)), so = /* @__PURE__ */ gt(() => /* @__PURE__ */ k("line", {
|
|
1050
1056
|
x1: "200",
|
|
1051
1057
|
y1: "0",
|
|
1052
1058
|
x2: "0",
|
|
@@ -1071,35 +1077,35 @@ const xn = /* @__PURE__ */ G(Nn, [["__scopeId", "data-v-30f5a5ca"]]), gt = (c) =
|
|
|
1071
1077
|
meta: {}
|
|
1072
1078
|
},
|
|
1073
1079
|
setup(c) {
|
|
1074
|
-
const
|
|
1075
|
-
return (l,
|
|
1076
|
-
var
|
|
1080
|
+
const i = c, t = H(() => i.fileId ? `${yt}/file/${i.fileId}/picture` : i.url || i.modelValue), a = Y(!1);
|
|
1081
|
+
return (l, r) => {
|
|
1082
|
+
var p;
|
|
1077
1083
|
const u = ne("overlay");
|
|
1078
|
-
return
|
|
1079
|
-
t.value ? (
|
|
1084
|
+
return o(), s("figure", eo, [
|
|
1085
|
+
t.value ? (o(), $(Ge, {
|
|
1080
1086
|
key: 0,
|
|
1081
1087
|
to: "main"
|
|
1082
1088
|
}, [
|
|
1083
|
-
|
|
1084
|
-
|
|
1089
|
+
a.value ? Z((o(), s("div", to, [
|
|
1090
|
+
k("img", {
|
|
1085
1091
|
src: t.value,
|
|
1086
1092
|
alt: l.alt,
|
|
1087
1093
|
style: `
|
|
1088
1094
|
max-height: 60vh;
|
|
1089
1095
|
object-fit: contain;
|
|
1090
1096
|
`,
|
|
1091
|
-
onClick:
|
|
1097
|
+
onClick: r[0] || (r[0] = (d) => a.value = !0)
|
|
1092
1098
|
}, null, 8, no),
|
|
1093
|
-
(
|
|
1099
|
+
(p = l.meta) != null && p.owner ? (o(), s("div", oo, " Criado por " + g(l.meta.owner.name) + " em " + g(l.formatDateTime(l.meta.created_at, { hours: !0 })), 1)) : y("", !0)
|
|
1094
1100
|
])), [
|
|
1095
1101
|
[u, {
|
|
1096
1102
|
click: () => {
|
|
1097
|
-
|
|
1103
|
+
a.value = !1;
|
|
1098
1104
|
}
|
|
1099
1105
|
}]
|
|
1100
1106
|
]) : y("", !0)
|
|
1101
1107
|
])) : y("", !0),
|
|
1102
|
-
t.value ? (
|
|
1108
|
+
t.value ? (o(), s("img", {
|
|
1103
1109
|
key: 1,
|
|
1104
1110
|
src: t.value,
|
|
1105
1111
|
class: Q(`
|
|
@@ -1112,10 +1118,10 @@ const xn = /* @__PURE__ */ G(Nn, [["__scopeId", "data-v-30f5a5ca"]]), gt = (c) =
|
|
|
1112
1118
|
width: ${l.width || "100%"};
|
|
1113
1119
|
height: ${l.height || "100%"};
|
|
1114
1120
|
`),
|
|
1115
|
-
onClick:
|
|
1116
|
-
l.expandable && (
|
|
1121
|
+
onClick: r[1] || (r[1] = () => {
|
|
1122
|
+
l.expandable && (a.value = !0);
|
|
1117
1123
|
})
|
|
1118
|
-
}, null, 14, ao)) : l.$slots.fallback ? A(l.$slots, "fallback", { key: 2 }, void 0, !0) : l.$slots.default ? A(l.$slots, "default", { key: 3 }, void 0, !0) : (
|
|
1124
|
+
}, null, 14, ao)) : l.$slots.fallback ? A(l.$slots, "fallback", { key: 2 }, void 0, !0) : l.$slots.default ? A(l.$slots, "default", { key: 3 }, void 0, !0) : (o(), s("svg", {
|
|
1119
1125
|
key: 4,
|
|
1120
1126
|
class: Q(["picture__background", `
|
|
1121
1127
|
${l.bordered && "picture__image--bordered"}
|
|
@@ -1129,7 +1135,7 @@ const xn = /* @__PURE__ */ G(Nn, [["__scopeId", "data-v-30f5a5ca"]]), gt = (c) =
|
|
|
1129
1135
|
height: ${l.height || "100%"};
|
|
1130
1136
|
`)
|
|
1131
1137
|
}, io, 6)),
|
|
1132
|
-
l.$slots.caption ? (
|
|
1138
|
+
l.$slots.caption ? (o(), s("figcaption", ro, [
|
|
1133
1139
|
A(l.$slots, "caption", {}, void 0, !0)
|
|
1134
1140
|
])) : y("", !0)
|
|
1135
1141
|
]);
|
|
@@ -1154,23 +1160,23 @@ const Me = /* @__PURE__ */ G(uo, [["__scopeId", "data-v-153a2e0f"]]), co = { cla
|
|
|
1154
1160
|
content: {}
|
|
1155
1161
|
},
|
|
1156
1162
|
emits: ["update:content", "change", "update:modelValue"],
|
|
1157
|
-
setup(c, { emit:
|
|
1158
|
-
const t = c,
|
|
1159
|
-
var
|
|
1160
|
-
return u.value ? URL.createObjectURL(u.value) : (
|
|
1161
|
-
}),
|
|
1162
|
-
var
|
|
1163
|
-
return /^image\//.test((
|
|
1164
|
-
}), h = (
|
|
1163
|
+
setup(c, { emit: i }) {
|
|
1164
|
+
const t = c, a = i, r = Te() ? ge() : null, u = Y(null), p = H(() => {
|
|
1165
|
+
var V;
|
|
1166
|
+
return u.value ? URL.createObjectURL(u.value) : (V = t.modelValue) == null ? void 0 : V.link;
|
|
1167
|
+
}), d = H(() => {
|
|
1168
|
+
var V, S, L;
|
|
1169
|
+
return /^image\//.test((V = t.modelValue) == null ? void 0 : V.type) && !((S = u.value) != null && S.type) || /^image\//.test((L = u.value) == null ? void 0 : L.type);
|
|
1170
|
+
}), h = (V) => new Promise((S) => {
|
|
1165
1171
|
const L = new FileReader();
|
|
1166
|
-
L.onload = () => S(L.result), L.readAsArrayBuffer(
|
|
1167
|
-
}),
|
|
1172
|
+
L.onload = () => S(L.result), L.readAsArrayBuffer(V);
|
|
1173
|
+
}), _ = () => {
|
|
1168
1174
|
u.value = null;
|
|
1169
|
-
},
|
|
1170
|
-
u.value =
|
|
1175
|
+
}, n = async (V) => {
|
|
1176
|
+
u.value = V.target.files[0];
|
|
1171
1177
|
const S = u.value, L = await h(S);
|
|
1172
|
-
if (
|
|
1173
|
-
const { data: W } = await zt(`${yt}/${
|
|
1178
|
+
if (r) {
|
|
1179
|
+
const { data: W } = await zt(`${yt}/${r.$id}/upload?name=${S.name}`, L, {
|
|
1174
1180
|
params: {
|
|
1175
1181
|
method: "POST",
|
|
1176
1182
|
headers: {
|
|
@@ -1181,56 +1187,56 @@ const Me = /* @__PURE__ */ G(uo, [["__scopeId", "data-v-153a2e0f"]]), co = { cla
|
|
|
1181
1187
|
});
|
|
1182
1188
|
if (bt(W))
|
|
1183
1189
|
return;
|
|
1184
|
-
|
|
1190
|
+
a("update:modelValue", W);
|
|
1185
1191
|
} else
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
},
|
|
1189
|
-
|
|
1192
|
+
a("update:modelValue", S);
|
|
1193
|
+
a("update:content", L), a("change", L);
|
|
1194
|
+
}, f = async () => {
|
|
1195
|
+
a("update:modelValue", null);
|
|
1190
1196
|
};
|
|
1191
|
-
return (
|
|
1197
|
+
return (V, S) => {
|
|
1192
1198
|
var L, W, P, O, M, X;
|
|
1193
|
-
return
|
|
1194
|
-
u.value || (L =
|
|
1195
|
-
|
|
1199
|
+
return o(), s("div", co, [
|
|
1200
|
+
u.value || (L = V.modelValue) != null && L._id ? (o(), s("div", po, [
|
|
1201
|
+
d.value ? (o(), $(Me, {
|
|
1196
1202
|
key: 0,
|
|
1197
|
-
modelValue:
|
|
1198
|
-
"onUpdate:modelValue": S[0] || (S[0] = (w) =>
|
|
1203
|
+
modelValue: p.value,
|
|
1204
|
+
"onUpdate:modelValue": S[0] || (S[0] = (w) => p.value = w),
|
|
1199
1205
|
alt: "Image preview",
|
|
1200
1206
|
class: Q(`
|
|
1201
1207
|
file__image
|
|
1202
|
-
${!e(
|
|
1208
|
+
${!e(r) || ((W = V.modelValue) == null ? void 0 : W._id) || "file__image--unsent"}
|
|
1203
1209
|
`)
|
|
1204
1210
|
}, null, 8, ["modelValue", "class"])) : y("", !0),
|
|
1205
|
-
(P =
|
|
1211
|
+
(P = V.modelValue) != null && P._id ? (o(), s("a", {
|
|
1206
1212
|
key: 1,
|
|
1207
|
-
href:
|
|
1208
|
-
},
|
|
1213
|
+
href: V.modelValue.download_link
|
|
1214
|
+
}, g(V.modelValue.filename), 9, _o)) : y("", !0)
|
|
1209
1215
|
])) : y("", !0),
|
|
1210
|
-
|
|
1211
|
-
|
|
1216
|
+
k("div", mo, [
|
|
1217
|
+
k("input", {
|
|
1212
1218
|
ref: "file",
|
|
1213
1219
|
type: "file",
|
|
1214
|
-
accept: (M = (O =
|
|
1215
|
-
onChange:
|
|
1220
|
+
accept: (M = (O = V.property) == null ? void 0 : O.accept) == null ? void 0 : M.join(","),
|
|
1221
|
+
onChange: n
|
|
1216
1222
|
}, null, 40, fo),
|
|
1217
|
-
u.value ? (
|
|
1223
|
+
u.value ? (o(), s("div", vo, [
|
|
1218
1224
|
z(ie, {
|
|
1219
1225
|
small: "",
|
|
1220
|
-
onClick: ze(
|
|
1226
|
+
onClick: ze(_, ["prevent"])
|
|
1221
1227
|
}, {
|
|
1222
1228
|
default: v(() => [
|
|
1223
|
-
D(
|
|
1229
|
+
D(g(e(F)("action.clear", { capitalize: !0 })), 1)
|
|
1224
1230
|
]),
|
|
1225
1231
|
_: 1
|
|
1226
1232
|
})
|
|
1227
|
-
])) : (X =
|
|
1233
|
+
])) : (X = V.modelValue) != null && X._id ? (o(), s("div", yo, [
|
|
1228
1234
|
z(ie, {
|
|
1229
1235
|
small: "",
|
|
1230
|
-
onClick: ze(
|
|
1236
|
+
onClick: ze(f, ["prevent"])
|
|
1231
1237
|
}, {
|
|
1232
1238
|
default: v(() => [
|
|
1233
|
-
D(
|
|
1239
|
+
D(g(e(F)("action.remove", { capitalize: !0 })), 1)
|
|
1234
1240
|
]),
|
|
1235
1241
|
_: 1
|
|
1236
1242
|
})
|
|
@@ -1249,14 +1255,14 @@ const $o = /* @__PURE__ */ G(ho, [["__scopeId", "data-v-69b23965"]]), bo = { cla
|
|
|
1249
1255
|
observeScroll: { type: Boolean }
|
|
1250
1256
|
},
|
|
1251
1257
|
emits: ["endReached"],
|
|
1252
|
-
setup(c, { emit:
|
|
1253
|
-
const t = c,
|
|
1258
|
+
setup(c, { emit: i }) {
|
|
1259
|
+
const t = c, a = i, l = Y(null), r = t.observeScroll ? We(l, {
|
|
1254
1260
|
antecipate: 100
|
|
1255
1261
|
}).reachedEnd : null;
|
|
1256
|
-
return
|
|
1257
|
-
u &&
|
|
1258
|
-
}), (u,
|
|
1259
|
-
u.$slots.default ? (
|
|
1262
|
+
return r !== null && re(r, (u) => {
|
|
1263
|
+
u && a("endReached", u);
|
|
1264
|
+
}), (u, p) => (o(), s("div", bo, [
|
|
1265
|
+
u.$slots.default ? (o(), s("div", {
|
|
1260
1266
|
key: 0,
|
|
1261
1267
|
ref_key: "containerEl",
|
|
1262
1268
|
ref: l,
|
|
@@ -1264,7 +1270,7 @@ const $o = /* @__PURE__ */ G(ho, [["__scopeId", "data-v-69b23965"]]), bo = { cla
|
|
|
1264
1270
|
}, [
|
|
1265
1271
|
A(u.$slots, "default", {}, void 0, !0)
|
|
1266
1272
|
], 512)) : y("", !0),
|
|
1267
|
-
u.$slots.footer ? (
|
|
1273
|
+
u.$slots.footer ? (o(), s("div", go, [
|
|
1268
1274
|
A(u.$slots, "footer", {}, void 0, !0)
|
|
1269
1275
|
])) : y("", !0)
|
|
1270
1276
|
]));
|
|
@@ -1279,48 +1285,48 @@ const it = /* @__PURE__ */ G(ko, [["__scopeId", "data-v-c86e2d2a"]]), Vo = { cla
|
|
|
1279
1285
|
property: {}
|
|
1280
1286
|
},
|
|
1281
1287
|
emits: ["update:modelValue", "change"],
|
|
1282
|
-
setup(c, { emit:
|
|
1283
|
-
const t = c,
|
|
1284
|
-
if (
|
|
1288
|
+
setup(c, { emit: i }) {
|
|
1289
|
+
const t = c, a = i, l = t.property, r = pe(l), u = ge(), p = H(() => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && Object.values(t.modelValue).some(({ _id: _ }) => t.item._id === _) : t.modelValue && t.modelValue._id === t.item._id), d = () => {
|
|
1290
|
+
if (p.value)
|
|
1285
1291
|
return;
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
...
|
|
1292
|
+
const _ = (f) => f.filter((V) => !!(V != null && V._id)), n = "items" in l ? _(Array.isArray(t.modelValue) ? t.modelValue : [t.modelValue]) : t.modelValue;
|
|
1293
|
+
a("update:modelValue", Array.isArray(n) ? [
|
|
1294
|
+
...n,
|
|
1289
1295
|
t.item
|
|
1290
|
-
] : t.item),
|
|
1291
|
-
}, h = async (
|
|
1292
|
-
if (
|
|
1293
|
-
const { _id:
|
|
1296
|
+
] : t.item), a("change", t.item);
|
|
1297
|
+
}, h = async (_) => {
|
|
1298
|
+
if (r.purge && (_ != null && _.purge)) {
|
|
1299
|
+
const { _id: f } = t.item;
|
|
1294
1300
|
await u.$actions.remove({
|
|
1295
1301
|
filters: {
|
|
1296
|
-
_id:
|
|
1302
|
+
_id: f
|
|
1297
1303
|
}
|
|
1298
1304
|
});
|
|
1299
1305
|
}
|
|
1300
|
-
const
|
|
1301
|
-
const
|
|
1302
|
-
return
|
|
1306
|
+
const n = () => {
|
|
1307
|
+
const f = [...t.modelValue], V = f.findIndex((S) => S._id === t.item._id);
|
|
1308
|
+
return f.splice(V, 1), f;
|
|
1303
1309
|
};
|
|
1304
|
-
|
|
1310
|
+
a("update:modelValue", "items" in l ? n() : null);
|
|
1305
1311
|
};
|
|
1306
|
-
return (
|
|
1307
|
-
const
|
|
1308
|
-
return Z((
|
|
1312
|
+
return (_, n) => {
|
|
1313
|
+
const f = ne("clickable");
|
|
1314
|
+
return Z((o(), s("div", {
|
|
1309
1315
|
class: Q({
|
|
1310
1316
|
item: !0,
|
|
1311
|
-
"item--selected":
|
|
1317
|
+
"item--selected": p.value
|
|
1312
1318
|
}),
|
|
1313
|
-
onClick:
|
|
1319
|
+
onClick: n[0] || (n[0] = (V) => p.value ? h() : d())
|
|
1314
1320
|
}, [
|
|
1315
|
-
A(
|
|
1316
|
-
|
|
1317
|
-
(
|
|
1318
|
-
key: `index-${
|
|
1321
|
+
A(_.$slots, "default", {}, void 0, !0),
|
|
1322
|
+
k("div", Vo, [
|
|
1323
|
+
(o(!0), s(J, null, U(_.indexes, (V, S) => (o(), s("div", {
|
|
1324
|
+
key: `index-${_.item._id}-${S}`,
|
|
1319
1325
|
class: "item__value"
|
|
1320
|
-
},
|
|
1326
|
+
}, g(_.item[V]), 1))), 128))
|
|
1321
1327
|
])
|
|
1322
1328
|
], 2)), [
|
|
1323
|
-
[
|
|
1329
|
+
[f]
|
|
1324
1330
|
]);
|
|
1325
1331
|
};
|
|
1326
1332
|
}
|
|
@@ -1340,22 +1346,22 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1340
1346
|
panel: { default: void 0 }
|
|
1341
1347
|
},
|
|
1342
1348
|
emits: ["update:modelValue", "change", "update:panel"],
|
|
1343
|
-
setup(c, { emit:
|
|
1344
|
-
const t = c,
|
|
1349
|
+
setup(c, { emit: i }) {
|
|
1350
|
+
const t = c, a = pe(t.property), l = t.panel !== void 0 ? H(() => t.panel) : Y(!1), r = i, u = ue(pe(t.property).$ref), p = Te(), d = p ? ge() : null, h = a.indexes;
|
|
1345
1351
|
ye(Ue, pe(t.property).$ref), ye("innerInputLabel", !0), ye("omitInputLabels", !0);
|
|
1346
|
-
const
|
|
1352
|
+
const _ = Y(t.modelValue), n = Y({
|
|
1347
1353
|
data: [],
|
|
1348
1354
|
pagination: {}
|
|
1349
|
-
}),
|
|
1350
|
-
const
|
|
1351
|
-
if (
|
|
1352
|
-
const j = e(
|
|
1353
|
-
|
|
1355
|
+
}), f = H(() => n.value.data), V = H(() => n.value.pagination), S = Y(0), L = Y(h[0]), W = Y(!1), P = Y({}), O = () => {
|
|
1356
|
+
const b = {};
|
|
1357
|
+
if (p) {
|
|
1358
|
+
const j = e(p);
|
|
1359
|
+
b[j] = d;
|
|
1354
1360
|
}
|
|
1355
|
-
return
|
|
1361
|
+
return a.constraints ? Ht(a.constraints, b) : {};
|
|
1356
1362
|
}, M = () => {
|
|
1357
|
-
|
|
1358
|
-
}, X = async () => Object.values(P.value).every((
|
|
1363
|
+
f.value.length < V.value.recordsTotal && (S.value += 1, w());
|
|
1364
|
+
}, X = async () => Object.values(P.value).every((b) => !(String(b).length > 0)) ? u.$actions.custom("getAll", {
|
|
1359
1365
|
limit: Le,
|
|
1360
1366
|
offset: S.value * Le,
|
|
1361
1367
|
filters: O()
|
|
@@ -1364,12 +1370,12 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1364
1370
|
offset: S.value * Le,
|
|
1365
1371
|
filters: {
|
|
1366
1372
|
...O(),
|
|
1367
|
-
$or: h.filter((
|
|
1373
|
+
$or: h.filter((b) => {
|
|
1368
1374
|
var j;
|
|
1369
|
-
return ((j = P.value[
|
|
1370
|
-
}).map((
|
|
1371
|
-
[
|
|
1372
|
-
$regex: P.value[
|
|
1375
|
+
return ((j = P.value[b]) == null ? void 0 : j.length) > 0;
|
|
1376
|
+
}).map((b) => ({
|
|
1377
|
+
[b]: {
|
|
1378
|
+
$regex: P.value[b].trim().replace("(", "\\(").replace(")", "\\)"),
|
|
1373
1379
|
$options: "i"
|
|
1374
1380
|
}
|
|
1375
1381
|
}))
|
|
@@ -1377,8 +1383,8 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1377
1383
|
}), w = async () => {
|
|
1378
1384
|
if (u.loading.getAll)
|
|
1379
1385
|
return;
|
|
1380
|
-
const
|
|
1381
|
-
|
|
1386
|
+
const b = await X();
|
|
1387
|
+
n.value.pagination = b.pagination, S.value === 0 && n.value.data.splice(0), n.value.data.push(...b.data);
|
|
1382
1388
|
}, [ee] = ht({
|
|
1383
1389
|
delay: 800
|
|
1384
1390
|
})(() => {
|
|
@@ -1386,31 +1392,31 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1386
1392
|
}), C = () => {
|
|
1387
1393
|
W.value = !0, ee();
|
|
1388
1394
|
}, R = () => {
|
|
1389
|
-
"effect" in l ?
|
|
1395
|
+
"effect" in l ? r("update:panel", !0) : l.value = !0, w();
|
|
1390
1396
|
}, te = () => {
|
|
1391
|
-
S.value = 0,
|
|
1392
|
-
}, oe = H(() => !Object.values(P.value).some((
|
|
1393
|
-
re(oe, (
|
|
1394
|
-
|
|
1397
|
+
S.value = 0, n.value.data.splice(0), "effect" in l ? r("update:panel", !1) : l.value = !1;
|
|
1398
|
+
}, oe = H(() => !Object.values(P.value).some((b) => !!b));
|
|
1399
|
+
re(oe, (b, j) => {
|
|
1400
|
+
b && !j && w();
|
|
1395
1401
|
}), mt(() => {
|
|
1396
1402
|
t.selectOnly && w();
|
|
1397
1403
|
});
|
|
1398
|
-
const le = (
|
|
1399
|
-
|
|
1400
|
-
},
|
|
1401
|
-
te(),
|
|
1404
|
+
const le = (b) => {
|
|
1405
|
+
_.value = b, t.selectOnly || r("update:modelValue", b);
|
|
1406
|
+
}, m = () => {
|
|
1407
|
+
te(), r("update:modelValue", _.value);
|
|
1402
1408
|
};
|
|
1403
|
-
return (
|
|
1409
|
+
return (b, j) => {
|
|
1404
1410
|
const N = ne("clickable");
|
|
1405
|
-
return
|
|
1406
|
-
e(l) ? (
|
|
1411
|
+
return o(), s("div", null, [
|
|
1412
|
+
e(l) ? (o(), $(Ge, {
|
|
1407
1413
|
key: 0,
|
|
1408
1414
|
to: "main"
|
|
1409
1415
|
}, [
|
|
1410
1416
|
z(Ae, {
|
|
1411
1417
|
float: "",
|
|
1412
1418
|
"close-hint": "",
|
|
1413
|
-
title: `${e(F)("action.select", { capitalize: !0 })} ${e(F)(
|
|
1419
|
+
title: `${e(F)("action.select", { capitalize: !0 })} ${e(F)(b.propertyName)}`,
|
|
1414
1420
|
"overlay-layer": 65,
|
|
1415
1421
|
"model-value": e(l),
|
|
1416
1422
|
style: { "--panel-max-width": "36rem" },
|
|
@@ -1420,10 +1426,10 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1420
1426
|
footer: v(() => [
|
|
1421
1427
|
z(ie, {
|
|
1422
1428
|
large: "",
|
|
1423
|
-
onClick:
|
|
1429
|
+
onClick: m
|
|
1424
1430
|
}, {
|
|
1425
1431
|
default: v(() => [
|
|
1426
|
-
D(
|
|
1432
|
+
D(g(e(F)("action.save", { capitalize: !0 })), 1)
|
|
1427
1433
|
]),
|
|
1428
1434
|
_: 1
|
|
1429
1435
|
})
|
|
@@ -1431,24 +1437,24 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1431
1437
|
default: v(() => {
|
|
1432
1438
|
var I, T;
|
|
1433
1439
|
return [
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
e(h).length > 1 ? (
|
|
1440
|
+
k("div", Io, [
|
|
1441
|
+
k("div", Ao, [
|
|
1442
|
+
e(h).length > 1 ? (o(), $(Ee, {
|
|
1437
1443
|
key: 0,
|
|
1438
1444
|
modelValue: L.value,
|
|
1439
1445
|
"onUpdate:modelValue": j[0] || (j[0] = (B) => L.value = B),
|
|
1440
1446
|
onChange: j[1] || (j[1] = (B) => P.value = {})
|
|
1441
1447
|
}, {
|
|
1442
1448
|
default: v(() => [
|
|
1443
|
-
(
|
|
1449
|
+
(o(!0), s(J, null, U(e(h), (B) => (o(), s("option", {
|
|
1444
1450
|
key: `searchfield-${B}`,
|
|
1445
1451
|
value: B
|
|
1446
|
-
},
|
|
1452
|
+
}, g(e(F)(B)), 9, Oo))), 128))
|
|
1447
1453
|
]),
|
|
1448
1454
|
_: 1
|
|
1449
1455
|
}, 8, ["modelValue"])) : y("", !0),
|
|
1450
|
-
|
|
1451
|
-
(
|
|
1456
|
+
k("div", wo, [
|
|
1457
|
+
(o(), $(Ie, {
|
|
1452
1458
|
key: `field-${L.value}`,
|
|
1453
1459
|
modelValue: P.value[L.value],
|
|
1454
1460
|
"onUpdate:modelValue": j[2] || (j[2] = (B) => P.value[L.value] = B),
|
|
@@ -1460,42 +1466,42 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1460
1466
|
}, null, 8, ["modelValue", "property"]))
|
|
1461
1467
|
])
|
|
1462
1468
|
]),
|
|
1463
|
-
|
|
1469
|
+
f.value.length ? (o(), $(it, {
|
|
1464
1470
|
key: 0,
|
|
1465
1471
|
"observe-scroll": "",
|
|
1466
1472
|
onEndReached: M
|
|
1467
1473
|
}, {
|
|
1468
1474
|
default: v(() => [
|
|
1469
|
-
(
|
|
1475
|
+
(o(!0), s(J, null, U(f.value, (B) => (o(), $(De, E({ ref_for: !0 }, {
|
|
1470
1476
|
item: B,
|
|
1471
1477
|
indexes: e(h),
|
|
1472
|
-
property:
|
|
1478
|
+
property: b.property
|
|
1473
1479
|
}, {
|
|
1474
1480
|
key: `matching-${B._id}`,
|
|
1475
|
-
modelValue:
|
|
1476
|
-
"onUpdate:modelValue": j[3] || (j[3] = (ae) =>
|
|
1481
|
+
modelValue: _.value,
|
|
1482
|
+
"onUpdate:modelValue": j[3] || (j[3] = (ae) => _.value = ae)
|
|
1477
1483
|
}), null, 16, ["modelValue"]))), 128))
|
|
1478
1484
|
]),
|
|
1479
1485
|
_: 1
|
|
1480
|
-
})) : (
|
|
1481
|
-
W.value ? (
|
|
1486
|
+
})) : (o(), s("div", Bo, [
|
|
1487
|
+
W.value ? (o(), s("div", So, g(e(F)("searching", { capitalize: !0 })) + "... ", 1)) : !e(u).loading.getAll && Object.values(P.value).filter((B) => !!B).length > 0 && !("items" in b.property && ((I = b.modelValue) != null && I.length) || !Array.isArray(b.modelValue) && ((T = b.modelValue) != null && T._id)) ? (o(), s("div", jo, g(e(F)("no_results", { capitalize: !0 })), 1)) : y("", !0)
|
|
1482
1488
|
]))
|
|
1483
1489
|
]),
|
|
1484
|
-
|
|
1490
|
+
k("div", To, g(e(F)("showing", { capitalize: !0 })) + " " + g(f.value.length) + " " + g(e(F)("of")) + " " + g(V.value.recordsTotal), 1)
|
|
1485
1491
|
];
|
|
1486
1492
|
}),
|
|
1487
1493
|
_: 1
|
|
1488
1494
|
}, 8, ["title", "model-value"])
|
|
1489
1495
|
])) : y("", !0),
|
|
1490
|
-
|
|
1496
|
+
b.selectOnly ? y("", !0) : (o(), s("div", Ro, [
|
|
1491
1497
|
z(it, null, {
|
|
1492
1498
|
footer: v(() => [
|
|
1493
|
-
Z((
|
|
1499
|
+
Z((o(), $(K, {
|
|
1494
1500
|
icon: "plus",
|
|
1495
1501
|
onClick: R
|
|
1496
1502
|
}, {
|
|
1497
1503
|
default: v(() => [
|
|
1498
|
-
D(
|
|
1504
|
+
D(g(e(F)("action.select", { capitalize: !0 })), 1)
|
|
1499
1505
|
]),
|
|
1500
1506
|
_: 1
|
|
1501
1507
|
})), [
|
|
@@ -1505,21 +1511,21 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1505
1511
|
default: v(() => {
|
|
1506
1512
|
var I;
|
|
1507
1513
|
return [
|
|
1508
|
-
"items" in
|
|
1509
|
-
(
|
|
1514
|
+
"items" in b.property ? (o(), s("div", Lo, [
|
|
1515
|
+
(o(!0), s(J, null, U(b.modelValue, (T) => (o(), $(De, E({ ref_for: !0 }, {
|
|
1510
1516
|
item: T,
|
|
1511
1517
|
indexes: e(h),
|
|
1512
|
-
property:
|
|
1513
|
-
modelValue:
|
|
1518
|
+
property: b.property,
|
|
1519
|
+
modelValue: b.modelValue
|
|
1514
1520
|
}, {
|
|
1515
1521
|
key: `selected-${T._id}`,
|
|
1516
1522
|
"onUpdate:modelValue": le
|
|
1517
1523
|
}), null, 16))), 128))
|
|
1518
|
-
])) : (I =
|
|
1519
|
-
item:
|
|
1524
|
+
])) : (I = b.modelValue) != null && I._id ? (o(), $(De, E({ key: 1 }, {
|
|
1525
|
+
item: b.modelValue,
|
|
1520
1526
|
indexes: e(h),
|
|
1521
|
-
property: e(
|
|
1522
|
-
modelValue:
|
|
1527
|
+
property: e(a),
|
|
1528
|
+
modelValue: b.modelValue
|
|
1523
1529
|
}, { "onUpdate:modelValue": le }), null, 16)) : y("", !0)
|
|
1524
1530
|
];
|
|
1525
1531
|
}),
|
|
@@ -1530,8 +1536,8 @@ const De = /* @__PURE__ */ G(Co, [["__scopeId", "data-v-fa7fea9f"]]), Io = { cla
|
|
|
1530
1536
|
};
|
|
1531
1537
|
}
|
|
1532
1538
|
});
|
|
1533
|
-
const Mo = /* @__PURE__ */ G(zo, [["__scopeId", "data-v-d9d768a1"]]), rt = (c,
|
|
1534
|
-
const t = "items" in c ? c.items : c,
|
|
1539
|
+
const Mo = /* @__PURE__ */ G(zo, [["__scopeId", "data-v-d9d768a1"]]), rt = (c, i) => {
|
|
1540
|
+
const t = "items" in c ? c.items : c, a = {
|
|
1535
1541
|
options: Xn,
|
|
1536
1542
|
select: Ee,
|
|
1537
1543
|
switch: xn,
|
|
@@ -1552,20 +1558,20 @@ const Mo = /* @__PURE__ */ G(zo, [["__scopeId", "data-v-d9d768a1"]]), rt = (c, r
|
|
|
1552
1558
|
if (c.element === "select")
|
|
1553
1559
|
return "select";
|
|
1554
1560
|
}
|
|
1555
|
-
const
|
|
1556
|
-
return
|
|
1561
|
+
const r = pe(c);
|
|
1562
|
+
return r ? r.inline ? "form" : r.$ref === "file" ? "file" : "search" : "items" in c && c.uniqueItems ? "options" : "enum" in t ? "select" : "input";
|
|
1557
1563
|
})();
|
|
1558
|
-
return
|
|
1559
|
-
}, Fo = (c,
|
|
1564
|
+
return i[l] ? i[l] : a[l];
|
|
1565
|
+
}, Fo = (c, i, t) => {
|
|
1560
1566
|
c ?? (c = []);
|
|
1561
|
-
const
|
|
1562
|
-
if ("$ref" in
|
|
1563
|
-
const l = ue(
|
|
1564
|
-
return c.unshift(
|
|
1567
|
+
const a = "items" in i ? i.items : i;
|
|
1568
|
+
if ("$ref" in a) {
|
|
1569
|
+
const l = ue(a.$ref, t), r = Se(l.$freshItem);
|
|
1570
|
+
return c.unshift(r);
|
|
1565
1571
|
}
|
|
1566
|
-
return "properties" in
|
|
1567
|
-
}, qo = (c,
|
|
1568
|
-
c.splice(
|
|
1572
|
+
return "properties" in a ? c.unshift(Dt(a)) : "type" in a && a.type === "boolean" ? c.unshift({}) : c.unshift(null);
|
|
1573
|
+
}, qo = (c, i) => {
|
|
1574
|
+
c.splice(i, 1);
|
|
1569
1575
|
}, Uo = {
|
|
1570
1576
|
key: 0,
|
|
1571
1577
|
class: "form__header"
|
|
@@ -1605,42 +1611,42 @@ const Mo = /* @__PURE__ */ G(zo, [["__scopeId", "data-v-d9d768a1"]]), rt = (c, r
|
|
|
1605
1611
|
focus: { type: Boolean }
|
|
1606
1612
|
},
|
|
1607
1613
|
emits: ["update:modelValue", "input", "change"],
|
|
1608
|
-
setup(c, { emit:
|
|
1609
|
-
const t = $t(),
|
|
1614
|
+
setup(c, { emit: i }) {
|
|
1615
|
+
const t = $t(), a = c, l = i;
|
|
1610
1616
|
ft(() => {
|
|
1611
|
-
|
|
1617
|
+
a.modelValue || l("update:modelValue", a.property && "items" in a.property ? [] : {});
|
|
1612
1618
|
});
|
|
1613
|
-
const
|
|
1619
|
+
const r = a.property && pe(a.property), u = r ? r.$ref : a.collection || Te(), p = u ? ue(e(u)) : null;
|
|
1614
1620
|
!u && process.env.NODE_ENV !== "production" && console.warn(`aeria-form was used without providing storeId or specifying
|
|
1615
1621
|
collection prop, some features may not work as intended`);
|
|
1616
|
-
const
|
|
1617
|
-
const
|
|
1618
|
-
return
|
|
1619
|
-
},
|
|
1620
|
-
u && ye(Ue, u), ye("searchOnly",
|
|
1621
|
-
const O = (
|
|
1622
|
-
|
|
1622
|
+
const d = Y(!1), h = H(() => !a.form && a.property ? "properties" in a.property ? a.property.properties : p == null ? void 0 : p.properties : a.form), _ = H(() => a.layout || (p == null ? void 0 : p.description.formLayout)), n = (m) => {
|
|
1623
|
+
const b = ve(m, a[m]);
|
|
1624
|
+
return a[m] && ye(m, a[m]), b;
|
|
1625
|
+
}, f = H(() => a.validationErrors !== null ? a.validationErrors : p == null ? void 0 : p.validationErrors), V = n("formComponents") || {}, S = n("propertyComponents") || {}, L = n("omitFormHeader"), W = n("omitInputLabels"), P = n("innerInputLabel");
|
|
1626
|
+
u && ye(Ue, u), ye("searchOnly", a.searchOnly);
|
|
1627
|
+
const O = (m) => h.value ? Object.entries(h.value).filter(([b, j]) => !j.noForm && m([
|
|
1628
|
+
b,
|
|
1623
1629
|
j
|
|
1624
|
-
])) : null, M = (
|
|
1630
|
+
])) : null, M = (m) => {
|
|
1625
1631
|
var j;
|
|
1626
|
-
if (
|
|
1632
|
+
if (a.searchOnly || !u)
|
|
1627
1633
|
return !0;
|
|
1628
|
-
const
|
|
1629
|
-
return !
|
|
1630
|
-
}, X = O(([
|
|
1634
|
+
const b = a.property && "properties" in a.property ? a.property.form : (j = p == null ? void 0 : p.description) == null ? void 0 : j.form;
|
|
1635
|
+
return !b || b.includes(m);
|
|
1636
|
+
}, X = O(([m]) => M(m)), w = je(), ee = {}, C = (m, b) => {
|
|
1631
1637
|
var T, B, ae, _e;
|
|
1632
|
-
const j = [], N = ((B = (T =
|
|
1633
|
-
if (!
|
|
1638
|
+
const j = [], N = ((B = (T = _.value) == null ? void 0 : T.fields) == null ? void 0 : B[m]) || ((_e = (ae = _.value) == null ? void 0 : ae.fields) == null ? void 0 : _e.$default);
|
|
1639
|
+
if (!b)
|
|
1634
1640
|
return;
|
|
1635
|
-
if (N != null && N.if && !
|
|
1641
|
+
if (N != null && N.if && !a.searchOnly) {
|
|
1636
1642
|
const me = Qe(
|
|
1637
|
-
|
|
1643
|
+
a.modelValue,
|
|
1638
1644
|
N.if
|
|
1639
1645
|
);
|
|
1640
|
-
me.satisfied || (ee[
|
|
1646
|
+
me.satisfied || (ee[m] && (p ? a.modelValue[m] = typeof p.$freshItem[m] == "object" ? Se(p.$freshItem[m]) : p.$freshItem[m] : a.modelValue[m] = [
|
|
1641
1647
|
void 0,
|
|
1642
1648
|
null
|
|
1643
|
-
].includes(
|
|
1649
|
+
].includes(a.modelValue[m]) ? null : a.modelValue[m].constructor()), j.push("display: none;")), ee[m] = me.satisfied;
|
|
1644
1650
|
}
|
|
1645
1651
|
const I = w.value.md && (N == null ? void 0 : N.span) || 6;
|
|
1646
1652
|
return j.push(`
|
|
@@ -1655,184 +1661,184 @@ const Mo = /* @__PURE__ */ G(zo, [["__scopeId", "data-v-d9d768a1"]]), rt = (c, r
|
|
|
1655
1661
|
padding: 1rem 0;
|
|
1656
1662
|
margin: 1rem 0;
|
|
1657
1663
|
`)), j.join("");
|
|
1658
|
-
}, R = (
|
|
1659
|
-
|
|
1660
|
-
|
|
1664
|
+
}, R = (m) => m === null || m instanceof Object && !Object.keys(m).length, te = H(() => a.required ? a.required : a.property && "required" in a.property ? a.property.required : p == null ? void 0 : p.description.required), oe = H(() => a.form ? Mt(
|
|
1665
|
+
a.modelValue,
|
|
1666
|
+
a.form,
|
|
1661
1667
|
te.value,
|
|
1662
|
-
|
|
1663
|
-
) : !0), le = (
|
|
1668
|
+
p == null ? void 0 : p.description
|
|
1669
|
+
) : !0), le = (m, b) => {
|
|
1664
1670
|
var j;
|
|
1665
|
-
return (j =
|
|
1671
|
+
return (j = f.value) != null && j[m] && (typeof f.value[m].index != "number" || f.value[m].index === b) ? f.value[m].errors : null;
|
|
1666
1672
|
};
|
|
1667
|
-
return (
|
|
1673
|
+
return (m, b) => {
|
|
1668
1674
|
const j = ne("clickable"), N = ne("focus");
|
|
1669
|
-
return
|
|
1675
|
+
return o(), s("form", {
|
|
1670
1676
|
class: "form",
|
|
1671
1677
|
style: $e(`row-gap: ${e(L) ? ".8rem" : "var(--form-internal-gap, 1.6rem);"};`)
|
|
1672
1678
|
}, [
|
|
1673
|
-
|
|
1674
|
-
A(
|
|
1679
|
+
m.$slots.header && !e(L) ? (o(), s("header", Uo, [
|
|
1680
|
+
A(m.$slots, "header", {}, void 0, !0)
|
|
1675
1681
|
])) : y("", !0),
|
|
1676
|
-
A(
|
|
1677
|
-
|
|
1678
|
-
(
|
|
1682
|
+
A(m.$slots, "default", {}, void 0, !0),
|
|
1683
|
+
m.isReadOnly ? y("", !0) : (o(), s("fieldset", Eo, [
|
|
1684
|
+
(o(!0), s(J, null, U(e(X), ([I, T]) => {
|
|
1679
1685
|
var B, ae, _e, me, Xe, Ye, Je, Ke, Ze, Pe, Ne, xe, et;
|
|
1680
|
-
return
|
|
1686
|
+
return o(), s("div", {
|
|
1681
1687
|
key: `field-${I}`,
|
|
1682
1688
|
style: $e(C(I, T)),
|
|
1683
1689
|
class: "form__field"
|
|
1684
1690
|
}, [
|
|
1685
|
-
(!("type" in T) || T.type !== "boolean" ||
|
|
1686
|
-
|
|
1691
|
+
(!("type" in T) || T.type !== "boolean" || m.searchOnly) && !T.noLabel && !e(W) && !e(P) ? (o(), s("label", Ho, [
|
|
1692
|
+
k("div", {
|
|
1687
1693
|
class: Q({
|
|
1688
1694
|
"form__field-label": !0,
|
|
1689
1695
|
"form__field-label--section": "items" in T ? "properties" in T.items : "properties" in T,
|
|
1690
|
-
"form__field-required-hint":
|
|
1696
|
+
"form__field-required-hint": m.highlightRequired && !m.searchOnly && (!te.value || e(Qt)(I, te.value, m.modelValue))
|
|
1691
1697
|
})
|
|
1692
|
-
},
|
|
1693
|
-
T.hint ? (
|
|
1698
|
+
}, g(T.description || e(F)(I)), 3),
|
|
1699
|
+
T.hint ? (o(), s("div", {
|
|
1694
1700
|
key: 0,
|
|
1695
1701
|
innerHTML: T.hint
|
|
1696
1702
|
}, null, 8, Do)) : y("", !0)
|
|
1697
1703
|
])) : y("", !0),
|
|
1698
|
-
|
|
1704
|
+
m.$slots[`field-${I}`] ? A(m.$slots, `field-${I}`, E({
|
|
1699
1705
|
key: 1,
|
|
1700
1706
|
ref_for: !0
|
|
1701
1707
|
}, {
|
|
1702
1708
|
propery: T,
|
|
1703
1709
|
properyName: I,
|
|
1704
|
-
modelValue:
|
|
1705
|
-
}), void 0, !0) : (_e = (ae = (B =
|
|
1710
|
+
modelValue: m.modelValue
|
|
1711
|
+
}), void 0, !0) : (_e = (ae = (B = m.layout) == null ? void 0 : B.fields) == null ? void 0 : ae[I]) != null && _e.component && e(S)[m.layout.fields[I].component.name] ? (o(), $(he(e(S)[m.layout.fields[I].component.name]), E({
|
|
1706
1712
|
key: 2,
|
|
1707
|
-
modelValue:
|
|
1708
|
-
"onUpdate:modelValue": (x) =>
|
|
1713
|
+
modelValue: m.modelValue[I],
|
|
1714
|
+
"onUpdate:modelValue": (x) => m.modelValue[I] = x,
|
|
1709
1715
|
ref_for: !0
|
|
1710
1716
|
}, {
|
|
1711
1717
|
property: T,
|
|
1712
1718
|
propertyName: I,
|
|
1713
|
-
...
|
|
1719
|
+
...m.layout.fields[I].component.props || {}
|
|
1714
1720
|
}, {
|
|
1715
1721
|
onInput: (x) => l("input", I),
|
|
1716
|
-
onChange:
|
|
1717
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in T && ["date", "date-time"].includes(T.format) &&
|
|
1722
|
+
onChange: b[0] || (b[0] = (x) => l("change", x))
|
|
1723
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])) : "format" in T && ["date", "date-time"].includes(T.format) && m.searchOnly ? (o(), s("div", {
|
|
1718
1724
|
key: 3,
|
|
1719
1725
|
style: { display: "grid", "grid-template-columns": "repeat(2, 1fr)", "column-gap": "1rem" },
|
|
1720
1726
|
onInput: (x) => l("input", I),
|
|
1721
|
-
onChange:
|
|
1727
|
+
onChange: b[1] || (b[1] = (x) => l("change", x))
|
|
1722
1728
|
}, [
|
|
1723
1729
|
z(Ie, E({
|
|
1724
|
-
modelValue:
|
|
1725
|
-
"onUpdate:modelValue": (x) =>
|
|
1730
|
+
modelValue: m.modelValue[I].$gte,
|
|
1731
|
+
"onUpdate:modelValue": (x) => m.modelValue[I].$gte = x,
|
|
1726
1732
|
ref_for: !0
|
|
1727
1733
|
}, {
|
|
1728
1734
|
property: T,
|
|
1729
1735
|
propertyName: I
|
|
1730
1736
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]),
|
|
1731
1737
|
z(Ie, E({
|
|
1732
|
-
modelValue:
|
|
1733
|
-
"onUpdate:modelValue": (x) =>
|
|
1738
|
+
modelValue: m.modelValue[I].$lte,
|
|
1739
|
+
"onUpdate:modelValue": (x) => m.modelValue[I].$lte = x,
|
|
1734
1740
|
ref_for: !0
|
|
1735
1741
|
}, {
|
|
1736
1742
|
property: T,
|
|
1737
1743
|
propertyName: I
|
|
1738
1744
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
1739
|
-
], 40, Qo)) : "type" in T && T.type === "boolean" &&
|
|
1745
|
+
], 40, Qo)) : "type" in T && T.type === "boolean" && m.searchOnly ? (o(), s("div", Go, [
|
|
1740
1746
|
z(Ee, E({ ref_for: !0 }, {
|
|
1741
1747
|
property: T,
|
|
1742
1748
|
propertyName: I
|
|
1743
1749
|
}, {
|
|
1744
1750
|
"boolean-ref": "",
|
|
1745
|
-
"model-value":
|
|
1746
|
-
onChange:
|
|
1751
|
+
"model-value": m.modelValue[I],
|
|
1752
|
+
onChange: b[2] || (b[2] = (x) => l("change", x)),
|
|
1747
1753
|
"onUpdate:modelValue": (x) => {
|
|
1748
|
-
|
|
1754
|
+
m.modelValue[I] = x == "true" ? !0 : x == "false" ? !1 : null;
|
|
1749
1755
|
}
|
|
1750
1756
|
}), {
|
|
1751
1757
|
default: v(() => [
|
|
1752
|
-
|
|
1753
|
-
|
|
1758
|
+
k("option", Wo, g(e(F)("yes")), 1),
|
|
1759
|
+
k("option", Xo, g(e(F)("no")), 1)
|
|
1754
1760
|
]),
|
|
1755
1761
|
_: 2
|
|
1756
1762
|
}, 1040, ["model-value", "onUpdate:modelValue"])
|
|
1757
|
-
])) :
|
|
1758
|
-
|
|
1763
|
+
])) : m.modelValue && "items" in T && !T.uniqueItems && (!("$ref" in T.items) || T.items.inline || T.items.$ref === "file") ? (o(), s("div", Yo, [
|
|
1764
|
+
k("div", null, [
|
|
1759
1765
|
z(ie, {
|
|
1760
1766
|
small: "",
|
|
1761
1767
|
variant: "alt",
|
|
1762
1768
|
icon: "plus",
|
|
1763
|
-
disabled: !("inline" in T.items && T.items.inline) && (((me =
|
|
1769
|
+
disabled: !("inline" in T.items && T.items.inline) && (((me = m.modelValue[I]) == null ? void 0 : me.length) >= T.maxItems || R((Ye = m.modelValue[I]) == null ? void 0 : Ye[((Xe = m.modelValue[I]) == null ? void 0 : Xe.length) - 1])),
|
|
1764
1770
|
onClick: ze((x) => {
|
|
1765
|
-
|
|
1771
|
+
m.modelValue[I] || (m.modelValue[I] = []), e(Fo)(m.modelValue[I], T, e(t));
|
|
1766
1772
|
}, ["prevent"])
|
|
1767
1773
|
}, {
|
|
1768
1774
|
default: v(() => [
|
|
1769
|
-
D(
|
|
1775
|
+
D(g(e(F)("action.add", { capitalize: !0 })), 1)
|
|
1770
1776
|
]),
|
|
1771
1777
|
_: 2
|
|
1772
1778
|
}, 1032, ["disabled", "onClick"])
|
|
1773
1779
|
]),
|
|
1774
|
-
(
|
|
1780
|
+
(o(!0), s(J, null, U(m.modelValue[I], (x, Oe) => {
|
|
1775
1781
|
var tt, nt, ot, at, lt, st;
|
|
1776
|
-
return
|
|
1782
|
+
return o(), s("div", {
|
|
1777
1783
|
key: `rep-${I}-${Oe}`,
|
|
1778
1784
|
style: { display: "flex", "column-gap": ".6rem", "align-items": "center" }
|
|
1779
1785
|
}, [
|
|
1780
|
-
|
|
1781
|
-
(
|
|
1782
|
-
modelValue:
|
|
1783
|
-
"onUpdate:modelValue": (we) =>
|
|
1786
|
+
k("div", Jo, [
|
|
1787
|
+
(o(), $(he(e(rt)(T, e(V))), E({
|
|
1788
|
+
modelValue: m.modelValue[I][Oe],
|
|
1789
|
+
"onUpdate:modelValue": (we) => m.modelValue[I][Oe] = we,
|
|
1784
1790
|
ref_for: !0
|
|
1785
1791
|
}, {
|
|
1786
1792
|
property: T.items,
|
|
1787
1793
|
propertyName: I,
|
|
1788
1794
|
parentCollection: e(u),
|
|
1789
|
-
parentPropertyName:
|
|
1790
|
-
columns: ((ot = (nt = (tt =
|
|
1795
|
+
parentPropertyName: m.parentPropertyName,
|
|
1796
|
+
columns: ((ot = (nt = (tt = m.layout) == null ? void 0 : tt.fields) == null ? void 0 : nt[I]) == null ? void 0 : ot.optionsColumns) || ((st = (lt = (at = m.layout) == null ? void 0 : at.fields) == null ? void 0 : lt.$default) == null ? void 0 : st.optionsColumns),
|
|
1791
1797
|
validationErrors: le(I, Oe),
|
|
1792
1798
|
...T.componentProps || {}
|
|
1793
1799
|
}, {
|
|
1794
1800
|
onInput: (we) => l("input", I),
|
|
1795
|
-
onChange:
|
|
1801
|
+
onChange: b[3] || (b[3] = (we) => l("change", we))
|
|
1796
1802
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"]))
|
|
1797
1803
|
]),
|
|
1798
1804
|
Z(z(K, {
|
|
1799
1805
|
reactive: "",
|
|
1800
1806
|
icon: "trash",
|
|
1801
|
-
onClick: (we) => e(qo)(
|
|
1807
|
+
onClick: (we) => e(qo)(m.modelValue[I], Oe)
|
|
1802
1808
|
}, null, 8, ["onClick"]), [
|
|
1803
1809
|
[j]
|
|
1804
1810
|
])
|
|
1805
1811
|
]);
|
|
1806
1812
|
}), 128))
|
|
1807
|
-
])) :
|
|
1813
|
+
])) : m.modelValue ? Z((o(), $(he(e(rt)(T, e(V))), E({
|
|
1808
1814
|
key: 6,
|
|
1809
|
-
modelValue:
|
|
1810
|
-
"onUpdate:modelValue": (x) =>
|
|
1815
|
+
modelValue: m.modelValue[I],
|
|
1816
|
+
"onUpdate:modelValue": (x) => m.modelValue[I] = x,
|
|
1811
1817
|
ref_for: !0
|
|
1812
1818
|
}, {
|
|
1813
1819
|
property: T,
|
|
1814
1820
|
propertyName: I,
|
|
1815
|
-
parentPropertyName:
|
|
1821
|
+
parentPropertyName: m.parentPropertyName,
|
|
1816
1822
|
parentCollection: e(u),
|
|
1817
|
-
columns: ((Ze = (Ke = (Je =
|
|
1823
|
+
columns: ((Ze = (Ke = (Je = m.layout) == null ? void 0 : Je.fields) == null ? void 0 : Ke[I]) == null ? void 0 : Ze.optionsColumns) || ((xe = (Ne = (Pe = m.layout) == null ? void 0 : Pe.fields) == null ? void 0 : Ne.$default) == null ? void 0 : xe.optionsColumns),
|
|
1818
1824
|
...T.componentProps || {},
|
|
1819
1825
|
validationErrors: le(I)
|
|
1820
1826
|
}, {
|
|
1821
1827
|
onInput: (x) => l("input", I),
|
|
1822
|
-
onChange:
|
|
1828
|
+
onChange: b[4] || (b[4] = (x) => l("change", x))
|
|
1823
1829
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])), [
|
|
1824
|
-
[N, !
|
|
1830
|
+
[N, !d.value && (d.value = !!m.focus)]
|
|
1825
1831
|
]) : y("", !0),
|
|
1826
|
-
(et =
|
|
1827
|
-
|
|
1828
|
-
|
|
1832
|
+
(et = f.value) != null && et[I] ? (o(), s("div", Ko, [
|
|
1833
|
+
f.value[I].type ? (o(), s("span", Zo, g(e(F)(`validation_error.${f.value[I].type}`)), 1)) : y("", !0),
|
|
1834
|
+
f.value[I].detail ? (o(), s("span", Po, g(e(F)(f.value[I].detail)), 1)) : y("", !0)
|
|
1829
1835
|
])) : y("", !0)
|
|
1830
1836
|
], 4);
|
|
1831
1837
|
}), 128))
|
|
1832
1838
|
])),
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
A(
|
|
1839
|
+
m.$slots.after ? A(m.$slots, "after", { key: 2 }, void 0, !0) : y("", !0),
|
|
1840
|
+
m.$slots.footer ? (o(), s("div", No, [
|
|
1841
|
+
A(m.$slots, "footer", ce(Ve({
|
|
1836
1842
|
isInsertReady: oe.value
|
|
1837
1843
|
})), void 0, !0)
|
|
1838
1844
|
])) : y("", !0)
|
|
@@ -1843,32 +1849,32 @@ const Mo = /* @__PURE__ */ G(zo, [["__scopeId", "data-v-d9d768a1"]]), rt = (c, r
|
|
|
1843
1849
|
const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @__PURE__ */ q({
|
|
1844
1850
|
__name: "aeria-filter-panel",
|
|
1845
1851
|
emits: ["update:modelValue"],
|
|
1846
|
-
setup(c, { emit:
|
|
1847
|
-
const t =
|
|
1848
|
-
|
|
1849
|
-
query: Ft(
|
|
1852
|
+
setup(c, { emit: i }) {
|
|
1853
|
+
const t = i, a = ge(), l = Re(), r = () => {
|
|
1854
|
+
a.pagination.offset = 0, a.$actions.filter(), t("update:modelValue", !1), l.push({
|
|
1855
|
+
query: Ft(a)
|
|
1850
1856
|
});
|
|
1851
1857
|
};
|
|
1852
|
-
return (u,
|
|
1858
|
+
return (u, p) => (o(), $(Ae, {
|
|
1853
1859
|
"close-hint": "",
|
|
1854
1860
|
"fixed-right": "",
|
|
1855
1861
|
title: u.t("filter_by", { capitalize: !0 }),
|
|
1856
|
-
onClose:
|
|
1857
|
-
onOverlayClick:
|
|
1862
|
+
onClose: p[2] || (p[2] = (d) => t("update:modelValue", !1)),
|
|
1863
|
+
onOverlayClick: p[3] || (p[3] = (d) => t("update:modelValue", !1))
|
|
1858
1864
|
}, {
|
|
1859
1865
|
footer: v(() => [
|
|
1860
|
-
e(
|
|
1866
|
+
e(a).filtersCount > 0 ? (o(), $(ie, {
|
|
1861
1867
|
key: 0,
|
|
1862
1868
|
variant: "transparent",
|
|
1863
|
-
onClick:
|
|
1864
|
-
e(
|
|
1869
|
+
onClick: p[1] || (p[1] = (d) => {
|
|
1870
|
+
e(a).$actions.clearFilters(), r(), t("update:modelValue", !1);
|
|
1865
1871
|
})
|
|
1866
1872
|
}, {
|
|
1867
1873
|
default: v(() => [
|
|
1868
|
-
D(
|
|
1874
|
+
D(g(u.t("action.clear", { capitalize: !0 })) + " ", 1),
|
|
1869
1875
|
z(be, null, {
|
|
1870
1876
|
default: v(() => [
|
|
1871
|
-
D(
|
|
1877
|
+
D(g(e(a).filtersCount), 1)
|
|
1872
1878
|
]),
|
|
1873
1879
|
_: 1
|
|
1874
1880
|
})
|
|
@@ -1878,23 +1884,23 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
1878
1884
|
z(ie, {
|
|
1879
1885
|
large: "",
|
|
1880
1886
|
icon: "funnel",
|
|
1881
|
-
disabled: !e(
|
|
1882
|
-
onClick:
|
|
1887
|
+
disabled: !e(a).hasActiveFilters,
|
|
1888
|
+
onClick: r
|
|
1883
1889
|
}, {
|
|
1884
1890
|
default: v(() => [
|
|
1885
|
-
D(
|
|
1891
|
+
D(g(u.t("action.filter", { capitalize: !0 })), 1)
|
|
1886
1892
|
]),
|
|
1887
1893
|
_: 1
|
|
1888
1894
|
}, 8, ["disabled"])
|
|
1889
1895
|
]),
|
|
1890
1896
|
default: v(() => [
|
|
1891
1897
|
z(He, E({
|
|
1892
|
-
modelValue: e(
|
|
1893
|
-
"onUpdate:modelValue":
|
|
1898
|
+
modelValue: e(a).filters,
|
|
1899
|
+
"onUpdate:modelValue": p[0] || (p[0] = (d) => e(a).filters = d)
|
|
1894
1900
|
}, {
|
|
1895
1901
|
searchOnly: !0,
|
|
1896
|
-
form: e(
|
|
1897
|
-
layout: e(
|
|
1902
|
+
form: e(a).availableFilters,
|
|
1903
|
+
layout: e(a).description.formLayout || {}
|
|
1898
1904
|
}, { focus: "" }), null, 16, ["modelValue"])
|
|
1899
1905
|
]),
|
|
1900
1906
|
_: 1
|
|
@@ -1903,51 +1909,51 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
1903
1909
|
}), se = Y(!1), ut = Y(!1), ke = Y(!1), Be = Y((...c) => null), ct = Y(), dt = !1, ta = /* @__PURE__ */ q({
|
|
1904
1910
|
__name: "aeria-insert-panel",
|
|
1905
1911
|
setup(c) {
|
|
1906
|
-
const
|
|
1907
|
-
const
|
|
1908
|
-
bt(
|
|
1909
|
-
}, { t:
|
|
1910
|
-
|
|
1912
|
+
const i = ue("meta"), t = ue(i.view.collection), a = ve("individualActions", []), l = async () => {
|
|
1913
|
+
const p = await t.$actions.deepInsert();
|
|
1914
|
+
bt(p) || (se.value = !1);
|
|
1915
|
+
}, { t: r } = jt(), u = () => {
|
|
1916
|
+
i.$actions.ask({
|
|
1911
1917
|
action: () => {
|
|
1912
1918
|
t.$actions.clearItem(), t.validationErrors = {}, se.value = !1;
|
|
1913
1919
|
},
|
|
1914
|
-
body:
|
|
1920
|
+
body: r("prompt.close_panel")
|
|
1915
1921
|
});
|
|
1916
1922
|
};
|
|
1917
|
-
return re(() => t.item._id, (
|
|
1918
|
-
|
|
1919
|
-
}), (
|
|
1923
|
+
return re(() => t.item._id, (p) => {
|
|
1924
|
+
p === null && (se.value = !1);
|
|
1925
|
+
}), (p, d) => {
|
|
1920
1926
|
const h = ne("clickable");
|
|
1921
|
-
return
|
|
1927
|
+
return o(), $(Ae, {
|
|
1922
1928
|
modelValue: e(se),
|
|
1923
|
-
"onUpdate:modelValue":
|
|
1929
|
+
"onUpdate:modelValue": d[3] || (d[3] = (_) => vt(se) ? se.value = _ : null),
|
|
1924
1930
|
"fixed-right": "",
|
|
1925
1931
|
loading: e(t).loading.get,
|
|
1926
1932
|
onOverlayClick: u
|
|
1927
1933
|
}, {
|
|
1928
1934
|
header: v(() => [
|
|
1929
|
-
|
|
1935
|
+
k("span", null, g((() => {
|
|
1930
1936
|
switch (e(se)) {
|
|
1931
1937
|
case "add":
|
|
1932
|
-
return e(
|
|
1938
|
+
return e(r)("action.add", { capitalize: !0 });
|
|
1933
1939
|
case "duplicate":
|
|
1934
|
-
return e(
|
|
1940
|
+
return e(r)("action.duplicate", { capitalize: !0 });
|
|
1935
1941
|
case "edit":
|
|
1936
1942
|
default:
|
|
1937
|
-
return e(
|
|
1943
|
+
return e(r)("action.edit", { capitalize: !0 });
|
|
1938
1944
|
}
|
|
1939
1945
|
})()), 1),
|
|
1940
|
-
|
|
1946
|
+
k("span", null, " " + g(e(r)(e(i).view.collection)), 1)
|
|
1941
1947
|
]),
|
|
1942
1948
|
extra: v(() => [
|
|
1943
1949
|
z(Ce, E({
|
|
1944
1950
|
subject: e(t).item,
|
|
1945
|
-
actions: e(
|
|
1951
|
+
actions: e(a).filter(({ action: _ }) => _ !== "ui/spawnEdit")
|
|
1946
1952
|
}, {
|
|
1947
|
-
onActionClick:
|
|
1953
|
+
onActionClick: d[2] || (d[2] = (_) => se.value = !1)
|
|
1948
1954
|
}), {
|
|
1949
1955
|
default: v(() => [
|
|
1950
|
-
e(t).item._id ? Z((
|
|
1956
|
+
e(t).item._id ? Z((o(), $(K, {
|
|
1951
1957
|
key: 0,
|
|
1952
1958
|
reactive: "",
|
|
1953
1959
|
icon: "dots-three"
|
|
@@ -1964,7 +1970,7 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
1964
1970
|
onClick: u
|
|
1965
1971
|
}, {
|
|
1966
1972
|
default: v(() => [
|
|
1967
|
-
D(
|
|
1973
|
+
D(g(e(r)("action.cancel", { capitalize: !0 })), 1)
|
|
1968
1974
|
]),
|
|
1969
1975
|
_: 1
|
|
1970
1976
|
}),
|
|
@@ -1975,7 +1981,7 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
1975
1981
|
onClick: l
|
|
1976
1982
|
}, {
|
|
1977
1983
|
default: v(() => [
|
|
1978
|
-
D(
|
|
1984
|
+
D(g(e(r)("action.insert", { capitalize: !0 })), 1)
|
|
1979
1985
|
]),
|
|
1980
1986
|
_: 1
|
|
1981
1987
|
}, 8, ["disabled", "loading"])
|
|
@@ -1983,20 +1989,20 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
1983
1989
|
default: v(() => [
|
|
1984
1990
|
z(He, E({
|
|
1985
1991
|
modelValue: e(t).item,
|
|
1986
|
-
"onUpdate:modelValue":
|
|
1992
|
+
"onUpdate:modelValue": d[0] || (d[0] = (_) => e(t).item = _)
|
|
1987
1993
|
}, {
|
|
1988
|
-
collection: e(
|
|
1994
|
+
collection: e(i).view.collection,
|
|
1989
1995
|
form: e(t).properties,
|
|
1990
1996
|
isReadOnly: dt,
|
|
1991
1997
|
layout: e(t).description.formLayout || {}
|
|
1992
1998
|
}, {
|
|
1993
1999
|
focus: "",
|
|
1994
|
-
onAdd:
|
|
2000
|
+
onAdd: d[1] || (d[1] = (_) => _.preventDefault())
|
|
1995
2001
|
}), de({ _: 2 }, [
|
|
1996
|
-
U(Object.keys(
|
|
1997
|
-
name:
|
|
1998
|
-
fn: v((
|
|
1999
|
-
A(
|
|
2002
|
+
U(Object.keys(p.$slots).filter((_) => _.startsWith("field-")), (_) => ({
|
|
2003
|
+
name: _,
|
|
2004
|
+
fn: v((n) => [
|
|
2005
|
+
A(p.$slots, _, ce(Ve(n)))
|
|
2000
2006
|
])
|
|
2001
2007
|
}))
|
|
2002
2008
|
]), 1040, ["modelValue"])
|
|
@@ -2005,28 +2011,28 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2005
2011
|
}, 8, ["modelValue", "loading"]);
|
|
2006
2012
|
};
|
|
2007
2013
|
}
|
|
2008
|
-
}), kt = (c,
|
|
2009
|
-
if (
|
|
2014
|
+
}), kt = (c, i) => {
|
|
2015
|
+
if (i) {
|
|
2010
2016
|
if (!c) {
|
|
2011
|
-
|
|
2017
|
+
i.filtersPreset = {}, i.preferredTableProperties = [], i.pagination.offset = 0;
|
|
2012
2018
|
return;
|
|
2013
2019
|
}
|
|
2014
|
-
|
|
2020
|
+
i.filtersPreset = c.filters || {}, i.preferredTableProperties = c.table ? Array.from(c.table) : [], i.pagination.offset = 0;
|
|
2015
2021
|
}
|
|
2016
|
-
}, na = (c,
|
|
2022
|
+
}, na = (c, i = {
|
|
2017
2023
|
persistInQuery: !0
|
|
2018
2024
|
}) => {
|
|
2019
|
-
const
|
|
2020
|
-
return re(() =>
|
|
2025
|
+
const a = Re().currentRoute;
|
|
2026
|
+
return re(() => a.value.query.section, (l) => {
|
|
2021
2027
|
if (c) {
|
|
2022
2028
|
if (c.description.filtersPresets) {
|
|
2023
|
-
const
|
|
2024
|
-
kt(c.description.filtersPresets[
|
|
2029
|
+
const r = l || Object.keys(c.description.filtersPresets)[0];
|
|
2030
|
+
kt(c.description.filtersPresets[r], c);
|
|
2025
2031
|
}
|
|
2026
|
-
if (
|
|
2027
|
-
const
|
|
2028
|
-
|
|
2029
|
-
$search: `"${
|
|
2032
|
+
if (i.persistInQuery) {
|
|
2033
|
+
const r = a.value.query;
|
|
2034
|
+
r.offset && (c.pagination.offset = +r.offset), r.limit && (c.pagination.limit = +r.limit), r.search && (c.textQuery = r.search, c.filters.$text = {
|
|
2035
|
+
$search: `"${r.search}"`,
|
|
2030
2036
|
$caseSensitive: !1
|
|
2031
2037
|
});
|
|
2032
2038
|
}
|
|
@@ -2052,8 +2058,8 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2052
2058
|
}, wa = { class: "table__cell-actions" }, Ba = {
|
|
2053
2059
|
key: 2,
|
|
2054
2060
|
class: "no-print table__mobile-actions"
|
|
2055
|
-
}, Sa = ["id"], ja = { key: 1 }, Ta = /* @__PURE__ */ oa(() => /* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2061
|
+
}, Sa = ["id"], ja = { key: 1 }, Ta = /* @__PURE__ */ oa(() => /* @__PURE__ */ k("td", { colspan: 10 }, [
|
|
2062
|
+
/* @__PURE__ */ k("div", { class: "table__empty" }, " Não foram encontrados resultados. ")
|
|
2057
2063
|
], -1)), Ra = [
|
|
2058
2064
|
Ta
|
|
2059
2065
|
], La = /* @__PURE__ */ q({
|
|
@@ -2067,107 +2073,107 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2067
2073
|
layout: {}
|
|
2068
2074
|
},
|
|
2069
2075
|
emits: ["itemClick"],
|
|
2070
|
-
setup(c, { emit:
|
|
2071
|
-
const t = c,
|
|
2076
|
+
setup(c, { emit: i }) {
|
|
2077
|
+
const t = c, a = i, l = je(), r = t.collection || Te(), u = r ? ue(typeof r == "string" ? r : r.value) : null, p = H({
|
|
2072
2078
|
get: () => u == null ? void 0 : u.selected,
|
|
2073
|
-
set: (
|
|
2074
|
-
}),
|
|
2075
|
-
var
|
|
2076
|
-
return !l.value.xl || !((
|
|
2079
|
+
set: (f) => u == null ? void 0 : u.$actions.selectManyItems(f, !0)
|
|
2080
|
+
}), d = (f, V) => f != null && f.button ? typeof f.button == "object" ? Qe(V, f.button).satisfied : f.button : !1, h = (f) => {
|
|
2081
|
+
var V;
|
|
2082
|
+
return !l.value.xl || !((V = t.layout) != null && V.actions) || !t.actions ? [] : t.actions.filter((S) => {
|
|
2077
2083
|
const L = t.layout.actions[S.action];
|
|
2078
|
-
return
|
|
2084
|
+
return d(L, f);
|
|
2079
2085
|
});
|
|
2080
|
-
},
|
|
2081
|
-
var
|
|
2082
|
-
return t.actions ? !l.value.xl || !((
|
|
2086
|
+
}, _ = (f) => {
|
|
2087
|
+
var V;
|
|
2088
|
+
return t.actions ? !l.value.xl || !((V = t.layout) != null && V.actions) ? t.actions : t.actions.filter((S) => {
|
|
2083
2089
|
const L = t.layout.actions[S.action];
|
|
2084
|
-
return !
|
|
2090
|
+
return !d(L, f);
|
|
2085
2091
|
}) : [];
|
|
2086
|
-
},
|
|
2092
|
+
}, n = (f, V) => {
|
|
2087
2093
|
var W, P;
|
|
2088
|
-
const S = [], L = (P = (W = t.layout) == null ? void 0 : W.actions) == null ? void 0 : P[
|
|
2094
|
+
const S = [], L = (P = (W = t.layout) == null ? void 0 : W.actions) == null ? void 0 : P[V.action];
|
|
2089
2095
|
return L != null && L.if && (Qe(
|
|
2090
|
-
|
|
2096
|
+
f,
|
|
2091
2097
|
L.if
|
|
2092
2098
|
).satisfied || S.push("display: none;")), S.join("");
|
|
2093
2099
|
};
|
|
2094
|
-
return (
|
|
2100
|
+
return (f, V) => {
|
|
2095
2101
|
var L, W, P;
|
|
2096
2102
|
const S = ne("clickable");
|
|
2097
|
-
return
|
|
2098
|
-
|
|
2099
|
-
A(
|
|
2100
|
-
])) : (
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2103
|
+
return f.columns && Object.keys(f.columns).length > 0 || f.$slots.thead ? (o(), s("table", aa, [
|
|
2104
|
+
f.$slots.thead ? (o(), s("thead", la, [
|
|
2105
|
+
A(f.$slots, "thead", {}, void 0, !0)
|
|
2106
|
+
])) : (o(), s("thead", sa, [
|
|
2107
|
+
k("tr", null, [
|
|
2108
|
+
f.checkbox && e(u) && e(l).md ? (o(), s("th", ia, [
|
|
2109
|
+
k("input", {
|
|
2104
2110
|
type: "checkbox",
|
|
2105
2111
|
checked: e(u).selected.length > 0 && e(u).selected.length === e(u).itemsCount,
|
|
2106
|
-
onChange:
|
|
2112
|
+
onChange: V[0] || (V[0] = (O) => e(u).$actions.selectAllItems(O.target.checked))
|
|
2107
2113
|
}, null, 40, ra)
|
|
2108
2114
|
])) : y("", !0),
|
|
2109
|
-
(
|
|
2115
|
+
(o(!0), s(J, null, U(Object.entries(f.columns), ([O, M], X) => (o(), s("th", {
|
|
2110
2116
|
key: `header-${X}`,
|
|
2111
2117
|
class: "table__header"
|
|
2112
|
-
},
|
|
2113
|
-
(L =
|
|
2118
|
+
}, g(M.description || e(F)(O)), 1))), 128)),
|
|
2119
|
+
(L = f.actions) != null && L.length ? (o(), s("th", ua)) : y("", !0)
|
|
2114
2120
|
])
|
|
2115
2121
|
])),
|
|
2116
|
-
|
|
2117
|
-
A(
|
|
2118
|
-
])) : (
|
|
2119
|
-
(
|
|
2122
|
+
f.$slots.tbody ? (o(), s("tbody", ca, [
|
|
2123
|
+
A(f.$slots, "tbody", {}, void 0, !0)
|
|
2124
|
+
])) : (o(), s("tbody", da, [
|
|
2125
|
+
(o(!0), s(J, null, U(f.rows, (O) => {
|
|
2120
2126
|
var M, X;
|
|
2121
|
-
return
|
|
2127
|
+
return o(), s("tr", {
|
|
2122
2128
|
key: O._id,
|
|
2123
|
-
onClick: (w) =>
|
|
2129
|
+
onClick: (w) => a("itemClick", O)
|
|
2124
2130
|
}, [
|
|
2125
|
-
e(u) &&
|
|
2126
|
-
Z(
|
|
2127
|
-
"onUpdate:modelValue":
|
|
2131
|
+
e(u) && f.checkbox && e(l).md ? (o(), s("td", _a, [
|
|
2132
|
+
Z(k("input", {
|
|
2133
|
+
"onUpdate:modelValue": V[1] || (V[1] = (w) => p.value = w),
|
|
2128
2134
|
type: "checkbox",
|
|
2129
2135
|
value: O._id
|
|
2130
2136
|
}, null, 8, ma), [
|
|
2131
|
-
[It,
|
|
2137
|
+
[It, p.value]
|
|
2132
2138
|
])
|
|
2133
2139
|
])) : y("", !0),
|
|
2134
|
-
(
|
|
2135
|
-
var R, te, oe, le,
|
|
2136
|
-
return
|
|
2140
|
+
(o(!0), s(J, null, U(Object.entries(f.columns), ([w, ee], C) => {
|
|
2141
|
+
var R, te, oe, le, m, b;
|
|
2142
|
+
return o(), s("td", {
|
|
2137
2143
|
key: `column-${O._id}-${C}`
|
|
2138
2144
|
}, [
|
|
2139
|
-
|
|
2140
|
-
`row-${w}` in
|
|
2141
|
-
A(
|
|
2145
|
+
k("div", fa, g(ee.description || e(F)(w)), 1),
|
|
2146
|
+
`row-${w}` in f.$slots ? (o(), s("div", va, [
|
|
2147
|
+
A(f.$slots, `row-${w}`, E({ ref_for: !0 }, {
|
|
2142
2148
|
store: e(u),
|
|
2143
2149
|
column: w,
|
|
2144
2150
|
property: ee,
|
|
2145
2151
|
row: O
|
|
2146
2152
|
}), void 0, !0)
|
|
2147
|
-
])) : (
|
|
2148
|
-
|
|
2149
|
-
"type" in ee && ee.type === "boolean" ? (
|
|
2150
|
-
O[w] ? (
|
|
2153
|
+
])) : (o(), s("div", ya, [
|
|
2154
|
+
k("div", ha, [
|
|
2155
|
+
"type" in ee && ee.type === "boolean" ? (o(), s("div", $a, [
|
|
2156
|
+
O[w] ? (o(), $(K, {
|
|
2151
2157
|
key: 0,
|
|
2152
2158
|
icon: "check",
|
|
2153
2159
|
"icon-classes": "aeria-blueish"
|
|
2154
2160
|
}, {
|
|
2155
2161
|
default: v(() => [
|
|
2156
|
-
D(
|
|
2162
|
+
D(g(e(F)("yes")), 1)
|
|
2157
2163
|
]),
|
|
2158
2164
|
_: 1
|
|
2159
|
-
})) : (
|
|
2165
|
+
})) : (o(), $(K, {
|
|
2160
2166
|
key: 1,
|
|
2161
2167
|
icon: "x",
|
|
2162
2168
|
"icon-classes": "aeria-redish"
|
|
2163
2169
|
}, {
|
|
2164
2170
|
default: v(() => [
|
|
2165
|
-
D(
|
|
2171
|
+
D(g(e(F)("no")), 1)
|
|
2166
2172
|
]),
|
|
2167
2173
|
_: 1
|
|
2168
2174
|
}))
|
|
2169
|
-
])) : ((R = e(pe)(ee)) == null ? void 0 : R.$ref) === "file" ? (
|
|
2170
|
-
/^image/.test((te = O[w][0]) == null ? void 0 : te.type) && "items" in ee ? (
|
|
2175
|
+
])) : ((R = e(pe)(ee)) == null ? void 0 : R.$ref) === "file" ? (o(), s("div", ba, [
|
|
2176
|
+
/^image/.test((te = O[w][0]) == null ? void 0 : te.type) && "items" in ee ? (o(), $(Me, {
|
|
2171
2177
|
key: 0,
|
|
2172
2178
|
modelValue: O[w][0].link,
|
|
2173
2179
|
"onUpdate:modelValue": (j) => O[w][0].link = j,
|
|
@@ -2175,7 +2181,7 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2175
2181
|
meta: O[w][0],
|
|
2176
2182
|
alt: "Row image",
|
|
2177
2183
|
class: "table__picture"
|
|
2178
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test((oe = O[w]) == null ? void 0 : oe.type) ? (
|
|
2184
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : /^image/.test((oe = O[w]) == null ? void 0 : oe.type) ? (o(), $(Me, {
|
|
2179
2185
|
key: 1,
|
|
2180
2186
|
modelValue: O[w].link,
|
|
2181
2187
|
"onUpdate:modelValue": (j) => O[w].link = j,
|
|
@@ -2183,22 +2189,22 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2183
2189
|
meta: O[w],
|
|
2184
2190
|
alt: "Row image",
|
|
2185
2191
|
class: "table__picture"
|
|
2186
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : (le = O[w]) != null && le.link ? (
|
|
2192
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "meta"])) : (le = O[w]) != null && le.link ? (o(), s("a", {
|
|
2187
2193
|
key: 2,
|
|
2188
2194
|
href: O[w].link,
|
|
2189
2195
|
style: { "font-size": "10pt" }
|
|
2190
|
-
},
|
|
2191
|
-
])) : (
|
|
2192
|
-
e(u) ? (
|
|
2196
|
+
}, g(O[w].filename), 9, ga)) : (o(), s("div", ka, " - "))
|
|
2197
|
+
])) : (o(), s("div", Va, [
|
|
2198
|
+
e(u) ? (o(), s("span", Ca, g(e(u).$actions.formatValue({
|
|
2193
2199
|
value: O[w],
|
|
2194
2200
|
key: w,
|
|
2195
2201
|
property: ee
|
|
2196
|
-
})), 1)) : (
|
|
2197
|
-
((
|
|
2198
|
-
(
|
|
2202
|
+
})), 1)) : (o(), s("span", Ia, g(Array.isArray(O[w]) ? O[w].filter((j) => !!j).join(", ") : [void 0, null].includes(O[w]) ? "-" : O[w]), 1)),
|
|
2203
|
+
((b = (m = e(pe)(ee)) == null ? void 0 : m.indexes) == null ? void 0 : b.length) > 1 ? (o(), s("div", Aa, [
|
|
2204
|
+
(o(!0), s(J, null, U(e(pe)(ee).indexes.slice(1, 2), (j, N) => (o(), s("div", {
|
|
2199
2205
|
key: `subvalue-${N}`,
|
|
2200
2206
|
class: "table__cell-subvalue"
|
|
2201
|
-
},
|
|
2207
|
+
}, g(e(u).$actions.formatValue({
|
|
2202
2208
|
value: O[w],
|
|
2203
2209
|
key: w,
|
|
2204
2210
|
property: ee,
|
|
@@ -2210,27 +2216,27 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2210
2216
|
]))
|
|
2211
2217
|
]);
|
|
2212
2218
|
}), 128)),
|
|
2213
|
-
(M =
|
|
2214
|
-
|
|
2215
|
-
(
|
|
2219
|
+
(M = f.actions) != null && M.length && e(l).md ? (o(), s("td", Oa, [
|
|
2220
|
+
k("div", wa, [
|
|
2221
|
+
(o(!0), s(J, null, U(h(O), (w) => (o(), $(ie, {
|
|
2216
2222
|
key: `action-${w.action}`,
|
|
2217
2223
|
small: "",
|
|
2218
2224
|
variant: "transparent",
|
|
2219
2225
|
icon: w.icon,
|
|
2220
|
-
style: $e(
|
|
2226
|
+
style: $e(n(O, w)),
|
|
2221
2227
|
onClick: (ee) => w.click(O)
|
|
2222
2228
|
}, {
|
|
2223
2229
|
default: v(() => [
|
|
2224
|
-
D(
|
|
2230
|
+
D(g(e(F)(w.label)), 1)
|
|
2225
2231
|
]),
|
|
2226
2232
|
_: 2
|
|
2227
2233
|
}, 1032, ["icon", "style", "onClick"]))), 128)),
|
|
2228
|
-
|
|
2234
|
+
_(O).length > 0 ? (o(), $(Ce, E({
|
|
2229
2235
|
key: 0,
|
|
2230
2236
|
ref_for: !0
|
|
2231
2237
|
}, {
|
|
2232
2238
|
subject: O,
|
|
2233
|
-
actions:
|
|
2239
|
+
actions: _(O)
|
|
2234
2240
|
}), {
|
|
2235
2241
|
default: v(() => [
|
|
2236
2242
|
Z(z(K, {
|
|
@@ -2243,12 +2249,12 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2243
2249
|
_: 2
|
|
2244
2250
|
}, 1040)) : y("", !0)
|
|
2245
2251
|
])
|
|
2246
|
-
])) : (X =
|
|
2247
|
-
|
|
2252
|
+
])) : (X = f.actions) != null && X.length ? (o(), s("td", Ba, [
|
|
2253
|
+
k("div", {
|
|
2248
2254
|
class: "table__mobile-actions-grid",
|
|
2249
|
-
style: $e(`grid-template-columns: repeat(${h(O).length + (
|
|
2255
|
+
style: $e(`grid-template-columns: repeat(${h(O).length + (_(O).length ? 1 : 0)}, 1fr);`)
|
|
2250
2256
|
}, [
|
|
2251
|
-
(
|
|
2257
|
+
(o(!0), s(J, null, U(h(O), (w) => (o(), $(fe, {
|
|
2252
2258
|
key: `action-${w.action}`,
|
|
2253
2259
|
class: "table__mobile-actions-button",
|
|
2254
2260
|
onClick: (ee) => w.click(O)
|
|
@@ -2258,19 +2264,19 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2258
2264
|
icon: w.icon || "gear"
|
|
2259
2265
|
}, {
|
|
2260
2266
|
default: v(() => [
|
|
2261
|
-
D(
|
|
2267
|
+
D(g(e(F)(w.label)), 1)
|
|
2262
2268
|
]),
|
|
2263
2269
|
_: 2
|
|
2264
2270
|
}, 1032, ["icon"])
|
|
2265
2271
|
]),
|
|
2266
2272
|
_: 2
|
|
2267
2273
|
}, 1032, ["onClick"]))), 128)),
|
|
2268
|
-
|
|
2274
|
+
_(O).length > 0 ? (o(), $(Ce, E({
|
|
2269
2275
|
key: 0,
|
|
2270
2276
|
ref_for: !0
|
|
2271
2277
|
}, {
|
|
2272
2278
|
subject: O,
|
|
2273
|
-
actions:
|
|
2279
|
+
actions: _(O)
|
|
2274
2280
|
}), {
|
|
2275
2281
|
default: v(() => [
|
|
2276
2282
|
z(K, {
|
|
@@ -2282,14 +2288,14 @@ const He = /* @__PURE__ */ G(xo, [["__scopeId", "data-v-4fa79d79"]]), ea = /* @_
|
|
|
2282
2288
|
}, 1040)) : y("", !0)
|
|
2283
2289
|
], 4)
|
|
2284
2290
|
])) : y("", !0),
|
|
2285
|
-
|
|
2291
|
+
k("div", {
|
|
2286
2292
|
id: `dropdown-${O._id}`
|
|
2287
2293
|
}, null, 8, Sa)
|
|
2288
2294
|
], 8, pa);
|
|
2289
2295
|
}), 128))
|
|
2290
2296
|
])),
|
|
2291
|
-
|
|
2292
|
-
|
|
2297
|
+
k("tfoot", null, [
|
|
2298
|
+
f.$slots.tfoot ? A(f.$slots, "tfoot", { key: 0 }, void 0, !0) : f.columns && !((W = f.rows) != null && W.length) && !((P = e(u)) != null && P.loading.getAll) ? (o(), s("tr", ja, Ra)) : y("", !0)
|
|
2293
2299
|
])
|
|
2294
2300
|
])) : y("", !0);
|
|
2295
2301
|
};
|
|
@@ -2303,26 +2309,26 @@ const za = /* @__PURE__ */ G(La, [["__scopeId", "data-v-434830ec"]]), Ma = /* @_
|
|
|
2303
2309
|
componentProps: {}
|
|
2304
2310
|
},
|
|
2305
2311
|
setup(c) {
|
|
2306
|
-
const
|
|
2307
|
-
const
|
|
2308
|
-
collection:
|
|
2312
|
+
const i = c, t = ge(), a = Te(), l = H(() => {
|
|
2313
|
+
const r = {
|
|
2314
|
+
collection: a,
|
|
2309
2315
|
checkbox: t.hasSelectionActions,
|
|
2310
2316
|
columns: t.tableProperties,
|
|
2311
2317
|
rows: t.items,
|
|
2312
|
-
actions:
|
|
2318
|
+
actions: i.individualActions,
|
|
2313
2319
|
layout: t.tableLayout
|
|
2314
2320
|
};
|
|
2315
|
-
return Object.assign(
|
|
2321
|
+
return Object.assign(r, i.componentProps);
|
|
2316
2322
|
});
|
|
2317
|
-
return (
|
|
2318
|
-
|
|
2319
|
-
e(t).properties ? (
|
|
2323
|
+
return (r, u) => (o(), s("div", null, [
|
|
2324
|
+
r.$slots.inner ? A(r.$slots, "inner", { key: 0 }) : y("", !0),
|
|
2325
|
+
e(t).properties ? (o(), $(za, E({ key: 1 }, l.value, {
|
|
2320
2326
|
key: e(t).$id
|
|
2321
2327
|
}), de({ _: 2 }, [
|
|
2322
|
-
U(Object.keys(
|
|
2323
|
-
name:
|
|
2324
|
-
fn: v((
|
|
2325
|
-
A(
|
|
2328
|
+
U(Object.keys(r.$slots).filter((p) => !["inner"].includes(p)), (p) => ({
|
|
2329
|
+
name: p,
|
|
2330
|
+
fn: v((d) => [
|
|
2331
|
+
A(r.$slots, p, ce(Ve(d)))
|
|
2326
2332
|
])
|
|
2327
2333
|
}))
|
|
2328
2334
|
]), 1040)) : y("", !0)
|
|
@@ -2334,13 +2340,13 @@ const za = /* @__PURE__ */ G(La, [["__scopeId", "data-v-434830ec"]]), Ma = /* @_
|
|
|
2334
2340
|
list: { type: Boolean }
|
|
2335
2341
|
},
|
|
2336
2342
|
setup(c) {
|
|
2337
|
-
return (
|
|
2343
|
+
return (i, t) => (o(), s("div", {
|
|
2338
2344
|
class: Q(`
|
|
2339
2345
|
grid
|
|
2340
|
-
${
|
|
2346
|
+
${i.list && "grid--list"}
|
|
2341
2347
|
`)
|
|
2342
2348
|
}, [
|
|
2343
|
-
A(
|
|
2349
|
+
A(i.$slots, "default", {}, void 0, !0)
|
|
2344
2350
|
], 2));
|
|
2345
2351
|
}
|
|
2346
2352
|
});
|
|
@@ -2356,36 +2362,36 @@ const qa = /* @__PURE__ */ G(Fa, [["__scopeId", "data-v-438c4aed"]]), Ua = { key
|
|
|
2356
2362
|
componentName: {}
|
|
2357
2363
|
},
|
|
2358
2364
|
setup(c) {
|
|
2359
|
-
const t = c.layoutOptions,
|
|
2360
|
-
return (
|
|
2361
|
-
const
|
|
2362
|
-
return
|
|
2363
|
-
list:
|
|
2365
|
+
const t = c.layoutOptions, a = ge(), l = (r) => Array.isArray(r) ? r[0] : r;
|
|
2366
|
+
return (r, u) => {
|
|
2367
|
+
const p = ne("clickable");
|
|
2368
|
+
return o(), $(qa, {
|
|
2369
|
+
list: r.componentName === "list"
|
|
2364
2370
|
}, {
|
|
2365
2371
|
default: v(() => [
|
|
2366
|
-
(
|
|
2367
|
-
key:
|
|
2368
|
-
inactive: !!(e(t).active && !
|
|
2369
|
-
horizontal:
|
|
2372
|
+
(o(!0), s(J, null, U(e(a).items, (d) => (o(), $(pn, {
|
|
2373
|
+
key: d,
|
|
2374
|
+
inactive: !!(e(t).active && !d[e(t).active]),
|
|
2375
|
+
horizontal: r.componentName === "list"
|
|
2370
2376
|
}, de({
|
|
2371
2377
|
footer: v(() => [
|
|
2372
|
-
e(t).title ? (
|
|
2373
|
-
e(t).information ? (
|
|
2378
|
+
e(t).title ? (o(), s("div", Ua, g(d[e(t).title]), 1)) : y("", !0),
|
|
2379
|
+
e(t).information ? (o(), s("div", Ea, g(d[e(t).information]), 1)) : y("", !0)
|
|
2374
2380
|
]),
|
|
2375
2381
|
actions: v(() => [
|
|
2376
|
-
|
|
2382
|
+
r.individualActions.length > 0 ? (o(), $(Ce, E({
|
|
2377
2383
|
key: 0,
|
|
2378
2384
|
ref_for: !0
|
|
2379
2385
|
}, {
|
|
2380
|
-
subject:
|
|
2381
|
-
actions:
|
|
2386
|
+
subject: d,
|
|
2387
|
+
actions: r.individualActions
|
|
2382
2388
|
}), {
|
|
2383
2389
|
default: v(() => [
|
|
2384
2390
|
Z(z(K, {
|
|
2385
2391
|
reactive: "",
|
|
2386
2392
|
icon: "dots-three-vertical"
|
|
2387
2393
|
}, null, 512), [
|
|
2388
|
-
[
|
|
2394
|
+
[p]
|
|
2389
2395
|
])
|
|
2390
2396
|
]),
|
|
2391
2397
|
_: 2
|
|
@@ -2397,22 +2403,22 @@ const qa = /* @__PURE__ */ G(Fa, [["__scopeId", "data-v-438c4aed"]]), Ua = { key
|
|
|
2397
2403
|
z(Me, {
|
|
2398
2404
|
alt: "Item picture",
|
|
2399
2405
|
expandable: "",
|
|
2400
|
-
url: (h = l(
|
|
2401
|
-
meta: l(
|
|
2406
|
+
url: (h = l(d[e(t).picture])) == null ? void 0 : h.link,
|
|
2407
|
+
meta: l(d[e(t).picture])
|
|
2402
2408
|
}, null, 8, ["url", "meta"])
|
|
2403
2409
|
];
|
|
2404
2410
|
}),
|
|
2405
2411
|
_: 2
|
|
2406
2412
|
}, [
|
|
2407
|
-
e(t).badge && Array.isArray(
|
|
2413
|
+
e(t).badge && Array.isArray(d[e(t).badge]) ? {
|
|
2408
2414
|
name: "badge",
|
|
2409
2415
|
fn: v(() => [
|
|
2410
|
-
(
|
|
2411
|
-
key: `${
|
|
2416
|
+
(o(!0), s(J, null, U(d[e(t).badge], (h) => (o(), $(be, {
|
|
2417
|
+
key: `${d._id}-${h}`,
|
|
2412
2418
|
large: ""
|
|
2413
2419
|
}, {
|
|
2414
2420
|
default: v(() => [
|
|
2415
|
-
D(
|
|
2421
|
+
D(g(e(t).translateBadge ? e(F)(h) : h), 1)
|
|
2416
2422
|
]),
|
|
2417
2423
|
_: 2
|
|
2418
2424
|
}, 1024))), 128))
|
|
@@ -2423,7 +2429,7 @@ const qa = /* @__PURE__ */ G(Fa, [["__scopeId", "data-v-438c4aed"]]), Ua = { key
|
|
|
2423
2429
|
fn: v(() => [
|
|
2424
2430
|
z(be, null, {
|
|
2425
2431
|
default: v(() => [
|
|
2426
|
-
D(
|
|
2432
|
+
D(g(e(t).translateBadge ? e(F)(d[e(t).badge]) : d[e(t)[r.badge]]), 1)
|
|
2427
2433
|
]),
|
|
2428
2434
|
_: 2
|
|
2429
2435
|
}, 1024)
|
|
@@ -2447,7 +2453,7 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2447
2453
|
}, Wa = {
|
|
2448
2454
|
key: 0,
|
|
2449
2455
|
class: "crud__search"
|
|
2450
|
-
}, Xa = { class: "crud__actions" }, Ya = { class: "crud__context-badge" }, Ja = /* @__PURE__ */ Qa(() => /* @__PURE__ */
|
|
2456
|
+
}, Xa = { class: "crud__actions" }, Ya = { class: "crud__context-badge" }, Ja = /* @__PURE__ */ Qa(() => /* @__PURE__ */ k("div", null, "Filtros", -1)), Ka = { key: 0 }, Za = {
|
|
2451
2457
|
key: 3,
|
|
2452
2458
|
class: "crud__pagination"
|
|
2453
2459
|
}, _t = 30, Pa = /* @__PURE__ */ q({
|
|
@@ -2465,32 +2471,32 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2465
2471
|
noQueryPersistence: { type: Boolean }
|
|
2466
2472
|
},
|
|
2467
2473
|
emits: ["uiEvent"],
|
|
2468
|
-
setup(c, { emit:
|
|
2469
|
-
const t = c,
|
|
2474
|
+
setup(c, { emit: i }) {
|
|
2475
|
+
const t = c, a = i, l = Re(), r = ht({
|
|
2470
2476
|
delay: 600
|
|
2471
|
-
}), u = ue("meta"),
|
|
2477
|
+
}), u = ue("meta"), p = je(), { reachedEnd: d, detach: h } = We(null, {
|
|
2472
2478
|
antecipate: 600
|
|
2473
|
-
}),
|
|
2474
|
-
|
|
2475
|
-
C &&
|
|
2479
|
+
}), _ = !p.value.md || t.scrollPagination;
|
|
2480
|
+
_ && re(d, (C) => {
|
|
2481
|
+
C && n.pagination.recordsTotal > n.items.length && S.value < _t && (S.value += 1, W());
|
|
2476
2482
|
});
|
|
2477
|
-
const
|
|
2478
|
-
na(
|
|
2483
|
+
const n = ue(t.collection);
|
|
2484
|
+
na(n, {
|
|
2479
2485
|
persistInQuery: !t.noQueryPersistence
|
|
2480
2486
|
});
|
|
2481
|
-
const
|
|
2482
|
-
Be.value =
|
|
2487
|
+
const f = $t(), V = t.action ? e(t.action) : qt(n, l, f);
|
|
2488
|
+
Be.value = V[0], ct.value = V[1];
|
|
2483
2489
|
const S = Y(0), L = Y(!1), W = async (C) => {
|
|
2484
|
-
|
|
2490
|
+
n.activeFilters = Object.assign({}, (C == null ? void 0 : C.filters) || n.$filters), Object.assign(n.activeFilters, n.filtersPreset);
|
|
2485
2491
|
const R = {
|
|
2486
|
-
filters:
|
|
2487
|
-
limit:
|
|
2488
|
-
offset:
|
|
2489
|
-
project:
|
|
2492
|
+
filters: n.activeFilters,
|
|
2493
|
+
limit: n.pagination.limit,
|
|
2494
|
+
offset: n.pagination.offset,
|
|
2495
|
+
project: n.preferredTableProperties.length > 0 ? n.preferredTableProperties : n.description.table || Object.keys(n.properties)
|
|
2490
2496
|
};
|
|
2491
|
-
S.value > 0 && (R.limit = 15, R.offset = S.value * R.limit),
|
|
2492
|
-
const { data: te, pagination: oe } = await
|
|
2493
|
-
|
|
2497
|
+
S.value > 0 && (R.limit = 15, R.offset = S.value * R.limit), n.description.tableMeta && (R.project = R.project.concat(n.description.tableMeta)), C && Object.assign(R, C), n.loading.getAll = !0;
|
|
2498
|
+
const { data: te, pagination: oe } = await n.$actions.retrieveItems(R);
|
|
2499
|
+
n.pagination.recordsCount = oe.recordsCount, n.pagination.recordsTotal = oe.recordsTotal, S.value === 0 && n.items.splice(0), n.items.push(...te), n.loading.getAll = !1, L.value = !0;
|
|
2494
2500
|
}, P = async (C) => {
|
|
2495
2501
|
l.push({
|
|
2496
2502
|
query: {
|
|
@@ -2498,7 +2504,7 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2498
2504
|
offset: C.offset,
|
|
2499
2505
|
limit: C.limit
|
|
2500
2506
|
}
|
|
2501
|
-
}),
|
|
2507
|
+
}), n.pagination.offset = C.offset, n.pagination.limit = C.limit, W();
|
|
2502
2508
|
}, O = ve("noResultsComponent", null);
|
|
2503
2509
|
re(() => [
|
|
2504
2510
|
l.currentRoute.value.path,
|
|
@@ -2508,33 +2514,33 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2508
2514
|
return;
|
|
2509
2515
|
const te = l.currentRoute.value;
|
|
2510
2516
|
if (u.view.title = t.collection, u.view.collection = t.collection, ut.value = !1, !t.noFetch && !te.query._popstate) {
|
|
2511
|
-
const oe = Ut(
|
|
2512
|
-
Object.keys(oe).length > 0 && Object.assign(
|
|
2517
|
+
const oe = Ut(n, te);
|
|
2518
|
+
Object.keys(oe).length > 0 && Object.assign(n.filters, oe), await W();
|
|
2513
2519
|
}
|
|
2514
2520
|
}, {
|
|
2515
2521
|
immediate: !0,
|
|
2516
2522
|
flush: "post"
|
|
2517
2523
|
});
|
|
2518
|
-
const [M] =
|
|
2524
|
+
const [M] = r((C) => (l.push({
|
|
2519
2525
|
query: {
|
|
2520
2526
|
search: C || void 0
|
|
2521
2527
|
}
|
|
2522
|
-
}), C ? (
|
|
2528
|
+
}), C ? (n.filters = Object.assign(Se(n.freshFilters), {
|
|
2523
2529
|
$text: {
|
|
2524
2530
|
$search: `"${C}"`,
|
|
2525
2531
|
$caseSensitive: !1
|
|
2526
2532
|
}
|
|
2527
2533
|
}), W({
|
|
2528
2534
|
offset: 0
|
|
2529
|
-
})) : (
|
|
2530
|
-
re(() =>
|
|
2535
|
+
})) : (n.filters = Se(n.freshFilters), S.value = 0, W())));
|
|
2536
|
+
re(() => n.textQuery, (C) => {
|
|
2531
2537
|
M(C);
|
|
2532
2538
|
});
|
|
2533
2539
|
const X = (C) => {
|
|
2534
2540
|
C.currentLayout = C.currentLayout === "tabular" ? C.description.layout.name : "tabular";
|
|
2535
2541
|
};
|
|
2536
2542
|
At(() => {
|
|
2537
|
-
|
|
2543
|
+
n.$actions.clearFilters(), n.textQuery = "", h();
|
|
2538
2544
|
}), re(() => ct.value, async (C) => {
|
|
2539
2545
|
var oe;
|
|
2540
2546
|
const R = Se(C);
|
|
@@ -2544,29 +2550,29 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2544
2550
|
"spawnEdit",
|
|
2545
2551
|
"spawnView",
|
|
2546
2552
|
"duplicate"
|
|
2547
|
-
].includes(R.name) && (te =
|
|
2553
|
+
].includes(R.name) && (te = n.$actions.get({
|
|
2548
2554
|
filters: {
|
|
2549
2555
|
_id: R.params._id
|
|
2550
2556
|
}
|
|
2551
2557
|
})), R.name === "spawnAdd")
|
|
2552
|
-
|
|
2553
|
-
delete
|
|
2558
|
+
n.$actions.clearItem(), (oe = R.params) != null && oe.item && (n.$actions.setItem(R.params.item), Object.keys(R.params.item).forEach((le) => {
|
|
2559
|
+
delete n.referenceItem[le];
|
|
2554
2560
|
})), se.value = "add";
|
|
2555
2561
|
else if (R.name === "spawnEdit")
|
|
2556
|
-
|
|
2562
|
+
n.$actions.setItem(R.params), se.value = "edit";
|
|
2557
2563
|
else if (R.name === "spawnView")
|
|
2558
2564
|
ut.value = !0, se.value = "view";
|
|
2559
2565
|
else if (R.name === "duplicate") {
|
|
2560
2566
|
await te;
|
|
2561
|
-
const le = Object.entries(
|
|
2562
|
-
if (!(
|
|
2567
|
+
const le = Object.entries(n.item).reduce((m, [b, j]) => {
|
|
2568
|
+
if (!(b in n.properties))
|
|
2563
2569
|
return {
|
|
2564
|
-
...
|
|
2565
|
-
[
|
|
2570
|
+
...m,
|
|
2571
|
+
[b]: j
|
|
2566
2572
|
};
|
|
2567
|
-
const N =
|
|
2573
|
+
const N = n.properties[b];
|
|
2568
2574
|
if (N.readOnly)
|
|
2569
|
-
return
|
|
2575
|
+
return m;
|
|
2570
2576
|
const I = (T) => {
|
|
2571
2577
|
const B = pe(N);
|
|
2572
2578
|
if (!B)
|
|
@@ -2580,32 +2586,32 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2580
2586
|
return T;
|
|
2581
2587
|
};
|
|
2582
2588
|
return j = Array.isArray(j) ? j.map(I) : I(j), {
|
|
2583
|
-
...
|
|
2584
|
-
[
|
|
2589
|
+
...m,
|
|
2590
|
+
[b]: j
|
|
2585
2591
|
};
|
|
2586
2592
|
}, {});
|
|
2587
|
-
|
|
2593
|
+
n.$actions.setItem(le), delete n.item._id, n.referenceItem = {}, se.value = "duplicate";
|
|
2588
2594
|
} else
|
|
2589
|
-
|
|
2595
|
+
a("uiEvent", R);
|
|
2590
2596
|
}, {
|
|
2591
2597
|
deep: !0
|
|
2592
2598
|
}), re(() => se, (C) => {
|
|
2593
|
-
C.value === !1 && (u.view.collection = t.collection,
|
|
2599
|
+
C.value === !1 && (u.view.collection = t.collection, n.$actions.clearItem());
|
|
2594
2600
|
});
|
|
2595
|
-
const w = H(() =>
|
|
2601
|
+
const w = H(() => n.individualActions.map((C) => ({
|
|
2596
2602
|
click: Be.value(C),
|
|
2597
2603
|
...C
|
|
2598
|
-
}))), ee = H(() =>
|
|
2604
|
+
}))), ee = H(() => n.actions.filter((C) => !C.button));
|
|
2599
2605
|
return ye(Ue, H(() => t.collection)), ye("individualActions", w), (C, R) => {
|
|
2600
|
-
var le,
|
|
2606
|
+
var le, m, b, j, N, I, T;
|
|
2601
2607
|
const te = ne("clickable"), oe = ne("loading");
|
|
2602
|
-
return
|
|
2603
|
-
e(ke) ? (
|
|
2604
|
-
key: e(
|
|
2608
|
+
return o(), s(J, null, [
|
|
2609
|
+
e(ke) ? (o(), $(ea, {
|
|
2610
|
+
key: e(n).$id,
|
|
2605
2611
|
modelValue: e(ke),
|
|
2606
2612
|
"onUpdate:modelValue": R[0] || (R[0] = (B) => vt(ke) ? ke.value = B : null)
|
|
2607
2613
|
}, null, 8, ["modelValue"])) : y("", !0),
|
|
2608
|
-
e(se) ? (
|
|
2614
|
+
e(se) ? (o(), $(ta, { key: 1 }, de({ _: 2 }, [
|
|
2609
2615
|
U(Object.keys(C.$slots).filter((B) => B.startsWith("field-")), (B) => ({
|
|
2610
2616
|
name: B,
|
|
2611
2617
|
fn: v((ae) => [
|
|
@@ -2613,30 +2619,30 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2613
2619
|
])
|
|
2614
2620
|
}))
|
|
2615
2621
|
]), 1024)) : y("", !0),
|
|
2616
|
-
!C.noActions && (e(
|
|
2617
|
-
e(
|
|
2622
|
+
!C.noActions && (e(n).description.search || Object.keys(e(n).availableFilters).length > 0 || ((le = e(n)) == null ? void 0 : le.actions.length) > 0 || C.$slots.actions || !C.noLayoutToggle && e(n).description.layout && ((m = e(n).description.layout) == null ? void 0 : m.name) !== "tabular") ? (o(), s("div", Ga, [
|
|
2623
|
+
e(n).description.search ? (o(), s("div", Wa, [
|
|
2618
2624
|
z(Ie, E({
|
|
2619
|
-
modelValue: e(
|
|
2620
|
-
"onUpdate:modelValue": R[1] || (R[1] = (B) => e(
|
|
2625
|
+
modelValue: e(n).textQuery,
|
|
2626
|
+
"onUpdate:modelValue": R[1] || (R[1] = (B) => e(n).textQuery = B)
|
|
2621
2627
|
}, {
|
|
2622
2628
|
property: {
|
|
2623
2629
|
type: "string",
|
|
2624
|
-
placeholder: e(
|
|
2630
|
+
placeholder: e(n).description.search.placeholder || "Pesquise aqui",
|
|
2625
2631
|
inputType: "search"
|
|
2626
2632
|
}
|
|
2627
2633
|
}), null, 16, ["modelValue"])
|
|
2628
2634
|
])) : y("", !0),
|
|
2629
|
-
|
|
2630
|
-
ee.value.length > 0 || !C.noLayoutToggle && e(
|
|
2635
|
+
k("div", Xa, [
|
|
2636
|
+
ee.value.length > 0 || !C.noLayoutToggle && e(n).description.layout && ((b = e(n).description.layout) == null ? void 0 : b.name) !== "tabular" ? (o(), $(Ce, { key: 0 }, de({
|
|
2631
2637
|
default: v(() => [
|
|
2632
2638
|
z(ie, {
|
|
2633
2639
|
variant: "alt",
|
|
2634
2640
|
icon: "sliders"
|
|
2635
2641
|
}, {
|
|
2636
2642
|
default: v(() => [
|
|
2637
|
-
e(
|
|
2643
|
+
e(n).filtersCount ? (o(), $(be, { key: 0 }, {
|
|
2638
2644
|
default: v(() => [
|
|
2639
|
-
D(
|
|
2645
|
+
D(g(e(n).filtersCount), 1)
|
|
2640
2646
|
]),
|
|
2641
2647
|
_: 1
|
|
2642
2648
|
})) : y("", !0)
|
|
@@ -2646,24 +2652,24 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2646
2652
|
]),
|
|
2647
2653
|
_: 2
|
|
2648
2654
|
}, [
|
|
2649
|
-
Object.keys(e(
|
|
2655
|
+
Object.keys(e(n).availableFilters).length > 0 ? {
|
|
2650
2656
|
name: "filter",
|
|
2651
2657
|
fn: v(() => [
|
|
2652
|
-
Z((
|
|
2658
|
+
Z((o(), $(K, {
|
|
2653
2659
|
icon: "funnel",
|
|
2654
2660
|
onClick: R[2] || (R[2] = (B) => ke.value = !0)
|
|
2655
2661
|
}, {
|
|
2656
2662
|
default: v(() => [
|
|
2657
|
-
D(
|
|
2663
|
+
D(g(e(F)("filters", { capitalize: !0 })), 1)
|
|
2658
2664
|
]),
|
|
2659
2665
|
_: 1
|
|
2660
2666
|
})), [
|
|
2661
2667
|
[te]
|
|
2662
2668
|
]),
|
|
2663
|
-
|
|
2664
|
-
e(
|
|
2669
|
+
k("div", Ya, [
|
|
2670
|
+
e(n).filtersCount ? (o(), $(be, { key: 0 }, {
|
|
2665
2671
|
default: v(() => [
|
|
2666
|
-
D(
|
|
2672
|
+
D(g(e(n).filtersCount), 1)
|
|
2667
2673
|
]),
|
|
2668
2674
|
_: 1
|
|
2669
2675
|
})) : y("", !0)
|
|
@@ -2671,15 +2677,15 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2671
2677
|
]),
|
|
2672
2678
|
key: "0"
|
|
2673
2679
|
} : void 0,
|
|
2674
|
-
!C.noLayoutToggle && e(
|
|
2680
|
+
!C.noLayoutToggle && e(n).description.layout && ((j = e(n).description.layout) == null ? void 0 : j.name) !== "tabular" ? {
|
|
2675
2681
|
name: "layout-toggle",
|
|
2676
2682
|
fn: v(() => [
|
|
2677
|
-
Z((
|
|
2683
|
+
Z((o(), $(K, {
|
|
2678
2684
|
icon: "table",
|
|
2679
|
-
onClick: R[3] || (R[3] = (B) => X(e(
|
|
2685
|
+
onClick: R[3] || (R[3] = (B) => X(e(n)))
|
|
2680
2686
|
}, {
|
|
2681
2687
|
default: v(() => [
|
|
2682
|
-
D(
|
|
2688
|
+
D(g(e(F)("change_layout", { capitalize: !0 })), 1)
|
|
2683
2689
|
]),
|
|
2684
2690
|
_: 1
|
|
2685
2691
|
})), [
|
|
@@ -2691,20 +2697,20 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2691
2697
|
U(ee.value, (B, ae) => ({
|
|
2692
2698
|
name: `action-${ae}`,
|
|
2693
2699
|
fn: v(() => [
|
|
2694
|
-
B ? (
|
|
2700
|
+
B ? (o(), $(K, {
|
|
2695
2701
|
key: 0,
|
|
2696
2702
|
icon: B.icon || "gear",
|
|
2697
|
-
disabled: e(
|
|
2698
|
-
onClick: (_e) => e(Be)(B)({ _id: e(
|
|
2703
|
+
disabled: e(n).selected.length === 0 && B.selection,
|
|
2704
|
+
onClick: (_e) => e(Be)(B)({ _id: e(n).selected.map((me) => me._id) })
|
|
2699
2705
|
}, {
|
|
2700
2706
|
default: v(() => [
|
|
2701
|
-
D(
|
|
2707
|
+
D(g(e(F)(B.label, { capitalize: !0 })), 1)
|
|
2702
2708
|
]),
|
|
2703
2709
|
_: 2
|
|
2704
2710
|
}, 1032, ["icon", "disabled", "onClick"])) : y("", !0)
|
|
2705
2711
|
])
|
|
2706
2712
|
}))
|
|
2707
|
-
]), 1024)) : Object.keys(e(
|
|
2713
|
+
]), 1024)) : Object.keys(e(n).availableFilters).length > 0 ? (o(), $(ie, {
|
|
2708
2714
|
key: 1,
|
|
2709
2715
|
variant: "alt",
|
|
2710
2716
|
icon: "funnel",
|
|
@@ -2712,36 +2718,36 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2712
2718
|
}, {
|
|
2713
2719
|
default: v(() => [
|
|
2714
2720
|
Ja,
|
|
2715
|
-
e(
|
|
2721
|
+
e(n).filtersCount ? (o(), $(be, { key: 0 }, {
|
|
2716
2722
|
default: v(() => [
|
|
2717
|
-
D(
|
|
2723
|
+
D(g(e(n).filtersCount), 1)
|
|
2718
2724
|
]),
|
|
2719
2725
|
_: 1
|
|
2720
2726
|
})) : y("", !0)
|
|
2721
2727
|
]),
|
|
2722
2728
|
_: 1
|
|
2723
2729
|
})) : y("", !0),
|
|
2724
|
-
(
|
|
2730
|
+
(o(!0), s(J, null, U(e(n).actions.filter((B) => B.button), (B, ae) => (o(), $(ie, {
|
|
2725
2731
|
key: `action-${ae}`,
|
|
2726
2732
|
icon: B.icon,
|
|
2727
|
-
disabled: e(
|
|
2728
|
-
onClick: (_e) => e(Be)(B)({ _id: e(
|
|
2733
|
+
disabled: e(n).selected.length === 0 && B.selection,
|
|
2734
|
+
onClick: (_e) => e(Be)(B)({ _id: e(n).selected.map((me) => me._id) })
|
|
2729
2735
|
}, {
|
|
2730
2736
|
default: v(() => [
|
|
2731
|
-
D(
|
|
2737
|
+
D(g(e(F)(B.label, { capitalize: !0 })), 1)
|
|
2732
2738
|
]),
|
|
2733
2739
|
_: 2
|
|
2734
2740
|
}, 1032, ["icon", "disabled", "onClick"]))), 128)),
|
|
2735
2741
|
C.$slots.actions ? A(C.$slots, "actions", { key: 2 }, void 0, !0) : y("", !0)
|
|
2736
2742
|
])
|
|
2737
2743
|
])) : y("", !0),
|
|
2738
|
-
Z((
|
|
2739
|
-
e(
|
|
2740
|
-
e(O) ? (
|
|
2741
|
-
collection: e(
|
|
2744
|
+
Z((o(), s("div", null, [
|
|
2745
|
+
e(n).itemsCount === 0 && !e(n).loading.getAll && L.value && (e(O) || C.$slots.empty) ? (o(), s("div", Ka, [
|
|
2746
|
+
e(O) ? (o(), $(he(e(O)), ce(E({ key: 0 }, {
|
|
2747
|
+
collection: e(n).$id
|
|
2742
2748
|
})), {
|
|
2743
2749
|
default: v(() => [
|
|
2744
|
-
e(
|
|
2750
|
+
e(n).filtersCount === 0 && e(n).description.actions && "ui:spawnAdd" in e(n).description.actions ? (o(), $(ie, {
|
|
2745
2751
|
key: 0,
|
|
2746
2752
|
icon: "plus",
|
|
2747
2753
|
onClick: R[5] || (R[5] = (B) => e(Be)({
|
|
@@ -2749,23 +2755,23 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2749
2755
|
})())
|
|
2750
2756
|
}, {
|
|
2751
2757
|
default: v(() => [
|
|
2752
|
-
D(
|
|
2758
|
+
D(g(e(F)("add_first_item", { capitalize: !0 })), 1)
|
|
2753
2759
|
]),
|
|
2754
2760
|
_: 1
|
|
2755
2761
|
})) : y("", !0)
|
|
2756
2762
|
]),
|
|
2757
2763
|
_: 1
|
|
2758
2764
|
}, 16)) : A(C.$slots, "empty", ce(E({ key: 1 }, {
|
|
2759
|
-
collection: e(
|
|
2765
|
+
collection: e(n).$id
|
|
2760
2766
|
})), void 0, !0)
|
|
2761
2767
|
])) : C.$slots.component ? A(C.$slots, "component", ce(E({ key: 1 }, {
|
|
2762
|
-
store: e(
|
|
2763
|
-
})), void 0, !0) : (
|
|
2768
|
+
store: e(n)
|
|
2769
|
+
})), void 0, !0) : (o(), $(he(e(Da)(((N = C.layout) == null ? void 0 : N.name) || e(n).$currentLayout)), E({ key: 2 }, {
|
|
2764
2770
|
individualActions: w.value,
|
|
2765
|
-
layoutOptions: ((I = C.layout) == null ? void 0 : I.options) || e(
|
|
2771
|
+
layoutOptions: ((I = C.layout) == null ? void 0 : I.options) || e(n).layout.options,
|
|
2766
2772
|
componentProps: C.componentProps
|
|
2767
2773
|
}, {
|
|
2768
|
-
"component-name": ((T = C.layout) == null ? void 0 : T.name) || e(
|
|
2774
|
+
"component-name": ((T = C.layout) == null ? void 0 : T.name) || e(n).$currentLayout
|
|
2769
2775
|
}), de({ _: 2 }, [
|
|
2770
2776
|
U(Object.keys(C.$slots).filter((B) => B.startsWith("row-")), (B) => ({
|
|
2771
2777
|
name: B,
|
|
@@ -2782,11 +2788,11 @@ const pt = /* @__PURE__ */ G(Ha, [["__scopeId", "data-v-a5c79d91"]]), Da = (c) =
|
|
|
2782
2788
|
} : void 0
|
|
2783
2789
|
]), 1040, ["component-name"]))
|
|
2784
2790
|
])), [
|
|
2785
|
-
[oe, (!e(
|
|
2791
|
+
[oe, (!e(_) || S.value === _t) && e(n).loading.getAll]
|
|
2786
2792
|
]),
|
|
2787
|
-
!e(
|
|
2793
|
+
!e(n).loading.getAll && e(n).itemsCount > 0 ? (o(), s("div", Za, [
|
|
2788
2794
|
z(Mn, {
|
|
2789
|
-
pagination: e(
|
|
2795
|
+
pagination: e(n).pagination,
|
|
2790
2796
|
onPaginate: P
|
|
2791
2797
|
}, null, 8, ["pagination"])
|
|
2792
2798
|
])) : y("", !0)
|
|
@@ -2801,46 +2807,46 @@ const Rl = /* @__PURE__ */ G(Pa, [["__scopeId", "data-v-2cbb3e9f"]]), Na = { cla
|
|
|
2801
2807
|
actions: {}
|
|
2802
2808
|
},
|
|
2803
2809
|
setup(c) {
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2810
|
+
const i = ue("meta"), t = (a) => {
|
|
2811
|
+
i.$actions.fulfillPrompt(a);
|
|
2806
2812
|
};
|
|
2807
|
-
return (
|
|
2813
|
+
return (a, l) => (o(), $(Ae, {
|
|
2808
2814
|
float: "",
|
|
2809
2815
|
"fill-footer": "",
|
|
2810
2816
|
"close-hint": !1,
|
|
2811
2817
|
style: { "--panel-min-width": "32rem" }
|
|
2812
2818
|
}, de({
|
|
2813
2819
|
footer: v(() => [
|
|
2814
|
-
|
|
2820
|
+
k("div", {
|
|
2815
2821
|
class: "prompt__actions",
|
|
2816
|
-
style: $e(`grid-template-columns: repeat(${
|
|
2822
|
+
style: $e(`grid-template-columns: repeat(${a.actions.length}, 1fr)`)
|
|
2817
2823
|
}, [
|
|
2818
|
-
(
|
|
2824
|
+
(o(!0), s(J, null, U(a.actions, (r, u) => (o(), $(fe, {
|
|
2819
2825
|
key: `action-${u}`,
|
|
2820
2826
|
class: Q(`
|
|
2821
2827
|
prompt__action
|
|
2822
|
-
prompt__action--${
|
|
2828
|
+
prompt__action--${r.variant || "primary"}
|
|
2823
2829
|
`),
|
|
2824
|
-
onClick: (
|
|
2830
|
+
onClick: (p) => r.click ? r.click(r) : t(r)
|
|
2825
2831
|
}, {
|
|
2826
2832
|
default: v(() => [
|
|
2827
|
-
D(
|
|
2833
|
+
D(g(r.title || r.name), 1)
|
|
2828
2834
|
]),
|
|
2829
2835
|
_: 2
|
|
2830
2836
|
}, 1032, ["class", "onClick"]))), 128))
|
|
2831
2837
|
], 4)
|
|
2832
2838
|
]),
|
|
2833
2839
|
default: v(() => [
|
|
2834
|
-
|
|
2835
|
-
A(
|
|
2840
|
+
k("div", Na, [
|
|
2841
|
+
A(a.$slots, "default", {}, void 0, !0)
|
|
2836
2842
|
])
|
|
2837
2843
|
]),
|
|
2838
2844
|
_: 2
|
|
2839
2845
|
}, [
|
|
2840
|
-
|
|
2846
|
+
a.title ? {
|
|
2841
2847
|
name: "title",
|
|
2842
2848
|
fn: v(() => [
|
|
2843
|
-
D(
|
|
2849
|
+
D(g(a.title), 1)
|
|
2844
2850
|
]),
|
|
2845
2851
|
key: "0"
|
|
2846
2852
|
} : void 0
|
|
@@ -2856,24 +2862,24 @@ const el = /* @__PURE__ */ G(xa, [["__scopeId", "data-v-5443f297"]]), tl = { cla
|
|
|
2856
2862
|
icon: {}
|
|
2857
2863
|
},
|
|
2858
2864
|
setup(c) {
|
|
2859
|
-
const
|
|
2860
|
-
return (t,
|
|
2865
|
+
const i = ue("meta");
|
|
2866
|
+
return (t, a) => {
|
|
2861
2867
|
const l = ne("clickable");
|
|
2862
|
-
return Z((
|
|
2868
|
+
return Z((o(), s("div", {
|
|
2863
2869
|
class: Q({
|
|
2864
2870
|
toast: !0,
|
|
2865
|
-
"toast--animate": e(
|
|
2871
|
+
"toast--animate": e(i).toasts[0].itr === t.itr
|
|
2866
2872
|
}),
|
|
2867
|
-
onAnimationend:
|
|
2868
|
-
onClick:
|
|
2873
|
+
onAnimationend: a[0] || (a[0] = (r) => e(i).$actions.popToast()),
|
|
2874
|
+
onClick: a[1] || (a[1] = (r) => e(i).$actions.popToast(t.itr))
|
|
2869
2875
|
}, [
|
|
2870
2876
|
z(K, E(
|
|
2871
2877
|
t.icon ? { icon: t.icon } : { icon: "warning-circle" },
|
|
2872
2878
|
{ style: { "--icon-size": "4rem", "--icon-color": "var(--theme-brand-color-shade-3)" } }
|
|
2873
2879
|
), null, 16),
|
|
2874
|
-
|
|
2880
|
+
k("div", tl, [
|
|
2875
2881
|
A(t.$slots, "default", {}, void 0, !0),
|
|
2876
|
-
|
|
2882
|
+
k("div", nl, g(t.formatDateTime(t.date, { hoursOnly: !0 })), 1)
|
|
2877
2883
|
])
|
|
2878
2884
|
], 34)), [
|
|
2879
2885
|
[l]
|
|
@@ -2884,10 +2890,10 @@ const el = /* @__PURE__ */ G(xa, [["__scopeId", "data-v-5443f297"]]), tl = { cla
|
|
|
2884
2890
|
const al = /* @__PURE__ */ G(ol, [["__scopeId", "data-v-54736bc3"]]), ll = ["innerHTML"], sl = { class: "main__toasts" }, il = ["innerHTML"], rl = /* @__PURE__ */ q({
|
|
2885
2891
|
__name: "aeria-main",
|
|
2886
2892
|
setup(c) {
|
|
2887
|
-
const
|
|
2888
|
-
return (
|
|
2889
|
-
const
|
|
2890
|
-
return
|
|
2893
|
+
const i = ue("meta"), t = H(() => i.themeOverride || i.theme);
|
|
2894
|
+
return (a, l) => {
|
|
2895
|
+
const r = Ot("router-view");
|
|
2896
|
+
return o(), s("main", {
|
|
2891
2897
|
id: "main",
|
|
2892
2898
|
class: Q(`
|
|
2893
2899
|
main
|
|
@@ -2895,15 +2901,15 @@ const al = /* @__PURE__ */ G(ol, [["__scopeId", "data-v-54736bc3"]]), ll = ["inn
|
|
|
2895
2901
|
${t.value === "dark" && "tw-dark"}
|
|
2896
2902
|
`)
|
|
2897
2903
|
}, [
|
|
2898
|
-
(
|
|
2904
|
+
(o(), $(wt, null, {
|
|
2899
2905
|
default: v(() => [
|
|
2900
|
-
z(
|
|
2906
|
+
z(r, null, {
|
|
2901
2907
|
default: v(({ Component: u }) => [
|
|
2902
|
-
(
|
|
2903
|
-
U(Object.keys(
|
|
2904
|
-
name:
|
|
2908
|
+
(o(), $(he(u), null, de({ _: 2 }, [
|
|
2909
|
+
U(Object.keys(a.$slots), (p) => ({
|
|
2910
|
+
name: p,
|
|
2905
2911
|
fn: v(() => [
|
|
2906
|
-
A(
|
|
2912
|
+
A(a.$slots, p, {}, void 0, !0)
|
|
2907
2913
|
])
|
|
2908
2914
|
}))
|
|
2909
2915
|
]), 1024))
|
|
@@ -2913,38 +2919,38 @@ const al = /* @__PURE__ */ G(ol, [["__scopeId", "data-v-54736bc3"]]), ll = ["inn
|
|
|
2913
2919
|
]),
|
|
2914
2920
|
_: 3
|
|
2915
2921
|
})),
|
|
2916
|
-
A(
|
|
2922
|
+
A(a.$slots, "default", {}, void 0, !0),
|
|
2917
2923
|
z(Ae, E({
|
|
2918
|
-
modelValue: e(
|
|
2919
|
-
"onUpdate:modelValue": l[0] || (l[0] = (u) => e(
|
|
2924
|
+
modelValue: e(i).modal.visible,
|
|
2925
|
+
"onUpdate:modelValue": l[0] || (l[0] = (u) => e(i).modal.visible = u),
|
|
2920
2926
|
float: "",
|
|
2921
2927
|
"close-hint": ""
|
|
2922
|
-
}, e(
|
|
2928
|
+
}, e(i).modal, {
|
|
2923
2929
|
"overlay-layer": 70,
|
|
2924
|
-
onOverlayClick: l[1] || (l[1] = (u) => e(
|
|
2930
|
+
onOverlayClick: l[1] || (l[1] = (u) => e(i).modal.visible = !1)
|
|
2925
2931
|
}), {
|
|
2926
2932
|
default: v(() => [
|
|
2927
|
-
e(
|
|
2933
|
+
e(i).modal.body ? (o(), s("div", {
|
|
2928
2934
|
key: 0,
|
|
2929
2935
|
style: { "white-space": "pre-wrap" },
|
|
2930
|
-
innerHTML: e(
|
|
2936
|
+
innerHTML: e(i).modal.body
|
|
2931
2937
|
}, null, 8, ll)) : y("", !0),
|
|
2932
|
-
e(
|
|
2938
|
+
e(i).modal.component ? (o(), $(he(e(i).modal.component), { key: 1 })) : y("", !0)
|
|
2933
2939
|
]),
|
|
2934
2940
|
_: 1
|
|
2935
2941
|
}, 16, ["modelValue"]),
|
|
2936
|
-
e(
|
|
2942
|
+
e(i).prompt.visible ? (o(), $(el, ce(E({ key: 0 }, e(i).prompt)), {
|
|
2937
2943
|
default: v(() => [
|
|
2938
|
-
D(
|
|
2944
|
+
D(g(e(i).prompt.body), 1)
|
|
2939
2945
|
]),
|
|
2940
2946
|
_: 1
|
|
2941
2947
|
}, 16)) : y("", !0),
|
|
2942
|
-
|
|
2943
|
-
(
|
|
2948
|
+
k("div", sl, [
|
|
2949
|
+
(o(!0), s(J, null, U(e(i).toasts, (u) => (o(), $(al, E({ ref_for: !0 }, u, {
|
|
2944
2950
|
key: `toast-${u.itr}`
|
|
2945
2951
|
}), {
|
|
2946
2952
|
default: v(() => [
|
|
2947
|
-
|
|
2953
|
+
k("div", {
|
|
2948
2954
|
innerHTML: e(F)(u.text)
|
|
2949
2955
|
}, null, 8, il)
|
|
2950
2956
|
]),
|
|
@@ -2957,9 +2963,9 @@ const al = /* @__PURE__ */ G(ol, [["__scopeId", "data-v-54736bc3"]]), ll = ["inn
|
|
|
2957
2963
|
});
|
|
2958
2964
|
const Ll = /* @__PURE__ */ G(rl, [["__scopeId", "data-v-1166be3d"]]);
|
|
2959
2965
|
const ul = {}, cl = { class: "menu" };
|
|
2960
|
-
function dl(c,
|
|
2961
|
-
return
|
|
2962
|
-
(
|
|
2966
|
+
function dl(c, i) {
|
|
2967
|
+
return o(), s("menu", cl, [
|
|
2968
|
+
(o(!0), s(J, null, U(Object.keys(c.$slots), (t) => (o(), s("div", {
|
|
2963
2969
|
key: t,
|
|
2964
2970
|
class: "menu__entry"
|
|
2965
2971
|
}, [
|
|
@@ -2984,68 +2990,68 @@ const zl = /* @__PURE__ */ G(ul, [["render", dl], ["__scopeId", "data-v-3cfef7fb
|
|
|
2984
2990
|
dropdown: { type: Boolean }
|
|
2985
2991
|
},
|
|
2986
2992
|
setup(c) {
|
|
2987
|
-
const
|
|
2988
|
-
const
|
|
2989
|
-
return
|
|
2990
|
-
}),
|
|
2991
|
-
if (
|
|
2992
|
-
|
|
2993
|
+
const i = c, t = Bt(), a = Re(), l = je(), r = "query" in i && i.query ? "query" : "params", u = H(() => {
|
|
2994
|
+
const d = a.currentRoute.value[r][i.query || i.param];
|
|
2995
|
+
return d || Object.keys(t)[0];
|
|
2996
|
+
}), p = (d) => {
|
|
2997
|
+
if (r === "query") {
|
|
2998
|
+
a.push({
|
|
2993
2999
|
query: {
|
|
2994
|
-
...
|
|
2995
|
-
[
|
|
3000
|
+
...a.currentRoute.value.query,
|
|
3001
|
+
[i.query]: d
|
|
2996
3002
|
}
|
|
2997
3003
|
});
|
|
2998
3004
|
return;
|
|
2999
3005
|
}
|
|
3000
|
-
|
|
3006
|
+
a.push({
|
|
3001
3007
|
params: {
|
|
3002
|
-
[
|
|
3008
|
+
[i.param]: d
|
|
3003
3009
|
}
|
|
3004
3010
|
});
|
|
3005
3011
|
};
|
|
3006
|
-
return (
|
|
3007
|
-
const
|
|
3008
|
-
return
|
|
3009
|
-
e(l).md && !
|
|
3010
|
-
|
|
3011
|
-
A(
|
|
3012
|
+
return (d, h) => {
|
|
3013
|
+
const _ = ne("clickable");
|
|
3014
|
+
return o(), s("div", pl, [
|
|
3015
|
+
e(l).md && !d.dropdown ? (o(), s("div", _l, [
|
|
3016
|
+
d.$slots.default ? (o(), s("div", ml, [
|
|
3017
|
+
A(d.$slots, "default", {}, void 0, !0)
|
|
3012
3018
|
])) : y("", !0),
|
|
3013
|
-
(
|
|
3014
|
-
key:
|
|
3019
|
+
(o(!0), s(J, null, U(Object.keys(d.$slots).filter((n) => n !== "default"), (n, f) => (o(), s("div", {
|
|
3020
|
+
key: n,
|
|
3015
3021
|
class: Q({
|
|
3016
3022
|
tabs__tab: !0,
|
|
3017
|
-
"tabs__tab--current":
|
|
3023
|
+
"tabs__tab--current": n === u.value || !u.value && f === 0
|
|
3018
3024
|
}),
|
|
3019
|
-
onClick: (
|
|
3025
|
+
onClick: (V) => p(n)
|
|
3020
3026
|
}, [
|
|
3021
|
-
A(
|
|
3027
|
+
A(d.$slots, n, {}, void 0, !0)
|
|
3022
3028
|
], 10, fl))), 128))
|
|
3023
|
-
])) : (
|
|
3029
|
+
])) : (o(), s("div", vl, [
|
|
3024
3030
|
z(Ce, null, de({
|
|
3025
3031
|
default: v(() => [
|
|
3026
|
-
Z((
|
|
3032
|
+
Z((o(), $(K, {
|
|
3027
3033
|
"icon-right": "",
|
|
3028
3034
|
icon: "caret-down",
|
|
3029
3035
|
style: { "--icon-color": "var(--theme-brand-color-shade-1)" },
|
|
3030
3036
|
class: "tabs__context-menu-icon"
|
|
3031
3037
|
}, {
|
|
3032
3038
|
default: v(() => [
|
|
3033
|
-
A(
|
|
3039
|
+
A(d.$slots, u.value, {}, void 0, !0)
|
|
3034
3040
|
]),
|
|
3035
3041
|
_: 3
|
|
3036
3042
|
})), [
|
|
3037
|
-
[
|
|
3043
|
+
[_]
|
|
3038
3044
|
])
|
|
3039
3045
|
]),
|
|
3040
3046
|
_: 2
|
|
3041
3047
|
}, [
|
|
3042
|
-
U(Object.keys(
|
|
3043
|
-
name:
|
|
3048
|
+
U(Object.keys(d.$slots).filter((n) => n !== "default"), (n) => ({
|
|
3049
|
+
name: n,
|
|
3044
3050
|
fn: v(() => [
|
|
3045
|
-
|
|
3046
|
-
onClick: (
|
|
3051
|
+
k("div", {
|
|
3052
|
+
onClick: (f) => p(n)
|
|
3047
3053
|
}, [
|
|
3048
|
-
A(
|
|
3054
|
+
A(d.$slots, n, {}, void 0, !0)
|
|
3049
3055
|
], 8, yl)
|
|
3050
3056
|
])
|
|
3051
3057
|
}))
|
|
@@ -3061,10 +3067,10 @@ const $l = /* @__PURE__ */ G(hl, [["__scopeId", "data-v-4dd516ec"]]), bl = q({
|
|
|
3061
3067
|
promise: Promise
|
|
3062
3068
|
},
|
|
3063
3069
|
setup(c) {
|
|
3064
|
-
const
|
|
3070
|
+
const i = Y(c.initialValue);
|
|
3065
3071
|
return c.promise instanceof Promise && c.promise.then((t) => {
|
|
3066
|
-
|
|
3067
|
-
}), () => St("div",
|
|
3072
|
+
i.value = t;
|
|
3073
|
+
}), () => St("div", i.value);
|
|
3068
3074
|
}
|
|
3069
3075
|
}), gl = ["onClick"], kl = { key: 1 }, Vl = /* @__PURE__ */ q({
|
|
3070
3076
|
__name: "aeria-crud-topbar",
|
|
@@ -3072,40 +3078,40 @@ const $l = /* @__PURE__ */ G(hl, [["__scopeId", "data-v-4dd516ec"]]), bl = q({
|
|
|
3072
3078
|
collection: {}
|
|
3073
3079
|
},
|
|
3074
3080
|
setup(c) {
|
|
3075
|
-
const
|
|
3081
|
+
const i = c, a = Re().currentRoute, l = H(() => {
|
|
3076
3082
|
try {
|
|
3077
|
-
const
|
|
3078
|
-
return ge(
|
|
3083
|
+
const r = i.collection ? i.collection : a.value.meta.collection || a.value.params.collection;
|
|
3084
|
+
return ge(r);
|
|
3079
3085
|
} catch {
|
|
3080
3086
|
return null;
|
|
3081
3087
|
}
|
|
3082
3088
|
});
|
|
3083
|
-
return (
|
|
3089
|
+
return (r, u) => l.value && l.value.description.filtersPresets ? (o(), $($l, {
|
|
3084
3090
|
key: 0,
|
|
3085
3091
|
dropdown: "",
|
|
3086
3092
|
query: "section"
|
|
3087
3093
|
}, de({ _: 2 }, [
|
|
3088
|
-
U(Object.entries(l.value.description.filtersPresets), ([
|
|
3089
|
-
name:
|
|
3094
|
+
U(Object.entries(l.value.description.filtersPresets), ([p, d]) => ({
|
|
3095
|
+
name: p,
|
|
3090
3096
|
fn: v(() => [
|
|
3091
|
-
|
|
3097
|
+
k("div", {
|
|
3092
3098
|
class: "topbar__preset",
|
|
3093
|
-
onClick: (h) => e(kt)(
|
|
3099
|
+
onClick: (h) => e(kt)(d, l.value)
|
|
3094
3100
|
}, [
|
|
3095
|
-
|
|
3101
|
+
d.icon ? (o(), $(K, {
|
|
3096
3102
|
key: 0,
|
|
3097
|
-
icon:
|
|
3103
|
+
icon: d.icon
|
|
3098
3104
|
}, {
|
|
3099
3105
|
default: v(() => [
|
|
3100
|
-
D(
|
|
3106
|
+
D(g(d.label || e(F)(p, { plural: !0 })), 1)
|
|
3101
3107
|
]),
|
|
3102
3108
|
_: 2
|
|
3103
|
-
}, 1032, ["icon"])) : (
|
|
3104
|
-
|
|
3109
|
+
}, 1032, ["icon"])) : (o(), s("div", kl, g(d.label || e(F)(p, { plural: !0 })), 1)),
|
|
3110
|
+
d.badgeFunction ? (o(), $(be, { key: 2 }, {
|
|
3105
3111
|
default: v(() => [
|
|
3106
3112
|
z(e(bl), {
|
|
3107
3113
|
"initial-value": "0",
|
|
3108
|
-
promise: l.value.$functions[
|
|
3114
|
+
promise: l.value.$functions[d.badgeFunction]({ filters: d.filters })
|
|
3109
3115
|
}, null, 8, ["promise"])
|
|
3110
3116
|
]),
|
|
3111
3117
|
_: 2
|
|
@@ -3126,13 +3132,13 @@ const Cl = /* @__PURE__ */ G(Vl, [["__scopeId", "data-v-326eee9d"]]), Il = /* @_
|
|
|
3126
3132
|
},
|
|
3127
3133
|
emits: ["update:modelValue"],
|
|
3128
3134
|
setup(c) {
|
|
3129
|
-
const
|
|
3135
|
+
const i = c;
|
|
3130
3136
|
ye(Ue, null);
|
|
3131
|
-
const t = Et(),
|
|
3132
|
-
|
|
3133
|
-
|
|
3137
|
+
const t = Et(), a = H(() => t(
|
|
3138
|
+
i.modelValue.password,
|
|
3139
|
+
i.modelValue.confirmation
|
|
3134
3140
|
));
|
|
3135
|
-
return (l,
|
|
3141
|
+
return (l, r) => (o(), $(He, {
|
|
3136
3142
|
form: {
|
|
3137
3143
|
password: {
|
|
3138
3144
|
type: "string",
|
|
@@ -3146,20 +3152,20 @@ const Cl = /* @__PURE__ */ G(Vl, [["__scopeId", "data-v-326eee9d"]]), Il = /* @_
|
|
|
3146
3152
|
}
|
|
3147
3153
|
},
|
|
3148
3154
|
"model-value": l.modelValue,
|
|
3149
|
-
"onUpdate:modelValue":
|
|
3155
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => l.$emit("update:modelValue", u))
|
|
3150
3156
|
}, {
|
|
3151
3157
|
after: v(() => [
|
|
3152
|
-
|
|
3153
|
-
A(l.$slots, "default", ce(Ve({ passwordError:
|
|
3158
|
+
k("div", null, g(a.value || "Senhas conferem"), 1),
|
|
3159
|
+
A(l.$slots, "default", ce(Ve({ passwordError: a.value })))
|
|
3154
3160
|
]),
|
|
3155
3161
|
_: 3
|
|
3156
3162
|
}, 8, ["model-value"]));
|
|
3157
3163
|
}
|
|
3158
|
-
}), Fl = (c,
|
|
3164
|
+
}), Fl = (c, i = []) => ({
|
|
3159
3165
|
path: "/user",
|
|
3160
3166
|
name: "/builtin:user",
|
|
3161
3167
|
component: c,
|
|
3162
|
-
children:
|
|
3168
|
+
children: i.concat([
|
|
3163
3169
|
{
|
|
3164
3170
|
path: "invite/:id",
|
|
3165
3171
|
name: "/user/invite/:id",
|
|
@@ -3173,7 +3179,7 @@ const Cl = /* @__PURE__ */ G(Vl, [["__scopeId", "data-v-326eee9d"]]), Il = /* @_
|
|
|
3173
3179
|
{
|
|
3174
3180
|
path: "signin",
|
|
3175
3181
|
name: "/user/signin",
|
|
3176
|
-
component: () => import("./signin-
|
|
3182
|
+
component: () => import("./signin-98b7bf3a.js"),
|
|
3177
3183
|
meta: {
|
|
3178
3184
|
title: "Autenticação"
|
|
3179
3185
|
}
|
|
@@ -3181,7 +3187,7 @@ const Cl = /* @__PURE__ */ G(Vl, [["__scopeId", "data-v-326eee9d"]]), Il = /* @_
|
|
|
3181
3187
|
{
|
|
3182
3188
|
path: "signup",
|
|
3183
3189
|
name: "/user/signup",
|
|
3184
|
-
component: () => import("./signup-
|
|
3190
|
+
component: () => import("./signup-a12b576e.js"),
|
|
3185
3191
|
meta: {
|
|
3186
3192
|
title: "Registro"
|
|
3187
3193
|
}
|
|
@@ -3189,13 +3195,13 @@ const Cl = /* @__PURE__ */ G(Vl, [["__scopeId", "data-v-326eee9d"]]), Il = /* @_
|
|
|
3189
3195
|
{
|
|
3190
3196
|
path: "activation",
|
|
3191
3197
|
name: "/user/activation",
|
|
3192
|
-
component: () => import("./activation-
|
|
3198
|
+
component: () => import("./activation-48da470d.js"),
|
|
3193
3199
|
meta: {
|
|
3194
3200
|
title: "Ativação"
|
|
3195
3201
|
}
|
|
3196
3202
|
}
|
|
3197
3203
|
])
|
|
3198
|
-
}), ql = (c,
|
|
3204
|
+
}), ql = (c, i = []) => ({
|
|
3199
3205
|
path: "/dashboard",
|
|
3200
3206
|
name: "/builtin:dashboard",
|
|
3201
3207
|
component: c,
|
|
@@ -3205,13 +3211,13 @@ const Cl = /* @__PURE__ */ G(Vl, [["__scopeId", "data-v-326eee9d"]]), Il = /* @_
|
|
|
3205
3211
|
meta: {
|
|
3206
3212
|
title: "Dashboard"
|
|
3207
3213
|
},
|
|
3208
|
-
children:
|
|
3214
|
+
children: i.concat([
|
|
3209
3215
|
{
|
|
3210
3216
|
path: "c/:collection?",
|
|
3211
3217
|
name: "/dashboard/crud",
|
|
3212
3218
|
props: !0,
|
|
3213
3219
|
components: {
|
|
3214
|
-
default: () => import("./crud-view-
|
|
3220
|
+
default: () => import("./crud-view-63769c42.js"),
|
|
3215
3221
|
topbar: () => Promise.resolve().then(() => Il)
|
|
3216
3222
|
},
|
|
3217
3223
|
meta: {
|
|
@@ -3229,7 +3235,7 @@ const Cl = /* @__PURE__ */ G(Vl, [["__scopeId", "data-v-326eee9d"]]), Il = /* @_
|
|
|
3229
3235
|
children: [
|
|
3230
3236
|
{
|
|
3231
3237
|
path: "profile",
|
|
3232
|
-
component: () => import("./profile-
|
|
3238
|
+
component: () => import("./profile-090ce0f0.js"),
|
|
3233
3239
|
meta: {
|
|
3234
3240
|
title: "Meu perfil",
|
|
3235
3241
|
icon: "user-square"
|
|
@@ -3238,7 +3244,7 @@ const Cl = /* @__PURE__ */ G(Vl, [["__scopeId", "data-v-326eee9d"]]), Il = /* @_
|
|
|
3238
3244
|
{
|
|
3239
3245
|
path: "changepass",
|
|
3240
3246
|
name: "/dashboard/user/changepass",
|
|
3241
|
-
component: () => import("./password-change-
|
|
3247
|
+
component: () => import("./password-change-ab424d59.js"),
|
|
3242
3248
|
meta: {
|
|
3243
3249
|
title: "Mudar senha",
|
|
3244
3250
|
icon: "lock"
|