finso-vue-components 0.4.27 → 0.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as C, resolveComponent as y, openBlock as s, createBlock as b, computed as S, withDirectives as ue, unref as V, mergeProps as w, isRef as j, createSlots as H, renderList as N, withCtx as m, renderSlot as A, normalizeProps as G, guardReactiveProps as K, useModel as L, ref as P, watch as le, createElementBlock as B, resolveDynamicComponent as ce, toHandlers as me, toDisplayString as T, createTextVNode as E, createElementVNode as O, createCommentVNode as X, withModifiers as q, createVNode as k, mergeModels as Y,
|
|
2
|
-
import { VTextField as ae, VTextarea as
|
|
3
|
-
import { vMaska as
|
|
1
|
+
import { defineComponent as C, resolveComponent as y, openBlock as s, createBlock as b, computed as S, withDirectives as ue, unref as V, mergeProps as w, isRef as j, createSlots as H, renderList as N, withCtx as m, renderSlot as A, normalizeProps as G, guardReactiveProps as K, useModel as L, ref as P, watch as le, createElementBlock as B, resolveDynamicComponent as ce, toHandlers as me, toDisplayString as T, createTextVNode as E, createElementVNode as O, createCommentVNode as X, withModifiers as q, createVNode as k, mergeModels as Y, onMounted as fe, Fragment as W } from "vue";
|
|
2
|
+
import { VTextField as ae, VTextarea as pe, VAutocomplete as ve, VCheckbox as ye, VSelect as ge, VNumberInput as be, VSwitch as _e } from "vuetify/components";
|
|
3
|
+
import { vMaska as he } from "maska/vue";
|
|
4
4
|
import { useField as R } from "vee-validate";
|
|
5
5
|
const J = /* @__PURE__ */ C({
|
|
6
6
|
__name: "FButton",
|
|
@@ -18,7 +18,7 @@ const J = /* @__PURE__ */ C({
|
|
|
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",
|
|
@@ -62,16 +62,16 @@ const J = /* @__PURE__ */ C({
|
|
|
62
62
|
])
|
|
63
63
|
}))
|
|
64
64
|
]), 1040, ["modelValue", "name", "color", "density", "rounded", "variant", "clearable", "hide-details", "error-messages", "append-inner-icon"])), [
|
|
65
|
-
[V(
|
|
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
|
+
}, xe = { key: 2 }, De = { key: 5 }, $e = { class: "f-data-table__actions" }, we = { class: "text-h6" }, Ce = /* @__PURE__ */ C({
|
|
75
75
|
name: "FDataTable",
|
|
76
76
|
inheritAttrs: !1,
|
|
77
77
|
__name: "FDataTable",
|
|
@@ -195,7 +195,7 @@ const J = /* @__PURE__ */ C({
|
|
|
195
195
|
class: "f-data-table__logo"
|
|
196
196
|
}, {
|
|
197
197
|
error: m(() => [
|
|
198
|
-
f.imageInitialsKey ? (s(), B("span",
|
|
198
|
+
f.imageInitialsKey ? (s(), B("span", ke, T(F(D, f.imageInitialsKey)), 1)) : (s(), b(M, {
|
|
199
199
|
key: 1,
|
|
200
200
|
color: "white"
|
|
201
201
|
}, {
|
|
@@ -206,7 +206,7 @@ const J = /* @__PURE__ */ C({
|
|
|
206
206
|
}))
|
|
207
207
|
]),
|
|
208
208
|
_: 2
|
|
209
|
-
}, 1032, ["src"])) : f.imageInitialsKey ? (s(), B("span",
|
|
209
|
+
}, 1032, ["src"])) : f.imageInitialsKey ? (s(), B("span", Fe, T(F(D, f.imageInitialsKey)), 1)) : (s(), b(M, {
|
|
210
210
|
key: 2,
|
|
211
211
|
color: "white"
|
|
212
212
|
}, {
|
|
@@ -238,7 +238,7 @@ const J = /* @__PURE__ */ C({
|
|
|
238
238
|
}, 8, ["src"])) : X("", !0)
|
|
239
239
|
]),
|
|
240
240
|
_: 2
|
|
241
|
-
}, 1024)) : f.type === "money" ? (s(), B("span",
|
|
241
|
+
}, 1024)) : f.type === "money" ? (s(), B("span", xe, T(d(i(D, f.key))), 1)) : f.type === "status" ? (s(), b(ne, {
|
|
242
242
|
key: 3,
|
|
243
243
|
color: i(D, f.key) ? "green-darken-1" : "red-darken-2",
|
|
244
244
|
size: "small"
|
|
@@ -255,7 +255,7 @@ const J = /* @__PURE__ */ C({
|
|
|
255
255
|
E(T(i(D, f.key) ? "mdi-check" : "mdi-close"), 1)
|
|
256
256
|
]),
|
|
257
257
|
_: 2
|
|
258
|
-
}, 1032, ["color"])) : f.type === "gsmNo" ? (s(), B("span",
|
|
258
|
+
}, 1032, ["color"])) : f.type === "gsmNo" ? (s(), B("span", De, T(a(i(D, f.key))), 1)) : X("", !0)
|
|
259
259
|
], !0)
|
|
260
260
|
])
|
|
261
261
|
})),
|
|
@@ -263,7 +263,7 @@ const J = /* @__PURE__ */ C({
|
|
|
263
263
|
name: "item.actions",
|
|
264
264
|
fn: m(({ item: f }) => [
|
|
265
265
|
A(u.$slots, "item.actions", { item: f }, () => [
|
|
266
|
-
O("div",
|
|
266
|
+
O("div", $e, [
|
|
267
267
|
t.canEditRecord || t.canReadRecord ? (s(), b(ee, {
|
|
268
268
|
key: 0,
|
|
269
269
|
size: "small",
|
|
@@ -299,7 +299,7 @@ const J = /* @__PURE__ */ C({
|
|
|
299
299
|
"hide-close": !0
|
|
300
300
|
}, {
|
|
301
301
|
header: m(() => [
|
|
302
|
-
O("div",
|
|
302
|
+
O("div", we, T(t.labelDeleteTitle), 1)
|
|
303
303
|
]),
|
|
304
304
|
default: m(() => [
|
|
305
305
|
k(oe, null, {
|
|
@@ -337,9 +337,9 @@ const J = /* @__PURE__ */ C({
|
|
|
337
337
|
for (const [r, l] of e)
|
|
338
338
|
n[r] = l;
|
|
339
339
|
return n;
|
|
340
|
-
},
|
|
341
|
-
var
|
|
342
|
-
const
|
|
340
|
+
}, Se = /* @__PURE__ */ Q(Ce, [["__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",
|
|
@@ -361,7 +361,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
361
361
|
initialValue: e.modelValue,
|
|
362
362
|
syncVModel: !0
|
|
363
363
|
});
|
|
364
|
-
return (p, o) => (s(), b(V(
|
|
364
|
+
return (p, o) => (s(), b(V(pe), w(p.$attrs, {
|
|
365
365
|
modelValue: V(l),
|
|
366
366
|
"onUpdate:modelValue": o[0] || (o[0] = (v) => j(l) ? l.value = v : null),
|
|
367
367
|
name: e.name,
|
|
@@ -376,7 +376,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
376
376
|
"error-messages": V(r)
|
|
377
377
|
}), null, 16, ["modelValue", "name", "rounded", "variant", "rows", "density", "color", "label", "hide-details", "no-resize", "error-messages"]));
|
|
378
378
|
}
|
|
379
|
-
}),
|
|
379
|
+
}), Te = /* @__PURE__ */ C({
|
|
380
380
|
name: "FAutocomplete",
|
|
381
381
|
inheritAttrs: !1,
|
|
382
382
|
__name: "FAutocomplete",
|
|
@@ -403,7 +403,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
403
403
|
function v(g) {
|
|
404
404
|
n("change", g);
|
|
405
405
|
}
|
|
406
|
-
return (g, i) => (s(), b(V(
|
|
406
|
+
return (g, i) => (s(), b(V(ve), w(g.$attrs, {
|
|
407
407
|
modelValue: V(o),
|
|
408
408
|
"onUpdate:modelValue": [
|
|
409
409
|
i[0] || (i[0] = (d) => j(o) ? o.value = d : null),
|
|
@@ -430,7 +430,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
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, r) => (s(), b(V(
|
|
445
|
+
return (n, r) => (s(), b(V(ye), w(n.$attrs, {
|
|
446
446
|
color: e.color,
|
|
447
447
|
"hide-details": e.hideDetails,
|
|
448
448
|
indeterminate: e.indeterminate,
|
|
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",
|
|
@@ -490,9 +490,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
490
490
|
const i = P(!1);
|
|
491
491
|
function d(_) {
|
|
492
492
|
const $ = _.target;
|
|
493
|
-
o.value = $.value,
|
|
494
|
-
l.value = g($.value);
|
|
495
|
-
});
|
|
493
|
+
o.value = $.value, l.value = g($.value);
|
|
496
494
|
}
|
|
497
495
|
function a() {
|
|
498
496
|
i.value = !1, o.value = v(l.value);
|
|
@@ -521,7 +519,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
521
519
|
onFocus: F
|
|
522
520
|
}), null, 16, ["model-value", "name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]));
|
|
523
521
|
}
|
|
524
|
-
}),
|
|
522
|
+
}), Ne = /* @__PURE__ */ C({
|
|
525
523
|
name: "FSelect",
|
|
526
524
|
inheritAttrs: !1,
|
|
527
525
|
__name: "FSelect",
|
|
@@ -542,7 +540,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
542
540
|
initialValue: e.modelValue,
|
|
543
541
|
syncVModel: !0
|
|
544
542
|
});
|
|
545
|
-
return (p, o) => (s(), b(V(
|
|
543
|
+
return (p, o) => (s(), b(V(ge), w(p.$attrs, {
|
|
546
544
|
modelValue: V(l),
|
|
547
545
|
"onUpdate:modelValue": o[0] || (o[0] = (v) => j(l) ? l.value = v : null),
|
|
548
546
|
name: e.name,
|
|
@@ -563,7 +561,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
563
561
|
}))
|
|
564
562
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "hide-details", "return-object", "error-messages"]));
|
|
565
563
|
}
|
|
566
|
-
}),
|
|
564
|
+
}), Ae = /* @__PURE__ */ C({
|
|
567
565
|
name: "FNumberField",
|
|
568
566
|
inheritAttrs: !1,
|
|
569
567
|
__name: "FNumberField",
|
|
@@ -591,7 +589,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
591
589
|
initialValue: e.modelValue,
|
|
592
590
|
syncVModel: !0
|
|
593
591
|
});
|
|
594
|
-
return (p, o) => (s(), b(V(
|
|
592
|
+
return (p, o) => (s(), b(V(be), w(p.$attrs, {
|
|
595
593
|
modelValue: V(l),
|
|
596
594
|
"onUpdate:modelValue": o[0] || (o[0] = (v) => j(l) ? l.value = v : null),
|
|
597
595
|
name: e.name,
|
|
@@ -612,7 +610,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
612
610
|
"error-messages": V(r)
|
|
613
611
|
}), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "control-variant", "hide-details", "placeholder", "label", "prefix", "disabled", "readonly", "min", "precision", "inset", "error-messages"]));
|
|
614
612
|
}
|
|
615
|
-
}),
|
|
613
|
+
}), Re = { key: 0 }, Ue = { key: 1 }, Oe = /* @__PURE__ */ C({
|
|
616
614
|
name: "FSwitch",
|
|
617
615
|
inheritAttrs: !1,
|
|
618
616
|
__name: "FSwitch",
|
|
@@ -629,7 +627,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
629
627
|
emits: ["update:modelValue"],
|
|
630
628
|
setup(t) {
|
|
631
629
|
const e = t, n = L(t, "modelValue");
|
|
632
|
-
return (r, l) => (s(), b(V(
|
|
630
|
+
return (r, l) => (s(), b(V(_e), w(r.$attrs, {
|
|
633
631
|
modelValue: n.value,
|
|
634
632
|
"onUpdate:modelValue": l[0] || (l[0] = (p) => n.value = p),
|
|
635
633
|
color: e.color,
|
|
@@ -639,13 +637,13 @@ const Te = /* @__PURE__ */ C({
|
|
|
639
637
|
e.labelTrue || e.labelFalse ? {
|
|
640
638
|
name: "label",
|
|
641
639
|
fn: m(() => [
|
|
642
|
-
n.value ? (s(), B("span",
|
|
640
|
+
n.value ? (s(), B("span", Re, T(e.labelTrue), 1)) : (s(), B("span", Ue, T(e.labelFalse), 1))
|
|
643
641
|
]),
|
|
644
642
|
key: "0"
|
|
645
643
|
} : void 0
|
|
646
644
|
]), 1040, ["modelValue", "color", "hide-details", "density"]));
|
|
647
645
|
}
|
|
648
|
-
}),
|
|
646
|
+
}), je = /* @__PURE__ */ C({
|
|
649
647
|
name: "FDialog",
|
|
650
648
|
inheritAttrs: !1,
|
|
651
649
|
__name: "FDialog",
|
|
@@ -708,10 +706,10 @@ const Te = /* @__PURE__ */ C({
|
|
|
708
706
|
}, 16, ["modelValue", "transition", "width", "persistent"]);
|
|
709
707
|
};
|
|
710
708
|
}
|
|
711
|
-
}),
|
|
709
|
+
}), Ee = {
|
|
712
710
|
class: "d-flex mt-5 mb-n6",
|
|
713
711
|
style: { width: "100%" }
|
|
714
|
-
},
|
|
712
|
+
}, Xe = /* @__PURE__ */ C({
|
|
715
713
|
name: "FTimePicker",
|
|
716
714
|
inheritAttrs: !1,
|
|
717
715
|
__name: "FTimePicker",
|
|
@@ -777,7 +775,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
777
775
|
"onUpdate:hour": d[2] || (d[2] = (h) => g(h))
|
|
778
776
|
}, {
|
|
779
777
|
actions: m(() => [
|
|
780
|
-
O("div",
|
|
778
|
+
O("div", Ee, [
|
|
781
779
|
k(J, {
|
|
782
780
|
variant: "plain",
|
|
783
781
|
color: "red-darken-2",
|
|
@@ -802,7 +800,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
802
800
|
}, 16, ["modelValue", "name", "active", "focus", "density", "rounded", "variant", "hide-details", "readonly", "error-messages"]);
|
|
803
801
|
};
|
|
804
802
|
}
|
|
805
|
-
}),
|
|
803
|
+
}), ze = /* @__PURE__ */ Q(Xe, [["__scopeId", "data-v-7639bf96"]]), Le = { class: "position-relative" }, Ye = /* @__PURE__ */ C({
|
|
806
804
|
name: "FDatePicker",
|
|
807
805
|
inheritAttrs: !1,
|
|
808
806
|
__name: "FDatePicker",
|
|
@@ -848,7 +846,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
848
846
|
}), v = P(null), g = P(!1), i = (d) => {
|
|
849
847
|
o.value = r(d), g.value = !1;
|
|
850
848
|
};
|
|
851
|
-
return
|
|
849
|
+
return fe(() => {
|
|
852
850
|
v.value = e.modelValue ? l(e.modelValue) : null;
|
|
853
851
|
}), (d, a) => {
|
|
854
852
|
const F = y("v-text-field"), _ = y("v-date-picker"), $ = y("v-locale-provider"), h = y("v-btn"), z = y("v-menu");
|
|
@@ -876,7 +874,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
876
874
|
}), null, 16, ["modelValue", "name", "density", "rounded", "variant", "hide-details", "color", "error-messages"])
|
|
877
875
|
]),
|
|
878
876
|
default: m(() => [
|
|
879
|
-
O("div",
|
|
877
|
+
O("div", Le, [
|
|
880
878
|
k($, {
|
|
881
879
|
locale: e.locale
|
|
882
880
|
}, {
|
|
@@ -913,7 +911,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
913
911
|
}, 8, ["modelValue", "disabled"]);
|
|
914
912
|
};
|
|
915
913
|
}
|
|
916
|
-
}),
|
|
914
|
+
}), He = /* @__PURE__ */ Q(Ye, [["__scopeId", "data-v-f2792853"]]), Ge = { class: "d-flex" }, Ke = /* @__PURE__ */ C({
|
|
917
915
|
name: "FTreeView",
|
|
918
916
|
inheritAttrs: !1,
|
|
919
917
|
__name: "FTreeView",
|
|
@@ -971,7 +969,7 @@ const Te = /* @__PURE__ */ C({
|
|
|
971
969
|
active: l.value.length > 0
|
|
972
970
|
}), {
|
|
973
971
|
"prepend-inner": m(() => [
|
|
974
|
-
O("div",
|
|
972
|
+
O("div", Ge, [
|
|
975
973
|
(s(!0), B(W, null, N(l.value, (u, c) => (s(), b(a, {
|
|
976
974
|
key: c,
|
|
977
975
|
density: "compact",
|
|
@@ -1058,26 +1056,26 @@ const Te = /* @__PURE__ */ C({
|
|
|
1058
1056
|
}, 8, ["modelValue", "disabled"]);
|
|
1059
1057
|
};
|
|
1060
1058
|
}
|
|
1061
|
-
}),
|
|
1059
|
+
}), Ze = {
|
|
1062
1060
|
install(t) {
|
|
1063
|
-
t.component("FButton", J), t.component("FTextField",
|
|
1061
|
+
t.component("FButton", J), t.component("FTextField", Ve), t.component("FDataTable", Se), t.component("FTextarea", Me), t.component("FAutocomplete", Te), t.component("FCheckbox", Ie), t.component("FCurrencyField", Pe), t.component("FSelect", Ne), t.component("FNumberField", Ae), t.component("FSwitch", Oe), t.component("FDialog", je), t.component("FTimePicker", ze), t.component("FDatePicker", He), t.component("FTreeView", Ke);
|
|
1064
1062
|
}
|
|
1065
1063
|
};
|
|
1066
1064
|
export {
|
|
1067
|
-
|
|
1065
|
+
Te as FAutocomplete,
|
|
1068
1066
|
J as FButton,
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1067
|
+
Ie as FCheckbox,
|
|
1068
|
+
Pe as FCurrencyField,
|
|
1069
|
+
Se as FDataTable,
|
|
1070
|
+
Be as FDataTableHeaderType,
|
|
1071
|
+
He as FDatePicker,
|
|
1072
|
+
je as FDialog,
|
|
1073
|
+
Ae as FNumberField,
|
|
1074
|
+
Ne as FSelect,
|
|
1075
|
+
Oe as FSwitch,
|
|
1076
|
+
Ve as FTextField,
|
|
1077
|
+
Me as FTextarea,
|
|
1078
|
+
ze as FTimePicker,
|
|
1079
|
+
Ke as FTreeView,
|
|
1080
|
+
Ze as default
|
|
1083
1081
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(k,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):(k=typeof globalThis<"u"?globalThis:k||self,e(k.FinsoVueComponents={},k.Vue,k.VuetifyComponents,k.MaskaVue,k.VeeValidate))})(this,(function(k,e,x,K,w){"use strict";const N=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(o){const t=o;return(a,i)=>{const l=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(l,{color:t.color,rounded:t.rounded},null,8,["color","rounded"])}}}),M=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(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(f,r)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.VTextField),e.mergeProps(f.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(l)?l.value=p: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(i),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":r[1]||(r[1]=p=>f.$emit("clickAppendInner"))}),e.createSlots({_:2},[e.renderList(f.$slots,(p,y)=>({name:y,fn:e.withCtx(s=>[e.renderSlot(f.$slots,y,e.normalizeProps(e.guardReactiveProps(s??{})))])}))]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(K.vMaska),t.mask]])}}),W={key:0,class:"font-weight-bold d-flex justify-center align-center fill-height"},J={key:1,class:"font-weight-bold d-flex justify-center align-center fill-height"},Q={key:2},Z={key:5},v={class:"f-data-table__actions"},ee={class:"text-h6"},te=e.defineComponent({name:"FDataTable",inheritAttrs:!1,__name:"FDataTable",props:e.mergeModels({headers:{},items:{},loading:{type:Boolean,default:!1},hover:{type:Boolean,default:!0},density:{default:"default"},maxHeight:{default:576},showSelect:{type:Boolean,default:!1},fixedHeader:{type:Boolean,default:!0},serverSide:{type:Boolean,default:!0},totalCount:{default:0},canEditRecord:{type:Boolean,default:!0},canDeleteRecord:{type:Boolean,default:!0},canReadRecord:{type:Boolean,default:!0},showDeleteConfirm:{type:Boolean,default:!0},deleteLoading:{type:Boolean,default:void 0},labelActive:{default:"Active"},labelPassive:{default:"Passive"},labelDeleteTitle:{default:"Delete"},deleteMessageFormatter:{},labelDeleteMessage:{default:"Are you sure you want to delete this record?"},labelDeleteConfirm:{default:"Delete"},labelDeleteCancel:{default:"Cancel"},labelItemsPerPage:{default:"Items per page"},labelNoData:{default:"No data available"},moneyLocale:{default:"tr-TR"},moneyCurrency:{default:"TRY"},gsmPattern:{default:"(XXX) XXX XXXX"}},{page:{default:1},pageModifiers:{},itemsPerPage:{default:10},itemsPerPageModifiers:{},sortBy:{default:()=>[]},sortByModifiers:{}}),emits:e.mergeModels(["show-record","delete-record"],["update:page","update:itemsPerPage","update:sortBy"]),setup(o,{emit:t}){const a=o,i=t,l=e.useModel(o,"page"),f=e.useModel(o,"itemsPerPage"),r=e.useModel(o,"sortBy"),p=e.ref(!1),y=e.ref(null);function s(c,m){return m.split(".").reduce((B,D)=>B==null?void 0:B[D],c)}function d(c){return c==null?"":new Intl.NumberFormat(a.moneyLocale,{style:"currency",currency:a.moneyCurrency}).format(c)}function n(c){if(!c)return"";const m=c.replace(/\D/g,"");return m.length<10?c:`(${m.substring(0,3)}) ${m.substring(3,6)} ${m.substring(6,10)}`}function V(c,m){return m.split(",").map(B=>{const D=s(c,B.trim());return typeof D=="string"?D.charAt(0).toUpperCase():""}).join("")}const g=e.computed(()=>{const B=a.items.length===0?108:a.items.length*52+56;return Math.min(B,a.maxHeight)}),_=e.computed(()=>!a.canEditRecord&&!a.canReadRecord?{}:{"click:row":(c,{item:m})=>{i("show-record",m)}}),h=e.computed(()=>a.headers.filter(c=>c.type&&c.key!=="actions")),S=e.computed(()=>a.headers.some(c=>c.key==="actions"));function F(c){a.showDeleteConfirm?(y.value=c,p.value=!0):i("delete-record",c)}function C(){i("delete-record",y.value),a.deleteLoading===void 0&&(p.value=!1,y.value=null)}return e.watch(()=>a.deleteLoading,(c,m)=>{m&&!c&&p.value&&(p.value=!1,y.value=null)}),(c,m)=>{const B=e.resolveComponent("v-icon"),D=e.resolveComponent("v-img"),Y=e.resolveComponent("v-avatar"),de=e.resolveComponent("v-chip"),q=e.resolveComponent("v-btn"),se=e.resolveComponent("v-card-text"),ce=e.resolveComponent("v-spacer"),G=e.resolveComponent("f-button"),me=e.resolveComponent("v-card-actions"),ue=e.resolveComponent("f-dialog");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.serverSide?"v-data-table-server":"v-data-table"),e.mergeProps(c.$attrs,{page:l.value,"onUpdate:page":m[0]||(m[0]=u=>l.value=u),"items-per-page":f.value,"onUpdate:itemsPerPage":m[1]||(m[1]=u=>f.value=u),"sort-by":r.value,"onUpdate:sortBy":m[2]||(m[2]=u=>r.value=u),class:"rounded-b-lg",headers:o.headers,items:o.items,"items-length":o.serverSide?o.totalCount:void 0,loading:o.loading,hover:o.hover,density:o.density,height:g.value,"show-select":o.showSelect,"fixed-header":o.fixedHeader,"items-per-page-text":o.labelItemsPerPage,"no-data-text":o.labelNoData},e.toHandlers(_.value)),e.createSlots({_:2},[e.renderList(h.value,u=>({name:`item.${u.key}`,fn:e.withCtx(({item:b})=>[e.renderSlot(c.$slots,`item.${u.key}`,{item:b,value:s(b,u.key)},()=>[u.type==="image"?(e.openBlock(),e.createBlock(Y,{key:0,rounded:"lg",variant:"elevated",border:""},{default:e.withCtx(()=>[s(b,u.key)?(e.openBlock(),e.createBlock(D,{key:0,src:s(b,u.key),class:"f-data-table__logo"},{error:e.withCtx(()=>[u.imageInitialsKey?(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(V(b,u.imageInitialsKey)),1)):(e.openBlock(),e.createBlock(B,{key:1,color:"white"},{default:e.withCtx(()=>[...m[5]||(m[5]=[e.createTextVNode("mdi-account",-1)])]),_:1}))]),_:2},1032,["src"])):u.imageInitialsKey?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(V(b,u.imageInitialsKey)),1)):(e.openBlock(),e.createBlock(B,{key:2,color:"white"},{default:e.withCtx(()=>[...m[6]||(m[6]=[e.createTextVNode("mdi-account",-1)])]),_:1}))]),_:2},1024)):u.type==="logo"?(e.openBlock(),e.createBlock(Y,{key:1,rounded:"lg",variant:"elevated",border:"",class:"f-data-table__logo-avatar",color:"white"},{default:e.withCtx(()=>[s(b,u.key)?(e.openBlock(),e.createBlock(D,{key:0,src:s(b,u.key),class:"f-data-table__logo"},{error:e.withCtx(()=>[...m[7]||(m[7]=[e.createElementVNode("div",{class:"f-data-table__logo-avatar fill-height"},null,-1)])]),_:1},8,["src"])):e.createCommentVNode("",!0)]),_:2},1024)):u.type==="money"?(e.openBlock(),e.createElementBlock("span",Q,e.toDisplayString(d(s(b,u.key))),1)):u.type==="status"?(e.openBlock(),e.createBlock(de,{key:3,color:s(b,u.key)?"green-darken-1":"red-darken-2",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s(b,u.key)?o.labelActive:o.labelPassive),1)]),_:2},1032,["color"])):u.type==="boolean"?(e.openBlock(),e.createBlock(B,{key:4,color:s(b,u.key)?"green-darken-1":"red-darken-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s(b,u.key)?"mdi-check":"mdi-close"),1)]),_:2},1032,["color"])):u.type==="gsmNo"?(e.openBlock(),e.createElementBlock("span",Z,e.toDisplayString(n(s(b,u.key))),1)):e.createCommentVNode("",!0)],!0)])})),S.value?{name:"item.actions",fn:e.withCtx(({item:u})=>[e.renderSlot(c.$slots,"item.actions",{item:u},()=>[e.createElementVNode("div",v,[o.canEditRecord||o.canReadRecord?(e.openBlock(),e.createBlock(q,{key:0,size:"small",variant:"text",icon:o.canEditRecord?"mdi-pencil-outline":"mdi-eye-outline",color:o.canEditRecord?"primary":"secondary",onClick:e.withModifiers(b=>i("show-record",u),["stop"])},null,8,["icon","color","onClick"])):e.createCommentVNode("",!0),o.canDeleteRecord?(e.openBlock(),e.createBlock(q,{key:1,icon:"mdi-trash-can-outline",variant:"text",size:"small",color:"red-darken-2",onClick:e.withModifiers(b=>F(u),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0)])],!0)]),key:"0"}:void 0,e.renderList(c.$slots,(u,b)=>({name:b,fn:e.withCtx(fe=>[e.renderSlot(c.$slots,b,e.normalizeProps(e.guardReactiveProps(fe??{})),void 0,!0)])}))]),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"])),e.createVNode(ue,{modelValue:p.value,"onUpdate:modelValue":m[4]||(m[4]=u=>p.value=u),"max-width":"400","hide-close":!0},{header:e.withCtx(()=>[e.createElementVNode("div",ee,e.toDisplayString(o.labelDeleteTitle),1)]),default:e.withCtx(()=>[e.createVNode(se,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.deleteMessageFormatter&&y.value?o.deleteMessageFormatter(y.value):o.labelDeleteMessage),1)]),_:1}),e.createVNode(me,null,{default:e.withCtx(()=>[e.createVNode(ce),e.createVNode(G,{variant:"plain",color:"red-darken-2",text:o.labelDeleteCancel,onClick:m[3]||(m[3]=u=>p.value=!1)},null,8,["text"]),e.createVNode(G,{variant:"tonal",text:o.labelDeleteConfirm,loading:o.deleteLoading??!1,onClick:C},null,8,["text","loading"])]),_:1})]),_:1},8,["modelValue"])])}}}),$=(o,t)=>{const a=o.__vccOpts||o;for(const[i,l]of t)a[i]=l;return a},P=$(te,[["__scopeId","data-v-6a520706"]]);var T=(o=>(o.IMAGE="image",o.MONEY="money",o.STATUS="status",o.BOOLEAN="boolean",o.GSM_NO="gsmNo",o.LOGO="logo",o))(T||{});const R=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(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(f,r)=>(e.openBlock(),e.createBlock(e.unref(x.VTextarea),e.mergeProps(f.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(l)?l.value=p: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(i)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),I=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(o,{emit:t}){const a=t,i=o,l=e.computed(()=>i.rules),{errorMessage:f,value:r}=w.useField(()=>i.name,l,{initialValue:i.modelValue,syncVModel:!0});function p(y){a("change",y)}return(y,s)=>(e.openBlock(),e.createBlock(e.unref(x.VAutocomplete),e.mergeProps(y.$attrs,{modelValue:e.unref(r),"onUpdate:modelValue":[s[0]||(s[0]=d=>e.isRef(r)?r.value=d:null),s[1]||(s[1]=d=>p(e.unref(r)))],name:i.name,items:i.items,rounded:i.rounded,variant:i.variant,density:i.density,color:i.color,clearable:i.clearable,"hide-details":i.hideDetails,"return-object":i.returnObject,"no-data-text":i.noDataText,"error-messages":e.unref(f),"menu-props":{maxWidth:0}}),e.createSlots({_:2},[e.renderList(y.$slots,(d,n)=>({name:n,fn:e.withCtx(V=>[e.renderSlot(y.$slots,n,e.normalizeProps(e.guardReactiveProps(V??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),A=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(o){const t=o;return(a,i)=>(e.openBlock(),e.createBlock(e.unref(x.VCheckbox),e.mergeProps(a.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),E=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(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0}),f=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),r=e.ref(p(t.modelValue));function p(g){return g==null||isNaN(g)?"":f.value.format(g)}function y(g){const _=g.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),h=parseFloat(_);return isNaN(h)?null:Math.round(h*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const s=e.ref(!1);function d(g){const _=g.target;r.value=_.value,e.nextTick(()=>{l.value=y(_.value)})}function n(){s.value=!1,r.value=p(l.value)}function V(g){s.value=!0;const _=g.target,h=l.value;h!=null?r.value=h.toFixed(t.precision).replace(".",","):r.value="",setTimeout(()=>_.select(),0)}return e.watch(()=>t.modelValue,g=>{l.value=g,s.value||(r.value=p(g))}),(g,_)=>(e.openBlock(),e.createBlock(e.unref(x.VTextField),e.mergeProps(g.$attrs,{"model-value":r.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(i),inputmode:"decimal",onInput:d,onBlur:n,onFocus:V}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),U=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(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(f,r)=>(e.openBlock(),e.createBlock(e.unref(x.VSelect),e.mergeProps(f.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(l)?l.value=p: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(i)}),e.createSlots({_:2},[e.renderList(f.$slots,(p,y)=>({name:y,fn:e.withCtx(s=>[e.renderSlot(f.$slots,y,e.normalizeProps(e.guardReactiveProps(s??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),L=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:null},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(f,r)=>(e.openBlock(),e.createBlock(e.unref(x.VNumberInput),e.mergeProps(f.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(l)?l.value=p: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(i)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),oe={key:0},le={key:1},O=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(o){const t=o,a=e.useModel(o,"modelValue");return(i,l)=>(e.openBlock(),e.createBlock(e.unref(x.VSwitch),e.mergeProps(i.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=f=>a.value=f),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(t.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),j=e.defineComponent({name:"FDialog",inheritAttrs:!1,__name:"FDialog",props:e.mergeModels({width:{default:750},persistent:{type:Boolean,default:!0},transition:{default:"slide-y-transition"},hideClose:{type:Boolean,default:!1}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["closeDialog"],["update:modelValue"]),setup(o){const t=o,a=e.useModel(o,"modelValue");return(i,l)=>{const f=e.resolveComponent("v-btn"),r=e.resolveComponent("v-card-title"),p=e.resolveComponent("v-divider"),y=e.resolveComponent("v-card-text"),s=e.resolveComponent("v-card"),d=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(d,e.mergeProps(i.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=n=>a.value=n),transition:t.transition,class:"f-dialog",width:t.width,persistent:t.persistent}),{default:e.withCtx(()=>[e.createVNode(s,{class:"f-dialog-card",density:"default",variant:"elevated",rounded:"lg"},{default:e.withCtx(()=>[e.createVNode(r,{class:"d-flex justify-space-between align-center"},{default:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(i.$slots,"header")]),t.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(f,{key:0,icon:"mdi-close",variant:"text",onClick:l[0]||(l[0]=n=>i.$emit("closeDialog"))}))]),_:3}),e.createVNode(p),e.createVNode(y,{class:"py-4 px-1 overflow-auto overflow-x-hidden"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3})]),_:3})]),_:3},16,["modelValue","transition","width","persistent"])}}}),ne={class:"d-flex mt-5 mb-n6",style:{width:"100%"}},z=$(e.defineComponent({name:"FTimePicker",inheritAttrs:!1,__name:"FTimePicker",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},readonly:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""},title:{default:""},labelCancel:{default:"Cancel"},labelConfirm:{default:"Confirm"}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue||"",syncVModel:!0}),f=e.ref(!1),r=e.ref(l);function p(){l.value=r.value,f.value=!1}function y(s){r.value&&r.value.includes(":")&&(r.value=s.toString().padStart(2,"0")+r.value.substring(r.value.indexOf(":")))}return(s,d)=>{const n=e.resolveComponent("v-spacer"),V=e.resolveComponent("v-time-picker"),g=e.resolveComponent("v-menu"),_=e.resolveComponent("v-text-field");return e.openBlock(),e.createBlock(_,e.mergeProps(s.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":d[4]||(d[4]=h=>e.isRef(l)?l.value=h:null),"prepend-inner-icon":"mdi-clock-time-four-outline",name:t.name,active:f.value,focus:f.value,density:t.density,rounded:t.rounded,variant:t.variant,"hide-details":t.hideDetails,readonly:t.readonly,"error-messages":e.unref(i)}),{default:e.withCtx(()=>[e.createVNode(g,{modelValue:f.value,"onUpdate:modelValue":d[3]||(d[3]=h=>f.value=h),activator:"parent",location:"center",disabled:t.readonly,"close-on-content-click":!1},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(V,{key:0,modelValue:r.value,"onUpdate:modelValue":d[1]||(d[1]=h=>r.value=h),"full-width":"",color:"secondary",format:"24hr",title:t.title,"onUpdate:hour":d[2]||(d[2]=h=>y(h))},{actions:e.withCtx(()=>[e.createElementVNode("div",ne,[e.createVNode(N,{variant:"plain",color:"red-darken-2",text:t.labelCancel,onClick:d[0]||(d[0]=h=>f.value=!1)},null,8,["text"]),e.createVNode(n),e.createVNode(N,{variant:"tonal",text:t.labelConfirm,onClick:p},null,8,["text"])])]),_:1},8,["modelValue","title"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","disabled"])]),_:1},16,["modelValue","name","active","focus","density","rounded","variant","hide-details","readonly","error-messages"])}}}),[["__scopeId","data-v-7639bf96"]]),ae={class:"position-relative"},X=$(e.defineComponent({name:"FDatePicker",inheritAttrs:!1,__name:"FDatePicker",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},disabled:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""},max:{default:void 0},min:{default:void 0},locale:{default:"en"},firstDayOfWeek:{default:1},dateFormat:{default:"DD/MM/YYYY"}},setup(o){const t=o,a=e.computed(()=>t.rules);function i(d){if(!d)return"";let n;if(d instanceof Date)n=d;else{const h=d.split("/");h.length===3?n=new Date(Number(h[2]),Number(h[1])-1,Number(h[0])):n=new Date(d)}if(isNaN(n.getTime()))return"";const V=`0${n.getDate()}`.slice(-2),g=`0${n.getMonth()+1}`.slice(-2),_=n.getFullYear();return`${V}/${g}/${_}`}function l(d){if(!d)return null;const n=d.split("/");return n.length===3?new Date(Number(n[2]),Number(n[1])-1,Number(n[0])):null}const{errorMessage:f,value:r}=w.useField(()=>t.name,a,{initialValue:t.modelValue?i(t.modelValue):"",syncVModel:!0}),p=e.ref(null),y=e.ref(!1),s=d=>{r.value=i(d),y.value=!1};return e.onMounted(()=>{p.value=t.modelValue?l(t.modelValue):null}),(d,n)=>{const V=e.resolveComponent("v-text-field"),g=e.resolveComponent("v-date-picker"),_=e.resolveComponent("v-locale-provider"),h=e.resolveComponent("v-btn"),S=e.resolveComponent("v-menu");return e.openBlock(),e.createBlock(S,{modelValue:y.value,"onUpdate:modelValue":n[4]||(n[4]=F=>y.value=F),location:"center",disabled:t.disabled,"close-on-content-click":!1},{activator:e.withCtx(({props:F})=>[e.createVNode(V,e.mergeProps({...d.$attrs,...F},{modelValue:e.unref(r),"onUpdate:modelValue":n[0]||(n[0]=C=>e.isRef(r)?r.value=C:null),"prepend-inner-icon":"mdi-calendar-outline",name:t.name,density:t.density,rounded:t.rounded,variant:t.variant,"hide-details":t.hideDetails,color:t.color,readonly:"","error-messages":e.unref(f),"onClick:clear":n[1]||(n[1]=C=>r.value="")}),null,16,["modelValue","name","density","rounded","variant","hide-details","color","error-messages"])]),default:e.withCtx(()=>[e.createElementVNode("div",ae,[e.createVNode(_,{locale:t.locale},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:p.value,"onUpdate:modelValue":[n[2]||(n[2]=F=>p.value=F),s],title:"",elevation:"10","first-day-of-week":t.firstDayOfWeek,min:t.min,max:t.max,color:t.color,"show-adjacent-months":"",rounded:t.rounded},null,8,["modelValue","first-day-of-week","min","max","color","rounded"])]),_:1},8,["locale"]),e.createVNode(h,{class:"position-absolute top-0 right-0",color:"white",icon:"mdi-close",size:"small",variant:"text",onClick:n[3]||(n[3]=F=>y.value=!1)})])]),_:1},8,["modelValue","disabled"])}}}),[["__scopeId","data-v-f2792853"]]),re={class:"d-flex"},H=e.defineComponent({name:"FTreeView",inheritAttrs:!1,__name:"FTreeView",props:{items:{default:()=>[]},selectedItems:{default:()=>[]},itemTitle:{default:"name"},label:{default:""},disabled:{type:Boolean,default:!1}},emits:["set-selected-items"],setup(o,{emit:t}){const a=o,i=t,l=e.ref(a.selectedItems),f=e.ref(!1),r=[];function p(s){s.isSelected?l.value.push(s):l.value.splice(l.value.indexOf(s),1);const d=a.items.find(n=>n.id===s.id);if(d)d.children.map(n=>n.isSelected=s.isSelected),s.isSelected&&d.children.forEach(n=>{const V=l.value.findIndex(g=>g.id===n.id);V!==-1&&l.value.splice(V,1)});else{const n=a.items.find(V=>V.id===s.parentId);n&&n.children.every(V=>V.isSelected)&&(n.isSelected=!0)}i("set-selected-items",[...l.value])}function y(s){const d=a.items.find(n=>n.id===s.id);return!d||d.children.every(n=>n.isSelected)?!1:!!d.children.find(n=>n.isSelected)}return(s,d)=>{const n=e.resolveComponent("v-chip"),V=e.resolveComponent("v-text-field"),g=e.resolveComponent("v-list-item"),_=e.resolveComponent("f-checkbox"),h=e.resolveComponent("v-list-group"),S=e.resolveComponent("v-list"),F=e.resolveComponent("v-menu");return e.openBlock(),e.createBlock(F,{modelValue:f.value,"onUpdate:modelValue":d[1]||(d[1]=C=>f.value=C),"max-height":"250px","close-on-content-click":!1,disabled:a.disabled},{activator:e.withCtx(({props:C})=>[e.createVNode(V,e.mergeProps({name:"selectedItems",readonly:""},C,{variant:"outlined",rounded:"lg",density:"compact",color:"secondary","hide-details":"",clearable:!1,label:a.label,active:l.value.length>0}),{"prepend-inner":e.withCtx(()=>[e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(c,m)=>(e.openBlock(),e.createBlock(n,{key:m,density:"compact",class:"ml-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c[a.itemTitle]),1)]),_:2},1024))),128))])]),_:1},16,["label","active"])]),default:e.withCtx(()=>[e.createVNode(S,{density:"compact",nav:"","open-strategy":"single",width:"100%",opened:r,slim:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,C=>(e.openBlock(),e.createElementBlock("div",{key:C.id},[C.children?(e.openBlock(),e.createBlock(h,{key:1,value:C.id},{activator:e.withCtx(({props:c})=>[e.createVNode(g,e.mergeProps({ref_for:!0},c,{rounded:"lg",title:C[a.itemTitle]}),{prepend:e.withCtx(()=>[e.createVNode(_,{modelValue:C.isSelected,"onUpdate:modelValue":m=>C.isSelected=m,indeterminate:y(C),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"])),onChange:m=>p(C)},null,8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])]),_:2},1040,["title"])]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.children,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createVNode(g,{rounded:"lg",title:c[a.itemTitle],value:c.id},{prepend:e.withCtx(()=>[e.createVNode(_,{modelValue:c.isSelected,"onUpdate:modelValue":m=>c.isSelected=m,onChange:m=>p(c)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["title","value"])]))),128))]),_:2},1032,["value"])):(e.openBlock(),e.createBlock(g,{key:0,rounded:"lg",title:C[a.itemTitle],value:C.id},null,8,["title","value"]))]))),128))]),_:1})]),_:1},8,["modelValue","disabled"])}}}),ie={install(o){o.component("FButton",N),o.component("FTextField",M),o.component("FDataTable",P),o.component("FTextarea",R),o.component("FAutocomplete",I),o.component("FCheckbox",A),o.component("FCurrencyField",E),o.component("FSelect",U),o.component("FNumberField",L),o.component("FSwitch",O),o.component("FDialog",j),o.component("FTimePicker",z),o.component("FDatePicker",X),o.component("FTreeView",H)}};k.FAutocomplete=I,k.FButton=N,k.FCheckbox=A,k.FCurrencyField=E,k.FDataTable=P,k.FDataTableHeaderType=T,k.FDatePicker=X,k.FDialog=j,k.FNumberField=L,k.FSelect=U,k.FSwitch=O,k.FTextField=M,k.FTextarea=R,k.FTimePicker=z,k.FTreeView=H,k.default=ie,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(k,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):(k=typeof globalThis<"u"?globalThis:k||self,e(k.FinsoVueComponents={},k.Vue,k.VuetifyComponents,k.MaskaVue,k.VeeValidate))})(this,(function(k,e,x,K,w){"use strict";const N=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(o){const t=o;return(a,i)=>{const l=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(l,{color:t.color,rounded:t.rounded},null,8,["color","rounded"])}}}),M=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(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(f,r)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(x.VTextField),e.mergeProps(f.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(l)?l.value=p: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(i),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":r[1]||(r[1]=p=>f.$emit("clickAppendInner"))}),e.createSlots({_:2},[e.renderList(f.$slots,(p,y)=>({name:y,fn:e.withCtx(s=>[e.renderSlot(f.$slots,y,e.normalizeProps(e.guardReactiveProps(s??{})))])}))]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(K.vMaska),t.mask]])}}),W={key:0,class:"font-weight-bold d-flex justify-center align-center fill-height"},J={key:1,class:"font-weight-bold d-flex justify-center align-center fill-height"},Q={key:2},Z={key:5},v={class:"f-data-table__actions"},ee={class:"text-h6"},te=e.defineComponent({name:"FDataTable",inheritAttrs:!1,__name:"FDataTable",props:e.mergeModels({headers:{},items:{},loading:{type:Boolean,default:!1},hover:{type:Boolean,default:!0},density:{default:"default"},maxHeight:{default:576},showSelect:{type:Boolean,default:!1},fixedHeader:{type:Boolean,default:!0},serverSide:{type:Boolean,default:!0},totalCount:{default:0},canEditRecord:{type:Boolean,default:!0},canDeleteRecord:{type:Boolean,default:!0},canReadRecord:{type:Boolean,default:!0},showDeleteConfirm:{type:Boolean,default:!0},deleteLoading:{type:Boolean,default:void 0},labelActive:{default:"Active"},labelPassive:{default:"Passive"},labelDeleteTitle:{default:"Delete"},deleteMessageFormatter:{},labelDeleteMessage:{default:"Are you sure you want to delete this record?"},labelDeleteConfirm:{default:"Delete"},labelDeleteCancel:{default:"Cancel"},labelItemsPerPage:{default:"Items per page"},labelNoData:{default:"No data available"},moneyLocale:{default:"tr-TR"},moneyCurrency:{default:"TRY"},gsmPattern:{default:"(XXX) XXX XXXX"}},{page:{default:1},pageModifiers:{},itemsPerPage:{default:10},itemsPerPageModifiers:{},sortBy:{default:()=>[]},sortByModifiers:{}}),emits:e.mergeModels(["show-record","delete-record"],["update:page","update:itemsPerPage","update:sortBy"]),setup(o,{emit:t}){const a=o,i=t,l=e.useModel(o,"page"),f=e.useModel(o,"itemsPerPage"),r=e.useModel(o,"sortBy"),p=e.ref(!1),y=e.ref(null);function s(c,m){return m.split(".").reduce((B,D)=>B==null?void 0:B[D],c)}function d(c){return c==null?"":new Intl.NumberFormat(a.moneyLocale,{style:"currency",currency:a.moneyCurrency}).format(c)}function n(c){if(!c)return"";const m=c.replace(/\D/g,"");return m.length<10?c:`(${m.substring(0,3)}) ${m.substring(3,6)} ${m.substring(6,10)}`}function V(c,m){return m.split(",").map(B=>{const D=s(c,B.trim());return typeof D=="string"?D.charAt(0).toUpperCase():""}).join("")}const g=e.computed(()=>{const B=a.items.length===0?108:a.items.length*52+56;return Math.min(B,a.maxHeight)}),_=e.computed(()=>!a.canEditRecord&&!a.canReadRecord?{}:{"click:row":(c,{item:m})=>{i("show-record",m)}}),h=e.computed(()=>a.headers.filter(c=>c.type&&c.key!=="actions")),S=e.computed(()=>a.headers.some(c=>c.key==="actions"));function F(c){a.showDeleteConfirm?(y.value=c,p.value=!0):i("delete-record",c)}function C(){i("delete-record",y.value),a.deleteLoading===void 0&&(p.value=!1,y.value=null)}return e.watch(()=>a.deleteLoading,(c,m)=>{m&&!c&&p.value&&(p.value=!1,y.value=null)}),(c,m)=>{const B=e.resolveComponent("v-icon"),D=e.resolveComponent("v-img"),Y=e.resolveComponent("v-avatar"),de=e.resolveComponent("v-chip"),q=e.resolveComponent("v-btn"),se=e.resolveComponent("v-card-text"),ce=e.resolveComponent("v-spacer"),G=e.resolveComponent("f-button"),me=e.resolveComponent("v-card-actions"),ue=e.resolveComponent("f-dialog");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.serverSide?"v-data-table-server":"v-data-table"),e.mergeProps(c.$attrs,{page:l.value,"onUpdate:page":m[0]||(m[0]=u=>l.value=u),"items-per-page":f.value,"onUpdate:itemsPerPage":m[1]||(m[1]=u=>f.value=u),"sort-by":r.value,"onUpdate:sortBy":m[2]||(m[2]=u=>r.value=u),class:"rounded-b-lg",headers:o.headers,items:o.items,"items-length":o.serverSide?o.totalCount:void 0,loading:o.loading,hover:o.hover,density:o.density,height:g.value,"show-select":o.showSelect,"fixed-header":o.fixedHeader,"items-per-page-text":o.labelItemsPerPage,"no-data-text":o.labelNoData},e.toHandlers(_.value)),e.createSlots({_:2},[e.renderList(h.value,u=>({name:`item.${u.key}`,fn:e.withCtx(({item:b})=>[e.renderSlot(c.$slots,`item.${u.key}`,{item:b,value:s(b,u.key)},()=>[u.type==="image"?(e.openBlock(),e.createBlock(Y,{key:0,rounded:"lg",variant:"elevated",border:""},{default:e.withCtx(()=>[s(b,u.key)?(e.openBlock(),e.createBlock(D,{key:0,src:s(b,u.key),class:"f-data-table__logo"},{error:e.withCtx(()=>[u.imageInitialsKey?(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(V(b,u.imageInitialsKey)),1)):(e.openBlock(),e.createBlock(B,{key:1,color:"white"},{default:e.withCtx(()=>[...m[5]||(m[5]=[e.createTextVNode("mdi-account",-1)])]),_:1}))]),_:2},1032,["src"])):u.imageInitialsKey?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(V(b,u.imageInitialsKey)),1)):(e.openBlock(),e.createBlock(B,{key:2,color:"white"},{default:e.withCtx(()=>[...m[6]||(m[6]=[e.createTextVNode("mdi-account",-1)])]),_:1}))]),_:2},1024)):u.type==="logo"?(e.openBlock(),e.createBlock(Y,{key:1,rounded:"lg",variant:"elevated",border:"",class:"f-data-table__logo-avatar",color:"white"},{default:e.withCtx(()=>[s(b,u.key)?(e.openBlock(),e.createBlock(D,{key:0,src:s(b,u.key),class:"f-data-table__logo"},{error:e.withCtx(()=>[...m[7]||(m[7]=[e.createElementVNode("div",{class:"f-data-table__logo-avatar fill-height"},null,-1)])]),_:1},8,["src"])):e.createCommentVNode("",!0)]),_:2},1024)):u.type==="money"?(e.openBlock(),e.createElementBlock("span",Q,e.toDisplayString(d(s(b,u.key))),1)):u.type==="status"?(e.openBlock(),e.createBlock(de,{key:3,color:s(b,u.key)?"green-darken-1":"red-darken-2",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s(b,u.key)?o.labelActive:o.labelPassive),1)]),_:2},1032,["color"])):u.type==="boolean"?(e.openBlock(),e.createBlock(B,{key:4,color:s(b,u.key)?"green-darken-1":"red-darken-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s(b,u.key)?"mdi-check":"mdi-close"),1)]),_:2},1032,["color"])):u.type==="gsmNo"?(e.openBlock(),e.createElementBlock("span",Z,e.toDisplayString(n(s(b,u.key))),1)):e.createCommentVNode("",!0)],!0)])})),S.value?{name:"item.actions",fn:e.withCtx(({item:u})=>[e.renderSlot(c.$slots,"item.actions",{item:u},()=>[e.createElementVNode("div",v,[o.canEditRecord||o.canReadRecord?(e.openBlock(),e.createBlock(q,{key:0,size:"small",variant:"text",icon:o.canEditRecord?"mdi-pencil-outline":"mdi-eye-outline",color:o.canEditRecord?"primary":"secondary",onClick:e.withModifiers(b=>i("show-record",u),["stop"])},null,8,["icon","color","onClick"])):e.createCommentVNode("",!0),o.canDeleteRecord?(e.openBlock(),e.createBlock(q,{key:1,icon:"mdi-trash-can-outline",variant:"text",size:"small",color:"red-darken-2",onClick:e.withModifiers(b=>F(u),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0)])],!0)]),key:"0"}:void 0,e.renderList(c.$slots,(u,b)=>({name:b,fn:e.withCtx(fe=>[e.renderSlot(c.$slots,b,e.normalizeProps(e.guardReactiveProps(fe??{})),void 0,!0)])}))]),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"])),e.createVNode(ue,{modelValue:p.value,"onUpdate:modelValue":m[4]||(m[4]=u=>p.value=u),"max-width":"400","hide-close":!0},{header:e.withCtx(()=>[e.createElementVNode("div",ee,e.toDisplayString(o.labelDeleteTitle),1)]),default:e.withCtx(()=>[e.createVNode(se,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.deleteMessageFormatter&&y.value?o.deleteMessageFormatter(y.value):o.labelDeleteMessage),1)]),_:1}),e.createVNode(me,null,{default:e.withCtx(()=>[e.createVNode(ce),e.createVNode(G,{variant:"plain",color:"red-darken-2",text:o.labelDeleteCancel,onClick:m[3]||(m[3]=u=>p.value=!1)},null,8,["text"]),e.createVNode(G,{variant:"tonal",text:o.labelDeleteConfirm,loading:o.deleteLoading??!1,onClick:C},null,8,["text","loading"])]),_:1})]),_:1},8,["modelValue"])])}}}),$=(o,t)=>{const a=o.__vccOpts||o;for(const[i,l]of t)a[i]=l;return a},P=$(te,[["__scopeId","data-v-6a520706"]]);var T=(o=>(o.IMAGE="image",o.MONEY="money",o.STATUS="status",o.BOOLEAN="boolean",o.GSM_NO="gsmNo",o.LOGO="logo",o))(T||{});const R=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(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(f,r)=>(e.openBlock(),e.createBlock(e.unref(x.VTextarea),e.mergeProps(f.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(l)?l.value=p: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(i)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),I=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(o,{emit:t}){const a=t,i=o,l=e.computed(()=>i.rules),{errorMessage:f,value:r}=w.useField(()=>i.name,l,{initialValue:i.modelValue,syncVModel:!0});function p(y){a("change",y)}return(y,s)=>(e.openBlock(),e.createBlock(e.unref(x.VAutocomplete),e.mergeProps(y.$attrs,{modelValue:e.unref(r),"onUpdate:modelValue":[s[0]||(s[0]=d=>e.isRef(r)?r.value=d:null),s[1]||(s[1]=d=>p(e.unref(r)))],name:i.name,items:i.items,rounded:i.rounded,variant:i.variant,density:i.density,color:i.color,clearable:i.clearable,"hide-details":i.hideDetails,"return-object":i.returnObject,"no-data-text":i.noDataText,"error-messages":e.unref(f),"menu-props":{maxWidth:0}}),e.createSlots({_:2},[e.renderList(y.$slots,(d,n)=>({name:n,fn:e.withCtx(V=>[e.renderSlot(y.$slots,n,e.normalizeProps(e.guardReactiveProps(V??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),A=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(o){const t=o;return(a,i)=>(e.openBlock(),e.createBlock(e.unref(x.VCheckbox),e.mergeProps(a.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),E=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(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0}),f=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),r=e.ref(p(t.modelValue));function p(g){return g==null||isNaN(g)?"":f.value.format(g)}function y(g){const _=g.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),h=parseFloat(_);return isNaN(h)?null:Math.round(h*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const s=e.ref(!1);function d(g){const _=g.target;r.value=_.value,l.value=y(_.value)}function n(){s.value=!1,r.value=p(l.value)}function V(g){s.value=!0;const _=g.target,h=l.value;h!=null?r.value=h.toFixed(t.precision).replace(".",","):r.value="",setTimeout(()=>_.select(),0)}return e.watch(()=>t.modelValue,g=>{l.value=g,s.value||(r.value=p(g))}),(g,_)=>(e.openBlock(),e.createBlock(e.unref(x.VTextField),e.mergeProps(g.$attrs,{"model-value":r.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(i),inputmode:"decimal",onInput:d,onBlur:n,onFocus:V}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),U=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(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(f,r)=>(e.openBlock(),e.createBlock(e.unref(x.VSelect),e.mergeProps(f.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(l)?l.value=p: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(i)}),e.createSlots({_:2},[e.renderList(f.$slots,(p,y)=>({name:y,fn:e.withCtx(s=>[e.renderSlot(f.$slots,y,e.normalizeProps(e.guardReactiveProps(s??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),L=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:null},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(f,r)=>(e.openBlock(),e.createBlock(e.unref(x.VNumberInput),e.mergeProps(f.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=p=>e.isRef(l)?l.value=p: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(i)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),oe={key:0},le={key:1},O=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(o){const t=o,a=e.useModel(o,"modelValue");return(i,l)=>(e.openBlock(),e.createBlock(e.unref(x.VSwitch),e.mergeProps(i.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=f=>a.value=f),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(t.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),j=e.defineComponent({name:"FDialog",inheritAttrs:!1,__name:"FDialog",props:e.mergeModels({width:{default:750},persistent:{type:Boolean,default:!0},transition:{default:"slide-y-transition"},hideClose:{type:Boolean,default:!1}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["closeDialog"],["update:modelValue"]),setup(o){const t=o,a=e.useModel(o,"modelValue");return(i,l)=>{const f=e.resolveComponent("v-btn"),r=e.resolveComponent("v-card-title"),p=e.resolveComponent("v-divider"),y=e.resolveComponent("v-card-text"),s=e.resolveComponent("v-card"),d=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(d,e.mergeProps(i.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=n=>a.value=n),transition:t.transition,class:"f-dialog",width:t.width,persistent:t.persistent}),{default:e.withCtx(()=>[e.createVNode(s,{class:"f-dialog-card",density:"default",variant:"elevated",rounded:"lg"},{default:e.withCtx(()=>[e.createVNode(r,{class:"d-flex justify-space-between align-center"},{default:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(i.$slots,"header")]),t.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(f,{key:0,icon:"mdi-close",variant:"text",onClick:l[0]||(l[0]=n=>i.$emit("closeDialog"))}))]),_:3}),e.createVNode(p),e.createVNode(y,{class:"py-4 px-1 overflow-auto overflow-x-hidden"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3})]),_:3})]),_:3},16,["modelValue","transition","width","persistent"])}}}),ne={class:"d-flex mt-5 mb-n6",style:{width:"100%"}},z=$(e.defineComponent({name:"FTimePicker",inheritAttrs:!1,__name:"FTimePicker",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},readonly:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""},title:{default:""},labelCancel:{default:"Cancel"},labelConfirm:{default:"Confirm"}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:i,value:l}=w.useField(()=>t.name,a,{initialValue:t.modelValue||"",syncVModel:!0}),f=e.ref(!1),r=e.ref(l);function p(){l.value=r.value,f.value=!1}function y(s){r.value&&r.value.includes(":")&&(r.value=s.toString().padStart(2,"0")+r.value.substring(r.value.indexOf(":")))}return(s,d)=>{const n=e.resolveComponent("v-spacer"),V=e.resolveComponent("v-time-picker"),g=e.resolveComponent("v-menu"),_=e.resolveComponent("v-text-field");return e.openBlock(),e.createBlock(_,e.mergeProps(s.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":d[4]||(d[4]=h=>e.isRef(l)?l.value=h:null),"prepend-inner-icon":"mdi-clock-time-four-outline",name:t.name,active:f.value,focus:f.value,density:t.density,rounded:t.rounded,variant:t.variant,"hide-details":t.hideDetails,readonly:t.readonly,"error-messages":e.unref(i)}),{default:e.withCtx(()=>[e.createVNode(g,{modelValue:f.value,"onUpdate:modelValue":d[3]||(d[3]=h=>f.value=h),activator:"parent",location:"center",disabled:t.readonly,"close-on-content-click":!1},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(V,{key:0,modelValue:r.value,"onUpdate:modelValue":d[1]||(d[1]=h=>r.value=h),"full-width":"",color:"secondary",format:"24hr",title:t.title,"onUpdate:hour":d[2]||(d[2]=h=>y(h))},{actions:e.withCtx(()=>[e.createElementVNode("div",ne,[e.createVNode(N,{variant:"plain",color:"red-darken-2",text:t.labelCancel,onClick:d[0]||(d[0]=h=>f.value=!1)},null,8,["text"]),e.createVNode(n),e.createVNode(N,{variant:"tonal",text:t.labelConfirm,onClick:p},null,8,["text"])])]),_:1},8,["modelValue","title"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","disabled"])]),_:1},16,["modelValue","name","active","focus","density","rounded","variant","hide-details","readonly","error-messages"])}}}),[["__scopeId","data-v-7639bf96"]]),ae={class:"position-relative"},X=$(e.defineComponent({name:"FDatePicker",inheritAttrs:!1,__name:"FDatePicker",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},disabled:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""},max:{default:void 0},min:{default:void 0},locale:{default:"en"},firstDayOfWeek:{default:1},dateFormat:{default:"DD/MM/YYYY"}},setup(o){const t=o,a=e.computed(()=>t.rules);function i(d){if(!d)return"";let n;if(d instanceof Date)n=d;else{const h=d.split("/");h.length===3?n=new Date(Number(h[2]),Number(h[1])-1,Number(h[0])):n=new Date(d)}if(isNaN(n.getTime()))return"";const V=`0${n.getDate()}`.slice(-2),g=`0${n.getMonth()+1}`.slice(-2),_=n.getFullYear();return`${V}/${g}/${_}`}function l(d){if(!d)return null;const n=d.split("/");return n.length===3?new Date(Number(n[2]),Number(n[1])-1,Number(n[0])):null}const{errorMessage:f,value:r}=w.useField(()=>t.name,a,{initialValue:t.modelValue?i(t.modelValue):"",syncVModel:!0}),p=e.ref(null),y=e.ref(!1),s=d=>{r.value=i(d),y.value=!1};return e.onMounted(()=>{p.value=t.modelValue?l(t.modelValue):null}),(d,n)=>{const V=e.resolveComponent("v-text-field"),g=e.resolveComponent("v-date-picker"),_=e.resolveComponent("v-locale-provider"),h=e.resolveComponent("v-btn"),S=e.resolveComponent("v-menu");return e.openBlock(),e.createBlock(S,{modelValue:y.value,"onUpdate:modelValue":n[4]||(n[4]=F=>y.value=F),location:"center",disabled:t.disabled,"close-on-content-click":!1},{activator:e.withCtx(({props:F})=>[e.createVNode(V,e.mergeProps({...d.$attrs,...F},{modelValue:e.unref(r),"onUpdate:modelValue":n[0]||(n[0]=C=>e.isRef(r)?r.value=C:null),"prepend-inner-icon":"mdi-calendar-outline",name:t.name,density:t.density,rounded:t.rounded,variant:t.variant,"hide-details":t.hideDetails,color:t.color,readonly:"","error-messages":e.unref(f),"onClick:clear":n[1]||(n[1]=C=>r.value="")}),null,16,["modelValue","name","density","rounded","variant","hide-details","color","error-messages"])]),default:e.withCtx(()=>[e.createElementVNode("div",ae,[e.createVNode(_,{locale:t.locale},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:p.value,"onUpdate:modelValue":[n[2]||(n[2]=F=>p.value=F),s],title:"",elevation:"10","first-day-of-week":t.firstDayOfWeek,min:t.min,max:t.max,color:t.color,"show-adjacent-months":"",rounded:t.rounded},null,8,["modelValue","first-day-of-week","min","max","color","rounded"])]),_:1},8,["locale"]),e.createVNode(h,{class:"position-absolute top-0 right-0",color:"white",icon:"mdi-close",size:"small",variant:"text",onClick:n[3]||(n[3]=F=>y.value=!1)})])]),_:1},8,["modelValue","disabled"])}}}),[["__scopeId","data-v-f2792853"]]),re={class:"d-flex"},H=e.defineComponent({name:"FTreeView",inheritAttrs:!1,__name:"FTreeView",props:{items:{default:()=>[]},selectedItems:{default:()=>[]},itemTitle:{default:"name"},label:{default:""},disabled:{type:Boolean,default:!1}},emits:["set-selected-items"],setup(o,{emit:t}){const a=o,i=t,l=e.ref(a.selectedItems),f=e.ref(!1),r=[];function p(s){s.isSelected?l.value.push(s):l.value.splice(l.value.indexOf(s),1);const d=a.items.find(n=>n.id===s.id);if(d)d.children.map(n=>n.isSelected=s.isSelected),s.isSelected&&d.children.forEach(n=>{const V=l.value.findIndex(g=>g.id===n.id);V!==-1&&l.value.splice(V,1)});else{const n=a.items.find(V=>V.id===s.parentId);n&&n.children.every(V=>V.isSelected)&&(n.isSelected=!0)}i("set-selected-items",[...l.value])}function y(s){const d=a.items.find(n=>n.id===s.id);return!d||d.children.every(n=>n.isSelected)?!1:!!d.children.find(n=>n.isSelected)}return(s,d)=>{const n=e.resolveComponent("v-chip"),V=e.resolveComponent("v-text-field"),g=e.resolveComponent("v-list-item"),_=e.resolveComponent("f-checkbox"),h=e.resolveComponent("v-list-group"),S=e.resolveComponent("v-list"),F=e.resolveComponent("v-menu");return e.openBlock(),e.createBlock(F,{modelValue:f.value,"onUpdate:modelValue":d[1]||(d[1]=C=>f.value=C),"max-height":"250px","close-on-content-click":!1,disabled:a.disabled},{activator:e.withCtx(({props:C})=>[e.createVNode(V,e.mergeProps({name:"selectedItems",readonly:""},C,{variant:"outlined",rounded:"lg",density:"compact",color:"secondary","hide-details":"",clearable:!1,label:a.label,active:l.value.length>0}),{"prepend-inner":e.withCtx(()=>[e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(c,m)=>(e.openBlock(),e.createBlock(n,{key:m,density:"compact",class:"ml-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c[a.itemTitle]),1)]),_:2},1024))),128))])]),_:1},16,["label","active"])]),default:e.withCtx(()=>[e.createVNode(S,{density:"compact",nav:"","open-strategy":"single",width:"100%",opened:r,slim:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,C=>(e.openBlock(),e.createElementBlock("div",{key:C.id},[C.children?(e.openBlock(),e.createBlock(h,{key:1,value:C.id},{activator:e.withCtx(({props:c})=>[e.createVNode(g,e.mergeProps({ref_for:!0},c,{rounded:"lg",title:C[a.itemTitle]}),{prepend:e.withCtx(()=>[e.createVNode(_,{modelValue:C.isSelected,"onUpdate:modelValue":m=>C.isSelected=m,indeterminate:y(C),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"])),onChange:m=>p(C)},null,8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])]),_:2},1040,["title"])]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.children,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createVNode(g,{rounded:"lg",title:c[a.itemTitle],value:c.id},{prepend:e.withCtx(()=>[e.createVNode(_,{modelValue:c.isSelected,"onUpdate:modelValue":m=>c.isSelected=m,onChange:m=>p(c)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["title","value"])]))),128))]),_:2},1032,["value"])):(e.openBlock(),e.createBlock(g,{key:0,rounded:"lg",title:C[a.itemTitle],value:C.id},null,8,["title","value"]))]))),128))]),_:1})]),_:1},8,["modelValue","disabled"])}}}),ie={install(o){o.component("FButton",N),o.component("FTextField",M),o.component("FDataTable",P),o.component("FTextarea",R),o.component("FAutocomplete",I),o.component("FCheckbox",A),o.component("FCurrencyField",E),o.component("FSelect",U),o.component("FNumberField",L),o.component("FSwitch",O),o.component("FDialog",j),o.component("FTimePicker",z),o.component("FDatePicker",X),o.component("FTreeView",H)}};k.FAutocomplete=I,k.FButton=N,k.FCheckbox=A,k.FCurrencyField=E,k.FDataTable=P,k.FDataTableHeaderType=T,k.FDatePicker=X,k.FDialog=j,k.FNumberField=L,k.FSelect=U,k.FSwitch=O,k.FTextField=M,k.FTextarea=R,k.FTimePicker=z,k.FTreeView=H,k.default=ie,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|