finso-vue-components 0.4.28 → 0.4.30
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,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as C, resolveComponent as
|
|
2
|
-
import { VTextField as
|
|
1
|
+
import { defineComponent as C, resolveComponent as y, openBlock as s, createBlock as _, computed as S, withDirectives as se, unref as k, mergeProps as w, isRef as E, createSlots as H, renderList as N, withCtx as m, renderSlot as A, normalizeProps as G, guardReactiveProps as K, useModel as L, ref as I, watch as q, createElementBlock as B, resolveDynamicComponent as ue, toHandlers as ce, toDisplayString as T, createTextVNode as X, createElementVNode as j, createCommentVNode as z, withModifiers as J, createVNode as V, mergeModels as Y, onMounted as me, Fragment as W } from "vue";
|
|
2
|
+
import { VTextField as fe, VTextarea as ve, VAutocomplete as pe, 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
|
|
5
|
-
const
|
|
4
|
+
import { useField as R } from "vee-validate";
|
|
5
|
+
const Q = /* @__PURE__ */ C({
|
|
6
6
|
__name: "FButton",
|
|
7
7
|
props: {
|
|
8
8
|
color: { default: "primary" },
|
|
@@ -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(), _(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 (
|
|
45
|
-
modelValue:
|
|
46
|
-
"onUpdate:modelValue":
|
|
44
|
+
return (v, o) => se((s(), _(k(fe), w(v.$attrs, {
|
|
45
|
+
modelValue: k(l),
|
|
46
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => E(l) ? l.value = p : 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": k(r),
|
|
55
55
|
"append-inner-icon": e.appendInnerIcon,
|
|
56
|
-
"onClick:appendInner":
|
|
56
|
+
"onClick:appendInner": o[1] || (o[1] = (p) => v.$emit("clickAppendInner"))
|
|
57
57
|
}), H({ _: 2 }, [
|
|
58
|
-
|
|
59
|
-
name:
|
|
60
|
-
fn:
|
|
61
|
-
A(
|
|
58
|
+
N(v.$slots, (p, b) => ({
|
|
59
|
+
name: b,
|
|
60
|
+
fn: m((i) => [
|
|
61
|
+
A(v.$slots, b, 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
|
+
[k(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"), v = L(t, "itemsPerPage"), o = L(t, "sortBy"), p = I(!1), b = I(null);
|
|
117
|
+
function i(u, c) {
|
|
118
|
+
return c.split(".").reduce((M, O) => M == null ? void 0 : M[O], 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 O =
|
|
131
|
+
function F(u, c) {
|
|
132
|
+
return c.split(",").map((M) => {
|
|
133
|
+
const O = i(u, M.trim());
|
|
134
134
|
return typeof O == "string" ? O.charAt(0).toUpperCase() : "";
|
|
135
135
|
}).join("");
|
|
136
136
|
}
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
return Math.min(
|
|
140
|
-
}),
|
|
141
|
-
"click:row": (
|
|
142
|
-
|
|
137
|
+
const g = 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 ? (
|
|
144
|
+
}), h = S(
|
|
145
|
+
() => n.headers.filter((u) => u.type && u.key !== "actions")
|
|
146
|
+
), U = S(() => n.headers.some((u) => u.key === "actions"));
|
|
147
|
+
function P(u) {
|
|
148
|
+
n.showDeleteConfirm ? (b.value = u, p.value = !0) : r("delete-record", u);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
150
|
+
function x() {
|
|
151
|
+
r("delete-record", b.value), n.deleteLoading === void 0 && (p.value = !1, b.value = null);
|
|
152
152
|
}
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
}), (
|
|
156
|
-
const
|
|
157
|
-
return s(),
|
|
158
|
-
(s(), _(
|
|
159
|
-
page:
|
|
160
|
-
"onUpdate:page":
|
|
161
|
-
"items-per-page":
|
|
162
|
-
"onUpdate:itemsPerPage":
|
|
163
|
-
"sort-by":
|
|
164
|
-
"onUpdate:sortBy":
|
|
153
|
+
return q(() => n.deleteLoading, (u, c) => {
|
|
154
|
+
c && !u && p.value && (p.value = !1, b.value = null);
|
|
155
|
+
}), (u, c) => {
|
|
156
|
+
const M = y("v-icon"), O = y("v-img"), ee = y("v-avatar"), ae = y("v-chip"), te = y("v-btn"), ne = y("v-card-text"), oe = y("v-spacer"), le = y("f-button"), re = y("v-card-actions"), de = y("f-dialog");
|
|
157
|
+
return s(), B("div", null, [
|
|
158
|
+
(s(), _(ue(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
|
+
"items-per-page": v.value,
|
|
162
|
+
"onUpdate:itemsPerPage": c[1] || (c[1] = (f) => v.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: g.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
|
+
}, ce($.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(), _(ee, {
|
|
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(), _(O, {
|
|
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(), _(M, {
|
|
199
199
|
key: 1,
|
|
200
200
|
color: "white"
|
|
201
201
|
}, {
|
|
202
|
-
default:
|
|
202
|
+
default: m(() => [...c[5] || (c[5] = [
|
|
203
203
|
X("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(), _(M, {
|
|
210
210
|
key: 2,
|
|
211
211
|
color: "white"
|
|
212
212
|
}, {
|
|
213
|
-
default:
|
|
213
|
+
default: m(() => [...c[6] || (c[6] = [
|
|
214
214
|
X("mdi-account", -1)
|
|
215
215
|
])]),
|
|
216
216
|
_: 1
|
|
217
217
|
}))
|
|
218
218
|
]),
|
|
219
219
|
_: 2
|
|
220
|
-
}, 1024)) :
|
|
220
|
+
}, 1024)) : f.type === "logo" ? (s(), _(ee, {
|
|
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(), _(O, {
|
|
230
230
|
key: 0,
|
|
231
|
-
src:
|
|
231
|
+
src: i(D, f.key),
|
|
232
232
|
class: "f-data-table__logo"
|
|
233
233
|
}, {
|
|
234
|
-
error:
|
|
234
|
+
error: m(() => [...c[7] || (c[7] = [
|
|
235
235
|
j("div", { class: "f-data-table__logo-avatar fill-height" }, null, -1)
|
|
236
236
|
])]),
|
|
237
237
|
_: 1
|
|
238
238
|
}, 8, ["src"])) : z("", !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(), _(ae, {
|
|
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
|
-
X(
|
|
246
|
+
default: m(() => [
|
|
247
|
+
X(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(), _(M, {
|
|
251
251
|
key: 4,
|
|
252
|
-
color:
|
|
252
|
+
color: i(D, f.key) ? "green-darken-1" : "red-darken-2"
|
|
253
253
|
}, {
|
|
254
|
-
default:
|
|
255
|
-
X(
|
|
254
|
+
default: m(() => [
|
|
255
|
+
X(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)) : z("", !0)
|
|
259
259
|
], !0)
|
|
260
260
|
])
|
|
261
261
|
})),
|
|
262
|
-
|
|
262
|
+
U.value ? {
|
|
263
263
|
name: "item.actions",
|
|
264
|
-
fn:
|
|
265
|
-
A(
|
|
264
|
+
fn: m(({ item: f }) => [
|
|
265
|
+
A(u.$slots, "item.actions", { item: f }, () => [
|
|
266
266
|
j("div", $e, [
|
|
267
|
-
t.canEditRecord || t.canReadRecord ? (s(), _(
|
|
267
|
+
t.canEditRecord || t.canReadRecord ? (s(), _(te, {
|
|
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:
|
|
273
|
+
onClick: J((D) => r("show-record", f), ["stop"])
|
|
274
274
|
}, null, 8, ["icon", "color", "onClick"])) : z("", !0),
|
|
275
|
-
t.canDeleteRecord ? (s(), _(
|
|
275
|
+
t.canDeleteRecord ? (s(), _(te, {
|
|
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:
|
|
281
|
+
onClick: J((D) => P(f), ["stop"])
|
|
282
282
|
}, null, 8, ["onClick"])) : z("", !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((ie) => [
|
|
291
|
+
A(u.$slots, D, G(K(ie ?? {})), 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
|
-
V(
|
|
296
|
-
modelValue:
|
|
297
|
-
"onUpdate:modelValue":
|
|
295
|
+
V(de, {
|
|
296
|
+
modelValue: p.value,
|
|
297
|
+
"onUpdate:modelValue": c[4] || (c[4] = (f) => p.value = f),
|
|
298
298
|
"max-width": "400",
|
|
299
299
|
"hide-close": !0
|
|
300
300
|
}, {
|
|
301
|
-
header:
|
|
302
|
-
j("div", we,
|
|
301
|
+
header: m(() => [
|
|
302
|
+
j("div", we, T(t.labelDeleteTitle), 1)
|
|
303
303
|
]),
|
|
304
|
-
default:
|
|
305
|
-
V(
|
|
306
|
-
default:
|
|
307
|
-
X(
|
|
304
|
+
default: m(() => [
|
|
305
|
+
V(ne, null, {
|
|
306
|
+
default: m(() => [
|
|
307
|
+
X(T(t.deleteMessageFormatter && b.value ? t.deleteMessageFormatter(b.value) : t.labelDeleteMessage), 1)
|
|
308
308
|
]),
|
|
309
309
|
_: 1
|
|
310
310
|
}),
|
|
311
|
-
V(
|
|
312
|
-
default:
|
|
313
|
-
V(
|
|
314
|
-
V(
|
|
311
|
+
V(re, null, {
|
|
312
|
+
default: m(() => [
|
|
313
|
+
V(oe),
|
|
314
|
+
V(le, {
|
|
315
315
|
variant: "plain",
|
|
316
316
|
color: "red-darken-2",
|
|
317
317
|
text: t.labelDeleteCancel,
|
|
318
|
-
onClick:
|
|
318
|
+
onClick: c[3] || (c[3] = (f) => p.value = !1)
|
|
319
319
|
}, null, 8, ["text"]),
|
|
320
|
-
V(
|
|
320
|
+
V(le, {
|
|
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
|
|
@@ -332,12 +332,12 @@ const J = /* @__PURE__ */ C({
|
|
|
332
332
|
]);
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
}),
|
|
335
|
+
}), Z = (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__ */ Z(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 (
|
|
365
|
-
modelValue:
|
|
366
|
-
"onUpdate:modelValue":
|
|
364
|
+
return (v, o) => (s(), _(k(ve), w(v.$attrs, {
|
|
365
|
+
modelValue: k(l),
|
|
366
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => E(l) ? l.value = p : 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": k(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,41 +396,41 @@ 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: v, value: o } = R(() => r.name, l, {
|
|
400
|
+
initialValue: r.modelValue,
|
|
401
401
|
syncVModel: !0
|
|
402
402
|
});
|
|
403
|
-
function
|
|
404
|
-
n("change",
|
|
403
|
+
function p(b) {
|
|
404
|
+
n("change", b);
|
|
405
405
|
}
|
|
406
|
-
return (
|
|
407
|
-
modelValue:
|
|
406
|
+
return (b, i) => (s(), _(k(pe), w(b.$attrs, {
|
|
407
|
+
modelValue: k(o),
|
|
408
408
|
"onUpdate:modelValue": [
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
i[0] || (i[0] = (d) => E(o) ? o.value = d : null),
|
|
410
|
+
i[1] || (i[1] = (d) => p(k(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": k(v),
|
|
423
423
|
"menu-props": { maxWidth: 0 }
|
|
424
424
|
}), H({ _: 2 }, [
|
|
425
|
-
|
|
426
|
-
name:
|
|
427
|
-
fn:
|
|
428
|
-
A(
|
|
425
|
+
N(b.$slots, (d, a) => ({
|
|
426
|
+
name: a,
|
|
427
|
+
fn: m((F) => [
|
|
428
|
+
A(b.$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"]));
|
|
432
432
|
}
|
|
433
|
-
}),
|
|
433
|
+
}), Pe = /* @__PURE__ */ C({
|
|
434
434
|
name: "FCheckbox",
|
|
435
435
|
inheritAttrs: !1,
|
|
436
436
|
__name: "FCheckbox",
|
|
@@ -442,15 +442,15 @@ const Me = /* @__PURE__ */ C({
|
|
|
442
442
|
},
|
|
443
443
|
setup(t) {
|
|
444
444
|
const e = t;
|
|
445
|
-
return (n,
|
|
445
|
+
return (n, r) => (s(), _(k(ye), w(n.$attrs, {
|
|
446
446
|
color: e.color,
|
|
447
447
|
"hide-details": e.hideDetails,
|
|
448
448
|
indeterminate: e.indeterminate,
|
|
449
449
|
density: e.density
|
|
450
450
|
}), null, 16, ["color", "hide-details", "indeterminate", "density"]));
|
|
451
451
|
}
|
|
452
|
-
}),
|
|
453
|
-
name: "
|
|
452
|
+
}), Ie = /* @__PURE__ */ C({
|
|
453
|
+
name: "TestField",
|
|
454
454
|
inheritAttrs: !1,
|
|
455
455
|
__name: "FCurrencyField",
|
|
456
456
|
props: {
|
|
@@ -469,66 +469,68 @@ 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
|
-
}),
|
|
475
|
+
}), v = 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 g
|
|
484
|
-
return
|
|
482
|
+
), o = I(p(e.modelValue));
|
|
483
|
+
function p(g) {
|
|
484
|
+
return g == null || isNaN(g) ? "" : v.value.format(g);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
var u, x;
|
|
492
|
-
return ((x = (u = p.value) == null ? void 0 : u.$el) == null ? void 0 : x.querySelector("input")) ?? null;
|
|
486
|
+
function b(g) {
|
|
487
|
+
const $ = g.replace(/[^\d.,-]/g, "").replace(",", ".");
|
|
488
|
+
if (!/\d/.test($)) return null;
|
|
489
|
+
const h = parseFloat($);
|
|
490
|
+
return isNaN(h) ? null : Math.round(h * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
|
|
493
491
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
492
|
+
const i = I(!1);
|
|
493
|
+
function d() {
|
|
494
|
+
o.value = "", l.value = null;
|
|
497
495
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
496
|
+
q(o, (g) => {
|
|
497
|
+
g == null || g === "" ? l.value = null : i.value && (l.value = b(g));
|
|
498
|
+
});
|
|
499
|
+
function a() {
|
|
500
|
+
i.value = !1;
|
|
501
|
+
const g = o.value;
|
|
502
|
+
g == null || g === "" ? (l.value = null, o.value = "") : o.value = p(l.value);
|
|
504
503
|
}
|
|
505
|
-
function
|
|
504
|
+
function F(g) {
|
|
506
505
|
i.value = !0;
|
|
507
|
-
const
|
|
508
|
-
|
|
506
|
+
const $ = g.target, h = l.value;
|
|
507
|
+
h != null ? o.value = String(h) : o.value = "", setTimeout(() => $.select(), 0);
|
|
509
508
|
}
|
|
510
|
-
return
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
509
|
+
return q(
|
|
510
|
+
() => e.modelValue,
|
|
511
|
+
(g) => {
|
|
512
|
+
i.value || (l.value = g, o.value = p(g));
|
|
513
|
+
}
|
|
514
|
+
), (g, $) => {
|
|
515
|
+
const h = y("v-text-field");
|
|
516
|
+
return s(), _(h, w(g.$attrs, {
|
|
517
|
+
inputmode: "decimal",
|
|
518
|
+
modelValue: o.value,
|
|
519
|
+
"onUpdate:modelValue": $[0] || ($[0] = (U) => o.value = U),
|
|
520
|
+
name: e.name,
|
|
521
|
+
label: e.label,
|
|
522
|
+
readonly: e.readonly,
|
|
523
|
+
"hide-details": e.hideDetails,
|
|
524
|
+
rounded: e.rounded,
|
|
525
|
+
variant: e.variant,
|
|
526
|
+
density: e.density,
|
|
527
|
+
color: e.color,
|
|
528
|
+
"error-messages": k(r),
|
|
529
|
+
"onClick:clear": d,
|
|
530
|
+
onBlur: a,
|
|
531
|
+
onFocus: F
|
|
532
|
+
}), null, 16, ["modelValue", "name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]);
|
|
533
|
+
};
|
|
532
534
|
}
|
|
533
535
|
}), Ne = /* @__PURE__ */ C({
|
|
534
536
|
name: "FSelect",
|
|
@@ -547,13 +549,13 @@ const Me = /* @__PURE__ */ C({
|
|
|
547
549
|
rules: { type: [String, Function], default: "" }
|
|
548
550
|
},
|
|
549
551
|
setup(t) {
|
|
550
|
-
const e = t, n =
|
|
552
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
551
553
|
initialValue: e.modelValue,
|
|
552
554
|
syncVModel: !0
|
|
553
555
|
});
|
|
554
|
-
return (
|
|
555
|
-
modelValue:
|
|
556
|
-
"onUpdate:modelValue":
|
|
556
|
+
return (v, o) => (s(), _(k(ge), w(v.$attrs, {
|
|
557
|
+
modelValue: k(l),
|
|
558
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => E(l) ? l.value = p : null),
|
|
557
559
|
name: e.name,
|
|
558
560
|
items: e.items,
|
|
559
561
|
rounded: e.rounded,
|
|
@@ -562,17 +564,17 @@ const Me = /* @__PURE__ */ C({
|
|
|
562
564
|
color: e.color,
|
|
563
565
|
"hide-details": e.hideDetails,
|
|
564
566
|
"return-object": e.returnObject,
|
|
565
|
-
"error-messages":
|
|
567
|
+
"error-messages": k(r)
|
|
566
568
|
}), H({ _: 2 }, [
|
|
567
|
-
|
|
568
|
-
name:
|
|
569
|
-
fn:
|
|
570
|
-
A(
|
|
569
|
+
N(v.$slots, (p, b) => ({
|
|
570
|
+
name: b,
|
|
571
|
+
fn: m((i) => [
|
|
572
|
+
A(v.$slots, b, G(K(i ?? {})))
|
|
571
573
|
])
|
|
572
574
|
}))
|
|
573
575
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "hide-details", "return-object", "error-messages"]));
|
|
574
576
|
}
|
|
575
|
-
}),
|
|
577
|
+
}), Ae = /* @__PURE__ */ C({
|
|
576
578
|
name: "FNumberField",
|
|
577
579
|
inheritAttrs: !1,
|
|
578
580
|
__name: "FNumberField",
|
|
@@ -596,13 +598,13 @@ const Me = /* @__PURE__ */ C({
|
|
|
596
598
|
rules: { type: [String, Function], default: "" }
|
|
597
599
|
},
|
|
598
600
|
setup(t) {
|
|
599
|
-
const e = t, n =
|
|
601
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
600
602
|
initialValue: e.modelValue,
|
|
601
603
|
syncVModel: !0
|
|
602
604
|
});
|
|
603
|
-
return (
|
|
604
|
-
modelValue:
|
|
605
|
-
"onUpdate:modelValue":
|
|
605
|
+
return (v, o) => (s(), _(k(be), w(v.$attrs, {
|
|
606
|
+
modelValue: k(l),
|
|
607
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => E(l) ? l.value = p : null),
|
|
606
608
|
name: e.name,
|
|
607
609
|
color: e.color,
|
|
608
610
|
density: e.density,
|
|
@@ -618,10 +620,10 @@ const Me = /* @__PURE__ */ C({
|
|
|
618
620
|
min: e.min,
|
|
619
621
|
precision: e.precision,
|
|
620
622
|
inset: e.inset,
|
|
621
|
-
"error-messages":
|
|
623
|
+
"error-messages": k(r)
|
|
622
624
|
}), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "control-variant", "hide-details", "placeholder", "label", "prefix", "disabled", "readonly", "min", "precision", "inset", "error-messages"]));
|
|
623
625
|
}
|
|
624
|
-
}),
|
|
626
|
+
}), Re = { key: 0 }, Ue = { key: 1 }, Oe = /* @__PURE__ */ C({
|
|
625
627
|
name: "FSwitch",
|
|
626
628
|
inheritAttrs: !1,
|
|
627
629
|
__name: "FSwitch",
|
|
@@ -638,17 +640,17 @@ const Me = /* @__PURE__ */ C({
|
|
|
638
640
|
emits: ["update:modelValue"],
|
|
639
641
|
setup(t) {
|
|
640
642
|
const e = t, n = L(t, "modelValue");
|
|
641
|
-
return (
|
|
643
|
+
return (r, l) => (s(), _(k(_e), w(r.$attrs, {
|
|
642
644
|
modelValue: n.value,
|
|
643
|
-
"onUpdate:modelValue":
|
|
645
|
+
"onUpdate:modelValue": l[0] || (l[0] = (v) => n.value = v),
|
|
644
646
|
color: e.color,
|
|
645
647
|
"hide-details": e.hideDetails,
|
|
646
648
|
density: e.density
|
|
647
649
|
}), H({ _: 2 }, [
|
|
648
650
|
e.labelTrue || e.labelFalse ? {
|
|
649
651
|
name: "label",
|
|
650
|
-
fn:
|
|
651
|
-
n.value ? (s(),
|
|
652
|
+
fn: m(() => [
|
|
653
|
+
n.value ? (s(), B("span", Re, T(e.labelTrue), 1)) : (s(), B("span", Ue, T(e.labelFalse), 1))
|
|
652
654
|
]),
|
|
653
655
|
key: "0"
|
|
654
656
|
} : void 0
|
|
@@ -670,42 +672,42 @@ const Me = /* @__PURE__ */ C({
|
|
|
670
672
|
emits: /* @__PURE__ */ Y(["closeDialog"], ["update:modelValue"]),
|
|
671
673
|
setup(t) {
|
|
672
674
|
const e = t, n = L(t, "modelValue");
|
|
673
|
-
return (
|
|
674
|
-
const
|
|
675
|
-
return s(), _(
|
|
675
|
+
return (r, l) => {
|
|
676
|
+
const v = y("v-btn"), o = y("v-card-title"), p = y("v-divider"), b = y("v-card-text"), i = y("v-card"), d = y("v-dialog");
|
|
677
|
+
return s(), _(d, w(r.$attrs, {
|
|
676
678
|
modelValue: n.value,
|
|
677
|
-
"onUpdate:modelValue":
|
|
679
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => n.value = a),
|
|
678
680
|
transition: e.transition,
|
|
679
681
|
class: "f-dialog",
|
|
680
682
|
width: e.width,
|
|
681
683
|
persistent: e.persistent
|
|
682
684
|
}), {
|
|
683
|
-
default:
|
|
684
|
-
V(
|
|
685
|
+
default: m(() => [
|
|
686
|
+
V(i, {
|
|
685
687
|
class: "f-dialog-card",
|
|
686
688
|
density: "default",
|
|
687
689
|
variant: "elevated",
|
|
688
690
|
rounded: "lg"
|
|
689
691
|
}, {
|
|
690
|
-
default:
|
|
691
|
-
V(
|
|
692
|
-
default:
|
|
692
|
+
default: m(() => [
|
|
693
|
+
V(o, { class: "d-flex justify-space-between align-center" }, {
|
|
694
|
+
default: m(() => [
|
|
693
695
|
j("header", null, [
|
|
694
|
-
A(
|
|
696
|
+
A(r.$slots, "header")
|
|
695
697
|
]),
|
|
696
|
-
e.hideClose ? z("", !0) : (s(), _(
|
|
698
|
+
e.hideClose ? z("", !0) : (s(), _(v, {
|
|
697
699
|
key: 0,
|
|
698
700
|
icon: "mdi-close",
|
|
699
701
|
variant: "text",
|
|
700
|
-
onClick:
|
|
702
|
+
onClick: l[0] || (l[0] = (a) => r.$emit("closeDialog"))
|
|
701
703
|
}))
|
|
702
704
|
]),
|
|
703
705
|
_: 3
|
|
704
706
|
}),
|
|
705
|
-
V(
|
|
706
|
-
V(
|
|
707
|
-
default:
|
|
708
|
-
A(
|
|
707
|
+
V(p),
|
|
708
|
+
V(b, { class: "py-4 px-1 overflow-auto overflow-x-hidden" }, {
|
|
709
|
+
default: m(() => [
|
|
710
|
+
A(r.$slots, "default")
|
|
709
711
|
]),
|
|
710
712
|
_: 3
|
|
711
713
|
})
|
|
@@ -739,65 +741,65 @@ const Me = /* @__PURE__ */ C({
|
|
|
739
741
|
labelConfirm: { default: "Confirm" }
|
|
740
742
|
},
|
|
741
743
|
setup(t) {
|
|
742
|
-
const e = t, n =
|
|
744
|
+
const e = t, n = S(() => e.rules), { errorMessage: r, value: l } = R(() => e.name, n, {
|
|
743
745
|
initialValue: e.modelValue || "",
|
|
744
746
|
syncVModel: !0
|
|
745
|
-
}),
|
|
746
|
-
function
|
|
747
|
-
|
|
747
|
+
}), v = I(!1), o = I(l);
|
|
748
|
+
function p() {
|
|
749
|
+
l.value = o.value, v.value = !1;
|
|
748
750
|
}
|
|
749
|
-
function
|
|
750
|
-
|
|
751
|
+
function b(i) {
|
|
752
|
+
o.value && o.value.includes(":") && (o.value = i.toString().padStart(2, "0") + o.value.substring(o.value.indexOf(":")));
|
|
751
753
|
}
|
|
752
|
-
return (
|
|
753
|
-
const
|
|
754
|
-
return s(), _(
|
|
755
|
-
modelValue:
|
|
756
|
-
"onUpdate:modelValue":
|
|
754
|
+
return (i, d) => {
|
|
755
|
+
const a = y("v-spacer"), F = y("v-time-picker"), g = y("v-menu"), $ = y("v-text-field");
|
|
756
|
+
return s(), _($, w(i.$attrs, {
|
|
757
|
+
modelValue: k(l),
|
|
758
|
+
"onUpdate:modelValue": d[4] || (d[4] = (h) => E(l) ? l.value = h : null),
|
|
757
759
|
"prepend-inner-icon": "mdi-clock-time-four-outline",
|
|
758
760
|
name: e.name,
|
|
759
|
-
active:
|
|
760
|
-
focus:
|
|
761
|
+
active: v.value,
|
|
762
|
+
focus: v.value,
|
|
761
763
|
density: e.density,
|
|
762
764
|
rounded: e.rounded,
|
|
763
765
|
variant: e.variant,
|
|
764
766
|
"hide-details": e.hideDetails,
|
|
765
767
|
readonly: e.readonly,
|
|
766
|
-
"error-messages":
|
|
768
|
+
"error-messages": k(r)
|
|
767
769
|
}), {
|
|
768
|
-
default:
|
|
769
|
-
V(
|
|
770
|
-
modelValue:
|
|
771
|
-
"onUpdate:modelValue":
|
|
770
|
+
default: m(() => [
|
|
771
|
+
V(g, {
|
|
772
|
+
modelValue: v.value,
|
|
773
|
+
"onUpdate:modelValue": d[3] || (d[3] = (h) => v.value = h),
|
|
772
774
|
activator: "parent",
|
|
773
775
|
location: "center",
|
|
774
776
|
disabled: e.readonly,
|
|
775
777
|
"close-on-content-click": !1
|
|
776
778
|
}, {
|
|
777
|
-
default:
|
|
778
|
-
|
|
779
|
+
default: m(() => [
|
|
780
|
+
v.value ? (s(), _(F, {
|
|
779
781
|
key: 0,
|
|
780
|
-
modelValue:
|
|
781
|
-
"onUpdate:modelValue":
|
|
782
|
+
modelValue: o.value,
|
|
783
|
+
"onUpdate:modelValue": d[1] || (d[1] = (h) => o.value = h),
|
|
782
784
|
"full-width": "",
|
|
783
785
|
color: "secondary",
|
|
784
786
|
format: "24hr",
|
|
785
787
|
title: e.title,
|
|
786
|
-
"onUpdate:hour":
|
|
788
|
+
"onUpdate:hour": d[2] || (d[2] = (h) => b(h))
|
|
787
789
|
}, {
|
|
788
|
-
actions:
|
|
790
|
+
actions: m(() => [
|
|
789
791
|
j("div", Ee, [
|
|
790
|
-
V(
|
|
792
|
+
V(Q, {
|
|
791
793
|
variant: "plain",
|
|
792
794
|
color: "red-darken-2",
|
|
793
795
|
text: e.labelCancel,
|
|
794
|
-
onClick:
|
|
796
|
+
onClick: d[0] || (d[0] = (h) => v.value = !1)
|
|
795
797
|
}, null, 8, ["text"]),
|
|
796
|
-
V(
|
|
797
|
-
V(
|
|
798
|
+
V(a),
|
|
799
|
+
V(Q, {
|
|
798
800
|
variant: "tonal",
|
|
799
801
|
text: e.labelConfirm,
|
|
800
|
-
onClick:
|
|
802
|
+
onClick: p
|
|
801
803
|
}, null, 8, ["text"])
|
|
802
804
|
])
|
|
803
805
|
]),
|
|
@@ -811,7 +813,7 @@ const Me = /* @__PURE__ */ C({
|
|
|
811
813
|
}, 16, ["modelValue", "name", "active", "focus", "density", "rounded", "variant", "hide-details", "readonly", "error-messages"]);
|
|
812
814
|
};
|
|
813
815
|
}
|
|
814
|
-
}), ze = /* @__PURE__ */
|
|
816
|
+
}), ze = /* @__PURE__ */ Z(Xe, [["__scopeId", "data-v-7639bf96"]]), Le = { class: "position-relative" }, Ye = /* @__PURE__ */ C({
|
|
815
817
|
name: "FDatePicker",
|
|
816
818
|
inheritAttrs: !1,
|
|
817
819
|
__name: "FDatePicker",
|
|
@@ -832,46 +834,46 @@ const Me = /* @__PURE__ */ C({
|
|
|
832
834
|
dateFormat: { default: "DD/MM/YYYY" }
|
|
833
835
|
},
|
|
834
836
|
setup(t) {
|
|
835
|
-
const e = t, n =
|
|
836
|
-
function
|
|
837
|
-
if (!
|
|
838
|
-
let
|
|
839
|
-
if (
|
|
840
|
-
|
|
837
|
+
const e = t, n = S(() => e.rules);
|
|
838
|
+
function r(d) {
|
|
839
|
+
if (!d) return "";
|
|
840
|
+
let a;
|
|
841
|
+
if (d instanceof Date)
|
|
842
|
+
a = d;
|
|
841
843
|
else {
|
|
842
|
-
const
|
|
843
|
-
|
|
844
|
+
const h = d.split("/");
|
|
845
|
+
h.length === 3 ? a = new Date(Number(h[2]), Number(h[1]) - 1, Number(h[0])) : a = new Date(d);
|
|
844
846
|
}
|
|
845
|
-
if (isNaN(
|
|
846
|
-
const
|
|
847
|
-
return `${
|
|
847
|
+
if (isNaN(a.getTime())) return "";
|
|
848
|
+
const F = `0${a.getDate()}`.slice(-2), g = `0${a.getMonth() + 1}`.slice(-2), $ = a.getFullYear();
|
|
849
|
+
return `${F}/${g}/${$}`;
|
|
848
850
|
}
|
|
849
|
-
function
|
|
850
|
-
if (!
|
|
851
|
-
const
|
|
852
|
-
return
|
|
851
|
+
function l(d) {
|
|
852
|
+
if (!d) return null;
|
|
853
|
+
const a = d.split("/");
|
|
854
|
+
return a.length === 3 ? new Date(Number(a[2]), Number(a[1]) - 1, Number(a[0])) : null;
|
|
853
855
|
}
|
|
854
|
-
const { errorMessage:
|
|
855
|
-
initialValue: e.modelValue ?
|
|
856
|
+
const { errorMessage: v, value: o } = R(() => e.name, n, {
|
|
857
|
+
initialValue: e.modelValue ? r(e.modelValue) : "",
|
|
856
858
|
syncVModel: !0
|
|
857
|
-
}),
|
|
858
|
-
|
|
859
|
+
}), p = I(null), b = I(!1), i = (d) => {
|
|
860
|
+
o.value = r(d), b.value = !1;
|
|
859
861
|
};
|
|
860
|
-
return
|
|
861
|
-
|
|
862
|
-
}), (
|
|
863
|
-
const
|
|
864
|
-
return s(), _(
|
|
865
|
-
modelValue:
|
|
866
|
-
"onUpdate:modelValue":
|
|
862
|
+
return me(() => {
|
|
863
|
+
p.value = e.modelValue ? l(e.modelValue) : null;
|
|
864
|
+
}), (d, a) => {
|
|
865
|
+
const F = y("v-text-field"), g = y("v-date-picker"), $ = y("v-locale-provider"), h = y("v-btn"), U = y("v-menu");
|
|
866
|
+
return s(), _(U, {
|
|
867
|
+
modelValue: b.value,
|
|
868
|
+
"onUpdate:modelValue": a[4] || (a[4] = (P) => b.value = P),
|
|
867
869
|
location: "center",
|
|
868
870
|
disabled: e.disabled,
|
|
869
871
|
"close-on-content-click": !1
|
|
870
872
|
}, {
|
|
871
|
-
activator:
|
|
872
|
-
V(
|
|
873
|
-
modelValue:
|
|
874
|
-
"onUpdate:modelValue":
|
|
873
|
+
activator: m(({ props: P }) => [
|
|
874
|
+
V(F, w({ ...d.$attrs, ...P }, {
|
|
875
|
+
modelValue: k(o),
|
|
876
|
+
"onUpdate:modelValue": a[0] || (a[0] = (x) => E(o) ? o.value = x : null),
|
|
875
877
|
"prepend-inner-icon": "mdi-calendar-outline",
|
|
876
878
|
name: e.name,
|
|
877
879
|
density: e.density,
|
|
@@ -880,21 +882,21 @@ const Me = /* @__PURE__ */ C({
|
|
|
880
882
|
"hide-details": e.hideDetails,
|
|
881
883
|
color: e.color,
|
|
882
884
|
readonly: "",
|
|
883
|
-
"error-messages":
|
|
884
|
-
"onClick:clear":
|
|
885
|
+
"error-messages": k(v),
|
|
886
|
+
"onClick:clear": a[1] || (a[1] = (x) => o.value = "")
|
|
885
887
|
}), null, 16, ["modelValue", "name", "density", "rounded", "variant", "hide-details", "color", "error-messages"])
|
|
886
888
|
]),
|
|
887
|
-
default:
|
|
889
|
+
default: m(() => [
|
|
888
890
|
j("div", Le, [
|
|
889
|
-
V(
|
|
891
|
+
V($, {
|
|
890
892
|
locale: e.locale
|
|
891
893
|
}, {
|
|
892
|
-
default:
|
|
893
|
-
V(
|
|
894
|
-
modelValue:
|
|
894
|
+
default: m(() => [
|
|
895
|
+
V(g, {
|
|
896
|
+
modelValue: p.value,
|
|
895
897
|
"onUpdate:modelValue": [
|
|
896
|
-
|
|
897
|
-
|
|
898
|
+
a[2] || (a[2] = (P) => p.value = P),
|
|
899
|
+
i
|
|
898
900
|
],
|
|
899
901
|
title: "",
|
|
900
902
|
elevation: "10",
|
|
@@ -908,13 +910,13 @@ const Me = /* @__PURE__ */ C({
|
|
|
908
910
|
]),
|
|
909
911
|
_: 1
|
|
910
912
|
}, 8, ["locale"]),
|
|
911
|
-
V(
|
|
913
|
+
V(h, {
|
|
912
914
|
class: "position-absolute top-0 right-0",
|
|
913
915
|
color: "white",
|
|
914
916
|
icon: "mdi-close",
|
|
915
917
|
size: "small",
|
|
916
918
|
variant: "text",
|
|
917
|
-
onClick:
|
|
919
|
+
onClick: a[3] || (a[3] = (P) => b.value = !1)
|
|
918
920
|
})
|
|
919
921
|
])
|
|
920
922
|
]),
|
|
@@ -922,7 +924,7 @@ const Me = /* @__PURE__ */ C({
|
|
|
922
924
|
}, 8, ["modelValue", "disabled"]);
|
|
923
925
|
};
|
|
924
926
|
}
|
|
925
|
-
}), He = /* @__PURE__ */
|
|
927
|
+
}), He = /* @__PURE__ */ Z(Ye, [["__scopeId", "data-v-f2792853"]]), Ge = { class: "d-flex" }, Ke = /* @__PURE__ */ C({
|
|
926
928
|
name: "FTreeView",
|
|
927
929
|
inheritAttrs: !1,
|
|
928
930
|
__name: "FTreeView",
|
|
@@ -935,41 +937,41 @@ const Me = /* @__PURE__ */ C({
|
|
|
935
937
|
},
|
|
936
938
|
emits: ["set-selected-items"],
|
|
937
939
|
setup(t, { emit: e }) {
|
|
938
|
-
const n = t,
|
|
939
|
-
function
|
|
940
|
-
|
|
941
|
-
const
|
|
942
|
-
if (
|
|
943
|
-
|
|
944
|
-
const
|
|
945
|
-
(
|
|
940
|
+
const n = t, r = e, l = I(n.selectedItems), v = I(!1), o = [];
|
|
941
|
+
function p(i) {
|
|
942
|
+
i.isSelected ? l.value.push(i) : l.value.splice(l.value.indexOf(i), 1);
|
|
943
|
+
const d = n.items.find((a) => a.id === i.id);
|
|
944
|
+
if (d)
|
|
945
|
+
d.children.map((a) => a.isSelected = i.isSelected), i.isSelected && d.children.forEach((a) => {
|
|
946
|
+
const F = l.value.findIndex(
|
|
947
|
+
(g) => g.id === a.id
|
|
946
948
|
);
|
|
947
|
-
|
|
949
|
+
F !== -1 && l.value.splice(F, 1);
|
|
948
950
|
});
|
|
949
951
|
else {
|
|
950
|
-
const
|
|
951
|
-
|
|
952
|
+
const a = n.items.find((F) => F.id === i.parentId);
|
|
953
|
+
a && a.children.every((F) => F.isSelected) && (a.isSelected = !0);
|
|
952
954
|
}
|
|
953
|
-
|
|
955
|
+
r("set-selected-items", [...l.value]);
|
|
954
956
|
}
|
|
955
|
-
function
|
|
956
|
-
const
|
|
957
|
-
return !
|
|
957
|
+
function b(i) {
|
|
958
|
+
const d = n.items.find((a) => a.id === i.id);
|
|
959
|
+
return !d || d.children.every((a) => a.isSelected) ? !1 : !!d.children.find((a) => a.isSelected);
|
|
958
960
|
}
|
|
959
|
-
return (
|
|
960
|
-
const
|
|
961
|
-
return s(), _(
|
|
962
|
-
modelValue:
|
|
963
|
-
"onUpdate:modelValue":
|
|
961
|
+
return (i, d) => {
|
|
962
|
+
const a = y("v-chip"), F = y("v-text-field"), g = y("v-list-item"), $ = y("f-checkbox"), h = y("v-list-group"), U = y("v-list"), P = y("v-menu");
|
|
963
|
+
return s(), _(P, {
|
|
964
|
+
modelValue: v.value,
|
|
965
|
+
"onUpdate:modelValue": d[1] || (d[1] = (x) => v.value = x),
|
|
964
966
|
"max-height": "250px",
|
|
965
967
|
"close-on-content-click": !1,
|
|
966
968
|
disabled: n.disabled
|
|
967
969
|
}, {
|
|
968
|
-
activator:
|
|
969
|
-
V(
|
|
970
|
+
activator: m(({ props: x }) => [
|
|
971
|
+
V(F, w({
|
|
970
972
|
name: "selectedItems",
|
|
971
973
|
readonly: ""
|
|
972
|
-
},
|
|
974
|
+
}, x, {
|
|
973
975
|
variant: "outlined",
|
|
974
976
|
rounded: "lg",
|
|
975
977
|
density: "compact",
|
|
@@ -977,17 +979,17 @@ const Me = /* @__PURE__ */ C({
|
|
|
977
979
|
"hide-details": "",
|
|
978
980
|
clearable: !1,
|
|
979
981
|
label: n.label,
|
|
980
|
-
active:
|
|
982
|
+
active: l.value.length > 0
|
|
981
983
|
}), {
|
|
982
|
-
"prepend-inner":
|
|
984
|
+
"prepend-inner": m(() => [
|
|
983
985
|
j("div", Ge, [
|
|
984
|
-
(s(!0),
|
|
985
|
-
key:
|
|
986
|
+
(s(!0), B(W, null, N(l.value, (u, c) => (s(), _(a, {
|
|
987
|
+
key: c,
|
|
986
988
|
density: "compact",
|
|
987
989
|
class: "ml-3"
|
|
988
990
|
}, {
|
|
989
|
-
default:
|
|
990
|
-
X(
|
|
991
|
+
default: m(() => [
|
|
992
|
+
X(T(u[n.itemTitle]), 1)
|
|
991
993
|
]),
|
|
992
994
|
_: 2
|
|
993
995
|
}, 1024))), 128))
|
|
@@ -996,55 +998,55 @@ const Me = /* @__PURE__ */ C({
|
|
|
996
998
|
_: 1
|
|
997
999
|
}, 16, ["label", "active"])
|
|
998
1000
|
]),
|
|
999
|
-
default:
|
|
1000
|
-
V(
|
|
1001
|
+
default: m(() => [
|
|
1002
|
+
V(U, {
|
|
1001
1003
|
density: "compact",
|
|
1002
1004
|
nav: "",
|
|
1003
1005
|
"open-strategy": "single",
|
|
1004
1006
|
width: "100%",
|
|
1005
|
-
opened:
|
|
1007
|
+
opened: o,
|
|
1006
1008
|
slim: ""
|
|
1007
1009
|
}, {
|
|
1008
|
-
default:
|
|
1009
|
-
(s(!0),
|
|
1010
|
-
key:
|
|
1010
|
+
default: m(() => [
|
|
1011
|
+
(s(!0), B(W, null, N(t.items, (x) => (s(), B("div", {
|
|
1012
|
+
key: x.id
|
|
1011
1013
|
}, [
|
|
1012
|
-
|
|
1014
|
+
x.children ? (s(), _(h, {
|
|
1013
1015
|
key: 1,
|
|
1014
|
-
value:
|
|
1016
|
+
value: x.id
|
|
1015
1017
|
}, {
|
|
1016
|
-
activator:
|
|
1017
|
-
V(
|
|
1018
|
+
activator: m(({ props: u }) => [
|
|
1019
|
+
V(g, w({ ref_for: !0 }, u, {
|
|
1018
1020
|
rounded: "lg",
|
|
1019
|
-
title:
|
|
1021
|
+
title: x[n.itemTitle]
|
|
1020
1022
|
}), {
|
|
1021
|
-
prepend:
|
|
1022
|
-
V(
|
|
1023
|
-
modelValue:
|
|
1024
|
-
"onUpdate:modelValue": (
|
|
1025
|
-
indeterminate:
|
|
1026
|
-
onClick:
|
|
1023
|
+
prepend: m(() => [
|
|
1024
|
+
V($, {
|
|
1025
|
+
modelValue: x.isSelected,
|
|
1026
|
+
"onUpdate:modelValue": (c) => x.isSelected = c,
|
|
1027
|
+
indeterminate: b(x),
|
|
1028
|
+
onClick: d[0] || (d[0] = J(() => {
|
|
1027
1029
|
}, ["stop"])),
|
|
1028
|
-
onChange: (
|
|
1030
|
+
onChange: (c) => p(x)
|
|
1029
1031
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "indeterminate", "onChange"])
|
|
1030
1032
|
]),
|
|
1031
1033
|
_: 2
|
|
1032
1034
|
}, 1040, ["title"])
|
|
1033
1035
|
]),
|
|
1034
|
-
default:
|
|
1035
|
-
(s(!0),
|
|
1036
|
-
key:
|
|
1036
|
+
default: m(() => [
|
|
1037
|
+
(s(!0), B(W, null, N(x.children, (u) => (s(), B("div", {
|
|
1038
|
+
key: u.id
|
|
1037
1039
|
}, [
|
|
1038
|
-
V(
|
|
1040
|
+
V(g, {
|
|
1039
1041
|
rounded: "lg",
|
|
1040
|
-
title:
|
|
1041
|
-
value:
|
|
1042
|
+
title: u[n.itemTitle],
|
|
1043
|
+
value: u.id
|
|
1042
1044
|
}, {
|
|
1043
|
-
prepend:
|
|
1044
|
-
V(
|
|
1045
|
-
modelValue:
|
|
1046
|
-
"onUpdate:modelValue": (
|
|
1047
|
-
onChange: (
|
|
1045
|
+
prepend: m(() => [
|
|
1046
|
+
V($, {
|
|
1047
|
+
modelValue: u.isSelected,
|
|
1048
|
+
"onUpdate:modelValue": (c) => u.isSelected = c,
|
|
1049
|
+
onChange: (c) => p(u)
|
|
1048
1050
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
1049
1051
|
]),
|
|
1050
1052
|
_: 2
|
|
@@ -1052,11 +1054,11 @@ const Me = /* @__PURE__ */ C({
|
|
|
1052
1054
|
]))), 128))
|
|
1053
1055
|
]),
|
|
1054
1056
|
_: 2
|
|
1055
|
-
}, 1032, ["value"])) : (s(), _(
|
|
1057
|
+
}, 1032, ["value"])) : (s(), _(g, {
|
|
1056
1058
|
key: 0,
|
|
1057
1059
|
rounded: "lg",
|
|
1058
|
-
title:
|
|
1059
|
-
value:
|
|
1060
|
+
title: x[n.itemTitle],
|
|
1061
|
+
value: x.id
|
|
1060
1062
|
}, null, 8, ["title", "value"]))
|
|
1061
1063
|
]))), 128))
|
|
1062
1064
|
]),
|
|
@@ -1069,19 +1071,19 @@ const Me = /* @__PURE__ */ C({
|
|
|
1069
1071
|
}
|
|
1070
1072
|
}), Ze = {
|
|
1071
1073
|
install(t) {
|
|
1072
|
-
t.component("FButton",
|
|
1074
|
+
t.component("FButton", Q), t.component("FTextField", Ve), t.component("FDataTable", Se), t.component("FTextarea", Me), t.component("FAutocomplete", Te), t.component("FCheckbox", Pe), t.component("FCurrencyField", Ie), 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
1075
|
}
|
|
1074
1076
|
};
|
|
1075
1077
|
export {
|
|
1076
1078
|
Te as FAutocomplete,
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1079
|
+
Q as FButton,
|
|
1080
|
+
Pe as FCheckbox,
|
|
1081
|
+
Ie as FCurrencyField,
|
|
1082
|
+
Se as FDataTable,
|
|
1081
1083
|
Be as FDataTableHeaderType,
|
|
1082
1084
|
He as FDatePicker,
|
|
1083
1085
|
je as FDialog,
|
|
1084
|
-
|
|
1086
|
+
Ae as FNumberField,
|
|
1085
1087
|
Ne as FSelect,
|
|
1086
1088
|
Oe as FSwitch,
|
|
1087
1089
|
Ve as FTextField,
|