finso-vue-components 0.4.28 → 0.4.29
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as C, resolveComponent as
|
|
2
|
-
import { VTextField as
|
|
1
|
+
import { defineComponent as C, resolveComponent as y, openBlock as s, createBlock as b, computed as S, withDirectives as ue, unref as V, mergeProps as w, isRef as j, createSlots as H, renderList as N, withCtx as m, renderSlot as A, normalizeProps as G, guardReactiveProps as K, useModel as L, ref as P, watch as le, createElementBlock as B, resolveDynamicComponent as ce, toHandlers as me, toDisplayString as T, createTextVNode as E, createElementVNode as O, createCommentVNode as X, withModifiers as q, createVNode as k, mergeModels as Y, onMounted as fe, Fragment as W } from "vue";
|
|
2
|
+
import { VTextField as ae, VTextarea as pe, VAutocomplete as ve, VCheckbox as ye, VSelect as ge, VNumberInput as be, VSwitch as _e } from "vuetify/components";
|
|
3
3
|
import { vMaska as he } from "maska/vue";
|
|
4
|
-
import { useField as
|
|
4
|
+
import { useField as R } from "vee-validate";
|
|
5
5
|
const J = /* @__PURE__ */ C({
|
|
6
6
|
__name: "FButton",
|
|
7
7
|
props: {
|
|
@@ -10,9 +10,9 @@ const J = /* @__PURE__ */ C({
|
|
|
10
10
|
},
|
|
11
11
|
setup(t) {
|
|
12
12
|
const e = t;
|
|
13
|
-
return (n,
|
|
14
|
-
const
|
|
15
|
-
return s(),
|
|
13
|
+
return (n, r) => {
|
|
14
|
+
const l = y("v-btn");
|
|
15
|
+
return s(), b(l, {
|
|
16
16
|
color: e.color,
|
|
17
17
|
rounded: e.rounded
|
|
18
18
|
}, null, 8, ["color", "rounded"]);
|
|
@@ -37,13 +37,13 @@ const J = /* @__PURE__ */ C({
|
|
|
37
37
|
},
|
|
38
38
|
emits: ["clickAppendInner"],
|
|
39
39
|
setup(t) {
|
|
40
|
-
const e = t, n =
|
|
40
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
41
41
|
initialValue: e.modelValue,
|
|
42
42
|
syncVModel: !0
|
|
43
43
|
});
|
|
44
|
-
return (p,
|
|
45
|
-
modelValue:
|
|
46
|
-
"onUpdate:modelValue":
|
|
44
|
+
return (p, o) => ue((s(), b(V(ae), w(p.$attrs, {
|
|
45
|
+
modelValue: V(l),
|
|
46
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => j(l) ? l.value = v : null),
|
|
47
47
|
name: e.name,
|
|
48
48
|
color: e.color,
|
|
49
49
|
density: e.density,
|
|
@@ -51,18 +51,18 @@ const J = /* @__PURE__ */ C({
|
|
|
51
51
|
variant: e.variant,
|
|
52
52
|
clearable: e.clearable,
|
|
53
53
|
"hide-details": e.hideDetails,
|
|
54
|
-
"error-messages":
|
|
54
|
+
"error-messages": V(r),
|
|
55
55
|
"append-inner-icon": e.appendInnerIcon,
|
|
56
|
-
"onClick:appendInner":
|
|
56
|
+
"onClick:appendInner": o[1] || (o[1] = (v) => p.$emit("clickAppendInner"))
|
|
57
57
|
}), H({ _: 2 }, [
|
|
58
|
-
|
|
58
|
+
N(p.$slots, (v, g) => ({
|
|
59
59
|
name: g,
|
|
60
|
-
fn:
|
|
61
|
-
A(p.$slots, g, G(K(
|
|
60
|
+
fn: m((i) => [
|
|
61
|
+
A(p.$slots, g, G(K(i ?? {})))
|
|
62
62
|
])
|
|
63
63
|
}))
|
|
64
64
|
]), 1040, ["modelValue", "name", "color", "density", "rounded", "variant", "clearable", "hide-details", "error-messages", "append-inner-icon"])), [
|
|
65
|
-
[
|
|
65
|
+
[V(he), e.mask]
|
|
66
66
|
]);
|
|
67
67
|
}
|
|
68
68
|
}), ke = {
|
|
@@ -71,7 +71,7 @@ const J = /* @__PURE__ */ C({
|
|
|
71
71
|
}, Fe = {
|
|
72
72
|
key: 1,
|
|
73
73
|
class: "font-weight-bold d-flex justify-center align-center fill-height"
|
|
74
|
-
}, xe = { key: 2 }, De = { key: 5 }, $e = { class: "f-data-table__actions" }, we = { class: "text-h6" },
|
|
74
|
+
}, xe = { key: 2 }, De = { key: 5 }, $e = { class: "f-data-table__actions" }, we = { class: "text-h6" }, Ce = /* @__PURE__ */ C({
|
|
75
75
|
name: "FDataTable",
|
|
76
76
|
inheritAttrs: !1,
|
|
77
77
|
__name: "FDataTable",
|
|
@@ -113,55 +113,55 @@ const J = /* @__PURE__ */ C({
|
|
|
113
113
|
}),
|
|
114
114
|
emits: /* @__PURE__ */ Y(["show-record", "delete-record"], ["update:page", "update:itemsPerPage", "update:sortBy"]),
|
|
115
115
|
setup(t, { emit: e }) {
|
|
116
|
-
const n = t,
|
|
117
|
-
function
|
|
118
|
-
return
|
|
116
|
+
const n = t, r = e, l = L(t, "page"), p = L(t, "itemsPerPage"), o = L(t, "sortBy"), v = P(!1), g = P(null);
|
|
117
|
+
function i(u, c) {
|
|
118
|
+
return c.split(".").reduce((M, U) => M == null ? void 0 : M[U], u);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
return
|
|
120
|
+
function d(u) {
|
|
121
|
+
return u == null ? "" : new Intl.NumberFormat(n.moneyLocale, {
|
|
122
122
|
style: "currency",
|
|
123
123
|
currency: n.moneyCurrency
|
|
124
|
-
}).format(
|
|
124
|
+
}).format(u);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
if (!
|
|
128
|
-
const
|
|
129
|
-
return
|
|
126
|
+
function a(u) {
|
|
127
|
+
if (!u) return "";
|
|
128
|
+
const c = u.replace(/\D/g, "");
|
|
129
|
+
return c.length < 10 ? u : `(${c.substring(0, 3)}) ${c.substring(3, 6)} ${c.substring(6, 10)}`;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
return
|
|
133
|
-
const
|
|
134
|
-
return typeof
|
|
131
|
+
function F(u, c) {
|
|
132
|
+
return c.split(",").map((M) => {
|
|
133
|
+
const U = i(u, M.trim());
|
|
134
|
+
return typeof U == "string" ? U.charAt(0).toUpperCase() : "";
|
|
135
135
|
}).join("");
|
|
136
136
|
}
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
return Math.min(
|
|
140
|
-
}),
|
|
141
|
-
"click:row": (
|
|
142
|
-
|
|
137
|
+
const _ = S(() => {
|
|
138
|
+
const M = n.items.length === 0 ? 108 : n.items.length * 52 + 56;
|
|
139
|
+
return Math.min(M, n.maxHeight);
|
|
140
|
+
}), $ = S(() => !n.canEditRecord && !n.canReadRecord ? {} : {
|
|
141
|
+
"click:row": (u, { item: c }) => {
|
|
142
|
+
r("show-record", c);
|
|
143
143
|
}
|
|
144
|
-
}),
|
|
145
|
-
() => n.headers.filter((
|
|
146
|
-
),
|
|
147
|
-
function
|
|
148
|
-
n.showDeleteConfirm ? (g.value =
|
|
144
|
+
}), h = S(
|
|
145
|
+
() => n.headers.filter((u) => u.type && u.key !== "actions")
|
|
146
|
+
), z = S(() => n.headers.some((u) => u.key === "actions"));
|
|
147
|
+
function I(u) {
|
|
148
|
+
n.showDeleteConfirm ? (g.value = u, v.value = !0) : r("delete-record", u);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
150
|
+
function x() {
|
|
151
|
+
r("delete-record", g.value), n.deleteLoading === void 0 && (v.value = !1, g.value = null);
|
|
152
152
|
}
|
|
153
|
-
return le(() => n.deleteLoading, (
|
|
154
|
-
|
|
155
|
-
}), (
|
|
156
|
-
const
|
|
157
|
-
return s(),
|
|
158
|
-
(s(),
|
|
159
|
-
page:
|
|
160
|
-
"onUpdate:page":
|
|
153
|
+
return le(() => n.deleteLoading, (u, c) => {
|
|
154
|
+
c && !u && v.value && (v.value = !1, g.value = null);
|
|
155
|
+
}), (u, c) => {
|
|
156
|
+
const M = y("v-icon"), U = y("v-img"), Z = y("v-avatar"), ne = y("v-chip"), ee = y("v-btn"), oe = y("v-card-text"), re = y("v-spacer"), te = y("f-button"), de = y("v-card-actions"), ie = y("f-dialog");
|
|
157
|
+
return s(), B("div", null, [
|
|
158
|
+
(s(), b(ce(t.serverSide ? "v-data-table-server" : "v-data-table"), w(u.$attrs, {
|
|
159
|
+
page: l.value,
|
|
160
|
+
"onUpdate:page": c[0] || (c[0] = (f) => l.value = f),
|
|
161
161
|
"items-per-page": p.value,
|
|
162
|
-
"onUpdate:itemsPerPage":
|
|
163
|
-
"sort-by":
|
|
164
|
-
"onUpdate:sortBy":
|
|
162
|
+
"onUpdate:itemsPerPage": c[1] || (c[1] = (f) => p.value = f),
|
|
163
|
+
"sort-by": o.value,
|
|
164
|
+
"onUpdate:sortBy": c[2] || (c[2] = (f) => o.value = f),
|
|
165
165
|
class: "rounded-b-lg",
|
|
166
166
|
headers: t.headers,
|
|
167
167
|
items: t.items,
|
|
@@ -169,55 +169,55 @@ const J = /* @__PURE__ */ C({
|
|
|
169
169
|
loading: t.loading,
|
|
170
170
|
hover: t.hover,
|
|
171
171
|
density: t.density,
|
|
172
|
-
height:
|
|
172
|
+
height: _.value,
|
|
173
173
|
"show-select": t.showSelect,
|
|
174
174
|
"fixed-header": t.fixedHeader,
|
|
175
175
|
"items-per-page-text": t.labelItemsPerPage,
|
|
176
176
|
"no-data-text": t.labelNoData
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
name: `item.${
|
|
180
|
-
fn:
|
|
181
|
-
A(
|
|
177
|
+
}, me($.value)), H({ _: 2 }, [
|
|
178
|
+
N(h.value, (f) => ({
|
|
179
|
+
name: `item.${f.key}`,
|
|
180
|
+
fn: m(({ item: D }) => [
|
|
181
|
+
A(u.$slots, `item.${f.key}`, {
|
|
182
182
|
item: D,
|
|
183
|
-
value:
|
|
183
|
+
value: i(D, f.key)
|
|
184
184
|
}, () => [
|
|
185
|
-
|
|
185
|
+
f.type === "image" ? (s(), b(Z, {
|
|
186
186
|
key: 0,
|
|
187
187
|
rounded: "lg",
|
|
188
188
|
variant: "elevated",
|
|
189
189
|
border: ""
|
|
190
190
|
}, {
|
|
191
|
-
default:
|
|
192
|
-
|
|
191
|
+
default: m(() => [
|
|
192
|
+
i(D, f.key) ? (s(), b(U, {
|
|
193
193
|
key: 0,
|
|
194
|
-
src:
|
|
194
|
+
src: i(D, f.key),
|
|
195
195
|
class: "f-data-table__logo"
|
|
196
196
|
}, {
|
|
197
|
-
error:
|
|
198
|
-
|
|
197
|
+
error: m(() => [
|
|
198
|
+
f.imageInitialsKey ? (s(), B("span", ke, T(F(D, f.imageInitialsKey)), 1)) : (s(), b(M, {
|
|
199
199
|
key: 1,
|
|
200
200
|
color: "white"
|
|
201
201
|
}, {
|
|
202
|
-
default:
|
|
203
|
-
|
|
202
|
+
default: m(() => [...c[5] || (c[5] = [
|
|
203
|
+
E("mdi-account", -1)
|
|
204
204
|
])]),
|
|
205
205
|
_: 1
|
|
206
206
|
}))
|
|
207
207
|
]),
|
|
208
208
|
_: 2
|
|
209
|
-
}, 1032, ["src"])) :
|
|
209
|
+
}, 1032, ["src"])) : f.imageInitialsKey ? (s(), B("span", Fe, T(F(D, f.imageInitialsKey)), 1)) : (s(), b(M, {
|
|
210
210
|
key: 2,
|
|
211
211
|
color: "white"
|
|
212
212
|
}, {
|
|
213
|
-
default:
|
|
214
|
-
|
|
213
|
+
default: m(() => [...c[6] || (c[6] = [
|
|
214
|
+
E("mdi-account", -1)
|
|
215
215
|
])]),
|
|
216
216
|
_: 1
|
|
217
217
|
}))
|
|
218
218
|
]),
|
|
219
219
|
_: 2
|
|
220
|
-
}, 1024)) :
|
|
220
|
+
}, 1024)) : f.type === "logo" ? (s(), b(Z, {
|
|
221
221
|
key: 1,
|
|
222
222
|
rounded: "lg",
|
|
223
223
|
variant: "elevated",
|
|
@@ -225,103 +225,103 @@ const J = /* @__PURE__ */ C({
|
|
|
225
225
|
class: "f-data-table__logo-avatar",
|
|
226
226
|
color: "white"
|
|
227
227
|
}, {
|
|
228
|
-
default:
|
|
229
|
-
|
|
228
|
+
default: m(() => [
|
|
229
|
+
i(D, f.key) ? (s(), b(U, {
|
|
230
230
|
key: 0,
|
|
231
|
-
src:
|
|
231
|
+
src: i(D, f.key),
|
|
232
232
|
class: "f-data-table__logo"
|
|
233
233
|
}, {
|
|
234
|
-
error:
|
|
235
|
-
|
|
234
|
+
error: m(() => [...c[7] || (c[7] = [
|
|
235
|
+
O("div", { class: "f-data-table__logo-avatar fill-height" }, null, -1)
|
|
236
236
|
])]),
|
|
237
237
|
_: 1
|
|
238
|
-
}, 8, ["src"])) :
|
|
238
|
+
}, 8, ["src"])) : X("", !0)
|
|
239
239
|
]),
|
|
240
240
|
_: 2
|
|
241
|
-
}, 1024)) :
|
|
241
|
+
}, 1024)) : f.type === "money" ? (s(), B("span", xe, T(d(i(D, f.key))), 1)) : f.type === "status" ? (s(), b(ne, {
|
|
242
242
|
key: 3,
|
|
243
|
-
color:
|
|
243
|
+
color: i(D, f.key) ? "green-darken-1" : "red-darken-2",
|
|
244
244
|
size: "small"
|
|
245
245
|
}, {
|
|
246
|
-
default:
|
|
247
|
-
|
|
246
|
+
default: m(() => [
|
|
247
|
+
E(T(i(D, f.key) ? t.labelActive : t.labelPassive), 1)
|
|
248
248
|
]),
|
|
249
249
|
_: 2
|
|
250
|
-
}, 1032, ["color"])) :
|
|
250
|
+
}, 1032, ["color"])) : f.type === "boolean" ? (s(), b(M, {
|
|
251
251
|
key: 4,
|
|
252
|
-
color:
|
|
252
|
+
color: i(D, f.key) ? "green-darken-1" : "red-darken-2"
|
|
253
253
|
}, {
|
|
254
|
-
default:
|
|
255
|
-
|
|
254
|
+
default: m(() => [
|
|
255
|
+
E(T(i(D, f.key) ? "mdi-check" : "mdi-close"), 1)
|
|
256
256
|
]),
|
|
257
257
|
_: 2
|
|
258
|
-
}, 1032, ["color"])) :
|
|
258
|
+
}, 1032, ["color"])) : f.type === "gsmNo" ? (s(), B("span", De, T(a(i(D, f.key))), 1)) : X("", !0)
|
|
259
259
|
], !0)
|
|
260
260
|
])
|
|
261
261
|
})),
|
|
262
|
-
|
|
262
|
+
z.value ? {
|
|
263
263
|
name: "item.actions",
|
|
264
|
-
fn:
|
|
265
|
-
A(
|
|
266
|
-
|
|
267
|
-
t.canEditRecord || t.canReadRecord ? (s(),
|
|
264
|
+
fn: m(({ item: f }) => [
|
|
265
|
+
A(u.$slots, "item.actions", { item: f }, () => [
|
|
266
|
+
O("div", $e, [
|
|
267
|
+
t.canEditRecord || t.canReadRecord ? (s(), b(ee, {
|
|
268
268
|
key: 0,
|
|
269
269
|
size: "small",
|
|
270
270
|
variant: "text",
|
|
271
271
|
icon: t.canEditRecord ? "mdi-pencil-outline" : "mdi-eye-outline",
|
|
272
272
|
color: t.canEditRecord ? "primary" : "secondary",
|
|
273
|
-
onClick: q((D) =>
|
|
274
|
-
}, null, 8, ["icon", "color", "onClick"])) :
|
|
275
|
-
t.canDeleteRecord ? (s(),
|
|
273
|
+
onClick: q((D) => r("show-record", f), ["stop"])
|
|
274
|
+
}, null, 8, ["icon", "color", "onClick"])) : X("", !0),
|
|
275
|
+
t.canDeleteRecord ? (s(), b(ee, {
|
|
276
276
|
key: 1,
|
|
277
277
|
icon: "mdi-trash-can-outline",
|
|
278
278
|
variant: "text",
|
|
279
279
|
size: "small",
|
|
280
280
|
color: "red-darken-2",
|
|
281
|
-
onClick: q((D) =>
|
|
282
|
-
}, null, 8, ["onClick"])) :
|
|
281
|
+
onClick: q((D) => I(f), ["stop"])
|
|
282
|
+
}, null, 8, ["onClick"])) : X("", !0)
|
|
283
283
|
])
|
|
284
284
|
], !0)
|
|
285
285
|
]),
|
|
286
286
|
key: "0"
|
|
287
287
|
} : void 0,
|
|
288
|
-
|
|
288
|
+
N(u.$slots, (f, D) => ({
|
|
289
289
|
name: D,
|
|
290
|
-
fn:
|
|
291
|
-
A(
|
|
290
|
+
fn: m((se) => [
|
|
291
|
+
A(u.$slots, D, G(K(se ?? {})), void 0, !0)
|
|
292
292
|
])
|
|
293
293
|
}))
|
|
294
294
|
]), 1040, ["page", "items-per-page", "sort-by", "headers", "items", "items-length", "loading", "hover", "density", "height", "show-select", "fixed-header", "items-per-page-text", "no-data-text"])),
|
|
295
|
-
|
|
296
|
-
modelValue:
|
|
297
|
-
"onUpdate:modelValue":
|
|
295
|
+
k(ie, {
|
|
296
|
+
modelValue: v.value,
|
|
297
|
+
"onUpdate:modelValue": c[4] || (c[4] = (f) => v.value = f),
|
|
298
298
|
"max-width": "400",
|
|
299
299
|
"hide-close": !0
|
|
300
300
|
}, {
|
|
301
|
-
header:
|
|
302
|
-
|
|
301
|
+
header: m(() => [
|
|
302
|
+
O("div", we, T(t.labelDeleteTitle), 1)
|
|
303
303
|
]),
|
|
304
|
-
default:
|
|
305
|
-
|
|
306
|
-
default:
|
|
307
|
-
|
|
304
|
+
default: m(() => [
|
|
305
|
+
k(oe, null, {
|
|
306
|
+
default: m(() => [
|
|
307
|
+
E(T(t.deleteMessageFormatter && g.value ? t.deleteMessageFormatter(g.value) : t.labelDeleteMessage), 1)
|
|
308
308
|
]),
|
|
309
309
|
_: 1
|
|
310
310
|
}),
|
|
311
|
-
|
|
312
|
-
default:
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
k(de, null, {
|
|
312
|
+
default: m(() => [
|
|
313
|
+
k(re),
|
|
314
|
+
k(te, {
|
|
315
315
|
variant: "plain",
|
|
316
316
|
color: "red-darken-2",
|
|
317
317
|
text: t.labelDeleteCancel,
|
|
318
|
-
onClick:
|
|
318
|
+
onClick: c[3] || (c[3] = (f) => v.value = !1)
|
|
319
319
|
}, null, 8, ["text"]),
|
|
320
|
-
|
|
320
|
+
k(te, {
|
|
321
321
|
variant: "tonal",
|
|
322
322
|
text: t.labelDeleteConfirm,
|
|
323
323
|
loading: t.deleteLoading ?? !1,
|
|
324
|
-
onClick:
|
|
324
|
+
onClick: x
|
|
325
325
|
}, null, 8, ["text", "loading"])
|
|
326
326
|
]),
|
|
327
327
|
_: 1
|
|
@@ -334,10 +334,10 @@ const J = /* @__PURE__ */ C({
|
|
|
334
334
|
}
|
|
335
335
|
}), Q = (t, e) => {
|
|
336
336
|
const n = t.__vccOpts || t;
|
|
337
|
-
for (const [
|
|
338
|
-
n[
|
|
337
|
+
for (const [r, l] of e)
|
|
338
|
+
n[r] = l;
|
|
339
339
|
return n;
|
|
340
|
-
},
|
|
340
|
+
}, Se = /* @__PURE__ */ Q(Ce, [["__scopeId", "data-v-6a520706"]]);
|
|
341
341
|
var Be = /* @__PURE__ */ ((t) => (t.IMAGE = "image", t.MONEY = "money", t.STATUS = "status", t.BOOLEAN = "boolean", t.GSM_NO = "gsmNo", t.LOGO = "logo", t))(Be || {});
|
|
342
342
|
const Me = /* @__PURE__ */ C({
|
|
343
343
|
name: "FTextarea",
|
|
@@ -357,13 +357,13 @@ const Me = /* @__PURE__ */ C({
|
|
|
357
357
|
rules: { type: [String, Function], default: "" }
|
|
358
358
|
},
|
|
359
359
|
setup(t) {
|
|
360
|
-
const e = t, n =
|
|
360
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
361
361
|
initialValue: e.modelValue,
|
|
362
362
|
syncVModel: !0
|
|
363
363
|
});
|
|
364
|
-
return (p,
|
|
365
|
-
modelValue:
|
|
366
|
-
"onUpdate:modelValue":
|
|
364
|
+
return (p, o) => (s(), b(V(pe), w(p.$attrs, {
|
|
365
|
+
modelValue: V(l),
|
|
366
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => j(l) ? l.value = v : null),
|
|
367
367
|
name: e.name,
|
|
368
368
|
rounded: e.rounded,
|
|
369
369
|
variant: e.variant,
|
|
@@ -373,7 +373,7 @@ const Me = /* @__PURE__ */ C({
|
|
|
373
373
|
label: e.label,
|
|
374
374
|
"hide-details": e.hideDetails,
|
|
375
375
|
"no-resize": e.noResize,
|
|
376
|
-
"error-messages":
|
|
376
|
+
"error-messages": V(r)
|
|
377
377
|
}), null, 16, ["modelValue", "name", "rounded", "variant", "rows", "density", "color", "label", "hide-details", "no-resize", "error-messages"]));
|
|
378
378
|
}
|
|
379
379
|
}), Te = /* @__PURE__ */ C({
|
|
@@ -396,36 +396,36 @@ const Me = /* @__PURE__ */ C({
|
|
|
396
396
|
},
|
|
397
397
|
emits: ["change"],
|
|
398
398
|
setup(t, { emit: e }) {
|
|
399
|
-
const n = e,
|
|
400
|
-
initialValue:
|
|
399
|
+
const n = e, r = t, l = S(() => r.rules), { errorMessage: p, value: o } = R(() => r.name, l, {
|
|
400
|
+
initialValue: r.modelValue,
|
|
401
401
|
syncVModel: !0
|
|
402
402
|
});
|
|
403
|
-
function
|
|
403
|
+
function v(g) {
|
|
404
404
|
n("change", g);
|
|
405
405
|
}
|
|
406
|
-
return (g,
|
|
407
|
-
modelValue:
|
|
406
|
+
return (g, i) => (s(), b(V(ve), w(g.$attrs, {
|
|
407
|
+
modelValue: V(o),
|
|
408
408
|
"onUpdate:modelValue": [
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
i[0] || (i[0] = (d) => j(o) ? o.value = d : null),
|
|
410
|
+
i[1] || (i[1] = (d) => v(V(o)))
|
|
411
411
|
],
|
|
412
|
-
name:
|
|
413
|
-
items:
|
|
414
|
-
rounded:
|
|
415
|
-
variant:
|
|
416
|
-
density:
|
|
417
|
-
color:
|
|
418
|
-
clearable:
|
|
419
|
-
"hide-details":
|
|
420
|
-
"return-object":
|
|
421
|
-
"no-data-text":
|
|
422
|
-
"error-messages":
|
|
412
|
+
name: r.name,
|
|
413
|
+
items: r.items,
|
|
414
|
+
rounded: r.rounded,
|
|
415
|
+
variant: r.variant,
|
|
416
|
+
density: r.density,
|
|
417
|
+
color: r.color,
|
|
418
|
+
clearable: r.clearable,
|
|
419
|
+
"hide-details": r.hideDetails,
|
|
420
|
+
"return-object": r.returnObject,
|
|
421
|
+
"no-data-text": r.noDataText,
|
|
422
|
+
"error-messages": V(p),
|
|
423
423
|
"menu-props": { maxWidth: 0 }
|
|
424
424
|
}), H({ _: 2 }, [
|
|
425
|
-
|
|
426
|
-
name:
|
|
427
|
-
fn:
|
|
428
|
-
A(g.$slots,
|
|
425
|
+
N(g.$slots, (d, a) => ({
|
|
426
|
+
name: a,
|
|
427
|
+
fn: m((F) => [
|
|
428
|
+
A(g.$slots, a, G(K(F ?? {})))
|
|
429
429
|
])
|
|
430
430
|
}))
|
|
431
431
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "clearable", "hide-details", "return-object", "no-data-text", "error-messages"]));
|
|
@@ -442,7 +442,7 @@ const Me = /* @__PURE__ */ C({
|
|
|
442
442
|
},
|
|
443
443
|
setup(t) {
|
|
444
444
|
const e = t;
|
|
445
|
-
return (n,
|
|
445
|
+
return (n, r) => (s(), b(V(ye), w(n.$attrs, {
|
|
446
446
|
color: e.color,
|
|
447
447
|
"hide-details": e.hideDetails,
|
|
448
448
|
indeterminate: e.indeterminate,
|
|
@@ -469,52 +469,41 @@ const Me = /* @__PURE__ */ C({
|
|
|
469
469
|
rules: { type: [String, Function], default: "" }
|
|
470
470
|
},
|
|
471
471
|
setup(t) {
|
|
472
|
-
const e = t, n =
|
|
472
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
473
473
|
initialValue: e.modelValue,
|
|
474
474
|
syncVModel: !0
|
|
475
|
-
}), p =
|
|
475
|
+
}), p = S(
|
|
476
476
|
() => new Intl.NumberFormat(e.locale, {
|
|
477
477
|
style: "currency",
|
|
478
478
|
currency: e.currency,
|
|
479
479
|
minimumFractionDigits: e.precision,
|
|
480
480
|
maximumFractionDigits: e.precision
|
|
481
481
|
})
|
|
482
|
-
);
|
|
483
|
-
function
|
|
484
|
-
return
|
|
485
|
-
}
|
|
486
|
-
function d(u) {
|
|
487
|
-
const x = u.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."), $ = parseFloat(x);
|
|
488
|
-
return isNaN($) ? null : Math.round($ * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
|
|
489
|
-
}
|
|
490
|
-
function r() {
|
|
491
|
-
var u, x;
|
|
492
|
-
return ((x = (u = p.value) == null ? void 0 : u.$el) == null ? void 0 : x.querySelector("input")) ?? null;
|
|
482
|
+
), o = P(v(e.modelValue));
|
|
483
|
+
function v(_) {
|
|
484
|
+
return _ == null || isNaN(_) ? "" : p.value.format(_);
|
|
493
485
|
}
|
|
494
|
-
function
|
|
495
|
-
const
|
|
496
|
-
|
|
486
|
+
function g(_) {
|
|
487
|
+
const $ = _.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."), h = parseFloat($);
|
|
488
|
+
return isNaN(h) ? null : Math.round(h * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
|
|
497
489
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
490
|
+
const i = P(!1);
|
|
491
|
+
function d(_) {
|
|
492
|
+
const $ = _.target;
|
|
493
|
+
o.value = $.value, l.value = g($.value);
|
|
501
494
|
}
|
|
502
|
-
function
|
|
503
|
-
i.value = !1, l
|
|
495
|
+
function a() {
|
|
496
|
+
i.value = !1, o.value = v(l.value);
|
|
504
497
|
}
|
|
505
|
-
function
|
|
498
|
+
function F(_) {
|
|
506
499
|
i.value = !0;
|
|
507
|
-
const
|
|
508
|
-
|
|
500
|
+
const $ = _.target, h = l.value;
|
|
501
|
+
h != null ? o.value = h.toFixed(e.precision).replace(".", ",") : o.value = "", setTimeout(() => $.select(), 0);
|
|
509
502
|
}
|
|
510
|
-
return le(() => e.modelValue, (
|
|
511
|
-
|
|
512
|
-
}),
|
|
513
|
-
|
|
514
|
-
}), (u, x) => (s(), _(h(ne), S({
|
|
515
|
-
ref_key: "fieldRef",
|
|
516
|
-
ref: p
|
|
517
|
-
}, u.$attrs, {
|
|
503
|
+
return le(() => e.modelValue, (_) => {
|
|
504
|
+
l.value = _, i.value || (o.value = v(_));
|
|
505
|
+
}), (_, $) => (s(), b(V(ae), w(_.$attrs, {
|
|
506
|
+
"model-value": o.value,
|
|
518
507
|
name: e.name,
|
|
519
508
|
label: e.label,
|
|
520
509
|
readonly: e.readonly,
|
|
@@ -523,12 +512,12 @@ const Me = /* @__PURE__ */ C({
|
|
|
523
512
|
variant: e.variant,
|
|
524
513
|
density: e.density,
|
|
525
514
|
color: e.color,
|
|
526
|
-
"error-messages":
|
|
515
|
+
"error-messages": V(r),
|
|
527
516
|
inputmode: "decimal",
|
|
528
|
-
onInput:
|
|
529
|
-
onBlur:
|
|
530
|
-
onFocus:
|
|
531
|
-
}), null, 16, ["name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]));
|
|
517
|
+
onInput: d,
|
|
518
|
+
onBlur: a,
|
|
519
|
+
onFocus: F
|
|
520
|
+
}), null, 16, ["model-value", "name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]));
|
|
532
521
|
}
|
|
533
522
|
}), Ne = /* @__PURE__ */ C({
|
|
534
523
|
name: "FSelect",
|
|
@@ -547,13 +536,13 @@ const Me = /* @__PURE__ */ C({
|
|
|
547
536
|
rules: { type: [String, Function], default: "" }
|
|
548
537
|
},
|
|
549
538
|
setup(t) {
|
|
550
|
-
const e = t, n =
|
|
539
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
551
540
|
initialValue: e.modelValue,
|
|
552
541
|
syncVModel: !0
|
|
553
542
|
});
|
|
554
|
-
return (p,
|
|
555
|
-
modelValue:
|
|
556
|
-
"onUpdate:modelValue":
|
|
543
|
+
return (p, o) => (s(), b(V(ge), w(p.$attrs, {
|
|
544
|
+
modelValue: V(l),
|
|
545
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => j(l) ? l.value = v : null),
|
|
557
546
|
name: e.name,
|
|
558
547
|
items: e.items,
|
|
559
548
|
rounded: e.rounded,
|
|
@@ -562,17 +551,17 @@ const Me = /* @__PURE__ */ C({
|
|
|
562
551
|
color: e.color,
|
|
563
552
|
"hide-details": e.hideDetails,
|
|
564
553
|
"return-object": e.returnObject,
|
|
565
|
-
"error-messages":
|
|
554
|
+
"error-messages": V(r)
|
|
566
555
|
}), H({ _: 2 }, [
|
|
567
|
-
|
|
556
|
+
N(p.$slots, (v, g) => ({
|
|
568
557
|
name: g,
|
|
569
|
-
fn:
|
|
570
|
-
A(p.$slots, g, G(K(
|
|
558
|
+
fn: m((i) => [
|
|
559
|
+
A(p.$slots, g, G(K(i ?? {})))
|
|
571
560
|
])
|
|
572
561
|
}))
|
|
573
562
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "hide-details", "return-object", "error-messages"]));
|
|
574
563
|
}
|
|
575
|
-
}),
|
|
564
|
+
}), Ae = /* @__PURE__ */ C({
|
|
576
565
|
name: "FNumberField",
|
|
577
566
|
inheritAttrs: !1,
|
|
578
567
|
__name: "FNumberField",
|
|
@@ -596,13 +585,13 @@ const Me = /* @__PURE__ */ C({
|
|
|
596
585
|
rules: { type: [String, Function], default: "" }
|
|
597
586
|
},
|
|
598
587
|
setup(t) {
|
|
599
|
-
const e = t, n =
|
|
588
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
600
589
|
initialValue: e.modelValue,
|
|
601
590
|
syncVModel: !0
|
|
602
591
|
});
|
|
603
|
-
return (p,
|
|
604
|
-
modelValue:
|
|
605
|
-
"onUpdate:modelValue":
|
|
592
|
+
return (p, o) => (s(), b(V(be), w(p.$attrs, {
|
|
593
|
+
modelValue: V(l),
|
|
594
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => j(l) ? l.value = v : null),
|
|
606
595
|
name: e.name,
|
|
607
596
|
color: e.color,
|
|
608
597
|
density: e.density,
|
|
@@ -618,10 +607,10 @@ const Me = /* @__PURE__ */ C({
|
|
|
618
607
|
min: e.min,
|
|
619
608
|
precision: e.precision,
|
|
620
609
|
inset: e.inset,
|
|
621
|
-
"error-messages":
|
|
610
|
+
"error-messages": V(r)
|
|
622
611
|
}), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "control-variant", "hide-details", "placeholder", "label", "prefix", "disabled", "readonly", "min", "precision", "inset", "error-messages"]));
|
|
623
612
|
}
|
|
624
|
-
}),
|
|
613
|
+
}), Re = { key: 0 }, Ue = { key: 1 }, Oe = /* @__PURE__ */ C({
|
|
625
614
|
name: "FSwitch",
|
|
626
615
|
inheritAttrs: !1,
|
|
627
616
|
__name: "FSwitch",
|
|
@@ -638,17 +627,17 @@ const Me = /* @__PURE__ */ C({
|
|
|
638
627
|
emits: ["update:modelValue"],
|
|
639
628
|
setup(t) {
|
|
640
629
|
const e = t, n = L(t, "modelValue");
|
|
641
|
-
return (
|
|
630
|
+
return (r, l) => (s(), b(V(_e), w(r.$attrs, {
|
|
642
631
|
modelValue: n.value,
|
|
643
|
-
"onUpdate:modelValue":
|
|
632
|
+
"onUpdate:modelValue": l[0] || (l[0] = (p) => n.value = p),
|
|
644
633
|
color: e.color,
|
|
645
634
|
"hide-details": e.hideDetails,
|
|
646
635
|
density: e.density
|
|
647
636
|
}), H({ _: 2 }, [
|
|
648
637
|
e.labelTrue || e.labelFalse ? {
|
|
649
638
|
name: "label",
|
|
650
|
-
fn:
|
|
651
|
-
n.value ? (s(),
|
|
639
|
+
fn: m(() => [
|
|
640
|
+
n.value ? (s(), B("span", Re, T(e.labelTrue), 1)) : (s(), B("span", Ue, T(e.labelFalse), 1))
|
|
652
641
|
]),
|
|
653
642
|
key: "0"
|
|
654
643
|
} : void 0
|
|
@@ -670,42 +659,42 @@ const Me = /* @__PURE__ */ C({
|
|
|
670
659
|
emits: /* @__PURE__ */ Y(["closeDialog"], ["update:modelValue"]),
|
|
671
660
|
setup(t) {
|
|
672
661
|
const e = t, n = L(t, "modelValue");
|
|
673
|
-
return (
|
|
674
|
-
const p =
|
|
675
|
-
return s(),
|
|
662
|
+
return (r, l) => {
|
|
663
|
+
const p = y("v-btn"), o = y("v-card-title"), v = y("v-divider"), g = y("v-card-text"), i = y("v-card"), d = y("v-dialog");
|
|
664
|
+
return s(), b(d, w(r.$attrs, {
|
|
676
665
|
modelValue: n.value,
|
|
677
|
-
"onUpdate:modelValue":
|
|
666
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => n.value = a),
|
|
678
667
|
transition: e.transition,
|
|
679
668
|
class: "f-dialog",
|
|
680
669
|
width: e.width,
|
|
681
670
|
persistent: e.persistent
|
|
682
671
|
}), {
|
|
683
|
-
default:
|
|
684
|
-
|
|
672
|
+
default: m(() => [
|
|
673
|
+
k(i, {
|
|
685
674
|
class: "f-dialog-card",
|
|
686
675
|
density: "default",
|
|
687
676
|
variant: "elevated",
|
|
688
677
|
rounded: "lg"
|
|
689
678
|
}, {
|
|
690
|
-
default:
|
|
691
|
-
|
|
692
|
-
default:
|
|
693
|
-
|
|
694
|
-
A(
|
|
679
|
+
default: m(() => [
|
|
680
|
+
k(o, { class: "d-flex justify-space-between align-center" }, {
|
|
681
|
+
default: m(() => [
|
|
682
|
+
O("header", null, [
|
|
683
|
+
A(r.$slots, "header")
|
|
695
684
|
]),
|
|
696
|
-
e.hideClose ?
|
|
685
|
+
e.hideClose ? X("", !0) : (s(), b(p, {
|
|
697
686
|
key: 0,
|
|
698
687
|
icon: "mdi-close",
|
|
699
688
|
variant: "text",
|
|
700
|
-
onClick:
|
|
689
|
+
onClick: l[0] || (l[0] = (a) => r.$emit("closeDialog"))
|
|
701
690
|
}))
|
|
702
691
|
]),
|
|
703
692
|
_: 3
|
|
704
693
|
}),
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
default:
|
|
708
|
-
A(
|
|
694
|
+
k(v),
|
|
695
|
+
k(g, { class: "py-4 px-1 overflow-auto overflow-x-hidden" }, {
|
|
696
|
+
default: m(() => [
|
|
697
|
+
A(r.$slots, "default")
|
|
709
698
|
]),
|
|
710
699
|
_: 3
|
|
711
700
|
})
|
|
@@ -739,21 +728,21 @@ const Me = /* @__PURE__ */ C({
|
|
|
739
728
|
labelConfirm: { default: "Confirm" }
|
|
740
729
|
},
|
|
741
730
|
setup(t) {
|
|
742
|
-
const e = t, n =
|
|
731
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
743
732
|
initialValue: e.modelValue || "",
|
|
744
733
|
syncVModel: !0
|
|
745
|
-
}), p =
|
|
746
|
-
function
|
|
747
|
-
|
|
734
|
+
}), p = P(!1), o = P(l);
|
|
735
|
+
function v() {
|
|
736
|
+
l.value = o.value, p.value = !1;
|
|
748
737
|
}
|
|
749
|
-
function g(
|
|
750
|
-
|
|
738
|
+
function g(i) {
|
|
739
|
+
o.value && o.value.includes(":") && (o.value = i.toString().padStart(2, "0") + o.value.substring(o.value.indexOf(":")));
|
|
751
740
|
}
|
|
752
|
-
return (
|
|
753
|
-
const
|
|
754
|
-
return s(),
|
|
755
|
-
modelValue:
|
|
756
|
-
"onUpdate:modelValue":
|
|
741
|
+
return (i, d) => {
|
|
742
|
+
const a = y("v-spacer"), F = y("v-time-picker"), _ = y("v-menu"), $ = y("v-text-field");
|
|
743
|
+
return s(), b($, w(i.$attrs, {
|
|
744
|
+
modelValue: V(l),
|
|
745
|
+
"onUpdate:modelValue": d[4] || (d[4] = (h) => j(l) ? l.value = h : null),
|
|
757
746
|
"prepend-inner-icon": "mdi-clock-time-four-outline",
|
|
758
747
|
name: e.name,
|
|
759
748
|
active: p.value,
|
|
@@ -763,46 +752,46 @@ const Me = /* @__PURE__ */ C({
|
|
|
763
752
|
variant: e.variant,
|
|
764
753
|
"hide-details": e.hideDetails,
|
|
765
754
|
readonly: e.readonly,
|
|
766
|
-
"error-messages":
|
|
755
|
+
"error-messages": V(r)
|
|
767
756
|
}), {
|
|
768
|
-
default:
|
|
769
|
-
|
|
757
|
+
default: m(() => [
|
|
758
|
+
k(_, {
|
|
770
759
|
modelValue: p.value,
|
|
771
|
-
"onUpdate:modelValue":
|
|
760
|
+
"onUpdate:modelValue": d[3] || (d[3] = (h) => p.value = h),
|
|
772
761
|
activator: "parent",
|
|
773
762
|
location: "center",
|
|
774
763
|
disabled: e.readonly,
|
|
775
764
|
"close-on-content-click": !1
|
|
776
765
|
}, {
|
|
777
|
-
default:
|
|
778
|
-
p.value ? (s(),
|
|
766
|
+
default: m(() => [
|
|
767
|
+
p.value ? (s(), b(F, {
|
|
779
768
|
key: 0,
|
|
780
|
-
modelValue:
|
|
781
|
-
"onUpdate:modelValue":
|
|
769
|
+
modelValue: o.value,
|
|
770
|
+
"onUpdate:modelValue": d[1] || (d[1] = (h) => o.value = h),
|
|
782
771
|
"full-width": "",
|
|
783
772
|
color: "secondary",
|
|
784
773
|
format: "24hr",
|
|
785
774
|
title: e.title,
|
|
786
|
-
"onUpdate:hour":
|
|
775
|
+
"onUpdate:hour": d[2] || (d[2] = (h) => g(h))
|
|
787
776
|
}, {
|
|
788
|
-
actions:
|
|
789
|
-
|
|
790
|
-
|
|
777
|
+
actions: m(() => [
|
|
778
|
+
O("div", Ee, [
|
|
779
|
+
k(J, {
|
|
791
780
|
variant: "plain",
|
|
792
781
|
color: "red-darken-2",
|
|
793
782
|
text: e.labelCancel,
|
|
794
|
-
onClick:
|
|
783
|
+
onClick: d[0] || (d[0] = (h) => p.value = !1)
|
|
795
784
|
}, null, 8, ["text"]),
|
|
796
|
-
|
|
797
|
-
|
|
785
|
+
k(a),
|
|
786
|
+
k(J, {
|
|
798
787
|
variant: "tonal",
|
|
799
788
|
text: e.labelConfirm,
|
|
800
|
-
onClick:
|
|
789
|
+
onClick: v
|
|
801
790
|
}, null, 8, ["text"])
|
|
802
791
|
])
|
|
803
792
|
]),
|
|
804
793
|
_: 1
|
|
805
|
-
}, 8, ["modelValue", "title"])) :
|
|
794
|
+
}, 8, ["modelValue", "title"])) : X("", !0)
|
|
806
795
|
]),
|
|
807
796
|
_: 1
|
|
808
797
|
}, 8, ["modelValue", "disabled"])
|
|
@@ -832,46 +821,46 @@ const Me = /* @__PURE__ */ C({
|
|
|
832
821
|
dateFormat: { default: "DD/MM/YYYY" }
|
|
833
822
|
},
|
|
834
823
|
setup(t) {
|
|
835
|
-
const e = t, n =
|
|
836
|
-
function
|
|
837
|
-
if (!
|
|
838
|
-
let
|
|
839
|
-
if (
|
|
840
|
-
|
|
824
|
+
const e = t, n = S(() => e.rules);
|
|
825
|
+
function r(d) {
|
|
826
|
+
if (!d) return "";
|
|
827
|
+
let a;
|
|
828
|
+
if (d instanceof Date)
|
|
829
|
+
a = d;
|
|
841
830
|
else {
|
|
842
|
-
const
|
|
843
|
-
|
|
831
|
+
const h = d.split("/");
|
|
832
|
+
h.length === 3 ? a = new Date(Number(h[2]), Number(h[1]) - 1, Number(h[0])) : a = new Date(d);
|
|
844
833
|
}
|
|
845
|
-
if (isNaN(
|
|
846
|
-
const
|
|
847
|
-
return `${
|
|
834
|
+
if (isNaN(a.getTime())) return "";
|
|
835
|
+
const F = `0${a.getDate()}`.slice(-2), _ = `0${a.getMonth() + 1}`.slice(-2), $ = a.getFullYear();
|
|
836
|
+
return `${F}/${_}/${$}`;
|
|
848
837
|
}
|
|
849
|
-
function
|
|
850
|
-
if (!
|
|
851
|
-
const
|
|
852
|
-
return
|
|
838
|
+
function l(d) {
|
|
839
|
+
if (!d) return null;
|
|
840
|
+
const a = d.split("/");
|
|
841
|
+
return a.length === 3 ? new Date(Number(a[2]), Number(a[1]) - 1, Number(a[0])) : null;
|
|
853
842
|
}
|
|
854
|
-
const { errorMessage: p, value:
|
|
855
|
-
initialValue: e.modelValue ?
|
|
843
|
+
const { errorMessage: p, value: o } = R(() => e.name, n, {
|
|
844
|
+
initialValue: e.modelValue ? r(e.modelValue) : "",
|
|
856
845
|
syncVModel: !0
|
|
857
|
-
}),
|
|
858
|
-
|
|
846
|
+
}), v = P(null), g = P(!1), i = (d) => {
|
|
847
|
+
o.value = r(d), g.value = !1;
|
|
859
848
|
};
|
|
860
|
-
return
|
|
861
|
-
|
|
862
|
-
}), (
|
|
863
|
-
const
|
|
864
|
-
return s(),
|
|
849
|
+
return fe(() => {
|
|
850
|
+
v.value = e.modelValue ? l(e.modelValue) : null;
|
|
851
|
+
}), (d, a) => {
|
|
852
|
+
const F = y("v-text-field"), _ = y("v-date-picker"), $ = y("v-locale-provider"), h = y("v-btn"), z = y("v-menu");
|
|
853
|
+
return s(), b(z, {
|
|
865
854
|
modelValue: g.value,
|
|
866
|
-
"onUpdate:modelValue":
|
|
855
|
+
"onUpdate:modelValue": a[4] || (a[4] = (I) => g.value = I),
|
|
867
856
|
location: "center",
|
|
868
857
|
disabled: e.disabled,
|
|
869
858
|
"close-on-content-click": !1
|
|
870
859
|
}, {
|
|
871
|
-
activator:
|
|
872
|
-
|
|
873
|
-
modelValue:
|
|
874
|
-
"onUpdate:modelValue":
|
|
860
|
+
activator: m(({ props: I }) => [
|
|
861
|
+
k(F, w({ ...d.$attrs, ...I }, {
|
|
862
|
+
modelValue: V(o),
|
|
863
|
+
"onUpdate:modelValue": a[0] || (a[0] = (x) => j(o) ? o.value = x : null),
|
|
875
864
|
"prepend-inner-icon": "mdi-calendar-outline",
|
|
876
865
|
name: e.name,
|
|
877
866
|
density: e.density,
|
|
@@ -880,21 +869,21 @@ const Me = /* @__PURE__ */ C({
|
|
|
880
869
|
"hide-details": e.hideDetails,
|
|
881
870
|
color: e.color,
|
|
882
871
|
readonly: "",
|
|
883
|
-
"error-messages":
|
|
884
|
-
"onClick:clear":
|
|
872
|
+
"error-messages": V(p),
|
|
873
|
+
"onClick:clear": a[1] || (a[1] = (x) => o.value = "")
|
|
885
874
|
}), null, 16, ["modelValue", "name", "density", "rounded", "variant", "hide-details", "color", "error-messages"])
|
|
886
875
|
]),
|
|
887
|
-
default:
|
|
888
|
-
|
|
889
|
-
|
|
876
|
+
default: m(() => [
|
|
877
|
+
O("div", Le, [
|
|
878
|
+
k($, {
|
|
890
879
|
locale: e.locale
|
|
891
880
|
}, {
|
|
892
|
-
default:
|
|
893
|
-
|
|
894
|
-
modelValue:
|
|
881
|
+
default: m(() => [
|
|
882
|
+
k(_, {
|
|
883
|
+
modelValue: v.value,
|
|
895
884
|
"onUpdate:modelValue": [
|
|
896
|
-
|
|
897
|
-
|
|
885
|
+
a[2] || (a[2] = (I) => v.value = I),
|
|
886
|
+
i
|
|
898
887
|
],
|
|
899
888
|
title: "",
|
|
900
889
|
elevation: "10",
|
|
@@ -908,13 +897,13 @@ const Me = /* @__PURE__ */ C({
|
|
|
908
897
|
]),
|
|
909
898
|
_: 1
|
|
910
899
|
}, 8, ["locale"]),
|
|
911
|
-
|
|
900
|
+
k(h, {
|
|
912
901
|
class: "position-absolute top-0 right-0",
|
|
913
902
|
color: "white",
|
|
914
903
|
icon: "mdi-close",
|
|
915
904
|
size: "small",
|
|
916
905
|
variant: "text",
|
|
917
|
-
onClick:
|
|
906
|
+
onClick: a[3] || (a[3] = (I) => g.value = !1)
|
|
918
907
|
})
|
|
919
908
|
])
|
|
920
909
|
]),
|
|
@@ -935,41 +924,41 @@ const Me = /* @__PURE__ */ C({
|
|
|
935
924
|
},
|
|
936
925
|
emits: ["set-selected-items"],
|
|
937
926
|
setup(t, { emit: e }) {
|
|
938
|
-
const n = t,
|
|
939
|
-
function
|
|
940
|
-
|
|
941
|
-
const
|
|
942
|
-
if (
|
|
943
|
-
|
|
944
|
-
const
|
|
945
|
-
(
|
|
927
|
+
const n = t, r = e, l = P(n.selectedItems), p = P(!1), o = [];
|
|
928
|
+
function v(i) {
|
|
929
|
+
i.isSelected ? l.value.push(i) : l.value.splice(l.value.indexOf(i), 1);
|
|
930
|
+
const d = n.items.find((a) => a.id === i.id);
|
|
931
|
+
if (d)
|
|
932
|
+
d.children.map((a) => a.isSelected = i.isSelected), i.isSelected && d.children.forEach((a) => {
|
|
933
|
+
const F = l.value.findIndex(
|
|
934
|
+
(_) => _.id === a.id
|
|
946
935
|
);
|
|
947
|
-
|
|
936
|
+
F !== -1 && l.value.splice(F, 1);
|
|
948
937
|
});
|
|
949
938
|
else {
|
|
950
|
-
const
|
|
951
|
-
|
|
939
|
+
const a = n.items.find((F) => F.id === i.parentId);
|
|
940
|
+
a && a.children.every((F) => F.isSelected) && (a.isSelected = !0);
|
|
952
941
|
}
|
|
953
|
-
|
|
942
|
+
r("set-selected-items", [...l.value]);
|
|
954
943
|
}
|
|
955
|
-
function g(
|
|
956
|
-
const
|
|
957
|
-
return !
|
|
944
|
+
function g(i) {
|
|
945
|
+
const d = n.items.find((a) => a.id === i.id);
|
|
946
|
+
return !d || d.children.every((a) => a.isSelected) ? !1 : !!d.children.find((a) => a.isSelected);
|
|
958
947
|
}
|
|
959
|
-
return (
|
|
960
|
-
const
|
|
961
|
-
return s(),
|
|
948
|
+
return (i, d) => {
|
|
949
|
+
const a = y("v-chip"), F = y("v-text-field"), _ = y("v-list-item"), $ = y("f-checkbox"), h = y("v-list-group"), z = y("v-list"), I = y("v-menu");
|
|
950
|
+
return s(), b(I, {
|
|
962
951
|
modelValue: p.value,
|
|
963
|
-
"onUpdate:modelValue":
|
|
952
|
+
"onUpdate:modelValue": d[1] || (d[1] = (x) => p.value = x),
|
|
964
953
|
"max-height": "250px",
|
|
965
954
|
"close-on-content-click": !1,
|
|
966
955
|
disabled: n.disabled
|
|
967
956
|
}, {
|
|
968
|
-
activator:
|
|
969
|
-
|
|
957
|
+
activator: m(({ props: x }) => [
|
|
958
|
+
k(F, w({
|
|
970
959
|
name: "selectedItems",
|
|
971
960
|
readonly: ""
|
|
972
|
-
},
|
|
961
|
+
}, x, {
|
|
973
962
|
variant: "outlined",
|
|
974
963
|
rounded: "lg",
|
|
975
964
|
density: "compact",
|
|
@@ -977,17 +966,17 @@ const Me = /* @__PURE__ */ C({
|
|
|
977
966
|
"hide-details": "",
|
|
978
967
|
clearable: !1,
|
|
979
968
|
label: n.label,
|
|
980
|
-
active:
|
|
969
|
+
active: l.value.length > 0
|
|
981
970
|
}), {
|
|
982
|
-
"prepend-inner":
|
|
983
|
-
|
|
984
|
-
(s(!0),
|
|
985
|
-
key:
|
|
971
|
+
"prepend-inner": m(() => [
|
|
972
|
+
O("div", Ge, [
|
|
973
|
+
(s(!0), B(W, null, N(l.value, (u, c) => (s(), b(a, {
|
|
974
|
+
key: c,
|
|
986
975
|
density: "compact",
|
|
987
976
|
class: "ml-3"
|
|
988
977
|
}, {
|
|
989
|
-
default:
|
|
990
|
-
|
|
978
|
+
default: m(() => [
|
|
979
|
+
E(T(u[n.itemTitle]), 1)
|
|
991
980
|
]),
|
|
992
981
|
_: 2
|
|
993
982
|
}, 1024))), 128))
|
|
@@ -996,55 +985,55 @@ const Me = /* @__PURE__ */ C({
|
|
|
996
985
|
_: 1
|
|
997
986
|
}, 16, ["label", "active"])
|
|
998
987
|
]),
|
|
999
|
-
default:
|
|
1000
|
-
|
|
988
|
+
default: m(() => [
|
|
989
|
+
k(z, {
|
|
1001
990
|
density: "compact",
|
|
1002
991
|
nav: "",
|
|
1003
992
|
"open-strategy": "single",
|
|
1004
993
|
width: "100%",
|
|
1005
|
-
opened:
|
|
994
|
+
opened: o,
|
|
1006
995
|
slim: ""
|
|
1007
996
|
}, {
|
|
1008
|
-
default:
|
|
1009
|
-
(s(!0),
|
|
1010
|
-
key:
|
|
997
|
+
default: m(() => [
|
|
998
|
+
(s(!0), B(W, null, N(t.items, (x) => (s(), B("div", {
|
|
999
|
+
key: x.id
|
|
1011
1000
|
}, [
|
|
1012
|
-
|
|
1001
|
+
x.children ? (s(), b(h, {
|
|
1013
1002
|
key: 1,
|
|
1014
|
-
value:
|
|
1003
|
+
value: x.id
|
|
1015
1004
|
}, {
|
|
1016
|
-
activator:
|
|
1017
|
-
|
|
1005
|
+
activator: m(({ props: u }) => [
|
|
1006
|
+
k(_, w({ ref_for: !0 }, u, {
|
|
1018
1007
|
rounded: "lg",
|
|
1019
|
-
title:
|
|
1008
|
+
title: x[n.itemTitle]
|
|
1020
1009
|
}), {
|
|
1021
|
-
prepend:
|
|
1022
|
-
|
|
1023
|
-
modelValue:
|
|
1024
|
-
"onUpdate:modelValue": (
|
|
1025
|
-
indeterminate: g(
|
|
1026
|
-
onClick:
|
|
1010
|
+
prepend: m(() => [
|
|
1011
|
+
k($, {
|
|
1012
|
+
modelValue: x.isSelected,
|
|
1013
|
+
"onUpdate:modelValue": (c) => x.isSelected = c,
|
|
1014
|
+
indeterminate: g(x),
|
|
1015
|
+
onClick: d[0] || (d[0] = q(() => {
|
|
1027
1016
|
}, ["stop"])),
|
|
1028
|
-
onChange: (
|
|
1017
|
+
onChange: (c) => v(x)
|
|
1029
1018
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "indeterminate", "onChange"])
|
|
1030
1019
|
]),
|
|
1031
1020
|
_: 2
|
|
1032
1021
|
}, 1040, ["title"])
|
|
1033
1022
|
]),
|
|
1034
|
-
default:
|
|
1035
|
-
(s(!0),
|
|
1036
|
-
key:
|
|
1023
|
+
default: m(() => [
|
|
1024
|
+
(s(!0), B(W, null, N(x.children, (u) => (s(), B("div", {
|
|
1025
|
+
key: u.id
|
|
1037
1026
|
}, [
|
|
1038
|
-
|
|
1027
|
+
k(_, {
|
|
1039
1028
|
rounded: "lg",
|
|
1040
|
-
title:
|
|
1041
|
-
value:
|
|
1029
|
+
title: u[n.itemTitle],
|
|
1030
|
+
value: u.id
|
|
1042
1031
|
}, {
|
|
1043
|
-
prepend:
|
|
1044
|
-
|
|
1045
|
-
modelValue:
|
|
1046
|
-
"onUpdate:modelValue": (
|
|
1047
|
-
onChange: (
|
|
1032
|
+
prepend: m(() => [
|
|
1033
|
+
k($, {
|
|
1034
|
+
modelValue: u.isSelected,
|
|
1035
|
+
"onUpdate:modelValue": (c) => u.isSelected = c,
|
|
1036
|
+
onChange: (c) => v(u)
|
|
1048
1037
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
1049
1038
|
]),
|
|
1050
1039
|
_: 2
|
|
@@ -1052,11 +1041,11 @@ const Me = /* @__PURE__ */ C({
|
|
|
1052
1041
|
]))), 128))
|
|
1053
1042
|
]),
|
|
1054
1043
|
_: 2
|
|
1055
|
-
}, 1032, ["value"])) : (s(), _
|
|
1044
|
+
}, 1032, ["value"])) : (s(), b(_, {
|
|
1056
1045
|
key: 0,
|
|
1057
1046
|
rounded: "lg",
|
|
1058
|
-
title:
|
|
1059
|
-
value:
|
|
1047
|
+
title: x[n.itemTitle],
|
|
1048
|
+
value: x.id
|
|
1060
1049
|
}, null, 8, ["title", "value"]))
|
|
1061
1050
|
]))), 128))
|
|
1062
1051
|
]),
|
|
@@ -1069,7 +1058,7 @@ const Me = /* @__PURE__ */ C({
|
|
|
1069
1058
|
}
|
|
1070
1059
|
}), Ze = {
|
|
1071
1060
|
install(t) {
|
|
1072
|
-
t.component("FButton", J), t.component("FTextField", Ve), t.component("FDataTable",
|
|
1061
|
+
t.component("FButton", J), t.component("FTextField", Ve), t.component("FDataTable", Se), t.component("FTextarea", Me), t.component("FAutocomplete", Te), t.component("FCheckbox", Ie), t.component("FCurrencyField", Pe), t.component("FSelect", Ne), t.component("FNumberField", Ae), t.component("FSwitch", Oe), t.component("FDialog", je), t.component("FTimePicker", ze), t.component("FDatePicker", He), t.component("FTreeView", Ke);
|
|
1073
1062
|
}
|
|
1074
1063
|
};
|
|
1075
1064
|
export {
|
|
@@ -1077,11 +1066,11 @@ export {
|
|
|
1077
1066
|
J as FButton,
|
|
1078
1067
|
Ie as FCheckbox,
|
|
1079
1068
|
Pe as FCurrencyField,
|
|
1080
|
-
|
|
1069
|
+
Se as FDataTable,
|
|
1081
1070
|
Be as FDataTableHeaderType,
|
|
1082
1071
|
He as FDatePicker,
|
|
1083
1072
|
je as FDialog,
|
|
1084
|
-
|
|
1073
|
+
Ae as FNumberField,
|
|
1085
1074
|
Ne as FSelect,
|
|
1086
1075
|
Oe as FSwitch,
|
|
1087
1076
|
Ve as FTextField,
|