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