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