finso-vue-components 0.4.3 → 0.4.4
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.
|
@@ -13,7 +13,11 @@ export interface FAutocompleteProps {
|
|
|
13
13
|
modelValue?: any;
|
|
14
14
|
rules?: string | GenericValidateFunction<any>;
|
|
15
15
|
}
|
|
16
|
-
declare
|
|
16
|
+
declare var __VLS_11: string | number, __VLS_12: any;
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
[K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_component: import("vue").DefineComponent<FAutocompleteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
21
|
change: (value: any) => any;
|
|
18
22
|
}, string, import("vue").PublicProps, Readonly<FAutocompleteProps> & Readonly<{
|
|
19
23
|
onChange?: ((value: any) => any) | undefined;
|
|
@@ -30,4 +34,10 @@ declare const _default: import("vue").DefineComponent<FAutocompleteProps, {}, {}
|
|
|
30
34
|
returnObject: boolean;
|
|
31
35
|
noDataText: string;
|
|
32
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
33
38
|
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -12,7 +12,11 @@ export interface FTextFieldProps {
|
|
|
12
12
|
modelValue?: string;
|
|
13
13
|
rules?: string | GenericValidateFunction<string>;
|
|
14
14
|
}
|
|
15
|
-
declare
|
|
15
|
+
declare var __VLS_11: string | number, __VLS_12: any;
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
[K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<FTextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
20
|
clickAppendInner: () => any;
|
|
17
21
|
}, string, import("vue").PublicProps, Readonly<FTextFieldProps> & Readonly<{
|
|
18
22
|
onClickAppendInner?: (() => any) | undefined;
|
|
@@ -28,4 +32,10 @@ declare const _default: import("vue").DefineComponent<FTextFieldProps, {}, {}, {
|
|
|
28
32
|
modelValue: string;
|
|
29
33
|
rules: string | GenericValidateFunction<string>;
|
|
30
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
31
36
|
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VTextField as
|
|
1
|
+
import { defineComponent as p, resolveComponent as R, openBlock as m, createBlock as f, computed as F, withDirectives as I, unref as o, mergeProps as y, isRef as V, createSlots as B, renderList as _, withCtx as $, renderSlot as D, normalizeProps as T, guardReactiveProps as x, ref as k, watch as N, useModel as j, createElementBlock as A, toDisplayString as w, mergeModels as P } from "vue";
|
|
2
|
+
import { VTextField as C, VDataTable as U, VTextarea as z, VAutocomplete as O, VCheckbox as E, VSelect as L, VNumberInput as W, VSwitch as Y } from "vuetify/components";
|
|
3
3
|
import { vMaska as q } from "maska/vue";
|
|
4
4
|
import { useField as v } from "vee-validate";
|
|
5
|
-
const G = /* @__PURE__ */
|
|
5
|
+
const G = /* @__PURE__ */ p({
|
|
6
6
|
__name: "FButton",
|
|
7
7
|
props: {
|
|
8
8
|
color: { default: "primary" },
|
|
@@ -10,15 +10,15 @@ const G = /* @__PURE__ */ m({
|
|
|
10
10
|
},
|
|
11
11
|
setup(t) {
|
|
12
12
|
const e = t;
|
|
13
|
-
return (
|
|
14
|
-
const a =
|
|
15
|
-
return
|
|
13
|
+
return (s, l) => {
|
|
14
|
+
const a = R("v-btn");
|
|
15
|
+
return m(), f(a, {
|
|
16
16
|
color: e.color,
|
|
17
17
|
rounded: e.rounded
|
|
18
18
|
}, null, 8, ["color", "rounded"]);
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
}), H = /* @__PURE__ */
|
|
21
|
+
}), H = /* @__PURE__ */ p({
|
|
22
22
|
name: "FTextField",
|
|
23
23
|
inheritAttrs: !1,
|
|
24
24
|
__name: "FTextField",
|
|
@@ -37,13 +37,13 @@ const G = /* @__PURE__ */ m({
|
|
|
37
37
|
},
|
|
38
38
|
emits: ["clickAppendInner"],
|
|
39
39
|
setup(t) {
|
|
40
|
-
const e = t,
|
|
40
|
+
const e = t, s = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, s, {
|
|
41
41
|
initialValue: e.modelValue,
|
|
42
42
|
syncVModel: !0
|
|
43
43
|
});
|
|
44
|
-
return (
|
|
44
|
+
return (r, n) => I((m(), f(o(C), y(r.$attrs, {
|
|
45
45
|
modelValue: o(a),
|
|
46
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
46
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => V(a) ? a.value = d : null),
|
|
47
47
|
name: e.name,
|
|
48
48
|
color: e.color,
|
|
49
49
|
density: e.density,
|
|
@@ -53,12 +53,19 @@ const G = /* @__PURE__ */ m({
|
|
|
53
53
|
"hide-details": e.hideDetails,
|
|
54
54
|
"error-messages": o(l),
|
|
55
55
|
"append-inner-icon": e.appendInnerIcon,
|
|
56
|
-
"onClick:appendInner": n[1] || (n[1] = (
|
|
57
|
-
}),
|
|
56
|
+
"onClick:appendInner": n[1] || (n[1] = (d) => r.$emit("clickAppendInner"))
|
|
57
|
+
}), B({ _: 2 }, [
|
|
58
|
+
_(r.$slots, (d, i) => ({
|
|
59
|
+
name: i,
|
|
60
|
+
fn: $((c) => [
|
|
61
|
+
D(r.$slots, i, T(x(c ?? {})))
|
|
62
|
+
])
|
|
63
|
+
}))
|
|
64
|
+
]), 1040, ["modelValue", "name", "color", "density", "rounded", "variant", "clearable", "hide-details", "error-messages", "append-inner-icon"])), [
|
|
58
65
|
[o(q), e.mask]
|
|
59
66
|
]);
|
|
60
67
|
}
|
|
61
|
-
}), J = /* @__PURE__ */
|
|
68
|
+
}), J = /* @__PURE__ */ p({
|
|
62
69
|
name: "FDataTable",
|
|
63
70
|
inheritAttrs: !1,
|
|
64
71
|
__name: "FDataTable",
|
|
@@ -72,7 +79,7 @@ const G = /* @__PURE__ */ m({
|
|
|
72
79
|
density: { default: "default" }
|
|
73
80
|
},
|
|
74
81
|
setup(t) {
|
|
75
|
-
return (e,
|
|
82
|
+
return (e, s) => (m(), f(o(U), y(e.$attrs, {
|
|
76
83
|
headers: t.headers,
|
|
77
84
|
items: t.items,
|
|
78
85
|
loading: t.loading,
|
|
@@ -81,15 +88,15 @@ const G = /* @__PURE__ */ m({
|
|
|
81
88
|
hover: t.hover,
|
|
82
89
|
density: t.density
|
|
83
90
|
}), B({ _: 2 }, [
|
|
84
|
-
|
|
91
|
+
_(e.$slots, (l, a) => ({
|
|
85
92
|
name: a,
|
|
86
|
-
fn:
|
|
87
|
-
|
|
93
|
+
fn: $((r) => [
|
|
94
|
+
D(e.$slots, a, T(x(r ?? {})))
|
|
88
95
|
])
|
|
89
96
|
}))
|
|
90
97
|
]), 1040, ["headers", "items", "loading", "search", "items-per-page", "hover", "density"]));
|
|
91
98
|
}
|
|
92
|
-
}), K = /* @__PURE__ */
|
|
99
|
+
}), K = /* @__PURE__ */ p({
|
|
93
100
|
name: "FTextarea",
|
|
94
101
|
inheritAttrs: !1,
|
|
95
102
|
__name: "FTextarea",
|
|
@@ -107,13 +114,13 @@ const G = /* @__PURE__ */ m({
|
|
|
107
114
|
rules: { type: [String, Function], default: "" }
|
|
108
115
|
},
|
|
109
116
|
setup(t) {
|
|
110
|
-
const e = t,
|
|
117
|
+
const e = t, s = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, s, {
|
|
111
118
|
initialValue: e.modelValue,
|
|
112
119
|
syncVModel: !0
|
|
113
120
|
});
|
|
114
|
-
return (
|
|
121
|
+
return (r, n) => (m(), f(o(z), y(r.$attrs, {
|
|
115
122
|
modelValue: o(a),
|
|
116
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
123
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => V(a) ? a.value = d : null),
|
|
117
124
|
name: e.name,
|
|
118
125
|
rounded: e.rounded,
|
|
119
126
|
variant: e.variant,
|
|
@@ -126,7 +133,7 @@ const G = /* @__PURE__ */ m({
|
|
|
126
133
|
"error-messages": o(l)
|
|
127
134
|
}), null, 16, ["modelValue", "name", "rounded", "variant", "rows", "density", "color", "label", "hide-details", "no-resize", "error-messages"]));
|
|
128
135
|
}
|
|
129
|
-
}), Q = /* @__PURE__ */
|
|
136
|
+
}), Q = /* @__PURE__ */ p({
|
|
130
137
|
name: "FAutocomplete",
|
|
131
138
|
inheritAttrs: !1,
|
|
132
139
|
__name: "FAutocomplete",
|
|
@@ -146,18 +153,18 @@ const G = /* @__PURE__ */ m({
|
|
|
146
153
|
},
|
|
147
154
|
emits: ["change"],
|
|
148
155
|
setup(t, { emit: e }) {
|
|
149
|
-
const
|
|
156
|
+
const s = e, l = t, a = F(() => l.rules), { errorMessage: r, value: n } = v(() => l.name, a, {
|
|
150
157
|
initialValue: l.modelValue,
|
|
151
158
|
syncVModel: !0
|
|
152
159
|
});
|
|
153
|
-
function
|
|
154
|
-
|
|
160
|
+
function d(i) {
|
|
161
|
+
s("change", i);
|
|
155
162
|
}
|
|
156
|
-
return (
|
|
163
|
+
return (i, c) => (m(), f(o(O), y(i.$attrs, {
|
|
157
164
|
modelValue: o(n),
|
|
158
165
|
"onUpdate:modelValue": [
|
|
159
|
-
c[0] || (c[0] = (
|
|
160
|
-
c[1] || (c[1] = (
|
|
166
|
+
c[0] || (c[0] = (b) => V(n) ? n.value = b : null),
|
|
167
|
+
c[1] || (c[1] = (b) => d(o(n)))
|
|
161
168
|
],
|
|
162
169
|
name: l.name,
|
|
163
170
|
items: l.items,
|
|
@@ -169,11 +176,18 @@ const G = /* @__PURE__ */ m({
|
|
|
169
176
|
"hide-details": l.hideDetails,
|
|
170
177
|
"return-object": l.returnObject,
|
|
171
178
|
"no-data-text": l.noDataText,
|
|
172
|
-
"error-messages": o(
|
|
179
|
+
"error-messages": o(r),
|
|
173
180
|
"menu-props": { maxWidth: 0 }
|
|
174
|
-
}),
|
|
181
|
+
}), B({ _: 2 }, [
|
|
182
|
+
_(i.$slots, (b, S) => ({
|
|
183
|
+
name: S,
|
|
184
|
+
fn: $((M) => [
|
|
185
|
+
D(i.$slots, S, T(x(M ?? {})))
|
|
186
|
+
])
|
|
187
|
+
}))
|
|
188
|
+
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "clearable", "hide-details", "return-object", "no-data-text", "error-messages"]));
|
|
175
189
|
}
|
|
176
|
-
}), X = /* @__PURE__ */
|
|
190
|
+
}), X = /* @__PURE__ */ p({
|
|
177
191
|
name: "FCheckbox",
|
|
178
192
|
inheritAttrs: !1,
|
|
179
193
|
__name: "FCheckbox",
|
|
@@ -185,14 +199,14 @@ const G = /* @__PURE__ */ m({
|
|
|
185
199
|
},
|
|
186
200
|
setup(t) {
|
|
187
201
|
const e = t;
|
|
188
|
-
return (
|
|
202
|
+
return (s, l) => (m(), f(o(E), y(s.$attrs, {
|
|
189
203
|
color: e.color,
|
|
190
204
|
"hide-details": e.hideDetails,
|
|
191
205
|
indeterminate: e.indeterminate,
|
|
192
206
|
density: e.density
|
|
193
207
|
}), null, 16, ["color", "hide-details", "indeterminate", "density"]));
|
|
194
208
|
}
|
|
195
|
-
}), Z = /* @__PURE__ */
|
|
209
|
+
}), Z = /* @__PURE__ */ p({
|
|
196
210
|
name: "FCurrencyField",
|
|
197
211
|
inheritAttrs: !1,
|
|
198
212
|
__name: "FCurrencyField",
|
|
@@ -212,40 +226,40 @@ const G = /* @__PURE__ */ m({
|
|
|
212
226
|
rules: { type: [String, Function], default: "" }
|
|
213
227
|
},
|
|
214
228
|
setup(t) {
|
|
215
|
-
const e = t,
|
|
229
|
+
const e = t, s = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, s, {
|
|
216
230
|
initialValue: e.modelValue,
|
|
217
231
|
syncVModel: !0
|
|
218
|
-
}),
|
|
232
|
+
}), r = F(
|
|
219
233
|
() => new Intl.NumberFormat(e.locale, {
|
|
220
234
|
style: "currency",
|
|
221
235
|
currency: e.currency,
|
|
222
236
|
minimumFractionDigits: e.precision,
|
|
223
237
|
maximumFractionDigits: e.precision
|
|
224
238
|
})
|
|
225
|
-
), n =
|
|
226
|
-
function
|
|
227
|
-
return u == null || isNaN(u) ? "" :
|
|
239
|
+
), n = k(d(e.modelValue));
|
|
240
|
+
function d(u) {
|
|
241
|
+
return u == null || isNaN(u) ? "" : r.value.format(u);
|
|
228
242
|
}
|
|
229
|
-
function
|
|
230
|
-
const h = u.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."),
|
|
231
|
-
return isNaN(
|
|
243
|
+
function i(u) {
|
|
244
|
+
const h = u.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."), g = parseFloat(h);
|
|
245
|
+
return isNaN(g) ? null : Math.round(g * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
|
|
232
246
|
}
|
|
233
|
-
const c =
|
|
234
|
-
function
|
|
247
|
+
const c = k(!1);
|
|
248
|
+
function b(u) {
|
|
235
249
|
const h = u.target;
|
|
236
|
-
n.value = h.value, a.value =
|
|
250
|
+
n.value = h.value, a.value = i(h.value);
|
|
237
251
|
}
|
|
238
|
-
function
|
|
239
|
-
c.value = !1, n.value =
|
|
252
|
+
function S() {
|
|
253
|
+
c.value = !1, n.value = d(a.value);
|
|
240
254
|
}
|
|
241
|
-
function
|
|
255
|
+
function M(u) {
|
|
242
256
|
c.value = !0;
|
|
243
|
-
const h = u.target,
|
|
244
|
-
|
|
257
|
+
const h = u.target, g = a.value;
|
|
258
|
+
g != null ? n.value = g.toFixed(e.precision).replace(".", ",") : n.value = "", setTimeout(() => h.select(), 0);
|
|
245
259
|
}
|
|
246
|
-
return
|
|
247
|
-
a.value = u, c.value || (n.value =
|
|
248
|
-
}), (u, h) => (
|
|
260
|
+
return N(() => e.modelValue, (u) => {
|
|
261
|
+
a.value = u, c.value || (n.value = d(u));
|
|
262
|
+
}), (u, h) => (m(), f(o(C), y(u.$attrs, {
|
|
249
263
|
"model-value": n.value,
|
|
250
264
|
name: e.name,
|
|
251
265
|
label: e.label,
|
|
@@ -257,12 +271,12 @@ const G = /* @__PURE__ */ m({
|
|
|
257
271
|
color: e.color,
|
|
258
272
|
"error-messages": o(l),
|
|
259
273
|
inputmode: "decimal",
|
|
260
|
-
onInput:
|
|
261
|
-
onBlur:
|
|
262
|
-
onFocus:
|
|
274
|
+
onInput: b,
|
|
275
|
+
onBlur: S,
|
|
276
|
+
onFocus: M
|
|
263
277
|
}), null, 16, ["model-value", "name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]));
|
|
264
278
|
}
|
|
265
|
-
}), ee = /* @__PURE__ */
|
|
279
|
+
}), ee = /* @__PURE__ */ p({
|
|
266
280
|
name: "FSelect",
|
|
267
281
|
inheritAttrs: !1,
|
|
268
282
|
__name: "FSelect",
|
|
@@ -279,13 +293,13 @@ const G = /* @__PURE__ */ m({
|
|
|
279
293
|
rules: { type: [String, Function], default: "" }
|
|
280
294
|
},
|
|
281
295
|
setup(t) {
|
|
282
|
-
const e = t,
|
|
296
|
+
const e = t, s = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, s, {
|
|
283
297
|
initialValue: e.modelValue,
|
|
284
298
|
syncVModel: !0
|
|
285
299
|
});
|
|
286
|
-
return (
|
|
300
|
+
return (r, n) => (m(), f(o(L), y(r.$attrs, {
|
|
287
301
|
modelValue: o(a),
|
|
288
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
302
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => V(a) ? a.value = d : null),
|
|
289
303
|
name: e.name,
|
|
290
304
|
items: e.items,
|
|
291
305
|
rounded: e.rounded,
|
|
@@ -296,15 +310,15 @@ const G = /* @__PURE__ */ m({
|
|
|
296
310
|
"return-object": e.returnObject,
|
|
297
311
|
"error-messages": o(l)
|
|
298
312
|
}), B({ _: 2 }, [
|
|
299
|
-
|
|
300
|
-
name:
|
|
301
|
-
fn:
|
|
302
|
-
|
|
313
|
+
_(r.$slots, (d, i) => ({
|
|
314
|
+
name: i,
|
|
315
|
+
fn: $((c) => [
|
|
316
|
+
D(r.$slots, i, T(x(c ?? {})))
|
|
303
317
|
])
|
|
304
318
|
}))
|
|
305
319
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "hide-details", "return-object", "error-messages"]));
|
|
306
320
|
}
|
|
307
|
-
}), te = /* @__PURE__ */
|
|
321
|
+
}), te = /* @__PURE__ */ p({
|
|
308
322
|
name: "FNumberField",
|
|
309
323
|
inheritAttrs: !1,
|
|
310
324
|
__name: "FNumberField",
|
|
@@ -328,13 +342,13 @@ const G = /* @__PURE__ */ m({
|
|
|
328
342
|
rules: { type: [String, Function], default: "" }
|
|
329
343
|
},
|
|
330
344
|
setup(t) {
|
|
331
|
-
const e = t,
|
|
345
|
+
const e = t, s = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, s, {
|
|
332
346
|
initialValue: e.modelValue,
|
|
333
347
|
syncVModel: !0
|
|
334
348
|
});
|
|
335
|
-
return (
|
|
349
|
+
return (r, n) => (m(), f(o(W), y(r.$attrs, {
|
|
336
350
|
modelValue: o(a),
|
|
337
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
351
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => V(a) ? a.value = d : null),
|
|
338
352
|
name: e.name,
|
|
339
353
|
color: e.color,
|
|
340
354
|
density: e.density,
|
|
@@ -353,7 +367,7 @@ const G = /* @__PURE__ */ m({
|
|
|
353
367
|
"error-messages": o(l)
|
|
354
368
|
}), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "control-variant", "hide-details", "placeholder", "label", "prefix", "disabled", "readonly", "min", "precision", "inset", "error-messages"]));
|
|
355
369
|
}
|
|
356
|
-
}), ae = { key: 0 }, le = { key: 1 }, ne = /* @__PURE__ */
|
|
370
|
+
}), ae = { key: 0 }, le = { key: 1 }, ne = /* @__PURE__ */ p({
|
|
357
371
|
name: "FSwitch",
|
|
358
372
|
inheritAttrs: !1,
|
|
359
373
|
__name: "FSwitch",
|
|
@@ -369,18 +383,18 @@ const G = /* @__PURE__ */ m({
|
|
|
369
383
|
}),
|
|
370
384
|
emits: ["update:modelValue"],
|
|
371
385
|
setup(t) {
|
|
372
|
-
const e = t,
|
|
373
|
-
return (l, a) => (
|
|
374
|
-
modelValue:
|
|
375
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
386
|
+
const e = t, s = j(t, "modelValue");
|
|
387
|
+
return (l, a) => (m(), f(o(Y), y(l.$attrs, {
|
|
388
|
+
modelValue: s.value,
|
|
389
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
|
|
376
390
|
color: e.color,
|
|
377
391
|
"hide-details": e.hideDetails,
|
|
378
392
|
density: e.density
|
|
379
393
|
}), B({ _: 2 }, [
|
|
380
394
|
e.labelTrue || e.labelFalse ? {
|
|
381
395
|
name: "label",
|
|
382
|
-
fn:
|
|
383
|
-
|
|
396
|
+
fn: $(() => [
|
|
397
|
+
s.value ? (m(), A("span", ae, w(e.labelTrue), 1)) : (m(), A("span", le, w(e.labelFalse), 1))
|
|
384
398
|
]),
|
|
385
399
|
key: "0"
|
|
386
400
|
} : void 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vuetify/components"),require("maska/vue"),require("vee-validate")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components","maska/vue","vee-validate"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.FinsoVueComponents={},r.Vue,r.VuetifyComponents,r.MaskaVue,r.VeeValidate))})(this,(function(r,e,m,$,y){"use strict";const g=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(n){const t=n;return(d,l)=>{const a=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(a,{color:t.color,rounded:t.rounded},null,8,["color","rounded"])}}}),V=e.defineComponent({name:"FTextField",inheritAttrs:!1,__name:"FTextField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},appendInnerIcon:{default:""},mask:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},emits:["clickAppendInner"],setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0});return(i,o)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(m.VTextField),e.mergeProps(i.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,clearable:t.clearable,"hide-details":t.hideDetails,"error-messages":e.unref(l),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":o[1]||(o[1]=s=>i.$emit("clickAppendInner"))}),null,16,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref($.vMaska),t.mask]])}}),b=e.defineComponent({name:"FDataTable",inheritAttrs:!1,__name:"FDataTable",props:{headers:{},items:{},loading:{type:Boolean,default:!1},search:{default:""},itemsPerPage:{default:10},hover:{type:Boolean,default:!0},density:{default:"default"}},setup(n){return(t,d)=>(e.openBlock(),e.createBlock(e.unref(m.VDataTable),e.mergeProps(t.$attrs,{headers:n.headers,items:n.items,loading:n.loading,search:n.search,"items-per-page":n.itemsPerPage,hover:n.hover,density:n.density}),e.createSlots({_:2},[e.renderList(t.$slots,(l,a)=>({name:a,fn:e.withCtx(i=>[e.renderSlot(t.$slots,a,e.normalizeProps(e.guardReactiveProps(i??{})))])}))]),1040,["headers","items","loading","search","items-per-page","hover","density"]))}}),B=e.defineComponent({name:"FTextarea",inheritAttrs:!1,__name:"FTextarea",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},label:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},noResize:{type:Boolean,default:!0},rows:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0});return(i,o)=>(e.openBlock(),e.createBlock(e.unref(m.VTextarea),e.mergeProps(i.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,rounded:t.rounded,variant:t.variant,rows:t.rows,density:t.density,color:t.color,label:t.label,"hide-details":t.hideDetails,"no-resize":t.noResize,"error-messages":e.unref(l)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),k=e.defineComponent({name:"FAutocomplete",inheritAttrs:!1,__name:"FAutocomplete",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!0},noDataText:{default:""},modelValue:{default:null},rules:{type:[String,Function],default:""}},emits:["change"],setup(n,{emit:t}){const d=t,l=n,a=e.computed(()=>l.rules),{errorMessage:i,value:o}=y.useField(()=>l.name,a,{initialValue:l.modelValue,syncVModel:!0});function s(f){d("change",f)}return(f,c)=>(e.openBlock(),e.createBlock(e.unref(m.VAutocomplete),e.mergeProps(f.$attrs,{modelValue:e.unref(o),"onUpdate:modelValue":[c[0]||(c[0]=F=>e.isRef(o)?o.value=F:null),c[1]||(c[1]=F=>s(e.unref(o)))],name:l.name,items:l.items,rounded:l.rounded,variant:l.variant,density:l.density,color:l.color,clearable:l.clearable,"hide-details":l.hideDetails,"return-object":l.returnObject,"no-data-text":l.noDataText,"error-messages":e.unref(i),"menu-props":{maxWidth:0}}),null,16,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),S=e.defineComponent({name:"FCheckbox",inheritAttrs:!1,__name:"FCheckbox",props:{color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},indeterminate:{type:Boolean,default:!1},density:{default:"compact"}},setup(n){const t=n;return(d,l)=>(e.openBlock(),e.createBlock(e.unref(m.VCheckbox),e.mergeProps(d.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),_=e.defineComponent({name:"FCurrencyField",inheritAttrs:!1,__name:"FCurrencyField",props:{name:{},label:{default:""},readonly:{type:Boolean,default:!1},hideDetails:{type:[Boolean,String],default:"auto"},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},locale:{default:"tr-TR"},currency:{default:"TRY"},precision:{default:2},modelValue:{default:null},rules:{type:[String,Function],default:""}},setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0}),i=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),o=e.ref(s(t.modelValue));function s(u){return u==null||isNaN(u)?"":i.value.format(u)}function f(u){const p=u.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),h=parseFloat(p);return isNaN(h)?null:Math.round(h*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const c=e.ref(!1);function F(u){const p=u.target;o.value=p.value,a.value=f(p.value)}function w(){c.value=!1,o.value=s(a.value)}function R(u){c.value=!0;const p=u.target,h=a.value;h!=null?o.value=h.toFixed(t.precision).replace(".",","):o.value="",setTimeout(()=>p.select(),0)}return e.watch(()=>t.modelValue,u=>{a.value=u,c.value||(o.value=s(u))}),(u,p)=>(e.openBlock(),e.createBlock(e.unref(m.VTextField),e.mergeProps(u.$attrs,{"model-value":o.value,name:t.name,label:t.label,readonly:t.readonly,"hide-details":t.hideDetails,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"error-messages":e.unref(l),inputmode:"decimal",onInput:F,onBlur:w,onFocus:R}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),D=e.defineComponent({name:"FSelect",inheritAttrs:!1,__name:"FSelect",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0});return(i,o)=>(e.openBlock(),e.createBlock(e.unref(m.VSelect),e.mergeProps(i.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,items:t.items,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"hide-details":t.hideDetails,"return-object":t.returnObject,"error-messages":e.unref(l)}),e.createSlots({_:2},[e.renderList(i.$slots,(s,f)=>({name:f,fn:e.withCtx(c=>[e.renderSlot(i.$slots,f,e.normalizeProps(e.guardReactiveProps(c??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),C=e.defineComponent({name:"FNumberField",inheritAttrs:!1,__name:"FNumberField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},controlVariant:{default:"stacked"},color:{default:"secondary"},label:{default:""},placeholder:{default:""},prefix:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},min:{default:0},precision:{default:0},inset:{type:Boolean,default:!0},modelValue:{default:-1},rules:{type:[String,Function],default:""}},setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0});return(i,o)=>(e.openBlock(),e.createBlock(e.unref(m.VNumberInput),e.mergeProps(i.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,"control-variant":t.controlVariant,"hide-details":t.hideDetails,placeholder:t.placeholder,label:t.label,prefix:t.prefix,disabled:t.disabled,readonly:t.readonly,min:t.min,precision:t.precision,inset:t.inset,"error-messages":e.unref(l)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),M={key:0},x={key:1},T=e.defineComponent({name:"FSwitch",inheritAttrs:!1,__name:"FSwitch",props:e.mergeModels({color:{default:"secondary"},density:{default:"comfortable"},hideDetails:{type:[Boolean,String],default:"auto"},labelTrue:{default:""},labelFalse:{default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,d=e.useModel(n,"modelValue");return(l,a)=>(e.openBlock(),e.createBlock(e.unref(m.VSwitch),e.mergeProps(l.$attrs,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=i=>d.value=i),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",x,e.toDisplayString(t.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),P={install(n){n.component("FButton",g),n.component("FTextField",V),n.component("FDataTable",b),n.component("FTextarea",B),n.component("FAutocomplete",k),n.component("FCheckbox",S),n.component("FCurrencyField",_),n.component("FSelect",D),n.component("FNumberField",C),n.component("FSwitch",T)}};r.FAutocomplete=k,r.FButton=g,r.FCheckbox=S,r.FCurrencyField=_,r.FDataTable=b,r.FNumberField=C,r.FSelect=D,r.FSwitch=T,r.FTextField=V,r.FTextarea=B,r.default=P,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vuetify/components"),require("maska/vue"),require("vee-validate")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components","maska/vue","vee-validate"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.FinsoVueComponents={},r.Vue,r.VuetifyComponents,r.MaskaVue,r.VeeValidate))})(this,(function(r,e,f,P,y){"use strict";const b=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(n){const t=n;return(i,l)=>{const a=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(a,{color:t.color,rounded:t.rounded},null,8,["color","rounded"])}}}),B=e.defineComponent({name:"FTextField",inheritAttrs:!1,__name:"FTextField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},appendInnerIcon:{default:""},mask:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},emits:["clickAppendInner"],setup(n){const t=n,i=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,i,{initialValue:t.modelValue,syncVModel:!0});return(d,o)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(f.VTextField),e.mergeProps(d.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,clearable:t.clearable,"hide-details":t.hideDetails,"error-messages":e.unref(l),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":o[1]||(o[1]=s=>d.$emit("clickAppendInner"))}),e.createSlots({_:2},[e.renderList(d.$slots,(s,c)=>({name:c,fn:e.withCtx(m=>[e.renderSlot(d.$slots,c,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(P.vMaska),t.mask]])}}),k=e.defineComponent({name:"FDataTable",inheritAttrs:!1,__name:"FDataTable",props:{headers:{},items:{},loading:{type:Boolean,default:!1},search:{default:""},itemsPerPage:{default:10},hover:{type:Boolean,default:!0},density:{default:"default"}},setup(n){return(t,i)=>(e.openBlock(),e.createBlock(e.unref(f.VDataTable),e.mergeProps(t.$attrs,{headers:n.headers,items:n.items,loading:n.loading,search:n.search,"items-per-page":n.itemsPerPage,hover:n.hover,density:n.density}),e.createSlots({_:2},[e.renderList(t.$slots,(l,a)=>({name:a,fn:e.withCtx(d=>[e.renderSlot(t.$slots,a,e.normalizeProps(e.guardReactiveProps(d??{})))])}))]),1040,["headers","items","loading","search","items-per-page","hover","density"]))}}),S=e.defineComponent({name:"FTextarea",inheritAttrs:!1,__name:"FTextarea",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},label:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},noResize:{type:Boolean,default:!0},rows:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(n){const t=n,i=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,i,{initialValue:t.modelValue,syncVModel:!0});return(d,o)=>(e.openBlock(),e.createBlock(e.unref(f.VTextarea),e.mergeProps(d.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,rounded:t.rounded,variant:t.variant,rows:t.rows,density:t.density,color:t.color,label:t.label,"hide-details":t.hideDetails,"no-resize":t.noResize,"error-messages":e.unref(l)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),_=e.defineComponent({name:"FAutocomplete",inheritAttrs:!1,__name:"FAutocomplete",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!0},noDataText:{default:""},modelValue:{default:null},rules:{type:[String,Function],default:""}},emits:["change"],setup(n,{emit:t}){const i=t,l=n,a=e.computed(()=>l.rules),{errorMessage:d,value:o}=y.useField(()=>l.name,a,{initialValue:l.modelValue,syncVModel:!0});function s(c){i("change",c)}return(c,m)=>(e.openBlock(),e.createBlock(e.unref(f.VAutocomplete),e.mergeProps(c.$attrs,{modelValue:e.unref(o),"onUpdate:modelValue":[m[0]||(m[0]=h=>e.isRef(o)?o.value=h:null),m[1]||(m[1]=h=>s(e.unref(o)))],name:l.name,items:l.items,rounded:l.rounded,variant:l.variant,density:l.density,color:l.color,clearable:l.clearable,"hide-details":l.hideDetails,"return-object":l.returnObject,"no-data-text":l.noDataText,"error-messages":e.unref(d),"menu-props":{maxWidth:0}}),e.createSlots({_:2},[e.renderList(c.$slots,(h,g)=>({name:g,fn:e.withCtx(V=>[e.renderSlot(c.$slots,g,e.normalizeProps(e.guardReactiveProps(V??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),C=e.defineComponent({name:"FCheckbox",inheritAttrs:!1,__name:"FCheckbox",props:{color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},indeterminate:{type:Boolean,default:!1},density:{default:"compact"}},setup(n){const t=n;return(i,l)=>(e.openBlock(),e.createBlock(e.unref(f.VCheckbox),e.mergeProps(i.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),$=e.defineComponent({name:"FCurrencyField",inheritAttrs:!1,__name:"FCurrencyField",props:{name:{},label:{default:""},readonly:{type:Boolean,default:!1},hideDetails:{type:[Boolean,String],default:"auto"},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},locale:{default:"tr-TR"},currency:{default:"TRY"},precision:{default:2},modelValue:{default:null},rules:{type:[String,Function],default:""}},setup(n){const t=n,i=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,i,{initialValue:t.modelValue,syncVModel:!0}),d=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),o=e.ref(s(t.modelValue));function s(u){return u==null||isNaN(u)?"":d.value.format(u)}function c(u){const p=u.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),F=parseFloat(p);return isNaN(F)?null:Math.round(F*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const m=e.ref(!1);function h(u){const p=u.target;o.value=p.value,a.value=c(p.value)}function g(){m.value=!1,o.value=s(a.value)}function V(u){m.value=!0;const p=u.target,F=a.value;F!=null?o.value=F.toFixed(t.precision).replace(".",","):o.value="",setTimeout(()=>p.select(),0)}return e.watch(()=>t.modelValue,u=>{a.value=u,m.value||(o.value=s(u))}),(u,p)=>(e.openBlock(),e.createBlock(e.unref(f.VTextField),e.mergeProps(u.$attrs,{"model-value":o.value,name:t.name,label:t.label,readonly:t.readonly,"hide-details":t.hideDetails,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"error-messages":e.unref(l),inputmode:"decimal",onInput:h,onBlur:g,onFocus:V}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),D=e.defineComponent({name:"FSelect",inheritAttrs:!1,__name:"FSelect",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(n){const t=n,i=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,i,{initialValue:t.modelValue,syncVModel:!0});return(d,o)=>(e.openBlock(),e.createBlock(e.unref(f.VSelect),e.mergeProps(d.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,items:t.items,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"hide-details":t.hideDetails,"return-object":t.returnObject,"error-messages":e.unref(l)}),e.createSlots({_:2},[e.renderList(d.$slots,(s,c)=>({name:c,fn:e.withCtx(m=>[e.renderSlot(d.$slots,c,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),T=e.defineComponent({name:"FNumberField",inheritAttrs:!1,__name:"FNumberField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},controlVariant:{default:"stacked"},color:{default:"secondary"},label:{default:""},placeholder:{default:""},prefix:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},min:{default:0},precision:{default:0},inset:{type:Boolean,default:!0},modelValue:{default:-1},rules:{type:[String,Function],default:""}},setup(n){const t=n,i=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,i,{initialValue:t.modelValue,syncVModel:!0});return(d,o)=>(e.openBlock(),e.createBlock(e.unref(f.VNumberInput),e.mergeProps(d.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,"control-variant":t.controlVariant,"hide-details":t.hideDetails,placeholder:t.placeholder,label:t.label,prefix:t.prefix,disabled:t.disabled,readonly:t.readonly,min:t.min,precision:t.precision,inset:t.inset,"error-messages":e.unref(l)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),w={key:0},R={key:1},M=e.defineComponent({name:"FSwitch",inheritAttrs:!1,__name:"FSwitch",props:e.mergeModels({color:{default:"secondary"},density:{default:"comfortable"},hideDetails:{type:[Boolean,String],default:"auto"},labelTrue:{default:""},labelFalse:{default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,i=e.useModel(n,"modelValue");return(l,a)=>(e.openBlock(),e.createBlock(e.unref(f.VSwitch),e.mergeProps(l.$attrs,{modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=d=>i.value=d),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("span",w,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",R,e.toDisplayString(t.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),x={install(n){n.component("FButton",b),n.component("FTextField",B),n.component("FDataTable",k),n.component("FTextarea",S),n.component("FAutocomplete",_),n.component("FCheckbox",C),n.component("FCurrencyField",$),n.component("FSelect",D),n.component("FNumberField",T),n.component("FSwitch",M)}};r.FAutocomplete=_,r.FButton=b,r.FCheckbox=C,r.FCurrencyField=$,r.FDataTable=k,r.FNumberField=T,r.FSelect=D,r.FSwitch=M,r.FTextField=B,r.FTextarea=S,r.default=x,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|