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